Skip to content

Commit

Permalink
Merge pull request joncampbell123#5139 from RibShark/master
Browse files Browse the repository at this point in the history
Correct relative/absolute track offset in subchannel data for CD-ROM images
  • Loading branch information
joncampbell123 authored Jul 29, 2024
2 parents 7aa4f94 + 5037265 commit 33f9033
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/dos/cdrom_image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -577,8 +577,8 @@ bool CDROM_Interface_Image::GetAudioSub(unsigned char& attr, unsigned char& trac
track = (unsigned char)cur_track;
attr = tracks[track - 1].attr;
index = 1;
FRAMES_TO_MSF(player.currFrame + 150, &absPos.min, &absPos.sec, &absPos.fr);
FRAMES_TO_MSF(player.currFrame - tracks[track - 1].start + 150, &relPos.min, &relPos.sec, &relPos.fr);
FRAMES_TO_MSF(player.currFrame, &absPos.min, &absPos.sec, &absPos.fr);
FRAMES_TO_MSF(player.currFrame - tracks[track - 1].start, &relPos.min, &relPos.sec, &relPos.fr);
if(IS_PC98_ARCH && player.playbackRemaining == 0 && !strcmp(RunningProgram, "ITP")) {
// POLICENAUTS
// It freeze at the end of the Konami logo or opening.
Expand All @@ -593,13 +593,13 @@ bool CDROM_Interface_Image::GetAudioSub(unsigned char& attr, unsigned char& trac

LOG_MSG("%s CDROM: GetAudioSub absolute offset (%d), MSF=%d:%d:%d",
get_time(),
player.currFrame + 150,
player.currFrame,
absPos.min,
absPos.sec,
absPos.fr);
LOG_MSG("%s CDROM: GetAudioSub relative offset (%d), MSF=%d:%d:%d",
get_time(),
player.currFrame - tracks[track - 1].start + 150,
player.currFrame - tracks[track - 1].start,
relPos.min,
relPos.sec,
relPos.fr);
Expand Down

0 comments on commit 33f9033

Please sign in to comment.