NESHLA: Reference: Preprocessor Keywords:
 iNES Header

NESHLA includes preprocessor keywords for defining the ROM iNES header.

There is no need to define the amount of PRG or CHR banks for the header. The compiler automatically calculates and pads accordingly. You can, however, specify the mapper (cartridge chipset), mirroring, and other attributes.

 Board

 #ines.mapper "name"/number

The game's mapper can be specified with the #ines.mapper directive.

You may either specify the board or chip name as a string, or the actual number as an integer. Valid integer values are 0-255. The built in names which can be used are listed below:

Name
Number
100-in-1 Contra Function 16
15
11 in 1 Ball Games
51
1200-in-1
227
1993 Super HiK 4-in-1 (MMC3)
49
20-in-1
61
31-in-1
229
700-in-1
62
72-in-1
225
76-in-1
226
A*ROM
7
AGCI
144
AMROM
7
ANROM
7
AOROM
7
Action 52
228
BNROM
34
Bandai
16
CNROM
3
CPROM
13
Caltron 6-in-1
41
Camerica (partial)
71
Camerica 9096
232
Color Dreams
11
Cony
83
Copyright
90
Debugging Mapper
100
Dragon Buster
95
Dragon Buster (MMC3 variant)
95
E*ROM
5
EKROM
5
ELROM
5
ETROM
5
EWROM
5
Extended VS Unisystem
151
FFE F3
8
FFE F4
6
FFE F8
17
FME-07
69
GNROM
66
GameStation/RumbleStation
46
Golden Game 150-in-1
235
H*ROM
4
HES-Mapper #113
113
HKROM
4
Hello Kitty 255 in 1
63
Irem 74161/32
78
Irem G-101
32
Irem H-3001
65
Jaleco SS8806
18
KS 202
142
Kid Niki (J)
97
Konami VRC1
75
Konami VRC2 A
22
Konami VRC2 B
23
Konami VRC2 Type A
22
Konami VRC2 Type B
23
Konami VRC3
73
Konami VRC4
21
Konami VRC4 Type Y
25
Konami VRC4 Y
25
Konami VRC6 A1/A0
24
Konami VRC7
85
MMC1
1
MMC2
9
MMC3
4
MMC4
10
MMC5
5
MMC6
4
Mapper 90
90
Mario 7 in 1 (MMC3)
52
Mario Baby
42
Maxi 15
234
NES-A*ROM
7
NES-AMROM
7
NES-ANROM
7
NES-AOROM
7
NES-B4
4
NES-BNROM
34
NES-CNROM
3
NES-E*ROM
5
NES-EKROM
5
NES-ELROM
5
NES-ETROM
5
NES-EWROM
5
NES-GNROM
66
NES-H*ROM
4
NES-HKROM
4
NES-MMC1
1
NES-MMC2
9
NES-MMC3
4
NES-MMC4
10
NES-MMC5
5
NES-MMC6
4
NES-NES-B4
4
NES-NROM
0
NES-P*ROM
9
NES-PEEOROM
9
NES-PNROM
9
NES-S*ROM
1
NES-SAROM
1
NES-SBROM
1
NES-SCROM
1
NES-SEROM
1
NES-SGROM
1
NES-SKROM
1
NES-SL1ROM
1
NES-SLROM
1
NES-SNROM
1
NES-SOROM
1
NES-T*ROM
4
NES-TFROM
4
NES-TGROM
4
NES-TKROM
4
NES-TKSROM
118
NES-TLROM
4
NES-TLSROM
118
NES-TQROM
119
NES-TR1ROM
4
NES-TSROM
4
NES-U*ROM
2
NES-UNROM
2
NES-UOROM
2
NINA-03
79
NINA-06
79
NONE
0
NROM
0
Namcot 106
19
Nina-01
34
Nintendo VS Unisystem
99
Nintendo VS Unisystem (Extended)
151
Nintendo World Championship
105
P*ROM
9
PC-HK-SF3
91
PEEOROM
9
PNROM
9
RAMBO-1
64
S*ROM
1
SAROM
1
SBROM
1
SCROM
1
SEROM
1
SGROM
1
SKROM
1
SL1ROM
1
SLROM
1
SMB2j (LF36)
43
SMB2j Pirate
40
SMB2j Pirate (KS 202)
142
SMB2j rev. A
50
SMB3 Pirate
56
SNROM
1
SOROM
1
Sachen 74LS374N
243
Sachen Copy Protection
143
Sachen Mapper 141
141
Study & Game 32 in 1
58
Sunsoft 3
67
Sunsoft 4
68
Sunsoft FME-07
69
Sunsoft Mapper #3
67
Sunsoft Mapper #4
68
Super 1,000,000 in 1 (MMC3)
45
Super Donkey Kong
182
Super HiK 7 in 1 (MMC3)
44
Super Mario World
90
Super Spike & Nintendo World Cup Soccer (MMC3)
47
Super Spike/World Cup
47
T*ROM
4
T3H53
59
T3H53
59
TC0190
33
TFROM
4
TGROM
4
TKROM
4
TKSROM
118
TLROM
4
TLSROM
118
TQROM
119
TR1ROM
4
TSROM
4
Taito TC0190
33
Tengen RAMBO-1
64
U*ROM
2
UNROM
2
UOROM
2
VRC1
75
VRC2 A
22
VRC2 B
23
VRC3
73
VRC4
21
VRC4 Y
25
VRC6 A1/A0
24
VRC7
85
VS Unisystem
99

