video/upd7220.cpp: fix vsync timings and update_partial for graphics partition

This commit is contained in:
angelosa 2024-11-28 17:52:22 +01:00
parent c79d184620
commit 45187cefb3
2 changed files with 9 additions and 2 deletions

View File

@ -346,7 +346,12 @@ inline void upd7220_device::dequeue(uint8_t *data, int *flag)
inline void upd7220_device::update_vsync_timer(int state)
{
int next_y = state ? (m_vs + m_vbp) : 0;
const int vert_mult = (m_mode & UPD7220_MODE_INTERLACE_MASK) == UPD7220_MODE_INTERLACE_ON ? 2 : 1;
// page 6-68, route vsync so that top is start of back porch, end is at sync time
// (at bottom of MAME vpos() mechanism)
// - pc9801:lemmings and pc9801:spindiz2 cares
int next_y = state ? (m_vbp + m_al + m_vfp) * vert_mult : 0;
attotime duration = screen().time_until_pos(next_y, 0);
@ -1888,7 +1893,7 @@ void upd7220_device::update_graphics(bitmap_rgb32 &bitmap, const rectangle &clip
int yval = (y*zoom)+z + (bsy + m_vbp);
// pc9801:duel sets up bitmap layer with height 384 vs. 400 of text layer
// so we scissor here, interlace wants it bumped x2 (microbx2)
if(yval <= cliprect.bottom() && (yval - m_vbp) < m_al << interlace)
if(yval >= cliprect.top() && yval <= cliprect.bottom() && (yval - m_vbp) < m_al << interlace)
draw_graphics_line(bitmap, addr, yval, wd, pitch_shift);
}
}

View File

@ -847,6 +847,8 @@ void pc9801vm_state::pc9801rs_a0_w(offs_t offset, uint8_t data)
pal4bit(m_analog16.g[m_analog16.pal_entry]),
pal4bit(m_analog16.b[m_analog16.pal_entry])
);
// lemmings raster effects
m_screen->update_partial(m_screen->vpos());
return;
}