The most common format for an NES executable is
iNES, which originated in the pirate community but has since come into official use. The vast majority of iNES files have two or three parts:
- a 16-byte header that describes a circuit board suitable for running the game, including any mapper chips,
- a "PRG" (program) ROM image, and
- an optional "CHR" (character) ROM image that contains fonts and other graphics.
The first 16 bytes make up the header. Bytes 0-3 are always 'N', 'E', 'S', $1A. If the value at offset 5 is zero, there are one PRG ROM and one CHR RAM; if it is nonzero, there are two ROMs (PRG and CHR), and the value gives the size of the CHR ROM in 8192 byte units.