Jump to content

[FE7/8] Enemy Range Display Hack


circleseverywhere
 Share

Recommended Posts

FE7 source:

.org 0x801c3e0            @select button hook
bl #0x8085c7c             @clear minimugs
ldr r2, #=0x202bbb8       @mimic $26018
ldr r1, [r2,#0x18]
ldr r0, [r2,#0x14]
ldr r3, =#0x8026023       @map sprite update routine
b #0x801c3f8              @skip past constants
.long 0x202bbb8
.long 0x8026023
bl GOTO_R3
bl #0x80215d4             @display dangerzone
b #0x801c43c              @pop and exit

GOTO_R3:
push {r4,r14}             @bxing to mid-routine
bx r3

There's also a bne at $1c8aa that needs to change to a b, otherwise it will crash when trying to view the R-menu on the last selected unit while showing enemy ranges.

FE8 source:

Hook:
.org 0x801cad8            @replaces start button hook
ldrh r1,[r2,#0x8]
mov r0,#0xC               @0x4 OR 0x8 i.e. Select OR Start
and r0,r1
cmp r0,#0x0
beq End
ldr r0,Jump_to
b GOTO_R0
End:
ldr r0,End_at             @could have replaced with b 0x801cb38 but annoying to assemble
b GOTO_R0
.align
Jump_to:
.long 0x08E90191          @free space
.align
End_at:
.long 0x0801CB39          @end of routine
GOTO_R0:
bx r0
.org 0x8e90190
ldrh r1,[r2,#0x4]
mov r0,#0x4             @check if select pressed
and r0,r1
cmp r0,#0x0
beq Select_Not_Pressed
ldr r0, Clear_Screen
bl GOTO_R0
ldr r2, MS_R2
ldr r1, [r2,#0x18]
ldr r0, [r2,#0x14]
ldr r3, MS_Hook
bl MS_GOTO_R3
ldr r0, Dangerzone
bl GOTO_R0

ldr r0,Back

GOTO_R0:
bx r0

.align
Dangerzone:
.long 0x080226F9
Clear_Screen:
.long 0x0808D151
MS_R2:
.long 0x0202BCB0
MS_Hook:
.long 0x08027ACB

Select_Not_Pressed:
ldr r2, Something        @mimic start pressed routine
mov r1, #0x16
ldsh r0,[r2,r1]
ldr r1, Something_2
ldr r1,[r1]
ldr r3, Start_cont
b GOTO_R3

.align
Something:
.long 0x0202BCB0
Something_2:
.long 0x0202E4D8
Start_cont:
.long 0x0801CAF7
Back:
.long 0x0801CB39

MS_GOTO_R3:
push {r4,r14}
GOTO_R3:
bx r3

Change bne at $1cf00 to b to fix crash.

Link to comment
Share on other sites

not that I'd actually use this hack since it doesn't tickle my fancy -- but I use the select button frequently when playing any FE for menu access instead of A, and I would have asked for a separate button

although FE7 has some weird 'help' toggle thing I think? I forget what that actually did, but yeah, cool thing nonetheless

Edited by Lamia
Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...