From 076111adb4ec7adb8fd01cc1c9b74e01a7569594 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sun, 29 Sep 2024 14:41:10 +1000 Subject: [PATCH] CDROM: Hack for Captain Commando --- src/core/cdrom.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/core/cdrom.cpp b/src/core/cdrom.cpp index 896803f0c..ed6f4f5be 100644 --- a/src/core/cdrom.cpp +++ b/src/core/cdrom.cpp @@ -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 {