CDVD: Byte swap hack. CHD CD audio with OSDSYS is working

This commit is contained in:
Ty Lamontagne 2024-11-26 16:53:12 -05:00
parent 47a732d0fe
commit d8f18a3318
No known key found for this signature in database
GPG Key ID: 1B9139843421A974
1 changed files with 11 additions and 0 deletions

View File

@ -160,6 +160,17 @@ int InputIsoFile::FinishRead3(u8* dst, uint mode)
dst[diff - 9] = 2;
}
// Seems like CHD data ends up being the wrong endianess for audio
// Confidence is about 50% on this one, but it seems to work
// (CHD is the only file with a TOC anyways, so who cares about the other formats)
if (m_type == ISOTYPE_AUDIO && mode == CDVD_MODE_2352)
{
for (int i = 0; i < 2352; i += 2)
{
std::swap(dst[diff + i], dst[diff + i + 1]);
}
}
return 0;
}