So I made a little MMC3 game (which works on all emulators and on the PowerPak and my friend is trying to make a repro of it. However he always gets a solid gray screen. So I wanted to make sure my MMC3 init code was okay or if it's just him. The game isn't too big (32K PRG / 64K CHR) since I use the MMC3 mostly for the bank sizes and the IRQs.
Here's my MMC3 init code as well as a few things that might help
.inesprg 2 ; 2x 16KB PRG code
.ineschr 8 ; 4x 8KB CHR data
.inesmap 4 ; mapper 4 = MMC3
.inesmir 1 ; background mirroring
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
BANKSWAP = $8000
BANKDATA = $8001
MIRROR = $A000
RAMPROTECT = $A001
IRQLATCH = $C000
IRQRELOAD = $C001
IRQOFF = $E000
IRQON = $E001
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
LDA #%00000000
STA BANKSWAP
LDA #%00000000
STA BANKDATA
LDA #%00000001
STA BANKSWAP
LDA #%00000010
STA BANKDATA
LDX #$02
LDY #$1C
.copyloop
STX BANKSWAP
STY BANKDATA
INY
INX
CPX #$06
BNE .copyloop
LDA #$00
STA RAMPROTECT
STA MIRROR
Any idea of might've went wrong?
Here's my MMC3 init code as well as a few things that might help
Code:
.inesprg 2 ; 2x 16KB PRG code
.ineschr 8 ; 4x 8KB CHR data
.inesmap 4 ; mapper 4 = MMC3
.inesmir 1 ; background mirroring
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
BANKSWAP = $8000
BANKDATA = $8001
MIRROR = $A000
RAMPROTECT = $A001
IRQLATCH = $C000
IRQRELOAD = $C001
IRQOFF = $E000
IRQON = $E001
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
LDA #%00000000
STA BANKSWAP
LDA #%00000000
STA BANKDATA
LDA #%00000001
STA BANKSWAP
LDA #%00000010
STA BANKDATA
LDX #$02
LDY #$1C
.copyloop
STX BANKSWAP
STY BANKDATA
INY
INX
CPX #$06
BNE .copyloop
LDA #$00
STA RAMPROTECT
STA MIRROR
Any idea of might've went wrong?