Page 1 of 1

Oh, you silly spells

PostPosted: Thu Aug 28, 2008 3:24 am
by Lenophis
Minor discovery. In spite of years of study by several hackers, resulting in a game that is more understood than practically any other, it looks like Square had even more dummied features that we were unaware of.

Turns out they intended spell learning by events to be possible, as evidenced not only by a dialogue string that can show what was learned, but as I recently have found, there's even dummied event code to teach it to you.

Code: Select all
Learn a spell, though this looks like unused code
C0/AE0D:   A5EB       LDA $EB        (load parameter, character)
C0/AE0F:   8D0242     STA $4202      (save as a multiplier)
C0/AE12:   A936       LDA #$36       (54...)
C0/AE14:   8D0342     STA $4203      (save as the other multiplier)
C0/AE17:   A5EC       LDA $EC        (load another parameter, the spell number)
C0/AE19:   C221       REP #$21
C0/AE1B:   EA         NOP
C0/AE1C:   6D1642     ADC $4216      (add the result of the multiplication)
C0/AE1F:   AA         TAX            (new index)
C0/AE20:   7B         TDC
C0/AE21:   E220       SEP #$20       (8 bit accum./memory)
C0/AE23:   A9FF       LDA #$FF       (empty slot in most cases, but for this...)
C0/AE25:   9D6E1A     STA $1A6E,X    (set spell as learned)
C0/AE28:   A903       LDA #$03       (Advance the script pointer by 3)
C0/AE2A:   4C5C9B     JMP $9B5C


The only reason I found this was because of a gripe Deathlike brought up here. I was looking at the code right after it (which is status tweaking in events) and I glanced up.

My thanks to birthday boy Imzogelmo for inspiring me to post this (and coming up with 90% of the post as well). :o