summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/spg2xx.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/machine/spg2xx.cpp')
-rw-r--r--src/devices/machine/spg2xx.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/devices/machine/spg2xx.cpp b/src/devices/machine/spg2xx.cpp
index 804cafe4f76..2f77789df22 100644
--- a/src/devices/machine/spg2xx.cpp
+++ b/src/devices/machine/spg2xx.cpp
@@ -86,6 +86,7 @@ void spg2xx_device::device_start()
save_item(NAME(m_sprite_limit));
save_item(NAME(m_pal_flag));
+ save_item(NAME(m_fiq_vector));
}
void spg2xx_device::device_reset()
@@ -93,9 +94,21 @@ void spg2xx_device::device_reset()
unsp_device::device_reset();
}
+WRITE8_MEMBER(spg2xx_device::fiq_vector_w)
+{
+ m_fiq_vector = data;
+}
+
WRITE_LINE_MEMBER(spg2xx_device::videoirq_w)
{
- set_state_unsynced(UNSP_IRQ0_LINE, state);
+ if (m_fiq_vector == 0)
+ {
+ set_state_unsynced(UNSP_FIQ_LINE, state);
+ }
+ else
+ {
+ set_state_unsynced(UNSP_IRQ0_LINE, state);
+ }
}
WRITE_LINE_MEMBER(spg2xx_device::timerirq_w)
@@ -156,6 +169,7 @@ void spg2xx_device::configure_spg_io(spg2xx_io_device* io)
io->write_external_irq_callback().set(FUNC(spg2xx_device::extirq_w));
io->write_ffrq_tmr1_irq_callback().set(FUNC(spg2xx_device::ffreq1_w));
io->write_ffrq_tmr2_irq_callback().set(FUNC(spg2xx_device::ffreq2_w));
+ io->write_fiq_vector_callback().set(FUNC(spg2xx_device::fiq_vector_w));
}
void spg24x_device::device_add_mconfig(machine_config &config)