Users browsing this thread: 1 Guest(s)
The 15th Man Project: ASM Thread

#30
Posts: 175
Threads: 11
Thanks Received: 10
Thanks Given: 8
Joined: May 2013
Reputation: 13
Status
Well-Fed
... OKAY SO. I think I may actually have spell learning solved, and it's actually REALLY EASY, unless I'm missing something huge. Original code at C2/5E5C is first followed by my suggested change.

Code:
C2/5E59: B9 D8 3E     LDA $3ED8,Y    (Which character it is)
------
C2/5E5C: C9 0C        CMP #$0C
C2/5E5E: B0 13        BCS $5E73      (Branch if Gogo or Umaro)
------
C2/5E5C:
JMP CheckCharacter
NOP
------
C2/5E60: 20 83 62     JSR $6283      (Stores address for spells known by character in $F4)
C2/5E63: BE 10 30     LDX $3010,Y    (get offset to character info block)

And then CheckCharacter would be:

Code:
CMP #$0E         ; Is this Iris?
PHP
LDA #$1E1D       ; This stores in $F4 the start of Iris' spell list,
STA $F4          ; which other character have calculated at C2/6283.
PLP              ; That's called from C2/5E60, where we return below for other
JMP $5E63        ; characters, and Iris returns to C2/5E63 skipping that call
NotIris:
CMP #$0C         ; Is this Gogo or Umaro?
BCC NotGU        ; If not, branch.
JMP $5E73        ; If so, skip spell learning.
NotGU:
JMP $5E60        ; Otherwise, continue with spell learning, etc.


Both the code that governs learning from equipment and the code that governs learning from espers call the same subroutine -- C2/604B -- to actually teach the spell, and it references the character's spell block from $F4. The above code sets it manually for Iris, and then returns to the regular code to call C2/6283 for everyone else. Additionally, this also means that Iris would be able to uncurse the Cursed Shield, as it's checked when spells-learned-from-equipment are checked.

Also, I took a quick glance through, and it looks like there are only give locations in C0 that we'd need to change to move the chest data block -- and thinking about it, it makes even more sense to move that to $1CF8, the Bushido names block, because they're both 48 bytes long which means this would be compatible with the full range of potential chests, and also means we don't need to touch that last 'may or may not be used for anything' block of 16 bytes at $1E70. That would mean we'd need to change five lines to:

Code:
C0/1614:    B9F81C      LDA $1CF8,Y
C0/4C24:    B9F81C      LDA $1CF8,Y    (treasure chest bits)
C0/4C2D:    B9F81C     LDA $1CF8,Y    (treasure chest bits)
C0/4C34:    99F81C      STA $1CF8,Y    (set this chest as now open)
C0/BB1A:    9EF81C      STZ $1CF8,X    (set all treasure chests as not opened)


Next step is having her be able to /cast/ magic properly; I may wait on tackling that until the first of the week.


Current Project: FF6: Tensei | Discord ID: TristanGrayse
  Find
 



Messages In This Thread
The 15th Man Project: ASM Thread - by madsiur - 06-15-2013, 10:12 AM
RE: The 15th Man Project: ASM Thread - by B-Run - 06-15-2013, 11:08 AM
RE: The 15th Man Project: ASM Thread - by madsiur - 06-15-2013, 08:40 PM
RE: The 15th Man Project: ASM Thread - by B-Run - 06-20-2013, 05:05 PM
RE: The 15th Man Project: ASM Thread - by madsiur - 06-20-2013, 07:11 PM
RE: The 15th Man Project: ASM Thread - by madsiur - 06-29-2013, 11:28 AM
RE: The 15th Man Project: ASM Thread - by B-Run - 06-29-2013, 06:59 PM
RE: The 15th Man Project: ASM Thread - by B-Run - 08-12-2013, 10:11 PM
RE: The 15th Man Project: ASM Thread - by madsiur - 08-12-2013, 11:13 PM
RE: The 15th Man Project: ASM Thread - by Eggers - 08-14-2013, 02:13 AM
RE: The 15th Man Project: ASM Thread - by B-Run - 08-14-2013, 10:22 AM
RE: The 15th Man Project: ASM Thread - by Eggers - 08-21-2013, 12:56 AM
RE: The 15th Man Project: ASM Thread - by Eggers - 08-23-2013, 02:17 PM
RE: The 15th Man Project: ASM Thread - by B-Run - 08-23-2013, 04:28 PM
RE: The 15th Man Project: ASM Thread - by Eggers - 08-23-2013, 09:44 PM
RE: The 15th Man Project: ASM Thread - by B-Run - 08-23-2013, 10:54 PM
RE: The 15th Man Project: ASM Thread - by Eggers - 08-23-2013, 11:39 PM
RE: The 15th Man Project: ASM Thread - by Eggers - 08-31-2013, 02:46 PM
RE: The 15th Man Project: ASM Thread - by B-Run - 09-09-2013, 10:16 AM
RE: The 15th Man Project: ASM Thread - by Eggers - 09-09-2013, 04:27 PM
RE: The 15th Man Project: ASM Thread - by B-Run - 09-09-2013, 11:37 PM
RE: The 15th Man Project: ASM Thread - by madsiur - 09-10-2013, 12:36 AM
RE: The 15th Man Project: ASM Thread - by B-Run - 09-11-2013, 09:51 AM
RE: The 15th Man Project: ASM Thread - by B-Run - 09-11-2013, 04:34 PM
RE: The 15th Man Project: ASM Thread - by madsiur - 09-11-2013, 05:36 PM
RE: The 15th Man Project: ASM Thread - by B-Run - 09-13-2013, 11:14 AM
RE: The 15th Man Project: ASM Thread - by GrayShadows - 09-13-2013, 10:00 PM
RE: The 15th Man Project: ASM Thread - by B-Run - 10-07-2013, 09:55 AM

Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite