split rom_8148B8C.s

This commit is contained in:
YamaArashi 2017-01-02 04:22:46 -08:00
parent 98e5b2ccac
commit 8b98e7a24b
7 changed files with 1589 additions and 1539 deletions

115
asm/bard_music.s Normal file
View File

@ -0,0 +1,115 @@
.include "constants/gba_constants.inc"
.include "constants/species_constants.inc"
.include "asm/macros.inc"
.syntax unified
.text
thumb_func_start sub_814A2B8
sub_814A2B8: @ 814A2B8
ldr r2, _0814A2CC @ =gUnknown_08417068
lsls r0, 2
adds r0, r2
ldr r0, [r0]
lsls r1, 1
adds r1, r0
movs r2, 0
ldrsh r0, [r1, r2]
bx lr
.align 2, 0
_0814A2CC: .4byte gUnknown_08417068
thumb_func_end sub_814A2B8
thumb_func_start sub_814A2D0
sub_814A2D0: @ 814A2D0
lsls r0, 16
lsls r1, 16
lsrs r1, 16
ldr r2, _0814A2E8 @ =gBardMusicTable
lsrs r0, 14
adds r0, r2
ldr r0, [r0]
lsls r2, r1, 1
adds r2, r1
lsls r2, 4
adds r0, r2
bx lr
.align 2, 0
_0814A2E8: .4byte gBardMusicTable
thumb_func_end sub_814A2D0
thumb_func_start sub_814A2EC
sub_814A2EC: @ 814A2EC
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
adds r6, r0, 0
lsls r2, 16
lsrs r2, 16
mov r9, r2
ldr r4, _0814A370 @ =gUnknown_084170F4
adds r2, r1, 0
adds r3, r6, 0
adds r3, 0x18
movs r7, 0x5
_0814A306:
ldrb r0, [r2]
strh r0, [r3]
ldrb r0, [r2]
cmp r0, 0xFF
beq _0814A328
movs r1, 0x1
ldrsb r1, [r2, r1]
lsls r0, 2
adds r0, r4
ldr r0, [r0]
adds r1, r0
strh r1, [r3, 0x2]
ldrh r0, [r2, 0x4]
strh r0, [r3, 0x6]
ldrh r0, [r6, 0x4]
adds r0, r1
strh r0, [r6, 0x4]
_0814A328:
adds r2, 0x8
adds r3, 0x8
subs r7, 0x1
cmp r7, 0
bge _0814A306
movs r7, 0x6
movs r5, 0
movs r0, 0x1E
mov r8, r0
adds r4, r6, 0
_0814A33C:
mov r0, r8
add r0, r9
adds r1, r5, 0
bl sub_814A2B8
adds r1, r0, 0
strh r1, [r4, 0x1C]
adds r4, 0x8
adds r5, 0x1
cmp r5, r7
blt _0814A33C
ldrb r1, [r6]
adds r1, 0x1
movs r2, 0
strb r1, [r6]
strb r2, [r6, 0x1]
strb r2, [r6, 0x2]
strb r2, [r6, 0x3]
strh r2, [r6, 0xA]
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0814A370: .4byte gUnknown_084170F4
thumb_func_end sub_814A2EC
.align 2, 0 @ Don't pad with nop.

File diff suppressed because it is too large Load Diff

93
asm/fldeff_teleport.s Normal file
View File

