Skip to content

Commit

Permalink
1C720
Browse files Browse the repository at this point in the history
  • Loading branch information
Maide committed Aug 13, 2024
1 parent 5863908 commit d505018
Show file tree
Hide file tree
Showing 24 changed files with 8,749 additions and 640 deletions.
40 changes: 20 additions & 20 deletions include/functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,45 @@

#include "ultra64.h"

extern void func_80057FD0(void *, int);
extern s32 func_8005A990(OSPiHandle *);
void func_80057FD0(void *, int);
s32 func_8005A990(OSPiHandle *);

// bcopy.s
extern void _bcopy(void *, void *, u32);
void _bcopy(void *, void *, u32);

// 3FB0.s
extern void func_80003B30(void *, s32, s32, s32); // types unknown
extern void func_80004200();
void func_80003B30(void *, s32, s32, s32); // types unknown
void func_80004200();

// 5580.s
extern void func_80004CC0(OSThread *, s32, s32);
extern void func_80004CF4(void *); // types unknown
extern void func_80004D20(void *); // types unknown
extern void func_800052B4(void);
extern void func_800053B4(void *, s32); // types unknown
extern void func_80005328(void *); // types unknown
void func_80004CC0(OSThread *, s32, s32);
void func_80004CF4(void *); // types unknown
void func_80004D20(void *); // types unknown
void func_800052B4(void);
void func_800053B4(void *, s32); // types unknown
void func_80005328(void *); // types unknown

// C030.s
extern s32 func_8000B4C4(void);
s32 func_8000B4C4(void);

// Yay0.s
extern void Yay0_Decompress(void* src, void* dst);
void Yay0_Decompress(void* src, void* dst);

// D470.s
extern void func_8000C8F8(void);
extern void func_8000CEE4(s32, s32, void *, OSMesgQueue *);
extern void func_8000D0B4(s32, s32, s32, void *, s32, OSMesgQueue *);
void func_8000C8F8(void);
void func_8000CEE4(s32, s32, void *, OSMesgQueue *);
void func_8000D0B4(s32, s32, s32, void *, s32, OSMesgQueue *);

// DDC0.s
extern void func_8000D564(void);
void func_8000D564(void);

// E570.s
extern void func_8000D970(OSPfs *);
void func_8000D970(OSPfs *);

// 29BA0.s
extern void func_8002B274(s32, s32);
void func_8002B274(s32, s32);

// exception_set.s
extern void set_watch_lohi(s32);
void set_watch_lohi(s32);

#endif
51 changes: 46 additions & 5 deletions include/global.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,62 @@ typedef unsigned int uintptr_t;
#include "gfx.h"
#include "color.h"

typedef struct unk_D_86002F58_004_00C_028 {
/* 0x00 */ char pad0[4];
/* 0x04 */ u8 unk_04;
/* 0x05 */ u8 unk_05;
/* 0x06 */ char pad6[6];
/* 0x0C */ s32* unk_0C;
/* 0x10 */ s32* unk_10;
} unk_D_86002F58_004_00C_028; // size >= 0x14

typedef unk_D_86002F58_004_00C_028* (*unk_D_86002F58_004_00C_028_func)(s32, s32);

typedef struct unk_D_86002F58_004_00C {
/* 0x00 */ char unk_00[0x28];
/* 0x28 */ unk_D_86002F58_004_00C_028_func unk_28;
} unk_D_86002F58_004_00C; // size >= 0x2C

typedef struct unk_D_86002F58_004_010 {
/* 0x00 */ u8 unk_00;
/* 0x01 */ char unk_01[0x23];
/* 0x24 */ s32 unk_24;
/* 0x28 */ s32 unk_28;
} unk_D_86002F58_004_010; // size >= 0x2C

