I've been months with my project and the 64Kb few weeks ago I was working with me remained small. So I decided to set up the files so that it was a UnRom of 128Kb and it seemed to work. All emulators I work with make it work (Nintendulator, FCEU, VirtuaNES, etc...)
Today has given me for trying a real NES rom and no load. The screen is shown in gray. I think it's a bad HEADER configuration files. I do not understand very well how to do it and do many things by trial and error method. So you have probably made a mistake.
Could you give me a hand?
My crt0 file is as follows:
My cfg file is as follows:
There is something wrong?
Thanks everybody.
Today has given me for trying a real NES rom and no load. The screen is shown in gray. I think it's a bad HEADER configuration files. I do not understand very well how to do it and do many things by trial and error method. So you have probably made a mistake.
Could you give me a hand?
My crt0 file is as follows:
Code:
NES_MAPPER =2 ;mapper number
NES_PRG_BANKS =8 ;number of 16K PRG banks, change to 2 for NROM256
NES_CHR_BANKS =0 ;number of 8K CHR banks
NES_MIRRORING =1 ;0 horizontal, 1 vertical, 8 four screen
.
.
.
.segment "HEADER"
.byte $4e,$45,$53,$1a
.byte NES_PRG_BANKS
.byte NES_CHR_BANKS
.byte NES_MIRRORING|(NES_MAPPER<<4)
.byte NES_MAPPER&$f0
.res 8,0
NES_PRG_BANKS =8 ;number of 16K PRG banks, change to 2 for NROM256
NES_CHR_BANKS =0 ;number of 8K CHR banks
NES_MIRRORING =1 ;0 horizontal, 1 vertical, 8 four screen
.
.
.
.segment "HEADER"
.byte $4e,$45,$53,$1a
.byte NES_PRG_BANKS
.byte NES_CHR_BANKS
.byte NES_MIRRORING|(NES_MAPPER<<4)
.byte NES_MAPPER&$f0
.res 8,0
My cfg file is as follows:
Code:
MEMORY {
# Zero page
ZP: start = $00, size = $100, type = rw, define = yes;
# INES Cartridge Header
HEADER: start = $0, size = $10, file = %O ,fill = yes;
# UNROM 128K
PRG0: start = $8000, size = $4000, file = %O, fill = yes, define = yes;
PRG1: start = $8000, size = $4000, file = %O, fill = yes, define = yes;
PRG2: start = $8000, size = $4000, file = %O, fill = yes, define = yes;
PRG3: start = $8000, size = $4000, file = %O, fill = yes, define = yes;
PRG4: start = $8000, size = $4000, file = %O, fill = yes, define = yes;
PRG5: start = $8000, size = $4000, file = %O, fill = yes, define = yes;
PRG6: start = $8000, size = $4000, file = %O, fill = yes, define = yes;
PRG7: start = $C000, size = $3ffa, file = %O, fill = yes, define = yes;
VECTORS: start = $fffa, size = $6, file = %O, fill = yes;
# standard 2K SRAM (-zeropage)
# $0100 famitone, palette, cpu stack
# $0200 oam buffer
# $0300..$800 ca65 stack
RAM: start = $0300, size = $0500, define = yes;
MAP1: start = $0400, size = $0500, define = yes;
}
SEGMENTS {
HEADER: load = HEADER, type = ro;
ROM0: load = PRG0, type = ro, define = yes;
ROM1: load = PRG1, type = ro, define = yes;
ROM2: load = PRG2, type = ro, define = yes;
ROM3: load = PRG3, type = ro, define = yes;
ROM4: load = PRG4, type = ro, define = yes;
ROM5: load = PRG5, type = ro, define = yes;
ROM6: load = PRG6, type = ro, define = yes;
STARTUP: load = PRG7, type = ro, define = yes;
LOWCODE: load = PRG7, type = ro, optional = yes;
INIT: load = PRG7, type = ro, define = yes, optional = yes;
DATA: load = PRG7, run = RAM, type = rw, define = yes;
RODATA: load = PRG7, type = ro, define = yes;
CODE: load = PRG7, type = ro, define = yes;
VECTORS: load = VECTORS, type = rw;
BSS: load = RAM, type = bss, define = yes;
HEAP: load = RAM, type = bss, optional = yes;
ZEROPAGE: load = ZP, type = zp;
MAP: load = MAP1, type = bss, 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 = $0500; # 5 pages stack
}
# Zero page
ZP: start = $00, size = $100, type = rw, define = yes;
# INES Cartridge Header
HEADER: start = $0, size = $10, file = %O ,fill = yes;
# UNROM 128K
PRG0: start = $8000, size = $4000, file = %O, fill = yes, define = yes;
PRG1: start = $8000, size = $4000, file = %O, fill = yes, define = yes;
PRG2: start = $8000, size = $4000, file = %O, fill = yes, define = yes;
PRG3: start = $8000, size = $4000, file = %O, fill = yes, define = yes;
PRG4: start = $8000, size = $4000, file = %O, fill = yes, define = yes;
PRG5: start = $8000, size = $4000, file = %O, fill = yes, define = yes;
PRG6: start = $8000, size = $4000, file = %O, fill = yes, define = yes;
PRG7: start = $C000, size = $3ffa, file = %O, fill = yes, define = yes;
VECTORS: start = $fffa, size = $6, file = %O, fill = yes;
# standard 2K SRAM (-zeropage)
# $0100 famitone, palette, cpu stack
# $0200 oam buffer
# $0300..$800 ca65 stack
RAM: start = $0300, size = $0500, define = yes;
MAP1: start = $0400, size = $0500, define = yes;
}
SEGMENTS {
HEADER: load = HEADER, type = ro;
ROM0: load = PRG0, type = ro, define = yes;
ROM1: load = PRG1, type = ro, define = yes;
ROM2: load = PRG2, type = ro, define = yes;
ROM3: load = PRG3, type = ro, define = yes;
ROM4: load = PRG4, type = ro, define = yes;
ROM5: load = PRG5, type = ro, define = yes;
ROM6: load = PRG6, type = ro, define = yes;
STARTUP: load = PRG7, type = ro, define = yes;
LOWCODE: load = PRG7, type = ro, optional = yes;
INIT: load = PRG7, type = ro, define = yes, optional = yes;
DATA: load = PRG7, run = RAM, type = rw, define = yes;
RODATA: load = PRG7, type = ro, define = yes;
CODE: load = PRG7, type = ro, define = yes;
VECTORS: load = VECTORS, type = rw;
BSS: load = RAM, type = bss, define = yes;
HEAP: load = RAM, type = bss, optional = yes;
ZEROPAGE: load = ZP, type = zp;
MAP: load = MAP1, type = bss, 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 = $0500; # 5 pages stack
}
There is something wrong?
Thanks everybody.