I have some questions on how cartridge data is loaded into CPU memory on startup. I am using some simple test programs to make it easier for me to understand what's going on, but I still have a few questions.
For example, when viewing these .nes files in a hex editor, I can see that total address space is 0x0000 to 0x6000. It is clear that the first 16 Bytes are part of the header (with no 512B trainer). Then it looks as if the PRG-ROM starts immediately after from 0x0010-0x400F followed by the CHR-ROM from 0x4010-0x6000.
Is this correct so far?
I am wondering what part of these gets placed into the CPU and PPU memory and where. I am assuming that because it is only 8k, the PRG-ROM gets place into the CPU memory at address C000 like so:
CPU C000-FFFF <--- PRG-ROM 0x0010-0x400F
But now I'm a little confused about the PPU memory. The remaining memory in the hex file is only 8176 (0x6000-0x4010) Bytes. <-- What happened to the other 16 Bytes? This is not even enough to fille the entire Pattern Tables, let alone the Name/Attribute Tables and Sprite/Image Palettes.
I can only assume that there is only a single Pattern Table or that they are smaller than 8192Bytes. Is this true as well?
I have more questions, but I'll start here so this thread isn't overwhelming.
For example, when viewing these .nes files in a hex editor, I can see that total address space is 0x0000 to 0x6000. It is clear that the first 16 Bytes are part of the header (with no 512B trainer). Then it looks as if the PRG-ROM starts immediately after from 0x0010-0x400F followed by the CHR-ROM from 0x4010-0x6000.
Is this correct so far?
I am wondering what part of these gets placed into the CPU and PPU memory and where. I am assuming that because it is only 8k, the PRG-ROM gets place into the CPU memory at address C000 like so:
CPU C000-FFFF <--- PRG-ROM 0x0010-0x400F
But now I'm a little confused about the PPU memory. The remaining memory in the hex file is only 8176 (0x6000-0x4010) Bytes. <-- What happened to the other 16 Bytes? This is not even enough to fille the entire Pattern Tables, let alone the Name/Attribute Tables and Sprite/Image Palettes.
I can only assume that there is only a single Pattern Table or that they are smaller than 8192Bytes. Is this true as well?
I have more questions, but I'll start here so this thread isn't overwhelming.