Download Print this page

Nintendo NES-001 - Entertainment System Game Console Documentation page 28

User guide
Hide thumbs Also See for NES-001 - Entertainment System Game Console:

Advertisement

The software that can be run using an emulator is usually referred to as a ROM image in
reference to the original ROM chips used to store it. A simple dump of the contents of the
cartridge is unlikely to be sufficient as it leaves no way to identify what each part of the file
means. Two different file formats have emerged to provide this information.
The iNES file format was originally defined by Marat Fayzullin for use in his iNES emulator.
The format has since been used by most emulators and is the most common format for ROM
images. INES format files should have the file extension *.nes. The format provides a 16 byte
header at the start of the file which contains important information. The format as described
in [9] is as shown in table 4-1:
Starting Byte
Length (Bytes)
0
3
3
1
4
1
5
1
6
1
7
1
8
1
9
7
Following the header is the 512-byte trainer, if one is present, otherwise the ROM banks
begin here, starting with PRG-ROM then CHR-ROM. The format allows for up to 256
different memory mappers. Each mapper is assigned a specific number and the mapper
number can be obtained by shifting bits 4-7 of control byte 2 to the left by 4 bits and then
adding the bits 4-7 of control byte 1. A complete list of mappers and their official iNES
mapper numbers can be found in Appendix C.
Contents
Should contain the string 'NES' to identify the file as an
iNES file.
Should contain the value $1A, also used to identify file
format.
Number of 16 KB PRG-ROM banks. The PRG-ROM
(Program ROM) is the area of ROM used to store the
program code.
Number of 8 KB CHR-ROM / VROM banks. The names
CHR-ROM (Character ROM) and VROM are used
synonymously to refer to the area of ROM used to store
graphics information, the pattern tables.
ROM Control Byte 1:
Bit 0 - Indicates the type of mirroring used by the game
where 0 indicates horizontal mirroring, 1 indicates
vertical mirroring.
Bit 1 - Indicates the presence of battery-backed RAM at
memory locations $6000-$7FFF.
Bit 2 - Indicates the presence of a 512-byte trainer at
memory locations $7000-$71FF.
Bit 3 - If this bit is set it overrides bit 0 to indicate four-
screen mirroring should be used.
Bits 4-7 - Four lower bits of the mapper number.
ROM Control Byte 2:
Bits 0-3 - Reserved for future usage and should all be 0.
Bits 4-7 - Four upper bits of the mapper number.
Number of 8 KB RAM banks. For compatibility with previous
versions of the iNES format, assume 1 page of RAM when
this is 0.
Reserved for future usage and should all be 0.
Table 4-1. iNES header information.
28

Advertisement

loading

This manual is also suitable for:

Entertainment system