From 0f57c5df7ab774ef95a9de126c6c5d33036b1b67 Mon Sep 17 00:00:00 2001 From: angelosa Date: Fri, 23 Dec 2022 01:25:25 +0100 Subject: nec/pc88va.cpp: run irq7 thru the same 0 -> 1 logic as the other irqs, makes system to be more stable during SW intros --- src/mame/nec/pc88va.cpp | 20 ++++++++++++++++---- src/mame/nec/pc88va.h | 2 ++ 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/mame/nec/pc88va.cpp b/src/mame/nec/pc88va.cpp index 96ca427c0f9..69a4c65391c 100644 --- a/src/mame/nec/pc88va.cpp +++ b/src/mame/nec/pc88va.cpp @@ -1024,14 +1024,11 @@ WRITE_LINE_MEMBER( pc88va_state::fdc_irq ) { if(m_fdc_mode && state) { - // TODO: ugh why it doesn't follow state? - //printf("%d\n",state); m_pic2->ir3_w(0); m_pic2->ir3_w(1); } } -// TODO: often dies, which implicitly means "make the full system to hang" in PC-88 land ... WRITE_LINE_MEMBER(pc88va_state::int4_irq_w) { bool irq_state = m_sound_irq_enable & state; @@ -1117,6 +1114,20 @@ void pc88va_state::machine_reset() m_sound_irq_pending = false; } +WRITE_LINE_MEMBER(pc88va_state::slave_irq7) +{ + // If we don't follow this dispatch like the other irqs it will mismatch + // between sound and FDC, causing an hang or a disk failure during intros + // in rtype, olteus, shinraba, 88va2d. + // TODO: how pc88va even acknowledge any irq? + if (state) + { + m_maincpu->set_input_line(INPUT_LINE_IRQ7, CLEAR_LINE); + m_maincpu->set_input_line(INPUT_LINE_IRQ7, ASSERT_LINE); + } + +} + void pc88va_state::pc88va(machine_config &config) { V50(config, m_maincpu, MASTER_CLOCK); // μPD9002, aka V50 + μPD70008AC (for PC8801 compatibility mode) in place of 8080 @@ -1157,7 +1168,8 @@ void pc88va_state::pc88va(machine_config &config) // external PIC PIC8259(config, m_pic2, 0); - m_pic2->out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ7); +// m_pic2->out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ7); + m_pic2->out_int_callback().set(FUNC(pc88va_state::slave_irq7)); m_pic2->in_sp_callback().set_constant(0); UPD765A(config, m_fdc, 4000000, true, true); diff --git a/src/mame/nec/pc88va.h b/src/mame/nec/pc88va.h index 4dff0279ee1..1b868412abb 100644 --- a/src/mame/nec/pc88va.h +++ b/src/mame/nec/pc88va.h @@ -156,6 +156,8 @@ private: uint8_t kanji_ram_r(offs_t offset); void kanji_ram_w(offs_t offset, uint8_t data); + DECLARE_WRITE_LINE_MEMBER(slave_irq7); + uint8_t hdd_status_r(); uint16_t sysop_r(); -- cgit v1.2.3