Yes I want to have one fixed bank PRG for my code and bank switchable for constant array. Something like : 10 PRG and 10 CHR. I looked the mmc3 mapper in nesdev wiki : 8K + 8K + 16K fixed PRG
Thanks, Now my PRG is in the good order but the CHR Still does not load.
Code: Select all
MEMORY {
#RAM Addresses:
# Zero page
ZP: start = $00, size = $100, type = rw, define = yes;
#note, the c compiler uses about 10-20 zp addresses, and it puts them after yours.
#OAM1: start = $0200, size = $0100, define = yes;
#note, sprites stored here in the RAM
RAM: start = $0300, size = $0400, define = yes;
#note, I located the c stack at 700-7ff, see below
#INES Header:
HEADER: start = $0, size = $10, file = %O ,fill = yes;
#ROM Addresses:
PRG1: start = $8000, size = $2000, file = %O ,fill = yes, define = yes;
PRG2: start = $A000, size = $2000, file = %O ,fill = yes, define = yes;
PRG3: start = $C000, size = $2000, file = %O ,fill = yes, define = yes;
PRG: start = $E000, size = $2000, file = %O ,fill = yes, define = yes;
# Hardware Vectors at end of the ROM
VECTORS: start = $fffa, size = $6, file = %O, fill = yes;
#1 Bank of 8K CHR ROM
CHR: start = $0000, size = $2000, file = %O, fill = yes;
}
SEGMENTS {
HEADER: load = HEADER, type = ro;
STARTUP: load = PRG, type = ro, define = yes;
LOWCODE: load = PRG, type = ro, optional = yes;
CODE1: load = PRG1, type = ro, define = yes;
CODE2: load = PRG2, type = ro, define = yes;
CODE3: load = PRG3, type = ro, define = yes;
INIT: load = PRG, type = ro, define = yes, optional = yes;
CODE: load = PRG, type = ro, define = yes;
RODATA: load = PRG, type = ro, define = yes;
DATA: load = PRG, run = RAM, type = rw, define = yes;
VECTORS: load = VECTORS, type = rw;
CHARS: load = CHR, type = rw;
BSS: load = RAM, type = bss, define = yes;
HEAP: load = RAM, type = bss, optional = yes;
ZEROPAGE: load = ZP, type = zp;
ONCE: load = PRG, type = ro, define = yes;
}
FEATURES {
CONDES: segment = INIT,
type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__;
CONDES: segment = RODATA,
type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__;
CONDES: type = interruptor,
segment = RODATA,
label = __INTERRUPTOR_TABLE__,
count = __INTERRUPTOR_COUNT__;
}
SYMBOLS {
__STACKSIZE__: type = weak, value = $0100; # 1 page stack
__STACK_START__: type = weak, value = $700;
}