[Core/CD] added support for first revision of Sewer Shark (no audio track)

This commit is contained in:
ekeeke 2020-07-12 16:56:03 +02:00
parent 5a6dec925a
commit dcc231f685

View File

@ -1035,16 +1035,6 @@ int cdd_load(char *filename, char *header)
sprintf(ptr, extensions[i], cdd.toc.last + offset); sprintf(ptr, extensions[i], cdd.toc.last + offset);
fd = cdStreamOpen(fname); fd = cdStreamOpen(fname);
} }
}
/* CD tracks found ? */
if (cdd.toc.last)
{
/* Lead-out */
cdd.toc.tracks[cdd.toc.last].start = cdd.toc.end;
/* CD mounted */
cdd.loaded = 1;
/* Valid CD-ROM Mode 1 track found ? */ /* Valid CD-ROM Mode 1 track found ? */
if (cdd.toc.tracks[0].type == TYPE_MODE1) if (cdd.toc.tracks[0].type == TYPE_MODE1)
@ -1131,6 +1121,11 @@ int cdd_load(char *filename, char *header)
} }
while (cdd.toc.last < 29); while (cdd.toc.last < 29);
} }
else if (strstr(header + 0x180,"T-06201-01") != NULL)
{
/* Sewer Shark (USA) (REV1) */
/* no audio track */
}
else else
{ {
/* default TOC (99 tracks & 2s per audio tracks) */ /* default TOC (99 tracks & 2s per audio tracks) */
@ -1146,6 +1141,17 @@ int cdd_load(char *filename, char *header)
} }
} }
}
/* CD tracks found ? */
if (cdd.toc.last)
{
/* Lead-out */
cdd.toc.tracks[cdd.toc.last].start = cdd.toc.end;
/* CD mounted */
cdd.loaded = 1;
/* Automatically try to open associated subcode data file */ /* Automatically try to open associated subcode data file */
memcpy(&fname[strlen(fname) - 4], ".sub", 4); memcpy(&fname[strlen(fname) - 4], ".sub", 4);
cdd.toc.sub = cdStreamOpen(fname); cdd.toc.sub = cdStreamOpen(fname);