Fixed (S)VGA video RAM masking, fixes Commander Keen 4 and 5;
(S)VGA overscan is now only calculated from the row count if overscan is enabled.
This commit is contained in:
@@ -11,7 +11,7 @@
|
|||||||
* This is intended to be used by another SVGA driver,
|
* This is intended to be used by another SVGA driver,
|
||||||
* and not as a card in it's own right.
|
* and not as a card in it's own right.
|
||||||
*
|
*
|
||||||
* Version: @(#)vid_svga.c 1.0.14 2018/01/21
|
* Version: @(#)vid_svga.c 1.0.15 2018/01/24
|
||||||
*
|
*
|
||||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||||
* Miran Grca, <mgrca8@gmail.com>
|
* Miran Grca, <mgrca8@gmail.com>
|
||||||
@@ -596,6 +596,7 @@ void svga_recalctimings(svga_t *svga)
|
|||||||
|
|
||||||
svga->linedbl = svga->crtc[9] & 0x80;
|
svga->linedbl = svga->crtc[9] & 0x80;
|
||||||
svga->rowcount = svga->crtc[9] & 31;
|
svga->rowcount = svga->crtc[9] & 31;
|
||||||
|
if (enable_overscan) {
|
||||||
overscan_y = (svga->rowcount + 1) << 1;
|
overscan_y = (svga->rowcount + 1) << 1;
|
||||||
if (svga->seqregs[1] & 8) /*Low res (320)*/
|
if (svga->seqregs[1] & 8) /*Low res (320)*/
|
||||||
{
|
{
|
||||||
@@ -605,6 +606,7 @@ void svga_recalctimings(svga_t *svga)
|
|||||||
{
|
{
|
||||||
overscan_y = 16;
|
overscan_y = 16;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/* pclog("SVGA row count: %i (scroll: %i)\n", svga->rowcount, svga->crtc[8] & 0x1f); */
|
/* pclog("SVGA row count: %i (scroll: %i)\n", svga->rowcount, svga->crtc[8] & 0x1f); */
|
||||||
if (svga->recalctimings_ex)
|
if (svga->recalctimings_ex)
|
||||||
svga->recalctimings_ex(svga);
|
svga->recalctimings_ex(svga);
|
||||||
@@ -643,7 +645,7 @@ uint32_t svga_mask_addr(uint32_t addr, svga_t *svga)
|
|||||||
{
|
{
|
||||||
limit_shift = 1;
|
limit_shift = 1;
|
||||||
}
|
}
|
||||||
return addr % (svga->vram_display_mask >> limit_shift);
|
return addr & (svga->vram_display_mask >> limit_shift);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t svga_mask_changedaddr(uint32_t addr, svga_t *svga)
|
uint32_t svga_mask_changedaddr(uint32_t addr, svga_t *svga)
|
||||||
|
Reference in New Issue
Block a user