pf_fat initial draft

This commit is contained in:
shibbo committed 2026-01-29 18:40:26 -05:00
1 parent 6b29d7173a
commit 21bfe60dbc
11 files changed
+1155 -38

No files matched your search

+2 -1
View File
@@ -8,7 +8,8 @@ AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: Never
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
@@ -7,4 +7,12 @@ s32 VFiPFCACHE_UpdateModifiedSector(PF_VOLUME* p_vol, PF_CACHE_PAGE* p_page, u32
s32 VFiPFCACHE_ReadFATPage(PF_VOLUME* p_vol, u32 sector, PF_CACHE_PAGE** pp_page);
s32 VFiPFCACHE_WriteFATPage(PF_VOLUME* p_vol, PF_CACHE_PAGE* p_page);
s32 VFiPFCACHE_AllocateDataPage(PF_VOLUME* p_vol, u32 sector, PF_CACHE_PAGE** pp_page);
s32 VFiPFCACHE_FlushFATCache(PF_VOLUME* p_vol);
void VFiPFCACHE_FreeDataPage(PF_VOLUME* p_vol, PF_CACHE_PAGE* p_page);
#endif // PF_CACHE_H
@@ -0,0 +1,8 @@
#ifndef PF_CLIB_H
#define PF_CLIB_H
#include "revolution/types.h"
void* VFipf_memset(void* dst, long c, unsigned long length);
#endif // PF_CLIB_H
@@ -0,0 +1,14 @@
#ifndef PF_DRIVER_H
#define PF_DRIVER_H
#include "revolution/vf/vf_struct.h"
s32 VFiPFDRV_lwrite(PF_VOLUME* p_vol, const u8* buf, u32 sector, u32 num_sectors, u32* p_num_success);
s32 VFiPFDRV_GetFSINFOInformation(PF_VOLUME* p_vol);
s32 VFiPFDRV_StoreFreeCountToFSINFO(PF_VOLUME* p_vol);
s32 VFiPFDRV_lerase(PF_VOLUME* p_vol, u32 sector, u32 num_sectors);
#endif // PF_DRIVER_H
+8 -2
View File
@@ -5,10 +5,16 @@
s32 VFiPFFAT_ReadFATSector(PF_VOLUME* p_vol, PF_CACHE_PAGE** pp_page, u32 cluster);
s32 VFiPFFAT_ReadFATEntryPage(PF_VOLUME* p_vol, u32 cluster, u32* p_value, PF_CACHE_PAGE** pp_page);
s32 VFiPFFAT_UpdateFATEntry(PF_VOLUME* p_vol, PF_CACHE_PAGE* p_page);
s32 VFiPFFAT_ClearClusterLink(PF_FFD* p_ffd, u32 chain_index);
s32 VFiPFFAT_WriteFATEntryPage(PF_VOLUME* p_vol, u32 cluster, u32 value, PF_CACHE_PAGE** p_page);
s32 VFiPFFAT_RefreshFSINFO(PF_VOLUME* p_vol);
s32 VFiPFFAT_FreeChain(PF_FFD* p_ffd, u32 start_cluster, u32 chain_index, u32 size);
s32 VFiPFFAT_GetNumberOfCluster(PF_FFD* p_ffd, u32 chain_index, u32 may_allocate, u32*);
#endif // PF_FAT_H
@@ -3,7 +3,7 @@
#include "revolution/vf/vf_struct.h"
s32 VFiPFFAT12_READFATEntry(PF_VOLUME* p_vol, u16 cluster, u32* p_value);
s32 VFiPFFAT12_ReadFATEntry(PF_VOLUME* p_vol, u16 cluster, u32* p_value);
s32 VFiPFFAT12_ReadFATEntryPage(PF_VOLUME* p_vol, u16 cluster, u32* p_value, PF_CACHE_PAGE** pp_page);
s32 VFiPFFAT12_WriteFATEntry(PF_VOLUME* p_vol, u16 cluster, u16 value);
s32 VFiPFFAT12_WriteFATEntryPage(PF_VOLUME* p_vol, u16 cluster, u16 value, PF_CACHE_PAGE** pp_page);
@@ -3,6 +3,10 @@
#include "revolution/vf/vf_struct.h"
s32 VFiPFFAT16_ReadFATEntry(PF_VOLUME* p_vol, u32 cluster, u32* p_value);
s32 VFiPFFAT16_ReadFATEntryPage(PF_VOLUME* p_vol, u32 cluster, u32* p_value, PF_CACHE_PAGE** pp_page);
s32 VFiPFFAT16_WriteFATEntry(PF_VOLUME* p_vol, u32 cluster, u32 value);
#endif // PF_FAT16_H
@@ -3,6 +3,10 @@
#include "revolution/vf/vf_struct.h"
s32 VFiPFFAT32_ReadFATEntry(PF_VOLUME* p_vol, u32 cluster, u32* p_value);
s32 VFiPFFAT32_ReadFATEntryPage(PF_VOLUME* p_vol, u32 cluster, u32* p_value, PF_CACHE_PAGE** pp_page);
s32 VFiPFFAT32_WriteFATEntry(PF_VOLUME* p_vol, u32 cluster, u32 value);
#endif // PF_FAT32_H
@@ -7,4 +7,6 @@ s32 VFiPFSEC_ReadFAT(PF_VOLUME* p_vol, u8* p_buf, u32 sector, u16 offset, u16 si
s32 VFiPFSEC_WriteFAT(PF_VOLUME* p_vol, const u8* p_buf, u32 sector, u16 offset, u16 size);
s32 VFiPFSEC_WriteDataSector(PF_VOLUME* p_vol, const u8* p_buf, u32 sector, u32 size, u32* p_success_size, u32 is_direct, u32 set_sig);
#endif // PF_SECTOR_H
@@ -70,11 +70,11 @@ typedef struct PF_DIR_ENT {
unsigned short entry_offset; // offset 0x23C, size 0x2
} PF_DIR_ENT;
struct PF_FAT_HINT {
typedef struct PF_FAT_HINT {
// total size: 0x8
unsigned long chain_index; // offset 0x0, size 0x4
unsigned long cluster; // offset 0x4, size 0x4
};
} PF_FAT_HINT;
struct PF_CLUSTER_LINK {
// total size: 0x14
+1102 -32
View File
File diff suppressed because it is too large. Load diff