Ported the 128K mapping fixes to 86Box.

This commit is contained in:
TC1995
2020-11-28 23:52:04 +01:00
parent 4e46d17176
commit 54c1ea2e3b
3 changed files with 19 additions and 1 deletions

View File

@@ -245,6 +245,15 @@ et4000_out(uint16_t addr, uint8_t val, void *priv)
svga->read_bank = ((dev->banking >> 4) & 0x0f) * 0x10000;
} else
svga->write_bank = svga->read_bank = 0;
old = svga->gdcreg[6];
svga_out(addr, val, svga);
if ((old & 0xc) != 0 && (val & 0xc) == 0)
{
/*override mask - ET4000 supports linear 128k at A0000*/
svga->banked_mask = 0x1ffff;
}
return;
}
break;

View File

@@ -454,7 +454,7 @@ void et4000w32p_recalcmapping(et4000w32p_t *et4000)
case 0x0: case 0x4: case 0x8: case 0xC: /*128k at A0000*/
mem_mapping_set_addr(&svga->mapping, 0xa0000, 0x20000);
mem_mapping_disable(&et4000->mmu_mapping);
svga->banked_mask = 0xffff;
svga->banked_mask = 0x1ffff;
break;
case 0x1: /*64k at A0000*/
mem_mapping_set_addr(&svga->mapping, 0xa0000, 0x10000);

View File

@@ -127,6 +127,15 @@ void tvga_out(uint16_t addr, uint8_t val, void *p)
case 0x3CF:
switch (svga->gdcaddr & 15)
{
case 0x6:
old = svga->gdcreg[6];
svga_out(addr, val, svga);
if ((old & 0xc) != 0 && (val & 0xc) == 0)
{
/*override mask - TVGA supports linear 128k at A0000*/
svga->banked_mask = 0x1ffff;
}
return;
case 0xE:
svga->gdcreg[0xe] = val ^ 2;
tvga->tvga_3d9 = svga->gdcreg[0xe] & 0xf;