[NES] Extend PPU Memory [message #4905] |
Thu, 16 March 2017 06:14 |
|
How I can extend PPU memory? I mean to extend from $0000-$4000 to $0000-$5000, I set Vpage[8] and Vpager[8] to [20]. And did added check for $2007 port. I can read $4000-4fff memory now, but I cant write to this memory. Its strange, because in Fceux I can write to $4000-$4fff, but can't read (VPage overflow?). I did extended debugger mode for PPU mode - $4000-4fff contain garbage.
ppu.cpp:
static DECLFW(B2007)
uint32 tmp = RefreshAddr;
MDFNPPU_LineUpdate();
if (PPU_hook) PPU_hook(RefreshAddr);
if (tmp < 0x2000 || (tmp > 0x3fff && tmp < 0x5000)) {
if (PPUCHRRAM & (1 << (tmp >> 10)))
VPage[tmp >> 10][tmp] = V;
} else if (tmp < 0x3F00) {
if (PPUNTARAM & (1 << ((tmp & 0xF00) >> 10)))
vnapage[((tmp & 0xF00) >> 10)][tmp & 0x3FF] = V;
} else {
tmp &= (tmp & 3)? 0xFF : 0x0C;
PALRAM[tmp] = PALRAMCache[tmp] = V & 0x3F;
}
AB2007Inc();
}
upd. //if (PPUCHRRAM & (1 << (tmp >> 10))) Solved!
[Updated on: Fri, 17 March 2017 23:29]
|
|