This page is a mirror of Tepples' nesdev forum mirror (URL TBD).
Last updated on Oct-18-2019 Download

Hacking sprites?

Hacking sprites?
by on (#134422)
Hi folks,

So FCEUX makes hacking most nametable/tilemap-related stuff simple. I can open up the nametable viewer, set write breakpoints against PPU addresses and work backwards a few steps to easily figure out how a game knows where to write, say, each entry in a list of items, or where it draws a cursor.

Unfortunately, I've hit a problem where the cursor being drawn as a sprite, not a tile in the nametable. A quick glance through FCEUX options hasn't shown anything immediately useful re: figuring out where a particular sprite is being drawn to the screen, or even which sprite the cursor is. Can someone provide a jumping-off point for this information? It'd be very helpful.

Re: Hacking sprites?
by on (#134423)
What you want is an OAM viewer. NO$SNS and VisualBoyAdvance have one; I don't know whether FCEUX, NO$NES, and Nintendulator have one. But if you don't, you can always set a breakpoint on $4014 writes to see where the game keeps its display list. For example, writing $02 means the display list is at $0200-$02FF. Then you can follow along with the description of OAM data format on the wiki.
Re: Hacking sprites?
by on (#134426)
That's helpful, thanks!
Re: Hacking sprites?
by on (#134431)
Nintendulator will show you the contents of OAM visually in its video debug page.

You can put a breakpoint on a write to "sprite memory" in FCEUX, but this won't be very useful. You will probably just need to find a 256 byte page of (CPU) RAM that is being used for OAM DMA and inspect writes to the RAM instead.