Skip to content

Commit

Permalink
Decompile 4 more high_scores functions
Browse files Browse the repository at this point in the history
  • Loading branch information
huderlem committed Feb 13, 2024
1 parent 4da84cd commit 3aae873
Show file tree
Hide file tree
Showing 4 changed files with 103 additions and 313 deletions.
311 changes: 0 additions & 311 deletions asm/high_scores.s
Original file line number Diff line number Diff line change
Expand Up @@ -4,317 +4,6 @@

.text

thumb_func_start sub_DBF4
sub_DBF4: @ 0x0800DBF4
push {r4, r5, r6, r7, lr}
mov r7, sb
mov r6, r8
push {r6, r7}
bl sub_E464
ldr r2, _0800DC14 @ =gUnknown_02002858
movs r1, #0x22
ldrsh r0, [r2, r1]
cmp r0, #0x82
beq _0800DC28
cmp r0, #0x82
bgt _0800DC18
cmp r0, #4
beq _0800DC1E
b _0800DCBA
.align 2, 0
_0800DC14: .4byte gUnknown_02002858
_0800DC18:
cmp r0, #0xfa
beq _0800DC3C
b _0800DCBA
_0800DC1E:
bl sub_2568
bl sub_1AA4
b _0800DCBA
_0800DC28:
ldr r1, _0800DC38 @ =gUnknown_0202BEBC
movs r0, #3
strb r0, [r1]
movs r0, #0x65
bl m4aSongNumStart
b _0800DCBA
.align 2, 0
_0800DC38: .4byte gUnknown_0202BEBC
_0800DC3C:
movs r1, #0
movs r0, #0
strh r0, [r2, #0x22]
ldr r0, _0800DCD0 @ =gUnknown_0201B178
strb r1, [r0]
ldr r0, _0800DCD4 @ =gUnknown_0202BEBC
strb r1, [r0]
movs r0, #0
bl sub_F4FC
ldr r1, _0800DCD8 @ =gUnknown_0202BED8
str r0, [r1]
movs r0, #1
bl sub_F4FC
ldr r1, _0800DCDC @ =gUnknown_0201B170
str r0, [r1]
movs r2, #0
ldr r3, _0800DCE0 @ =gMain+0x74
mov r8, r3
ldr r7, _0800DCE4 @ =gUnknown_0202C610
mov ip, r7
_0800DC68:
movs r1, #0
lsls r0, r2, #1
adds r3, r2, #1
mov sb, r3
adds r0, r0, r2
lsls r5, r0, #6
adds r6, r5, #0
adds r6, #0xe4
_0800DC78:
lsls r0, r1, #1
adds r4, r1, #1
adds r0, r0, r1
lsls r0, r0, #3
adds r1, r0, r6
add r1, r8
adds r2, r0, r5
movs r3, #5
_0800DC88:
mov r7, ip
adds r0, r2, r7
ldr r0, [r0]
stm r1!, {r0}
adds r2, #4
subs r3, #1
cmp r3, #0
bge _0800DC88
adds r1, r4, #0
cmp r1, #7
ble _0800DC78
mov r2, sb
cmp r2, #1
ble _0800DC68
bl SaveFile_WriteToSram
bl sub_02B4
bl m4aMPlayAllStop
bl sub_0D10
ldr r1, _0800DCE8 @ =gMain
movs r0, #0xc
strb r0, [r1, #3]
_0800DCBA:
ldr r1, _0800DCEC @ =gUnknown_02002858
ldrh r0, [r1, #0x22]
adds r0, #1
strh r0, [r1, #0x22]
pop {r3, r4}
mov r8, r3
mov sb, r4
pop {r4, r5, r6, r7}
pop {r0}
bx r0
.align 2, 0
_0800DCD0: .4byte gUnknown_0201B178
_0800DCD4: .4byte gUnknown_0202BEBC
_0800DCD8: .4byte gUnknown_0202BED8
_0800DCDC: .4byte gUnknown_0201B170
_0800DCE0: .4byte gMain+0x74
_0800DCE4: .4byte gUnknown_0202C610
_0800DCE8: .4byte gMain
_0800DCEC: .4byte gUnknown_02002858

thumb_func_start sub_DCF0
sub_DCF0: @ 0x0800DCF0
push {r4, r5, lr}
bl sub_E464
ldr r5, _0800DD20 @ =gMain
ldrh r1, [r5, #0x18]
movs r4, #1
ands r4, r1
cmp r4, #0
beq _0800DD24
movs r0, #0x65
bl m4aSongNumStart
bl sub_F6E0
bl SaveFile_WriteToSram
bl sub_02B4
bl m4aMPlayAllStop
bl sub_0D10
movs r0, #0
b _0800DD3C
.align 2, 0
_0800DD20: .4byte gMain
_0800DD24:
movs r0, #2
ands r0, r1
cmp r0, #0
beq _0800DD3E
movs r0, #0x66
bl m4aSongNumStart
ldr r0, _0800DD44 @ =gUnknown_0201B178
strb r4, [r0]
ldr r0, _0800DD48 @ =gUnknown_0202BEBC
strb r4, [r0]
movs r0, #3
_0800DD3C:
strb r0, [r5, #3]
_0800DD3E:
pop {r4, r5}
pop {r0}
bx r0
.align 2, 0
_0800DD44: .4byte gUnknown_0201B178
_0800DD48: .4byte gUnknown_0202BEBC

thumb_func_start sub_DD4C
sub_DD4C: @ 0x0800DD4C
push {lr}
bl sub_02B4
bl m4aMPlayAllStop
bl sub_0D10
ldr r1, _0800DD6C @ =gAutoDisplayTitlescreenMenu
movs r0, #1
strb r0, [r1]
movs r0, #1
bl SetMainGameState
pop {r0}
bx r0
.align 2, 0
_0800DD6C: .4byte gAutoDisplayTitlescreenMenu

thumb_func_start sub_DD70
sub_DD70: @ 0x0800DD70
push {r4, r5, r6, lr}
mov r6, r8
push {r6}
bl ResetSomeGraphicsRelatedStuff
movs r2, #0x80
lsls r2, r2, #0x13
movs r1, #0x84
lsls r1, r1, #5
adds r0, r1, #0
strh r0, [r2]
ldr r1, _0800DE50 @ =0x0400000C
ldr r3, _0800DE54 @ =0x00004006
adds r0, r3, #0
strh r0, [r1]
ldrh r0, [r2]
movs r3, #0x80
lsls r3, r3, #3
adds r1, r3, #0
orrs r0, r1
strh r0, [r2]
ldr r1, _0800DE58 @ =0x0400000E
ldr r3, _0800DE5C @ =0x0000420F
adds r0, r3, #0
strh r0, [r1]
ldrh r0, [r2]
movs r3, #0x80
lsls r3, r3, #4
adds r1, r3, #0
orrs r0, r1
strh r0, [r2]
ldr r6, _0800DE60 @ =gMain
ldrh r0, [r2]
strh r0, [r6, #0x16]
ldr r4, _0800DE64 @ =0x040000D4
ldr r0, _0800DE68 @ =gUnknown_0809DBE0
str r0, [r4]
movs r0, #0xa0
lsls r0, r0, #0x13
str r0, [r4, #4]
ldr r0, _0800DE6C @ =0x80000100
str r0, [r4, #8]
ldr r0, [r4, #8]
ldr r0, _0800DE70 @ =gUnknown_080957A0
str r0, [r4]
ldr r0, _0800DE74 @ =0x06004000
str r0, [r4, #4]
ldr r0, _0800DE78 @ =0x80002400
str r0, [r4, #8]
ldr r0, [r4, #8]
ldr r0, _0800DE7C @ =gUnknown_0809AFC0
str r0, [r4]
ldr r0, _0800DE80 @ =0x0600C000
str r0, [r4, #4]
ldr r0, _0800DE84 @ =0x80001600
str r0, [r4, #8]
ldr r0, [r4, #8]
ldr r0, _0800DE88 @ =gUnknown_080947A0
str r0, [r4]
ldr r0, _0800DE8C @ =gUnknown_03005C00
mov r8, r0
str r0, [r4, #4]
ldr r5, _0800DE90 @ =0x80000800
str r5, [r4, #8]
ldr r0, [r4, #8]
ldr r0, _0800DE94 @ =gUnknown_08099FC0
str r0, [r4]
ldr r0, _0800DE98 @ =0x06001000
str r0, [r4, #4]
str r5, [r4, #8]
ldr r0, [r4, #8]
ldr r0, _0800DE9C @ =gUnknown_0809DDE0
str r0, [r4]
ldr r0, _0800DEA0 @ =0x05000200
str r0, [r4, #4]
ldr r0, _0800DEA4 @ =0x80000010
str r0, [r4, #8]
ldr r0, [r4, #8]
ldr r0, _0800DEA8 @ =gUnknown_0809DFE0
str r0, [r4]
ldr r0, _0800DEAC @ =0x06010000
str r0, [r4, #4]
ldr r0, _0800DEB0 @ =0x80002210
str r0, [r4, #8]
ldr r0, [r4, #8]
bl sub_DEB4
bl sub_EE64
mov r1, r8
str r1, [r4]
movs r0, #0xc0
lsls r0, r0, #0x13
str r0, [r4, #4]
str r5, [r4, #8]
ldr r0, [r4, #8]
movs r0, #9
bl m4aSongNumStart
bl sub_0CBC
bl sub_024C
ldrb r0, [r6, #3]
adds r0, #1
strb r0, [r6, #3]
pop {r3}
mov r8, r3
pop {r4, r5, r6}
pop {r0}
bx r0
.align 2, 0
_0800DE50: .4byte 0x0400000C
_0800DE54: .4byte 0x00004006
_0800DE58: .4byte 0x0400000E
_0800DE5C: .4byte 0x0000420F
_0800DE60: .4byte gMain
_0800DE64: .4byte 0x040000D4
_0800DE68: .4byte gUnknown_0809DBE0
_0800DE6C: .4byte 0x80000100
_0800DE70: .4byte gUnknown_080957A0
_0800DE74: .4byte 0x06004000
_0800DE78: .4byte 0x80002400
_0800DE7C: .4byte gUnknown_0809AFC0
_0800DE80: .4byte 0x0600C000
_0800DE84: .4byte 0x80001600
_0800DE88: .4byte gUnknown_080947A0
_0800DE8C: .4byte gUnknown_03005C00
_0800DE90: .4byte 0x80000800
_0800DE94: .4byte gUnknown_08099FC0
_0800DE98: .4byte 0x06001000
_0800DE9C: .4byte gUnknown_0809DDE0
_0800DEA0: .4byte 0x05000200
_0800DEA4: .4byte 0x80000010
_0800DEA8: .4byte gUnknown_0809DFE0
_0800DEAC: .4byte 0x06010000
_0800DEB0: .4byte 0x80002210

thumb_func_start sub_DEB4
sub_DEB4: @ 0x0800DEB4
push {r4, r5, r6, r7, lr}
Expand Down
4 changes: 2 additions & 2 deletions include/functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ extern void sub_D9F8(void);
//extern ? sub_DCF0();
//extern ? sub_DD4C();
//extern ? sub_DD70();
//extern ? sub_DEB4();
extern void sub_DEB4(void);
//extern ? sub_DF68();
//extern ? sub_E0C4();
//extern ? sub_E0EC();
Expand All @@ -157,7 +157,7 @@ extern void sub_EE64(void);
//extern ? sub_F3BC();
extern s32 sub_F3DC(u32, u32, u8);
extern void sub_F434(u32, u32, u8);
//extern ? sub_F4FC();
extern u32 sub_F4FC(u32);
extern void sub_F670(u32, u32, u32, u32);
extern void sub_F6E0(void);
//extern ? sub_F74C();
Expand Down
3 changes: 3 additions & 0 deletions include/variables.h
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,9 @@ extern s16 gUnknown_0202A1C0[];
extern s16 gUnknown_0202A390[];
extern s16 gUnknown_0202A574;

extern u32 gUnknown_0201B170;
extern u32 gUnknown_0202BED8;

extern u16 gUnknown_0805C800[0x20];
extern u16 gUnknown_0805C840[];
extern u16 gUnknown_0805C780[];
Expand Down
Loading

0 comments on commit 3aae873

Please sign in to comment.