Fix dumping CCDs with multisession discs, fix oopsies with CDI parsing giving the wrong last recorded track number

This commit is contained in:
CasualPokePlayer 2023-05-10 04:58:37 -07:00
parent 2379650e1b
commit c52a950c41
2 changed files with 2 additions and 2 deletions

View File

@ -417,7 +417,7 @@ namespace BizHawk.Emulation.DiscSystem
//but in order to make a high quality CCD which can be inspected by various other tools, we need it
//now, regarding the indexes.. theyre truly useless. having indexes written out with the tracks is bad news.
//index information is only truly stored in subQ
for (var tnum = session.FirstInformationTrack.Number; tnum <= session.LastInformationTrack.Number; tnum++)
for (var tnum = 1; tnum <= session.InformationTrackCount; tnum++)
{
var track = session.Tracks[tnum];
sw.WriteLine("[TRACK {0}]", track.Number);

View File

@ -587,7 +587,7 @@ namespace BizHawk.Emulation.DiscSystem
var TOCMiscInfo = new Synthesize_A0A1A2_Job(
firstRecordedTrackNumber: trackOffset + 1,
lastRecordedTrackNumber: trackOffset + cdif.Sessions[i].NumTracks + 1,
lastRecordedTrackNumber: trackOffset + cdif.Sessions[i].NumTracks,
sessionFormat: (SessionFormat)(cdif.Tracks[trackOffset + cdif.Sessions[i].NumTracks - 1].SessionType * 0x10),
leadoutTimestamp: disc._Sectors.Count);
TOCMiscInfo.Run(session.RawTOCEntries);