Difference between revisions of "ROM Addressing"
Jump to navigation
Jump to search
Line 5: | Line 5: | ||
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]]): | 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" |
!Type | !Type | ||
!Number | !Number | ||
!File Offset | !File Offset | ||
!Size | !Size | ||
+ | !Contents | ||
|- | |- | ||
|iNES Header | |iNES Header | ||
Line 20: | Line 21: | ||
|0x00010 | |0x00010 | ||
|16KB (0x4000) | |16KB (0x4000) | ||
+ | | | ||
|- | |- | ||
| | | | ||
Line 25: | Line 27: | ||
|0x04010 | |0x04010 | ||
|16KB (0x4000) | |16KB (0x4000) | ||
+ | |[[Western Hyrule]] | ||
|- | |- | ||
| | | | ||
Line 30: | Line 33: | ||
|0x08010 | |0x08010 | ||
|16KB (0x4000) | |16KB (0x4000) | ||
+ | |[[Eastern Hyrule]] | ||
|- | |- | ||
| | | | ||
Line 35: | Line 39: | ||
|0x0C010 | |0x0C010 | ||
|16KB (0x4000) | |16KB (0x4000) | ||
+ | |[[Towns]](?) | ||
|- | |- | ||
| | | | ||
Line 40: | Line 45: | ||
|0x10010 | |0x10010 | ||
|16KB (0x4000) | |16KB (0x4000) | ||
+ | |[[Normal Palaces]] | ||
|- | |- | ||
| | | | ||
Line 45: | Line 51: | ||
|0x14010 | |0x14010 | ||
|16KB (0x4000) | |16KB (0x4000) | ||
+ | |[[Great Palace]] | ||
|- | |- | ||
| | | | ||
Line 50: | Line 57: | ||
|0x18010 | |0x18010 | ||
|16KB (0x4000) | |16KB (0x4000) | ||
+ | |[[Music]](?) | ||
|- | |- | ||
| | | | ||
Line 55: | Line 63: | ||
|0x1C010 | |0x1C010 | ||
|16KB (0x4000) | |16KB (0x4000) | ||
+ | |Global State (permanently mapped) | ||
|- | |- | ||
|CHR Bank | |CHR Bank | ||
Line 136: | Line 145: | ||
|8KB (0x2000) | |8KB (0x2000) | ||
|} | |} | ||
+ | |||
=Memory= | =Memory= | ||
Revision as of 06:16, 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 [1.0 format]. The layout of a Zelda II ROM file is as follows (an [[1]] cartridge with 8 PRG ROM banks, 16 CHR-ROM banks, and 4KB of SRAM -- for more details see [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) |