(S)VGA: Increment CRTC address just before it needs to be used

This gives more likely behaviour when one loads more often than the address is incremented.
The behaviour matches an Intel GMA 4500MHD (2008) which is the earliest hardware I'm able to test right now.
This commit is contained in:
GreaseMonkey
2023-11-21 19:25:26 +13:00
parent 2166ae0fb7
commit 81b8150a6b

View File

@@ -569,14 +569,12 @@ svga_render_indexed_gfx(svga_t *svga, bool highres, bool combine8bits)
load_counter = 0;
}
if (incr_counter == 0) {
svga->ma += 4;
// DISCREPANCY TODO FIXME 2/4bpp used vram_mask, 8bpp used vram_display_mask --GM
svga->ma &= svga->vram_display_mask;
}
incr_counter += 1;
if (incr_counter >= incevery) {
incr_counter = 0;
svga->ma += 4;
// DISCREPANCY TODO FIXME 2/4bpp used vram_mask, 8bpp used vram_display_mask --GM
svga->ma &= svga->vram_display_mask;
}
//