@ -0,0 +1,93 @@
.include "constants/gba_constants.inc"
.include "constants/species_constants.inc"
.include "asm/macros.inc"
.syntax unified
.text
thumb_func_start SetUpFieldMove_Teleport
SetUpFieldMove_Teleport: @ 814A374
push {lr}
ldr r0, _0814A38C @ =gMapHeader
ldrb r0, [r0, 0x17]
bl is_light_level_1_2_3_or_6
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
beq _0814A390
movs r0, 0
b _0814A39E
.align 2, 0
_0814A38C: .4byte gMapHeader
_0814A390:
ldr r1, _0814A3A4 @ =gUnknown_0300485C
ldr r0, _0814A3A8 @ =sub_808AB90
str r0, [r1]
ldr r1, _0814A3AC @ =gUnknown_03005CE4
ldr r0, _0814A3B0 @ =hm_teleport_run_dp02scr
str r0, [r1]
movs r0, 0x1
_0814A39E:
pop {r1}
bx r1
.align 2, 0
_0814A3A4: .4byte gUnknown_0300485C
_0814A3A8: .4byte sub_808AB90
_0814A3AC: .4byte gUnknown_03005CE4
_0814A3B0: .4byte hm_teleport_run_dp02scr
thumb_func_end SetUpFieldMove_Teleport
thumb_func_start hm_teleport_run_dp02scr
hm_teleport_run_dp02scr: @ 814A3B4
push {lr}
bl new_game
movs r0, 0x3F
bl FieldEffectStart
ldr r0, _0814A3CC @ =gUnknown_0202FF84
ldr r1, _0814A3D0 @ =gUnknown_03005CE0
ldrb r1, [r1]
str r1, [r0]
pop {r0}
bx r0
.align 2, 0
_0814A3CC: .4byte gUnknown_0202FF84
_0814A3D0: .4byte gUnknown_03005CE0
thumb_func_end hm_teleport_run_dp02scr
thumb_func_start FldEff_UseTeleport
FldEff_UseTeleport: @ 814A3D4
push {lr}
bl oei_task_add
lsls r0, 24
lsrs r0, 24
ldr r2, _0814A3FC @ =gTasks
lsls r1, r0, 2
adds r1, r0
lsls r1, 3
adds r1, r2
ldr r2, _0814A400 @ =sub_814A404
lsrs r0, r2, 16
strh r0, [r1, 0x18]
strh r2, [r1, 0x1A]
movs r0, 0x1
bl SetPlayerAvatarTransitionFlags
movs r0, 0
pop {r1}
bx r1
.align 2, 0
_0814A3FC: .4byte gTasks
_0814A400: .4byte sub_814A404
thumb_func_end FldEff_UseTeleport
thumb_func_start sub_814A404
sub_814A404: @ 814A404
push {lr}
movs r0, 0x3F
bl FieldEffectActiveListRemove
bl sub_8087BA8
pop {r0}
bx r0
thumb_func_end sub_814A404
.align 2, 0 @ Don't pad with nop.

1166
asm/intro_credits_graphics.s Normal file

File diff suppressed because it is too large Load Diff

76
asm/rom_814A518.s Normal file
View File

@ -0,0 +1,76 @@
.include "constants/gba_constants.inc"
.include "constants/species_constants.inc"
.include "asm/macros.inc"
.syntax unified
.text
thumb_func_start sub_814A518
sub_814A518: @ 814A518
push {r4,r5,lr}
adds r4, r0, 0
lsls r1, 24
lsrs r5, r1, 24
bl StripExtCtrlCodes
adds r0, r4, 0
bl StringLength
lsls r0, 24
lsrs r1, r0, 24
cmp r5, 0xFC
bne _0814A556
cmp r1, 0x5
bhi _0814A55A
movs r3, 0xFC
movs r2, 0x7
_0814A53A:
adds r0, r4, r1
strb r3, [r0]
strb r2, [r0, 0x1]
adds r0, r1, 0x2
lsls r0, 24
lsrs r1, r0, 24
cmp r1, 0x5
bls _0814A53A
b _0814A55A
_0814A54C:
adds r0, r4, r1
strb r5, [r0]
adds r0, r1, 0x1
lsls r0, 24
lsrs r1, r0, 24
_0814A556:
cmp r1, 0x5
bls _0814A54C
_0814A55A:
adds r1, r4, r1
movs r0, 0xFF
strb r0, [r1]
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_814A518
thumb_func_start sub_814A568
sub_814A568: @ 814A568
push {r4,lr}
adds r4, r0, 0
bl StringLength
lsls r0, 16
lsrs r0, 16
cmp r0, 0x5
bhi _0814A582
adds r0, r4, 0
movs r1, 0x1
bl ConvertInternationalString
b _0814A588
_0814A582:
adds r0, r4, 0
bl StripExtCtrlCodes
_0814A588:
pop {r4}
pop {r0}
bx r0
thumb_func_end sub_814A568
.align 2, 0 @ Don't pad with nop.

133
asm/unknown_debug_menu.s Normal file
View File

