summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/seattlecmp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/seattlecmp.cpp')
-rw-r--r--src/mame/drivers/seattlecmp.cpp45
1 files changed, 35 insertions, 10 deletions
diff --git a/src/mame/drivers/seattlecmp.cpp b/src/mame/drivers/seattlecmp.cpp
index 9eb4a1efeb8..1acf912a050 100644
--- a/src/mame/drivers/seattlecmp.cpp
+++ b/src/mame/drivers/seattlecmp.cpp
@@ -31,8 +31,9 @@ There is a 4MHz crystal connected to the 9513.
#include "emu.h"
#include "cpu/i86/i86.h"
-#include "machine/clock.h"
+#include "machine/am9513.h"
#include "machine/i8251.h"
+#include "machine/pic8259.h"
#include "bus/rs232/rs232.h"
@@ -42,13 +43,26 @@ public:
seattle_comp_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
+ , m_pic(*this, "pic%u", 1)
{ }
+ DECLARE_READ8_MEMBER(pic_slave_ack);
+
private:
required_device<cpu_device> m_maincpu;
+ required_device_array<pic8259_device, 2> m_pic;
};
+READ8_MEMBER(seattle_comp_state::pic_slave_ack)
+{
+ if (offset == 1)
+ return m_pic[1]->acknowledge();
+
+ return 0;
+}
+
+
static ADDRESS_MAP_START(seattle_mem, AS_PROGRAM, 16, seattle_comp_state)
ADDRESS_MAP_UNMAP_HIGH
AM_RANGE(0x00000,0xff7ff) AM_RAM
@@ -60,10 +74,9 @@ static ADDRESS_MAP_START(seattle_io, AS_IO, 16, seattle_comp_state)
ADDRESS_MAP_GLOBAL_MASK(0xff)
AM_RANGE(0xf6, 0xf7) AM_DEVREADWRITE8("uart", i8251_device, data_r, data_w, 0x00ff)
AM_RANGE(0xf6, 0xf7) AM_DEVREADWRITE8("uart", i8251_device, status_r, control_w, 0xff00)
- //AM_RANGE(0xf0, 0xf1) 8259_0
- //AM_RANGE(0xf2, 0xf3) 8259_1
- //AM_RANGE(0xf4, 0xf5) AM9513
- //AM_RANGE(0xf6, 0xf7) 8251
+ AM_RANGE(0xf0, 0xf1) AM_DEVREADWRITE8("pic1", pic8259_device, read, write, 0xffff)
+ AM_RANGE(0xf2, 0xf3) AM_DEVREADWRITE8("pic2", pic8259_device, read, write, 0xffff)
+ AM_RANGE(0xf4, 0xf5) AM_DEVREADWRITE8("stc", am9513_device, read8, write8, 0xffff)
//AM_RANGE(0xfc, 0xfd) Parallel data, status, serial DCD
//AM_RANGE(0xfe, 0xff) Eprom disable bit, read sense switches (bank of 8 dipswitches)
ADDRESS_MAP_END
@@ -75,8 +88,8 @@ INPUT_PORTS_END
// bit 7 needs to be stripped off, we do this by choosing 7 bits and even parity
static DEVICE_INPUT_DEFAULTS_START( terminal )
- DEVICE_INPUT_DEFAULTS( "RS232_RXBAUD", 0xff, RS232_BAUD_9600 )
- DEVICE_INPUT_DEFAULTS( "RS232_TXBAUD", 0xff, RS232_BAUD_9600 )
+ DEVICE_INPUT_DEFAULTS( "RS232_RXBAUD", 0xff, RS232_BAUD_9615 )
+ DEVICE_INPUT_DEFAULTS( "RS232_TXBAUD", 0xff, RS232_BAUD_9615 )
DEVICE_INPUT_DEFAULTS( "RS232_STARTBITS", 0xff, RS232_STARTBITS_1 )
DEVICE_INPUT_DEFAULTS( "RS232_DATABITS", 0xff, RS232_DATABITS_7 )
DEVICE_INPUT_DEFAULTS( "RS232_PARITY", 0xff, RS232_PARITY_EVEN )
@@ -88,16 +101,28 @@ static MACHINE_CONFIG_START( seattle )
MCFG_CPU_ADD("maincpu", I8086, 4000000) // no idea
MCFG_CPU_PROGRAM_MAP(seattle_mem)
MCFG_CPU_IO_MAP(seattle_io)
+ MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("pic1", pic8259_device, inta_cb)
+
+ MCFG_DEVICE_ADD("pic1", PIC8259, 0)
+ MCFG_PIC8259_OUT_INT_CB(INPUTLINE("maincpu", INPUT_LINE_INT0))
+ MCFG_PIC8259_CASCADE_ACK_CB(READ8(seattle_comp_state, pic_slave_ack))
+
+ MCFG_DEVICE_ADD("pic2", PIC8259, 0)
+ MCFG_PIC8259_OUT_INT_CB(DEVWRITELINE("pic1", pic8259_device, ir1_w))
- /* video hardware */
- MCFG_DEVICE_ADD("uart_clock", CLOCK, 153600)
- MCFG_CLOCK_SIGNAL_HANDLER(DEVWRITELINE("uart", i8251_device, write_txc))
+ MCFG_DEVICE_ADD("stc", AM9513, XTAL_4MHz)
+ MCFG_AM9513_OUT2_CALLBACK(DEVWRITELINE("pic2", pic8259_device, ir0_w))
+ MCFG_AM9513_OUT3_CALLBACK(DEVWRITELINE("pic2", pic8259_device, ir4_w))
+ MCFG_AM9513_OUT4_CALLBACK(DEVWRITELINE("pic2", pic8259_device, ir7_w))
+ MCFG_AM9513_OUT5_CALLBACK(DEVWRITELINE("uart", i8251_device, write_txc))
MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("uart", i8251_device, write_rxc))
MCFG_DEVICE_ADD("uart", I8251, 0)
MCFG_I8251_TXD_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_txd))
MCFG_I8251_DTR_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_dtr))
MCFG_I8251_RTS_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_rts))
+ MCFG_I8251_RXRDY_HANDLER(DEVWRITELINE("pic2", pic8259_device, ir1_w))
+ MCFG_I8251_TXRDY_HANDLER(DEVWRITELINE("pic2", pic8259_device, ir5_w))
MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, "terminal")
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("uart", i8251_device, write_rxd))