ASM request 2 electric boogaloo (FE6)

I’d like a copy of the ASM that decides whether to go Ilia or Sacae that checks for ID 24 (repurposed for B route Tate) instead of ID 2E (Tate’s A route ID).
Probably as simple again as replacing 0x2E with 0x24 but I need it in the insertable format, and I know how to insert it from my previous thread. Should be last ASM request unless Klein, Tate or Geese are used in some other ASM besides those addressed in this and the previous thread.
Then I plan to make visiting the village that takes you to A route turn on flag 78 (flags are off by default right?), and I hope this should work where ASM 885A6B5 is a stand-in for the ASM I need:


Same eventing also to be done in gaiden map where same Ilia vs Sacae check is done. Tell me if I messed it up.

Thanks in advance :smiley:

I think you should try and learn how to make inline changes using the disassembler. It would greatly help you when trying to modify FE6’s large amount of ASM functions.

Anyway, here’s what you need to do:


For your second question:
Could you explain clearer why you need the GOTO_IFAF after the GOTO_IFET for flag 0x78?

I know how to do that, but this is the same thing as previous thread where I need two versions of the ASM, the original and one to insert where ID 2E is replaced with 24. Gotta do the insert ASM embed at given address dance, doing inline changes to the existing ASM isn’t what I need.
GOTO_IFAF is the same ilia vs sacae asm but for ID 24. Flag 78 is off if player went B route, so the ASM that checks B route Tate’s ID of 24 is needed. If flag 78 is on the original ASM runs.
Since you go Ilia if Shanna and Tate gained more xp than Sue and Shin, and Tate is ID 2E if you went A route and 24 if B route, I need to do this business. Tate causes such problems lol.

Ah, that’s easy enough then, you just need a .s file with 0x24 instead of 0x2E? Can do.

PUSH {r4, r5, lr} //Route split choice
MOV r0, #0x5
BL 0x08084F4C //BWL_GetEntry
MOV r2, r0
LDRB r1, [r2, #0x7]
LSR r0, r1, #0x4
LDRB r2, [r2, #0x8]
LSL r5, r2, #0x4
ORR r5, r0
MOV r0, #0x4
BL 0x08084F4C
MOV r2, r0
LDRB r0, [r2, #0x7]
LSR r1 ,r0 ,#0x4
LDRB r2, [r2, #0x8]
LSL r0 ,r2 ,#0x4
ORR r0 ,r1
ADD r5 ,r5, R0
MOV r0, #0x24
BL 0x08084F4C   //BWL_GetEntry
MOV r2 ,r0
LDRB r1, [r2, #0x7]
LSR r0 ,r1 ,#0x4
LDRB r2, [r2, #0x8]
LSL r4 ,r2 ,#0x4
ORR r4 ,r0
MOV r0, #0x31
BL 0x08084F4C   //BWL_GetEntry
MOV r2 ,r0
LDRB r0, [r2, #0x7]
LSR r1 ,r0 ,#0x4
LDRB r2, [r2, #0x8]
LSL r0 ,r2 ,#0x4
ORR r0 ,r1
ADD r4 ,r4, R0
CMP r5 ,r4
BHI #0x806C5FE
MOV r0, #0x0
B 0x806C600
MOV r0, #0x1
POP {r4,r5}
POP {r1}
BX r1

Just put this in a .s file and insert it to builder, you’ve done this before. :smile:

.s? last time it was .asm

Oh, either work. .s and .asm are interchangable, skillsys essentially standardised the usage of .s files tho.

Thank you :slight_smile:

image
uh oh. oh yeah. same thing as before. // needs to be @
EDIT: After doing that, no more garbage following instruction, still bad expression. what does it not like

@ditto do I ignore this error?

Hm. Try bhi 0x806C5FE instead of bhi #0x806C5FE.
In my own asm, I use labels mostly and haven’t had to branch to addresses much, the syntax error is probably builder sticking it like that (wrongly, I assume) in the disassembler, and me copy-pasting it without changing anything that’s not 0x2E to 0x24.

That worked

1 Like

when the asm runs the screen is stuck on black and it can’t get past the event. even after recruiting sue shin shanna and tate it doesn’t work, and technically you can miss everyone but shanna

@ditto When you skip convo it’s stuck on black, when you don’t it just stays here forever
it doesn’t crash




do I make a report7z

Yeah, definitely. if you’re on the discord maybe shoot it into #febuilder_help too.

Banned from there. FE6 Ascending Level Recruit.REPORT.20240815012247.report.report.7z - Google Drive
FE6 Bugfix Edition patches to FE6 Japanese so I put that as the original rom

If not a fix for the ASM, the Ilia Sacae route split could be random 50/50. How would I do that?
Any other ideas? Maybe go to Sacae if step on a random tile somewhere.

.thumb
.macro blh to, reg=r3
  ldr \reg, =\to
  mov lr, \reg
  .short 0xf800
.endm
PUSH {r4, r5, lr} @Route split choice
MOV r0, #0x5
blh 0x08084F4C @BWL_GetEntry
MOV r2, r0
LDRB r1, [r2, #0x7]
LSR r0, r1, #0x4
LDRB r2, [r2, #0x8]
LSL r5, r2, #0x4
ORR r5, r0
MOV r0, #0x4
blh 0x08084F4C
MOV r2, r0
LDRB r0, [r2, #0x7]
LSR r1 ,r0 ,#0x4
LDRB r2, [r2, #0x8]
LSL r0 ,r2 ,#0x4
ORR r0 ,r1
ADD r5 ,r5, R0
MOV r0, #0x24
blh 0x08084F4C   @BWL_GetEntry
MOV r2 ,r0
LDRB r1, [r2, #0x7]
LSR r0 ,r1 ,#0x4
LDRB r2, [r2, #0x8]
LSL r4 ,r2 ,#0x4
ORR r4 ,r0
MOV r0, #0x31
blh 0x08084F4C   @BWL_GetEntry
MOV r2 ,r0
LDRB r0, [r2, #0x7]
LSR r1 ,r0 ,#0x4
LDRB r2, [r2, #0x8]
LSL r0 ,r2 ,#0x4
ORR r0 ,r1
ADD r4 ,r4, R0
CMP r5 ,r4
BHI RetTrue
MOV r0, #0x0
B End
RetTrue:
MOV r0, #0x1
End:
POP {r4,r5}
POP {r1}
BX r1
.ltorg

@ditto you need to replace branches like bhi 0x8------ with bhi LabelName and add the labels based on the original addresses. Here it just looks like the labels are for returning true/false.

Seems like the ASM works. I thought flag 78 wasn’t working but after some fiddling I think it does. I think it was sending me to Ilia either way even when Sue had gained some xp because you need to have recruited Shin too. It was sending me to Ilia either way when I only recruited Shanna though, so you don’t need Tate for Ilia I suppose? Thanks

Ah, got it wrong then, good to know though.