sdk-core v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Loading...
Searching...
No Matches
fat_driver.h File Reference
#include "scache.h"
#include <bdm.h>

Go to the source code of this file.

Classes

struct  _fat_bpb
struct  _fat_driver
struct  _fat_dir_list
struct  _fat_dir_chain_record
struct  _fat_dir

Macros

#define DIR_CHAIN_SIZE   32
#define FAT_MAX_NAME   256
#define FAT_ATTR_READONLY   0x01
#define FAT_ATTR_HIDDEN   0x02
#define FAT_ATTR_SYSTEM   0x04
#define FAT_ATTR_VOLUME_LABEL   0x08
#define FAT_ATTR_DIRECTORY   0x10
#define FAT_ATTR_ARCHIVE   0x20
#define MAX_DIR_CLUSTER   512
#define MAX_DE_STACK   21
#define SEQ_MASK_SIZE   2048
#define DIR_MASK_SIZE   2048 * 11
#define MAX_CLUSTER_STACK   128

Typedefs

typedef struct _fat_bpb fat_bpb
typedef struct _fat_driver fat_driver
typedef struct _fat_dir_list fat_dir_list
typedef struct _fat_dir_chain_record fat_dir_chain_record
typedef struct _fat_dir fat_dir

Functions

int strEqual (const char *s1, const char *s2)
int fat_mount (struct block_device *bd)
void fat_forceUnmount (struct block_device *bd)
void fat_setFatDirChain (fat_driver *fatd, fat_dir *fatDir)
int fat_readFile (fat_driver *fatd, fat_dir *fatDir, unsigned int filePos, unsigned char *buffer, unsigned int size)
int fat_getFirstDirentry (fat_driver *fatd, const char *dirName, fat_dir_list *fatdlist, fat_dir *fatDir_host, fat_dir *fatDir)
int fat_getNextDirentry (fat_driver *fatd, fat_dir_list *fatdlist, fat_dir *fatDir)
fat_driver * fat_getData (int device)
int fat_getFileStartCluster (fat_driver *fatd, const char *fname, unsigned int *startCluster, fat_dir *fatDir)
int fat_getClusterChain (fat_driver *fatd, unsigned int cluster, unsigned int *buf, unsigned int bufSize, int startFlag)
int fat_CheckChain (fat_driver *fatd, unsigned int cluster)
int fat_stopUnit (int device)
void fat_stopAll (void)

Macro Definition Documentation

◆ DIR_CHAIN_SIZE

#define DIR_CHAIN_SIZE   32

Definition at line 13 of file fat_driver.h.

◆ DIR_MASK_SIZE

#define DIR_MASK_SIZE   2048 * 11

Definition at line 71 of file fat_driver.h.

◆ FAT_ATTR_ARCHIVE

#define FAT_ATTR_ARCHIVE   0x20

Definition at line 23 of file fat_driver.h.

◆ FAT_ATTR_DIRECTORY

#define FAT_ATTR_DIRECTORY   0x10

Definition at line 22 of file fat_driver.h.

◆ FAT_ATTR_HIDDEN

#define FAT_ATTR_HIDDEN   0x02

Definition at line 19 of file fat_driver.h.

◆ FAT_ATTR_READONLY

#define FAT_ATTR_READONLY   0x01

Definition at line 18 of file fat_driver.h.

◆ FAT_ATTR_SYSTEM

#define FAT_ATTR_SYSTEM   0x04

Definition at line 20 of file fat_driver.h.

◆ FAT_ATTR_VOLUME_LABEL

#define FAT_ATTR_VOLUME_LABEL   0x08

Definition at line 21 of file fat_driver.h.

◆ FAT_MAX_NAME

#define FAT_MAX_NAME   256

Definition at line 15 of file fat_driver.h.

◆ MAX_CLUSTER_STACK

#define MAX_CLUSTER_STACK   128

Definition at line 74 of file fat_driver.h.

◆ MAX_DE_STACK

#define MAX_DE_STACK   21

Definition at line 64 of file fat_driver.h.

◆ MAX_DIR_CLUSTER

#define MAX_DIR_CLUSTER   512

Definition at line 57 of file fat_driver.h.

◆ SEQ_MASK_SIZE

#define SEQ_MASK_SIZE   2048

Definition at line 69 of file fat_driver.h.

Function Documentation

◆ fat_CheckChain()

int fat_CheckChain ( fat_driver * fatd,
unsigned int cluster )
extern

Definition at line 299 of file fat_driver.c.

◆ fat_forceUnmount()

void fat_forceUnmount ( struct block_device * bd)
extern

Definition at line 1331 of file fat_driver.c.

◆ fat_getClusterChain()

int fat_getClusterChain ( fat_driver * fatd,
unsigned int cluster,
unsigned int * buf,
unsigned int bufSize,
int startFlag )
extern

Definition at line 274 of file fat_driver.c.

◆ fat_getData()

fat_driver * fat_getData ( int device)
extern

Definition at line 1362 of file fat_driver.c.

◆ fat_getFileStartCluster()

int fat_getFileStartCluster ( fat_driver * fatd,
const char * fname,
unsigned int * startCluster,
fat_dir * fatDir )
extern

Definition at line 818 of file fat_driver.c.

◆ fat_getFirstDirentry()

int fat_getFirstDirentry ( fat_driver * fatd,
const char * dirName,
fat_dir_list * fatdlist,
fat_dir * fatDir_host,
fat_dir * fatDir )
extern

Definition at line 1201 of file fat_driver.c.

◆ fat_getNextDirentry()

int fat_getNextDirentry ( fat_driver * fatd,
fat_dir_list * fatdlist,
fat_dir * fatDir )
extern

Definition at line 1106 of file fat_driver.c.

◆ fat_mount()

int fat_mount ( struct block_device * bd)
extern

Definition at line 1227 of file fat_driver.c.

◆ fat_readFile()

int fat_readFile ( fat_driver * fatd,
fat_dir * fatDir,
unsigned int filePos,
unsigned char * buffer,
unsigned int size )
extern

Definition at line 915 of file fat_driver.c.

◆ fat_setFatDirChain()

void fat_setFatDirChain ( fat_driver * fatd,
fat_dir * fatDir )
extern

Definition at line 569 of file fat_driver.c.

◆ fat_stopAll()

void fat_stopAll ( void )
extern

Definition at line 1397 of file fat_driver.c.

◆ fat_stopUnit()

int fat_stopUnit ( int device)
extern

Definition at line 1389 of file fat_driver.c.

◆ strEqual()

int strEqual ( const char * s1,
const char * s2 )
extern

Definition at line 67 of file fat_driver.c.