Skip to content

Commit

Permalink
fragment22
Browse files Browse the repository at this point in the history
  • Loading branch information
Kelebek1 committed Oct 19, 2024
1 parent 3015ed2 commit 4869288
Show file tree
Hide file tree
Showing 19 changed files with 3,449 additions and 70 deletions.
2 changes: 1 addition & 1 deletion include/macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

#define ALIGN4(val) (((val) + 0x3) & ~0x3)
#define ALIGN8(val) (((val) + 0x7) & ~0x7)
#define ALIGN16(val) (((val) + 0xF) & ~0xF)
#define ALIGN16(val) (((val) + 0xFu) & ~0xFu)
#define ALIGN64(val) (((val) + 0x3F) & ~0x3F)

#define DECR(x) ((x) == 0 ? 0 : --(x))
Expand Down
14 changes: 14 additions & 0 deletions include/sections.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,36 +137,50 @@ extern u8 fragment22_relocs_ROM_END[];
extern u8 fragment23_TEXT_START[];
extern u8 fragment23_ROM_START[];
extern u8 fragment23_ROM_END[];
extern u8 fragment23_relocs_ROM_END[];

// fragment 24
extern u8 fragment24_TEXT_START[];
extern u8 fragment24_ROM_START[];
extern u8 fragment24_ROM_END[];
extern u8 fragment24_relocs_ROM_END[];

// fragment 25
extern u8 fragment25_TEXT_START[];
extern u8 fragment25_ROM_START[];
extern u8 fragment25_ROM_END[];
extern u8 fragment25_relocs_ROM_END[];

// fragment 26
extern u8 fragment26_TEXT_START[];
extern u8 fragment26_ROM_START[];
extern u8 fragment26_ROM_END[];
extern u8 fragment26_relocs_ROM_END[];

// fragment 27
extern u8 fragment27_TEXT_START[];
extern u8 fragment27_ROM_START[];
extern u8 fragment27_ROM_END[];
extern u8 fragment27_relocs_ROM_END[];

// fragment 28
extern u8 fragment28_TEXT_START[];
extern u8 fragment28_ROM_START[];
extern u8 fragment28_ROM_END[];
extern u8 fragment28_relocs_ROM_END[];

// fragment 29
extern u8 fragment29_TEXT_START[];
extern u8 fragment29_ROM_START[];
extern u8 fragment29_ROM_END[];
extern u8 fragment29_relocs_ROM_END[];

extern u8 fragment29_misc_1_ROM_START[];
extern u8 fragment29_misc_1_ROM_END[];
extern u8 fragment29_misc_2_ROM_START[];
extern u8 fragment29_misc_2_ROM_END[];
extern u8 fragment29_misc_3_ROM_START[];
extern u8 fragment29_misc_3_ROM_END[];

// fragment 30
extern u8 fragment30_TEXT_START[];
Expand Down
6 changes: 5 additions & 1 deletion src/22630.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,12 @@ void func_80023D60(s32);
void func_80023F78(s32 arg0);
void func_80024040(s32 arg0);
s32 func_800240A0(void);
s32 func_80024A48(s32, s32, s32);
s32 func_80024EF4(void);
s32 func_80024F00(s32);
s32 func_80024FB0(s32 arg0);
void func_800251B0(s32, s8*);

s32 func_80025370(s32);
s32 func_8002539C(s32);

#endif // _6BC0_H_
48 changes: 37 additions & 11 deletions src/26820.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define _26820_H_

#include "global.h"
#include "22630.h"
#include "29BA0.h"