Examples

#ines.mapper 4
#ines.mapper "none"
#ines.mapper "TK-ROM"
#ines.mapper "Nintendo VS Unisystem (Extended)"


 #ines.mirroring ("vertical"/"horizontal")

If the game does not use a mapper which allows runtime mapper adjustment and has hardwired mirroring, you can specify it with the #ines.mirroring directive.

The mirroring can be specified with an integer boolean value (zero/nonzero), or with a string. The valid string values are "v", "h", "vertical", and "horizontal".

Examples

#ines.mirroring 0
#ines.mirroring 1
#ines.
mirroring "v"
#ines.mirroring "horizontal"


 #ines.fourscreen ("yes"/"no")

If the game uses extra VRAM for the additional nametable support, the #ines.fourscreen directive can be used.

The four screen support can be specified with an integer boolean value (zero/nonzero), or with a string. The valid string values are "y", "n", "yes", "no", "enabled", "disabled", etc.

Examples

#ines.fourscreen 0
#ines.fourscreen 1
#ines.
fourscreen "Y"
#ines.fourscreen "no"


 #ines.battery ("yes"/"no")

The #ines.battery directive can be used to specify whether or not the game uses battery backed up SRAM.

The battery can be specified with an integer boolean value (zero/nonzero), or with a string. The valid string values are "y", "n", "yes", "no", "enabled", "disabled", etc.

Examples

#ines.battery 0
#ines.battery 1
#ines.battery
"Y"
#ines.battery "no"

 Additional

 #ines.trainer ("yes"/"no")

The #ines.trainer directive specifies whether the game includes an embedded trainer.

It can be specified with an integer boolean value (zero/nonzero), or with a string. The valid string values are "y", "n", "yes", "no", "enabled", "disabled", etc.

Examples

#ines.trainer 0
#ines.trainer 1
#ines.
trainer "Y"
#ines.trainer "no"

 #ines.prgrepeat (number)

The #ines.prgrepeat directive specifies a number in which to mirror and repeat the PRG ROM data, forcing a large ROM. It is useful if burning a 32K game to a 128K ROM for example. Simply set the repeat to 4 (32*4 = 128), and the output PRG binary will have the PRG mirrored four times.

Examples

#ines.prgrepeat 2

 #ines.chrrepeat (number)

The #ines.chrrepeat directive specifies a number in which to mirror and repeat the CHR ROM data, forcing a large ROM. It is useful if burning a 32K game to a 128K ROM for example. Simply set the repeat to 4 (32*4 = 128), and the output CHR binary will have the PRG mirrored four times.

Examples

#ines.chrrepeat 2

 #ines.off

The #ines.off directive turns off the iNES header. The result is a raw output file without the initial 16 byte header specific to NES ROMs. It is useful when using NESHLA for other platforms.

Examples

#ines.off


<< Back To Index