diff options
-rw-r--r-- | scripts/src/bus.lua | 15 | ||||
-rw-r--r-- | scripts/target/mame/mess.lua | 1 | ||||
-rw-r--r-- | src/devices/bus/ss50/interface.cpp | 222 | ||||
-rw-r--r-- | src/devices/bus/ss50/interface.h | 110 | ||||
-rw-r--r-- | src/devices/bus/ss50/mps.cpp | 110 | ||||
-rw-r--r-- | src/devices/bus/ss50/mps.h | 14 | ||||
-rw-r--r-- | src/mame/drivers/swtpc.cpp | 117 |
7 files changed, 558 insertions, 31 deletions
diff --git a/scripts/src/bus.lua b/scripts/src/bus.lua index 86ddc752fbc..85b772ba345 100644 --- a/scripts/src/bus.lua +++ b/scripts/src/bus.lua @@ -1393,6 +1393,21 @@ end --------------------------------------------------- -- +--@src/devices/bus/ss50/interface.h,BUSES["SS50"] = true +--------------------------------------------------- + +if (BUSES["SS50"]~=null) then + files { + MAME_DIR .. "src/devices/bus/ss50/interface.cpp", + MAME_DIR .. "src/devices/bus/ss50/interface.h", + MAME_DIR .. "src/devices/bus/ss50/mps.cpp", + MAME_DIR .. "src/devices/bus/ss50/mps.h", + } +end + + +--------------------------------------------------- +-- --@src/devices/bus/tiki100/exp.h,BUSES["TIKI100"] = true --------------------------------------------------- diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua index 1396eac2ec2..56b283c88e6 100644 --- a/scripts/target/mame/mess.lua +++ b/scripts/target/mame/mess.lua @@ -731,6 +731,7 @@ BUSES["SNES"] = true BUSES["SNES_CTRL"] = true BUSES["SPC1000"] = true BUSES["SPECTRUM"] = true +BUSES["SS50"] = true BUSES["SUNKBD"] = true BUSES["SVI_EXPANDER"] = true BUSES["SVI_SLOT"] = true diff --git a/src/devices/bus/ss50/interface.cpp b/src/devices/bus/ss50/interface.cpp new file mode 100644 index 00000000000..e5f2620b0a8 --- /dev/null +++ b/src/devices/bus/ss50/interface.cpp @@ -0,0 +1,222 @@ +// license:BSD-3-Clause +// copyright-holders:AJR +/********************************************************************** + + SWTPC SS-50 I/O port interface + + The SS-50 bus is actually two buses in one: a 50-pin master bus + used by RAM boards and such, and a 30-pin I/O bus derived from it + either on the motherboard or a dedicated interface board, which + provides each of eight "interface" cards with its specific chip + select line and only a few address lines for register selection. + This 30-pin bus is what is emulated here. + + As originally introduced in the 6800 Computer System, the + interface bus only included two register select lines, just enough + to drive one MC6820 PIA. No defined signals were placed on the + first two lines, which cards were permitted to use for any + purpose. The original MP-B motherboard also quite wastefully + reserved 8K (technically 4K) of address space to map a maximum of + 32 read/write registers. The later MC6809-oriented systems not + only reduced the I/O segment to a selectable 1K, but appropriated + the two formerly undefined lines for two additional register + select lines, making it possible to use more complex interface + cards but breaking compatibility with some earlier ones. + + An unusual feature of the SS-50 bus is the presence of five baud + rate frequencies, selected from among the (inverted) outputs of + a MC14411 Bit Rate Generator. The 6800 Computer System provided + only rates between 110 and 1200 (multiplied by 16), and also used + the MC14411's master frequency to generate the CPU clocks. The + MP-09 CPU board retained the MC14411 at first, but provided an + independent XTAL for the MC6809 and jumpers to select higher + baud rates. Later the MC14411 was removed from the CPU board so + the five baud rate lines on the 50-pin bus could be reused to + provide 20-bit addressing and DMA. This was accomplished by + adding a separate MP-ID Interface Driver Board to decode I/O + accesses (and optionally slow them down to allow old 1 MHz + peripherals to be used with a faster CPU), generate the baud + rates (whose selection was changed yet again) from a dedicated + MC14411, and provide a few I/O functions of its own. + +*********************************************************************** + + +-+ + |o| RS2 (originally UD3) + |o| RS3 (originally UD4) + |o| -16V (originally -12V) + |o| +16V (originally +12V) + |o| GND + |o| GND + |o| INDEX + |o| /FIRQ (6800: /NMI) + |o| /IRQ + |o| RS0 + |o| RS1 + |o| D0 + |o| D1 + |o| D2 + |o| D3 + |o| D4 + |o| D5 + |o| D6 + |o| D7 + |o| E (6800: ϕ2) + |o| R/W + |o| +8V (unregulated) + |o| +8V (unregulated) + |o| 600b/1200b (originally 1200b) + |o| 4800b (originally 600b) + |o| 300b + |o| 150b/9600b (originally 150b) + |o| 110b + |o| /RESET + |o| I/O # + +-+ + +**********************************************************************/ + +#include "emu.h" +#include "bus/ss50/interface.h" + +//#include "bus/ss50/mpc.h" +//#include "bus/ss50/mpl.h" +//#include "bus/ss50/mpr.h" +#include "bus/ss50/mps.h" +//#include "bus/ss50/mpt.h" + +//************************************************************************** +// GLOBAL VARIABLES +//************************************************************************** + +// device type definition +DEFINE_DEVICE_TYPE(SS50_INTERFACE, ss50_interface_port_device, "ss50_interface", "SS-50 Interface Port") + +//************************************************************************** +// SS-50 INTERFACE PORT DEVICE +//************************************************************************** + +//------------------------------------------------- +// ss50_interface_port_device - construction +//------------------------------------------------- + +ss50_interface_port_device::ss50_interface_port_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : device_t(mconfig, SS50_INTERFACE, tag, owner, clock), + device_slot_interface(mconfig, *this), + m_irq_cb(*this), + m_firq_cb(*this), + m_card(nullptr) +{ +} + +//------------------------------------------------- +// device_resolve_objects - resolve objects that +// may be needed for other devices to set +// initial conditions at start time +//------------------------------------------------- + +void ss50_interface_port_device::device_resolve_objects() +{ + logerror("Resolving objects...\n"); + + m_irq_cb.resolve_safe(); + m_firq_cb.resolve_safe(); + + m_card = dynamic_cast<ss50_card_interface *>(get_card_device()); + if (m_card != nullptr) + m_card->m_slot = this; +} + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void ss50_interface_port_device::device_start() +{ +} + +//------------------------------------------------- +// read - interface read access (pre-decoded) +//------------------------------------------------- + +READ8_MEMBER(ss50_interface_port_device::read) +{ + if (m_card == nullptr) + { + logerror("%s: Read from unspecified interface (RS = %X)\n", machine().describe_context(), offset); + return space.unmap(); + } + + return m_card->register_read(space, offset); +} + +//------------------------------------------------- +// write - interface write access (pre-decoded) +//------------------------------------------------- + +WRITE8_MEMBER(ss50_interface_port_device::write) +{ + if (m_card == nullptr) + { + logerror("%s: Write to unspecified interface (RS = %X, D = %02X)\n", machine().describe_context(), offset, data); + return; + } + + m_card->register_write(space, offset, data); +} + +//------------------------------------------------- +// fN_w - baud rate clocks for serial interfaces +//------------------------------------------------- + +WRITE_LINE_MEMBER(ss50_interface_port_device::f110_w) +{ + if (m_card != nullptr) + m_card->f110_w(state); +} + +WRITE_LINE_MEMBER(ss50_interface_port_device::f150_9600_w) +{ + if (m_card != nullptr) + m_card->f150_9600_w(state); +} + +WRITE_LINE_MEMBER(ss50_interface_port_device::f300_w) +{ + if (m_card != nullptr) + m_card->f300_w(state); +} + +WRITE_LINE_MEMBER(ss50_interface_port_device::f600_4800_w) +{ + if (m_card != nullptr) + m_card->f600_4800_w(state); +} + +WRITE_LINE_MEMBER(ss50_interface_port_device::f600_1200_w) +{ + if (m_card != nullptr) + m_card->f600_1200_w(state); +} + +//************************************************************************** +// SS-50 CARD INTERFACE +//************************************************************************** + +//------------------------------------------------- +// ss50_card_interface - construction +//------------------------------------------------- + +ss50_card_interface::ss50_card_interface(const machine_config &mconfig, device_t &device) + : device_slot_card_interface(mconfig, device), + m_slot(nullptr) +{ +} + +SLOT_INTERFACE_START(ss50_default_2rs_devices) + //SLOT_INTERFACE("mpc", SS50_MPC) + //SLOT_INTERFACE("mpl", SS50_MPL) + //SLOT_INTERFACE("mpn", SS50_MPN) + SLOT_INTERFACE("mps", SS50_MPS) + //SLOT_INTERFACE("mpt", SS50_MPT) +SLOT_INTERFACE_END diff --git a/src/devices/bus/ss50/interface.h b/src/devices/bus/ss50/interface.h new file mode 100644 index 00000000000..2e35b0abf2f --- /dev/null +++ b/src/devices/bus/ss50/interface.h @@ -0,0 +1,110 @@ +// license:BSD-3-Clause +// copyright-holders:AJR +/********************************************************************** + + SWTPC SS-50 I/O port interface + +**********************************************************************/ + +#pragma once + +#ifndef MAME_DEVICES_BUS_SS50_INTERFACE_H +#define MAME_DEVICES_BUS_SS50_INTERFACE_H + +//************************************************************************** +// CONFIGURATION MACROS +//************************************************************************** + +#define MCFG_SS50_INTERFACE_PORT_ADD(_tag, _slot_intf, _def_slot) \ + MCFG_DEVICE_ADD(_tag, SS50_INTERFACE, 0) \ + MCFG_DEVICE_SLOT_INTERFACE(ss50_##_slot_intf, _def_slot, false) + +#define MCFG_SS50_INTERFACE_IRQ_CALLBACK(_devcb) \ + devcb = &ss50_interface_port_device::set_irq_cb(*device, DEVCB_##_devcb); + +#define MCFG_SS50_INTERFACE_FIRQ_CALLBACK(_devcb) \ + devcb = &ss50_interface_port_device::set_firq_cb(*device, DEVCB_##_devcb); + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +// forward declarations +class ss50_card_interface; + +// ======================> ss50_interface_port_device + +class ss50_interface_port_device : public device_t, public device_slot_interface +{ + friend class ss50_card_interface; + +public: + // construction/destruction + ss50_interface_port_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + + // static configuration + template<class Object> static devcb_base &set_irq_cb(device_t &device, Object &&object) { return downcast<ss50_interface_port_device &>(device).m_irq_cb.set_callback(std::forward<Object>(object)); } + template<class Object> static devcb_base &set_firq_cb(device_t &device, Object &&object) { return downcast<ss50_interface_port_device &>(device).m_firq_cb.set_callback(std::forward<Object>(object)); } + + // memory accesses + DECLARE_READ8_MEMBER(read); + DECLARE_WRITE8_MEMBER(write); + + // baud rates + DECLARE_WRITE_LINE_MEMBER(f110_w); + DECLARE_WRITE_LINE_MEMBER(f150_9600_w); + DECLARE_WRITE_LINE_MEMBER(f300_w); + DECLARE_WRITE_LINE_MEMBER(f600_4800_w); + DECLARE_WRITE_LINE_MEMBER(f600_1200_w); + +protected: + // device-specific overrides + virtual void device_resolve_objects() override; + virtual void device_start() override; + +private: + // output callbacks + devcb_write_line m_irq_cb; + devcb_write_line m_firq_cb; + + ss50_card_interface *m_card; +}; + + +// ======================> ss50_card_interface + +class ss50_card_interface : public device_slot_card_interface +{ + friend class ss50_interface_port_device; + +protected: + // construction/destruction + ss50_card_interface(const machine_config &mconfig, device_t &device); + + // required overrides + virtual DECLARE_READ8_MEMBER(register_read) = 0; + virtual DECLARE_WRITE8_MEMBER(register_write) = 0; + + // optional overrides + virtual DECLARE_WRITE_LINE_MEMBER(f110_w) { } + virtual DECLARE_WRITE_LINE_MEMBER(f150_9600_w) { } + virtual DECLARE_WRITE_LINE_MEMBER(f300_w) { } + virtual DECLARE_WRITE_LINE_MEMBER(f600_4800_w) { } + virtual DECLARE_WRITE_LINE_MEMBER(f600_1200_w) { } + + // IRQ/FIRQ/NMI outputs + DECLARE_WRITE_LINE_MEMBER(write_irq) { m_slot->m_irq_cb(state); } + DECLARE_WRITE_LINE_MEMBER(write_firq) { m_slot->m_firq_cb(state); } + +private: + ss50_interface_port_device *m_slot; +}; + + +// device type definition +extern const device_type SS50_INTERFACE; + +SLOT_INTERFACE_EXTERN(ss50_default_2rs_devices); +//SLOT_INTERFACE_EXTERN(ss50_default_4rs_devices); + +#endif diff --git a/src/devices/bus/ss50/mps.cpp b/src/devices/bus/ss50/mps.cpp new file mode 100644 index 00000000000..b6aa75e1857 --- /dev/null +++ b/src/devices/bus/ss50/mps.cpp @@ -0,0 +1,110 @@ +// license:BSD-3-Clause +// copyright-holders:AJR +/********************************************************************** + + SWTPC MP-S Serial Interface + + TODO: Add baud rate selection switch + +**********************************************************************/ + +#include "emu.h" +#include "bus/ss50/mps.h" +#include "bus/ss50/interface.h" + +#include "bus/rs232/rs232.h" +#include "machine/6850acia.h" + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +// ======================> ss50_mps_device + +class ss50_mps_device : public device_t, public ss50_card_interface +{ +public: + // construction/destruction + ss50_mps_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : device_t(mconfig, SS50_MPS, tag, owner, clock), + ss50_card_interface(mconfig, *this), + m_acia(*this, "acia") + { + } + +protected: + // device-specific overrides + virtual void device_add_mconfig(machine_config &config) override; + virtual void device_start() override { } + + // interface-specific overrides + virtual DECLARE_READ8_MEMBER(register_read) override; + virtual DECLARE_WRITE8_MEMBER(register_write) override; + virtual DECLARE_WRITE_LINE_MEMBER(f600_1200_w) override; + +private: + required_device<acia6850_device> m_acia; +}; + + +static DEVICE_INPUT_DEFAULTS_START( terminal ) + DEVICE_INPUT_DEFAULTS("RS232_RXBAUD", 0xff, RS232_BAUD_1200) + DEVICE_INPUT_DEFAULTS("RS232_TXBAUD", 0xff, RS232_BAUD_1200) + DEVICE_INPUT_DEFAULTS("RS232_STARTBITS", 0xff, RS232_STARTBITS_1) + DEVICE_INPUT_DEFAULTS("RS232_DATABITS", 0xff, RS232_DATABITS_8) + DEVICE_INPUT_DEFAULTS("RS232_PARITY", 0xff, RS232_PARITY_NONE) + DEVICE_INPUT_DEFAULTS("RS232_STOPBITS", 0xff, RS232_STOPBITS_1) +DEVICE_INPUT_DEFAULTS_END + + +//------------------------------------------------- +// device_add_mconfig - add device-specific +// machine configuration +//------------------------------------------------- + +MACHINE_CONFIG_MEMBER(ss50_mps_device::device_add_mconfig) + MCFG_DEVICE_ADD("acia", ACIA6850, 0) + MCFG_ACIA6850_TXD_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_txd)) + //MCFG_ACIA6850_RTS_HANDLER(WRITELINE(ss50_mps_device, reader_control_w)) + //MCFG_ACIA6850_IRQ_HANDLER(WRITELINE(ss50_mps_device, write_irq)) + + MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, "terminal") + MCFG_RS232_RXD_HANDLER(DEVWRITELINE("acia", acia6850_device, write_rxd)) + MCFG_DEVICE_CARD_DEVICE_INPUT_DEFAULTS("terminal", terminal) +MACHINE_CONFIG_END + + +//------------------------------------------------- +// register_read - read from a port register +//------------------------------------------------- + +READ8_MEMBER(ss50_mps_device::register_read) +{ + if (BIT(offset, 0)) + return m_acia->data_r(space, 0); + else + return m_acia->status_r(space, 0); +} + +//------------------------------------------------- +// register_write - write to a port register +//------------------------------------------------- + +WRITE8_MEMBER(ss50_mps_device::register_write) +{ + if (BIT(offset, 0)) + m_acia->data_w(space, 0, data); + else + m_acia->control_w(space, 0, data); +} + + +WRITE_LINE_MEMBER(ss50_mps_device::f600_1200_w) +{ + m_acia->write_txc(state); + m_acia->write_rxc(state); +} + + +// device type definition +DEFINE_DEVICE_TYPE(SS50_MPS, ss50_mps_device, "ss50_mps", "MP-S Serial Interface") diff --git a/src/devices/bus/ss50/mps.h b/src/devices/bus/ss50/mps.h new file mode 100644 index 00000000000..29733f7eeda --- /dev/null +++ b/src/devices/bus/ss50/mps.h @@ -0,0 +1,14 @@ +// license:BSD-3-Clause +// copyright-holders:AJR +/********************************************************************** + + SWTPC MP-S Serial Interface + +**********************************************************************/ + +#ifndef MAME_DEVICE_BUS_SS50_MPS_H +#define MAME_DEVICE_BUS_SS50_MPS_H + +extern const device_type SS50_MPS; + +#endif // MAME_DEVICE_BUS_SS50_MPS_H diff --git a/src/mame/drivers/swtpc.cpp b/src/mame/drivers/swtpc.cpp index b801b10c34c..b5626475ebc 100644 --- a/src/mame/drivers/swtpc.cpp +++ b/src/mame/drivers/swtpc.cpp @@ -16,11 +16,8 @@ Note: All commands must be in uppercase. See the SWTBUG manual. ToDo: - - Support selectable baud rate clocks (110, 150, 300, 600, 1200) - - Implement interface bus slots to allow selection of either MP-S - (ACIA) or MP-C or MP-L (PIA) for I/O slot #1 or seven other - fixed-address I/O slots - - Add DC-4 (WD1797 FDC) interface board as I/O slot option + - Add more SS-50 interface slot options (in particular, MIKBUG + needs MP-C for I/O slot #1) - Emulate MP-A2 revision of CPU board, with four 2716 ROM sockets and allowance for extra RAM boards at A000-BFFF and C000-DFFF @@ -44,10 +41,11 @@ Z Goto Prom (0xC000) #include "emu.h" #include "cpu/m6800/m6800.h" -#include "machine/6850acia.h" +#include "machine/input_merger.h" #include "machine/mc14411.h" #include "machine/ram.h" -#include "bus/rs232/rs232.h" +#include "bus/ss50/interface.h" +#include "bus/ss50/mps.h" class swtpc_state : public driver_device { @@ -69,8 +67,14 @@ private: static ADDRESS_MAP_START(mem_map, AS_PROGRAM, 8, swtpc_state) ADDRESS_MAP_UNMAP_HIGH - AM_RANGE(0x8004, 0x8004) AM_MIRROR(2) AM_DEVREADWRITE("acia", acia6850_device, status_r, control_w) - AM_RANGE(0x8005, 0x8005) AM_MIRROR(2) AM_DEVREADWRITE("acia", acia6850_device, data_r, data_w) + AM_RANGE(0x8000, 0x8003) AM_MIRROR(0x1fc0) AM_DEVREADWRITE("io0", ss50_interface_port_device, read, write) + AM_RANGE(0x8004, 0x8007) AM_MIRROR(0x1fc0) AM_DEVREADWRITE("io1", ss50_interface_port_device, read, write) + AM_RANGE(0x8008, 0x800b) AM_MIRROR(0x1fc0) AM_DEVREADWRITE("io2", ss50_interface_port_device, read, write) + AM_RANGE(0x800c, 0x800f) AM_MIRROR(0x1fc0) AM_DEVREADWRITE("io3", ss50_interface_port_device, read, write) + AM_RANGE(0x8010, 0x8013) AM_MIRROR(0x1fc0) AM_DEVREADWRITE("io4", ss50_interface_port_device, read, write) + AM_RANGE(0x8014, 0x8017) AM_MIRROR(0x1fc0) AM_DEVREADWRITE("io5", ss50_interface_port_device, read, write) + AM_RANGE(0x8018, 0x801b) AM_MIRROR(0x1fc0) AM_DEVREADWRITE("io6", ss50_interface_port_device, read, write) + AM_RANGE(0x801c, 0x801f) AM_MIRROR(0x1fc0) AM_DEVREADWRITE("io7", ss50_interface_port_device, read, write) AM_RANGE(0xa000, 0xa07f) AM_RAM // MCM6810 AM_RANGE(0xe000, 0xe3ff) AM_MIRROR(0x1c00) AM_ROM AM_REGION("mcm6830", 0) ADDRESS_MAP_END @@ -79,15 +83,6 @@ ADDRESS_MAP_END static INPUT_PORTS_START( swtpc ) INPUT_PORTS_END -static DEVICE_INPUT_DEFAULTS_START( terminal ) - DEVICE_INPUT_DEFAULTS( "RS232_RXBAUD", 0xff, RS232_BAUD_1200 ) - DEVICE_INPUT_DEFAULTS( "RS232_TXBAUD", 0xff, RS232_BAUD_1200 ) - DEVICE_INPUT_DEFAULTS( "RS232_STARTBITS", 0xff, RS232_STARTBITS_1 ) - DEVICE_INPUT_DEFAULTS( "RS232_DATABITS", 0xff, RS232_DATABITS_8 ) - DEVICE_INPUT_DEFAULTS( "RS232_PARITY", 0xff, RS232_PARITY_NONE ) - DEVICE_INPUT_DEFAULTS( "RS232_STOPBITS", 0xff, RS232_STOPBITS_1 ) -DEVICE_INPUT_DEFAULTS_END - void swtpc_state::machine_start() { @@ -102,20 +97,77 @@ static MACHINE_CONFIG_START( swtpc ) MCFG_CPU_ADD("maincpu", M6800, XTAL_1_8432MHz / 2) MCFG_CPU_PROGRAM_MAP(mem_map) - /* video hardware */ MCFG_DEVICE_ADD("brg", MC14411, XTAL_1_8432MHz) - MCFG_MC14411_F7_CB(DEVWRITELINE("acia", acia6850_device, write_txc)) - MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("acia", acia6850_device, write_rxc)) - // F8, F9, F11, F13 also present on system bus - - MCFG_DEVICE_ADD("acia", ACIA6850, 0) - MCFG_ACIA6850_TXD_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_txd)) - MCFG_ACIA6850_RTS_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_rts)) - - MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, "terminal") - MCFG_RS232_RXD_HANDLER(DEVWRITELINE("acia", acia6850_device, write_rxd)) - MCFG_RS232_CTS_HANDLER(DEVWRITELINE("acia", acia6850_device, write_cts)) - MCFG_DEVICE_CARD_DEVICE_INPUT_DEFAULTS("terminal", terminal) + MCFG_MC14411_F7_CB(DEVWRITELINE("io0", ss50_interface_port_device, f600_1200_w)) // 1200b + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("io1", ss50_interface_port_device, f600_1200_w)) + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("io2", ss50_interface_port_device, f600_1200_w)) + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("io3", ss50_interface_port_device, f600_1200_w)) + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("io4", ss50_interface_port_device, f600_1200_w)) + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("io5", ss50_interface_port_device, f600_1200_w)) + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("io6", ss50_interface_port_device, f600_1200_w)) + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("io7", ss50_interface_port_device, f600_1200_w)) + MCFG_MC14411_F8_CB(DEVWRITELINE("io0", ss50_interface_port_device, f600_4800_w)) // 600b + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("io1", ss50_interface_port_device, f600_4800_w)) + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("io2", ss50_interface_port_device, f600_4800_w)) + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("io3", ss50_interface_port_device, f600_4800_w)) + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("io4", ss50_interface_port_device, f600_4800_w)) + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("io5", ss50_interface_port_device, f600_4800_w)) + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("io6", ss50_interface_port_device, f600_4800_w)) + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("io7", ss50_interface_port_device, f600_4800_w)) + MCFG_MC14411_F9_CB(DEVWRITELINE("io0", ss50_interface_port_device, f300_w)) // 300b + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("io1", ss50_interface_port_device, f300_w)) + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("io2", ss50_interface_port_device, f300_w)) + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("io3", ss50_interface_port_device, f300_w)) + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("io4", ss50_interface_port_device, f300_w)) + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("io5", ss50_interface_port_device, f300_w)) + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("io6", ss50_interface_port_device, f300_w)) + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("io7", ss50_interface_port_device, f300_w)) + MCFG_MC14411_F11_CB(DEVWRITELINE("io0", ss50_interface_port_device, f150_9600_w)) // 150b + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("io1", ss50_interface_port_device, f150_9600_w)) + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("io2", ss50_interface_port_device, f150_9600_w)) + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("io3", ss50_interface_port_device, f150_9600_w)) + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("io4", ss50_interface_port_device, f150_9600_w)) + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("io5", ss50_interface_port_device, f150_9600_w)) + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("io6", ss50_interface_port_device, f150_9600_w)) + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("io7", ss50_interface_port_device, f150_9600_w)) + MCFG_MC14411_F13_CB(DEVWRITELINE("io0", ss50_interface_port_device, f110_w)) // 110b + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("io1", ss50_interface_port_device, f110_w)) + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("io2", ss50_interface_port_device, f110_w)) + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("io3", ss50_interface_port_device, f110_w)) + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("io4", ss50_interface_port_device, f110_w)) + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("io5", ss50_interface_port_device, f110_w)) + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("io6", ss50_interface_port_device, f110_w)) + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("io7", ss50_interface_port_device, f110_w)) + + MCFG_SS50_INTERFACE_PORT_ADD("io0", default_2rs_devices, nullptr) + MCFG_SS50_INTERFACE_IRQ_CALLBACK(DEVWRITELINE("mainirq", input_merger_device, in_w<0>)) + MCFG_SS50_INTERFACE_FIRQ_CALLBACK(DEVWRITELINE("mainnmi", input_merger_device, in_w<0>)) + MCFG_SS50_INTERFACE_PORT_ADD("io1", default_2rs_devices, "mps") + MCFG_SS50_INTERFACE_IRQ_CALLBACK(DEVWRITELINE("mainirq", input_merger_device, in_w<1>)) + MCFG_SS50_INTERFACE_FIRQ_CALLBACK(DEVWRITELINE("mainnmi", input_merger_device, in_w<1>)) + MCFG_SS50_INTERFACE_PORT_ADD("io2", default_2rs_devices, nullptr) + MCFG_SS50_INTERFACE_IRQ_CALLBACK(DEVWRITELINE("mainirq", input_merger_device, in_w<2>)) + MCFG_SS50_INTERFACE_FIRQ_CALLBACK(DEVWRITELINE("mainnmi", input_merger_device, in_w<2>)) + MCFG_SS50_INTERFACE_PORT_ADD("io3", default_2rs_devices, nullptr) + MCFG_SS50_INTERFACE_IRQ_CALLBACK(DEVWRITELINE("mainirq", input_merger_device, in_w<3>)) + MCFG_SS50_INTERFACE_FIRQ_CALLBACK(DEVWRITELINE("mainnmi", input_merger_device, in_w<3>)) + MCFG_SS50_INTERFACE_PORT_ADD("io4", default_2rs_devices, nullptr) + MCFG_SS50_INTERFACE_IRQ_CALLBACK(DEVWRITELINE("mainirq", input_merger_device, in_w<4>)) + MCFG_SS50_INTERFACE_FIRQ_CALLBACK(DEVWRITELINE("mainnmi", input_merger_device, in_w<4>)) + MCFG_SS50_INTERFACE_PORT_ADD("io5", default_2rs_devices, nullptr) + MCFG_SS50_INTERFACE_IRQ_CALLBACK(DEVWRITELINE("mainirq", input_merger_device, in_w<5>)) + MCFG_SS50_INTERFACE_FIRQ_CALLBACK(DEVWRITELINE("mainnmi", input_merger_device, in_w<5>)) + MCFG_SS50_INTERFACE_PORT_ADD("io6", default_2rs_devices, nullptr) + MCFG_SS50_INTERFACE_IRQ_CALLBACK(DEVWRITELINE("mainirq", input_merger_device, in_w<6>)) + MCFG_SS50_INTERFACE_FIRQ_CALLBACK(DEVWRITELINE("mainnmi", input_merger_device, in_w<6>)) + MCFG_SS50_INTERFACE_PORT_ADD("io7", default_2rs_devices, nullptr) + MCFG_SS50_INTERFACE_IRQ_CALLBACK(DEVWRITELINE("mainirq", input_merger_device, in_w<7>)) + MCFG_SS50_INTERFACE_FIRQ_CALLBACK(DEVWRITELINE("mainnmi", input_merger_device, in_w<7>)) + + MCFG_INPUT_MERGER_ANY_HIGH("mainirq") + MCFG_INPUT_MERGER_OUTPUT_HANDLER(INPUTLINE("maincpu", M6800_IRQ_LINE)) + MCFG_INPUT_MERGER_ANY_HIGH("mainnmi") + MCFG_INPUT_MERGER_OUTPUT_HANDLER(INPUTLINE("maincpu", INPUT_LINE_NMI)) MCFG_RAM_ADD(RAM_TAG) MCFG_RAM_DEFAULT_SIZE("2K") @@ -128,6 +180,9 @@ static MACHINE_CONFIG_DERIVED( swtpcm, swtpc ) MCFG_DEVICE_MODIFY("brg") MCFG_DEVICE_CLOCK(XTAL_1_7971MHz) + + MCFG_DEVICE_MODIFY("io1") + //MCFG_SLOT_DEFAULT_OPTION("mpc") MACHINE_CONFIG_END /* ROM definition */ |