Adapting Angelo's Name Patch
#3
Well, the first kick in the teeth - SE's documentation is plain wrong. The stuff marked "Spell list in battle" is not the spell list in battle, it's the spell list in the main menu (the epiphany moment was remembering partially-learned spells don't display in battle, so why would the coding for the battle menu talk about spell progress?). I did a file comparison between patched and unpatched roms, found some pointers in the C2/E bank changed, matched them, and voila. Yay, Spells are working.

Spent my time after troubleshooting, and failing, a new problem. I mostly got my new Esper names working - the "mostly" is that, as best I can tell, something in the game seems to think it still uses 8-letter names instead of 12. I say this because Ifrit (second name in code) displays the last four letters, including the empty spaces, of Ramuh's name, and then Shiva displays the last eight of Ifrit, and so on as it builds up. I've double and triple checked my code, used the file comparison to check for any "08" bytes I may have missed, looked at C3 bank dumps for any hints and compared them to both the patched rom and my work-in-progress, nothing. The names display properly in battle and everything else in the new Esper menu works fine, it's just the names. I really did try myself on this one, spent several hours, but no success.

Here's SE's coding for the Esper names. Whatever the "0A0A0A -> 20D0F0" is, both of them make my game crash, so I've left those as-is.

Code:
Esper Names:

  Original Code (discontinuous)
  C1/5FF3*:  A908        LDA #$08       ; 8 = Esper name length
  C1/6007*:  BFE1F6E6    LDA $E6F6E1,X  ; Load Esper name X
  C1/65D0:   A908        LDA #$08       ; 8 = Esper name length
  C1/65DB:   BFE1F6E6    LDA $E6F6E1,X  ; Load Esper name X
  C1/6688:   A908
  C1/668D:   A908        LDA #$08       ; from C1/6686)(Sets name length?
  C1/6698:   BFE1F6E6    LDA $E6F6E1,X  ; Loads Esper name X
  C2/E091:   04 03       TSB $03        ; Change the 04 bit
  C3/34F0:   0A          ASL A
  C3/34F1:   0A          ASL A
  C3/34F2:   0A          ASL A
  C3/34F4:   A00800      LDY #$0008     ; Esper name length
  C3/34F7:   BFE1F6E6    LDA $E6F6E1,X  ; Load Esper name
  C3/3508:   A00800      LDY #$0008
  C3/4F12:   37 42                      ; Level position, sub menu
  C3/54E6:   A20300      LDX #$0003     ; X position of left half of espers
  C3/54F1:   A21100      LDX #$0011     ; X position of right half of espers
  C3/54FA:   A00800      LDY #$0008     ; Esper name length
  C3/54FF:   A0E1F6      LDY #$F6E1     ; Esper name address
  C3/5504:   A9E6        LDA #$E6       ; Esper name bank
  C3/5539:   A2939E      LDX #$9E93
  C3/553F:   A9C7        LDA #$C7       ; The '...' character in the font)
  C3/5539:   A2939E      LDX #$9E93    
  C3/555D:   A00C00      LDY #$000C     ; Esper name is 8 letters, +1 for space, +3 for MP cost
  C3/5991:   10 70                      ; finger at esper name
  C3/5993:   18 7C                      ; finger at spell name
  C3/5995:   18 88                      ; finger at spell name
  C3/5997:   18 94                      ; finger at spell name
  C3/5999:   18 A0                      ; finger at spell name
  C3/599B:   18 AC                      ; finger at spell name
  C3/59BD:   0A          ASL A
  C3/59BE:   0A          ASL A
  C3/59BF:   0A          ASL A
  C3/59C1:   A00800      LDY #$0008     ; Indirectly says below is 8 chars long
  C3/59C4:   BFE1F6E6    LDA $E6F6E1,X  ; Load Esper X's name
  C3/5CC2:   2D 42 8B 95 00             ; Position of and word "LV"
  C3/5CEA:   23 44 8B 9E 9A AB A7 C5 91 9A AD 9E 00   ; Position of and words "Learn rate"
  C3/6055:   A0B139  LDY #$39B1         ; Position of Esper name status menu
  C3/7993:   A05B3B  LDY #$3B5B         ; Position of Esper name airship menu

  Modified Code (discontinuous)
  C1/5FF3*:  A90C        LDA #$0C       ; 12 = Esper name length
  C1/6007*:  BFE601F2    LDA $F201E6,X  ; Load Esper name X
  C1/65D0:   A90C        LDA #$0C       ; 12 = Esper name length
  C1/65DB:   BFE601F2    LDA $F201E6,X  ; Load Esper name X
  C1/6688:   A90C
  C1/668D:   A90C        LDA #$0C       ; from C1/6686 (Sets name length?)
  C1/6698:   BFE601F2    LDA $F201E6,X  ; Loads Esper name X
  C2/E091:   02 03                      ; Change the 04 bit
  C3/34F0:   20D0F0      JSR $F0D0              
  C3/34F4:   A00C00      LDY #$000C     ; Esper name length
  C3/34F7:   BFE601F2    LDA $F201E6,X  ; Load Esper name
  C3/3508:   A00C00      LDY #$000C
  C3/4F12:   41 42                      ; Level position, sub menu
  C3/54E6:   A20300      LDX #$0003     ; X position of left half of espers (NOT CHANGED)
  C3/54F1:   A21100      LDX #$0011     ; X position of right half of espers (NOT CHANGED)
  C3/54FA:   A00C00      LDY #$000C     ; Esper name length
  C3/54FF:   A0E601      LDY #$01E6     ; Esper name address
  C3/5504:   A9F2        LDA #$F2       ; Esper name bank
  C3/5539:   A29A9E      LDX #$9E9A
  C3/553F:   A9FF        LDA #$FF       ; The '...' character in the font)
  C3/5539:   A29A9E      LDX #$9E9A    
  C3/555D:   A01000      LDY #$0010     ; Esper name is 12 letters, +1 for space, +3 for MP cost
  C3/5991:   08 70                      ; finger at esper name
  C3/5993:   10 7C                      ; finger at spell name
  C3/5995:   10 88                      ; finger at spell name
  C3/5997:   10 94                      ; finger at spell name
  C3/5999:   10 A0                      ; finger at spell name
  C3/599B:   10 AC                      ; finger at spell name
  C3/59B4:   A00F44      LDY #$440F
  C3/59BD:   20D0F0      JSR $F0D0
  C3/59C1:   A00C00      LDY #$000C     ; Indirectly says below is 12 chars long
  C3/59C4:   BFE601F2    LDA $F201E6,X  ; Load Esper X's name
  C3/5CC2:   37 42 8B 95 00             ; Position of and word "LV"
  C3/5CEA:   1F 44 FF FF FF FF FF 91 9A AD 9E FF 00   ; Position of and word "Rate"
  C3/6055:   A0AD39  LDY #$39AD         ; Position of Esper name status menu
  C3/7993:   A0513B  LDY #$3B51         ; Position of Esper name airship menu
Reply


Messages In This Thread
Adapting Angelo's Name Patch - by DrakeyC - 08-10-2018, 09:27 AM
RE: Adapting Angelo's Name Patch - by madsiur - 08-10-2018, 09:51 AM
RE: Adapting Angelo's Name Patch - by DrakeyC - 08-10-2018, 03:15 PM
RE: Adapting Angelo's Name Patch - by madsiur - 08-11-2018, 12:11 AM
RE: Adapting Angelo's Name Patch - by DrakeyC - 08-11-2018, 12:38 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)