This is where I am stuck currently. I know that I want my header to be this (as of now):
.inesmap 4 ; mapper 4 = MMC3
.inesprg 8
.ineschr 1
.inesmir 3
...and then I need to know what to put in the following ? parts so my program does the following:
1) The main program's code starts at $8000 and is read from $8000 from the beginning
2) My .db info is stored starting at $9000
3) My DPCM sample "sample.dmc" starts at $C000
OK, with this in mind, this is what my program looks like from the very beginning. Please let me know what I should fill in the ?'s with or explicitly what other code needs to be introduced to get this thing going.
.inesmap 4 ; mapper 4 = MMC3
.inesprg 8
.ineschr 1
.inesmir 3
.bank ? ; <------------What do I put here?
.org $???? ; <------------What do I put here?
(this part between the statements above and below is the main program and starts with the label RESET:)
.bank ? ; <------------What do I put here?
.org $???? ; <------------What do I put here?
(this part between the statements above and below is where my .db info is located)
.org $FFFA ;first of the three vectors starts here
.dw NMI ;when an NMI happens (once per frame if enabled) the processor will jump to the label NMI
.dw RESET ;when the processor first turns on or is reset, it will jump to the label RESET
.dw 0
.bank ? ; <------------What do I put here?
.org $???? ; <------------What do I put here?
.incbin "sample.dmc"
.bank ? ; <------------What do I put here?
.org $0000 ; this is referring to the address in the PPU
.incbin "tiles.chr" ;includes 8KB graphics file
;;;;;;;;;;;;;;;;;;;;;;;;
Notice that there is nothing in my code that initializes the MMC3 mapper, which I'm told needs initializing. The previous post mentioned I should do some write (probably right after the iNES header) like this:
Code:
LDA #6 (controls which NESASM bank is mapped from $8000-$9FFF)
STA $8000
LDA #0 (the NESASM bank number to switch in)
STA $8001
...which doesn't make sense to me because
1) shouldn't it be LDA #$06 or LDA #$60 or something?
2) What does the 6 mean?
OK from here, what do I put in the ? marks above and what other code do I need to include and where? Sorry for the confusion but I keep experimenting with bank numbers and .org addresses and each time the screen is just grey. The game works just fine when I was using mapper 0 but I'm just trying to convert this project to mapper 4.