My NES tracker is now using MMC1 so that I can have the editor in fixed ROM and the music player in another bank, switching banks in the NMI to call the player refresh.
At the moment I've only got a dummy routine for the music refresh (as there's no music code yet), simply incrementing a ZP variable (so I can check it's getting there) and RTS.
I'm setting the bank with this routine;
setPRGBank sta $E000
lsr a
sta $E000
lsr a
sta $E000
lsr a
sta $E000
lsr a
sta $E000
rts
So, in the NMI, with the dummy music player in bank 1;
lda #$01
jsr setPRGBank
jsr musicRefresh
lda #$00
jsr setPRGBank
When running the ROM in Nestopia, it works fine. However, using the same ROM in PowerPak causes a lock-up. If I comment out the bank switch and music refresh call in the NMI, it works.
Anyone?
At the moment I've only got a dummy routine for the music refresh (as there's no music code yet), simply incrementing a ZP variable (so I can check it's getting there) and RTS.
I'm setting the bank with this routine;
setPRGBank sta $E000
lsr a
sta $E000
lsr a
sta $E000
lsr a
sta $E000
lsr a
sta $E000
rts
So, in the NMI, with the dummy music player in bank 1;
lda #$01
jsr setPRGBank
jsr musicRefresh
lda #$00
jsr setPRGBank
When running the ROM in Nestopia, it works fine. However, using the same ROM in PowerPak causes a lock-up. If I comment out the bank switch and music refresh call in the NMI, it works.
Anyone?