trunk/src/mess/drivers/votrtnt.c
| r23579 | r23580 | |
| 25 | 25 | * |
| 26 | 26 | * ToDo: |
| 27 | 27 | * - Votrax device needs considerable improvement in sound quality. |
| 28 | | * - Reconnect the ACIA when serial coms become viable in MESS. |
| 29 | 28 | * |
| 29 | * |
| 30 | 30 | ******************************************************************************/ |
| 31 | 31 | |
| 32 | 32 | /* Core includes */ |
| 33 | 33 | #include "emu.h" |
| 34 | 34 | #include "cpu/m6800/m6800.h" |
| 35 | #include "machine/6850acia.h" |
| 36 | #include "machine/serial.h" |
| 37 | #include "sound/votrax.h" |
| 35 | 38 | #include "votrtnt.lh" |
| 36 | 39 | |
| 37 | | /* Components */ |
| 38 | | #include "sound/votrax.h" |
| 39 | | #include "machine/6850acia.h" |
| 40 | 40 | |
| 41 | | /* For testing */ |
| 42 | | #include "machine/terminal.h" |
| 43 | | |
| 44 | | |
| 45 | | |
| 46 | 41 | class votrtnt_state : public driver_device |
| 47 | 42 | { |
| 48 | 43 | public: |
| 49 | 44 | votrtnt_state(const machine_config &mconfig, device_type type, const char *tag) |
| 50 | 45 | : driver_device(mconfig, type, tag), |
| 51 | 46 | m_maincpu(*this, "maincpu"), |
| 52 | | m_terminal(*this, TERMINAL_TAG), |
| 53 | | //m_acia(*this, "acia_0"), |
| 54 | 47 | m_votrax(*this, "votrax") |
| 55 | 48 | { } |
| 56 | 49 | |
| 57 | 50 | required_device<cpu_device> m_maincpu; |
| 58 | | required_device<generic_terminal_device> m_terminal; |
| 59 | | //required_device<> m_acia; |
| 60 | 51 | required_device<votrax_sc01_device> m_votrax; |
| 61 | | DECLARE_READ8_MEMBER(votrtnt_acia_status_r); |
| 62 | | DECLARE_READ8_MEMBER(votrtnt_acia_data_r); |
| 63 | | DECLARE_WRITE8_MEMBER(votrtnt_kbd_put); |
| 64 | | UINT8 m_term_data; |
| 65 | | UINT8 m_term_status; |
| 66 | 52 | virtual void machine_reset(); |
| 67 | 53 | }; |
| 68 | 54 | |
| 69 | | READ8_MEMBER( votrtnt_state::votrtnt_acia_status_r ) |
| 70 | | { |
| 71 | | return m_term_status; |
| 72 | | } |
| 73 | 55 | |
| 74 | | READ8_MEMBER( votrtnt_state::votrtnt_acia_data_r ) |
| 75 | | { |
| 76 | | m_term_status = 0xe2; |
| 77 | | return m_term_data; |
| 78 | | } |
| 79 | | |
| 80 | | |
| 81 | 56 | /****************************************************************************** |
| 82 | 57 | Address Maps |
| 83 | 58 | ******************************************************************************/ |
| r23579 | r23580 | |
| 86 | 61 | ADDRESS_MAP_UNMAP_HIGH |
| 87 | 62 | ADDRESS_MAP_GLOBAL_MASK(0x6fff) |
| 88 | 63 | AM_RANGE(0x0000, 0x03ff) AM_RAM AM_MIRROR(0xc00)/* RAM, 2114*2 (0x400 bytes) mirrored 4x */ |
| 89 | | //AM_RANGE(0x2000, 0x2000) AM_NOP AM_MIRROR(0xffe)//AM_DEVREADWRITE("acia_0",aciastat_r,aciactrl_w)/* 6850 ACIA */ |
| 90 | | //AM_RANGE(0x2001, 0x2001) AM_NOP AM_MIRROR(0xffe)//AM_DEVREADWRITE("acia_0",aciadata_r,aciadata_w)/* 6850 ACIA */ |
| 91 | | AM_RANGE(0x2000, 0x2000) AM_MIRROR(0xffe) AM_READ(votrtnt_acia_status_r) AM_WRITENOP// temp testing |
| 92 | | AM_RANGE(0x2001, 0x2001) AM_MIRROR(0xffe) AM_READ(votrtnt_acia_data_r) AM_DEVWRITE(TERMINAL_TAG, generic_terminal_device, write) // temp testing |
| 64 | AM_RANGE(0x2000, 0x2000) AM_MIRROR(0xffe) AM_DEVREADWRITE("acia", acia6850_device, status_read, control_write) |
| 65 | AM_RANGE(0x2001, 0x2001) AM_MIRROR(0xffe) AM_DEVREADWRITE("acia", acia6850_device, data_read, data_write) |
| 93 | 66 | 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) */ |
| 94 | 67 | AM_RANGE(0x6000, 0x6fff) AM_ROM /* ROM in potted block */ |
| 95 | 68 | ADDRESS_MAP_END |
| r23579 | r23580 | |
| 101 | 74 | |
| 102 | 75 | static INPUT_PORTS_START(votrtnt) |
| 103 | 76 | 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 */ |
| 104 | | PORT_DIPNAME( 0xFF, 0x00, "Baud Rate" ) PORT_DIPLOCATION("SW1:1,2,3,4,5,6,7,8") |
| 77 | PORT_DIPNAME( 0xFF, 0x80, "Baud Rate" ) PORT_DIPLOCATION("SW1:1,2,3,4,5,6,7,8") |
| 105 | 78 | PORT_DIPSETTING( 0x01, "75" ) |
| 106 | 79 | PORT_DIPSETTING( 0x02, "150" ) |
| 107 | 80 | PORT_DIPSETTING( 0x04, "300" ) |
| r23579 | r23580 | |
| 114 | 87 | |
| 115 | 88 | void votrtnt_state::machine_reset() |
| 116 | 89 | { |
| 117 | | m_term_data = 0; |
| 118 | | m_term_status = 0xe2; |
| 119 | 90 | } |
| 120 | 91 | |
| 121 | | WRITE8_MEMBER( votrtnt_state::votrtnt_kbd_put ) |
| 92 | static ACIA6850_INTERFACE( acia_intf ) |
| 122 | 93 | { |
| 123 | | m_term_data = data; |
| 124 | | m_term_status = 0xe3; |
| 125 | | } |
| 94 | 153600, |
| 95 | 153600, |
| 96 | DEVCB_DEVICE_LINE_MEMBER("rs232", serial_port_device, rx), |
| 97 | DEVCB_DEVICE_LINE_MEMBER("rs232", serial_port_device, tx), |
| 98 | DEVCB_DEVICE_LINE_MEMBER("rs232", rs232_port_device, cts_r), |
| 99 | DEVCB_DEVICE_LINE_MEMBER("rs232", rs232_port_device, rts_w), |
| 100 | DEVCB_NULL, |
| 101 | DEVCB_NULL |
| 102 | }; |
| 126 | 103 | |
| 127 | | static GENERIC_TERMINAL_INTERFACE( votrtnt_terminal_intf ) |
| 104 | static const rs232_port_interface rs232_intf = |
| 128 | 105 | { |
| 129 | | DEVCB_DRIVER_MEMBER(votrtnt_state, votrtnt_kbd_put) |
| 106 | DEVCB_NULL, |
| 107 | DEVCB_NULL, |
| 108 | DEVCB_NULL, |
| 109 | DEVCB_NULL, |
| 110 | DEVCB_NULL |
| 130 | 111 | }; |
| 131 | 112 | |
| 132 | 113 | static struct votrax_sc01_interface votrtnt_votrax_interface = |
| r23579 | r23580 | |
| 147 | 128 | //MCFG_DEFAULT_LAYOUT(layout_votrtnt) |
| 148 | 129 | |
| 149 | 130 | /* serial hardware */ |
| 150 | | //MCFG_ACIA6850_ADD("acia_0", acia_intf) |
| 131 | MCFG_ACIA6850_ADD("acia", acia_intf) |
| 132 | MCFG_RS232_PORT_ADD("rs232", rs232_intf, default_rs232_devices, "serial_terminal") |
| 151 | 133 | |
| 152 | 134 | /* sound hardware */ |
| 153 | 135 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 154 | 136 | MCFG_VOTRAX_SC01_ADD("votrax", 1700000, votrtnt_votrax_interface ) /* 1.70 MHz? needs verify */ |
| 155 | 137 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 156 | | |
| 157 | | MCFG_GENERIC_TERMINAL_ADD(TERMINAL_TAG, votrtnt_terminal_intf) |
| 158 | 138 | MACHINE_CONFIG_END |
| 159 | 139 | |
| 160 | 140 | |
| r23579 | r23580 | |
| 169 | 149 | ROM_END |
| 170 | 150 | |
| 171 | 151 | |
| 172 | | |
| 173 | 152 | /****************************************************************************** |
| 174 | | Stuff that belongs in machine/votrtnt.c |
| 175 | | ******************************************************************************/ |
| 176 | | /* |
| 177 | | static ACIA6850_INTERFACE( acia_intf ) |
| 178 | | { |
| 179 | | 9600, // rx clock, actually based on dipswitches |
| 180 | | 9600, // tx clock, actually based on dipswitches |
| 181 | | DEVCB_NULL, // rx callback |
| 182 | | DEVCB_NULL, // tx callback |
| 183 | | DEVCB_NULL, |
| 184 | | DEVCB_NULL, |
| 185 | | DEVCB_NULL, |
| 186 | | DEVCB_NULL |
| 187 | | };*/ |
| 188 | | |
| 189 | | /****************************************************************************** |
| 190 | 153 | Drivers |
| 191 | 154 | ******************************************************************************/ |
| 192 | 155 | |
| 193 | | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ |
| 194 | | COMP( 1980, votrtnt, 0, 0, votrtnt, votrtnt, driver_device, 0, "Votrax", "Type 'N Talk", GAME_NOT_WORKING ) |
| 156 | /* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */ |
| 157 | COMP( 1980, votrtnt, 0, 0, votrtnt, votrtnt, driver_device, 0, "Votrax", "Type 'N Talk", GAME_NOT_WORKING ) |