Difference between revisions of "ROM Addressing"
Jump to navigation
Jump to search
Line 3: | Line 3: | ||
=ROM File= | =ROM File= | ||
− | NES ROM files are in a format generally called iNES. Most ROMs (including Zelda 2 ROMs) are in | + | NES ROM files are in a format generally called iNES. Most ROMs (including Zelda 2 ROMs) are in [https://wiki.nesdev.com/w/index.php/INES iNES 1.0 format]. The layout of a Zelda II ROM file is as follows (an [https://wiki.nesdev.com/w/index.php/MMC1 MMC1] cartridge with 8 PRG ROM banks, 16 CHR-ROM banks, and 4KB of SRAM -- for more details see [https://datacrystal.romhacking.net/wiki/Zelda_II:_The_Adventure_of_Link Data Crystal]): |
{| class="wikitable" | {| class="wikitable" |
Revision as of 06:24, 15 April 2021
There are several different ways to refer to data in memory in Zelda II. Which one you use depends on your reasoning for doing so. This page will explain where they're useful and how to translate between them.
ROM File
NES ROM files are in a format generally called iNES. Most ROMs (including Zelda 2 ROMs) are in iNES 1.0 format. The layout of a Zelda II ROM file is as follows (an MMC1 cartridge with 8 PRG ROM banks, 16 CHR-ROM banks, and 4KB of SRAM -- for more details see Data Crystal):
Type | Number | File Offset | Size | Contents |
---|---|---|---|---|
iNES Header | 0x00000 | 16bytes (0x10) | ||
PRG Bank | 0 | 0x00010 | 16KB (0x4000) | |
1 | 0x04010 | 16KB (0x4000) | Western Hyrule | |
2 | 0x08010 | 16KB (0x4000) | Eastern Hyrule | |
3 | 0x0C010 | 16KB (0x4000) | Towns(?) | |
4 | 0x10010 | 16KB (0x4000) | Normal Palaces | |
5 | 0x14010 | 16KB (0x4000) | Great Palace | |
6 | 0x18010 | 16KB (0x4000) | Music(?) | |
7 | 0x1C010 | 16KB (0x4000) | Global State (permanently mapped) | |
CHR Bank | 0 | 0x20000 | 8KB (0x2000) | |
1 | 0x22000 | 8KB (0x2000) | ||
2 | 0x24000 | 8KB (0x2000) | ||
3 | 0x26000 | 8KB (0x2000) | ||
4 | 0x28000 | 8KB (0x2000) | ||
5 | 0x2a000 | 8KB (0x2000) | ||
6 | 0x2c000 | 8KB (0x2000) | ||
7 | 0x2e000 | 8KB (0x2000) | ||
8 | 0x30000 | 8KB (0x2000) | ||
9 | 0x32000 | 8KB (0x2000) | ||
10 | 0x34000 | 8KB (0x2000) | ||
11 | 0x36000 | 8KB (0x2000) | ||
12 | 0x38000 | 8KB (0x2000) | ||
13 | 0x3a000 | 8KB (0x2000) | ||
14 | 0x3c000 | 8KB (0x2000) | ||
15 | 0x3e000 | 8KB (0x2000) |