Enabled write to CRTC R7 bit 4 when protection is enabled - fixes scrolling on DOS/V 6.2.
This commit is contained in:
parent
e00e489d5a
commit
6a72839c59
13 changed files with 51 additions and 14 deletions
|
|
@ -60,7 +60,10 @@ void ati18800_out(uint16_t addr, uint8_t val, void *p)
|
|||
svga->crtcreg = val & 0x3f;
|
||||
return;
|
||||
case 0x3D5:
|
||||
if (svga->crtcreg <= 7 && svga->crtc[0x11] & 0x80) return;
|
||||
if ((svga->crtcreg < 7) && (svga->crtc[0x11] & 0x80))
|
||||
return;
|
||||
if ((svga->crtcreg == 7) && (svga->crtc[0x11] & 0x80))
|
||||
val = (svga->crtc[7] & ~0x10) | (val & 0x10);
|
||||
old = svga->crtc[svga->crtcreg];
|
||||
svga->crtc[svga->crtcreg] = val;
|
||||
if (old != val)
|
||||
|
|
|
|||
|
|
@ -62,7 +62,10 @@ void ati28800_out(uint16_t addr, uint8_t val, void *p)
|
|||
svga->crtcreg = val & 0x3f;
|
||||
return;
|
||||
case 0x3D5:
|
||||
if (svga->crtcreg <= 7 && svga->crtc[0x11] & 0x80) return;
|
||||
if ((svga->crtcreg < 7) && (svga->crtc[0x11] & 0x80))
|
||||
return;
|
||||
if ((svga->crtcreg == 7) && (svga->crtc[0x11] & 0x80))
|
||||
val = (svga->crtc[7] & ~0x10) | (val & 0x10);
|
||||
old = svga->crtc[svga->crtcreg];
|
||||
svga->crtc[svga->crtcreg] = val;
|
||||
if (old != val)
|
||||
|
|
|
|||
|
|
@ -245,7 +245,10 @@ void mach64_out(uint16_t addr, uint8_t val, void *p)
|
|||
svga->crtcreg = val & 0x1f;
|
||||
return;
|
||||
case 0x3D5:
|
||||
if (svga->crtcreg <= 7 && svga->crtc[0x11] & 0x80) return;
|
||||
if ((svga->crtcreg < 7) && (svga->crtc[0x11] & 0x80))
|
||||
return;
|
||||
if ((svga->crtcreg == 7) && (svga->crtc[0x11] & 0x80))
|
||||
val = (svga->crtc[7] & ~0x10) | (val & 0x10);
|
||||
if (svga->crtcreg > 0x18)
|
||||
return;
|
||||
old = svga->crtc[svga->crtcreg];
|
||||
|
|
|
|||
|
|
@ -141,7 +141,10 @@ void gd5429_out(uint16_t addr, uint8_t val, void *p)
|
|||
svga->crtcreg = val & 0x3f;
|
||||
return;
|
||||
case 0x3D5:
|
||||
if (svga->crtcreg <= 7 && svga->crtc[0x11] & 0x80) return;
|
||||
if ((svga->crtcreg < 7) && (svga->crtc[0x11] & 0x80))
|
||||
return;
|
||||
if ((svga->crtcreg == 7) && (svga->crtc[0x11] & 0x80))
|
||||
val = (svga->crtc[7] & ~0x10) | (val & 0x10);
|
||||
old = svga->crtc[svga->crtcreg];
|
||||
svga->crtc[svga->crtcreg] = val;
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,10 @@ void et4000_out(uint16_t addr, uint8_t val, void *p)
|
|||
svga->crtcreg = val & 0x3f;
|
||||
return;
|
||||
case 0x3D5:
|
||||
if (svga->crtcreg <= 7 && svga->crtc[0x11] & 0x80) return;
|
||||
if ((svga->crtcreg < 7) && (svga->crtc[0x11] & 0x80))
|
||||
return;
|
||||
if ((svga->crtcreg == 7) && (svga->crtc[0x11] & 0x80))
|
||||
val = (svga->crtc[7] & ~0x10) | (val & 0x10);
|
||||
old = svga->crtc[svga->crtcreg];
|
||||
val &= crtc_mask[svga->crtcreg];
|
||||
svga->crtc[svga->crtcreg] = val;
|
||||
|
|
|
|||
|
|
@ -127,7 +127,10 @@ void et4000w32p_out(uint16_t addr, uint8_t val, void *p)
|
|||
return;
|
||||
case 0x3D5:
|
||||
// pclog("Write CRTC R%02X %02X\n", crtcreg, val);
|
||||
if (svga->crtcreg <= 7 && svga->crtc[0x11] & 0x80) return;
|
||||
if ((svga->crtcreg < 7) && (svga->crtc[0x11] & 0x80))
|
||||
return;
|
||||
if ((svga->crtcreg == 7) && (svga->crtc[0x11] & 0x80))
|
||||
val = (svga->crtc[7] & ~0x10) | (val & 0x10);
|
||||
old = svga->crtc[svga->crtcreg];
|
||||
svga->crtc[svga->crtcreg] = val;
|
||||
if (old != val)
|
||||
|
|
|
|||
|
|
@ -38,7 +38,10 @@ void oti067_out(uint16_t addr, uint8_t val, void *p)
|
|||
svga->crtcreg = val & 31;
|
||||
return;
|
||||
case 0x3D5:
|
||||
if (svga->crtcreg <= 7 && svga->crtc[0x11] & 0x80) return;
|
||||
if ((svga->crtcreg < 7) && (svga->crtc[0x11] & 0x80))
|
||||
return;
|
||||
if ((svga->crtcreg == 7) && (svga->crtc[0x11] & 0x80))
|
||||
val = (svga->crtc[7] & ~0x10) | (val & 0x10);
|
||||
old = svga->crtc[svga->crtcreg];
|
||||
svga->crtc[svga->crtcreg] = val;
|
||||
if (old != val)
|
||||
|
|
|
|||
|
|
@ -114,8 +114,10 @@ void paradise_out(uint16_t addr, uint8_t val, void *p)
|
|||
svga->crtcreg = val & 0x3f;
|
||||
return;
|
||||
case 0x3D5:
|
||||
if (svga->crtcreg <= 7 && svga->crtc[0x11] & 0x80)
|
||||
return;
|
||||
if ((svga->crtcreg < 7) && (svga->crtc[0x11] & 0x80))
|
||||
return;
|
||||
if ((svga->crtcreg == 7) && (svga->crtc[0x11] & 0x80))
|
||||
val = (svga->crtc[7] & ~0x10) | (val & 0x10);
|
||||
if (svga->crtcreg > 0x29 && (svga->crtc[0x29] & 7) != 5)
|
||||
return;
|
||||
if (svga->crtcreg >= 0x31 && svga->crtcreg <= 0x37)
|
||||
|
|
|
|||
|
|
@ -141,7 +141,10 @@ void s3_out(uint16_t addr, uint8_t val, void *p)
|
|||
svga->crtcreg = val & 0x7f;
|
||||
return;
|
||||
case 0x3D5:
|
||||
if (svga->crtcreg <= 7 && svga->crtc[0x11] & 0x80) return;
|
||||
if ((svga->crtcreg < 7) && (svga->crtc[0x11] & 0x80))
|
||||
return;
|
||||
if ((svga->crtcreg == 7) && (svga->crtc[0x11] & 0x80))
|
||||
val = (svga->crtc[7] & ~0x10) | (val & 0x10);
|
||||
if (svga->crtcreg >= 0x20 && svga->crtcreg != 0x38 && (svga->crtc[0x38] & 0xcc) != 0x48) return;
|
||||
old = svga->crtc[svga->crtcreg];
|
||||
svga->crtc[svga->crtcreg] = val;
|
||||
|
|
|
|||
|
|
@ -277,8 +277,10 @@ static void s3_virge_out(uint16_t addr, uint8_t val, void *p)
|
|||
return;
|
||||
case 0x3d5:
|
||||
//pclog("Write CRTC R%02X %02X %04x(%08x):%08x\n", svga->crtcreg, val, CS, cs, pc);
|
||||
if (svga->crtcreg <= 7 && svga->crtc[0x11] & 0x80)
|
||||
if ((svga->crtcreg < 7) && (svga->crtc[0x11] & 0x80))
|
||||
return;
|
||||
if ((svga->crtcreg == 7) && (svga->crtc[0x11] & 0x80))
|
||||
val = (svga->crtc[7] & ~0x10) | (val & 0x10);
|
||||
if (svga->crtcreg >= 0x20 && svga->crtcreg != 0x38 && (svga->crtc[0x38] & 0xcc) != 0x48)
|
||||
return;
|
||||
if (svga->crtcreg >= 0x80)
|
||||
|
|
|
|||
|
|
@ -161,7 +161,10 @@ void tgui_out(uint16_t addr, uint8_t val, void *p)
|
|||
svga->crtcreg = val & 0x7f;
|
||||
return;
|
||||
case 0x3D5:
|
||||
if (svga->crtcreg <= 7 && svga->crtc[0x11] & 0x80) return;
|
||||
if ((svga->crtcreg < 7) && (svga->crtc[0x11] & 0x80))
|
||||
return;
|
||||
if ((svga->crtcreg == 7) && (svga->crtc[0x11] & 0x80))
|
||||
val = (svga->crtc[7] & ~0x10) | (val & 0x10);
|
||||
old = svga->crtc[svga->crtcreg];
|
||||
svga->crtc[svga->crtcreg] = val;
|
||||
// if (svga->crtcreg != 0xE && svga->crtcreg != 0xF) pclog("CRTC R%02X = %02X\n", svga->crtcreg, val);
|
||||
|
|
|
|||
|
|
@ -110,7 +110,10 @@ void tvga_out(uint16_t addr, uint8_t val, void *p)
|
|||
svga->crtcreg = val & 0x3f;
|
||||
return;
|
||||
case 0x3D5:
|
||||
if (svga->crtcreg <= 7 && svga->crtc[0x11] & 0x80) return;
|
||||
if ((svga->crtcreg < 7) && (svga->crtc[0x11] & 0x80))
|
||||
return;
|
||||
if ((svga->crtcreg == 7) && (svga->crtc[0x11] & 0x80))
|
||||
val = (svga->crtc[7] & ~0x10) | (val & 0x10);
|
||||
old = svga->crtc[svga->crtcreg];
|
||||
val &= crtc_mask[svga->crtcreg];
|
||||
svga->crtc[svga->crtcreg] = val;
|
||||
|
|
|
|||
|
|
@ -33,7 +33,10 @@ void vga_out(uint16_t addr, uint8_t val, void *p)
|
|||
svga->crtcreg = val & 0x1f;
|
||||
return;
|
||||
case 0x3D5:
|
||||
if (svga->crtcreg <= 7 && svga->crtc[0x11] & 0x80) return;
|
||||
if ((svga->crtcreg < 7) && (svga->crtc[0x11] & 0x80))
|
||||
return;
|
||||
if ((svga->crtcreg == 7) && (svga->crtc[0x11] & 0x80))
|
||||
val = (svga->crtc[7] & ~0x10) | (val & 0x10);
|
||||
old = svga->crtc[svga->crtcreg];
|
||||
svga->crtc[svga->crtcreg] = val;
|
||||
if (old != val)
|
||||
|
|
|
|||
Loading…
Reference in a new issue