hdr | Memory card file header address |
buf | Address where the file to be analyzed was loaded |
BUD_ERR_OK | Normal end | |
BUD_ERR_BUPFILE_ILLEGAL | File is not in the correct format | |
BUD_ERR_BUPFILE_CRC | CRC error |
Sint32 ret, nblock; extern Uint8 buf[]; BUS_BACKUPFILEHEADER hdr; ret = buLoadFile(BUD_DRIVE_A1, "SAVEDATA_001", buf, 0); if (ret != BUD_ERR_OK) return NG; while (1) { if (buStat(BUD_DRIVE_A1) == BUD_STAT_READY) break; } ret = buAnalyzeBackupFileImage(&hdr, buf); switch (ret) { case BUD_ERR_OK: return OK; default: return NG; }