Skip to content

The Header Directive

Bananattack edited this page Aug 18, 2011 · 3 revisions

[[The Language Reference]] - [[The Header Directive]]

The header directive defines an iNES header, which describes what sort of cartridge ROM to generate. This is done by declaring a header with the ines keyword. It should appear before any other statements (constants are excepted; they can be defined beforehand if it helps).

The directive’s general form is structured like so:

ines:
    setting = value,
    setting = value,
    ...
    setting = value

Header Settings

  • mapper - The cartridge’s mapper number, according to the iNES specification.

  • mirroring - Nametable mirroring setting, where 0 is horizontal, and 1 is vertical. Defaults to 0 (horizontal).

  • battery - Whether or not this cartridge has battery-backed RAM. Defaults to 0 (no battery).

  • fourscreen - Whether or not this cartridge has extra hardware for four nametables. Defaults to 0.

Example

Here is one example of an possible header directive:

ines:
    mapper = 4, // MMC3
    mirroring = 0 // Horizontally mirrored.
    battery = 1 // Has save RAM.