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

#31
Posts: 732
Threads: 36
Thanks Received: 12
Thanks Given: 41
Joined: Jan 2016
Reputation: 6
Status
None
Okay, I'll change that bit to 1AFE for Edgar.

Nope. No spells. Played from the start of the game to be sure.
  Find
Quote  

#32
Posts: 3,966
Threads: 279
Thanks Received: 234
Thanks Given: 56
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
(03-13-2016, 09:47 PM)DrakeyC Wrote: Okay, I'll change that bit to 1AFE for Edgar.

Do you calculate in decimal? This is hexadecimal. $ means hexadecimal.

$36 * 4 = $D8
$1A6E + $D8 = profit!, but certainly not $1AFE

Get that windows calculator and add those two values.
  Find
Quote  
[-] The following 1 user says Thank You to madsiur for this post:
  • DrakeyC (03-13-2016)

#33
Posts: 732
Threads: 36
Thanks Received: 12
Thanks Given: 41
Joined: Jan 2016
Reputation: 6
Status
None
Oh. Hex 36, not the number 36. Whoops







One concern. Can I still use usME to change natural magic for Terra and Celes? I know Edgar will need Hex editing, ofc.
  Find
Quote  

#34
Posts: 732
Threads: 36
Thanks Received: 12
Thanks Given: 41
Joined: Jan 2016
Reputation: 6
Status
None
Okay, there seems to be a problem. Sabin just joined my party, and he knows the three Blitzes he should know by his level, but he also knows Mantra, which he's not set to learn until Level 25.
  Find
Quote  

#35
Posts: 3,966
Threads: 279
Thanks Received: 234
Thanks Given: 56
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)

#36
Posts: 732
Threads: 36
Thanks Received: 12
Thanks Given: 41
Joined: Jan 2016
Reputation: 6
Status
None
Well, I don't know what the first code means, I'm sorry but I don't understand the terms used in regards to what Hex I should be seeing. I can just confirm the stuff begins at C0/D68D.

But, in the second quote, may have found the culprit. C0/A21D and C0/A224, I have 3C1E instead of 281D like you do. I changed. In-game, Sabin still has Mantra, but if I'm understanding this right it's too late (I was stupid and didn't keep a save state from before he joins) to reset what he knows, but for future playthroughs, it'll be fixed?
  Find
Quote  

#37
Posts: 378
Threads: 94
Thanks Received: 17
Thanks Given: 26
Joined: Jul 2013
Reputation: 11
Status
Charmed
If you've done it correctly, it should. While I didn't have your exact issue I had instances of people learning or getting a wrong status (Dog Block in my case) that were fixed in the next playthrough.


Step forward, spriters! We are also responsible to make hacks look new and fresh, we are no less important than code or ASM hackers! CHARGE!!
Quote  
[-] The following 1 user says Thank You to Kugawattan for this post:
  • DrakeyC (04-18-2016)

#38
Posts: 732
Threads: 36
Thanks Received: 12
Thanks Given: 41
Joined: Jan 2016
Reputation: 6
Status
None
Cool, at least that was solved easily. Smile
  Find
Quote  

#39
Posts: 3,966
Threads: 279
Thanks Received: 234
Thanks Given: 56
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
(04-18-2016, 11:20 AM)DrakeyC Wrote: C0/A21D and C0/A224, I have 3C1E instead of 281D like you do.

The first code block I posted is from Gray Shadow's code, the known Blitz RAM byte is $1E3D. $1D28 is original RAM byte, but in your hack it is used by Umaro's magic. So basically you reverted that change to what it is in original game and now you have a RAM conflict in $1D28.

What I tried to explain is comparing the bytes of first two code blocks, first from your ROM and second one from the original game. Looking at them I see no difference except what should be changed, the two instances of that RAM offset. Second thing you'll sooner or later need to do is setting a breakpoint where I described ( after C0/D68D at the A6 in A600BF98F4E6 <- search for this). You'll need to run that piece of code to see why Sabin learn 3 Blitzes instead of two. If you're still playing with your old ROM and never restarted a playthrough after applying the ASM file, you should consider starting one because for obvious reasons everything will be broken.
  Find
Quote  

#40
Posts: 732
Threads: 36
Thanks Received: 12
Thanks Given: 41
Joined: Jan 2016
Reputation: 6
Status
None
I'm sorry, I'm stupid. The only part of that I understood is I need to start replaying because I did something wrong?

EDIT - Okay, if I understand this right, and I'm sure I don't - the bytes I pointed out were different, are telling the Rom to look at C0/1E3D / C0/1D28 for the Blitzes to be learned? Because if so, comparing my hack to vanilla, the bytes at both addresses are identical.
  Find
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite