Rework video memory handling to cater for open bus and VRAM address wrapping. Fixes more hangs with Trio64 and Windows 95.

This commit is contained in:
SarahW 2017-10-22 12:41:10 +01:00
commit 39a68d757b
10 changed files with 174 additions and 117 deletions

View file

@ -554,7 +554,7 @@ void et4000w32p_mmu_write(uint32_t addr, uint8_t val, void *p)
}
else
{
if ((addr&0x1fff) + et4000->mmu.base[bank] < svga->vram_limit)
if ((addr&0x1fff) + et4000->mmu.base[bank] < svga->vram_max)
{
svga->vram[(addr & 0x1fff) + et4000->mmu.base[bank]] = val;
svga->changedvram[((addr & 0x1fff) + et4000->mmu.base[bank]) >> 12] = changeframecount;
@ -614,7 +614,7 @@ uint8_t et4000w32p_mmu_read(uint32_t addr, void *p)
/*???*/
return temp;
}
if ((addr&0x1fff) + et4000->mmu.base[bank] >= svga->vram_limit)
if ((addr&0x1fff) + et4000->mmu.base[bank] >= svga->vram_max)
return 0xff;
return svga->vram[(addr&0x1fff) + et4000->mmu.base[bank]];