Correct detection of MODE 2 Forms when dumping, fixes #184.

This commit is contained in:
2018-06-24 10:57:58 +01:00
parent 1a96f75ae1
commit eaa2def3cd
2 changed files with 20 additions and 3 deletions

View File

@@ -184,6 +184,7 @@
### - Dumping
- Correctly detect CD-i, CD+ and CD-ROM XA.
- Correctly detect Mode 2 Form 1 and Form 2.
- Do not retry when retry passes are zero.
- Do not try to read multisession lead-out/lead-in as they result in errors that are not really there.
- Get correct track flags.

View File

@@ -647,9 +647,25 @@ namespace DiscImageChef.Core.Devices.Dumping
tracks[t].TrackType = TrackType.CdMode1;
break;
case 2:
DicConsole.WriteLine("Track {0} is MODE2", tracks[t].TrackSequence);
dumpLog.WriteLine("Track {0} is MODE2", tracks[t].TrackSequence);
tracks[t].TrackType = TrackType.CdMode2Formless;
if(dskType == MediaType.CDI)
{
DicConsole.WriteLine("Track {0} is MODE2", tracks[t].TrackSequence);
dumpLog.WriteLine("Track {0} is MODE2", tracks[t].TrackSequence);
tracks[t].TrackType = TrackType.CdMode2Formless;
break;
}
if((readBuffer[0x012] & 0x20) == 0x20) // mode 2 form 2
{
DicConsole.WriteLine("Track {0} is MODE2 FORM 2", tracks[t].TrackSequence);
dumpLog.WriteLine("Track {0} is MODE2 FORM 2", tracks[t].TrackSequence);
tracks[t].TrackType = TrackType.CdMode2Form2;
break;
}
DicConsole.WriteLine("Track {0} is MODE2 FORM 1", tracks[t].TrackSequence);
dumpLog.WriteLine("Track {0} is MODE2 FORM 1", tracks[t].TrackSequence);
tracks[t].TrackType = TrackType.CdMode2Form1;
break;
default:
DicConsole.WriteLine("Track {0} is unknown mode {1}", tracks[t].TrackSequence, readBuffer[15]);