The code is ASMC 0x079AF4
R0 - 0x02025848 No idea.
R1 - 0x08079AF5 The offset of the routine called by the event, probably.
R2 - 0x00000000 Unused
R3 - 0x02025898 ???
R4 - 0x02025848 ???
R5 - 0x08CB9E30 ???
R6 - 0x0202589E
R7 - 0x08B90E48
R8 - 0x08B90E4C
R9 - 0x00000000
R10 - 0x00000000
R11 - 0x03007D9C
R12 - 0x00000001
r13 (sp) - 0x03007D9C
r14 (lr) - 0x0800D38D
r15 (pc) - 0x08079AF4
I'd log the other two routines to see what they did, but I'm lazy. Go get it yourself if it's that important t'ya.
Main routine
08079AF4 B500 push {r14} @ Obvious enough.
08079AF6 F00CF8C1 bl #0x8085C7C @ See below
08079AFA 4807 ldr r0,=#0x202BBF8 @ Contains main game mode.
08079AFC 2102 mov r1,#0x2 @ R1 = 0x02
08079AFE 7EC0 ldrb r0,[r0,#0x1B] @ Load current route: R0 = 0x03 (Hector mode)
08079B00 2802 cmp r0,#0x2 @ False (0x02 = Eliwood mode)
08079B02 D100 bne #0x8079B06 @ If the main lord is Eli, make R1 0x1 (char ID of Eliwood?)
08079B04 2101 mov r1,#0x1 @ R1 = 0x1
08079B06 1C08 mov r0,r1 @ Now R0 = 0x2 (If it's not Eliwood mode, it's obviously Hector mode!)
08079B08 F79EF914 bl #0x8017D34 @ Either this or the next branch command calls the promotion routine with
08079B0C 2100 mov r1,#0x0 @ R1 = 0
08079B0E F7B3F8BB bl #0x802CC88 @ the lord of choice as the first parameter.
08079B12 BC01 pop {r0} @ - Return.
08079B14 4700 bx r0 @ /
Routine at 0x08085C7C
08085C7C B500 push {r14} @ Guess
08085C7E 4811 ldr r0,=#0x8CC2C60 @ Offset of something?
08085C80 F77EFDF4 bl #0x800486C @ wat
08085C84 4810 ldr r0,=#0x8CC2CE8 @ Again, with a different number?
08085C86 F77EFDF1 bl #0x800486C @ Probably graphics.
08085C8A 4810 ldr r0,=#0x8CC2C00 @ no idea
08085C8C F77EFDEE bl #0x800486C @ it goes to the same place
08085C90 480F ldr r0,=#0x8CC2D38 @ ^
08085C92 F77EFDEB bl #0x800486C @ ^
08085C96 480F ldr r0,=#0x8CC2D98 @ ^
08085C98 F77EFDE8 bl #0x800486C @ ^
08085C9C 4B0E ldr r3,=#0x3002870 @ No clue what that is
08085C9E 1C19 mov r1,r3 @ whee
08085CA0 313C add r1,#0x3C @ R1 += 0x3C
08085CA2 203F mov r0,#0x3F @ R0 = 0x3F
08085CA4 780A ldrb r2,[r1] @ Load a value from there (on read: 0xFF)
08085CA6 4010 and r0,r2 @ On read: 0xFF & 0x3F = 0x3F (force into last 6 bits)
08085CA8 7008 strb r0,[r1] @ ...Store 0x3F into memory?
08085CAA 3108 add r1,#0x8 @ R1 += 8 (R1 = 0x030028B4)
08085CAC 2200 mov r2,#0x0 @ R2 = 0
08085CAE 2010 mov r0,#0x10 @ R0 = 16
08085CB0 7008 strb r0,[r1] @ Store 0x10 eight bytes after that...
08085CB2 1C18 mov r0,r3 @ Now R0 shares a value with R3?
08085CB4 3045 add r0,#0x45 @ R0 += 0x45 (= 0x03002B5)
08085CB6 7002 strb r2,[r0] @ Store a zero there...?
08085CB8 3001 add r0,#0x1 @ R0 += 1
08085CBA 7002 strb r2,[r0] @ Store a zero right after that?
08085CBC F7C4F9C0 bl #0x804A040 @ bleah
08085CC0 BC01 pop {r0} @ Return
08085CC2 4700 bx r0Judging from this, I'm assuming that all the routine does is check which mode it is, and call the regular promotion routine with Eliwood or Hector as the first parameter accordingly.
I should probably do some more testing, but it shouldn't be too hard to replicate.
Edited by Camtech, 09 March 2012 - 03:39 PM.











