vdp rendering, fix SAT caching for high addresses >64KB

This commit is contained in:
kub 2020-10-07 20:12:23 +02:00
parent 3031ff347a
commit 3618d636d2
2 changed files with 4 additions and 4 deletions

View file

@ -334,7 +334,7 @@ static NOINLINE void VideoWriteVRAM128(u32 a, u16 d)
if (!((u16)(b^SATaddr) & SATmask))
Pico.est.rendstatus |= PDRAW_DIRTY_SPRITES;
if (!((u16)(a^SATaddr) & SATmask))
if (((a^SATaddr) & SATmask) == 0)
UpdateSAT(a, d);
}
@ -539,7 +539,7 @@ static void DmaCopy(int len)
for (; len; len--)
{
vr[(u16)a] = vr[(u16)(source++)];
if (!((u16)(a^SATaddr) & SATmask))
if (((a^SATaddr) & SATmask) == 0)
UpdateSAT(a, ((u16 *)vr)[(u16)a >> 1]);
// AutoIncrement
a = (a+inc) & ~0x20000;
@ -579,7 +579,7 @@ static NOINLINE void DmaFill(int data)
// Write upper byte to adjacent address
// (here we are byteswapped, so address is already 'adjacent')
vr[(u16)a] = high;
if (!((u16)(a^SATaddr) & SATmask))
if (((a^SATaddr) & SATmask) == 0)
UpdateSAT(a, ((u16 *)vr)[(u16)a >> 1]);
// Increment address register