From 299447c50f701bc5d4efc11cf808646622cbcbb4 Mon Sep 17 00:00:00 2001 From: angelosa Date: Thu, 19 Oct 2023 21:58:30 +0200 Subject: machine/i82443bx_host.cpp: stub a 82443LX PAC variant New systems marked not working ------------------------------ Gigabyte GA-6LA7 [The Retro Web] --- src/devices/machine/i82443bx_host.cpp | 30 ++++++++++- src/devices/machine/i82443bx_host.h | 29 ++++++++++- src/mame/mame.lst | 3 +- src/mame/pc/quakeat.cpp | 98 +++++++++++++++++++++++++++++++++-- 4 files changed, 153 insertions(+), 7 deletions(-) diff --git a/src/devices/machine/i82443bx_host.cpp b/src/devices/machine/i82443bx_host.cpp index 5f833f63fd4..aa06e993496 100644 --- a/src/devices/machine/i82443bx_host.cpp +++ b/src/devices/machine/i82443bx_host.cpp @@ -26,15 +26,28 @@ #define LOGTODO(...) LOGMASKED(LOG_TODO, __VA_ARGS__) DEFINE_DEVICE_TYPE(I82443BX_HOST, i82443bx_host_device, "i82443bx_host", "Intel 82443BX PAC Host to PCI northbridge") +DEFINE_DEVICE_TYPE(I82443LX_HOST, i82443lx_host_device, "i82443lx_host", "Intel 82443LX PAC Host to PCI northbridge") + +i82443bx_host_device::i82443bx_host_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) + : i82439hx_host_device(mconfig, type, tag, owner, clock) +{ +} i82443bx_host_device::i82443bx_host_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : i82439hx_host_device(mconfig, I82443BX_HOST, tag, owner, clock) + : i82443bx_host_device(mconfig, I82443BX_HOST, tag, owner, clock) { // TODO: Device ID (DID) is 0x7192 when AGP_DIS is '1' // rev 0x02 82443BX B-1 set_ids_host(0x80867190, 0x02, 0x00000000); } + +i82443lx_host_device::i82443lx_host_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + : i82443bx_host_device(mconfig, I82443LX_HOST, tag, owner, clock) +{ + set_ids_host(0x80867180, 0x00, 0x00000000); +} + void i82443bx_host_device::config_map(address_map &map) { i82439hx_host_device::config_map(map); @@ -128,14 +141,27 @@ void i82443bx_host_device::bspad_w(offs_t offset, u8 data) ****************************/ DEFINE_DEVICE_TYPE(I82443BX_BRIDGE, i82443bx_bridge_device, "i82443bx_bridge", "Intel 82443BX Virtual PCI-to-PCI bridge") +DEFINE_DEVICE_TYPE(I82443LX_BRIDGE, i82443lx_bridge_device, "i82443lx_bridge", "Intel 82443LX Virtual PCI-to-PCI bridge") + +i82443bx_bridge_device::i82443bx_bridge_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) + : pci_bridge_device(mconfig, type, tag, owner, clock) +// , m_vga(*this, finder_base::DUMMY_TAG) +{ +} i82443bx_bridge_device::i82443bx_bridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : pci_bridge_device(mconfig, I82443BX_BRIDGE, tag, owner, clock) + : i82443bx_bridge_device(mconfig, I82443BX_BRIDGE, tag, owner, clock) // , m_vga(*this, finder_base::DUMMY_TAG) { set_ids_bridge(0x80867191, 0x00); } +i82443lx_bridge_device::i82443lx_bridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + : i82443bx_bridge_device(mconfig, I82443LX_BRIDGE, tag, owner, clock) +{ + set_ids_bridge(0x80867181, 0x00); +} + void i82443bx_bridge_device::map_extra( uint64_t memory_window_start, uint64_t memory_window_end, uint64_t memory_offset, address_space *memory_space, uint64_t io_window_start, uint64_t io_window_end, uint64_t io_offset, address_space *io_space diff --git a/src/devices/machine/i82443bx_host.h b/src/devices/machine/i82443bx_host.h index a2a1716de27..d4848985d88 100644 --- a/src/devices/machine/i82443bx_host.h +++ b/src/devices/machine/i82443bx_host.h @@ -9,7 +9,8 @@ #include "pci.h" #include "machine/i82439hx.h" -class i82443bx_host_device : public i82439hx_host_device { +class i82443bx_host_device : public i82439hx_host_device +{ public: template i82443bx_host_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag, int ram_size) @@ -21,6 +22,8 @@ public: i82443bx_host_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); protected: + i82443bx_host_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + virtual void config_map(address_map &map) override; virtual void device_start() override; @@ -42,6 +45,19 @@ private: void bspad_w(offs_t offset, u8 data); }; +class i82443lx_host_device : public i82443bx_host_device +{ +public: + template + i82443lx_host_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag, int ram_size) + : i82443lx_host_device(mconfig, tag, owner, clock) + { + set_cpu_tag(std::forward(cpu_tag)); + set_ram_size(ram_size); + } + i82443lx_host_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); +}; + class i82443bx_bridge_device : public pci_bridge_device { public: @@ -59,6 +75,8 @@ public: i82443bx_bridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); protected: + i82443bx_bridge_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + virtual void device_start() override; virtual void device_reset() override; @@ -71,8 +89,17 @@ private: virtual void bridge_control_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) override; }; +class i82443lx_bridge_device : public i82443bx_bridge_device +{ +public: + i82443lx_bridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); +}; + DECLARE_DEVICE_TYPE(I82443BX_HOST, i82443bx_host_device) +DECLARE_DEVICE_TYPE(I82443LX_HOST, i82443lx_host_device) + DECLARE_DEVICE_TYPE(I82443BX_BRIDGE, i82443bx_bridge_device) +DECLARE_DEVICE_TYPE(I82443LX_BRIDGE, i82443lx_bridge_device) #endif // MAME_MACHINE_I82443BX_HOST_H diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 4b8a67c5e57..7830d7899ef 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -35618,7 +35618,8 @@ i8580071 // IBM PS/2 8580-071 (Model 80) i8580111 // IBM PS/2 8580-111 (Model 80) @source:pc/quakeat.cpp -quake // (c) 19?? Lazer-Tron / iD Software +ga6la7 // +quake // (c) 1998 Lazer-Tron / iD Software @source:pc/queen.cpp queen // diff --git a/src/mame/pc/quakeat.cpp b/src/mame/pc/quakeat.cpp index be852ab013e..0ac4759e047 100644 --- a/src/mame/pc/quakeat.cpp +++ b/src/mame/pc/quakeat.cpp @@ -80,6 +80,20 @@ HDD image contains remnants of an Actua Soccer Arcade installation. #include "emu.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 "machine/w83977tf.h" +#include "bus/isa/isa_cards.h" +//#include "bus/rs232/hlemouse.h" +//#include "bus/rs232/null_modem.h" +//#include "bus/rs232/rs232.h" +//#include "bus/rs232/sun_kbd.h" +//#include "bus/rs232/terminal.h" +#include "video/clgd546x_laguna.h" namespace { @@ -92,26 +106,98 @@ public: , m_maincpu(*this, "maincpu") { } + void ga6la7(machine_config &config); void quake(machine_config &config); private: - required_device m_maincpu; + required_device m_maincpu; + void ga6la7_map(address_map &map); + void ga6la7_io(address_map &map); void quake_map(address_map &map); + + static void winbond_superio_config(device_t *device); }; +void quakeat_state::ga6la7_map(address_map &map) +{ + map.unmap_value_high(); +} + +void quakeat_state::ga6la7_io(address_map &map) +{ + map.unmap_value_high(); +} +// temp, to be removed void quakeat_state::quake_map(address_map &map) { map(0x000e0000, 0x000fffff).rom().region("pc_bios", 0); map(0xfffe0000, 0xffffffff).rom().region("pc_bios", 0); - } static INPUT_PORTS_START( quake ) INPUT_PORTS_END +static void isa_internal_devices(device_slot_interface &device) +{ + device.option_add("w83977tf", W83977TF); +} + +void quakeat_state::winbond_superio_config(device_t *device) +{ + // TODO: Winbond w83977ef + w83977tf_device &fdc = *downcast(device); +// fdc.set_sysopt_pin(1); + fdc.gp20_reset().set_inputline(":maincpu", INPUT_LINE_RESET); + fdc.gp25_gatea20().set_inputline(":maincpu", INPUT_LINE_A20); + fdc.irq1().set(":pci:07.0", FUNC(i82371eb_isa_device::pc_irq1_w)); + fdc.irq8().set(":pci:07.0", FUNC(i82371eb_isa_device::pc_irq8n_w)); +// fdc.txd1().set(":serport0", FUNC(rs232_port_device::write_txd)); +// fdc.ndtr1().set(":serport0", FUNC(rs232_port_device::write_dtr)); +// fdc.nrts1().set(":serport0", FUNC(rs232_port_device::write_rts)); +// fdc.txd2().set(":serport1", FUNC(rs232_port_device::write_txd)); +// fdc.ndtr2().set(":serport1", FUNC(rs232_port_device::write_dtr)); +// fdc.nrts2().set(":serport1", FUNC(rs232_port_device::write_rts)); +} + +void quakeat_state::ga6la7(machine_config &config) +{ + // TODO: Socket 370 Celeron with 366-566 MHz + PENTIUM2(config, m_maincpu, 90'000'000); + m_maincpu->set_addrmap(AS_PROGRAM, &quakeat_state::ga6la7_map); + m_maincpu->set_addrmap(AS_IO, &quakeat_state::ga6la7_io); + 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)); + + PCI_ROOT(config, "pci", 0); + // 16MB - 384MB of supported EDO RAM + I82443LX_HOST(config, "pci:00.0", 0, "maincpu", 256*1024*1024); + I82443LX_BRIDGE(config, "pci:01.0", 0 ); //"pci:01.0:00.0"); + //I82443LX_AGP (config, "pci:01.0:00.0"); + + i82371eb_isa_device &isa(I82371EB_ISA(config, "pci:07.0", 0, "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, "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); + + ISA16_SLOT(config, "board4", 0, "pci:07.0:isabus", isa_internal_devices, "w83977tf", true).set_option_machine_config("w83977tf", winbond_superio_config); + ISA16_SLOT(config, "isa1", 0, "pci:07.0:isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa2", 0, "pci:07.0:isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa3", 0, "pci:07.0:isabus", pc_isa16_cards, nullptr, false); + + // TODO: really has a Voodoo Banshee instead + CIRRUS_GD5465_LAGUNA3D(config, "pci:01.0:00.0", 0); +} void quakeat_state::quake(machine_config &config) { @@ -123,6 +209,10 @@ void quakeat_state::quake(machine_config &config) // ... } +ROM_START( ga6la7 ) + ROM_REGION32_LE(0x40000, "pci:07.0", 0) + ROM_LOAD("6la7a.14", 0x00000, 0x40000, CRC(4fb23f37) SHA1(b8c6a647c6f3e5000b8d4d99c42eb1dc66be0cd8) ) +ROM_END ROM_START(quake) // 4N4XL0X0.86A.0011.P05 @@ -144,5 +234,7 @@ ROM_END } // anonymous namespace -GAME( 1998, quake, 0, quake, quake, quakeat_state, empty_init, ROT0, "Lazer-Tron / iD Software", "Quake Arcade Tournament (Release Beta 2)", MACHINE_IS_SKELETON ) +COMP( 1999, ga6la7, 0, 0, ga6la7, 0, quakeat_state, empty_init, "Gigabyte", "GA-6LA7", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) // errors out with ISA state 0x05 (keyboard), then wants flash ROM i/f to work properly + +GAME( 1998, quake, 0, quake, quake, quakeat_state, empty_init, ROT0, "Lazer-Tron / iD Software", "Quake Arcade Tournament (Release Beta 2)", MACHINE_IS_SKELETON ) // Actua Soccer Arcade -- cgit v1.2.3