docing and one decomp of a function

This commit is contained in:
Seth Barberee 2020-10-13 17:30:44 -05:00
parent 14b4ad7735
commit 3c986032f8
7 changed files with 71 additions and 38 deletions

View File

@ -8,18 +8,18 @@
arm_func_start sub_80001E8
sub_80001E8:
stmdb sp!, {r4-r11}
mov r12, 0x4000000
mov r12, 0x4000000 @ REG_BASE
ldr r11, _08000224
add r10, r11, 0x40
mov r9, 0x1
mov r8, 0
strb r8, [r12, 0x208]
strb r8, [r12, 0x208] @ REG_IME
ldmia r10, {r0-r7}
stmia r10!, {r4-r7}
stmia r10!, {r0-r3}
ldr r0, [r11, 0x4]
str r8, [r11, 0x4]
strb r9, [r12, 0x208]
strb r9, [r12, 0x208] @ REG_IME
ldmia sp!, {r4-r11}
bx lr
.align 2, 0
@ -29,7 +29,7 @@ _08000224: .4byte gUnknown_202DCF8
arm_func_start sub_8000228
sub_8000228:
mov r12, 0x4000000
add r12, r12, 0x120
add r12, r12, 0x120 @ REG_SIODATA32
ldmia r12, {r0,r1}
stmdb sp!, {r7-r11}
ldr r11, _08000340
@ -92,7 +92,7 @@ _080002F4:
ldrb r0, [r11]
cmp r0, 0
beq _08000334
ldr r7, _08000344
ldr r7, _08000344 @ REG_TM3CNT_H
mov r0, 0
strh r0, [r7]
ldrh r0, [r12, 0x8]

View File

@ -5,18 +5,11 @@
.text
@ Unused
thumb_func_start sub_80001DC
sub_80001DC:
mov r0, sp
bx lr
thumb_func_end sub_80001DC
thumb_func_start sub_80001E0
sub_80001E0:
ldr r0, _080001E4
bx lr
.align 2, 0
_080001E4: .4byte gUnknown_3004000
thumb_func_end sub_80001E0
.align 2, 0 @ Don't pad with nop.

View File

@ -4476,7 +4476,7 @@ sub_80921A8:
ldr r0, [r0]
bx lr
.align 2, 0
_080921B4: .4byte gUnknown_810B44C
_080921B4: .4byte gRescueTeamRanks
thumb_func_end sub_80921A8
thumb_func_start sub_80921B8

View File

