I'm using mapper 0 for my test demo, which works fine.
I have some difficulty understanding the relation of the banks and the ROM-sizes. The numbering of banks also confuses me.
Mapper 0 documentation states that it's PRG-ROM may be 16k or 32k.
I've laid out my program like this:
Now, I'd like to add a DPCM sample to $c000 by stating
after the irq routine. This, however, screws up the program. My code isn't that long, and it doesn't overlap $c000.
Also, say that I would like to have another 16k of CHR-ROM. What is the best way to change between the different roms in code? (I've tested MMC1 and got it to work to some degree).
EDIT: Also, if I remove the song incbin, the rom doesn't work. I'm doing something fundamentaly wrong here, but I really don't know what. Help is much appriciated.
I have some difficulty understanding the relation of the banks and the ROM-sizes. The numbering of banks also confuses me.
Mapper 0 documentation states that it's PRG-ROM may be 16k or 32k.
I've laid out my program like this:
Code:
.inesprg 1
.ineschr 1
.inesmir 0
.inesmap 0
.bank 2
.org $0000
.incbin "demo.chr" ;8kb of CHR-ROM
.bank 0
.org $8000
.incbin "song.bin" ;nerdtracker 2 tune, about 7kb
RESET:
; code goes here
nmi:
; nmi routine here
irq: ; blank
.bank 1
.org $FFFA
; pointers to reset, irq & nmi here
.ineschr 1
.inesmir 0
.inesmap 0
.bank 2
.org $0000
.incbin "demo.chr" ;8kb of CHR-ROM
.bank 0
.org $8000
.incbin "song.bin" ;nerdtracker 2 tune, about 7kb
RESET:
; code goes here
nmi:
; nmi routine here
irq: ; blank
.bank 1
.org $FFFA
; pointers to reset, irq & nmi here
Now, I'd like to add a DPCM sample to $c000 by stating
Code:
.org $c000
.incbin "sample.dmc" ;4kb of sample data
.incbin "sample.dmc" ;4kb of sample data
after the irq routine. This, however, screws up the program. My code isn't that long, and it doesn't overlap $c000.
Also, say that I would like to have another 16k of CHR-ROM. What is the best way to change between the different roms in code? (I've tested MMC1 and got it to work to some degree).
EDIT: Also, if I remove the song incbin, the rom doesn't work. I'm doing something fundamentaly wrong here, but I really don't know what. Help is much appriciated.