12#define CARD_FAT_AVAIL 0x0000u
13#define CARD_FAT_CHECKSUM 0x0000u
14#define CARD_FAT_CHECKSUMINV 0x0001u
15#define CARD_FAT_CHECKCODE 0x0002u
16#define CARD_FAT_FREEBLOCKS 0x0003u
17#define CARD_FAT_LASTSLOT 0x0004u
19#define CARD_PAGE_SIZE 128u
20#define CARD_SEG_SIZE 512u
22#define CARD_NUM_SYSTEM_BLOCK 5
23#define CARD_SYSTEM_BLOCK_SIZE (8 * 1024u)
25#define CARD_MAX_MOUNT_STEP (CARD_NUM_SYSTEM_BLOCK + 2)
168#define CARDIsValidBlockNo(card, iBlock) \
169 (CARD_NUM_SYSTEM_BLOCK <= (iBlock) && (iBlock) < (card)->cBlock)
170#define __CARDGetDirCheck(dir) ((CARDDirCheck*)&(dir)[CARD_MAX_FILE])
172#define TRUNC(n, a) (((u32)(n)) & ~((a)-1))
173#define OFFSET(n, a) (((u32)(n)) & ((a)-1))
u16 __CARDGetFontEncode(void)
Definition CARDBios.c:532
s32 __CARDSeek(CARDFileInfo *fileInfo, s32 length, s32 offset, CARDControl **pcard)
Definition CARDRead.c:8
s32 __CARDReadSegment(s32 chan, CARDCallback callback)
Definition CARDBios.c:379
s32 __CARDReadVendorID(s32 chan, u16 *vendorId)
Definition CARDBios.c:169
void __CARDSetDiskID(const DVDDiskID *id)
Definition CARDBios.c:537
s32 __CARDAllocBlock(s32 chan, u32 cBlock, CARDCallback callback)
Definition CARDBlock.c:80
s32 __CARDClearStatus(s32 chan)
Definition CARDBios.c:188
s32 __CARDUpdateDir(s32 chan, CARDCallback callback)
Definition CARDDir.c:77
s32 __CARDFormatRegionAsync(s32 chan, u16 encode, CARDCallback callback)
Definition CARDFormat.c:49
void __CARDUnlockedHandler(s32 chan, OSContext *context)
Definition CARDBios.c:120
s32 __CARDEnableInterrupt(s32 chan, BOOL enable)
Definition CARDBios.c:133
s32 __CARDUpdateFatBlock(s32 chan, u16 *fat, CARDCallback callback)
Definition CARDBlock.c:130
s32 __CARDRead(s32 chan, u32 addr, s32 length, void *dst, CARDCallback callback)
Definition CARDRdwr.c:44
void __CARDCheckSum(void *ptr, int length, u16 *checksum, u16 *checksumInv)
Definition CARDCheck.c:11
void __CARDMountCallback(s32 chan, s32 result)
Definition CARDMount.c:260
BOOL __CARDCompareFileName(CARDDir *ent, const char *fileName)
Definition CARDOpen.c:7
void __CARDDefaultApiCallback(s32 chan, s32 result)
Definition CARDBios.c:14
s32 __CARDUnlock(s32 chan, u8 flashID[12])
Definition CARDUnlock.c:197
s32 __CARDWritePage(s32 chan, CARDCallback callback)
Definition CARDBios.c:414
DVDDiskID __CARDDiskNone
Definition CARDBios.c:17
s32 __CARDStart(s32 chan, CARDCallback txCallback, CARDCallback exiCallback)
s32 __CARDVerify(CARDControl *card)
Definition CARDCheck.c:172
s32 __CARDEraseSector(s32 chan, u32 addr, CARDCallback callback)
Definition CARDBios.c:453
s32 __CARDWrite(s32 chan, u32 addr, s32 length, void *dst, CARDCallback callback)
Definition CARDRdwr.c:94
u8 data_80450A72
Definition CARDNet.c:9
void __CARDExtHandler(s32 chan, OSContext *context)
Definition CARDBios.c:28
s32 __CARDReadStatus(s32 chan, u8 *status)
Definition CARDBios.c:150
void __CARDTxHandler(s32 chan, OSContext *context)
Definition CARDBios.c:103
s32 __CARDSync(s32 chan)
Definition CARDBios.c:629
u16 * __CARDGetFatBlock(CARDControl *card)
Definition CARDBlock.c:9
s32 __CARDGetControlBlock(s32 chan, struct CARDControl **pcard)
Definition CARDBios.c:543
CARDControl __CARDBlock[2]
Definition CARDBios.c:20
void __CARDExiHandler(s32 chan, OSContext *context)
Definition CARDBios.c:57
void __CARDSyncCallback(s32 chan, s32 result)
Definition CARDBios.c:23
u16 __CARDVendorID
Definition CARDNet.c:6
s32 __CARDIsWritable(CARDControl *card, CARDDir *ent)
Definition CARDOpen.c:47
CARDDir * __CARDGetDirBlock(CARDControl *card)
Definition CARDDir.c:9
s32 __CARDAccess(CARDControl *card, CARDDir *ent)
Definition CARDOpen.c:31
s32 __CARDIsReadable(CARDControl *card, CARDDir *ent)
Definition CARDOpen.c:78
s32 __CARDPutControlBlock(struct CARDControl *card, s32 result)
Definition CARDBios.c:569
static OSContext context
Definition JUTException.cpp:233
T cLib_calcTimer(T *value)
Definition c_lib.h:74
void(* CARDCallback)(s32 chan, s32 result)
Definition card.h:122
static s32 status
Definition fstload.c:6
const DVDDiskID * diskID
Definition CARDPriv.h:96
CARDCallback extCallback
Definition CARDPriv.h:87
void * workArea
Definition CARDPriv.h:72
CARDCallback exiCallback
Definition CARDPriv.h:89
u32 cid
Definition CARDPriv.h:95
CARDCallback eraseCallback
Definition CARDPriv.h:92
u16 vendorID
Definition CARDPriv.h:65
int formatStep
Definition CARDPriv.h:69
CARDCallback xferCallback
Definition CARDPriv.h:91
u16 startBlock
Definition CARDPriv.h:85
s32 cmdlen
Definition CARDPriv.h:77
u32 addr
Definition CARDPriv.h:81
CARDDir * currentDir
Definition CARDPriv.h:73
u16 freeNo
Definition CARDPriv.h:84
u16 cBlock
Definition CARDPriv.h:64
vu32 mode
Definition CARDPriv.h:78
s32 result
Definition CARDPriv.h:60
OSAlarm alarm
Definition CARDPriv.h:94
void * buffer
Definition CARDPriv.h:82
int mountStep
Definition CARDPriv.h:68
int retry
Definition CARDPriv.h:79
u32 scramble
Definition CARDPriv.h:70
s32 xferred
Definition CARDPriv.h:83
CARDFileInfo * fileInfo
Definition CARDPriv.h:86
u16 pageSize
Definition CARDPriv.h:62
DSPTaskInfo task
Definition CARDPriv.h:71
s32 latency
Definition CARDPriv.h:66
u16 size
Definition CARDPriv.h:61
int repeat
Definition CARDPriv.h:80
CARDCallback unlockCallback
Definition CARDPriv.h:93
u16 * currentFat
Definition CARDPriv.h:74
s32 sectorSize
Definition CARDPriv.h:63
CARDCallback txCallback
Definition CARDPriv.h:88
BOOL attached
Definition CARDPriv.h:59
OSThreadQueue threadQueue
Definition CARDPriv.h:75
u8 cmd[9]
Definition CARDPriv.h:76
CARDCallback apiCallback
Definition CARDPriv.h:90
s16 checkCode
Definition CARDPriv.h:53
u8 padding0[64 - 2 *4]
Definition CARDPriv.h:51
u16 checkSum
Definition CARDPriv.h:54
u16 checkSumInv
Definition CARDPriv.h:55
u16 padding1
Definition CARDPriv.h:52
u8 _padding1[2]
Definition CARDPriv.h:45
u8 company[2]
Definition CARDPriv.h:31
u8 _padding0
Definition CARDPriv.h:32
u16 startBlock
Definition CARDPriv.h:43
u32 time
Definition CARDPriv.h:35
u16 length
Definition CARDPriv.h:44
u16 iconFormat
Definition CARDPriv.h:38
u32 iconAddr
Definition CARDPriv.h:37
u8 fileName[CARD_FILENAME_MAX]
Definition CARDPriv.h:34
u8 gameName[4]
Definition CARDPriv.h:30
u8 bannerFormat
Definition CARDPriv.h:33
u8 permission
Definition CARDPriv.h:41
u16 iconSpeed
Definition CARDPriv.h:39
u32 commentAddr
Definition CARDPriv.h:47
u8 copyTimes
Definition CARDPriv.h:42
u8 padding[512 - 32 - 5 *2]
Definition CARDPriv.h:105
u16 encode
Definition CARDPriv.h:103
u16 size
Definition CARDPriv.h:102
u16 deviceID
Definition CARDPriv.h:101
u16 checkSumInv
Definition CARDPriv.h:108
u16 checkSum
Definition CARDPriv.h:107
u8 serial[32]
Definition CARDPriv.h:100
Definition OSContext.h:137
int BOOL
Definition types.h:27
unsigned long u32
Definition types.h:10
signed short s16
Definition types.h:5
unsigned short u16
Definition types.h:9
volatile u32 vu32
Definition types.h:15
signed long s32
Definition types.h:6
unsigned char u8
Definition types.h:8