@ -11323,18 +11323,19 @@ gUnknown_810AF50: @ 810AF50
.global gTeamRanks
gTeamRanks: @ 810B04C
@ Seems to have some adventure log stuff too
.incbin "baserom.gba", 0x10B04C, 0x400
.global gUnknown_810B44C
gUnknown_810B44C: @ 810B44C
.global gRescueTeamRanks
gRescueTeamRanks: @ 810B44C
.incbin "baserom.gba", 0x10B44C, 0x7C
.global gUnknown_810B4C8
gUnknown_810B4C8: @ 810B4C8
.global gAbilityNames
gAbilityNames: @ 810B4C8
.incbin "baserom.gba", 0x10B4C8, 0x4C0
.global gUnknown_810B988
gUnknown_810B988: @ 810B988
.global AbilityDescriptions
AbilityDescriptions: @ 810B988
.incbin "baserom.gba", 0x10B988, 0x1284
.global gUnknown_810CC0C
@ -11364,31 +11365,45 @@ gUnknown_810D628: @ 810D628
.global gUnknown_810DD58
gUnknown_810DD58: @ 810DD58
.incbin "baserom.gba", 0x10DD58, 0x10
.byte 0x50, 0xDD, 0x10, 0x08
.asciz "IQ Skills"
.align 2,0
.global gUnknown_810DD68
gUnknown_810DD68: @ 810DD68
.incbin "baserom.gba", 0x10DD68, 0x18
.byte 0x5C, 0xDD, 0x10, 0x08
.asciz "Level: #>82.$d0 "
.align 2,0
.global gUnknown_810DD80
gUnknown_810DD80: @ 810DD80
.incbin "baserom.gba", 0x10DD80, 0x1C
.byte 0x6C, 0xDD, 0x10, 0x08
.asciz "Exp. Pts.: #>82.$d1 "
.align 2,0
.global gUnknown_810DD9C
gUnknown_810DD9C: @ 810DD9C
.incbin "baserom.gba", 0x10DD9C, 0x1C
.byte 0x84, 0xDD, 0x10, 0x08
.asciz "To next level:#>82.$d0"
.align 2,0
.global gUnknown_810DDB8
gUnknown_810DDB8: @ 810DDB8
.incbin "baserom.gba", 0x10DDB8, 0x18
.byte 0xA0, 0xDD, 0x10, 0x08
.asciz "HP:#>82.$v03/$v13"
.align 2,0
.global gUnknown_810DDD0
gUnknown_810DDD0: @ 810DDD0
.incbin "baserom.gba", 0x10DDD0, 0x14
.byte 0xBC, 0xDD, 0x10, 0x08
.asciz "Attack/Defense:"
.align 2,0
.global gUnknown_810DDE4
gUnknown_810DDE4: @ 810DDE4
.incbin "baserom.gba", 0x10DDE4, 0x18
.byte 0xD4, 0xDD, 0x10, 0x08
.asciz "Sp. Atk./Sp. Def.:"
.align 2,0
.global gUnknown_810DDFC
gUnknown_810DDFC: @ 810DDFC
@ -11476,7 +11491,9 @@ gUnknown_810DEF4: @ 810DEF4
.global gUnknown_810DF78
gUnknown_810DF78: @ 810DF78
.incbin "baserom.gba", 0x10DF78, 0xC
.byte 0x64, 0xDF, 0x10, 0x08
.asciz "No IQ"
.align 2,0
.global gUnknown_810DF84
gUnknown_810DF84: @ 810DF84
@ -11484,7 +11501,9 @@ gUnknown_810DF84: @ 810DF84
.global gUnknown_810DF98
gUnknown_810DF98: @ 810DF98
.incbin "baserom.gba", 0x10DF98, 0x1C
.byte 0x88, 0xDF, 0x10, 0x08
.asciz "Joined rescue team at:"
.align 2,0
.global gUnknown_810DFB4
gUnknown_810DFB4: @ 810DFB4
@ -11492,11 +11511,21 @@ gUnknown_810DFB4: @ 810DFB4
.global gUnknown_810DFC8
gUnknown_810DFC8: @ 810DFC8
.incbin "baserom.gba", 0x10DFC8, 0x4
.byte 0xB8, 0xDF, 0x10, 0x08
.global gUnknown_810DFCC
gUnknown_810DFCC: @ 810DFCC
.incbin "baserom.gba", 0x10DFCC, 0x60
.byte 0x14, 0xE0, 0x10, 0x08
.byte 0xF8, 0xDF, 0x10, 0x08
.byte 0xE0, 0xDF, 0x10, 0x08
.byte 0xDC, 0xDF, 0x10, 0x08
.byte 0x20, 0x00, 0x00, 0x00
.asciz "Evolution: #>54.No more"
.align 2,0
.asciz "Evolution: #>54.Possible"
.align 2,0
.asciz "Evolution: #>54.Not now"
.align 2,0
.global gUnknown_810E02C
gUnknown_810E02C: @ 810E02C
@ -11540,7 +11569,9 @@ gUnknown_8113850: @ 8113850
.global gUnknown_8113868
gUnknown_8113868: @ 8113868
.incbin "baserom.gba", 0x113868, 0x8
.byte 0x54, 0x38, 0x11, 0x08
.asciz "$m1"
.align 2,0
.global gUnknown_8113870
gUnknown_8113870: @ 8113870
@ -11588,7 +11619,7 @@ gUnknown_8113990: @ 8113990
.global gUnknown_81139B4
gUnknown_81139B4: @ 81139B4
.incbin "baserom.gba", 0x1139B4, 0x4
.byte 0x94, 0x39, 0x11, 0x08
.global gUnknown_81139B8
gUnknown_81139B8: @ 81139B8
@ -11596,7 +11627,7 @@ gUnknown_81139B8: @ 81139B8
.global gUnknown_81139CC
gUnknown_81139CC: @ 81139CC
.incbin "baserom.gba", 0x1139CC, 0x4
.byte 0xBC, 0x39, 0x11, 0x08
.global gFriendAreaNames
gFriendAreaNames: @ 81139D0

View File

@ -41,6 +41,7 @@ SECTIONS {
{
asm/crt0.o(.text);
asm/code.o(.text);
src/code_80001E0.o(.text);
asm/arm_func.o(.text);
asm/code_2.o(.text);
src/code.o(.text);

8
src/code_80001E0.c Normal file
View File

@ -0,0 +1,8 @@
#include "global.h"
extern u32 gUnknown_3004000;
u32 *sub_80001E0(void)
{
return &gUnknown_3004000;
}

View File

@ -4,8 +4,8 @@ extern u32 gUnformattedTypeStrings[]; // unformatted type names
extern u32 gFormattedTypeStrings[]; // formatted type names
extern u8 gUnknown_810AC7C[];
extern u8 gUnknown_810AC6A[];
extern u8 *gUnknown_810B4C8[];
extern u8 *gUnknown_810B988[];
extern u8 *gAbilityNames[];
extern u8 *AbilityDescriptions[];
extern u32 gBoughtFriendAreas;
extern u32 *gUnknown_203B468;
@ -31,12 +31,12 @@ u8 sub_8092364(u8 r0)
void sub_8092374(char *r0, u8 r1)
{
strncpy(r0, gUnknown_810B4C8[r1], 0x50);
strncpy(r0, gAbilityNames[r1], 0x50);
}
u8 *sub_8092390(u8 r0)
{
return gUnknown_810B988[r0];
return AbilityDescriptions[r0];
}
void sub_80923A0(void)