Skip to main content

SNES ROM Header

Configure the SNES ROM header using the #[snesrom(...)] attribute. This generates the appropriate .SNESHEADER block in the WLA-DX assembly output.

Syntax

#[snesrom(name="MY GAME", version=0x01, hirom, fastrom)]

Required Parameter

ParameterDescription
nameROM name (max 21 characters, padded or truncated automatically)

Optional Parameters

ParameterDefaultDescription
id"SNES"Cartridge ID (4 characters)
cartridge_type0x00Cartridge type byte
sram_size0x00SRAM size byte
country0x01Country code
version0x00ROM version number

Memory Mapping Flags

Mutually exclusive:

FlagDescription
loromLoROM mapping (default)
hiromHiROM mapping
exhiromExHiROM mapping

ROM Speed Flags

Mutually exclusive:

FlagDescription
slowromSlowROM timing (default)
fastromFastROM timing

Country Codes

CodeRegion
0x00Japan
0x01USA
0x02Europe

Cartridge Types

CodeType
0x00ROM only
0x01ROM + RAM
0x02ROM + RAM + Battery

Generated Output

For #[snesrom(name="MY GAME", version=0x01, hirom, fastrom)]:

.SNESHEADER
ID "SNES"
NAME "MY GAME "
HIROM
FASTROM
CARTRIDGETYPE $00
ROMSIZE $08
SRAMSIZE $00
COUNTRY $01
LICENSEECODE $00
VERSION $01
.ENDSNES

See the WLA-DX documentation for complete parameter lists and details.