Skip to content

Commit 856885e

Browse files
committed
ddr/mc8030: Fix keyboard. [Curt Coder]
1 parent f99c618 commit 856885e

1 file changed

Lines changed: 15 additions & 5 deletions

File tree

src/mame/ddr/mc8030.cpp

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,13 @@ uint32_t mc8030_state::screen_update_mc8030(screen_device &screen, bitmap_ind16
171171
return 0;
172172
}
173173

174+
static DEVICE_INPUT_DEFAULTS_START( keyboard )
175+
DEVICE_INPUT_DEFAULTS( "RS232_TXBAUD", 0xff, RS232_BAUD_9600 )
176+
DEVICE_INPUT_DEFAULTS( "RS232_DATABITS", 0xff, RS232_DATABITS_7 )
177+
DEVICE_INPUT_DEFAULTS( "RS232_PARITY", 0xff, RS232_PARITY_ODD )
178+
DEVICE_INPUT_DEFAULTS( "RS232_STOPBITS", 0xff, RS232_STOPBITS_2 )
179+
DEVICE_INPUT_DEFAULTS_END
180+
174181
// this is a guess there is no information available
175182
static const z80_daisy_config daisy_chain[] =
176183
{
@@ -228,21 +235,24 @@ void mc8030_state::mc8030(machine_config &config)
228235

229236
z80ctc_device& asp_ctc(Z80CTC(config, "asp_ctc", XTAL(2'457'600)));
230237
asp_ctc.intr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
231-
// ZC0: to SIO CLK CH A
232-
// ZC1: to SIO CLK CH B
238+
asp_ctc.zc_callback<0>().set("asp_sio", FUNC(z80sio_device::txca_w));
239+
asp_ctc.zc_callback<0>().append("asp_sio", FUNC(z80sio_device::rxca_w));
240+
asp_ctc.zc_callback<1>().set("asp_sio", FUNC(z80sio_device::rxtxcb_w));
233241
// ZC2: KMBG (??)
234242

235-
clock_device &uart_clock(CLOCK(config, "uart_clock", 153600));
236-
uart_clock.signal_handler().set("asp_sio", FUNC(z80sio_device::txca_w));
237-
uart_clock.signal_handler().append("asp_sio", FUNC(z80sio_device::rxca_w));
243+
clock_device &ctc_clock(CLOCK(config, "ctc_clock", XTAL(2'457'600) / 4));
244+
ctc_clock.signal_handler().set("asp_ctc", FUNC(z80ctc_device::trg0));
245+
ctc_clock.signal_handler().append("asp_ctc", FUNC(z80ctc_device::trg2));
238246

239247
z80sio_device& sio(Z80SIO(config, "asp_sio", 4800));
248+
sio.out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
240249
// SIO CH A in = keyboard; out = beeper; CH B = IFSS (??)
241250
sio.out_txda_callback().set("rs232", FUNC(rs232_port_device::write_txd));
242251
sio.out_dtra_callback().set("rs232", FUNC(rs232_port_device::write_dtr));
243252
sio.out_rtsa_callback().set("rs232", FUNC(rs232_port_device::write_rts));
244253

245254
rs232_port_device &rs232(RS232_PORT(config, "rs232", default_rs232_devices, "keyboard"));
255+
rs232.set_option_device_input_defaults("keyboard", DEVICE_INPUT_DEFAULTS_NAME(keyboard));
246256
rs232.rxd_handler().set("asp_sio", FUNC(z80sio_device::rxa_w));
247257
rs232.cts_handler().set("asp_sio", FUNC(z80sio_device::ctsa_w));
248258
}

0 commit comments

Comments
 (0)