diff options
author | 2013-06-10 04:29:59 +0000 | |
---|---|---|
committer | 2013-06-10 04:29:59 +0000 | |
commit | 2c648111168857285d58aca39d9f249d32a4bfb7 (patch) | |
tree | 80453fa0fda8cb6ec64bd8b3ef02e0dca41423aa /src/mess/drivers/votrtnt.c | |
parent | e434c2ba8d82f695e97bdaf08e38de5a10867a48 (diff) |
(MESS) Votrtnt: connected acia and rs232
Diffstat (limited to 'src/mess/drivers/votrtnt.c')
-rw-r--r-- | src/mess/drivers/votrtnt.c | 91 |
1 files changed, 27 insertions, 64 deletions
diff --git a/src/mess/drivers/votrtnt.c b/src/mess/drivers/votrtnt.c index 9521b447cfd..c7aed2ea2ba 100644 --- a/src/mess/drivers/votrtnt.c +++ b/src/mess/drivers/votrtnt.c @@ -25,22 +25,17 @@ * * ToDo: * - Votrax device needs considerable improvement in sound quality. -* - Reconnect the ACIA when serial coms become viable in MESS. +* * ******************************************************************************/ /* Core includes */ #include "emu.h" #include "cpu/m6800/m6800.h" -#include "votrtnt.lh" - -/* Components */ -#include "sound/votrax.h" #include "machine/6850acia.h" - -/* For testing */ -#include "machine/terminal.h" - +#include "machine/serial.h" +#include "sound/votrax.h" +#include "votrtnt.lh" class votrtnt_state : public driver_device @@ -49,34 +44,14 @@ public: votrtnt_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), - m_terminal(*this, TERMINAL_TAG), - //m_acia(*this, "acia_0"), m_votrax(*this, "votrax") { } required_device<cpu_device> m_maincpu; - required_device<generic_terminal_device> m_terminal; - //required_device<> m_acia; required_device<votrax_sc01_device> m_votrax; - DECLARE_READ8_MEMBER(votrtnt_acia_status_r); - DECLARE_READ8_MEMBER(votrtnt_acia_data_r); - DECLARE_WRITE8_MEMBER(votrtnt_kbd_put); - UINT8 m_term_data; - UINT8 m_term_status; virtual void machine_reset(); }; -READ8_MEMBER( votrtnt_state::votrtnt_acia_status_r ) -{ - return m_term_status; -} - -READ8_MEMBER( votrtnt_state::votrtnt_acia_data_r ) -{ - m_term_status = 0xe2; - return m_term_data; -} - /****************************************************************************** Address Maps @@ -86,10 +61,8 @@ static ADDRESS_MAP_START(6802_mem, AS_PROGRAM, 8, votrtnt_state) ADDRESS_MAP_UNMAP_HIGH ADDRESS_MAP_GLOBAL_MASK(0x6fff) AM_RANGE(0x0000, 0x03ff) AM_RAM AM_MIRROR(0xc00)/* RAM, 2114*2 (0x400 bytes) mirrored 4x */ - //AM_RANGE(0x2000, 0x2000) AM_NOP AM_MIRROR(0xffe)//AM_DEVREADWRITE("acia_0",aciastat_r,aciactrl_w)/* 6850 ACIA */ - //AM_RANGE(0x2001, 0x2001) AM_NOP AM_MIRROR(0xffe)//AM_DEVREADWRITE("acia_0",aciadata_r,aciadata_w)/* 6850 ACIA */ - AM_RANGE(0x2000, 0x2000) AM_MIRROR(0xffe) AM_READ(votrtnt_acia_status_r) AM_WRITENOP// temp testing - AM_RANGE(0x2001, 0x2001) AM_MIRROR(0xffe) AM_READ(votrtnt_acia_data_r) AM_DEVWRITE(TERMINAL_TAG, generic_terminal_device, write) // temp testing + AM_RANGE(0x2000, 0x2000) AM_MIRROR(0xffe) AM_DEVREADWRITE("acia", acia6850_device, status_read, control_write) + AM_RANGE(0x2001, 0x2001) AM_MIRROR(0xffe) AM_DEVREADWRITE("acia", acia6850_device, data_read, data_write) AM_RANGE(0x4000, 0x5fff) AM_DEVWRITE("votrax", votrax_sc01_device, write) /* low 6 bits write to 6 bit input of sc-01-a; high 2 bits are ignored (but by adding a buffer chip could be made to control the inflection bits of the sc-01-a which are normally grounded on the tnt) */ AM_RANGE(0x6000, 0x6fff) AM_ROM /* ROM in potted block */ ADDRESS_MAP_END @@ -101,7 +74,7 @@ ADDRESS_MAP_END static INPUT_PORTS_START(votrtnt) PORT_START("DSW1") /* not connected to cpu, each switch is connected directly to the output of a 4040 counter dividing the cpu m1? clock to feed the 6850 ACIA. Setting more than one switch on is a bad idea. see tnt_schematic.jpg */ - PORT_DIPNAME( 0xFF, 0x00, "Baud Rate" ) PORT_DIPLOCATION("SW1:1,2,3,4,5,6,7,8") + PORT_DIPNAME( 0xFF, 0x80, "Baud Rate" ) PORT_DIPLOCATION("SW1:1,2,3,4,5,6,7,8") PORT_DIPSETTING( 0x01, "75" ) PORT_DIPSETTING( 0x02, "150" ) PORT_DIPSETTING( 0x04, "300" ) @@ -114,19 +87,27 @@ INPUT_PORTS_END void votrtnt_state::machine_reset() { - m_term_data = 0; - m_term_status = 0xe2; } -WRITE8_MEMBER( votrtnt_state::votrtnt_kbd_put ) +static ACIA6850_INTERFACE( acia_intf ) { - m_term_data = data; - m_term_status = 0xe3; -} + 153600, + 153600, + DEVCB_DEVICE_LINE_MEMBER("rs232", serial_port_device, rx), + DEVCB_DEVICE_LINE_MEMBER("rs232", serial_port_device, tx), + DEVCB_DEVICE_LINE_MEMBER("rs232", rs232_port_device, cts_r), + DEVCB_DEVICE_LINE_MEMBER("rs232", rs232_port_device, rts_w), + DEVCB_NULL, + DEVCB_NULL +}; -static GENERIC_TERMINAL_INTERFACE( votrtnt_terminal_intf ) +static const rs232_port_interface rs232_intf = { - DEVCB_DRIVER_MEMBER(votrtnt_state, votrtnt_kbd_put) + DEVCB_NULL, + DEVCB_NULL, + DEVCB_NULL, + DEVCB_NULL, + DEVCB_NULL }; static struct votrax_sc01_interface votrtnt_votrax_interface = @@ -147,14 +128,13 @@ static MACHINE_CONFIG_START( votrtnt, votrtnt_state ) //MCFG_DEFAULT_LAYOUT(layout_votrtnt) /* serial hardware */ - //MCFG_ACIA6850_ADD("acia_0", acia_intf) + MCFG_ACIA6850_ADD("acia", acia_intf) + MCFG_RS232_PORT_ADD("rs232", rs232_intf, default_rs232_devices, "serial_terminal") /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_VOTRAX_SC01_ADD("votrax", 1700000, votrtnt_votrax_interface ) /* 1.70 MHz? needs verify */ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) - - MCFG_GENERIC_TERMINAL_ADD(TERMINAL_TAG, votrtnt_terminal_intf) MACHINE_CONFIG_END @@ -169,26 +149,9 @@ ROM_START(votrtnt) ROM_END - -/****************************************************************************** - Stuff that belongs in machine/votrtnt.c -******************************************************************************/ -/* -static ACIA6850_INTERFACE( acia_intf ) -{ - 9600, // rx clock, actually based on dipswitches - 9600, // tx clock, actually based on dipswitches - DEVCB_NULL, // rx callback - DEVCB_NULL, // tx callback - DEVCB_NULL, - DEVCB_NULL, - DEVCB_NULL, - DEVCB_NULL -};*/ - /****************************************************************************** Drivers ******************************************************************************/ -/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ -COMP( 1980, votrtnt, 0, 0, votrtnt, votrtnt, driver_device, 0, "Votrax", "Type 'N Talk", GAME_NOT_WORKING ) +/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */ +COMP( 1980, votrtnt, 0, 0, votrtnt, votrtnt, driver_device, 0, "Votrax", "Type 'N Talk", GAME_NOT_WORKING ) |