tinix
PearlShipper & C Programmer
- 86
- Posts
- 15
- Years
- Bratislava, Slovakia
- Seen Jun 19, 2021
So lately I have been thinking aboout how to edit sprites of rival in the fire red intro depending on the gender of player. After a while of reaserch I managed to do it. Although I dont like a few things about that code it works and doesnt seem to cause any harm to the ROM. So here are the routines
Branching routine to be inserted at 0x131248:
Actual code that modifies the behaivour:
Next thing Im going to look into are names.
Video:
Branching routine to be inserted at 0x131248:
Spoiler:
Code:
.align 2
.thumb
.thumb_func
; should go at 0x131248
main:
push {r4}
ldr r4, .POINTER
bx r4
.POINTER
.word 0x08900001
Actual code that modifies the behaivour:
Spoiler:
Code:
.align 2
.thumb
.thumb_func
.main:
pop {r4}
push {r3}
ldr r3, .PLAYER_DATA
ldr r3, [r3]
ldrb r3, [r3, #0x8]
mov r1, #0x60
mov r2, #0x40
cmp r3,#0x0
bne .girl
pop {r3}
push {r3}
ldr r0, .IMAGE_1a
ldr r3, .FUN1
bl .jmp
pop {r3}
ldr r0, .IMAGE_1
ldr r2, .RETURN
bx r2
.girl:
pop {r3}
push {r3}
ldr r0, .IMAGE_2a
ldr r3, .FUN1
bl .jmp
pop {r3}
ldr r0, .IMAGE_2
ldr r2, .RETURN
bx r2
.jmp:
bx r3
.align 2
.PLAYER_DATA:
.word 0x0300500C
.IMAGE_1:
.word 0x084623EC
.IMAGE_2:
.word 0x08460F14
.IMAGE_1a:
.word 0x084623AC
.IMAGE_2a:
.word 0x08460ED4
.RETURN:
.word 0x08131255
.FUN1:
.word 0x080703ED
Next thing Im going to look into are names.
Video:
Last edited: