diff options
| author | 2025-07-08 10:33:59 +0200 | |
|---|---|---|
| committer | 2025-07-08 10:34:08 +0200 | |
| commit | e497d8f799dca15cf24ad2f0d334c9909de968c3 (patch) | |
| tree | b4638fb1e7ac54882abfbe1edd4d528fd5b0cd53 | |
| parent | e6f589f8ff6348ccb2ebec8bd34c0acfa0e25e76 (diff) | |
cps1: re-add cpu space map for irqack
| -rw-r--r-- | src/mame/capcom/cps1.cpp | 22 | ||||
| -rw-r--r-- | src/mame/capcom/cps1.h | 2 | ||||
| -rw-r--r-- | src/mame/capcom/cps2.cpp | 1 |
3 files changed, 21 insertions, 4 deletions
diff --git a/src/mame/capcom/cps1.cpp b/src/mame/capcom/cps1.cpp index d31a1028956..56c26fd3a4a 100644 --- a/src/mame/capcom/cps1.cpp +++ b/src/mame/capcom/cps1.cpp @@ -348,7 +348,7 @@ INTERRUPT_GEN_MEMBER(cps_state::cps1_interrupt) /* Strider also has a IRQ4 handler. It is input port related, but the game */ /* works without it. It is the *only* CPS1 game to have that. */ /* ...until we found out that ganbare relies on it, see below */ - device.execute().set_input_line(M68K_IRQ_IPL1, HOLD_LINE); + device.execute().set_input_line(M68K_IRQ_IPL1, ASSERT_LINE); } /* @@ -366,7 +366,6 @@ Strider has a handler but no h/w support to call IRQ4, perhaps a remnant of some dev tool? And particularly on CPS2, CPS-B-21 triggers raster interrupts. - */ TIMER_DEVICE_CALLBACK_MEMBER(cps_state::raster_scanline) { @@ -392,17 +391,31 @@ TIMER_DEVICE_CALLBACK_MEMBER(cps_state::raster_scanline) // vblank interrupt on IPL1 (IRQ2) if (scanline == 240) - m_maincpu->set_input_line(M68K_IRQ_IPL1, HOLD_LINE); + m_maincpu->set_input_line(M68K_IRQ_IPL1, ASSERT_LINE); } TIMER_CALLBACK_MEMBER(cps_state::raster_irq) { - m_maincpu->set_input_line(M68K_IRQ_IPL2, HOLD_LINE); + m_maincpu->set_input_line(M68K_IRQ_IPL2, ASSERT_LINE); // note: normally it's vpos - 1, but let's give it some time before it actually writes to gfx registers m_screen->update_partial(m_screen->vpos()); } +uint16_t cps_state::irqack_r(offs_t offset) +{ + // FC0-FC2(any) + BGACK: VPA and clears both IPL1 and IPL2 + m_maincpu->set_input_line(M68K_IRQ_IPL1, CLEAR_LINE); + m_maincpu->set_input_line(M68K_IRQ_IPL2, CLEAR_LINE); + + return m68000_base_device::autovector(offset + 1); +} + +void cps_state::cpu_space_map(address_map &map) +{ + map(0xfffff2, 0xffffff).r(FUNC(cps_state::irqack_r)); +} + /******************************************************************** * @@ -3927,6 +3940,7 @@ void cps_state::cps1_10MHz(machine_config &config) M68000(config, m_maincpu, XTAL(10'000'000)); /* verified on pcb */ m_maincpu->set_interrupt_mixer(false); m_maincpu->set_addrmap(AS_PROGRAM, &cps_state::main_map); + m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &cps_state::cpu_space_map); m_maincpu->set_vblank_int("screen", FUNC(cps_state::cps1_interrupt)); Z80(config, m_audiocpu, XTAL(3'579'545)); /* verified on pcb */ diff --git a/src/mame/capcom/cps1.h b/src/mame/capcom/cps1.h index 8716eb6963e..df723116cbc 100644 --- a/src/mame/capcom/cps1.h +++ b/src/mame/capcom/cps1.h @@ -220,6 +220,7 @@ protected: INTERRUPT_GEN_MEMBER(cps1_interrupt); TIMER_DEVICE_CALLBACK_MEMBER(raster_scanline); TIMER_CALLBACK_MEMBER(raster_irq); + uint16_t irqack_r(offs_t offset); virtual void render_layers(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_cps1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); @@ -230,6 +231,7 @@ protected: /* maps */ void main_map(address_map &map) ATTR_COLD; + void cpu_space_map(address_map &map) ATTR_COLD; void forgottn_map(address_map &map) ATTR_COLD; void qsound_main_map(address_map &map) ATTR_COLD; void qsound_decrypted_opcodes_map(address_map &map) ATTR_COLD; diff --git a/src/mame/capcom/cps2.cpp b/src/mame/capcom/cps2.cpp index 674c0328a3a..63fd697f94a 100644 --- a/src/mame/capcom/cps2.cpp +++ b/src/mame/capcom/cps2.cpp @@ -1820,6 +1820,7 @@ void cps2_state::cps2(machine_config &config) m_maincpu->set_interrupt_mixer(false); m_maincpu->set_addrmap(AS_PROGRAM, &cps2_state::cps2_map); m_maincpu->set_addrmap(AS_OPCODES, &cps2_state::decrypted_opcodes_map); + m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &cps2_state::cpu_space_map); TIMER(config, "scantimer").configure_scanline(FUNC(cps2_state::raster_scanline), "screen", 0, 1); |
