Always decode CRTC index bit 5 on VGA compatibles. Fixes Joe Montana Football.
This commit is contained in:
parent
d6b74b945b
commit
4ba11c5a13
4 changed files with 26 additions and 10 deletions
|
|
@ -38,9 +38,11 @@ void oti067_out(uint16_t addr, uint8_t val, void *p)
|
|||
switch (addr)
|
||||
{
|
||||
case 0x3D4:
|
||||
svga->crtcreg = val & 31;
|
||||
svga->crtcreg = val & 0x3f;
|
||||
return;
|
||||
case 0x3D5:
|
||||
if (svga->crtcreg & 0x20)
|
||||
return;
|
||||
if ((svga->crtcreg < 7) && (svga->crtc[0x11] & 0x80))
|
||||
return;
|
||||
if ((svga->crtcreg == 7) && (svga->crtc[0x11] & 0x80))
|
||||
|
|
@ -99,7 +101,10 @@ uint8_t oti067_in(uint16_t addr, void *p)
|
|||
temp = svga->crtcreg;
|
||||
break;
|
||||
case 0x3D5:
|
||||
temp = svga->crtc[svga->crtcreg];
|
||||
if (svga->crtcreg & 0x20)
|
||||
temp = 0xff;
|
||||
else
|
||||
temp = svga->crtc[svga->crtcreg];
|
||||
break;
|
||||
|
||||
case 0x3DE:
|
||||
|
|
|
|||
|
|
@ -110,12 +110,11 @@ void paradise_out(uint16_t addr, uint8_t val, void *p)
|
|||
break;
|
||||
|
||||
case 0x3D4:
|
||||
if (paradise->type == PVGA1A)
|
||||
svga->crtcreg = val & 0x1f;
|
||||
else
|
||||
svga->crtcreg = val & 0x3f;
|
||||
svga->crtcreg = val & 0x3f;
|
||||
return;
|
||||
case 0x3D5:
|
||||
if ((paradise->type == PVGA1A) && (svga->crtcreg & 0x20))
|
||||
return;
|
||||
if ((svga->crtcreg < 7) && (svga->crtc[0x11] & 0x80))
|
||||
return;
|
||||
if ((svga->crtcreg == 7) && (svga->crtc[0x11] & 0x80))
|
||||
|
|
@ -191,6 +190,8 @@ uint8_t paradise_in(uint16_t addr, void *p)
|
|||
case 0x3D4:
|
||||
return svga->crtcreg;
|
||||
case 0x3D5:
|
||||
if ((paradise->type == PVGA1A) && (svga->crtcreg & 0x20))
|
||||
return 0xff;
|
||||
if (svga->crtcreg > 0x29 && svga->crtcreg < 0x30 && (svga->crtc[0x29] & 0x88) != 0x80)
|
||||
return 0xff;
|
||||
return svga->crtc[svga->crtcreg];
|
||||
|
|
|
|||
|
|
@ -42,9 +42,11 @@ void ps1_m2121_svga_out(uint16_t addr, uint8_t val, void *p)
|
|||
switch (addr)
|
||||
{
|
||||
case 0x3D4:
|
||||
svga->crtcreg = val & 0x1f;
|
||||
svga->crtcreg = val & 0x3f;
|
||||
return;
|
||||
case 0x3D5:
|
||||
if (svga->crtcreg & 0x20)
|
||||
return;
|
||||
if ((svga->crtcreg < 7) && (svga->crtc[0x11] & 0x80))
|
||||
return;
|
||||
if ((svga->crtcreg == 7) && (svga->crtc[0x11] & 0x80))
|
||||
|
|
@ -104,7 +106,10 @@ uint8_t ps1_m2121_svga_in(uint16_t addr, void *p)
|
|||
temp = svga->crtcreg;
|
||||
break;
|
||||
case 0x3D5:
|
||||
temp = svga->crtc[svga->crtcreg];
|
||||
if (svga->crtcreg & 0x20)
|
||||
temp = 0xff;
|
||||
else
|
||||
temp = svga->crtc[svga->crtcreg];
|
||||
break;
|
||||
|
||||
case 0x2108:
|
||||
|
|
|
|||
|
|
@ -30,9 +30,11 @@ void vga_out(uint16_t addr, uint8_t val, void *p)
|
|||
switch (addr)
|
||||
{
|
||||
case 0x3D4:
|
||||
svga->crtcreg = val & 0x1f;
|
||||
svga->crtcreg = val & 0x3f;
|
||||
return;
|
||||
case 0x3D5:
|
||||
if (svga->crtcreg & 0x20)
|
||||
return;
|
||||
if ((svga->crtcreg < 7) && (svga->crtc[0x11] & 0x80))
|
||||
return;
|
||||
if ((svga->crtcreg == 7) && (svga->crtc[0x11] & 0x80))
|
||||
|
|
@ -69,7 +71,10 @@ uint8_t vga_in(uint16_t addr, void *p)
|
|||
temp = svga->crtcreg;
|
||||
break;
|
||||
case 0x3D5:
|
||||
temp = svga->crtc[svga->crtcreg];
|
||||
if (svga->crtcreg & 0x20)
|
||||
temp = 0xff;
|
||||
else
|
||||
temp = svga->crtc[svga->crtcreg];
|
||||
break;
|
||||
default:
|
||||
temp = svga_in(addr, svga);
|
||||
|
|
|
|||
Loading…
Reference in a new issue