11 0, 0, 0, 0, 0,
NULL, {0}, 0, 0, 0, 0,
35 if (status == CdlDataReady) {
48 CdReadyCallback(
NULL);
49 CdControlF(CdlPause, 0);
58 CdControlF(CdlPause, 0);
66 CD_MODE[0] = CdlModeSpeed | CdlModeSize1;
67 CdControlF(CdlSetmode,
CD_MODE);
72 CdControlF(CdlReadN, 0);
s32 cdCheckSector(void)
Checks that the sector just read is the next one.
void cdSyncCallback(s32 status, u_char *result)
The CdSyncCallback: Setloc, Setmode (double speed, whole sectors), ReadN, and CdlPause once the secto...
void cdReadyCallback(s32 status, u_char *result)
The CdReadyCallback: copies each sector as it arrives, pauses at the end.
void readFile(s32 file, s32 offset, s32 size, void *buffer, s32 *done)
Starts reading size sectors (0: all) of a file into buffer; ignored while busy.
s32 isCdReading(void)
Whether the CD reader is busy.
CdReader CD_READER
The CD reader.
static u_char CD_MODE[8]
-G8 unit: small variables defined here are reached through $gp
void startCdRead(void)
Starts the read readFile set up: seeks to its first sector.
#define CD_SECTOR_SIZE
The bytes of data in a sector (Mode 2 Form 1), as the reader reads them.
FileTableFuncs FILE_TABLE
The disc's file table.
struct CdSectorHeader CD_SECTOR_HEADER
file/cd_reader.c's
Reads whole sectors of a file with CdlReadN, from callbacks.
s32 * done
set to 1 when the read is complete
s32(* getSectorCount)(s32 file)
s32(* getSector)(s32 file)
void(* getPos)(s32 file, s32 offset, void *loc)