CDROM: Hack for Captain Commando

This commit is contained in:
Stenzek 2024-09-29 14:41:10 +10:00
parent 4132b5ef3d
commit 076111adb4
No known key found for this signature in database
1 changed files with 14 additions and 0 deletions

View File

@ -3067,6 +3067,20 @@ void CDROM::DoSectorRead()
if (subq_valid)
{
s_state.last_subq = subq;
std::tie(s_state.last_subq.relative_minute_bcd, s_state.last_subq.relative_second_bcd,
s_state.last_subq.relative_frame_bcd) =
CDImage::Position::FromLBA(
CDImage::Position::FromBCD(subq.relative_minute_bcd, subq.relative_second_bcd, subq.relative_frame_bcd)
.ToLBA() +
2)
.ToBCD();
std::tie(s_state.last_subq.absolute_minute_bcd, s_state.last_subq.absolute_second_bcd,
s_state.last_subq.absolute_frame_bcd) =
CDImage::Position::FromLBA(
CDImage::Position::FromBCD(subq.absolute_minute_bcd, subq.absolute_second_bcd, subq.absolute_frame_bcd)
.ToLBA() +
2)
.ToBCD();
}
else
{