Added a new CD-ROM API function.
This commit is contained in:
@@ -695,6 +695,32 @@ cdrom_read_toc(cdrom_t *dev, unsigned char *b, int type, unsigned char start_tra
|
|||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* A new API call for Mitsumi CD-ROM. */
|
||||||
|
void
|
||||||
|
cdrom_get_track_buffer(cdrom_t *dev, uint8_t *buf)
|
||||||
|
{
|
||||||
|
track_info_t ti;
|
||||||
|
int first_track, last_track;
|
||||||
|
|
||||||
|
if (dev != NULL) {
|
||||||
|
dev->ops->get_tracks(dev, &first_track, &last_track);
|
||||||
|
buf[0] = 1;
|
||||||
|
buf[1] = last_track + 1;
|
||||||
|
dev->ops->get_track_info(dev, 1, 0, &ti);
|
||||||
|
buf[2] = ti.m;
|
||||||
|
buf[3] = ti.s;
|
||||||
|
buf[4] = ti.f;
|
||||||
|
dev->ops->get_track_info(dev, last_track + 1, 0, &ti);
|
||||||
|
buf[5] = ti.m;
|
||||||
|
buf[6] = ti.s;
|
||||||
|
buf[7] = ti.f;
|
||||||
|
buf[8] = 0x00;
|
||||||
|
} else
|
||||||
|
memset(buf, 0x00, 9);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
cdrom_read_disc_info_toc(cdrom_t *dev, unsigned char *b, unsigned char track, int type)
|
cdrom_read_disc_info_toc(cdrom_t *dev, unsigned char *b, unsigned char track, int type)
|
||||||
{
|
{
|
||||||
|
@@ -147,6 +147,7 @@ extern uint8_t cdrom_get_current_subchannel(cdrom_t *dev, uint8_t *b, int msf);
|
|||||||
extern uint8_t cdrom_get_current_subcodeq_playstatus(cdrom_t *dev, uint8_t *b);
|
extern uint8_t cdrom_get_current_subcodeq_playstatus(cdrom_t *dev, uint8_t *b);
|
||||||
extern int cdrom_read_toc(cdrom_t *dev, unsigned char *b, int type,
|
extern int cdrom_read_toc(cdrom_t *dev, unsigned char *b, int type,
|
||||||
unsigned char start_track, int msf, int max_len);
|
unsigned char start_track, int msf, int max_len);
|
||||||
|
extern void cdrom_get_track_buffer(cdrom_t *dev, uint8_t *buf);
|
||||||
extern int cdrom_readsector_raw(cdrom_t *dev, uint8_t *buffer, int sector, int ismsf,
|
extern int cdrom_readsector_raw(cdrom_t *dev, uint8_t *buffer, int sector, int ismsf,
|
||||||
int cdrom_sector_type, int cdrom_sector_flags, int *len);
|
int cdrom_sector_type, int cdrom_sector_flags, int *len);
|
||||||
extern void cdrom_read_disc_info_toc(cdrom_t *dev, unsigned char *b, unsigned char track, int type);
|
extern void cdrom_read_disc_info_toc(cdrom_t *dev, unsigned char *b, unsigned char track, int type);
|
||||||
|
Reference in New Issue
Block a user