MESS specific bug-fix, nw

This commit is contained in:
Angelo Salese 2011-12-27 15:28:28 +00:00
parent 48687df54a
commit 69c213e180

View File

@ -629,16 +629,14 @@ READ8_HANDLER( vga_port_03c0_r )
switch (offset)
{
case 1:
if (vga.attribute.state==0)
{
case 0:
data = vga.attribute.index;
}
else
{
if ((vga.attribute.index&0x1f)<sizeof(vga.attribute.data))
break;
case 1:
if( vga.attribute.index & 0x20) // protection bit
data = 0xff; // TODO: actually undefined
else if ((vga.attribute.index&0x1f)<sizeof(vga.attribute.data))
data=vga.attribute.data[vga.attribute.index&0x1f];
}
break;
case 2:
@ -766,6 +764,7 @@ WRITE8_HANDLER(vga_port_03c0_w)
}
else
{
if(!(vga.attribute.index & 0x20)) // protection bit
if ((vga.attribute.index&0x1f)<sizeof(vga.attribute.data))
vga.attribute.data[vga.attribute.index&0x1f]=data;
}