744865306 发表于 2022-1-27 10:49:42

火红显示精灵队伍ASM

最近想到绿宝石有个special 0xA2能显示精灵队伍,而火红似乎没有这样的ASM,因此自己写了个:push {lr}
ldr r3,=0x08069940+1
bl call_bx
mov r0,#1
mov r1,#0
ldr r3,=0x0807A818+1
bl call_bx
ldr r0,=two+1
mov r1,#10
ldr r3,=0x0807741C+1
bl call_bx
pop {pc}
call_bx:
bx r3
bx r4
two:
push {r4,r5,lr}
add sp,#-12
lsl r0,r0,#24
lsr r5,r0,#24
ldr r0,=0x02037AB8
ldrb r1,
mov r0,#128
and r0,r1
lsl r0,r0,#24
lsr r4,r0,#24
cmp r4,#0
bne end
ldr r3,=0x080563F0+1
bl call_bx
str r4,
ldr r0,=0x0811FB28+1
str r0,
ldr r0,=three+1
str r0,
mov r0,#3
mov r1,#0
mov r2,#11
mov r3,#0
ldr r4,=0x0811EA44+1
bl call_bx+2
add r0,r5,#0
ldr r4,=0x08077508+1
bl call_bx+2
end:
add sp,#12
pop {r4,r5,pc}
three:
push {r4,lr}
ldr r4,=0x020370C0
ldr r3,=0x0811FB0C+1
bl call_bx
lsl r0,r0,#24
lsr r0,r0,#24
strh r0,
cmp r0,#5
bls four
mov r0,#255
strh r0,
four:
ldr r0,=0x03005024
ldr r1,=CB2_FadeFromPartyMenu+1
str r1,
ldr r0,=0x080567DC+1
ldr r3,=0x08000544+1
bl call_bx
CB2_FadeFromPartyMenu:
push {lr}
ldr r3,=pal_fill_black+1
bl call_bx
ldr r0,=five+1
mov r1,#10
ldr r3,=0x0807741C+1
bl call_bx
mov r0,#1
pop {r1}
bx r1
five:
push {r4,lr}
lsl r0,r0,#24
lsr r4,r0,#24
ldr r3,=0x0807AA70+1
bl call_bx
lsl r0,r0,#24
cmp r0,#0
beq end_
add r0,r4,#0
ldr r3,=0x08077508+1
bl call_bx
ldr r3,=0x0806994C+1
bl call_bx
ldr r3,=0x08069B34+1
bl call_bx
end_:
pop {r4,pc}
pal_fill_black:
push {lr}
ldr r3,=0x0807DB38+1
bl call_bx
mov r0,#0
mov r1,#0
ldr r3,=0x0807A818+1
bl call_bx
pop {pc}

744865306 发表于 2022-1-27 18:36:55

啊,原来有这个special,在0x9F,翻了老外的表才发现

jiangzhengwenjz 发表于 2022-1-28 04:59:31

既然ROM里本来就有,我就不索引了
页: [1]
查看完整版本: 火红显示精灵队伍ASM