typedef struct unk_D_86002F58_004 {
/* 0x000 */ char pad0[0xC];
/* 0x00C */ s32 unk_00C;
/* 0x010 */ s8 unk_010[0x10];
/* 0x000 */ char pad0[1];
/* 0x001 */ u8 unk_001;
/* 0x002 */ u8 unk_002;
/* 0x003 */ char pad3[9];
/* 0x00C */ unk_D_86002F58_004_00C* unk_00C;
/* 0x010 */ unk_D_86002F58_004_010* unk_010;
/* 0x014 */ char unk014[0x4];
/* 0x018 */ s16 unk_018;
/* 0x01A */ s16 unk_01A;
/* 0x01C */ u8 unk_01C;
/* 0x01D */ u8 unk_01D;
/* 0x01E */ char unk01E[0x2];
/* 0x020 */ s16 unk_020;
/* 0x024 */ f32 unk_024;
/* 0x028 */ f32 unk_028;
/* 0x02C */ f32 unk_02C;
/* 0x030 */ f32 unk_030;
/* 0x034 */ f32 unk_034;
/* 0x038 */ f32 unk_038;
/* 0x03C */ char pad3C[0xC];
/* 0x03C */ s32 unk_03C;
/* 0x040 */ s16 unk_040;
/* 0x044 */ s32 unk_044;
/* 0x048 */ s32 unk_048;
/* 0x04C */ u32 unk_04C;
/* 0x050 */ char pad50[0x56];
/* 0x050 */ char pad50[4];
/* 0x054 */ s16 unk_054;
/* 0x058 */ s32 unk_058;
/* 0x05C */ char pad5C[4];
/* 0x060 */ s32 unk_060;
/* 0x064 */ char pad64[0x3C];
/* 0x0A0 */ s32 unk_0A0;
/* 0x0A4 */ char padA4[2];
/* 0x0A6 */ s8 unk_0A6;
/* 0x0A7 */ char padA7[5];
/* 0x0AC */ f32 unk_0AC;
Expand Down
86 changes: 43 additions & 43 deletions include/libleo/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,49 +157,49 @@ extern const s32 LEORAM_BYTE[7];
#define ASIC_HARD_RESET_CODE 0xaaaa0000

// Functions
extern u8 leoAnalize_asic_status(void);
extern u8 leoChk_asic_ready(u32 asic_cmd);
extern u8 leoChk_done_status(u32 asic_cmd);
extern u8 leoSend_asic_cmd_i(u32 asic_cmd, u32 asic_data);
extern u8 leoWait_mecha_cmd_done(u32 asic_cmd);
extern u8 leoSend_asic_cmd_w(u32 asic_cmd, u32 asic_data);
extern u8 leoSend_asic_cmd_w_nochkDiskChange(u32 asic_cmd, u32 asic_data);
extern u8 leoDetect_index_w(void);
extern u8 leoRecal_i(void);
extern u8 leoRecal_w(void);
extern u8 leoSeek_i(u16 rwmode);
extern u8 leoSeek_w(void);
extern s32 leoRecv_event_mesg(s32 control);
extern u32 leoChk_err_retry(u32 sense);
extern u8 leoChk_cur_drvmode(void);
extern void leoDrive_reset(void);
extern u32 leoChkUnit_atten(void);
extern u32 leoRetUnit_atten(void);
extern void leoClrUA_RESET(void);
extern void leoClrUA_MEDIUM_CHANGED(void);
extern void leoSetUA_MEDIUM_CHANGED(void);
extern void leoInitUnit_atten(void);
extern void leoClr_queue(void);
extern void leointerrupt(void*);
extern void leomain(void*);
extern void leoRead_common(u32 offset);
extern void leoClrUA_MEDIUM_CHANGED(void);
extern void leoSetUA_MEDIUM_CHANGED(void);
extern s32 leoC2_Correction(void);
extern void leoC2_single_ecc(void);
extern void leoC2_double_ecc(void);
extern void leoC2_3_ecc(void);
extern void leoC2_4_ecc(void);
extern s32 leoAlpha_mult(s32 i, s32 k);
extern s32 leoAlpha_div(s32 i, s32 k);
extern s32 leoVerifyRTC(u8 yearhi, u8 yearlo);
extern u8 __locReadTimer(__LOCTime* time);
extern u8 __locSetTimer(__LOCTime* time);
extern s32 __leoSetReset(void);
extern s32 __osLeoInterrupt(void);
extern u16 leoLba_to_vzone(u32 lba);
extern u16 leoLba_to_phys(u32 lba);
extern void leoSet_mseq(u16 rwmode);
u8 leoAnalize_asic_status(void);
u8 leoChk_asic_ready(u32 asic_cmd);
u8 leoChk_done_status(u32 asic_cmd);
u8 leoSend_asic_cmd_i(u32 asic_cmd, u32 asic_data);
u8 leoWait_mecha_cmd_done(u32 asic_cmd);
u8 leoSend_asic_cmd_w(u32 asic_cmd, u32 asic_data);
u8 leoSend_asic_cmd_w_nochkDiskChange(u32 asic_cmd, u32 asic_data);
u8 leoDetect_index_w(void);
u8 leoRecal_i(void);
u8 leoRecal_w(void);
u8 leoSeek_i(u16 rwmode);
u8 leoSeek_w(void);
s32 leoRecv_event_mesg(s32 control);
u32 leoChk_err_retry(u32 sense);
u8 leoChk_cur_drvmode(void);
void leoDrive_reset(void);
u32 leoChkUnit_atten(void);
u32 leoRetUnit_atten(void);
void leoClrUA_RESET(void);
void leoClrUA_MEDIUM_CHANGED(void);
void leoSetUA_MEDIUM_CHANGED(void);
void leoInitUnit_atten(void);
void leoClr_queue(void);
void leointerrupt(void*);
void leomain(void*);
void leoRead_common(u32 offset);
void leoClrUA_MEDIUM_CHANGED(void);
void leoSetUA_MEDIUM_CHANGED(void);
s32 leoC2_Correction(void);
void leoC2_single_ecc(void);
void leoC2_double_ecc(void);
void leoC2_3_ecc(void);
void leoC2_4_ecc(void);
s32 leoAlpha_mult(s32 i, s32 k);
s32 leoAlpha_div(s32 i, s32 k);
s32 leoVerifyRTC(u8 yearhi, u8 yearlo);
u8 __locReadTimer(__LOCTime* time);
u8 __locSetTimer(__LOCTime* time);
s32 __leoSetReset(void);
s32 __osLeoInterrupt(void);
u16 leoLba_to_vzone(u32 lba);
u16 leoLba_to_phys(u32 lba);
void leoSet_mseq(u16 rwmode);

extern s32 __leoActive;
extern s32 __leoResetCalled;
Expand Down
19 changes: 17 additions & 2 deletions include/variables.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef _VARIABLES_H_
#define _VARIABLES_H_

#include "ultra64.h"
#include "global.h"

// thread pris
#define THREAD_PRI_IDLE_INIT 100
Expand All @@ -27,7 +27,6 @@ extern u32 D_1000000;
extern u32 D_3000000;
extern u32 D_5000000;
extern u32 D_6000000;
extern u32 D_800AC840;
extern u32 D_8D000000;

typedef struct unk_D_80068BA0 {
Expand Down Expand Up @@ -87,4 +86,20 @@ typedef struct unk_D_800A7440 {
} unk_D_800A7440; // size >= 0x8
extern unk_D_800A7440 D_800A7440;

extern struct unk_D_86002F58_004 D_800AC840;
extern struct unk_D_86002F58_004 D_800AC858;
extern struct unk_D_86002F58_004* D_8006F09C;

extern s32 D_8006F050[];
extern s16 D_8006F05C[];
extern f32 D_8006F064[];

typedef struct unk_D_8006FF00 {
/* 0x00 */ char unk_00[0x10];
/* 0x10 */ s16 unk_10;
/* 0x12 */ s16 unk_12;
/* 0x14 */ char unk_14[0x8];
} unk_D_8006FF00; // size = 0x1C
extern unk_D_8006FF00 D_8006FF00[];

#endif
Loading

0 comments on commit d505018

Please sign in to comment.