Unused Memory

From NES Hacker Wiki
Revision as of 08:13, 20 July 2016 by TheAlmightyGuru (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Once you begin looking through the NES memory with the hex editor you'll find plenty of useful memory values being stored in the 0000-07FF address range. However, you'll also notice plenty of memory in the 0800-1FFF range as well. However, if you pause your game, and look at the hex editor page of 0000-00FF and compare if to the 0800-08FF page, you'll notice that the values are identical!

Mirror 1.png

Mirror 2.png

The 1000-10FF page and the 1800-18FF page will match as well. There are four mirrors of the same data: 0000-07FF, 0800-0FFF, 1000-17FF, and 1800-1FFF. Only the memory found in 0000-07FF addresses is actually used.

This is because of how the NES addresses memory. Even though the NES has this $2000 byte chunk of memory available to it, it can only address the first $800 bytes. This leaves $1800 bytes of wasted space that the NES simply mirrors from the first $800 bytes.

So, if you're looking at the hex editor, you can completely ignore any values you find in the 0800-1FFF address range.

Likewise, the $2000-$3FFF range is I/O ports for communication with the Picture Processing Unit (PPU), and $4000-$4017 is I/O ports for the audio, input, and DMA circuitry (APU). Cheats won't affect these directly, but they may be useful for finding code that updates the display and then working backward to find what generates the data being sent to the PPU.

External links