From: kub Date: Wed, 7 Oct 2020 18:12:23 +0000 (+0200) Subject: vdp rendering, fix SAT caching for high addresses >64KB X-Git-Tag: v2.00~678 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3618d636d2d7a76c03bb0a92c9d83f7b7348ff0e;p=picodrive.git vdp rendering, fix SAT caching for high addresses >64KB --- diff --git a/pico/pico_int.h b/pico/pico_int.h index 86cfb778..1a2e408d 100644 --- a/pico/pico_int.h +++ b/pico/pico_int.h @@ -857,7 +857,7 @@ static __inline void VideoWriteVRAM(u32 a, u16 d) { PicoMem.vram [(u16)a >> 1] = d; - if (!((u16)(a^SATaddr) & SATmask)) + if (((a^SATaddr) & SATmask) == 0) UpdateSAT(a, d); } diff --git a/pico/videoport.c b/pico/videoport.c index fec862f7..c9221493 100644 --- a/pico/videoport.c +++ b/pico/videoport.c @@ -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