mirror of
https://github.com/sarah-walker-pcem/pcem.git
synced 2025-07-23 11:43:03 +02:00
Implement VGA byte panning and cursor skew. Patch from Greatpsycho.
This commit is contained in:
@@ -264,6 +264,11 @@ void et4000k_recalctimings(svga_t *svga)
|
||||
|
||||
if (svga->render == svga_render_text_80 && ((svga->crtc[0x37] & 0x0A) == 0x0A))
|
||||
{
|
||||
if(et4000->port_32cb_val & 0x80)
|
||||
{
|
||||
svga->ma_latch -= 2;
|
||||
svga->ca_adj = -2;
|
||||
}
|
||||
if((et4000->port_32cb_val & 0xB4) == ((svga->crtc[0x37] & 3) == 2 ? 0xB4 : 0xB0))
|
||||
{
|
||||
svga->render = svga_render_text_80_ksc5601;
|
||||
|
@@ -322,7 +322,7 @@ void svga_recalctimings(svga_t *svga)
|
||||
if (svga->crtc[9] & 0x20) svga->vblankstart |= 0x200;
|
||||
svga->vblankstart++;
|
||||
|
||||
svga->hdisp = svga->crtc[1];
|
||||
svga->hdisp = svga->crtc[1] - ((svga->crtc[5] & 0x60) >> 5);
|
||||
svga->hdisp++;
|
||||
|
||||
svga->htotal = svga->crtc[0];
|
||||
@@ -336,7 +336,8 @@ void svga_recalctimings(svga_t *svga)
|
||||
|
||||
svga->interlace = 0;
|
||||
|
||||
svga->ma_latch = (svga->crtc[0xc] << 8) | svga->crtc[0xd];
|
||||
svga->ma_latch = ((svga->crtc[0xc] << 8) | svga->crtc[0xd]) + ((svga->crtc[8] & 0x60) >> 5);
|
||||
svga->ca_adj = 0;
|
||||
|
||||
svga->hdisp_time = svga->hdisp;
|
||||
svga->render = svga_render_blank;
|
||||
@@ -658,9 +659,9 @@ void svga_poll(void *p)
|
||||
changeframecount = svga->interlace ? 3 : 2;
|
||||
svga->vslines = 0;
|
||||
|
||||
if (svga->interlace && svga->oddeven) svga->ma = svga->maback = svga->ma_latch + (svga->rowoffset << 1);
|
||||
else svga->ma = svga->maback = svga->ma_latch;
|
||||
svga->ca = (svga->crtc[0xe] << 8) | svga->crtc[0xf];
|
||||
if (svga->interlace && svga->oddeven) svga->ma = svga->maback = svga->ma_latch + (svga->rowoffset << 1) + ((svga->crtc[5] & 0x60) >> 5);
|
||||
else svga->ma = svga->maback = svga->ma_latch + ((svga->crtc[5] & 0x60) >> 5);
|
||||
svga->ca = ((svga->crtc[0xe] << 8) | svga->crtc[0xf]) + ((svga->crtc[0xb] & 0x60) >> 5) + svga->ca_adj;
|
||||
|
||||
svga->ma <<= 2;
|
||||
svga->maback <<= 2;
|
||||
|
@@ -60,7 +60,7 @@ typedef struct svga_t
|
||||
int lowres, interlace;
|
||||
int linedbl, rowcount;
|
||||
double clock;
|
||||
uint32_t ma_latch;
|
||||
uint32_t ma_latch, ca_adj;
|
||||
int bpp;
|
||||
|
||||
uint64_t dispontime, dispofftime;
|
||||
|
Reference in New Issue
Block a user