GrayShadow's 'Giving Gogo Magic' code
#35
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)
Reply


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

Possibly Related Threads…
Thread Author Replies Views Last Post
  Gogo select more commands? xDaygo 12 10,703 05-06-2020, 06:50 PM
Last Post: PowerPanda
Dark Knight FF6 SNES vs GBA code differences? Royaken 2 2,590 11-01-2019, 07:32 PM
Last Post: Royaken
  Unable to find Gogo's palette set in Hex Jeff 7 5,310 10-01-2019, 04:06 PM
Last Post: Everything
  Replacing Gogo with Daryl Jeff 11 9,463 06-11-2019, 04:52 PM
Last Post: Jeff
  Giving Everyone the Same Desperation Attack PowerPanda 9 7,130 08-05-2018, 10:46 AM
Last Post: PowerPanda
  Lets discuss the Lore magic or magic menus in general JCE3000GT 0 1,860 05-20-2017, 08:49 PM
Last Post: JCE3000GT
  Giving Umaro's attacks to another character PowerPanda 13 14,496 03-30-2017, 03:14 PM
Last Post: madsiur
  Giving Gau's Magic to Umaro PowerPanda 2 3,577 03-11-2017, 07:36 PM
Last Post: B-Run
  asm hacking: "faking" short jumps from your code (in a new bank) to old code Eggers 2 3,911 04-16-2016, 07:18 PM
Last Post: madsiur
  Giving a weapon the Shuriken animation Kugawattan 6 7,432 11-30-2015, 09:51 PM
Last Post: Fenrir

Forum Jump:


Users browsing this thread: 2 Guest(s)