Users browsing this thread: 1 Guest(s)
Usable Magic for all Characters

#9
Posts: 175
Threads: 11
Thanks Received: 10
Thanks Given: 8
Joined: May 2013
Reputation: 13
Status
Well-Fed
Hmm. It should be pretty simple, actually -- you just need to code an exception in before it SBCs. So, like:

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.


Current Project: FF6: Tensei | Discord ID: TristanGrayse
  Find
Quote  



Messages In This Thread
Usable Magic for all Characters - by B-Run - 07-14-2012, 07:23 AM
RE: Usable Magic for all Characters - by SSJ Rick - 07-14-2012, 09:49 PM
RE: Usable Magic for all Characters - by madsiur - 07-15-2012, 06:01 AM
RE: Usable Magic for all Characters - by SSJ Rick - 07-15-2012, 12:20 PM
RE: Usable Magic for all Characters - by B-Run - 07-16-2012, 11:10 AM
RE: Usable Magic for all Characters - by B-Run - 07-28-2012, 02:05 PM
RE: Usable Magic for all Characters - by B-Run - 08-03-2012, 03:51 PM
RE: Usable Magic for all Characters - by cdizzle - 11-26-2014, 04:20 PM
RE: Usable Magic for all Characters - by GrayShadows - 11-26-2014, 07:28 PM
RE: Usable Magic for all Characters - by Scorcher - 11-27-2014, 06:23 AM

Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite