mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2025-01-15 04:39:07 +01:00
[SCD] added default TOC for Shadow of the Beast II (prevent hangs when not using audio tracks)
This commit is contained in:
parent
9540bf1fe0
commit
5702eb2b8f
@ -84,6 +84,12 @@ static const uint16 toc_lunar[52] =
|
|||||||
685, 3167
|
685, 3167
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const uint32 toc_shadow[15] =
|
||||||
|
{
|
||||||
|
10226, 70054, 11100, 12532, 12444, 11923, 10059, 10167, 10138, 13792,
|
||||||
|
11637, 2547, 2521, 3856, 900
|
||||||
|
};
|
||||||
|
|
||||||
/* supported WAVE file header (16-bit stereo samples @44.1kHz) */
|
/* supported WAVE file header (16-bit stereo samples @44.1kHz) */
|
||||||
static const unsigned char waveHeader[32] =
|
static const unsigned char waveHeader[32] =
|
||||||
{
|
{
|
||||||
@ -595,7 +601,7 @@ int cdd_load(char *filename, char *header)
|
|||||||
/* Simulate audio tracks if none found */
|
/* Simulate audio tracks if none found */
|
||||||
if (cdd.toc.last == 1)
|
if (cdd.toc.last == 1)
|
||||||
{
|
{
|
||||||
/* Some games require specific TOC infos */
|
/* Some games require exact TOC infos */
|
||||||
if (strstr(header + 0x180,"T-95035") != NULL)
|
if (strstr(header + 0x180,"T-95035") != NULL)
|
||||||
{
|
{
|
||||||
/* Snatcher */
|
/* Snatcher */
|
||||||
@ -622,6 +628,19 @@ int cdd_load(char *filename, char *header)
|
|||||||
}
|
}
|
||||||
while (cdd.toc.last < 52);
|
while (cdd.toc.last < 52);
|
||||||
}
|
}
|
||||||
|
else if (strstr(header + 0x180,"T-113045") != NULL)
|
||||||
|
{
|
||||||
|
/* Shadow of the Beast II */
|
||||||
|
cdd.toc.last = cdd.toc.end = 0;
|
||||||
|
do
|
||||||
|
{
|
||||||
|
cdd.toc.tracks[cdd.toc.last].start = cdd.toc.end;
|
||||||
|
cdd.toc.tracks[cdd.toc.last].end = cdd.toc.tracks[cdd.toc.last].start + toc_shadow[cdd.toc.last];
|
||||||
|
cdd.toc.end = cdd.toc.tracks[cdd.toc.last].end;
|
||||||
|
cdd.toc.last++;
|
||||||
|
}
|
||||||
|
while (cdd.toc.last < 15);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* default TOC (99 tracks & 2s per audio tracks) */
|
/* default TOC (99 tracks & 2s per audio tracks) */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user