53#define CMD_CHECK_LICENSE 2
54#define CMD_REQ_SPI_CMD 4
64#define CMD_DMA_ABORT 25
65#define CMD_OPEN_TRAY 26
67#define CMD_DMAREAD_STREAM 28
69#define CMD_REQ_MODE 30
70#define CMD_SET_MODE 31
75#define CMD_REQ_STAT 36
76#define CMD_PIOREAD_STREAM 37
77#define CMD_DMAREAD_STREAM_EX 38
78#define CMD_PIOREAD_STREAM_EX 39
79#define CMD_GET_VERS 40
95#define ERR_NO_ACTIVE 5
120#define ATA_STAT_INTERNAL 0x00
121#define ATA_STAT_IRQ 0x01
122#define ATA_STAT_DRQ_0 0x02
123#define ATA_STAT_DRQ_1 0x03
124#define ATA_STAT_BUSY 0x04
136#define CDDA_SECTORS 2
147#define CDROM_READ_WHOLE_SECTOR 0x1000
148#define CDROM_READ_DATA_AREA 0x2000
159#define CD_SUB_Q_ALL 0
160#define CD_SUB_Q_CHANNEL 1
161#define CD_SUB_MEDIA_CATALOG 2
163#define CD_SUB_TRACK_ISRC 3
164#define CD_SUB_RESERVED 4
174#define CD_SUB_AUDIO_STATUS_INVALID 0x00
175#define CD_SUB_AUDIO_STATUS_PLAYING 0x11
176#define CD_SUB_AUDIO_STATUS_PAUSED 0x12
177#define CD_SUB_AUDIO_STATUS_ENDED 0x13
178#define CD_SUB_AUDIO_STATUS_ERROR 0x14
179#define CD_SUB_AUDIO_STATUS_NO_INFO 0x15
190#define CDROM_READ_PIO 0
191#define CDROM_READ_DMA 1
202#define CD_STATUS_READ_FAIL -1
203#define CD_STATUS_BUSY 0
204#define CD_STATUS_PAUSED 1
205#define CD_STATUS_STANDBY 2
206#define CD_STATUS_PLAYING 3
207#define CD_STATUS_SEEKING 4
208#define CD_STATUS_SCANNING 5
209#define CD_STATUS_OPEN 6
210#define CD_STATUS_NO_DISC 7
211#define CD_STATUS_RETRY 8
212#define CD_STATUS_ERROR 9
213#define CD_STATUS_FATAL 12
226#define CD_CDROM_XA 0x20
257#define TOC_LBA(n) ((n) & 0x00ffffff)
263#define TOC_ADR(n) ( ((n) & 0x0f000000) >> 24 )
269#define TOC_CTRL(n) ( ((n) & 0xf0000000) >> 28 )
275#define TOC_TRACK(n) ( ((n) & 0x00ff0000) >> 16 )
340 __depr(
"Use cdrom_change_datatype instead.");
int cdrom_change_datatype(int sector_part, int cdxa, int sector_size)
Change the datatype of disc.
int cdrom_spin_down(void)
Spin down the CD.
uint32 cdrom_locate_data_track(CDROM_TOC *toc)
Locate the sector of the data track.
int cdrom_cdda_play(uint32 start, uint32 end, uint32 loops, int mode)
Play CDDA audio tracks or sectors.
int cdrom_cdda_resume(void)
Resume CDDA audio playback after a pause.
int cdrom_cdda_pause(void)
Pause CDDA audio playback.
int cdrom_reinit(void)
Re-initialize the GD-ROM drive.
void cdrom_init(void)
Initialize the GD-ROM for reading CDs.
int cdrom_set_sector_size(int size)
Set the sector size for read sectors.
int cdrom_reinit_ex(int sector_part, int cdxa, int sector_size)
Re-initialize the GD-ROM drive with custom parameters.
int cdrom_read_sectors_ex(void *buffer, int sector, int cnt, int mode)
Read one or more sector from a CD-ROM.
int cdrom_read_toc(CDROM_TOC *toc_buffer, int session)
Read the table of contents from the disc.
void cdrom_shutdown(void)
Shutdown the CD reading system.
int cdrom_get_status(int *status, int *disc_type)
Get the status of the GD-ROM drive.
int cdrom_change_dataype(int sector_part, int cdxa, int sector_size) __depr("Use cdrom_change_datatype instead.")
Change the datatype of disc.
int cdrom_exec_cmd_timed(int cmd, void *param, int timeout)
Execute a CD-ROM command with timeout.
int cdrom_get_subcode(void *buffer, int buflen, int which)
Read subcode data from the most recently read sectors.
int cdrom_exec_cmd(int cmd, void *param)
Execute a CD-ROM command.
int cdrom_read_sectors(void *buffer, int sector, int cnt)
Read one or more sector from a CD-ROM in PIO mode.
#define __depr(m)
Mark something as deprecated, with an informative message.
Definition cdefs.h:119
unsigned long uint32
32-bit unsigned integer
Definition types.h:33
TOC structure returned by the BIOS.
Definition cdrom.h:240
uint32 first
Point A0 information (1st track)
Definition cdrom.h:242
uint32 leadout_sector
Point A2 information (leadout)
Definition cdrom.h:244
uint32 last
Point A1 information (last track)
Definition cdrom.h:243