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 ### - Dumping
- Correctly detect CD-i, CD+ and CD-ROM XA. - 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 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. - Do not try to read multisession lead-out/lead-in as they result in errors that are not really there.
- Get correct track flags. - Get correct track flags.

View File

@@ -647,10 +647,26 @@ namespace DiscImageChef.Core.Devices.Dumping
tracks[t].TrackType = TrackType.CdMode1; tracks[t].TrackType = TrackType.CdMode1;
break; break;
case 2: case 2:
if(dskType == MediaType.CDI)
{
DicConsole.WriteLine("Track {0} is MODE2", tracks[t].TrackSequence); DicConsole.WriteLine("Track {0} is MODE2", tracks[t].TrackSequence);
dumpLog.WriteLine("Track {0} is MODE2", tracks[t].TrackSequence); dumpLog.WriteLine("Track {0} is MODE2", tracks[t].TrackSequence);
tracks[t].TrackType = TrackType.CdMode2Formless; tracks[t].TrackType = TrackType.CdMode2Formless;
break; 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: default:
DicConsole.WriteLine("Track {0} is unknown mode {1}", tracks[t].TrackSequence, readBuffer[15]); DicConsole.WriteLine("Track {0} is unknown mode {1}", tracks[t].TrackSequence, readBuffer[15]);
dumpLog.WriteLine("Track {0} is unknown mode {1}", tracks[t].TrackSequence, readBuffer[15]); dumpLog.WriteLine("Track {0} is unknown mode {1}", tracks[t].TrackSequence, readBuffer[15]);