Improved ET4000 CRTC emulation, Windows NT no longer misdetects ET4000/W32 or hangs.

This commit is contained in:
TomW 2014-07-28 20:32:56 +01:00
commit ff56f01516

View file

@ -21,6 +21,18 @@ typedef struct et4000_t
uint8_t banking;
} et4000_t;
static uint8_t crtc_mask[0x40] =
{
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
void et4000_out(uint16_t addr, uint8_t val, void *p)
{
et4000_t *et4000 = (et4000_t *)p;
@ -32,7 +44,7 @@ void et4000_out(uint16_t addr, uint8_t val, void *p)
addr ^= 0x60;
// pclog("ET4000 out %04X %02X\n", addr, val);
switch (addr)
{
case 0x3C6: case 0x3C7: case 0x3C8: case 0x3C9:
@ -51,6 +63,7 @@ void et4000_out(uint16_t addr, uint8_t val, void *p)
case 0x3D5:
if (svga->crtcreg <= 7 && svga->crtc[0x11] & 0x80) return;
old = svga->crtc[svga->crtcreg];
val &= crtc_mask[svga->crtcreg];
svga->crtc[svga->crtcreg] = val;
if (old != val)
{