typedef struct unk_func_8002A728 {
Expand Down Expand Up @@ -29,19 +30,44 @@ typedef struct unk_func_800281D4 {
/* 0x10 */ char unk_10[16];
} unk_func_800281D4; // size >= 0x20

void func_80026684(s32, s32);
void func_80025C20(UNUSED MainPoolBlock* arg0, u32 arg1);
u16 func_80025C80(u8* arg0, s32 arg1);
s32 func_80025CBC(u8* arg0, s32 arg1);
void func_80025D30(u8* arg0, s32 arg1, s32 arg2);
void func_80025DA0(u8* arg0, u8* arg1, s32 arg2, s32 arg3);
void func_80025DE4(u8* arg0, s32 arg1, s32 arg2);
void func_80025E44(u8* arg0, s32 arg1, s32 arg2);
void func_80025EA0(u8* arg0, s32 arg1, s32 arg2);
void func_80025EF8(u8* arg0, s32 arg1, s32 arg2);
void func_80025F50(s32 arg0, s32 arg1);
void func_80026268(unk_func_80026268_arg0* arg0, unk_D_800AE4E8_004_1_000_010* arg1);
void func_800262DC(unk_func_80026268_arg0* arg0, unk_D_800AE4E8_004_1_000_010* arg1);
s32 func_80026338(s32 arg0, s32 arg1, s16 arg2);
void func_800264DC(s32 arg0, s32 arg1, s16 arg2);
void func_8002667C(void);
void func_80026684(s32 arg0, s32 arg1);
void func_8002685C(s32 arg0, s32 arg1);
void func_80026A34(s32 arg0, s32 arg1);
void func_80026C0C(s32 arg0, s32 arg1);
void func_8002707C(s32 arg0, s32 arg1);
void func_80027F24(unk_func_8002A728*);
void func_80027F40(unk_func_8002A728*);
void func_80027FA0(unk_func_80027FA0*, s16);
void func_80028070(u16*);
void func_800280D4(u8);
void func_80028128(s32);
s32 func_800270AC(s32 arg0);
s32 func_80027108(s32 arg0);
s16 func_800275E0(s32 arg0, s32 arg1);
s32 func_8002797C(s32 arg0, s32 arg1, s32 arg2, void* arg3);
s32 func_80027C24(s32 arg0, s32 arg1, s32 arg2, void* arg3);
void func_80027F24(unk_func_8002A728* arg0);
void func_80027F40(unk_func_8002A728* arg0);
void func_80027FA0(unk_func_80027FA0* arg0, s16 arg1);
void func_80028070(u16* arg0);
void func_800280D4(u8 arg0);
s32 func_8002816C(void);
void func_8002817C(u8, u8);
void func_800281D4(unk_func_800281D4*, unk_func_80026268_arg0*, u8);
s32 func_80028320(unk_func_800281D4*, unk_func_80026268_arg0*);
s32 func_800284B4(s16);
s32 func_80028AFC(s16);
s32 func_800284B4(s16 arg0);
s32 func_8002873C(s16 arg0, u32 arg1);
void func_80028840(void);
void func_800288F4(void);
void func_800289AC(void);
void func_80028A74(void);
s32 func_80028AFC(s16 arg0);

#endif // _26820_H_
2 changes: 1 addition & 1 deletion src/29BA0.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ unk_D_800AE540_0004* func_80029074(void) {
return D_800AE540.unk_0004;
}

s16 func_80029080(void) {
s32 func_80029080(void) {
return D_80075674;
}

Expand Down
2 changes: 1 addition & 1 deletion src/29BA0.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ s32 Game_DoCopyProtection(s32 state);
s32 func_80029008(s32 arg0, u8* romStart, u8* romEnd, u32 arg3, u32 arg4);
void func_80029048(s32 arg0, u8* arg1, u8* arg2, s32 arg3, s32 arg4);
unk_D_800AE540_0004* func_80029074(void);
s16 func_80029080(void);
s32 func_80029080(void);
void func_8002908C(s32 arg0);
void func_800290B4(void);
s32 func_800290E4(s16 arg0);
Expand Down
4 changes: 4 additions & 0 deletions src/2E460.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
#define _2E460_H_

#include "global.h"
#include "src/fragments/26/fragment26.h"

void func_8002EE78(void);
void func_8002EEA8(unk_func_88001300_034*);
void func_8002EF18(s32*);
void func_8002EF44(void);

#endif // _2E460_H_
17 changes: 16 additions & 1 deletion src/30640.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,22 @@ void func_8002FA40(void) {

#pragma GLOBAL_ASM("asm/us/nonmatchings/30640/func_8003107C.s")

#pragma GLOBAL_ASM("asm/us/nonmatchings/30640/func_80031140.s")
void func_80031140(unk_func_80026268_arg0* arg0, unk_D_83407AC8* arg1) {
s32 i;

bzero(arg0, sizeof(unk_func_80026268_arg0));

arg0->unk_0E = arg1->unk_00;
arg0->unk_00 = arg1->unk_02;

for (i = 0; i < 11; i++) {
arg0->unk_30[i] = arg1->unk_03[i];
}

for (i = 0; i < 11; i++) {
arg0->unk_3B[i] = arg1->unk_0E[i];
}
}

#pragma GLOBAL_ASM("asm/us/nonmatchings/30640/func_80031204.s")

Expand Down
8 changes: 3 additions & 5 deletions src/30640.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@
typedef struct unk_D_83407AC8 {
/* 0x00 */ u16 unk_00;
/* 0x02 */ u8 unk_02;
/* 0x03 */ u8 unk_03[11];
/* 0x0E */ u8 unk_0E;
/* 0x0F */ u8 unk_0F;
/* 0x10 */ u8 unk_10;
} unk_D_83407AC8; // size >= 0x12
/* 0x03 */ s8 unk_03[11];
/* 0x0E */ s8 unk_0E[11];
} unk_D_83407AC8; // size >= 0x1A

typedef struct unk_D_83402EE0_070 {
/* 0x00 */ char unk00[0x1A];
Expand Down
6 changes: 3 additions & 3 deletions src/3FB0.c
Original file line number Diff line number Diff line change
Expand Up @@ -472,10 +472,10 @@ void func_80004200(u32 block_addr, u32 addr) {
}
}

s32 func_80004258(s32 id, u8* rom_start, u8* rom_end, s32 arg3) {
s32 vaddr = func_80003DC4(rom_start, rom_end, arg3, 0);
u8* func_80004258(s32 id, u8* rom_start, u8* rom_end, s32 arg3) {
u8* vaddr = func_80003DC4(rom_start, rom_end, arg3, 0);

if ((vaddr != 0) && (id > 0)) {
if ((vaddr != NULL) && (id > 0)) {
Memmap_SetSegmentMap(id, vaddr, main_pool_get_block_dist(vaddr));
main_pool_set_func(vaddr, id + 0x82000000, &func_80004200);
}
Expand Down
2 changes: 1 addition & 1 deletion src/3FB0.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ unk_func_800041C0* func_80004098(unk_func_800041C0* arg0, s32 arg1, s32 arg2);
unk_func_800041C0* func_800040EC(unk_func_800041C0* arg0, u32 arg1, u32 offset, u32 size);
void func_800041C0(s32 arg0, s32 arg1, s32 arg2);
void func_80004200(u32 block_addr, u32 addr);
s32 func_80004258(s32 id, u8* rom_start, u8* rom_end, s32 arg3);
u8* func_80004258(s32 id, u8* rom_start, u8* rom_end, s32 arg3);
MainPoolBlock* func_800042E0(s32 arg0, s32 arg1, s32 arg2, s32 arg3);
void func_80004364(u32 base_addr, u32 addr);
void func_800043BC(s32 arg0, Fragment* addr);
Expand Down
Loading

0 comments on commit 4869288

Please sign in to comment.