My original goal is to port FE7 Lightning animation to FE8, but got stuck when decompressing TSA. The following is the progress of my work. You can use these materials to achieve some other animation effects, or continue on it.
Now we have achieved free TSA Anime management.
1. FE7U Lightning
On reference to here and here,you can set such Event Code to call a lightning in FE7U:
_0xE1
_0xE0 0xFFFFFFFF 0x4 0x80 0x802 // Screen dims
SOUN 0xF5
_LIGHTNING 0xD0 0x00 0x00 0x00 0xD0 0x00 0x00 0x00
_0xE0 0xFFFFFFFF 0x4 0x100 0x1004 // Screen un-dims
ENDA
Using the same method as FE8U’s, we can find that the function it corresponds is Event ID=0xDD → 0x8011465
Inside this function, it insert Proc 0x8B92140:
_6C_YIELD
_6C_CALL_ROUTINE(0x801138D)
_6C_WHILE_ROUTINE(0x80AA719)
_6C_CALL_ROUTINE(0x8011431)
_6C_END
In the first proc function, 0x801138D. The real Lightning Anime proc, 0x8CE4CB0
is started and a Gfx set pointer, 0x8B92074
, in which the first WORD value is set as a flag, and the game start the judgment from 0x80AE60A: 0x3=Pal, 0x1=Gfx, 0x2=TSA
.
2. FE8U Break Stone Anime
In FE8U, you can write down such event code to get stone-break anime:
SVAL 0x2 Eirika
/*
CALL 0x9EEBB8
*/
STARTFADE
COLORFADE_FADE [0,32] 8 128 128 128
STAL 30
BREAKSTONE 0xFFFD
COLORFADE_FADE [0,32] 4 256 256 256
ENUN
Code BREAKSTONE 0xFFFD
Corresponds to data:
SHORT 0x4420 0xFFFD
Refer to Master EA Doc of StanH, this event ID = 0x44, which is calling function 0x801D28
, inside which, it called function 0x8012CFD
. You can also use such ASMC to get Break-Stone Anime independently:
CallBreakStone:
push {r4-r7, lr}
@ r0 should be ParentProc
mov r4, r0
ldr r0, =gUnitArrayBlue
mov r1, r4
blh 0x8012CFD @ (Unit*, Proc*)
.End:
pop {r4-r7, pc}
Inside function 0x8012CFD, it insert two proc:
@inside function 8012CFD
...
ldr r0, =0x8592608
bl ProcStartBlocking
...
bl 0x80AE7C4 @ r0=0x8592628
...
@ Inside function 80AE7C4
...
ldr r0, =0x8A20DFC
bl ProcStart
The latter proc, 0x8A20DFC works on showing Break-Stone Anime, inside which it loops function 0x80AE518
to show Gfx on BG2.
3. Some other weird FE8U TSA Anime
3.1. The coming of the Devil
ASMC 0x7F879
ENUN
3.2. Shining Floor
STARTFADE
COLORFADE_FADE [0,32] 8 128 128 128
STAL 30
ASMC 0x7FCC1
COLORFADE_FADE [0,32] 4 256 256 256
ENUN
3.3. Shining for scared stone
EVBIT_T 0x7
ASMC 0x8080475
STAL 60
ENUN
3.4. GlowingCross
STARTFADE
COLORFADE_FADE [0,32] 8 128 128 128
STAL 2
GLOWINGCROSS Eirika
STAL 30
GLOWINGCROSS_END
COLORFADE_FADE [0,32] 4 256 256 256
ENUN
3.5. Warp out
SVAL 0x2 Eirika
CALL 0x9EE51C
4. Reasons for port failure
The problem is on decompress process of TSA.
In FE8U’s Stone Break, it decompress TSA at Location 0x80AE6BE.
In FE7U’s Lightning, it decompress TSA at 0x80AA68C.
They use different way.
Now we have succeeded (see the top!).