Skip to content

Commit

Permalink
Use workaround for sloppily converted pbp files
Browse files Browse the repository at this point in the history
  • Loading branch information
Zapeth committed May 7, 2017
1 parent a0f3030 commit a869219
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions mednafen/cdrom/CDAccess_PBP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -550,10 +550,19 @@ bool CDAccess_PBP::Read_TOC(TOC *toc)
Tracks[i].index[0] = (BCD_to_U8(toc_entry.index0[0])*60 + BCD_to_U8(toc_entry.index0[1])) * 75 + BCD_to_U8(toc_entry.index0[2]);
Tracks[i].index[1] = (BCD_to_U8(toc_entry.index1[0])*60 + BCD_to_U8(toc_entry.index1[1])) * 75 + BCD_to_U8(toc_entry.index1[2]);

// are these correct?
// HACK: force these values for converted files since conversion tools like PSX2PSP seem to specify an offset for data tracks at 00:02:00 which is not the actual location in the converted image data (but rather 00:00:00)
if (!is_official && Tracks[i].DIFormat == DI_FORMAT_MODE2_RAW)
{
Tracks[i].index[0] = 0;
Tracks[i].index[1] = 0;
}

Tracks[i].LBA = Tracks[i].index[1];
Tracks[i].pregap = Tracks[i].index[0];

// pre/postgaps shouldn't be required, dont know if the pbp format even supports it
Tracks[i].pregap = 0;
Tracks[i].postgap = 0;

Tracks[i].pregap_dv = Tracks[i].index[1]-Tracks[i].index[0];
if(Tracks[i].pregap_dv < 0)
Tracks[i].pregap_dv = 0;
Expand Down

0 comments on commit a869219

Please sign in to comment.