diff options
Diffstat (limited to 'src/mame/machine')
-rw-r--r-- | src/mame/machine/playch10.cpp | 10 | ||||
-rw-r--r-- | src/mame/machine/vsnes.cpp | 10 |
2 files changed, 20 insertions, 0 deletions
diff --git a/src/mame/machine/playch10.cpp b/src/mame/machine/playch10.cpp index 2c2c29a9ec3..80f67f75444 100644 --- a/src/mame/machine/playch10.cpp +++ b/src/mame/machine/playch10.cpp @@ -225,6 +225,16 @@ READ8_MEMBER(playch10_state::pc10_in1_r) /* no sprite hit (yet) */ ret |= 0x08; + // update the screen if necessary + if (!m_ppu->screen().vblank()) + { + int vpos = m_ppu->screen().vpos(); + int hpos = m_ppu->screen().hpos(); + + if (vpos > y || (vpos == y && hpos >= x)) + m_ppu->screen().update_now(); + } + /* get the pixel at the gun position */ rgb_t pix = m_ppu->screen().pixel(x, y); diff --git a/src/mame/machine/vsnes.cpp b/src/mame/machine/vsnes.cpp index f7595acba77..317608c8f55 100644 --- a/src/mame/machine/vsnes.cpp +++ b/src/mame/machine/vsnes.cpp @@ -375,6 +375,16 @@ WRITE8_MEMBER(vsnes_state::gun_in0_w) uint8_t realy = (int)y; + // update the screen if necessary + if (!m_ppu1->screen().vblank()) + { + int vpos = m_ppu1->screen().vpos(); + int hpos = m_ppu1->screen().hpos(); + + if (vpos > realy || (vpos == realy && hpos >= x)) + m_ppu1->screen().update_now(); + } + /* get the pixel at the gun position */ rgb_t col = m_ppu1->screen().pixel(x, realy); uint8_t bright = col.brightness(); |