summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatarGravatar MooglyGuy <therealmogminer@gmail.com>2019-01-15 16:26:55 +0100
committerGravatarGravatar MooglyGuy <therealmogminer@gmail.com>2019-01-15 16:26:55 +0100
commit2ead3aa7a8ca500e039e8ee40a75604d670aae41 (patch) (github)
treef353505ac8febdf30f4299094385c505c1eb79fc
parent9d43733aa57819bb2b857f8ad3961f450a24be1c (diff)
downloadmame-2ead3aa7a8ca500e039e8ee40a75604d670aae41.tar.bz2
mame-2ead3aa7a8ca500e039e8ee40a75604d670aae41.zip
-spg2xx: Suppress video IRQ status bits when the corresponding enable bit is unset. Fixes vsmile fred and appilote. [Ryan Holtz]
-rw-r--r--src/devices/machine/spg2xx.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/devices/machine/spg2xx.cpp b/src/devices/machine/spg2xx.cpp
index 7ce861f65ae..54568c5c559 100644
--- a/src/devices/machine/spg2xx.cpp
+++ b/src/devices/machine/spg2xx.cpp
@@ -965,12 +965,12 @@ WRITE_LINE_MEMBER(spg2xx_device::vblank)
}
#endif
- const uint16_t old = VIDEO_IRQ_ENABLE & VIDEO_IRQ_STATUS;
- VIDEO_IRQ_STATUS |= 1;
- LOGMASKED(LOG_IRQS, "Setting video IRQ status to %04x\n", VIDEO_IRQ_STATUS);
- const uint16_t changed = old ^ (VIDEO_IRQ_ENABLE & VIDEO_IRQ_STATUS);
- if (changed)
+ if (VIDEO_IRQ_ENABLE & 1)
+ {
+ VIDEO_IRQ_STATUS |= 1;
+ LOGMASKED(LOG_IRQS, "Setting video IRQ status to %04x\n", VIDEO_IRQ_STATUS);
check_video_irq();
+ }
}
void spg2xx_device::check_video_irq()
@@ -1869,11 +1869,9 @@ void spg2xx_device::device_timer(emu_timer &timer, device_timer_id id, int param
case TIMER_SCREENPOS:
{
- const uint16_t old = VIDEO_IRQ_ENABLE & VIDEO_IRQ_STATUS;
- VIDEO_IRQ_STATUS |= 2;
- const uint16_t changed = old ^ (VIDEO_IRQ_ENABLE & VIDEO_IRQ_STATUS);
- if (changed)
+ if (VIDEO_IRQ_ENABLE & 2)
{
+ VIDEO_IRQ_STATUS |= 2;
check_video_irq();
}
m_screen->update_partial(m_screen->vpos());