summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--scripts/src/machine.lua13
-rw-r--r--src/devices/machine/w83977tf.cpp379
-rw-r--r--src/devices/machine/w83977tf.h106
-rwxr-xr-xsrc/mame/mame.lst1
-rw-r--r--src/mame/pc/pcipc.cpp95
5 files changed, 589 insertions, 5 deletions
diff --git a/scripts/src/machine.lua b/scripts/src/machine.lua
index 1aa9da2fd2c..c093d9c518d 100644
--- a/scripts/src/machine.lua
+++ b/scripts/src/machine.lua
@@ -4363,6 +4363,19 @@ end
---------------------------------------------------
--
+--@src/devices/machine/w83977tf.h,MACHINES["W83977TF"] = true
+---------------------------------------------------
+
+if (MACHINES["W83977TF"]~=null) then
+ files {
+ MAME_DIR .. "src/devices/machine/w83977tf.cpp",
+ MAME_DIR .. "src/devices/machine/w83977tf.h",
+ }
+end
+
+
+---------------------------------------------------
+--
--@src/devices/machine/pdc.h,MACHINES["PDC"] = true
---------------------------------------------------
diff --git a/src/devices/machine/w83977tf.cpp b/src/devices/machine/w83977tf.cpp
new file mode 100644
index 00000000000..fb1d6474c9f
--- /dev/null
+++ b/src/devices/machine/w83977tf.cpp
@@ -0,0 +1,379 @@
+// license:BSD-3-Clause
+// copyright-holders: Angelo Salese
+/***************************************************************************
+
+Winbond W83977TF
+
+TODO:
+- PoC for a generic (LPC) Super I/O type, to be merged with fdc37c93x;
+
+***************************************************************************/
+
+#include "emu.h"
+#include "bus/isa/isa.h"
+//#include "machine/ds128x.h"
+#include "machine/w83977tf.h"
+
+#define VERBOSE (LOG_GENERAL)
+//#define LOG_OUTPUT_FUNC osd_printf_info
+#include "logmacro.h"
+
+DEFINE_DEVICE_TYPE(W83977TF, w83977tf_device, "w83977tf", "Winbond W83977TF Super I/O")
+
+w83977tf_device::w83977tf_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ : device_t(mconfig, W83977TF, tag, owner, clock)
+ , device_isa16_card_interface(mconfig, *this)
+ , device_memory_interface(mconfig, *this)
+ , m_space_config("superio_config_regs", ENDIANNESS_LITTLE, 8, 8, 0, address_map_constructor(FUNC(w83977tf_device::config_map), this))
+ , m_kbdc(*this, "pc_kbdc")
+ , m_rtc(*this, "rtc")
+ , m_logical_view(*this, "logical_view")
+ , m_gp20_reset_callback(*this)
+ , m_gp25_gatea20_callback(*this)
+ , m_irq1_callback(*this)
+ , m_irq8_callback(*this)
+ , m_irq9_callback(*this)
+// , m_txd1_callback(*this)
+// , m_ndtr1_callback(*this)
+// , m_nrts1_callback(*this)
+// , m_txd2_callback(*this)
+// , m_ndtr2_callback(*this)
+// , m_nrts2_callback(*this)
+{ }
+
+void w83977tf_device::device_start()
+{
+ set_isa_device();
+ //m_isa->set_dma_channel(0, this, true);
+ //m_isa->set_dma_channel(1, this, true);
+ //m_isa->set_dma_channel(2, this, true);
+ //m_isa->set_dma_channel(3, this, true);
+ remap(AS_IO, 0, 0x400);
+
+ m_gp20_reset_callback.resolve_safe();
+ m_gp25_gatea20_callback.resolve_safe();
+ m_irq1_callback.resolve_safe();
+ m_irq8_callback.resolve_safe();
+ m_irq9_callback.resolve_safe();
+// m_txd1_callback.resolve_safe();
+// m_ndtr1_callback.resolve_safe();
+// m_nrts1_callback.resolve_safe();
+// m_txd2_callback.resolve_safe();
+// m_ndtr2_callback.resolve_safe();
+// m_nrts2_callback.resolve_safe();
+}
+
+void w83977tf_device::device_reset()
+{
+ m_index = 0;
+ m_hefras = 0;
+ m_lock_sequence = 2;
+}
+
+device_memory_interface::space_config_vector w83977tf_device::memory_space_config() const
+{
+ return space_config_vector {
+ std::make_pair(0, &m_space_config)
+ };
+}
+
+void w83977tf_device::device_add_mconfig(machine_config &config)
+{
+ // doc doesn't explicitly mention this being at 8, assume from intialization
+ DS12885(config, m_rtc, 32.768_kHz_XTAL);
+ m_rtc->irq().set(FUNC(w83977tf_device::irq_rtc_w));
+ m_rtc->set_century_index(0x32);
+
+ KBDC8042(config, m_kbdc);
+ m_kbdc->set_keyboard_type(kbdc8042_device::KBDC8042_PS2);
+ m_kbdc->set_interrupt_type(kbdc8042_device::KBDC8042_DOUBLE);
+ m_kbdc->input_buffer_full_callback().set(FUNC(w83977tf_device::irq_keyboard_w));
+ m_kbdc->input_buffer_full_mouse_callback().set(FUNC(w83977tf_device::irq_mouse_w));
+ m_kbdc->system_reset_callback().set(FUNC(w83977tf_device::kbdp20_gp20_reset_w));
+ m_kbdc->gate_a20_callback().set(FUNC(w83977tf_device::kbdp21_gp25_gatea20_w));
+}
+
+
+void w83977tf_device::remap(int space_id, offs_t start, offs_t end)
+{
+ if (space_id == AS_IO)
+ {
+ u16 superio_base = m_hefras ? 0x370 : 0x3f0;
+ m_isa->install_device(superio_base, superio_base + 3, read8sm_delegate(*this, FUNC(w83977tf_device::read)), write8sm_delegate(*this, FUNC(w83977tf_device::write)));
+
+ if (m_activate[5] & 1)
+ {
+ m_isa->install_device(0x60, 0x60, read8sm_delegate(*m_kbdc, FUNC(kbdc8042_device::data_r)), write8sm_delegate(*m_kbdc, FUNC(kbdc8042_device::data_w)));
+ m_isa->install_device(0x64, 0x64, read8sm_delegate(*this, FUNC(w83977tf_device::keybc_status_r)), write8sm_delegate(*this, FUNC(w83977tf_device::keybc_command_w)));
+ }
+
+ if (m_activate[8] & 1)
+ {
+ // TODO: from port
+ m_isa->install_device(0x70, 0x7f, read8sm_delegate(*m_rtc, FUNC(ds12885_device::read)), write8sm_delegate(*m_rtc, FUNC(ds12885_device::write)));
+ }
+ }
+}
+
+uint8_t w83977tf_device::read(offs_t offset)
+{
+ if (m_lock_sequence)
+ return 0;
+
+ if (offset == 0)
+ return m_index;
+
+ return space().read_byte(m_index);
+}
+
+void w83977tf_device::write(offs_t offset, u8 data)
+{
+ if (offset == 0)
+ {
+ if (m_lock_sequence)
+ {
+ if (data == 0x87)
+ {
+ m_lock_sequence --;
+ //if (m_lock_sequence == 0)
+ // LOG("Config unlocked\n");
+ }
+ }
+ else
+ {
+ if (data == 0xaa)
+ {
+ //LOG("Config locked\n");
+ m_lock_sequence = 2;
+ return;
+ }
+ m_index = data;
+ }
+ }
+ else
+ {
+ if (!m_lock_sequence)
+ space().write_byte(m_index, data);
+ }
+}
+
+void w83977tf_device::config_map(address_map &map)
+{
+// map(0x02, 0x02) configuration control (bit 0 soft reset)
+ map(0x07, 0x07).lr8(NAME([this] () { return m_logical_index; })).w(FUNC(w83977tf_device::logical_device_select_w));
+ map(0x20, 0x20).lr8(NAME([] () { return 0x97; })); // device ID
+ map(0x21, 0x21).lr8(NAME([] () { return 0x73; })); // revision
+// map(0x22, 0x22) device power down control
+// map(0x23, 0x23) global immediate power down
+// map(0x24, 0x24)
+// map(0x25, 0x25)
+ map(0x26, 0x26).rw(FUNC(w83977tf_device::cr26_r), FUNC(w83977tf_device::cr26_w));
+// map(0x28, 0x28)
+// map(0x2a, 0x2a)
+// map(0x2b, 0x2b)
+// map(0x2c, 0x2c)
+// map(0x2d, 0x2f) Test Modes
+
+ map(0x30, 0xff).view(m_logical_view);
+ // FDC
+ m_logical_view[0](0x30, 0x30).rw(FUNC(w83977tf_device::activate_r<0>), FUNC(w83977tf_device::activate_w<0>));
+ m_logical_view[0](0x31, 0xff).unmaprw();
+ // PRT
+ m_logical_view[1](0x30, 0x30).rw(FUNC(w83977tf_device::activate_r<1>), FUNC(w83977tf_device::activate_w<1>));
+ m_logical_view[1](0x31, 0xff).unmaprw();
+ // UART1
+ m_logical_view[2](0x30, 0x30).rw(FUNC(w83977tf_device::activate_r<2>), FUNC(w83977tf_device::activate_w<2>));
+ m_logical_view[2](0x31, 0xff).unmaprw();
+ // UART2
+ m_logical_view[3](0x30, 0x30).rw(FUNC(w83977tf_device::activate_r<3>), FUNC(w83977tf_device::activate_w<3>));
+ m_logical_view[3](0x31, 0xff).unmaprw();
+ // <reserved>
+ m_logical_view[4](0x30, 0xff).unmaprw();
+ // KBC
+ m_logical_view[5](0x30, 0x30).rw(FUNC(w83977tf_device::activate_r<5>), FUNC(w83977tf_device::activate_w<5>));
+ m_logical_view[5](0x70, 0x70).rw(FUNC(w83977tf_device::keyb_irq_r), FUNC(w83977tf_device::keyb_irq_w));
+ m_logical_view[5](0x72, 0x72).rw(FUNC(w83977tf_device::mouse_irq_r), FUNC(w83977tf_device::mouse_irq_w));
+ // <reserved>
+ m_logical_view[6](0x30, 0xff).unmaprw();
+ // GPIO1
+ m_logical_view[7](0x30, 0x30).rw(FUNC(w83977tf_device::activate_r<7>), FUNC(w83977tf_device::activate_w<7>));
+ m_logical_view[7](0x31, 0xff).unmaprw();
+ // GPIO2
+ m_logical_view[8](0x30, 0x30).rw(FUNC(w83977tf_device::activate_r<8>), FUNC(w83977tf_device::activate_w<8>));
+ m_logical_view[8](0x70, 0x70).rw(FUNC(w83977tf_device::rtc_irq_r), FUNC(w83977tf_device::rtc_irq_w));
+ // GPIO3
+ m_logical_view[9](0x30, 0x30).rw(FUNC(w83977tf_device::activate_r<9>), FUNC(w83977tf_device::activate_w<9>));
+ m_logical_view[9](0x31, 0xff).unmaprw();
+ // ACPI
+ m_logical_view[0xa](0x30, 0x30).rw(FUNC(w83977tf_device::activate_r<0xa>), FUNC(w83977tf_device::activate_w<0xa>));
+ m_logical_view[0xa](0x31, 0xff).unmaprw();
+}
+
+/*
+ * Global register space
+ */
+
+void w83977tf_device::logical_device_select_w(offs_t offset, u8 data)
+{
+ m_logical_index = data;
+ if (m_logical_index <= 0xa)
+ m_logical_view.select(m_logical_index);
+ else
+ LOG("Attempt to select an unmapped device with %02x\n", data);
+}
+
+u8 w83977tf_device::cr26_r()
+{
+ return m_hefras << 6 | m_lockreg << 5;
+}
+
+void w83977tf_device::cr26_w(offs_t offset, u8 data)
+{
+ m_hefras = BIT(data, 6);
+ // TODO: disable R/W on logical devices?
+ m_lockreg = BIT(data, 5);
+}
+
+template <unsigned N> u8 w83977tf_device::activate_r(offs_t offset)
+{
+ return m_activate[N];
+}
+
+template <unsigned N> void w83977tf_device::activate_w(offs_t offset, u8 data)
+{
+ m_activate[N] = data & 1;
+ LOG("%d Device %s\n", N, data & 1 ? "enabled" : "disabled");
+ remap(AS_IO, 0, 0x400);
+}
+
+void w83977tf_device::request_irq(int irq, int state)
+{
+ switch (irq)
+ {
+ case 1:
+ m_irq1_callback(state);
+ break;
+ case 3:
+ m_isa->irq3_w(state);
+ break;
+ case 4:
+ m_isa->irq4_w(state);
+ break;
+ case 5:
+ m_isa->irq5_w(state);
+ break;
+ case 6:
+ m_isa->irq6_w(state);
+ break;
+ case 7:
+ m_isa->irq7_w(state);
+ break;
+ case 8:
+ m_irq8_callback(state);
+ break;
+ case 9:
+ m_irq9_callback(state);
+ break;
+ case 10:
+ m_isa->irq10_w(state);
+ break;
+ case 11:
+ m_isa->irq11_w(state);
+ break;
+ case 12:
+ m_isa->irq12_w(state);
+ break;
+ case 14:
+ m_isa->irq14_w(state);
+ break;
+ case 15:
+ m_isa->irq15_w(state);
+ break;
+ }
+}
+
+/*
+ * Device #5 (Keyboard)
+ */
+
+void w83977tf_device::kbdp21_gp25_gatea20_w(int state)
+{
+ if (m_activate[5] == false)
+ return;
+ m_gp25_gatea20_callback(state);
+}
+
+void w83977tf_device::kbdp20_gp20_reset_w(int state)
+{
+ if (m_activate[5] == false)
+ return;
+ m_gp20_reset_callback(state);
+}
+
+void w83977tf_device::irq_keyboard_w(int state)
+{
+ if (m_activate[5] == false)
+ return;
+ request_irq(m_keyb_irq_line, state ? ASSERT_LINE : CLEAR_LINE);
+}
+
+void w83977tf_device::irq_mouse_w(int state)
+{
+ if (m_activate[5] == false)
+ return;
+ request_irq(m_mouse_irq_line, state ? ASSERT_LINE : CLEAR_LINE);
+}
+
+u8 w83977tf_device::keyb_irq_r(offs_t offset)
+{
+ return m_keyb_irq_line;
+}
+
+void w83977tf_device::keyb_irq_w(offs_t offset, u8 data)
+{
+ m_keyb_irq_line = data & 0xf;
+ LOG("keyb irq routed to %02x\n", m_keyb_irq_line);
+}
+
+u8 w83977tf_device::mouse_irq_r(offs_t offset)
+{
+ return m_mouse_irq_line;
+}
+
+void w83977tf_device::mouse_irq_w(offs_t offset, u8 data)
+{
+ m_mouse_irq_line = data & 0xf;
+ LOG("mouse irq routed to %02x\n", m_mouse_irq_line);
+}
+
+u8 w83977tf_device::keybc_status_r(offs_t offset)
+{
+ return (m_kbdc->data_r(4) & 0xfb) | 0x10; // bios needs bit 2 to be 0 as powerup and bit 4 to be 1
+}
+
+void w83977tf_device::keybc_command_w(offs_t offset, u8 data)
+{
+ m_kbdc->data_w(4, data);
+}
+
+/*
+ * Device #8 (RTC)
+ */
+
+void w83977tf_device::irq_rtc_w(int state)
+{
+ if (m_activate[8] == false)
+ return;
+ request_irq(m_rtc_irq_line, state ? ASSERT_LINE : CLEAR_LINE);
+}
+
+u8 w83977tf_device::rtc_irq_r(offs_t offset)
+{
+ return m_rtc_irq_line;
+}
+
+void w83977tf_device::rtc_irq_w(offs_t offset, u8 data)
+{
+ m_rtc_irq_line = data & 0xf;
+ LOG("RTC irq routed to %02x\n", m_rtc_irq_line);
+}
diff --git a/src/devices/machine/w83977tf.h b/src/devices/machine/w83977tf.h
new file mode 100644
index 00000000000..e34e939e197
--- /dev/null
+++ b/src/devices/machine/w83977tf.h
@@ -0,0 +1,106 @@
+// license:BSD-3-Clause
+// copyright-holders: Angelo Salese
+
+#ifndef MAME_MACHINE_W83977TF_H
+#define MAME_MACHINE_W83977TF_H
+
+#pragma once
+
+#include "bus/isa/isa.h"
+#include "machine/8042kbdc.h"
+#include "machine/ds128x.h"
+
+class w83977tf_device : public device_t,
+ public device_isa16_card_interface,
+ public device_memory_interface
+{
+public:
+ w83977tf_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ ~w83977tf_device() {}
+
+ void remap(int space_id, offs_t start, offs_t end) override;
+
+ auto gp20_reset() { return m_gp20_reset_callback.bind(); }
+ auto gp25_gatea20() { return m_gp25_gatea20_callback.bind(); }
+ auto irq1() { return m_irq1_callback.bind(); }
+ auto irq8() { return m_irq8_callback.bind(); }
+ auto irq9() { return m_irq9_callback.bind(); }
+// auto txd1() { return m_txd1_callback.bind(); }
+// auto ndtr1() { return m_ndtr1_callback.bind(); }
+// auto nrts1() { return m_nrts1_callback.bind(); }
+// auto txd2() { return m_txd2_callback.bind(); }
+// auto ndtr2() { return m_ndtr2_callback.bind(); }
+// auto nrts2() { return m_nrts2_callback.bind(); }
+
+protected:
+ virtual void device_start() override;
+ virtual void device_reset() override;
+
+ virtual space_config_vector memory_space_config() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
+
+private:
+ const address_space_config m_space_config;
+
+ required_device<kbdc8042_device> m_kbdc;
+ required_device<ds12885_device> m_rtc;
+ memory_view m_logical_view;
+
+ devcb_write_line m_gp20_reset_callback;
+ devcb_write_line m_gp25_gatea20_callback;
+ devcb_write_line m_irq1_callback;
+ devcb_write_line m_irq8_callback;
+ devcb_write_line m_irq9_callback;
+// devcb_write_line m_txd1_callback;
+// devcb_write_line m_ndtr1_callback;
+// devcb_write_line m_nrts1_callback;
+// devcb_write_line m_txd2_callback;
+// devcb_write_line m_ndtr2_callback;
+// devcb_write_line m_nrts2_callback;
+
+ uint8_t read(offs_t offset);
+ void write(offs_t offset, u8 data);
+ u8 cr26_r();
+ void cr26_w(offs_t offset, u8 data);
+
+ void config_map(address_map &map);
+
+ u8 m_index = 0;
+ u8 m_logical_index = 0;
+ bool m_activate[0xb]{};
+ void logical_device_select_w(offs_t offset, u8 data);
+ template <unsigned N> u8 activate_r(offs_t offset);
+ template <unsigned N> void activate_w(offs_t offset, u8 data);
+
+ u8 keyb_irq_r(offs_t offset);
+ void keyb_irq_w(offs_t offset, u8 data);
+
+ u8 mouse_irq_r(offs_t offset);
+ void mouse_irq_w(offs_t offset, u8 data);
+
+ u8 keybc_status_r(offs_t offset);
+ void keybc_command_w(offs_t offset, u8 data);
+
+ void kbdp21_gp25_gatea20_w(int state);
+ void kbdp20_gp20_reset_w(int state);
+
+ u8 rtc_irq_r(offs_t offset);
+ void rtc_irq_w(offs_t offset, u8 data);
+
+ void irq_keyboard_w(int state);
+ void irq_mouse_w(int state);
+ void irq_rtc_w(int state);
+
+ void request_irq(int irq, int state);
+
+ u8 m_hefras = 0;
+ u8 m_lockreg = 0;
+ u8 m_lock_sequence = 0;
+ u8 m_keyb_irq_line = 0;
+ u8 m_mouse_irq_line = 0;
+ u8 m_rtc_irq_line = 0;
+};
+
+DECLARE_DEVICE_TYPE(W83977TF, w83977tf_device);
+
+#endif // MAME_MACHINE_W83977TF_H
diff --git a/src/mame/mame.lst b/src/mame/mame.lst
index fdd52e884ff..74d0cc52532 100755
--- a/src/mame/mame.lst
+++ b/src/mame/mame.lst
@@ -35339,6 +35339,7 @@ streetgr3 // (c) 1993
pcipc //
pcinv3 //
pcipctx //
+pciagp //
@source:pc/pcxt.cpp
filetto // (c) 1990 Novamatic
diff --git a/src/mame/pc/pcipc.cpp b/src/mame/pc/pcipc.cpp
index b1d564bd106..e275b5f84ca 100644
--- a/src/mame/pc/pcipc.cpp
+++ b/src/mame/pc/pcipc.cpp
@@ -27,16 +27,21 @@
#include "bus/rs232/terminal.h"
#include "cpu/i386/i386.h"
#include "machine/fdc37c93x.h"
+#include "machine/w83977tf.h"
#include "machine/i82371sb.h"
#include "machine/i82439hx.h"
#include "machine/i82439tx.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/pci-ide.h"
#include "machine/pci.h"
#include "video/mga2064w.h"
#include "video/virge_pci.h"
#include "video/riva128.h"
-
namespace {
class pcipc_state : public driver_device
@@ -54,6 +59,7 @@ public:
void pcipc(machine_config &config);
void pcipctx(machine_config &config);
void pcinv3(machine_config &config);
+ void pciagp(machine_config &config);
pcipc_state(const machine_config &mconfig, device_type type, const char *tag);
@@ -67,7 +73,8 @@ private:
virtual void machine_start() override;
virtual void machine_reset() override;
- static void superio_config(device_t *device);
+ static void smc_superio_config(device_t *device);
+ static void winbond_superio_config(device_t *device);
};
pcipc_state::pcipc_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag)
@@ -485,6 +492,7 @@ void pcipc_state::boot_state_award_w(uint8_t data)
static void isa_internal_devices(device_slot_interface &device)
{
device.option_add("fdc37c93x", FDC37C93X);
+ device.option_add("w83977tf", W83977TF);
}
static void isa_com(device_slot_interface &device)
@@ -499,7 +507,7 @@ static void isa_com(device_slot_interface &device)
device.option_add("sun_kbd", SUN_KBD_ADAPTOR);
}
-void pcipc_state::superio_config(device_t *device)
+void pcipc_state::smc_superio_config(device_t *device)
{
fdc37c93x_device &fdc = *downcast<fdc37c93x_device *>(device);
fdc.set_sysopt_pin(1);
@@ -515,6 +523,23 @@ void pcipc_state::superio_config(device_t *device)
fdc.nrts2().set(":serport1", FUNC(rs232_port_device::write_rts));
}
+void pcipc_state::winbond_superio_config(device_t *device)
+{
+ w83977tf_device &fdc = *downcast<w83977tf_device *>(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(i82371sb_isa_device::pc_irq1_w));
+ fdc.irq8().set(":pci:07.0", FUNC(i82371sb_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 pcipc_state::pcipc_map(address_map &map)
{
map.unmap_value_high();
@@ -546,7 +571,7 @@ void pcipc_state::pcipc(machine_config &config)
// MGA2064W(config, "pci:12.0", 0);
VIRGE_PCI(config, "pci:12.0", 0); // use VIRGEDX_PCI for its VESA 2.0 BIOS
- ISA16_SLOT(config, "board4", 0, "pci:07.0:isabus", isa_internal_devices, "fdc37c93x", true).set_option_machine_config("fdc37c93x", superio_config);
+ ISA16_SLOT(config, "board4", 0, "pci:07.0:isabus", isa_internal_devices, "fdc37c93x", true).set_option_machine_config("fdc37c93x", smc_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);
@@ -588,6 +613,58 @@ void pcipc_state::pcinv3(machine_config &config)
RIVA128(config.replace(), "pci:12.0", 0);
}
+void pcipc_state::pciagp(machine_config &config)
+{
+ // TODO: starts at 233'000'000
+ pentium2_device &maincpu(PENTIUM2(config, "maincpu", 90'000'000));
+ maincpu.set_addrmap(AS_PROGRAM, &pcipc_state::pcipc_map);
+ maincpu.set_addrmap(AS_IO, &pcipc_state::pcipc_map_io);
+ maincpu.set_irq_acknowledge_callback("pci:07.0:pic8259_master", FUNC(pic8259_device::inta_cb));
+ maincpu.smiact().set("pci:00.0", FUNC(i82443bx_host_device::smi_act_w));
+
+ PCI_ROOT(config, "pci", 0);
+ I82443BX_HOST(config, "pci:00.0", 0, "maincpu", 128*1024*1024);
+ I82443BX_BRIDGE(config, "pci:01.0", 0 ); //"pci:01.0:00.0");
+ //I82443BX_AGP (config, "pci:01.0:00.0");
+
+ i82371eb_isa_device &isa(I82371EB_ISA(config, "pci:07.0", 0, "maincpu"));
+ isa.boot_state_hook().set(FUNC(pcipc_state::boot_state_award_w));
+ 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);
+
+#if 0
+ rs232_port_device& serport0(RS232_PORT(config, "serport0", isa_com, nullptr)); // "microsoft_mouse"));
+ serport0.rxd_handler().set("board4:w83977tf", FUNC(fdc37c93x_device::rxd1_w));
+ serport0.dcd_handler().set("board4:w83977tf", FUNC(fdc37c93x_device::ndcd1_w));
+ serport0.dsr_handler().set("board4:w83977tf", FUNC(fdc37c93x_device::ndsr1_w));
+ serport0.ri_handler().set("board4:w83977tf", FUNC(fdc37c93x_device::nri1_w));
+ serport0.cts_handler().set("board4:w83977tf", FUNC(fdc37c93x_device::ncts1_w));
+
+ rs232_port_device &serport1(RS232_PORT(config, "serport1", isa_com, nullptr));
+ serport1.rxd_handler().set("board4:w83977tf", FUNC(fdc37c93x_device::rxd2_w));
+ serport1.dcd_handler().set("board4:w83977tf", FUNC(fdc37c93x_device::ndcd2_w));
+ serport1.dsr_handler().set("board4:w83977tf", FUNC(fdc37c93x_device::ndsr2_w));
+ serport1.ri_handler().set("board4:w83977tf", FUNC(fdc37c93x_device::nri2_w));
+ serport1.cts_handler().set("board4:w83977tf", FUNC(fdc37c93x_device::ncts2_w));
+#endif
+
+ // TODO: temp, to be converted to a proper AGP card once we make this to boot
+ VIRGE_PCI(config, "pci:0e.0", 0); // J4C1
+}
+
ROM_START(pcipc)
ROM_REGION32_LE(0x40000, "pci:07.0", 0) /* PC bios */
ROM_SYSTEM_BIOS(0, "m55ns04", "m55ns04") // Micronics M55HI-Plus with no sound
@@ -617,6 +694,13 @@ ROM_START(pcinv3)
ROMX_LOAD("m55-04ns.rom", 0x20000, 0x20000, CRC(0116b2b0) SHA1(19b0203decfd4396695334517488d488aec3ccde), ROM_BIOS(0))
ROM_END
+ROM_START(pciagp)
+ ROM_REGION32_LE(0x40000, "pci:07.0", 0) /* PC bios */
+ // a.k.a. the BIOS present in savquest.cpp
+ ROM_SYSTEM_BIOS(0, "dfi_p2xbl", "Octek Rhino BX-ATX")
+ ROMX_LOAD( "p2xbl_award_451pg.bin", 0x00000, 0x040000, CRC(37d0030e) SHA1(c6773d0e02325116f95c497b9953f59a9ac81317), ROM_BIOS(0) )
+ROM_END
+
static INPUT_PORTS_START(pcipc)
INPUT_PORTS_END
@@ -624,5 +708,6 @@ INPUT_PORTS_END
COMP(1998, pcipc, 0, 0, pcipc, pcipc, pcipc_state, empty_init, "Hack Inc.", "Sandbox PCI PC (430HX)", MACHINE_NO_SOUND)
-COMP(1998, pcinv3, pcipc, 0, pcinv3,pcipc, pcipc_state, empty_init, "Hack Inc.", "Sandbox PCI PC (430HX with Riva 128)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING)
+COMP(1998, pcinv3, pcipc, 0, pcinv3, pcipc, pcipc_state, empty_init, "Hack Inc.", "Sandbox PCI PC (430HX with Riva 128)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING)
COMP(1998, pcipctx, 0, 0, pcipctx, pcipc, pcipc_state, empty_init, "Hack Inc.", "Sandbox PCI PC (430TX)", MACHINE_NO_SOUND)
+COMP(1999, pciagp, 0, 0, pciagp, pcipc, pcipc_state, empty_init, "Hack Inc.", "Sandbox PCI/AGP PC (440BX)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING)