-
Notifications
You must be signed in to change notification settings - Fork 10
/
nrom128.cfg
40 lines (36 loc) · 1.49 KB
/
nrom128.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#
# Linker script for NROM-128 games
# Copyright 2010-2024 Damian Yerrick
#
# Copying and distribution of this file, with or without
# modification, are permitted in any medium without royalty
# provided the copyright notice and this notice are preserved.
# This file is offered as-is, without any warranty.
#
MEMORY {
# skip $0000-$000F to allow use as local variables
ZP: start = $0010, size = $f0, type = rw;
# skip $0100-$01FF (CPU stack) and $0200-$02FF (common location
# for shadow OAM)
RAM: start = $0300, size = $0500, type = rw;
# An iNES executable consists of a header, the contents of
# PRG ROM, and the contents of CHR ROM if present, in that order.
# The header is not readable by the NES. It specifies to an
# emulator which cartridge circuit board is in use.
HEADER: start = 0, size = $0010, type = ro, file = %O, fill=yes, fillval=$00;
ROM: start = $C000, size = $4000, type = ro, file = %O, fill=yes, fillval=$FF;
CHRROM: start = $0000, size = $2000, type = ro, file = %O, fill=yes, fillval=$FF;
}
SEGMENTS {
INESHDR: load = HEADER, type = ro, align = $10;
ZEROPAGE: load = ZP, type = zp;
BSS: load = RAM, type = bss, define = yes, align = $100;
DMC: load = ROM, type = ro, align = 64, optional = yes;
CODE: load = ROM, type = ro, align = $100;
RODATA: load = ROM, type = ro, align = $100;
VECTORS: load = ROM, type = ro, start = $FFFA;
CHR: load = CHRROM, type = ro, align = 16, optional = yes;
}
FILES {
%O: format = bin;
}