Users browsing this thread: 1 Guest(s)
Usable Magic for all Characters
11-26-2014, 07:28 PM
(This post was last modified: 11-26-2014, 07:29 PM by GrayShadows.)
Hmm. It should be pretty simple, actually -- you just need to code an exception in before it SBCs. So, like:
There's not enough code to repeat this in the next iteration of the code, but that can be gotten around by calling this from C2 instead:
Unless I've miscounted, that should leave you enough space to add three exceptions in the existing space -- these two and one more. Any more than that and you'd have to move the code somewhere else with more available space.
ETA: And just to note, while I've left the original disasm addresses in the code I C&P'd from the original patch, obviously the addresses of any code /after/ the bits I inserted would be changed, thus the RTS originally at $50CE no longer being at $50CE, etc.
Code:
C3/50C4: C90C CMP #$0C
C3/50C6: 9006 BCC $50CE (branch if less than #$0C)
CMP [Banon ID]
BNE NextCharCheck
LDA [Relm ID]
BRA [RTS at end of code snippet - $50CE in original patch code]
NextCharCheck:
CMP [Leo ID]
BNE RestOfCode
LDA [Celes ID]
BRA [RTS at end of code snippet - $50CE in original patch code]
RestOfCode:
C3/50C8: E90C SBC #$0C (else, subtract #$0C)
C3/50CA: C90C CMP #$0C
C3/50CC: B0FA BCS $50C8 (if still greater than #$0C, subtract again)
C3/50CE: 60 RTS
There's not enough code to repeat this in the next iteration of the code, but that can be gotten around by calling this from C2 instead:
Code:
C3/50E8 20C450 JSR $50C4
C3/50EB 6B RTS
Unless I've miscounted, that should leave you enough space to add three exceptions in the existing space -- these two and one more. Any more than that and you'd have to move the code somewhere else with more available space.
ETA: And just to note, while I've left the original disasm addresses in the code I C&P'd from the original patch, obviously the addresses of any code /after/ the bits I inserted would be changed, thus the RTS originally at $50CE no longer being at $50CE, etc.
« Next Oldest | Next Newest »
![]() |
![]() |
|||
|
||||
![]() |
![]() |
Users browsing this thread: 1 Guest(s)