From 2e52b74c8a4d4c8ed46a1b91707dd45333da1f60 Mon Sep 17 00:00:00 2001 From: angelosa Date: Thu, 3 Oct 2024 12:16:17 +0200 Subject: ibm/thinkpad600.cpp: hookup base chipset --- src/mame/ibm/thinkpad600.cpp | 87 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 73 insertions(+), 14 deletions(-) diff --git a/src/mame/ibm/thinkpad600.cpp b/src/mame/ibm/thinkpad600.cpp index a76c1a9567d..9876cc85c0c 100644 --- a/src/mame/ibm/thinkpad600.cpp +++ b/src/mame/ibm/thinkpad600.cpp @@ -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. @@ -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" @@ -68,29 +76,76 @@ public: void thinkpad600e(machine_config &config); void thinkpad600(machine_config &config); -private: - required_device m_maincpu; +protected: void thinkpad600_base(machine_config &config); + +private: + required_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); } @@ -98,13 +153,17 @@ void thinkpad600_state::thinkpad600e(machine_config &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) @@ -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) @@ -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 ) -- cgit v1.2.3