From 5454c19626455038bd6cdd51a07841283f1fe8ef Mon Sep 17 00:00:00 2001 From: angelosa Date: Fri, 6 Sep 2024 19:45:51 +0200 Subject: funtech/supracan.cpp: hookup sound CPU NMI, makes staiwbbl inputs to work --- hash/supracan.xml | 3 ++- src/mame/funtech/supracan.cpp | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/hash/supracan.xml b/hash/supracan.xml index 1722192b883..b12fd7a8dd1 100644 --- a/hash/supracan.xml +++ b/hash/supracan.xml @@ -188,7 +188,8 @@ Crashes after few seconds in attract, controls [irq 3] as FRC - + + diff --git a/src/mame/funtech/supracan.cpp b/src/mame/funtech/supracan.cpp index 5f362e5a5d8..1f4758addc6 100644 --- a/src/mame/funtech/supracan.cpp +++ b/src/mame/funtech/supracan.cpp @@ -9,6 +9,7 @@ References: - https://upload.wikimedia.org/wikipedia/commons/a/a6/Super-ACan-motherboard-flat.jpg - https://github.com/angelosa/hw_docs/blob/main/funtech_superacan/pergame.md + ******************************************************************************* INFO: @@ -1366,9 +1367,10 @@ uint8_t supracan_state::_6502_soundmem_r(offs_t offset) break; case 0x411: data = m_soundcpu_irq_source; - m_soundcpu_irq_source = 0; + // TODO: should really check for further pending irqs before acking if (!machine().side_effects_disabled()) { + m_soundcpu_irq_source = 0; LOGMASKED(LOG_SOUND, "%s: %s: 6502_soundmem_r: Sound IRQ source read + clear: %02x\n", machine().describe_context(), machine().time().to_string(), data); m_soundcpu->set_input_line(0, CLEAR_LINE); } @@ -1757,6 +1759,9 @@ TIMER_CALLBACK_MEMBER(supracan_state::scanline_cb) { LOGMASKED(LOG_IRQS, "Triggering VBL IRQ\n\n"); m_maincpu->set_input_line(7, HOLD_LINE); + // TODO: ack, from $412? + // staiwbbl requires this for inputs to work + m_soundcpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero); } break; } -- cgit v1.2.3