From dca104bfbe5e93abec0e76b31636e2ed1b56b30c Mon Sep 17 00:00:00 2001 From: hap Date: Sun, 27 Dec 2020 13:39:14 +0100 Subject: supremo: placeholder for io ports --- src/mame/drivers/novag_snova.cpp | 2 +- src/mame/drivers/novag_supremo.cpp | 30 +++++++++++++++++++++++++++++- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/src/mame/drivers/novag_snova.cpp b/src/mame/drivers/novag_snova.cpp index de9d497ba04..c208c18046c 100644 --- a/src/mame/drivers/novag_snova.cpp +++ b/src/mame/drivers/novag_snova.cpp @@ -9,7 +9,7 @@ Hardware notes: - Hitachi HD63A03YP MCU @ 16MHz (4MHz internal) - 32KB ROM(TC57256AD-12), 8KB RAM(CXK58648P-10L) - LCD with 4 digits and custom segments, no LCD chip -- RS232 port for Novag Super System (like the one in sexpertc) +- RJ-12 port for Novag Super System (like the one in sexpertc) - buzzer, 16 LEDs, 8*8 chessboard buttons TODO: diff --git a/src/mame/drivers/novag_supremo.cpp b/src/mame/drivers/novag_supremo.cpp index 3154a83aa96..ea86b57d440 100644 --- a/src/mame/drivers/novag_supremo.cpp +++ b/src/mame/drivers/novag_supremo.cpp @@ -19,6 +19,7 @@ TODO: - does not work, most likely due to incomplete cpu emulation (unemulated timer registers), could also be a bad rom dump on top of that - even when adding IRQ3 with a hack, it doesn't do much at all +- I/O seems very similar to nsnova, can drivers be merged? (get this one working first) - is 1988 version the same ROM? ******************************************************************************/ @@ -57,6 +58,11 @@ private: required_device m_dac; void main_map(address_map &map); + + u8 p2_r(); + void p2_w(u8 data); + void p5_w(u8 data); + void p6_w(u8 data); }; void supremo_state::machine_start() @@ -69,7 +75,25 @@ void supremo_state::machine_start() I/O ******************************************************************************/ -// ... + +u8 supremo_state::p2_r() +{ + return 1; +} + +void supremo_state::p2_w(u8 data) +{ + // P22: speaker out + m_dac->write(BIT(data, 2)); +} + +void supremo_state::p5_w(u8 data) +{ +} + +void supremo_state::p6_w(u8 data) +{ +} @@ -105,6 +129,10 @@ void supremo_state::supremo(machine_config &config) /* basic machine hardware */ HD6303Y(config, m_maincpu, 8_MHz_XTAL); m_maincpu->set_addrmap(AS_PROGRAM, &supremo_state::main_map); + m_maincpu->in_p2_cb().set(FUNC(supremo_state::p2_r)); + m_maincpu->out_p2_cb().set(FUNC(supremo_state::p2_w)); + m_maincpu->out_p5_cb().set(FUNC(supremo_state::p5_w)); + m_maincpu->out_p6_cb().set(FUNC(supremo_state::p6_w)); // THIS IS A HACK, vector @ 0xffec, use ROM_COPY //const attotime irq_period = attotime::from_ticks(4 * 128 * 10, 8_MHz_XTAL); -- cgit v1.2.3