33#define oTAP_Hdd_ReadSectorDMA 0x00
34#define oTAP_Hdd_WriteSectorDMA 0x01
35#define oTAP_Hdd_Move 0x13
37#define FBHDIO_DRIVE_CMD_HDR_SIZE (4 * sizeof(unsigned char))
38#define FBHDIO_DRIVE_TASK_HDR_SIZE (8 * sizeof(unsigned char))
40#define SMART_READ_VALUES 0xD0
41#define SMART_READ_THRESHOLDS 0xD1
42#define SMART_STATUS 0xDA
43#define SMART_AUTOSAVE 0xD2
44#define WIN_SETFEATURES 0xEF
45#define SETFEATURES_EN_AAM 0x42
46#define SETFEATURES_DIS_AAM 0xC2
47#define SETFEATURES_EN_APM 0x05
48#define SETFEATURES_DIS_APM 0x85
49#define SMART_ENABLE 0xD8
50#define SMART_DISABLE 0xD9
51#define HDIO_DRIVE_TASK 0x031e
52#define HDIO_DRIVE_CMD 0x031f
57typedef dword (*
tTAP_Hdd_Move)(
char *from_dir,
char *to_dir,
char *filename);
59#define endian_swap_word(x) *x = (*x << 8) | (*x >> 8)
61#define DIR_MAX_STACK 16
96extern int lstat64(__const
char *__restrict __file,
tstat64 *__restrict __buf) __THROW;
97extern int stat64(__const
char *__restrict __file,
tstat64 *__restrict __buf) __THROW;
116extern void* (*TAP_GetSystemProc)(int);
135#define RECYCLEPATH "/DataFiles/RecycleBin-/"
137typedef struct __STDIO_FILE_STRUCT
FILE;
139extern FILE *
fopen64 (__const
char *__restrict __filename, __const
char *__restrict __modes);
dword(* tTAP_Hdd_WriteSectorDMA)(dword SectorNr, dword NrSectors, void *Buffer)
volatile byte * HDD_pSecCount
int SendHDDCommand(dword, const byte *, int)
bool PopDirEntry(dword *Cluster, dword *Entry, dword *DirLen)
struct __STDIO_FILE_STRUCT FILE
volatile byte * HDD_pLBALow
dword getNextCluster(dword c)
int stat64(__const char *__restrict __file, tstat64 *__restrict __buf) __THROW
volatile byte * HDD_pCommand
dword(* tTAP_Hdd_ReadSectorDMA)(dword SectorNr, dword NrSectors, void *Buffer)
volatile word * HDD_pData
volatile byte * HDD_pAltStatus
bool PushDirEntry(dword Cluster, dword Entry, dword DirLen)
volatile byte * HDD_pFeature
int ReceiveSector(word *)
int fseeko64(FILE *__stream, __off64_t __off, int __whence)
FILE * fopen64(__const char *__restrict __filename, __const char *__restrict __modes)
dword CalcAbsSectorFromFAT(TYPE_File *, dword)
volatile byte * HDD_pDevice
tTAP_Hdd_WriteSectorDMA TAP_Hdd_WriteSectorDMA
volatile byte * HDD_pStatus
volatile byte * HDD_pError
dword(* tTAP_Hdd_Move)(char *from_dir, char *to_dir, char *filename)
int lstat64(__const char *__restrict __file, tstat64 *__restrict __buf) __THROW
volatile byte * HDD_pLBAHigh
int GetClusterPointer(int)
volatile byte * HDD_pLBAMid
tTAP_Hdd_ReadSectorDMA TAP_Hdd_ReadSectorDMA