NstPpu: Make fast 0x2007 reads of palette RAM more accurate

This commit is contained in:
Rupert Carmichael
2025-10-12 13:38:45 -04:00
parent 21a98cbe7e
commit c0d6d9e6d6

View File

@@ -1069,21 +1069,22 @@ namespace Nes
if ((address & 0x3F00) == 0x3F00) // Palette
{
if (fastread)
{
io.latch = cache;
}
io.latch = (io.latch & 0xC0) | (palette.ram[address & 0x1F] & Coloring());
mask = 0x3F;
}
else // Non-Palette
{
io.latch = io.buffer;
io.latch = fastread ? cache : io.buffer;
}
UpdateDecay(mask);
io.buffer = (address >= 0x2000 ? nmt.FetchName( address ) : chr.FetchPattern( address ));
if (fastread)
io.latch = cache;
return io.latch;
}