Decompile pakReadHeaderAtOffset

This commit is contained in:
Ryan Dwyer
2021-09-18 21:50:02 +10:00
parent cd3e03ca42
commit a89cff0718
4 changed files with 81 additions and 351 deletions
+3 -3
View File
@@ -38,7 +38,7 @@ void pak0f117150(s8 device, u8 *ptr);
void pak0f1171b4(s8 device, s32 arg1, s32 arg2);
s32 pakGetUnk008(s8 device);
u32 pak0f117430(void);
u32 pakReadHeaderAtOffset(s8 device, u32 arg1, struct pakfileheader *header);
u32 pakReadHeaderAtOffset(s8 device, u32 offset, struct pakfileheader *header);
void pakDumpBuffer(u8 *buffer, u32 len, char *name);
void pakDumpEeprom(void);
s32 pak0f11789c(s8 device, s32 fileid, s32 filetype, u8 *body, s32 *outfileid, s32 arg5);
@@ -92,8 +92,8 @@ u32 pak0f11a7dc(void);
u32 pak0f11a8f4(void);
u32 pak0f11ac7c(void);
void pakWipe(s8 device, u32 start, u32 end);
u32 pak0f11b178(void);
u32 pak0f11b488(void);
void pak0f11b178(s8 device, u32 arg1, u8 *arg2);
u32 pak0f11b488(s8 device, u32 arg1, struct pakfileheader *header);
s32 pakScrub(s8 device);
bool pak0f11b75c(s8 device, u32 *arg1);
s32 pak0f11b86c(s32 device, u32 uVar2, u8 *data, struct pakfileheader *header, s32 arg3);
+6 -3
View File
@@ -6675,9 +6675,10 @@ struct pakthing {
};
struct pakfileheader {
u32 unk00;
u16 sum1;
u16 sum2;
u16 headersum1; // checksum from filetype to end of header
u16 headersum2;
u16 bodysum1;
u16 bodysum2;
u32 filetype : 9; // PAKFILETYPE constant
u32 bodylen : 11; // not aligned
u32 filelen : 12; // aligned to 0x10
@@ -6685,6 +6686,8 @@ struct pakfileheader {
u32 fileid : 7;
u32 unk0c_21 : 9;
u32 occupied : 1;
u32 unk0c_30 : 1; // always 1?
u32 version : 1; // always 0?
};
struct var80067e6c {