Disassemble functions

This commit is contained in:
octorock
2021-06-22 22:58:34 +02:00
parent 78f88ccee2
commit 5a301b97fa
66 changed files with 8187 additions and 153 deletions
+1 -3
View File
@@ -158,9 +158,7 @@ void PlayerUpdate(Entity* this) {
// Responsible for some life things like low health beep and initiating the death sequence
#ifdef EU
NAKED void HandlePlayerLife(Entity* this) {
asm(".incbin \"baserom_eu.gba\", 0x017038, 0x1f0"); // TODO disassemble
}
ASM_FUNC("asm/non_matching/eu/HandlePlayerLife.inc", void HandlePlayerLife(Entity* this));
#else
void HandlePlayerLife(Entity* this) {
u32 temp;
+1 -3
View File
@@ -173,9 +173,7 @@ void sub_08054570(void) {
}
#ifdef EU
NAKED u32 sub_0805457C(u32 arg0, u32 arg1) {
asm(".incbin \"baserom_eu.gba\", 0x054114, 0x1c0"); // TODO disassemble
}
ASM_FUNC("asm/non_matching/eu/sub_0805457C.inc", u32 sub_0805457C(u32 arg0, u32 arg1));
#else
ASM_FUNC("asm/non_matching/sub_0805457C.inc", u32 sub_0805457C(u32 arg0, u32 arg1));
#endif
+6 -18
View File
@@ -189,9 +189,7 @@ void sub_0802AA40(Entity* this) {
}
#ifdef EU
NAKED void sub_0802AAC0(Entity* this) {
asm(".incbin \"baserom_eu.gba\", 0x02aa94, 0xc8"); // TODO disassemble
}
ASM_FUNC("asm/non_matching/eu/sub_0802AAC0.inc", void sub_0802AAC0(Entity* this))
#else
void sub_0802AAC0(Entity* this) {
sub_0802AC40(this);
@@ -223,9 +221,7 @@ void sub_0802AAC0(Entity* this) {
#endif
#ifdef EU
NAKED void sub_0802AB40(Entity* this) {
asm(".incbin \"baserom_eu.gba\", 0x02ab5c, 0x60"); // TODO disassemble
}
ASM_FUNC("asm/non_matching/eu/sub_0802AB40.inc", void sub_0802AB40(Entity* this));
#else
void sub_0802AB40(Entity* this) {
sub_0802AC40(this);
@@ -280,9 +276,7 @@ void sub_0802AC08(Entity* this) {
}
#ifdef EU
NAKED void sub_0802AC40(Entity* this) {
asm(".incbin \"baserom_eu.gba\", 0x02ABF4, 0x54"); // TODO disassemble
}
ASM_FUNC("asm/non_matching/eu/sub_0802AC40.inc", void sub_0802AC40(Entity* this))
#else
void sub_0802AC40(Entity* this) {
GetNextFrame(this);
@@ -364,9 +358,7 @@ void sub_0802AD54(Entity* this) {
#ifdef EU
// TODO regalloc in EU version
NAKED void sub_0802ADDC(Entity* this) {
asm(".incbin \"baserom_eu.gba\", 0x02AD48, 0x000004C"); // TODO disassemble
}
ASM_FUNC("asm/non_matching/eu/sub_0802ADDC.inc", void sub_0802ADDC(Entity* this))
#else
void sub_0802ADDC(Entity* this) {
Entity* ent = CreateEnemy(BOMB_PEAHAT, this->type + 2);
@@ -400,9 +392,7 @@ void sub_0802AE24(Entity* this) {
}
#ifdef EU
NAKED void sub_0802AE68(Entity* this) {
asm(".incbin \"baserom_eu.gba\", 0x02add8, 0x94"); // TODO disassemble
}
ASM_FUNC("asm/non_matching/eu/sub_0802AE68.inc", void sub_0802AE68(Entity* this))
#else
void sub_0802AE68(Entity* this) {
Entity* ent = sub_0802B250(this);
@@ -579,9 +569,7 @@ void sub_0802B1A0(Entity* this) {
}
#ifdef EU
NAKED void sub_0802B1BC(Entity* this) {
asm(".incbin \"baserom_eu.gba\", 0x02b16c, 0x84"); // TODO disassemble
}
ASM_FUNC("asm/non_matching/eu/sub_0802B1BC.inc", void sub_0802B1BC(Entity* this))
#else
void sub_0802B1BC(Entity* this) {
Entity* ent;
+1 -3
View File
@@ -333,9 +333,7 @@ void sub_0801F3AC(Entity* this) {
}
#ifdef EU
NAKED void sub_0801F428(Entity* this) {
asm(".incbin \"baserom_eu.gba\", 0x01F428, 0x60"); // TODO disassemble
}
ASM_FUNC("asm/non_matching/eu/sub_0801F428.inc", void sub_0801F428(Entity* this))
#else
void sub_0801F428(Entity* this) {
sub_0804A720(this);
+1 -3
View File
@@ -97,9 +97,7 @@ END_NONMATCH
extern void sub_08080930();
#ifdef EU
NAKED void sub_08057A18(Manager* this, DiggingCaveEntrance* entr) {
asm(".incbin \"baserom_eu.gba\", 0x057580, 0x0000078"); // TODO disassemble
}
ASM_FUNC("asm/non_matching/eu/sub_08057A18.inc", void sub_08057A18(Manager* this, DiggingCaveEntrance* entr))
#else
void sub_08057A18(Manager* this, DiggingCaveEntrance* entr) {
u16 tmp;
+2 -6
View File
@@ -56,9 +56,7 @@ const u32 gUnk_081080A4[0x50] = {
const u8 gUnk_081081E4[] = { 0x16, 0x17, 0x17, 0x18, 0x18 };
#ifdef EU
NAKED void Manager7_Main(Manager7* this) {
asm(".incbin \"baserom_eu.gba\", 0x0578A0, 0x00000CC"); // TODO disassemble
}
ASM_FUNC("asm/non_matching/eu/Manager7_Main.inc", void Manager7_Main(Manager7* this))
#else
void Manager7_Main(Manager7* this) {
u32 tmp;
@@ -133,9 +131,7 @@ void sub_08057E64() {
}
#ifdef EU
NAKED void sub_08057E7C(u32 unk1) {
asm(".incbin \"baserom_eu.gba\", 0x0579B8, 0x0000050"); // TODO disassemble
}
ASM_FUNC("asm/non_matching/eu/sub_08057E7C.inc", void sub_08057E7C(u32 unk1))
#else
void sub_08057E7C(u32 unk1) {
u32 tmp;
+1 -3
View File
@@ -26,9 +26,7 @@ ASM_FUNC("asm/non_matching/phonograph/sub_0806E964.inc",
void sub_0806E964(Entity* this, ScriptExecutionContext* context))
#ifdef EU
NAKED void sub_0806EABC(Entity* this, u32 param) {
asm(".incbin \"baserom_eu.gba\", 0x06E4F8, 0x000003C"); // TODO disassemble
}
ASM_FUNC("asm/non_matching/eu/sub_0806EABC.inc", void sub_0806EABC(Entity* this, u32 param))
#else
void sub_0806EABC(Entity* this, u32 param) {
sub_08050384();
+1 -3
View File
@@ -124,9 +124,7 @@ void sub_080A9FD0(Entity* this) {
}
#ifdef EU
NAKED void sub_080AA044(Entity* this) {
asm(".incbin \"baserom_eu.gba\", 0x0A983C, 0x00000C4"); // TODO disassemble
}
ASM_FUNC("asm/non_matching/eu/sub_080AA044.inc", void sub_080AA044(Entity* this))
#else
void sub_080AA044(Entity* this) {
u32 uVar1;
+12 -2
View File
@@ -44,7 +44,8 @@ const u16 gUnk_0811E454[] = { 0x0, 0x0, 0x100, 0x200, 0x300, 0x400, 0x500,
const char gUnk_0811E470[4] = "LINK";
#ifdef DEMO
const u8 unknown[] = { 0x0, 0x0f, 0x0a, 0x0a, 0x0f, 0x0f, 0x0f, 0x08, 0x05, 0x05, 0x00, 0x00 };
const u8 demoUnknown0 = 0x0;
const u8 demoUnknown1[] = { 0x0f, 0x0a, 0x0a, 0x0f, 0x0f, 0x0f, 0x08, 0x05, 0x05, 0x00, 0x00 };
#else
const u8 padding[2] = { 0, 0 };
#endif
@@ -52,7 +53,16 @@ const u8 padding[2] = { 0, 0 };
static SaveResult (*const sSaveHandlers[])(u32) = { HandleSaveInit, HandleSaveInProgress, HandleSaveDone };
#ifdef DEMO
asm(".incbin \"baserom_demo.gba\", 0x11e010, 0xf0c"); // TODO disassemble
asm("demoPointer1: .incbin \"baserom_demo.gba\", 0x11e010, 0x500");
asm("demoPointer2: .incbin \"baserom_demo.gba\", 0x11e510, 0x500");
asm("demoPointer3: .incbin \"baserom_demo.gba\", 0x11ea10, 0x500");
extern const u32 demoPointer1;
extern const u32 demoPointer2;
extern const u32 demoPointer3;
const u32 demoPointers[] = { (u32)&demoPointer1, (u32)&demoPointer2, (u32)&demoPointer3 };
#else
#if defined(JP) || defined(EU)
+1 -3
View File
@@ -477,9 +477,7 @@ extern u8 gUnk_08107C14;
extern u8 gUnk_08107C0F;
#ifdef EU
NAKED void TextBoxHandlerQuestion(CurrentTextBox* ctb) {
asm(".incbin \"baserom_eu.gba\", 0x05654c, 0x138"); // TODO disassemble
}
ASM_FUNC("asm/non_matching/eu/TextBoxHandlerQuestion.inc", void TextBoxHandlerQuestion(CurrentTextBox* ctb))
#else
void TextBoxHandlerQuestion(CurrentTextBox* ctb) {