Users browsing this thread: 1 Guest(s)
Patch: Restored Ability Names (Update)
To get around the lack of MP cost for Espers in the menu, I decided to hijack the Esper bonus string, since my hack doesn't use Esper bonuses.
At the bolded line, C3/5A56, I jump to an empty spot in the C3 bank to try and implement the Esper MP cost code in some measure. Here's the entirety of that code, but I don't use all of it.
Unfortunately these efforts have been unsuccessful, the ID for the Espers isn't called properly and the code defaults to Ramuh's MP costs for all the Espers.
Does anyone have an idea for what to do?
Code:
Fork: Draw esper bonus message
C3/5A29: E220 SEP #$20 ; 8-bit A
C3/5A2B: BF006ED8 LDA $D86E00,X ; Esper bonus
C3/5A2F: C9FF CMP #$FF ; None?
C3/5A31: F034 BEQ $5A67 ; Blank if so
C3/5A33: 8D0242 STA $4202 ; Set multiplicand
C3/5A36: A909 LDA #$09 ; Text length
C3/5A38: 8D0342 STA $4203 ; Set multiplier
C3/5A3B: A01347 LDY #$4713 ; Tilemap ptr
C3/5A3E: 201935 JSR $3519 ; Set pos, WRAM
C3/5A41: A600 LDX $00 ; Char index: 0
C3/5A43: BFF75CC3 LDA $C35CF7,X ; "At..." char
C3/5A47: 8D8021 STA $2180 ; Add to string
C3/5A4A: E8 INX ; Point to next
C3/5A4B: E00E00 CPX #$000E ; Done all 14?
C3/5A4E: D0F3 BNE $5A43 ; Loop if not
C3/5A50: AE1642 LDX $4216 ; Index product
C3/5A53: A00900 LDY #$0009 ; Letters: 9
[b]C3/5A56: BFAEFECF LDA $CFFEAE,X ; Bonus char[/b]
C3/5A5A: 8D8021 STA $2180 ; Add to string
C3/5A5D: E8 INX ; Point to next
C3/5A5E: 88 DEY ; One less left
C3/5A5F: D0F5 BNE $5A56 ; Loop till last
C3/5A61: 9C8021 STZ $2180 ; End string
C3/5A64: 4CD97F JMP $7FD9 ; Draw string
Fork: Blank esper bonus message
C3/5A67: A01347 LDY #$4713 ; Tilemap ptr
C3/5A6A: 201935 JSR $3519 ; Set pos, WRAM
C3/5A6D: A01700 LDY #$0017 ; Letters: 23
C3/5A70: A28B9E LDX #$9E8B ; 7E/9E8B
C3/5A73: 8E8121 STX $2181 ; Set WRAM LBs
C3/5A76: A9FF LDA #$FF ; Space char
C3/5A78: 8D8021 STA $2180 ; Add to string
C3/5A7B: 88 DEY ; One less left
C3/5A7C: D0FA BNE $5A78 ; Loop till last
C3/5A7E: 9C8021 STZ $2180 ; End string
C3/5A81: 4CD97F JMP $7FD9 ; Draw 23 spaces
At the bolded line, C3/5A56, I jump to an empty spot in the C3 bank to try and implement the Esper MP cost code in some measure. Here's the entirety of that code, but I don't use all of it.
Code:
Draw esper's name and MP cost
C3/5509: A5E6 LDA $E6 ; BG1 write row
C3/550B: 1A INC A ; Go 1 row down
C3/550C: 209F80 JSR $809F ; Compute map ptr
C3/550F: C220 REP #$20 ; 16-bit A
C3/5511: 8A TXA ; ...
C3/5512: 8F899E7E STA $7E9E89 ; Set position
C3/5516: E220 SEP #$20 ; 8-bit A
C3/5518: 7B TDC ; Clear A
C3/5519: A5E5 LDA $E5 ; Esper slot
C3/551B: AA TAX ; Index it
C3/551C: BF899D7E LDA $7E9D89,X ; Esper in slot
C3/5520: C9FF CMP #$FF ; None?
C3/5522: F039 BEQ $555D ; Blank if so
C3/5524: 207455 JSR $5574 ; Choose palette
C3/5527: 206784 JSR $8467 ; Load name
C3/552A: 7B TDC ; ...
C3/552B: A5E5 LDA $E5 ; Esper slot
C3/552D: AA TAX ; Index it
C3/552E: BF899D7E LDA $7E9D89,X ; Esper in slot
C3/5532: 18 CLC ; Prepare ADC
C3/5533: 6936 ADC #$36 ; Get attack ID
C3/5535: 200D51 JSR $510D ; Define MP cost
C3/5538: 48 PHA ; Memorize it
C3/5539: A2939E LDX #$9E93 ; 7E/9E93
C3/553C: 8E8121 STX $2181 ; Set WRAM LBs
C3/553F: A9C7 LDA #$C7 ; Char: "…"
C3/5541: 8D8021 STA $2180 ; Add to string
C3/5544: 68 PLA ; MP cost
C3/5545: 20E004 JSR $04E0 ; Turn into text
C3/5548: A5F7 LDA $F7 ; Hundreds digit
C3/554A: 8D8021 STA $2180 ; Add to string
C3/554D: A5F8 LDA $F8 ; Tens digit
C3/554F: 8D8021 STA $2180 ; Add to string
C3/5552: A5F9 LDA $F9 ; Ones digit
C3/5554: 8D8021 STA $2180 ; Add to string
C3/5557: 9C8021 STZ $2180 ; End string
C3/555A: 4CD97F JMP $7FD9 ; Draw string
Unfortunately these efforts have been unsuccessful, the ID for the Espers isn't called properly and the code defaults to Ramuh's MP costs for all the Espers.
Does anyone have an idea for what to do?
« Next Oldest | Next Newest »
Users browsing this thread: 1 Guest(s)