diff --git a/README.md b/README.md index 80f85c7..a9b6f7c 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ # SBITools -SBITools v0.3.1 - http://kippykip.com +SBITools v0.3.2 - http://kippykip.com **Description:** This is a small set of conversion tools written in BlitzMax to reconstruct .SUB files using .SBI/.LSD files, and can even convert a full BIN/CUE/SBI emulator setup into a IMG/CCD/SUB setup which can be put into popular CD Burning programs such as CloneCD. @@ -64,6 +64,8 @@ I've bundled them all on the [releases page](https://github.com/Kippykip/SBITool **Version History** + Version 0.3.2 + - Modified CUESheet code to detect and fix bad AUDIO indexes. As some ReDump.org PSX dumps contain a single index for some audio tracks. Version 0.3.1 - Fixed a bug where CD images would not be copied if it was in the same directory as SBITools. - CUE2CCD.BAT and SINGLETRACK.BAT drag and drop now works if the image was dragged from another drive letter. diff --git a/functions.bmx b/functions.bmx index aea6942..566311c 100644 --- a/functions.bmx +++ b/functions.bmx @@ -423,7 +423,33 @@ Type CUE ElseIf(Line.StartsWith("INDEX")) Local Split:String[] = Line.Split(" ") 'Split the spaces Local MSF:String[] = Split[2].Split(":") 'Split the colons from the MSF XX:XX:XX - AddListing(CurrentTrack, CurrentTrackType, Int(Split[1]), Int(MSF[0]), Int(MSF[1]), Int(MSF[2]), CurrentTrackFN) + + 'QUICK HACK TO ADDRESS ISSUE #4 ON GITHUB + 'Ok so is there an Index of 1, with 00 00 00 MSF? + 'Hmm this COULD be a bad redump.org cuesheet. + 'If there's a missing Index 00 then it's def bad, lets check for it + If(CurrentTrackType = "AUDIO" And Int(Split[1]) = 1 And Int(MSF[0]) = 0 And Int(MSF[1]) = 0 And Int(MSF[2]) = 0) + 'We'll default the exists flag to false, because the FOR loop won't do anything if it's not found + Local Index0Exists:Byte = False + For Local IndexFixCue:CUE = EachIn CUE.List:TList + If(IndexFixCue.Index = 0 And IndexFixCue.Track = CurrentTrack And IndexFixCue.TrackType = CurrentTrackType) + 'Ok there was an index of 00 beforehand for this track + Index0Exists = True + EndIf + Next + + 'Hmmm, guess I was wrong and there's no leadin or something for this track? + If(Index0Exists) + AddListing(CurrentTrack, CurrentTrackType, Int(Split[1]), Int(MSF[0]), Int(MSF[1]), Int(MSF[2]), CurrentTrackFN) + Else 'Ok confirmed, this is a bad cuesheet. Let's fix it ourselves + Print "WARNING! Bad Index in CueSheet for TRACK '" + CurrentTrack + "'! Repairing..." + Print "If it's a ReDump.org source, you should report the cuesheet!" + AddListing(CurrentTrack, CurrentTrackType, 0, 0, 0, 0, CurrentTrackFN) + AddListing(CurrentTrack, CurrentTrackType, 1, 0, 2, 0, CurrentTrackFN) + EndIf + Else + AddListing(CurrentTrack, CurrentTrackType, Int(Split[1]), Int(MSF[0]), Int(MSF[1]), Int(MSF[2]), CurrentTrackFN) + EndIf EndIf Wend 'Done using this file diff --git a/sbitools.bmx b/sbitools.bmx index 8b768f2..4999080 100644 --- a/sbitools.bmx +++ b/sbitools.bmx @@ -6,7 +6,7 @@ Include "CRC16.bmx" Include "functions.bmx" 'Main Program -Print "SBITools v0.3.1 - http://kippykip.com" +Print "SBITools v0.3.2 - http://kippykip.com" Global Prog:Int = 0 'Check for psxt001z.exe