Romhacking.net

Romhacking => Newcomer's Board => Topic started by: cschifani on April 26, 2020, 12:19:08 pm

Title: Getting addresses in PRG ROM from CHR RAM or PPU
Post by: cschifani on April 26, 2020, 12:19:08 pm
If I know that Megaman IV stages have 1000 bytes of CHR data, and if I can find that data in either CHR RAM or PPU, how do I go about finding where that same data lives in the PRG ROM? Any advice you could share would be much appreciated.
Title: Re: Getting addresses in PRG ROM from CHR RAM or PPU
Post by: Cyneprepou4uk on April 27, 2020, 04:07:52 am
Use fceux emulator, open hex editor -> ppu memory, also open ppu viewer tool. Make a savestate. Then manually overwrite bytes in $0000-$1FFF area, look at ppu viewer and see what does it change exactly.

When you find what you're looking for, load a savestate with original bytes. Try to copy several bytes and search them in hex editor -> rom file. There can be several search results in theory, so either change bytes there and reset rom, and/or use code/data logger tool to see which bytes were read from rom.

For more precise search use debugger with write breakpoints for ppu memory. Bytes will be written via $2007 register.