Users browsing this thread: 2 Guest(s)
GrayShadow's 'Giving Gogo Magic' code

#35
Posts: 3,970
Threads: 279
Thanks Received: 236
Thanks Given: 58
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
The first thing to check would be to verify if the following code is what it's supposed to be. It covers the blitz learning at recruit. If the disassembly (or hex values) seems to be correct, you'll have maybe to run the code and see with a debugger why is it making learn the third blitz. The code is after C0/D68D, after Relm, Celes, Terra and Cyan code so it's quite down the road probably the last piece of code before a bunch of FFs. I'm including original $C0 code as a reference. Instances of $1D28 should be replaced by $1E3C.

Code:
SabinRecruit:
STZ $1B
LDX $00
TeachSabin:
LDA $E6F498,X    ; Get level at which Blitz is learned
CMP $1608,Y      ; Is Sabin at that level?
BEQ SabinRecCont ; If so, proceed with learning
BCS SetSabin     ; If he is lower, exit and teach Blitzes.
SabinRecCont:
INC $1B
INX
CPX #$0008       ; Have we checked all eight blitzes?
BEQ SetSabin     ; If so, exit
BRA TeachSabin   ; Else, continue checking
SetSabin:
LDA $1B
TAX
LDA $1E3C        ; Get currently known Blitzes
ORA $C0A22C,X    ; Add to bitfield of Blitzes learned at level
STA $1E3C        ; Set new Blitzes learned
RTS

Code:
Fork: Sabin's Blitz list
C0/A201:    641B        STZ $1B
C0/A203:    A600        LDX $00
C0/A205:    BF98F4E6    LDA $E6F498,X  (Natural Blitzes)
C0/A209:    D90816      CMP $1608,Y
C0/A20C:    F002        BEQ $A210
C0/A20E:    B00A        BCS $A21A
C0/A210:    E61B        INC $1B
C0/A212:    E8          INX
C0/A213:    E00800      CPX #$0008
C0/A216:    F002        BEQ $A21A
C0/A218:    80EB        BRA $A205
C0/A21A:    A51B        LDA $1B
C0/A21C:    AA          TAX
C0/A21D:    AD281D      LDA $1D28      (known Blitzes)
C0/A220:    1F2CA2C0    ORA $C0A22C,X
C0/A224:    8D281D      STA $1D28      (new known Blitzes)
C0/A227:    60          RTS

Just saw this before posting. I think the error may be is in the following code. According to other code and comments lores start at $1E3D. Not sure when lore initialization is done, but if it's after Sabin recruiting it would be irrelevant. Still it's a really odd piece of code since it differs from the other lore code:

Code:
org $C0BE17
LDA $E6F564            ; Initialises Strago's known lores at recruit.
STA $1E3A              ; Strago's known lores, byte 1
LDA $E6F565
STA $1E3B              ; Strago's known lores, byte 2
LDA $E6F566
STA $1E3C              ; Strago's known lores, byte 3

According to doc:

Code:
; This patch adjusts some SRAM locations such that Gogo
; has a regular magic list and is able to learn spells
; from espers. It will be incompatible as-is with patches
; that affect:
;
; *Morph (now at $1E3A)
; *SwdTech (now at $1E3B)
; *Blitz (now at $1E3C)
; *Lores  (now at $1E3D-$1E3F)
  Find
Quote  
[-] The following 1 user says Thank You to madsiur for this post:
  • DrakeyC (04-18-2016)



Messages In This Thread
RE: GrayShadow's 'Giving Gogo Magic' code - by madsiur - 04-18-2016, 10:40 AM

Forum Jump:

Users browsing this thread: 2 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite