summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatarGravatar Curt Coder <curtcoder@mail.com>2013-02-07 14:56:40 +0000
committerGravatarGravatar Curt Coder <curtcoder@mail.com>2013-02-07 14:56:40 +0000
commit5c4b336b040184c0a51bc9781ad49b06b32ac7e2 (patch)
tree2aa1fbe431998434df0435f77876ce37fd0e72e4
parent99c28d1fb90e7d10e596fdb48e4b2cc925112532 (diff)
downloadmame-5c4b336b040184c0a51bc9781ad49b06b32ac7e2.tar.xz
mame-5c4b336b040184c0a51bc9781ad49b06b32ac7e2.zip
(MESS) Added some RS-232 slots. (nw)
-rw-r--r--src/mess/drivers/abc80x.c49
-rw-r--r--src/mess/drivers/c128.c44
-rw-r--r--src/mess/drivers/cbm2.c20
-rw-r--r--src/mess/includes/abc80x.h3
-rw-r--r--src/mess/includes/cbm2.h2
-rw-r--r--src/mess/machine/c64_swiftlink.c22
-rw-r--r--src/mess/machine/c64_swiftlink.h1
-rw-r--r--src/mess/machine/c64_turbo232.c29
-rw-r--r--src/mess/machine/c64_turbo232.h2
9 files changed, 123 insertions, 49 deletions
diff --git a/src/mess/drivers/abc80x.c b/src/mess/drivers/abc80x.c
index 69fff8aa8d6..3cc7b45983d 100644
--- a/src/mess/drivers/abc80x.c
+++ b/src/mess/drivers/abc80x.c
@@ -891,10 +891,10 @@ static const z80_daisy_config abc800_daisy_chain[] =
//-------------------------------------------------
-// cassette_interface abc800_cassette_interface
+// cassette_interface cass_intf
//-------------------------------------------------
-static const cassette_interface abc800_cassette_interface =
+static const cassette_interface cass_intf =
{
cassette_default_formats,
NULL,
@@ -917,6 +917,37 @@ static ABCBUS_INTERFACE( abcbus_intf )
};
+//-------------------------------------------------
+// rs232_port_interface rs232a_intf
+//-------------------------------------------------
+
+static SLOT_INTERFACE_START( rs232_devices )
+SLOT_INTERFACE_END
+
+static const rs232_port_interface rs232a_intf =
+{
+ DEVCB_NULL,
+ DEVCB_NULL,
+ DEVCB_NULL,
+ DEVCB_NULL,
+ DEVCB_NULL
+};
+
+
+//-------------------------------------------------
+// rs232_port_interface rs232b_intf
+//-------------------------------------------------
+
+static const rs232_port_interface rs232b_intf =
+{
+ DEVCB_NULL,
+ DEVCB_NULL,
+ DEVCB_NULL,
+ DEVCB_NULL,
+ DEVCB_NULL
+};
+
+
//**************************************************************************
// MACHINE INITIALIZATION
@@ -1174,7 +1205,9 @@ static MACHINE_CONFIG_START( abc800c, abc800c_state )
MCFG_Z80CTC_ADD(Z80CTC_TAG, ABC800_X01/2/2, ctc_intf)
MCFG_Z80SIO2_ADD(Z80SIO_TAG, ABC800_X01/2/2, sio_intf)
MCFG_Z80DART_ADD(Z80DART_TAG, ABC800_X01/2/2, abc800_dart_intf)
- MCFG_CASSETTE_ADD(CASSETTE_TAG, abc800_cassette_interface)
+ MCFG_CASSETTE_ADD(CASSETTE_TAG, cass_intf)
+ MCFG_RS232_PORT_ADD(RS232_A_TAG, rs232a_intf, rs232_devices, NULL, NULL)
+ MCFG_RS232_PORT_ADD(RS232_B_TAG, rs232b_intf, rs232_devices, NULL, NULL)
MCFG_ABC800_KEYBOARD_ADD(abc800_kb_intf)
// ABC bus
@@ -1214,7 +1247,9 @@ static MACHINE_CONFIG_START( abc800m, abc800m_state )
MCFG_Z80CTC_ADD(Z80CTC_TAG, ABC800_X01/2/2, ctc_intf)
MCFG_Z80SIO2_ADD(Z80SIO_TAG, ABC800_X01/2/2, sio_intf)
MCFG_Z80DART_ADD(Z80DART_TAG, ABC800_X01/2/2, abc800_dart_intf)
- MCFG_CASSETTE_ADD(CASSETTE_TAG, abc800_cassette_interface)
+ MCFG_CASSETTE_ADD(CASSETTE_TAG, cass_intf)
+ MCFG_RS232_PORT_ADD(RS232_A_TAG, rs232a_intf, rs232_devices, NULL, NULL)
+ MCFG_RS232_PORT_ADD(RS232_B_TAG, rs232b_intf, rs232_devices, NULL, NULL)
MCFG_ABC800_KEYBOARD_ADD(abc800_kb_intf)
// ABC bus
@@ -1254,8 +1289,10 @@ static MACHINE_CONFIG_START( abc802, abc802_state )
MCFG_Z80CTC_ADD(Z80CTC_TAG, ABC800_X01/2/2, ctc_intf)
MCFG_Z80SIO2_ADD(Z80SIO_TAG, ABC800_X01/2/2, sio_intf)
MCFG_Z80DART_ADD(Z80DART_TAG, ABC800_X01/2/2, abc802_dart_intf)
+ MCFG_CASSETTE_ADD(CASSETTE_TAG, cass_intf)
+ MCFG_RS232_PORT_ADD(RS232_A_TAG, rs232a_intf, rs232_devices, NULL, NULL)
+ MCFG_RS232_PORT_ADD(RS232_B_TAG, rs232b_intf, rs232_devices, NULL, NULL)
MCFG_ABC55_ADD(kb_intf)
- MCFG_CASSETTE_ADD(CASSETTE_TAG, abc800_cassette_interface)
// ABC bus
MCFG_ABCBUS_SLOT_ADD(ABCBUS_TAG, abcbus_intf, abcbus_cards, "fast", abc834_fast)
@@ -1285,6 +1322,8 @@ static MACHINE_CONFIG_START( abc806, abc806_state )
MCFG_Z80CTC_ADD(Z80CTC_TAG, ABC800_X01/2/2, ctc_intf)
MCFG_Z80SIO2_ADD(Z80SIO_TAG, ABC800_X01/2/2, sio_intf)
MCFG_Z80DART_ADD(Z80DART_TAG, ABC800_X01/2/2, abc806_dart_intf)
+ MCFG_RS232_PORT_ADD(RS232_A_TAG, rs232a_intf, rs232_devices, NULL, NULL)
+ MCFG_RS232_PORT_ADD(RS232_B_TAG, rs232b_intf, rs232_devices, NULL, NULL)
MCFG_ABC77_ADD(kb_intf)
// ABC bus
diff --git a/src/mess/drivers/c128.c b/src/mess/drivers/c128.c
index 2454ce1e68d..ffc7d954564 100644
--- a/src/mess/drivers/c128.c
+++ b/src/mess/drivers/c128.c
@@ -1713,12 +1713,11 @@ ROM_START( c128 )
ROM_LOAD( "8721r3.u11", 0x000, 0xc88, BAD_DUMP CRC(154db186) SHA1(ccadcdb1db3b62c51dc4ce60fe6f96831586d297) )
ROM_END
-
-//-------------------------------------------------
-// ROM( c128p )
-//-------------------------------------------------
-
-#define rom_c128p rom_c128
+#define rom_c128p rom_c128
+#define rom_c128d rom_c128
+#define rom_c128dp rom_c128
+#define rom_c128dpr rom_c128
+#define rom_c128d81 rom_c128
//-------------------------------------------------
@@ -1774,27 +1773,6 @@ ROM_END
//-------------------------------------------------
-// ROM( c128d )
-//-------------------------------------------------
-
-#define rom_c128d rom_c128
-
-
-//-------------------------------------------------
-// ROM( c128dp )
-//-------------------------------------------------
-
-#define rom_c128dp rom_c128
-
-
-//-------------------------------------------------
-// ROM( c128dpr )
-//-------------------------------------------------
-
-#define rom_c128dpr rom_c128d
-
-
-//-------------------------------------------------
// ROM( c128cr )
//-------------------------------------------------
@@ -1844,11 +1822,6 @@ ROM_START( c128dcr )
ROM_LOAD( "8721r3.u11", 0x000, 0xc88, BAD_DUMP CRC(154db186) SHA1(ccadcdb1db3b62c51dc4ce60fe6f96831586d297) )
ROM_END
-
-//-------------------------------------------------
-// ROM( c128dcrp )
-//-------------------------------------------------
-
#define rom_c128dcrp rom_c128dcr
@@ -1896,13 +1869,6 @@ ROM_START( c128dcr_se )
ROM_END
-//-------------------------------------------------
-// ROM( c128d81 )
-//-------------------------------------------------
-
-#define rom_c128d81 rom_c128d
-
-
//**************************************************************************
// SYSTEM DRIVERS
diff --git a/src/mess/drivers/cbm2.c b/src/mess/drivers/cbm2.c
index 87c3f2b3225..227f839cc7e 100644
--- a/src/mess/drivers/cbm2.c
+++ b/src/mess/drivers/cbm2.c
@@ -1941,6 +1941,23 @@ static CBM2_USER_PORT_INTERFACE( p500_user_intf )
};
+//-------------------------------------------------
+// rs232_port_interface rs232_intf
+//-------------------------------------------------
+
+static SLOT_INTERFACE_START( rs232_devices )
+SLOT_INTERFACE_END
+
+static const rs232_port_interface rs232_intf =
+{
+ DEVCB_NULL,
+ DEVCB_NULL,
+ DEVCB_NULL,
+ DEVCB_NULL,
+ DEVCB_NULL
+};
+
+
//**************************************************************************
// MACHINE INITIALIZATION
@@ -2194,6 +2211,7 @@ static MACHINE_CONFIG_START( p500_ntsc, p500_state )
MCFG_VCS_CONTROL_PORT_ADD(CONTROL2_TAG, vcs_control_port_devices, NULL, NULL)
MCFG_CBM2_EXPANSION_SLOT_ADD(CBM2_EXPANSION_SLOT_TAG, VIC6567_CLOCK, cbm2_expansion_cards, NULL, NULL)
MCFG_CBM2_USER_PORT_ADD(CBM2_USER_PORT_TAG, p500_user_intf, cbm2_user_port_cards, NULL, NULL)
+ MCFG_RS232_PORT_ADD(RS232_TAG, rs232_intf, rs232_devices, NULL, NULL)
MCFG_QUICKLOAD_ADD("quickload", p500, "p00,prg", CBM_QUICKLOAD_DELAY_SECONDS)
// internal ram
@@ -2245,6 +2263,7 @@ static MACHINE_CONFIG_START( p500_pal, p500_state )
MCFG_VCS_CONTROL_PORT_ADD(CONTROL2_TAG, vcs_control_port_devices, NULL, NULL)
MCFG_CBM2_EXPANSION_SLOT_ADD(CBM2_EXPANSION_SLOT_TAG, VIC6569_CLOCK, cbm2_expansion_cards, NULL, NULL)
MCFG_CBM2_USER_PORT_ADD(CBM2_USER_PORT_TAG, p500_user_intf, cbm2_user_port_cards, NULL, NULL)
+ MCFG_RS232_PORT_ADD(RS232_TAG, rs232_intf, rs232_devices, NULL, NULL)
MCFG_QUICKLOAD_ADD("quickload", p500, "p00,prg", CBM_QUICKLOAD_DELAY_SECONDS)
// internal ram
@@ -2302,6 +2321,7 @@ static MACHINE_CONFIG_START( cbm2lp_ntsc, cbm2_state )
MCFG_VCS_CONTROL_PORT_ADD(CONTROL2_TAG, vcs_control_port_devices, NULL, NULL)
MCFG_CBM2_EXPANSION_SLOT_ADD(CBM2_EXPANSION_SLOT_TAG, XTAL_18MHz/9, cbm2_expansion_cards, NULL, NULL)
MCFG_CBM2_USER_PORT_ADD(CBM2_USER_PORT_TAG, user_intf, cbm2_user_port_cards, NULL, NULL)
+ MCFG_RS232_PORT_ADD(RS232_TAG, rs232_intf, rs232_devices, NULL, NULL)
MCFG_QUICKLOAD_ADD("quickload", cbmb, "p00,prg,t64", CBM_QUICKLOAD_DELAY_SECONDS)
// software list
diff --git a/src/mess/includes/abc80x.h b/src/mess/includes/abc80x.h
index bc66a3fdb57..99127862d30 100644
--- a/src/mess/includes/abc80x.h
+++ b/src/mess/includes/abc80x.h
@@ -16,6 +16,7 @@
#include "machine/abc830.h"
#include "machine/abcbus.h"
#include "machine/e0516.h"
+#include "machine/serial.h"
#include "machine/z80ctc.h"
#include "machine/z80dart.h"
#include "machine/ram.h"
@@ -58,6 +59,8 @@
#define Z80SIO_TAG "z80sio"
#define Z80DART_TAG "z80dart"
#define DISCRETE_TAG "discrete"
+#define RS232_A_TAG "rs232a"
+#define RS232_B_TAG "rs232b"
//**************************************************************************
diff --git a/src/mess/includes/cbm2.h b/src/mess/includes/cbm2.h
index 7ca9afea486..e1c751db863 100644
--- a/src/mess/includes/cbm2.h
+++ b/src/mess/includes/cbm2.h
@@ -21,6 +21,7 @@
#include "machine/pic8259.h"
#include "machine/pla.h"
#include "machine/ram.h"
+#include "machine/serial.h"
#include "machine/vcsctrl.h"
#include "sound/dac.h"
#include "sound/sid6581.h"
@@ -43,6 +44,7 @@
#define SCREEN_TAG "screen"
#define CONTROL1_TAG "joy1"
#define CONTROL2_TAG "joy2"
+#define RS232_TAG "rs232"
#define EXT_I8088_TAG "ext_u1"
#define EXT_I8087_TAG "ext_u4"
diff --git a/src/mess/machine/c64_swiftlink.c b/src/mess/machine/c64_swiftlink.c
index b35d11353be..3c79e213bed 100644
--- a/src/mess/machine/c64_swiftlink.c
+++ b/src/mess/machine/c64_swiftlink.c
@@ -21,7 +21,8 @@
// MACROS/CONSTANTS
//**************************************************************************
-#define MOS6551_TAG "mos6551"
+#define MOS6551_TAG "mos6551"
+#define RS232_TAG "rs232"
@@ -33,11 +34,30 @@ const device_type C64_SWIFTLINK = &device_creator<c64_swiftlink_cartridge_device
//-------------------------------------------------
+// rs232_port_interface rs232_intf
+//-------------------------------------------------
+
+static SLOT_INTERFACE_START( rs232_devices )
+SLOT_INTERFACE_END
+
+static const rs232_port_interface rs232_intf =
+{
+ DEVCB_NULL,
+ DEVCB_NULL,
+ DEVCB_NULL,
+ DEVCB_NULL,
+ DEVCB_NULL
+};
+
+
+//-------------------------------------------------
// MACHINE_CONFIG_FRAGMENT( c64_swiftlink )
//-------------------------------------------------
static MACHINE_CONFIG_FRAGMENT( c64_swiftlink )
MCFG_MOS6551_ADD(MOS6551_TAG, XTAL_3_6864MHz, DEVWRITELINE(DEVICE_SELF, c64_swiftlink_cartridge_device, acia_irq_w))
+
+ MCFG_RS232_PORT_ADD(RS232_TAG, rs232_intf, rs232_devices, NULL, NULL)
MACHINE_CONFIG_END
diff --git a/src/mess/machine/c64_swiftlink.h b/src/mess/machine/c64_swiftlink.h
index b51920e8705..a496594ffcb 100644
--- a/src/mess/machine/c64_swiftlink.h
+++ b/src/mess/machine/c64_swiftlink.h
@@ -16,6 +16,7 @@
#include "emu.h"
#include "machine/c64exp.h"
#include "machine/mos6551.h"
+#include "machine/serial.h"
diff --git a/src/mess/machine/c64_turbo232.c b/src/mess/machine/c64_turbo232.c
index 7cc5cf8be58..85d9488d7ca 100644
--- a/src/mess/machine/c64_turbo232.c
+++ b/src/mess/machine/c64_turbo232.c
@@ -21,7 +21,8 @@
// MACROS/CONSTANTS
//**************************************************************************
-#define MOS6551_TAG "mos6551"
+#define MOS6551_TAG "mos6551"
+#define RS232_TAG "rs232"
@@ -33,11 +34,30 @@ const device_type C64_TURBO232 = &device_creator<c64_turbo232_cartridge_device>;
//-------------------------------------------------
+// rs232_port_interface rs232_intf
+//-------------------------------------------------
+
+static SLOT_INTERFACE_START( rs232_devices )
+SLOT_INTERFACE_END
+
+static const rs232_port_interface rs232_intf =
+{
+ DEVCB_NULL,
+ DEVCB_NULL,
+ DEVCB_NULL,
+ DEVCB_NULL,
+ DEVCB_NULL
+};
+
+
+//-------------------------------------------------
// MACHINE_CONFIG_FRAGMENT( c64_turbo232 )
//-------------------------------------------------
static MACHINE_CONFIG_FRAGMENT( c64_turbo232 )
MCFG_MOS6551_ADD(MOS6551_TAG, XTAL_3_6864MHz, DEVWRITELINE(DEVICE_SELF, c64_turbo232_cartridge_device, acia_irq_w))
+
+ MCFG_RS232_PORT_ADD(RS232_TAG, rs232_intf, rs232_devices, NULL, NULL)
MACHINE_CONFIG_END
@@ -93,6 +113,7 @@ c64_turbo232_cartridge_device::c64_turbo232_cartridge_device(const machine_confi
device_t(mconfig, C64_TURBO232, "C64 Turbo232 cartridge", tag, owner, clock),
device_c64_expansion_card_interface(mconfig, *this),
m_acia(*this, MOS6551_TAG),
+ m_rs232(*this, RS232_TAG),
m_io_cs(*this, "CS"),
m_io_irq(*this, "IRQ")
{
@@ -183,9 +204,9 @@ void c64_turbo232_cartridge_device::c64_cd_w(address_space &space, offs_t offset
switch (m_es & ES_S_MASK)
{
- case ES_S_230400: m_acia->set_rxc(230400*16); break;
- case ES_S_115200: m_acia->set_rxc(115200*16); break;
- case ES_S_57600: m_acia->set_rxc(57600*16); break;
+ case ES_S_230400: m_acia->set_rxc(XTAL_3_6864MHz); break;
+ case ES_S_115200: m_acia->set_rxc(XTAL_3_6864MHz/2); break;
+ case ES_S_57600: m_acia->set_rxc(XTAL_3_6864MHz/4); break;
case ES_S_UNDEFINED: m_acia->set_rxc(0); break;
}
}
diff --git a/src/mess/machine/c64_turbo232.h b/src/mess/machine/c64_turbo232.h
index 3baaa01ee51..f308afc69e8 100644
--- a/src/mess/machine/c64_turbo232.h
+++ b/src/mess/machine/c64_turbo232.h
@@ -16,6 +16,7 @@
#include "emu.h"
#include "machine/c64exp.h"
#include "machine/mos6551.h"
+#include "machine/serial.h"
@@ -50,6 +51,7 @@ protected:
private:
required_device<mos6551_device> m_acia;
+ required_device<rs232_port_device> m_rs232;
required_ioport m_io_cs;
required_ioport m_io_irq;