I've tried to set the mapper number to 2 in the iNES header, and I've toyed around with the ld65 linker config file, but I don't really know what I'm doing. Nestopia gives me a "Corrupt file!" message when I try to load the ROM.
Has anyone got an example handy that could help get me up and running?
If it helps at all, here are the current header and linker config I'm using for NROM:
Also: Since UNROM uses CHR-RAM, where do I store the CHR data? Does it go into the RODATA segment? And is it necessary to copy 8 KB of CHR data to CHR-RAM before I can render anything?
Has anyone got an example handy that could help get me up and running?
If it helps at all, here are the current header and linker config I'm using for NROM:
Code:
.segment "HEADER"
.byte "NES", 26, 2, 1 ; 32K PRG, 8K CHR
.byte "NES", 26, 2, 1 ; 32K PRG, 8K CHR
Code:
MEMORY {
ZP: start = $10, size = $F0, type = rw;
HEADER: start = 0, size = 16, type = ro, fill = yes;
ROMX: start = $8000, size = $6000, type = ro, fill = yes;
ROM0: start = $E000, size = $1FF4, type = ro, fill = yes;
ROMV: start = $FFF4, size = $C, type = ro, fill = yes;
ROM2: start = 0, size = $2000, type = ro, fill = yes;
SRAM: start = $0200, size = $0600, type = rw;
}
SEGMENTS {
HEADER: load = HEADER, type = ro;
CODE: load = ROM0, type = ro, align = $100;
CODE2: load = ROM0, type = ro, align = $100, optional=yes;
RODATA: load = ROM0, type = ro;
STRINGS: load = ROM0, type = ro, optional=yes;
VECTORS: load = ROMV, type = ro;
CHARS: load = ROM2, type = ro;
BSS: load = SRAM, type = bss, align = $100;
ZEROPAGE: load = ZP, type = zp;
}
ZP: start = $10, size = $F0, type = rw;
HEADER: start = 0, size = 16, type = ro, fill = yes;
ROMX: start = $8000, size = $6000, type = ro, fill = yes;
ROM0: start = $E000, size = $1FF4, type = ro, fill = yes;
ROMV: start = $FFF4, size = $C, type = ro, fill = yes;
ROM2: start = 0, size = $2000, type = ro, fill = yes;
SRAM: start = $0200, size = $0600, type = rw;
}
SEGMENTS {
HEADER: load = HEADER, type = ro;
CODE: load = ROM0, type = ro, align = $100;
CODE2: load = ROM0, type = ro, align = $100, optional=yes;
RODATA: load = ROM0, type = ro;
STRINGS: load = ROM0, type = ro, optional=yes;
VECTORS: load = ROMV, type = ro;
CHARS: load = ROM2, type = ro;
BSS: load = SRAM, type = bss, align = $100;
ZEROPAGE: load = ZP, type = zp;
}
Also: Since UNROM uses CHR-RAM, where do I store the CHR data? Does it go into the RODATA segment? And is it necessary to copy 8 KB of CHR data to CHR-RAM before I can render anything?