EGA now renders at the correct size.
This commit is contained in:
@@ -454,7 +454,7 @@ void ega_recalctimings(ega_t *ega)
|
||||
|
||||
if (ega->crtc[7] & 1) ega->vtotal |= 0x100;
|
||||
if (ega->crtc[7] & 32) ega->vtotal |= 0x200;
|
||||
ega->vtotal++;
|
||||
ega->vtotal += 2;
|
||||
|
||||
if (ega->crtc[7] & 2) ega->dispend |= 0x100;
|
||||
if (ega->crtc[7] & 64) ega->dispend |= 0x200;
|
||||
@@ -466,7 +466,7 @@ void ega_recalctimings(ega_t *ega)
|
||||
|
||||
if (ega->crtc[7] & 0x10) ega->split |= 0x100;
|
||||
if (ega->crtc[9] & 0x40) ega->split |= 0x200;
|
||||
ega->split+=2;
|
||||
ega->split++;
|
||||
|
||||
ega->hdisp = ega->crtc[1];
|
||||
ega->hdisp++;
|
||||
@@ -572,6 +572,8 @@ void ega_poll(void *p)
|
||||
}
|
||||
|
||||
ega->displine++;
|
||||
if (ega->interlace)
|
||||
ega->displine++;
|
||||
if ((ega->stat & 8) && ((ega->displine & 15) == (ega->crtc[0x11] & 15)) && ega->vslines)
|
||||
ega->stat &= ~8;
|
||||
ega->vslines++;
|
||||
@@ -595,6 +597,8 @@ void ega_poll(void *p)
|
||||
ega->con = 0;
|
||||
|
||||
ega->maback += (ega->rowoffset << 3);
|
||||
if (ega->interlace)
|
||||
ega->maback += (ega->rowoffset << 3);
|
||||
ega->maback &= ega->vrammask;
|
||||
ega->ma = ega->maback;
|
||||
}
|
||||
@@ -631,10 +635,14 @@ void ega_poll(void *p)
|
||||
ega->stat |= 8;
|
||||
if (ega->seqregs[1] & 8) x = ega->hdisp * ((ega->seqregs[1] & 1) ? 8 : 9) * 2;
|
||||
else x = ega->hdisp * ((ega->seqregs[1] & 1) ? 8 : 9);
|
||||
|
||||
if (ega->interlace && !ega->oddeven) ega->lastline++;
|
||||
if (ega->interlace && ega->oddeven) ega->firstline--;
|
||||
|
||||
if ((x != xsize || (ega->lastline - ega->firstline) != ysize) || update_overscan)
|
||||
{
|
||||
xsize = x;
|
||||
ysize = ega->lastline - ega->firstline;
|
||||
ysize = ega->lastline - ega->firstline + 1;
|
||||
if (xsize < 64) xsize = 640;
|
||||
if (ysize < 32) ysize = 200;
|
||||
y_add = enable_overscan ? 14 : 0;
|
||||
@@ -714,7 +722,7 @@ void ega_poll(void *p)
|
||||
}
|
||||
}
|
||||
|
||||
video_blit_memtoscreen(32, 0, ega->firstline, ega->lastline + y_add_ex, xsize + x_add_ex, ega->lastline - ega->firstline + y_add_ex);
|
||||
video_blit_memtoscreen(32, 0, ega->firstline, ega->lastline + 1 + y_add_ex, xsize + x_add_ex, ega->lastline - ega->firstline + 1 + y_add_ex);
|
||||
|
||||
frames++;
|
||||
|
||||
@@ -754,6 +762,7 @@ void ega_poll(void *p)
|
||||
ega->vc = 0;
|
||||
ega->sc = 0;
|
||||
ega->dispon = 1;
|
||||
ega->displine = (ega->interlace && ega->oddeven) ? 1 : 0;
|
||||
ega->displine = 0;
|
||||
ega->scrollcache = ega->attrregs[0x13] & 7;
|
||||
}
|
||||
|
||||
@@ -1610,7 +1610,7 @@ void svga_doblit(int y1, int y2, int wx, int wy, svga_t *svga)
|
||||
return;
|
||||
}
|
||||
|
||||
if ((wx!=xsize || wy!=ysize) && !vid_resize)
|
||||
if (((wx!=xsize) || ((wy + 1)!=ysize)) && !vid_resize)
|
||||
{
|
||||
xsize=wx;
|
||||
ysize=wy+1;
|
||||
|
||||
Reference in New Issue
Block a user