Page 1 of 1

Ufouria code problems - Bankswitching and Stack Problems

Posted: Sun Dec 04, 2011 6:33 am
by Hamtaro126
This is my Second Problem, Sorry to say, I had a HDD Crash a few days ago, But This reason is not why I'm here:

I needed 16k Bankswitching in the ROM, But in Ufouria:

When I hack it to use only $41 in RAM ($22 and $40 are currently unused) and use proper banknumbers when changing (current mapper is VRC6, will have CHR-RAM), it slows and sprites screw around,

all because of two routines that think will help banks increment or decrement! (before main mapper code at $FDFC, $FC0D is unused in the new rom)

Will PM Hacked (European) ROM if needed,

Hex for New Code for the topic (Doesn't Work yet):

Code: Select all

;Increment Bank From Stack
FC43   8A         TXA
FC44   48         PHA
FC45   AE D0 04   LDX $04D0
FC48   A5 41      LDA $41
FC4A   9D D1 04   STA $04D1,X
FC4D   EE D0 04   INC $04D0
FC50   EA         NOP
FC51   EA         NOP
FC52   EA         NOP
FC53   EA         NOP
FC54   EA         NOP
FC55   EA         NOP
FC56   EA         NOP
FC57   EA         NOP
FC58   68         PLA
FC59   AA         TAX
FC5A   60         RTS

;Decrement Bank Number!
FC5B   8A         TXA
FC5C   48         PHA
FC5D   CE D0 04   DEC $04D0
FC60   AE D0 04   LDX $04D0
FC63   BD D1 04   LDA $04D1,X
FC66   85 41      STA $41
FC68   20 FD FC   JSR $FCFD
FC6B   EA         NOP
FC6C   EA         NOP
FC6D   EA         NOP
FC6E   EA         NOP
FC6F   EA         NOP
FC70   EA         NOP
FC71   EA         NOP
FC72   EA         NOP
FC73   68         PLA
FC74   AA         TAX
FC75   60         RTS