diff options
author | 2017-09-30 02:55:20 +1000 | |
---|---|---|
committer | 2017-09-30 02:55:20 +1000 | |
commit | c31dfdcfda8b724c8f211f11fe60f6ea530f7cda (patch) | |
tree | bb7e57bd599b42dbb9ad77f9101e8f45cc1247bd /src | |
parent | ce5232222fe5d6f9d6f06c6157b0eba8a2cff431 (diff) |
(nw) more trampoline removal.
Diffstat (limited to 'src')
-rw-r--r-- | src/mame/drivers/alphatro.cpp | 10 | ||||
-rw-r--r-- | src/mame/drivers/gimix.cpp | 33 | ||||
-rw-r--r-- | src/mame/drivers/unior.cpp | 15 | ||||
-rw-r--r-- | src/mame/drivers/votrpss.cpp | 49 | ||||
-rw-r--r-- | src/mame/drivers/votrtnt.cpp | 2 |
5 files changed, 33 insertions, 76 deletions
diff --git a/src/mame/drivers/alphatro.cpp b/src/mame/drivers/alphatro.cpp index 09250a0c425..817dabc2c88 100644 --- a/src/mame/drivers/alphatro.cpp +++ b/src/mame/drivers/alphatro.cpp @@ -93,7 +93,6 @@ public: DECLARE_WRITE8_MEMBER(portf0_w); DECLARE_INPUT_CHANGED_MEMBER(alphatro_break); DECLARE_WRITE_LINE_MEMBER(txdata_callback); - DECLARE_WRITE_LINE_MEMBER(write_usart_clock); DECLARE_WRITE_LINE_MEMBER(hrq_w); DECLARE_WRITE_LINE_MEMBER(fdc_irq_w); DECLARE_PALETTE_INIT(alphatro); @@ -325,12 +324,6 @@ WRITE_LINE_MEMBER( alphatro_state::txdata_callback ) m_cass_state = state; } -WRITE_LINE_MEMBER( alphatro_state::write_usart_clock ) -{ - m_usart->write_txc(state); - m_usart->write_rxc(state); -} - MC6845_UPDATE_ROW( alphatro_state::crtc_update_row ) { const rgb_t *pens = m_palette->palette()->entry_list_raw(); @@ -741,7 +734,8 @@ static MACHINE_CONFIG_START( alphatro ) MCFG_I8251_TXD_HANDLER(WRITELINE(alphatro_state, txdata_callback)) MCFG_DEVICE_ADD("usart_clock", CLOCK, 19218) // 19218 to load a real tape, 19222 to load a tape made by this driver - MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(alphatro_state, write_usart_clock)) + MCFG_CLOCK_SIGNAL_HANDLER(DEVWRITELINE("usart", i8251_device, write_txc)) + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("usart", i8251_device, write_rxc)) MCFG_CASSETTE_ADD("cassette") MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED) diff --git a/src/mame/drivers/gimix.cpp b/src/mame/drivers/gimix.cpp index a73c4cdabb8..7fc3fe9ab3e 100644 --- a/src/mame/drivers/gimix.cpp +++ b/src/mame/drivers/gimix.cpp @@ -97,9 +97,6 @@ public: , m_dma_dip(*this, "dma_s2") {} - DECLARE_WRITE8_MEMBER(kbd_put); - DECLARE_READ8_MEMBER(keyin_r); - DECLARE_READ8_MEMBER(status_r); DECLARE_WRITE8_MEMBER(system_w); DECLARE_WRITE_LINE_MEMBER(irq_w); DECLARE_WRITE_LINE_MEMBER(fdc_irq_w); @@ -108,7 +105,6 @@ public: DECLARE_WRITE8_MEMBER(dma_w); DECLARE_READ8_MEMBER(fdc_r); DECLARE_WRITE8_MEMBER(fdc_w); - DECLARE_WRITE_LINE_MEMBER(write_acia_clock); DECLARE_READ8_MEMBER(pia_pa_r); DECLARE_WRITE8_MEMBER(pia_pa_w); DECLARE_READ8_MEMBER(pia_pb_r); @@ -226,23 +222,6 @@ static INPUT_PORTS_START( gimix ) INPUT_PORTS_END -READ8_MEMBER( gimix_state::keyin_r ) -{ - uint8_t ret = m_term_data; - m_term_data = 0; - return ret; -} - -READ8_MEMBER( gimix_state::status_r ) -{ - return (m_term_data) ? 3 : 2; -} - -WRITE8_MEMBER( gimix_state::kbd_put ) -{ - m_term_data = data; -} - void gimix_state::refresh_memory() { int x; @@ -533,13 +512,6 @@ void gimix_state::driver_start() { } -WRITE_LINE_MEMBER(gimix_state::write_acia_clock) -{ - m_acia1->write_txc(state); - m_acia1->write_rxc(state); - m_acia2->write_txc(state); - m_acia2->write_rxc(state); -} TIMER_DEVICE_CALLBACK_MEMBER(gimix_state::test_timer_w) { @@ -636,7 +608,10 @@ static MACHINE_CONFIG_START( gimix ) MCFG_RS232_CTS_HANDLER(DEVWRITELINE("acia4",acia6850_device,write_cts)) MCFG_DEVICE_ADD("acia_clock", CLOCK, 153600) - MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(gimix_state, write_acia_clock)) + MCFG_CLOCK_SIGNAL_HANDLER(DEVWRITELINE("acia1", acia6850_device, write_txc)) + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("acia1", acia6850_device, write_rxc)) + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("acia2", acia6850_device, write_txc)) + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("acia2", acia6850_device, write_rxc)) /* banking */ MCFG_ADDRESS_BANK("bank1") diff --git a/src/mame/drivers/unior.cpp b/src/mame/drivers/unior.cpp index 160e9d3a081..eda92d0edad 100644 --- a/src/mame/drivers/unior.cpp +++ b/src/mame/drivers/unior.cpp @@ -56,16 +56,13 @@ public: , m_maincpu(*this, "maincpu") , m_pit(*this, "pit") , m_dma(*this, "dma") - , m_uart(*this, "uart") , m_palette(*this, "palette") , m_p_chargen(*this, "chargen") , m_p_vram(*this, "vram") - { - } + { } DECLARE_WRITE8_MEMBER(vram_w); DECLARE_WRITE8_MEMBER(scroll_w); - DECLARE_WRITE_LINE_MEMBER(write_uart_clock); DECLARE_READ8_MEMBER(ppi0_b_r); DECLARE_WRITE8_MEMBER(ppi0_b_w); DECLARE_READ8_MEMBER(ppi1_a_r); @@ -85,7 +82,6 @@ private: required_device<cpu_device> m_maincpu; required_device<pit8253_device> m_pit; required_device<i8257_device> m_dma; - required_device<i8251_device> m_uart; required_device<palette_device> m_palette; required_region_ptr<u8> m_p_chargen; required_region_ptr<u8> m_p_vram; @@ -301,12 +297,6 @@ PALETTE_INIT_MEMBER(unior_state,unior) *************************************************/ -WRITE_LINE_MEMBER(unior_state::write_uart_clock) -{ - m_uart->write_txc(state); - m_uart->write_rxc(state); -} - READ8_MEMBER( unior_state::ppi0_b_r ) { return 0; @@ -410,7 +400,8 @@ static MACHINE_CONFIG_START( unior ) MCFG_DEVICE_ADD("pit", PIT8253, 0) MCFG_PIT8253_CLK0(XTAL_20MHz / 12) MCFG_PIT8253_CLK1(XTAL_20MHz / 9) - MCFG_PIT8253_OUT1_HANDLER(WRITELINE(unior_state, write_uart_clock)) + MCFG_PIT8253_OUT1_HANDLER(DEVWRITELINE("uart", i8251_device, write_txc)) + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("uart", i8251_device, write_rxc)) MCFG_PIT8253_CLK2(XTAL_16MHz / 9 / 64) // unknown frequency MCFG_PIT8253_OUT2_HANDLER(DEVWRITELINE("speaker", speaker_sound_device, level_w)) diff --git a/src/mame/drivers/votrpss.cpp b/src/mame/drivers/votrpss.cpp index dc1c5d6a37a..4f17f1441b7 100644 --- a/src/mame/drivers/votrpss.cpp +++ b/src/mame/drivers/votrpss.cpp @@ -44,14 +44,22 @@ I8251 UART: RESET is taken from the same inverter that resets the counters Things to be looked at: -- Serial doesn't work, so has been disabled. -- Bottom 3 dips must be off/serial/off, or else nothing works. -- No sound at all. - volume and pitch should be controlled by ppi outputs - pit to be hooked up - bit 0 of portc is not connected according to text above, but it completely changes the irq operation. +Notes: +- When Serial dip is chosen, you type the commands in, but you cannot see anything. + If you enter text via parallel, it is echoed but otherwise ignored. +- When Parallel dip is chosen, you type the commands in, but again you cannot + see anything. +- These operations ARE BY DESIGN. Everything is working correctly. +- Commands are case-sensitive. +- Some tests... + - Say the time: EscT. (include the period) + - Play some notes: !T08:1234:125:129:125:130. (then press enter) + ******************************************************************************/ /* Core includes */ @@ -68,25 +76,18 @@ Things to be looked at: #include "machine/pit8253.h" #include "sound/ay8910.h" #include "sound/votrax.h" - -/* For testing */ #include "machine/terminal.h" - #include "speaker.h" -#define TERMINAL_TAG "terminal" - class votrpss_state : public driver_device { public: votrpss_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_ppi(*this, "ppi"), - m_uart(*this, "uart") - { - } + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_terminal(*this, "terminal") + , m_ppi(*this, "ppi") + { } void kbd_put(u8 data); DECLARE_READ8_MEMBER(ppi_pa_r); @@ -108,7 +109,6 @@ private: required_device<cpu_device> m_maincpu; required_device<generic_terminal_device> m_terminal; required_device<i8255_device> m_ppi; - required_device<i8251_device> m_uart; }; @@ -161,7 +161,7 @@ static INPUT_PORTS_START(votrpss) PORT_DIPNAME( 0x20, 0x20, "Startup Message" ) PORT_DIPLOCATION("SW1:6") PORT_DIPSETTING( 0x00, DEF_STR ( Off ) ) PORT_DIPSETTING( 0x20, DEF_STR ( On ) ) - PORT_DIPNAME( 0x40, 0x00, "Default Communications Port" ) PORT_DIPLOCATION("SW1:7") + PORT_DIPNAME( 0x40, 0x00, "Default Input Port" ) PORT_DIPLOCATION("SW1:7") PORT_DIPSETTING( 0x00, "Serial/RS-232" ) PORT_DIPSETTING( 0x40, "Parallel" ) PORT_DIPNAME( 0x80, 0x00, "Self Test Mode" ) PORT_DIPLOCATION("SW1:8") @@ -208,7 +208,6 @@ READ8_MEMBER( votrpss_state::ppi_pc_r ) } return (m_portc & 0xdb) | data; - //return data; } WRITE8_MEMBER( votrpss_state::ppi_pa_w ) @@ -232,11 +231,6 @@ void votrpss_state::kbd_put(u8 data) m_term_data = data; } -DECLARE_WRITE_LINE_MEMBER( votrpss_state::write_uart_clock ) -{ - m_uart->write_txc(state); - m_uart->write_rxc(state); -} /****************************************************************************** Machine Drivers @@ -262,7 +256,7 @@ static MACHINE_CONFIG_START( votrpss ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) /* Devices */ - MCFG_DEVICE_ADD(TERMINAL_TAG, GENERIC_TERMINAL, 0) + MCFG_DEVICE_ADD("terminal", GENERIC_TERMINAL, 0) MCFG_GENERIC_TERMINAL_KEYBOARD_CB(PUT(votrpss_state, kbd_put)) MCFG_DEVICE_ADD("uart", I8251, 0) @@ -270,13 +264,16 @@ static MACHINE_CONFIG_START( votrpss ) MCFG_I8251_DTR_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_dtr)) MCFG_I8251_RTS_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_rts)) + // when serial is chosen, and you select terminal, nothing shows (by design). You can only type commands in. MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, nullptr) MCFG_RS232_RXD_HANDLER(DEVWRITELINE("uart", i8251_device, write_rxd)) MCFG_RS232_DSR_HANDLER(DEVWRITELINE("uart", i8251_device, write_dsr)) + MCFG_RS232_CTS_HANDLER(DEVWRITELINE("uart", i8251_device, write_cts)) MCFG_DEVICE_ADD("pit", PIT8253, 0) MCFG_PIT8253_CLK0(XTAL_8MHz) /* Timer 0: baud rate gen for 8251 */ - MCFG_PIT8253_OUT0_HANDLER(WRITELINE(votrpss_state, write_uart_clock)) + MCFG_PIT8253_OUT0_HANDLER(DEVWRITELINE("uart", i8251_device, write_txc)) + MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("uart", i8251_device, write_rxc)) MCFG_PIT8253_CLK1(XTAL_8MHz / 256) /* Timer 1: Pitch */ MCFG_PIT8253_CLK2(XTAL_8MHz / 4096) /* Timer 2: Volume */ @@ -323,4 +320,4 @@ ROM_END ******************************************************************************/ // YEAR NAME PARENT COMPAT MACHINE INPUT STATE INIT COMPANY FULLNAME FLAGS -COMP( 1982, votrpss, 0, 0, votrpss, votrpss, votrpss_state, 0, "Votrax", "Personal Speech System", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) +COMP( 1982, votrpss, 0, 0, votrpss, votrpss, votrpss_state, 0, "Votrax", "Personal Speech System", MACHINE_IMPERFECT_SOUND ) diff --git a/src/mame/drivers/votrtnt.cpp b/src/mame/drivers/votrtnt.cpp index 22849629723..3389954c87a 100644 --- a/src/mame/drivers/votrtnt.cpp +++ b/src/mame/drivers/votrtnt.cpp @@ -182,4 +182,4 @@ ROM_END ******************************************************************************/ // YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS -COMP( 1980, votrtnt, 0, 0, votrtnt, votrtnt, votrtnt_state, 0, "Votrax", "Type 'N Talk", MACHINE_NOT_WORKING ) +COMP( 1980, votrtnt, 0, 0, votrtnt, votrtnt, votrtnt_state, 0, "Votrax", "Type 'N Talk", MACHINE_IMPERFECT_SOUND ) |