mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-10-27 00:29:39 -04:00
mcd, preparations for msu support
This commit is contained in:
parent
178a9b683c
commit
02ff025479
15 changed files with 153 additions and 170 deletions
|
|
@ -49,6 +49,7 @@ static int handle_mp3(const char *fname, int index)
|
|||
return -1;
|
||||
}
|
||||
|
||||
track->type = CT_AUDIO;
|
||||
track->fd = tmp_file;
|
||||
track->offset = 0;
|
||||
|
||||
|
|
@ -114,10 +115,11 @@ int load_cd_image(const char *cd_img_name, int *type)
|
|||
}
|
||||
tracks[0].fd = pmf;
|
||||
tracks[0].fname = strdup(cd_img_name);
|
||||
tracks[0].type = *type & CT_AUDIO;
|
||||
|
||||
if (*type == CT_ISO)
|
||||
cd_img_sectors = pmf->size >>= 11; // size in sectors
|
||||
else cd_img_sectors = pmf->size /= 2352;
|
||||
cd_img_sectors = pmf->size >> 11; // size in sectors
|
||||
else cd_img_sectors = pmf->size / 2352;
|
||||
|
||||
// cdd.c operates with lba - 150
|
||||
tracks[0].start = 0;
|
||||
|
|
@ -125,8 +127,8 @@ int load_cd_image(const char *cd_img_name, int *type)
|
|||
tracks[0].offset = 0;
|
||||
|
||||
sprintf_lba(tmp_ext, sizeof(tmp_ext), 0);
|
||||
elprintf(EL_STATUS, "Track 1: %s %9i DATA %s",
|
||||
tmp_ext, tracks[0].end, cd_img_name);
|
||||
elprintf(EL_STATUS, "Track 1: %s %9i %s %s",
|
||||
tmp_ext, tracks[0].end, tracks[0].type ? "AUDIO" : "DATA ", cd_img_name);
|
||||
|
||||
lba = cd_img_sectors;
|
||||
|
||||
|
|
@ -185,13 +187,15 @@ int load_cd_image(const char *cd_img_name, int *type)
|
|||
length = cue_data->tracks[n].sector_xlength;
|
||||
|
||||
Pico_mcd->cdda_type = cue_data->tracks[n].type;
|
||||
tracks[index].type = cue_data->tracks[n].type & CT_AUDIO;
|
||||
|
||||
tracks[index].start = lba;
|
||||
lba += length;
|
||||
tracks[index].end = lba;
|
||||
|
||||
sprintf_lba(tmp_ext, sizeof(tmp_ext), tracks[index].start);
|
||||
elprintf(EL_STATUS, "Track %2i: %s %9i AUDIO %s", n, tmp_ext, length,
|
||||
elprintf(EL_STATUS, "Track %2i: %s %9i %s %s", n, tmp_ext, length,
|
||||
tracks[index].type ? "AUDIO" : "DATA ",
|
||||
cue_data->tracks[n].fname ? cue_data->tracks[n].fname : "");
|
||||
}
|
||||
goto finish;
|
||||
|
|
@ -246,6 +250,7 @@ int load_cd_image(const char *cd_img_name, int *type)
|
|||
tracks[index].end = lba;
|
||||
|
||||
Pico_mcd->cdda_type = CT_MP3;
|
||||
tracks[index].type = CT_AUDIO;
|
||||
|
||||
sprintf_lba(tmp_ext, sizeof(tmp_ext), tracks[index].start);
|
||||
elprintf(EL_STATUS, "Track %2i: %s %9i AUDIO - %s",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue