-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnesfile.ini
53 lines (46 loc) · 2.24 KB
/
nesfile.ini
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# This is a configuration file (as per: http://www.cc65.org/doc/ld65-5.html) that
# tells ld65 how we want to lay out our output file.
# NOTE: Parts of this file are inspired by "nrom-template-0.02" written by
# Damian Yerrick (tepples). See: http://pics.pineight.com/nes/
# ...and in particular: http://pics.pineight.com/nes/nrom-template-0.02.zip
# ----- MEMORY section ------------------------------------------------------------
MEMORY {
ZP: start=$10, size=$f0, type=rw;
HEADER: start=0, size=$10, type=ro, file=%O, fill=yes, fillval=$00;
# NES RAM runs from $0000-$07FF...
STACK: start=$0100, size=$0100, type=rw;
# We reserve $0200-$02FF for DMA.
# We just define our 'RAM' as the remaining space from $0300-$07FF:
RAM: start=$0300, size=$0500, type=rw;
# Cartridge RAM, "if present":
EXTRAM: start=$6000, size=$2000, type=rw;
# Our 16KiB of PRG ROM sits at the top of memory, from $C000-$FFFF.
ROM7: start=$C000, size=$4000, type=ro, file=%O, fill=yes, fillval=$FF;
# Our 8KiB CHR ROM sits on the PPU's address bus at $0000-$1FFF.
CHR: start=$0000, size=$2000, type=ro, file=%O, fill=yes, fillval=$CC;
}
# ----- SEGMENTS section ------------------------------------------------------------
SEGMENTS {
INESHDR: load=HEADER, type=ro, align=$10;
ZEROPAGE: load=ZP, type=zp;
# The BSS segment is assumed to be 'uninitialised memory'.
BSS: load=RAM, type=bss, define=yes, align=$100;
# If used, the DMC segment (I think?) holds data that may be used by
# the APU's Delta Modulation Channel
# (see: http://wiki.nesdev.com/w/index.php/APU_DMC).
DMC: load=ROM7, type=ro, align=64, optional=yes;
CODE: load=ROM7, type=ro, align=$100;
# RODATA still appears inside the ROM, after CODE, but is just reserved
# for data that we'd potentially want to reference.
RODATA: load=ROM7, type=ro, align=$100;
VECTORS: load=ROM7, type=ro, start=$FFFA;
# The pattern data is loaded into the CHR-ROM. Can either use
# the full PATTERN segment, or the separate PATTERN0 ('left') and
# PATTERN1 ('right') segments.
PATTERN: load=CHR, type=ro, optional=yes;
PATTERN0: load=CHR, type=ro, optional=yes; # Implicit start at $0000.
PATTERN1: load=CHR, type=ro, optional=yes, start=$1000;
}
FILES {
%O: format=bin;
}