From 1f03df11dfd47bc15aa9b66f049fa2f6b6f3f59c Mon Sep 17 00:00:00 2001 From: halkun <37340407+joshuanwalker@users.noreply.github.com> Date: Sat, 5 Sep 2026 14:53:40 -0500 Subject: [PATCH 1/9] func_800A28D8 decomped --- src/mini/chocobo/chocobo.c | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/src/mini/chocobo/chocobo.c b/src/mini/chocobo/chocobo.c index abaaaf98..d88347c4 100644 --- a/src/mini/chocobo/chocobo.c +++ b/src/mini/chocobo/chocobo.c @@ -1,3 +1,5 @@ +//! PSYQ=4.0 CC1=2.6.3 + #include "common.h" INCLUDE_ASM("asm/us/mini/chocobo/nonmatchings/chocobo", func_800A02D0); @@ -18,7 +20,34 @@ INCLUDE_ASM("asm/us/mini/chocobo/nonmatchings/chocobo", func_800A1F40); INCLUDE_ASM("asm/us/mini/chocobo/nonmatchings/chocobo", func_800A272C); -INCLUDE_ASM("asm/us/mini/chocobo/nonmatchings/chocobo", func_800A28D8); +//INCLUDE_ASM("asm/us/mini/chocobo/nonmatchings/chocobo", func_800A28D8); + + +extern u32 D_80079F64; +extern u32 D_8007AF64; +extern u32 D_8007BF64; +extern u32 D_8007C764; + +void func_800A28D8(void) { + SysCdromStartLoadLzs(0x4C9, 0x1000U, &D_80079F64, NULL); + do { + + } while (SystemCdromReadChain() != 0); + SysCdromStartLoadLzs(0x4CA, 0x1000U, &D_8007AF64, NULL); + do { + + } while (SystemCdromReadChain() != 0); + SysCdromStartLoadLzs(0x4C8, 0x800U, &D_8007BF64, NULL); + do { + + } while (SystemCdromReadChain() != 0); + SysCdromStartLoadLzs(0x4C7, 0x800U, &D_8007C764, NULL); + do { + + } while (SystemCdromReadChain() != 0); +} + + INCLUDE_ASM("asm/us/mini/chocobo/nonmatchings/chocobo", func_800A2984); From 13ae596791b3dce154e32cbcde90eeda0c810904 Mon Sep 17 00:00:00 2001 From: halkun <37340407+joshuanwalker@users.noreply.github.com> Date: Sat, 5 Sep 2026 16:45:51 -0500 Subject: [PATCH 2/9] func_800A272C added --- src/mini/chocobo/chocobo.c | 112 ++++++++++++++++++++++++++++++++++++- 1 file changed, 110 insertions(+), 2 deletions(-) diff --git a/src/mini/chocobo/chocobo.c b/src/mini/chocobo/chocobo.c index d88347c4..cbd4cd93 100644 --- a/src/mini/chocobo/chocobo.c +++ b/src/mini/chocobo/chocobo.c @@ -1,6 +1,7 @@ //! PSYQ=4.0 CC1=2.6.3 #include "common.h" +#include "game.h" INCLUDE_ASM("asm/us/mini/chocobo/nonmatchings/chocobo", func_800A02D0); @@ -18,9 +19,116 @@ INCLUDE_ASM("asm/us/mini/chocobo/nonmatchings/chocobo", func_800A18BC); INCLUDE_ASM("asm/us/mini/chocobo/nonmatchings/chocobo", func_800A1F40); -INCLUDE_ASM("asm/us/mini/chocobo/nonmatchings/chocobo", func_800A272C); -//INCLUDE_ASM("asm/us/mini/chocobo/nonmatchings/chocobo", func_800A28D8); + +typedef struct { + u32 unk0; + u32 unk4; +} UnkRectData; + +extern UnkRectData D_800A0020; +extern UnkRectData D_800A0028; + + +void func_800A272C(s32 arg0, s32 arg1) { + RECT sp10; + RECT sp18; + s32 var_a0; + u32 var_a1; + + sp10 = *(RECT*)&D_800A0020; + sp18 = *(RECT*)&D_800A0028; + + var_a0 = 0x32C; + if (arg0 != 0) { + var_a0 = 0x3C1; + } + + SysCdromStartLoadLzs( + var_a0, + 0x20000, + (u32*)0x80110000, + 0 + ); + + while (SystemCdromReadChain() != 0) { + } + + LoadImage(&sp10, (u32*)0x80110000); + DrawSync(0); + + if (arg0 != 0) { + var_a0 = 0x3F1; + var_a1 = 0x1E000; + } else { + var_a0 = 0x3CE; + var_a1 = 0x1E800; + } + + SysCdromStartLoadLzs( + var_a0, + var_a1, + (u32*)0x80190000, + 0 + ); + + while (SystemCdromReadChain() != 0) { + } + + switch (arg1) { + case 0: + var_a0 = 0x459; + break; + + case 1: + var_a0 = 0x433; + break; + + case 2: + var_a0 = 0x417; + break; + + case 3: + var_a0 = 0x49C; + break; + + default: + goto skip_load; + } + + SysCdromStartLoadLzs( + var_a0, + 0x30000, + (u32*)0x80110000, + 0 + ); + +skip_load: + while (SystemCdromReadChain() != 0) { + } + + LoadImage(&sp18, (u32*)0x80110000); + DrawSync(0); + + if (arg0 != 0) { + var_a0 = 0x33E; + var_a1 = 0x6A000; + } else { + var_a0 = 0x293; + var_a1 = 0x7D000; + } + + SysCdromStartLoadLzs( + var_a0, + var_a1, + (u32*)0x80110000, + 0 + ); + + while (SystemCdromReadChain() != 0) { + } +} + extern u32 D_80079F64; From 4d3306bbc1cbcc6dc759d77ab74f3daf493cbb7a Mon Sep 17 00:00:00 2001 From: halkun <37340407+joshuanwalker@users.noreply.github.com> Date: Sat, 5 Sep 2026 16:48:54 -0500 Subject: [PATCH 3/9] moved vars around for clarity --- src/mini/chocobo/chocobo.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/src/mini/chocobo/chocobo.c b/src/mini/chocobo/chocobo.c index cbd4cd93..8ace3a0d 100644 --- a/src/mini/chocobo/chocobo.c +++ b/src/mini/chocobo/chocobo.c @@ -3,6 +3,20 @@ #include "common.h" #include "game.h" +typedef struct { + u32 unk0; + u32 unk4; +} UnkRectData; + +extern UnkRectData D_800A0020; +extern UnkRectData D_800A0028; +extern u32 D_80079F64; +extern u32 D_8007AF64; +extern u32 D_8007BF64; +extern u32 D_8007C764; + + + INCLUDE_ASM("asm/us/mini/chocobo/nonmatchings/chocobo", func_800A02D0); INCLUDE_ASM("asm/us/mini/chocobo/nonmatchings/chocobo", func_800A1260); @@ -21,13 +35,7 @@ INCLUDE_ASM("asm/us/mini/chocobo/nonmatchings/chocobo", func_800A1F40); -typedef struct { - u32 unk0; - u32 unk4; -} UnkRectData; -extern UnkRectData D_800A0020; -extern UnkRectData D_800A0028; void func_800A272C(s32 arg0, s32 arg1) { @@ -131,10 +139,7 @@ void func_800A272C(s32 arg0, s32 arg1) { -extern u32 D_80079F64; -extern u32 D_8007AF64; -extern u32 D_8007BF64; -extern u32 D_8007C764; + void func_800A28D8(void) { SysCdromStartLoadLzs(0x4C9, 0x1000U, &D_80079F64, NULL); From b00965f8d86ac13d2d1bee389894a6f2813b97a8 Mon Sep 17 00:00:00 2001 From: halkun <37340407+joshuanwalker@users.noreply.github.com> Date: Sat, 5 Sep 2026 18:34:24 -0500 Subject: [PATCH 4/9] func_800A1260 decomped --- src/mini/chocobo/chocobo.c | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/src/mini/chocobo/chocobo.c b/src/mini/chocobo/chocobo.c index 8ace3a0d..6a3269a4 100644 --- a/src/mini/chocobo/chocobo.c +++ b/src/mini/chocobo/chocobo.c @@ -1,4 +1,4 @@ -//! PSYQ=4.0 CC1=2.6.3 +//! PSYQ=4.0 CC1=2.7.2 #include "common.h" #include "game.h" @@ -14,12 +14,37 @@ extern u32 D_80079F64; extern u32 D_8007AF64; extern u32 D_8007BF64; extern u32 D_8007C764; - +extern s32 D_800B7598; +extern s32 D_800F507C; +extern s32* D_800F5084; INCLUDE_ASM("asm/us/mini/chocobo/nonmatchings/chocobo", func_800A02D0); -INCLUDE_ASM("asm/us/mini/chocobo/nonmatchings/chocobo", func_800A1260); + + + +void func_800A1260(void) { + s32 temp_s0; + s32 temp_s1; + s32 temp_s2; + + temp_s0 = *D_800F5084; +temp_s2 = (D_800B7598 + temp_s0 ) % temp_s0; +temp_s1 = (D_800F507C + temp_s0 ) % temp_s0; + + PushMatrix(); + + if (temp_s1 < temp_s2) { + func_800A1354(0, temp_s1); + func_800A1354(temp_s2, temp_s0); + } else { + func_800A1354(temp_s2, temp_s1); + } + + PopMatrix(); +} + INCLUDE_ASM("asm/us/mini/chocobo/nonmatchings/chocobo", func_800A1354); @@ -37,7 +62,6 @@ INCLUDE_ASM("asm/us/mini/chocobo/nonmatchings/chocobo", func_800A1F40); - void func_800A272C(s32 arg0, s32 arg1) { RECT sp10; RECT sp18; From f50184697473616146bffd6c63dc5b31c8a80239 Mon Sep 17 00:00:00 2001 From: halkun <37340407+joshuanwalker@users.noreply.github.com> Date: Sat, 5 Sep 2026 19:40:24 -0500 Subject: [PATCH 5/9] headway into func_800A1354 --- src/mini/chocobo/chocobo.c | 186 +++++++++++++++++++++++++++++-------- 1 file changed, 145 insertions(+), 41 deletions(-) diff --git a/src/mini/chocobo/chocobo.c b/src/mini/chocobo/chocobo.c index 6a3269a4..a6da3da5 100644 --- a/src/mini/chocobo/chocobo.c +++ b/src/mini/chocobo/chocobo.c @@ -2,6 +2,7 @@ #include "common.h" #include "game.h" +#include "libgte.h" typedef struct { u32 unk0; @@ -18,20 +19,16 @@ extern s32 D_800B7598; extern s32 D_800F507C; extern s32* D_800F5084; - INCLUDE_ASM("asm/us/mini/chocobo/nonmatchings/chocobo", func_800A02D0); - - - void func_800A1260(void) { s32 temp_s0; s32 temp_s1; s32 temp_s2; temp_s0 = *D_800F5084; -temp_s2 = (D_800B7598 + temp_s0 ) % temp_s0; -temp_s1 = (D_800F507C + temp_s0 ) % temp_s0; + temp_s2 = (D_800B7598 + temp_s0) % temp_s0; + temp_s1 = (D_800F507C + temp_s0) % temp_s0; PushMatrix(); @@ -45,8 +42,145 @@ temp_s1 = (D_800F507C + temp_s0 ) % temp_s0; PopMatrix(); } - +#ifndef NON_MATCHINGS INCLUDE_ASM("asm/us/mini/chocobo/nonmatchings/chocobo", func_800A1354); +#else + +typedef struct ChocoboEntry { + char pad0[0x11]; + u8 unk11; + char pad12[0x6]; +} ChocoboEntry; + +typedef struct ChocoboData { + s16 unk0; /* 0x00 */ + s16 unk2; /* 0x02 */ + s16 unk4; /* 0x04 */ + u16 unk6; /* 0x06 */ + u16 unk8; /* 0x08 */ + s16 unkA; /* 0x0A */ + u8 unkC; /* 0x0C */ + u8 unkD; /* 0x0D */ + u8 unkE; /* 0x0E */ + u8 unkF; /* 0x0F */ +} ChocoboData; /* size: 0x10 */ + +typedef struct ChocoboRenderData { + u8 unk0[5]; + u8 unk5; + u8 unk6; + u8 unk7; + s32 unk8; + s32 unkC; + s32 unk10; + u8 pad14[6]; + u16 unk1A; + u8* unk1C; +} ChocoboRenderData; /* size: 0x24 */ + +typedef struct ChocoboContext { + char pad0[4]; + u8* unk4; +} ChocoboContext; + +typedef struct ChocoboObjectTable { + char pad0[0x40]; + u8* unk40; +} ChocoboObjectTable; + +extern ChocoboContext* D_800B1254; +extern ChocoboEntry* D_800B7500; +extern u8 D_800B7544[]; +extern s32 D_800F5078; +extern ChocoboObjectTable* D_800F5084; +extern ChocoboRenderData* D_800F50A0[]; + +extern void PushMatrix(void); +extern void PopMatrix(void); +extern void func_800AF11C(ChocoboRenderData*, void*, s32, s16); + +void func_800A1354(s32 arg0, s32 arg1) { + ChocoboContext** ctx_ptr; + s32 temp_s1; + s32 temp_s2; + s32 temp_s3; + s32 temp_s4; + s32 sp10; + ChocoboData* temp_s0; + ChocoboRenderData* temp_a0; + u8* temp_v1; + s32 temp_v1_2; + + temp_s2 = arg0; + + if (temp_s2 < arg1) { + ctx_ptr = &D_800B1254; + temp_s4 = temp_s2 * 0x18; + + do { + temp_v1 = (u8*)D_800B7500 + temp_s4; + + if (temp_v1[0x11] != 0) { + temp_s0 = (ChocoboData*)(D_800F5084->unk40 + ((temp_v1[0x11] * 0x10) - 0x10)); + + temp_v1_2 = temp_s0->unkF; + + gte_ldv0(temp_s0); + gte_rtps(); + + temp_s1 = temp_v1_2 * 0x24; + + temp_a0 = (ChocoboRenderData*)((*ctx_ptr)->unk4 + temp_s1); + + temp_s3 = (s32)temp_a0->unk1C + temp_a0->unk1A; + + gte_stflg(&sp10); + + if (sp10 >= 0) { + temp_a0->unk8 = temp_s0->unk0; + temp_a0->unkC = temp_s0->unk2; + temp_a0->unk10 = temp_s0->unk4; + + temp_a0->unk5 = temp_s0->unkC; + temp_a0->unk6 = temp_s0->unkD; + temp_a0->unk7 = temp_s0->unkE; + + PushMatrix(); + + *(s32*)0x1F800000 = 3; + + func_800AF11C((ChocoboRenderData*)((*ctx_ptr)->unk4 + temp_s1), &D_800B7544, 0, temp_s0->unkA); + + temp_v1_2 = D_800F5078; + D_800F5078 = temp_v1_2 + 1; + + D_800F50A0[temp_v1_2] = (ChocoboRenderData*)((*ctx_ptr)->unk4 + temp_s1); + + PopMatrix(); + + temp_s0->unkA = temp_s0->unkA + temp_s0->unk8; + + if (temp_s0->unkA >= *(u16*)temp_s3) { + if (temp_s0->unk6 & 2) { + temp_s0->unkA = 0; + } else { + temp_s0->unkA = *(u16*)temp_s3 - 1; + } + } + + if (temp_s0->unkA < 0) { + temp_s0->unkA = 0; + } + } + } + + temp_s2++; + temp_s4 += 0x18; + + } while (temp_s2 < arg1); + } +} +#endif INCLUDE_ASM("asm/us/mini/chocobo/nonmatchings/chocobo", func_800A157C); @@ -58,10 +192,6 @@ INCLUDE_ASM("asm/us/mini/chocobo/nonmatchings/chocobo", func_800A18BC); INCLUDE_ASM("asm/us/mini/chocobo/nonmatchings/chocobo", func_800A1F40); - - - - void func_800A272C(s32 arg0, s32 arg1) { RECT sp10; RECT sp18; @@ -76,12 +206,7 @@ void func_800A272C(s32 arg0, s32 arg1) { var_a0 = 0x3C1; } - SysCdromStartLoadLzs( - var_a0, - 0x20000, - (u32*)0x80110000, - 0 - ); + SysCdromStartLoadLzs(var_a0, 0x20000, (u32*)0x80110000, 0); while (SystemCdromReadChain() != 0) { } @@ -97,12 +222,7 @@ void func_800A272C(s32 arg0, s32 arg1) { var_a1 = 0x1E800; } - SysCdromStartLoadLzs( - var_a0, - var_a1, - (u32*)0x80190000, - 0 - ); + SysCdromStartLoadLzs(var_a0, var_a1, (u32*)0x80190000, 0); while (SystemCdromReadChain() != 0) { } @@ -128,12 +248,7 @@ void func_800A272C(s32 arg0, s32 arg1) { goto skip_load; } - SysCdromStartLoadLzs( - var_a0, - 0x30000, - (u32*)0x80110000, - 0 - ); + SysCdromStartLoadLzs(var_a0, 0x30000, (u32*)0x80110000, 0); skip_load: while (SystemCdromReadChain() != 0) { @@ -150,21 +265,12 @@ void func_800A272C(s32 arg0, s32 arg1) { var_a1 = 0x7D000; } - SysCdromStartLoadLzs( - var_a0, - var_a1, - (u32*)0x80110000, - 0 - ); + SysCdromStartLoadLzs(var_a0, var_a1, (u32*)0x80110000, 0); while (SystemCdromReadChain() != 0) { } } - - - - void func_800A28D8(void) { SysCdromStartLoadLzs(0x4C9, 0x1000U, &D_80079F64, NULL); do { @@ -184,8 +290,6 @@ void func_800A28D8(void) { } while (SystemCdromReadChain() != 0); } - - INCLUDE_ASM("asm/us/mini/chocobo/nonmatchings/chocobo", func_800A2984); INCLUDE_ASM("asm/us/mini/chocobo/nonmatchings/chocobo", func_800A2AFC); From a9089f5298a4bc9e934dc0610abfb2ff6acd7e83 Mon Sep 17 00:00:00 2001 From: halkun <37340407+joshuanwalker@users.noreply.github.com> Date: Sun, 6 Sep 2026 16:04:00 -0500 Subject: [PATCH 6/9] fixed goto and removed in work function --- src/mini/chocobo/chocobo.c | 148 +------------------------------------ 1 file changed, 4 insertions(+), 144 deletions(-) diff --git a/src/mini/chocobo/chocobo.c b/src/mini/chocobo/chocobo.c index a6da3da5..6a04bb3c 100644 --- a/src/mini/chocobo/chocobo.c +++ b/src/mini/chocobo/chocobo.c @@ -42,145 +42,7 @@ void func_800A1260(void) { PopMatrix(); } -#ifndef NON_MATCHINGS INCLUDE_ASM("asm/us/mini/chocobo/nonmatchings/chocobo", func_800A1354); -#else - -typedef struct ChocoboEntry { - char pad0[0x11]; - u8 unk11; - char pad12[0x6]; -} ChocoboEntry; - -typedef struct ChocoboData { - s16 unk0; /* 0x00 */ - s16 unk2; /* 0x02 */ - s16 unk4; /* 0x04 */ - u16 unk6; /* 0x06 */ - u16 unk8; /* 0x08 */ - s16 unkA; /* 0x0A */ - u8 unkC; /* 0x0C */ - u8 unkD; /* 0x0D */ - u8 unkE; /* 0x0E */ - u8 unkF; /* 0x0F */ -} ChocoboData; /* size: 0x10 */ - -typedef struct ChocoboRenderData { - u8 unk0[5]; - u8 unk5; - u8 unk6; - u8 unk7; - s32 unk8; - s32 unkC; - s32 unk10; - u8 pad14[6]; - u16 unk1A; - u8* unk1C; -} ChocoboRenderData; /* size: 0x24 */ - -typedef struct ChocoboContext { - char pad0[4]; - u8* unk4; -} ChocoboContext; - -typedef struct ChocoboObjectTable { - char pad0[0x40]; - u8* unk40; -} ChocoboObjectTable; - -extern ChocoboContext* D_800B1254; -extern ChocoboEntry* D_800B7500; -extern u8 D_800B7544[]; -extern s32 D_800F5078; -extern ChocoboObjectTable* D_800F5084; -extern ChocoboRenderData* D_800F50A0[]; - -extern void PushMatrix(void); -extern void PopMatrix(void); -extern void func_800AF11C(ChocoboRenderData*, void*, s32, s16); - -void func_800A1354(s32 arg0, s32 arg1) { - ChocoboContext** ctx_ptr; - s32 temp_s1; - s32 temp_s2; - s32 temp_s3; - s32 temp_s4; - s32 sp10; - ChocoboData* temp_s0; - ChocoboRenderData* temp_a0; - u8* temp_v1; - s32 temp_v1_2; - - temp_s2 = arg0; - - if (temp_s2 < arg1) { - ctx_ptr = &D_800B1254; - temp_s4 = temp_s2 * 0x18; - - do { - temp_v1 = (u8*)D_800B7500 + temp_s4; - - if (temp_v1[0x11] != 0) { - temp_s0 = (ChocoboData*)(D_800F5084->unk40 + ((temp_v1[0x11] * 0x10) - 0x10)); - - temp_v1_2 = temp_s0->unkF; - - gte_ldv0(temp_s0); - gte_rtps(); - - temp_s1 = temp_v1_2 * 0x24; - - temp_a0 = (ChocoboRenderData*)((*ctx_ptr)->unk4 + temp_s1); - - temp_s3 = (s32)temp_a0->unk1C + temp_a0->unk1A; - - gte_stflg(&sp10); - - if (sp10 >= 0) { - temp_a0->unk8 = temp_s0->unk0; - temp_a0->unkC = temp_s0->unk2; - temp_a0->unk10 = temp_s0->unk4; - - temp_a0->unk5 = temp_s0->unkC; - temp_a0->unk6 = temp_s0->unkD; - temp_a0->unk7 = temp_s0->unkE; - - PushMatrix(); - - *(s32*)0x1F800000 = 3; - - func_800AF11C((ChocoboRenderData*)((*ctx_ptr)->unk4 + temp_s1), &D_800B7544, 0, temp_s0->unkA); - - temp_v1_2 = D_800F5078; - D_800F5078 = temp_v1_2 + 1; - - D_800F50A0[temp_v1_2] = (ChocoboRenderData*)((*ctx_ptr)->unk4 + temp_s1); - - PopMatrix(); - - temp_s0->unkA = temp_s0->unkA + temp_s0->unk8; - - if (temp_s0->unkA >= *(u16*)temp_s3) { - if (temp_s0->unk6 & 2) { - temp_s0->unkA = 0; - } else { - temp_s0->unkA = *(u16*)temp_s3 - 1; - } - } - - if (temp_s0->unkA < 0) { - temp_s0->unkA = 0; - } - } - } - - temp_s2++; - temp_s4 += 0x18; - - } while (temp_s2 < arg1); - } -} -#endif INCLUDE_ASM("asm/us/mini/chocobo/nonmatchings/chocobo", func_800A157C); @@ -230,27 +92,25 @@ void func_800A272C(s32 arg0, s32 arg1) { switch (arg1) { case 0: var_a0 = 0x459; + SysCdromStartLoadLzs(var_a0, 0x30000, (u32*)0x80110000, 0); break; case 1: var_a0 = 0x433; + SysCdromStartLoadLzs(var_a0, 0x30000, (u32*)0x80110000, 0); break; case 2: var_a0 = 0x417; + SysCdromStartLoadLzs(var_a0, 0x30000, (u32*)0x80110000, 0); break; case 3: var_a0 = 0x49C; + SysCdromStartLoadLzs(var_a0, 0x30000, (u32*)0x80110000, 0); break; - - default: - goto skip_load; } - SysCdromStartLoadLzs(var_a0, 0x30000, (u32*)0x80110000, 0); - -skip_load: while (SystemCdromReadChain() != 0) { } From 0932a01b0c49b35cfa08c081482f498177c36202 Mon Sep 17 00:00:00 2001 From: halkun <37340407+joshuanwalker@users.noreply.github.com> Date: Mon, 7 Sep 2026 17:27:24 -0500 Subject: [PATCH 7/9] cleanup --- src/mini/chocobo/chocobo.c | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/src/mini/chocobo/chocobo.c b/src/mini/chocobo/chocobo.c index 6a04bb3c..01fcc8b0 100644 --- a/src/mini/chocobo/chocobo.c +++ b/src/mini/chocobo/chocobo.c @@ -63,29 +63,24 @@ void func_800A272C(s32 arg0, s32 arg1) { sp10 = *(RECT*)&D_800A0020; sp18 = *(RECT*)&D_800A0028; - var_a0 = 0x32C; if (arg0 != 0) { - var_a0 = 0x3C1; + SysCdromStartLoadLzs(0x3C1, 0x20000, (u32*)0x80110000, 0); + } else { + SysCdromStartLoadLzs(0x32C, 0x20000, (u32*)0x80110000, 0); } - SysCdromStartLoadLzs(var_a0, 0x20000, (u32*)0x80110000, 0); - while (SystemCdromReadChain() != 0) { } LoadImage(&sp10, (u32*)0x80110000); DrawSync(0); - if (arg0 != 0) { - var_a0 = 0x3F1; - var_a1 = 0x1E000; + if (arg0 != 0) { + SysCdromStartLoadLzs(0x3F1, 0x1E000, (u32*)0x80190000, 0); } else { - var_a0 = 0x3CE; - var_a1 = 0x1E800; + SysCdromStartLoadLzs(0x3CE, 0x1E800, (u32*)0x80190000, 0); } - SysCdromStartLoadLzs(var_a0, var_a1, (u32*)0x80190000, 0); - while (SystemCdromReadChain() != 0) { } @@ -94,17 +89,14 @@ void func_800A272C(s32 arg0, s32 arg1) { var_a0 = 0x459; SysCdromStartLoadLzs(var_a0, 0x30000, (u32*)0x80110000, 0); break; - case 1: var_a0 = 0x433; SysCdromStartLoadLzs(var_a0, 0x30000, (u32*)0x80110000, 0); break; - case 2: var_a0 = 0x417; SysCdromStartLoadLzs(var_a0, 0x30000, (u32*)0x80110000, 0); break; - case 3: var_a0 = 0x49C; SysCdromStartLoadLzs(var_a0, 0x30000, (u32*)0x80110000, 0); @@ -118,14 +110,11 @@ void func_800A272C(s32 arg0, s32 arg1) { DrawSync(0); if (arg0 != 0) { - var_a0 = 0x33E; - var_a1 = 0x6A000; + SysCdromStartLoadLzs(0x33E, 0x6A000, (u32*)0x80110000, 0); } else { - var_a0 = 0x293; - var_a1 = 0x7D000; + SysCdromStartLoadLzs(0x293, 0x7D000, (u32*)0x80110000, 0); } - SysCdromStartLoadLzs(var_a0, var_a1, (u32*)0x80110000, 0); while (SystemCdromReadChain() != 0) { } From 03421cf5f15d597315d4d7dc402c3db8409d3396 Mon Sep 17 00:00:00 2001 From: halkun <37340407+joshuanwalker@users.noreply.github.com> Date: Mon, 7 Sep 2026 17:29:33 -0500 Subject: [PATCH 8/9] format --- src/mini/chocobo/chocobo.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/mini/chocobo/chocobo.c b/src/mini/chocobo/chocobo.c index 01fcc8b0..2f5a96db 100644 --- a/src/mini/chocobo/chocobo.c +++ b/src/mini/chocobo/chocobo.c @@ -75,7 +75,7 @@ void func_800A272C(s32 arg0, s32 arg1) { LoadImage(&sp10, (u32*)0x80110000); DrawSync(0); - if (arg0 != 0) { + if (arg0 != 0) { SysCdromStartLoadLzs(0x3F1, 0x1E000, (u32*)0x80190000, 0); } else { SysCdromStartLoadLzs(0x3CE, 0x1E800, (u32*)0x80190000, 0); @@ -110,12 +110,11 @@ void func_800A272C(s32 arg0, s32 arg1) { DrawSync(0); if (arg0 != 0) { - SysCdromStartLoadLzs(0x33E, 0x6A000, (u32*)0x80110000, 0); + SysCdromStartLoadLzs(0x33E, 0x6A000, (u32*)0x80110000, 0); } else { - SysCdromStartLoadLzs(0x293, 0x7D000, (u32*)0x80110000, 0); + SysCdromStartLoadLzs(0x293, 0x7D000, (u32*)0x80110000, 0); } - while (SystemCdromReadChain() != 0) { } } From 4818c66e01d193c9e55558b431cb1dbbd86aa34f Mon Sep 17 00:00:00 2001 From: halkun <37340407+joshuanwalker@users.noreply.github.com> Date: Tue, 8 Sep 2026 03:05:13 -0500 Subject: [PATCH 9/9] Missed an inline --- src/mini/chocobo/chocobo.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/mini/chocobo/chocobo.c b/src/mini/chocobo/chocobo.c index 2f5a96db..40cb15b4 100644 --- a/src/mini/chocobo/chocobo.c +++ b/src/mini/chocobo/chocobo.c @@ -86,20 +86,16 @@ void func_800A272C(s32 arg0, s32 arg1) { switch (arg1) { case 0: - var_a0 = 0x459; - SysCdromStartLoadLzs(var_a0, 0x30000, (u32*)0x80110000, 0); + SysCdromStartLoadLzs(0x459, 0x30000, (u32*)0x80110000, 0); break; case 1: - var_a0 = 0x433; - SysCdromStartLoadLzs(var_a0, 0x30000, (u32*)0x80110000, 0); + SysCdromStartLoadLzs(0x433, 0x30000, (u32*)0x80110000, 0); break; case 2: - var_a0 = 0x417; - SysCdromStartLoadLzs(var_a0, 0x30000, (u32*)0x80110000, 0); + SysCdromStartLoadLzs(0x417, 0x30000, (u32*)0x80110000, 0); break; case 3: - var_a0 = 0x49C; - SysCdromStartLoadLzs(var_a0, 0x30000, (u32*)0x80110000, 0); + SysCdromStartLoadLzs(0x49C, 0x30000, (u32*)0x80110000, 0); break; }