File Formats
  • Audio
  • Video
  • Images
  • 3D & CAD
  • Documents
  • Data
  • Code
  • System
Code
  • Source code
  • Bytecode
  • Programs & libraries
  • Object files
  • Debug info
  • Firmware & ROMs
  • Notebooks
  • Shaders
  • Build files
  • Packages & installers
  1. Home
  2. Code
  3. Firmware & ROMs
  4. NES
.NES
  • Overview

.NES

iNES ROM image

Introduction

A .nes file is a copy of a Nintendo Entertainment System game cartridge, for playing in an emulator. The format is called iNES, after the emulator that introduced it in the 1990s. It stores the cartridge’s program ROM and graphics ROM behind a 16-byte header that tells the emulator how the cartridge was wired, above all which mapper chip it used to switch banks of ROM in and out.

NES 2.0 is a backwards-compatible extension of the same header that describes cartridges more exactly, with larger mapper numbers and RAM sizes.

Software

  • Mesen (Windows, macOS, Linux)
  • FCEUX (Windows, macOS, Linux)
  • RetroArch, with a NES core (Windows, macOS, Linux, mobile)

Structure

The file starts with the 16-byte header. The first four bytes are 4E 45 53 1A (NES and an MS-DOS end-of-file character). Byte 4 gives the size of the program ROM in 16 KB units and byte 5 the size of the character (graphics) ROM in 8 KB units, where 0 means the cartridge uses RAM for graphics. Bytes 6 and 7 hold flags: the screen mirroring, whether there is battery-backed save RAM, whether a 512-byte trainer follows the header, and the mapper number split across the two high nibbles. When bits 2 and 3 of byte 7 are 10 in binary, the header is NES 2.0.

  1. 0magic NES\x1A4 bytes
  2. 4PRG ROM size in 16 KB units, CHR ROM size in 8 KB units2 bytes
  3. 6flags 6 and flags 7: mirroring, battery, trainer, mapper number2 bytes
  4. 8further flags, padded with zeros in plain iNES8 bytes
  5. 16trainer, only when flag 6 bit 2 is set512 bytes
  6. …PRG ROM: the game’s program16 KB units
  7. …CHR ROM: the game’s tile graphics8 KB units
An iNES ROM image.
© 2026 fileformats.org About Contact Made by Lewpen