@ -0,0 +1,133 @@
.include "constants/gba_constants.inc"
.include "constants/species_constants.inc"
.include "asm/macros.inc"
.syntax unified
.text
thumb_func_start unref_sub_814A414
unref_sub_814A414: @ 814A414
push {lr}
sub sp, 0x8
bl MenuZeroFillScreen
movs r0, 0
movs r1, 0
movs r2, 0x10
movs r3, 0x12
bl MenuDrawTextWindow
ldr r3, _0814A458 @ =gUnknown_0842C29C
movs r0, 0x2
movs r1, 0x1
movs r2, 0x8
bl PrintMenuItems
movs r0, 0
str r0, [sp]
movs r0, 0xF
str r0, [sp, 0x4]
movs r0, 0
movs r1, 0x1
movs r2, 0x1
movs r3, 0x8
bl InitMenu
ldr r1, _0814A45C @ =gCallback_03004AE8
ldr r0, _0814A460 @ =sub_814A464
str r0, [r1]
movs r0, 0
add sp, 0x8
pop {r1}
bx r1
.align 2, 0
_0814A458: .4byte gUnknown_0842C29C
_0814A45C: .4byte gCallback_03004AE8
_0814A460: .4byte sub_814A464
thumb_func_end unref_sub_814A414
thumb_func_start sub_814A464
sub_814A464: @ 814A464
push {lr}
bl ProcessMenuInput
lsls r0, 24
lsrs r0, 24
adds r2, r0, 0
lsls r0, r2, 24
asrs r1, r0, 24
movs r0, 0x2
negs r0, r0
cmp r1, r0
bne _0814A480
movs r0, 0
b _0814A4B2
_0814A480:
movs r0, 0x1
negs r0, r0
cmp r1, r0
beq _0814A4AC
ldr r0, _0814A4A0 @ =gUnknown_02024D1E
strb r2, [r0]
ldr r2, _0814A4A4 @ =gCallback_03004AE8
ldr r0, _0814A4A8 @ =gUnknown_0842C29C
lsls r1, 3
adds r0, 0x4
adds r1, r0
ldr r0, [r1]
str r0, [r2]
movs r0, 0
b _0814A4B2
.align 2, 0
_0814A4A0: .4byte gUnknown_02024D1E
_0814A4A4: .4byte gCallback_03004AE8
_0814A4A8: .4byte gUnknown_0842C29C
_0814A4AC:
bl sub_8071C20
movs r0, 0x1
_0814A4B2:
pop {r1}
bx r1
thumb_func_end sub_814A464
thumb_func_start sub_814A4B8
sub_814A4B8: @ 814A4B8
push {r4,lr}
ldr r2, _0814A4FC @ =gSaveBlock2
ldr r1, _0814A500 @ =0x00000556
adds r0, r2, r1
movs r1, 0x3
strb r1, [r0]
ldr r3, _0814A504 @ =0x00000557
adds r0, r2, r3
strb r1, [r0]
ldr r3, _0814A508 @ =gUnknown_02024D1E
ldrb r0, [r3]
adds r0, 0x1
ldr r4, _0814A50C @ =0x0000055c
adds r1, r2, r4
strh r0, [r1]
ldrb r0, [r3]
adds r0, 0x1
ldr r3, _0814A510 @ =0x0000055e
adds r1, r2, r3
strh r0, [r1]
subs r4, 0x4
adds r0, r2, r4
movs r1, 0x1
strh r1, [r0]
ldr r0, _0814A514 @ =0x0000055a
adds r2, r0
strh r1, [r2]
bl sub_8071C20
movs r0, 0x1
pop {r4}
pop {r1}
bx r1
.align 2, 0
_0814A4FC: .4byte gSaveBlock2
_0814A500: .4byte 0x00000556
_0814A504: .4byte 0x00000557
_0814A508: .4byte gUnknown_02024D1E
_0814A50C: .4byte 0x0000055c
_0814A510: .4byte 0x0000055e
_0814A514: .4byte 0x0000055a
thumb_func_end sub_814A4B8
.align 2, 0 @ Don't pad with nop.

View File

@ -213,7 +213,12 @@ SECTIONS {
asm/braille_puzzles.o(.text);
asm/pokeblock_feed.o(.text);
src/clear_save_data_menu.o(.text);
asm/rom_8148B8C.o(.text);
asm/intro_credits_graphics.o(.text);
asm/evolution_graphics.o(.text);
asm/bard_music.o(.text);
asm/fldeff_teleport.o(.text);
asm/unknown_debug_menu.o(.text);
asm/rom_814A518.o(.text);
src/menu_cursor.o(.text);
} =0