Mednafen Members Members   Search Search   Help Help   Register Register   Login Login   Home Home
Home » Mednafen » Development » [NES] Extend PPU Memory
Show: Today's Messages  :: Show Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
[NES] Extend PPU Memory [message #4905] Thu, 16 March 2017 06:14
doomday45  [PM]
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]

  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic:MedAdvCFG v0.4.2-r50 (Mednafen v1.x Frontend) by Nigel Todman (www.NigelTodman.com) UPD:02-05-2019
Next Topic:Request: add support for sdl-2.0.2 and sdl-2.0.4 in mednafen 1.2.X
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ ]

Current Time: Sat May 4 19:51:02 CDT 2024
.:: Contact :: Home ::.

Powered by FUDforum.
Copyright © FUDforum Bulletin Board Software