Hey,
It seems like it works now... Kinda. I still have one bankswitching problem. At some point in the game, you have to select a character. There are 6 banks with five characters in each bank. On an emulator, it works as it should (Starts at bank 03, then goes to bank 04, etc. until bank 8). On real hardware (Tried the Everdrive and the PowerPak), it starts at bank 03, then goes back to bank 00 for some reason, then bank 01, but finishes with bank 08 as it should. Anyone knows what's wrong?
Code: Select all
LDA buttons
AND #%00000001
BEQ NoCharRightUnpressed ;Not the best way of doing this, I know
LDA rightpressed ;If right is already pressed, don't do the folowing
BNE NoCharRight ;There are better ways to do this, I should change it...
INC rightpressed
INC CharNumber
LDA CaseCharacter ;Characters are like 3x6 metatiles, this seems to work
CLC
ADC #$03
STA CaseCharacter
CMP #$6E
BCC .nochange3
LDA #$60
STA CaseCharacter
INC CaseGraphicBank ;Here's the main culprit >:(. On real hardware, goes back to zero...
LDA CaseGraphicBank
CMP #$09 ;If higher than $08, set $03
BNE .chrbankok3
LDA #$03
STA CaseGraphicBank
.chrbankok3 ;There used to be the CHR bank switch subroutine here, but I put it at the beginning of the char selection routine in order to fix a minor glitch
.nochange3
LDA Character_Palette ;Sets the palette for the characters. This seems to work too
CLC
ADC #$03
CMP #PALETTEEND
BCC .nopalend
LDA #$00
.nopalend
STA Character_Palette
This is the routine to go to the next character. The routine when pressed left looks similar except it's kind of the opposite thing that happens. Tell me if you need me to post more code. I'll take my src with me today

Thanks everyone! You've been of great help so far.