Saturn: cancel the fix for TOC, add hack for WWF games (#973)

This commit is contained in:
Sergiy Dvodnenko
2025-03-14 18:55:11 +02:00
committed by GitHub
parent c24e635f1d
commit 0b2e6eb2bd

View File

@@ -312,6 +312,7 @@ int satcdd_t::LoadCUE(const char* filename) {
return 0;
}
static bool wwf_hack = false;
int satcdd_t::Load(const char *filename)
{
//static char header[32];
@@ -319,6 +320,14 @@ int satcdd_t::Load(const char *filename)
Unload();
wwf_hack = false;
if (strcasestr(filename, "wwf wrestlemania") || strcasestr(filename, "wwf in your house")) wwf_hack = true;
if (wwf_hack) {
#ifdef SATURN_DEBUG
printf("\x1b[32mSaturn: WWF games hack!!!\n\x1b[0m");
#endif // SATURN_DEBUG
}
const char *ext = filename + strlen(filename) - 4;
if (!strncasecmp(".cue", ext, 4))
{
@@ -680,7 +689,8 @@ void satcdd_t::Process(uint8_t* time_mode) {
if (toc_pos < 0x100)
{
int lba_ = this->toc.tracks[toc_pos].start + 150 + this->GetSectorOffsetByIndex(toc_pos + 1, 1);
int lba_ = this->toc.tracks[toc_pos].start + 150;
if (wwf_hack) lba_ += this->GetSectorOffsetByIndex(toc_pos + 1, 1);
LBAToMSF(lba_, &msf);
idx = BCD(toc_pos + 1);
q = this->toc.tracks[toc_pos & 0xFF].type ? 0x40 : 0x00;