Skip to content

Commit

Permalink
ibm/thinkpad600.cpp: hookup base chipset
Browse files Browse the repository at this point in the history
  • Loading branch information
angelosa committed Oct 3, 2024
1 parent 57e5d60 commit 2e52b74
Showing 1 changed file with 73 additions and 14 deletions.
87 changes: 73 additions & 14 deletions src/mame/ibm/thinkpad600.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// copyright-holders:
/*************************************************************************************************************
Skeleton driver for IBM ThinkPad 600 series.
The IBM ThinkPad 600 series was a series of notebook computers introduced in 1998 by IBM as an lighter and
The IBM ThinkPad 600 series was a series of notebook computers introduced in 1998 by IBM as an lighter and
slimmer alternative to the 770 series. Three models were produced, the 600, 600E, and 600X.
Hardware for the 600E model.
Expand Down Expand Up @@ -49,9 +49,17 @@ Hardware for the 600 model.
*************************************************************************************************************/

#include "emu.h"
#include "cpu/h8/h8325.h"
#include "cpu/h8/h83337.h"
#include "cpu/i386/i386.h"
#include "machine/pci.h"
#include "machine/pci-ide.h"
#include "machine/i82443bx_host.h"
#include "machine/i82371eb_isa.h"
#include "machine/i82371eb_ide.h"
#include "machine/i82371eb_acpi.h"
#include "machine/i82371eb_usb.h"
#include "bus/isa/isa_cards.h"

#include "speaker.h"


Expand All @@ -68,43 +76,94 @@ class thinkpad600_state : public driver_device
void thinkpad600e(machine_config &config);
void thinkpad600(machine_config &config);

private:
required_device<cpu_device> m_maincpu;
protected:
void thinkpad600_base(machine_config &config);

private:
required_device<pentium2_device> m_maincpu;

void main_map(address_map &map);
void mcu_map(address_map &map);

//static void superio_config(device_t *device);
};

void thinkpad600_state::main_map(address_map &map)
{
map.unmap_value_high();
}

void thinkpad600_state::mcu_map(address_map &map)
{
map(0x0000, 0xf77f).rom().region("mcu", 0);
}

static INPUT_PORTS_START(thinkpad600)
INPUT_PORTS_END

void thinkpad600_state::thinkpad600_base(machine_config &config)
{
PCI_ROOT(config, "pci", 0);
// ...
// TODO: move away, maps on MB resource, bump to H83437
h83337_device &mcu(H83337(config, "mcu", XTAL(16'000'000))); // Actually an Hitachi HD64F3437TF, unknown clock
mcu.set_addrmap(AS_PROGRAM, &thinkpad600_state::mcu_map);
}

H8325(config, "mcu", XTAL(16'000'000)); // Actually an Hitachi HD64F3437TF, unknown clock
//void thinkpad600_state::superio_config(device_t *device)
//{
//}

SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
}
//static void isa_internal_devices(device_slot_interface &device)
//{
// device.option_add("w83787f", W83787F);
//}

void thinkpad600_state::thinkpad600e(machine_config &config)
{
PENTIUM2(config, m_maincpu, 366'000'000); // Intel Pentium II 366 Mobile MMC-2 (PMG36602002AA)
m_maincpu->set_addrmap(AS_PROGRAM, &thinkpad600_state::main_map);
m_maincpu->set_irq_acknowledge_callback("pci:07.0:pic8259_master", FUNC(pic8259_device::inta_cb));
m_maincpu->smiact().set("pci:00.0", FUNC(i82443bx_host_device::smi_act_w));

// TODO: PCI config space guessed from a Fujitsu Lifebook
PCI_ROOT(config, "pci", 0);
I82443BX_HOST(config, "pci:00.0", 0, "maincpu", 64*1024*1024);
i82371eb_isa_device &isa(I82371EB_ISA(config, "pci:07.0", 0, m_maincpu));
isa.boot_state_hook().set([](u8 data) { /* printf("%02x\n", data); */ });
isa.smi().set_inputline("maincpu", INPUT_LINE_SMI);

i82371eb_ide_device &ide(I82371EB_IDE(config, "pci:07.1", 0, m_maincpu));
ide.irq_pri().set("pci:07.0", FUNC(i82371eb_isa_device::pc_irq14_w));
ide.irq_sec().set("pci:07.0", FUNC(i82371eb_isa_device::pc_mirq0_w));

I82371EB_USB (config, "pci:07.2", 0);
I82371EB_ACPI(config, "pci:07.3", 0);
LPC_ACPI (config, "pci:07.3:acpi", 0);
SMBUS (config, "pci:07.3:smbus", 0);

// TODO: modem at "pci:10.0"
// TODO: cardbus at "pci:12.0"
// TODO: NeoMagic at "pci:14.0" / "pci:14.1" (video & AC'97 integrated sound, likely requires BIOS)

// TODO: motherboard Super I/O resource here
// ISA16_SLOT(config, "board4", 0, "pci:07.0:isabus", isa_internal_devices, "pc97338", true).set_option_machine_config("pc97338", superio_config);

thinkpad600_base(config);
}

void thinkpad600_state::thinkpad600(machine_config &config)
{
PENTIUM2(config, m_maincpu, 300'000'000); // Intel Pentium II 300 Mobile MMC-1 (PMD30005002AA)
m_maincpu->set_disable();

// TODO: fill me, uses earlier AB
PCI_ROOT(config, "pci", 0);

thinkpad600_base(config);
}


ROM_START(thinkpad600e)
ROM_REGION( 0x80000, "maincpu", 0 )
ROM_REGION( 0x80000, "pci:07.0", 0 )
ROM_LOAD( "e28f004b5t80-10l1056_rev15_h0399m.u60", 0x00000, 0x80000, CRC(fba7567b) SHA1(a84e7d4e5740150e78e5002714c9125705f3356a) ) // BIOS

ROM_REGION(0x0f780, "mcu", 0)
Expand All @@ -121,7 +180,7 @@ ROM_START(thinkpad600e)
ROM_END

ROM_START(thinkpad600)
ROM_REGION( 0x80000, "maincpu", 0 )
ROM_REGION( 0x80000, "pci:07.0", 0 )
ROM_LOAD( "tms28f004b_18l9949_rev16-i2298m.u76", 0x00000, 0x80000, CRC(00a52b32) SHA1(08db425b8edb3a036f22beb588caa6f050fc8eb2) ) // BIOS

ROM_REGION(0x0f780, "mcu", 0)
Expand All @@ -137,5 +196,5 @@ ROM_END
} // anonymous namespace

// YEAR, NAME, PARENT, COMPAT, MACHINE, INPUT, CLASS, INIT, COMPANY, FULLNAME, FLAGS
COMP( 1999, thinkpad600e, 0, 0, thinkpad600e, thinkpad600, thinkpad600_state, empty_init, "IBM", "ThinkPad 600E", MACHINE_IS_SKELETON )
COMP( 1998, thinkpad600, 0, 0, thinkpad600, thinkpad600, thinkpad600_state, empty_init, "IBM", "ThinkPad 600", MACHINE_IS_SKELETON )
COMP( 1999, thinkpad600e, 0, 0, thinkpad600e, thinkpad600, thinkpad600_state, empty_init, "IBM", "ThinkPad 600E", MACHINE_NOT_WORKING | MACHINE_NO_SOUND )
COMP( 1998, thinkpad600, 0, 0, thinkpad600, thinkpad600, thinkpad600_state, empty_init, "IBM", "ThinkPad 600", MACHINE_NOT_WORKING | MACHINE_NO_SOUND )

0 comments on commit 2e52b74

Please sign in to comment.