Glory To Arstotzka

Seen January 28th, 2018
Posted December 6th, 2015
732 posts
11.4 Years
I think I've found the code which causes the Mirror Coat/Counter bug in Fire Red.
Change it to this, and it should hopefully fix it.
0801F6C2: 86 7A
0801F908: 00 2E
0801F90A: 41 D1
Also, Darthatron's routine for showing the images is slightly buggy. It turns out the move index is actually DMA protected, but in a really odd way. It only gets DMA shifted after certain actions are taken within the game's overworld. Anyway - to solve this, change the parts in BOLD in Darthatron's original routine (or just copy this routine, I suppose), and then follow Darthatron's original post to insert it.

.align 2
 push {r0-r4}
 ldr r0, .CurMoveIndex
 ldrb r1, [r0]
 lsl r1, r1, #1
 ldr r0, .Move_List_Loc
 ldr r0, [r0]
 ldr r3, .number
 add r0, r0, r3
 add r0, r0, r1
 ldrh r3, [r0]
 cmp r3, #0x0
 beq Finish
 lsl r0, r3, #1
 add r0, r0, r3
 lsl r0, r0, #2
 ldr r1, .MoveBase
 add r0, r0, r1
 ldrb r4, [r0, #10]
 lsl r0, r4, #1
 add r4, r4, r0
 lsl r4, r4, #6
 ldr r0, .SplitImages
 add r0, r4
 ldr r1, .VRAM
 mov r2, #0x30
 swi #0xB 
 ldr r0, .SplitImages
 add r0, r4
 add r0, #0x60
 ldr r1, .VRAM
 mov r2, #0x1E
 lsl r2, #0x04
 add r1, r1, r2
 mov r2, #0x30
 swi #0xB 
 pop {r0-r4}
 ldr r4, .Some_Offset
 ldr r0, [r4]
 ldr r1, .Return_Addr
 bx r1
.align 2
.MoveBase:  .word 0x08250C04
.number: .word 0x00003258
.CurMoveIndex: .word 0x0203B16D
.Move_List_Loc:  .word 0x0203B140
.VRAM:   .word 0x06001800
.SplitImages: .word 0x08YYYYYY
.Some_Offset: .word 0x0203B148
.Return_Addr: .word 0x0813A17D
Hey guys, please check out my recreations of the gen 1 and 2 music on my custom engine at my SoundCloud! - Here!