|
Andrea的showpokepic limit editor 1.3.0.0(可在本区置顶工具库内下载)可以解除红宝石,火红,绿宝石的showpokepic数量限制,但是却没有给出相应的关闭方法,若直接使用hidepokepic又会导致死机。不过由于一些机缘巧合我发现火红中的一个special有这种功能。
对于红宝石,hidebox并非是空命令,据说直接使用这个就能关闭,不做讨论。
如何解除限制:(来自andrea的工具,本质上就是强制使游戏无法检查到是否已经用过一次showpokepic(无法搜索到函数指针))- 火红: 写入00于0x9D31E
- 绿宝石: 写入00于0xE2916
复制代码 然后火红在0xCADDE写入00 00 00 00防止和其他框冲突,可用于测试的脚本:- #org @start
- lock
- faceplayer
- showpokepic 1 1 1
- showpokepic 2 15 1
- msgbox @thisisastring 6
- special 0x15A//调用2次,因为2个框
- special 0x15A
- release
- end
- #org @thisisastring
- = Hello World.
复制代码
绿宝石里没有这个special,所以写个源码搞定它:- .code 16
- push {r4, r5, lr}
- ldr r0, =0x80E2899
- ldr r3, =0x80A921D
- bl bx_r3
- lsl r0, r0, #0x18
- lsr r5, r0, #0x18
- cmp r5, #0xFF
- beq back
- lsl r0, r5, #2
- add r0, r0, r5
- lsl r0, r0, #3
- ldr r1, =0x3005E00
- add r4, r0, r1
- mov r1, #8
- ldrsh r0, [r4, r1]
- cmp r0, #0
- blt back
- cmp r0, #2
- ble loc1
- cmp r0, #3
- beq loc2
- b back
- loc1:
- mov r0, #0xC
- ldrsh r1, [r4, r0]
- lsl r0, r1, #4
- add r0, r0, r1
- lsl r0, r0, #2
- ldr r1, =0x2020630
- add r0, r0, r1
- ldrb r1, [r4, #0xC]
- ldr r3, =0x80B6071
- bl bx_r3
- ldrb r0, [r4, #0x12]
- bl sub_new
- mov r0, r5
- ldr r3, =0x80A909D
- bl bx_r3
- b back
- loc2:
- ldrb r0, [r4, #0x12]
- bl sub_new
- mov r0, r5
- ldr r3, =0x80A909D
- bl bx_r3
- back:
- pop {r4, r5, pc}
- .ltorg
- sub_new:
- push {r4, lr}
- mov r4, r0
- lsl r4, r4, #0x18
- lsr r4, r4, #0x18
- mov r0, r4
- ldr r3, =0x80038A5
- bl bx_r3
- mov r0, r4
- mov r1, #1
- ldr r3, =0x8197DF9
- bl bx_r3
- mov r0, r4
- ldr r3, =0x8003575
- pop {r4, pc}
- .ltorg
- bx_r3: bx r3
复制代码 编译好的:- 30 B5 18 48 18 4B 00 F0 4F F8 00 06 05 0E FF 2D 27 D0 A8 00 40 19 C0 00 14 49 44 18 08 21 60 5E 00 28 1E DB 02 28 02 DD 03 28 13 D0 19 E0 0C 20 21 5E 08 01 40 18 80 00 0D 49 40 18 21 7B 0D 4B 00 F0 32 F8 A0 7C 00 F0 19 F8 28 1C 0A 4B 00 F0 2B F8 06 E0 A0 7C 00 F0 11 F8 28 1C 06 4B 00 F0 23 F8 30 BD 99 28 0E 08 1D 92 0A 08 00 5E 00 03 30 06 02 02 71 60 0B 08 9D 90 0A 08 10 B5 04 1C 24 06 24 0E 20 1C 05 4B 00 F0 0E F8 20 1C 01 21 03 4B 00 F0 09 F8 20 1C 02 4B 10 BD A5 38 00 08 F9 7D 19 08 75 35 00 08 18 47
复制代码 测试脚本:- #org 0xF10000
- lock
- showpokepic 0x1 0x1 0x1
- showpokepic 0x4 0xF 0x1
- msgbox 0x81E8ACF 0x6 //一个原游戏中的文本,不改了
- callasm 0x8XXXXXX+1//上面的函数地址+1
- callasm 0x8XXXXXX+1
- release
- end
复制代码 |
|