gchudov / cuetools.net

CD image processing suite with optimized lossless encoders in C#
http://cue.tools/
Other
478 stars 51 forks source link

Unable to rip any CD with 2 different drives #107

Open mill1000 opened 3 years ago

mill1000 commented 3 years ago

Hi.

I'm unable to rip any CDs using CUERipper. It immediately indicates errors and retries the reads numerous times. This occurs on multiple CDs that are in very good condition. At first I believe it was a drive issue, but I just replaced my ASUS DRW-24B1ST with a new Lite-On IHAS124-14 and the issue still occurs.

I'm fairly certain this is another issue related to C2 error handling (see #19). In EAC, if I disable C2 detection, I am able to rip CDs. With C2 detection turned on the read immediately develops errors much like CUERipper.

Based on a forum post for another piece of software it looks like these two drives have had C2 issues https://www.poikosoft.com/support/viewtopic.php?t=12859&start=15 image

CUERipper 2.1.9 Microsoft Windows 10 Home - 10.0.19042 Build 19042

image

c72578 commented 3 years ago

@mill1000 Thanks for reporting the issue and posting a screenshot of CUERipper, which shows that it is detected as iHAS124 F CL9P drive. An issue concerning an iHAS124 Y drive has already been reported (#15). Could you please also post a screenshot of CUERipper showing the details of the ASUS DRW-24B1ST drive?

mill1000 commented 3 years ago

No problem. I actually pulled the ASUS drive from my machine since I only have 1 bay. Here's a photo of the label instead. If that's insufficient let me know and I can swap the drive back in to get CUERipper's info on it.

image

c72578 commented 3 years ago

@mill1000, thanks for showing the details concerning the ASUS DRW-24B1ST drive. Can you give the following test build a try with the iHAS124 drive?

CUETools_2.1.9_2021-05-18_git_f3603c0.zip SHA256: a9345ae83ef34781a196de8d0de418d3bdf1f681475f89b87fc16f0c3d8ef517

It uses the following modification to C2 mode as in #97:

diff --git a/CUETools.Ripper.SCSI/SCSIDrive.cs b/CUETools.Ripper.SCSI/SCSIDrive.cs
index 2e08c50..46b01a0 100644
--- a/CUETools.Ripper.SCSI/SCSIDrive.cs
+++ b/CUETools.Ripper.SCSI/SCSIDrive.cs
@@ -785,7 +785,7 @@ namespace CUETools.Ripper.SCSI
            ReadCDCommand[] readmode = { ReadCDCommand.ReadCdBEh, ReadCDCommand.ReadCdD8h };
            Device.C2ErrorMode[] c2mode = { Device.C2ErrorMode.Mode294, Device.C2ErrorMode.Mode296, Device.C2ErrorMode.None };
            // Mode294 does not work for these drives: LG GH24NSD1, ASUS DRW-24D5MT. Try Mode296 first
-           if (Path.Contains("GH24NSD1") || Path.Contains("DRW-24D5MT"))
+           if (Path.Contains("GH24NSD1") || Path.Contains("DRW-24D5MT") || Path.Contains("iHAS124"))
            {
                c2mode.SetValue(Device.C2ErrorMode.Mode296, 0);
                c2mode.SetValue(Device.C2ErrorMode.Mode294, 1);
mill1000 commented 3 years ago

Unfortunately the issue is still occurring.

image

c72578 commented 3 years ago

@mill1000, thanks for testing. Here is another test build, which uses C2ErrorMode.None in case of an iHAS124 drive:

CUETools_2.1.9_2021-05-19_git_e15f35b.zip SHA256: 6720ce0eca8bcf5b5109fa3b05d306dcb96fdc38f6c3e08ffe1e3637a1e715ae

Modification (commit: https://github.com/c72578/cuetools.net/commit/e15f35b44c5e677248d0e48de5bafc2edf16fd6c):

diff --git a/CUETools.Ripper.SCSI/SCSIDrive.cs b/CUETools.Ripper.SCSI/SCSIDrive.cs
index 2e08c50..1f85634 100644
--- a/CUETools.Ripper.SCSI/SCSIDrive.cs
+++ b/CUETools.Ripper.SCSI/SCSIDrive.cs
@@ -790,6 +790,11 @@ namespace CUETools.Ripper.SCSI
                c2mode.SetValue(Device.C2ErrorMode.Mode296, 0);
                c2mode.SetValue(Device.C2ErrorMode.Mode294, 1);
            }
+           if (Path.Contains("iHAS124"))
+           {
+           // Start with C2ErrorMode.None
+               Array.Reverse(c2mode);
+           }
            Device.MainChannelSelection[] mainmode = { Device.MainChannelSelection.UserData, Device.MainChannelSelection.F8h };
            bool found = false;
            _autodetectResult = "";
mill1000 commented 3 years ago

This works, but presumably it's just disabling all the C2 capability?

c72578 commented 3 years ago

Thanks for testing. Yes, this is similar to disabling Drive is capable of retrieving C2 error information in EAC. Neither of the two C2ErrorModes is working properly in case of the iHAS124 drive.

c72578 commented 3 years ago

@mill1000, could you please test the following build using the ASUS DRW-24B1ST drive? It tries C2ErrorMode.Mode296 first.

CUETools_2.1.9_2021-05-20_git_ba13bf0.zip SHA256: 8657bd1506a4f42df4eddfc477d6cd3438d769fae7e7f1cebf84d6a4fcbec0ba

Modification (commit: https://github.com/c72578/cuetools.net/commit/ba13bf0555386b989299f3e432dfbdf0a7b6daa8):

diff --git a/CUETools.Ripper.SCSI/SCSIDrive.cs b/CUETools.Ripper.SCSI/SCSIDrive.cs
index 2e08c50..7f9bc7c 100644
--- a/CUETools.Ripper.SCSI/SCSIDrive.cs
+++ b/CUETools.Ripper.SCSI/SCSIDrive.cs
@@ -784,12 +784,17 @@ namespace CUETools.Ripper.SCSI

            ReadCDCommand[] readmode = { ReadCDCommand.ReadCdBEh, ReadCDCommand.ReadCdD8h };
            Device.C2ErrorMode[] c2mode = { Device.C2ErrorMode.Mode294, Device.C2ErrorMode.Mode296, Device.C2ErrorMode.None };
-           // Mode294 does not work for these drives: LG GH24NSD1, ASUS DRW-24D5MT. Try Mode296 first
-           if (Path.Contains("GH24NSD1") || Path.Contains("DRW-24D5MT"))
+           // Mode294 does not work for these drives: LG GH24NSD1, ASUS DRW-24D5MT, DRW-24B1ST. Try Mode296 first
+           if (Path.Contains("GH24NSD1") || Path.Contains("DRW-24D5MT") || Path.Contains("DRW-24B1ST"))
            {
                c2mode.SetValue(Device.C2ErrorMode.Mode296, 0);
                c2mode.SetValue(Device.C2ErrorMode.Mode294, 1);
            }
+           if (Path.Contains("iHAS124"))
+           {
+           // Mode294 and Mode296 are not working properly in case of iHAS124. Use C2ErrorMode.None
+               Array.Reverse(c2mode);
+           }
            Device.MainChannelSelection[] mainmode = { Device.MainChannelSelection.UserData, Device.MainChannelSelection.F8h };
            bool found = false;
            _autodetectResult = "";
c72578 commented 3 years ago

@mill1000 There are multiple versions of the iHAS124 drives [1]:

CD Drive | Correction Offset | Submitted By | Percentage Agree -- | -- | -- | -- ATAPI - iHAS124 A | +6 | 118 | 100% ATAPI - iHAS124 B | +6 | 1019 | 100% ATAPI - iHAS124 C | +6 | 221 | 100% ATAPI - iHAS124 D | +6 | 225 | 100% ATAPI - iHAS124 E | +6 | 419 | 100% ATAPI - iHAS124 F | +6 | 977 | 100% ATAPI - iHAS124 W | +48 | 450 | 100% ATAPI - iHAS124 Y | +48 | 418 | 100%

For example, the iHAS124 Y has been reported to work properly with CUERipper concerning C2 modes (#15). So, for now I will narrow down this reported issue to the iHAS124 F model.

Please, find another test build here, which only considers the iHAS124 F, which you have got:

CUETools_2.1.9_2021-05-22_git_fce0abe.zip SHA256: 485de3b4413ca70861085a19360e81cc7b22c9ef7fab32b1a05591e71a6f5915

For details on modifications, see: commit: https://github.com/c72578/cuetools.net/commit/fce0abed01f08c9ad7dbbdd42bbdf279d1bd1050

[1] http://www.accuraterip.com/driveoffsets.htm

c72578 commented 3 years ago

@mill1000 if you test the ASUS DRW-24B1ST drive, could you please prepare a screenshot of CUERipper, so that we see the details of the drive model, how it is detected in CUERipper. According to the AccurateRip database, there are different versions around:

DRW-24B1ST
DRW-24B1ST a
DRW-24B1ST c
DRW-24B1ST g
DRW-24B1ST i
DRW-24B1ST j
mill1000 commented 3 years ago

I believe the is it a DRW-24B1ST j but I will upload a screeenshot to confirm once I get a chance to reinstall the original drive.

waltervn commented 3 years ago

I appear to be having this same issue on a brand new ASUS DRW-24D5MT image

EDIT: I compiled cuetools with C2 disabled (like what's listed above for the iHAS124), and that does work around the issue and give me accurate rips.

c72578 commented 3 years ago

@waltervn thanks for your report and for posting the CUETools 2.1.9 screenshot, which shows how the drive is detected in CUERipper. It is an ASUS DRW-24D5MT drive with firmware 2.00. However, there has been a report in the past, that an ASUS DRW-24D5MT works using C2ErrorMode.Mode296: https://github.com/gchudov/cuetools.net/issues/19#issuecomment-577265870 Therefore, in case of an ASUS DRW-24D5MT drive, C2ErrorMode.Mode296 is currently tried first: https://github.com/gchudov/cuetools.net/blob/c68f96b6fd2aeb237574513df906237746037cf4/CUETools.Ripper.SCSI/SCSIDrive.cs#L787 This needs further investigation ...

waltervn commented 3 years ago

@c72578 Thanks for the reply. If there's anything I can do or test, just let me know. IIRC this drive was manufactured mid-2020. If it helps I could pull the drive out again and take a photo. Also, I tried Mode294 and that does indeed give "UNRECOVERED READ ERROR" (as reported in #19).

drallim33 commented 2 years ago

Maybe it is time to include an option to choose between C2 modes? Having the same issue with an "ATAPI iHAS324 F CL8N"

c72578 commented 2 years ago

@drallim33 Thanks for your report concerning the ATAPI iHAS324 F drive. Could you please try this build of CUETools 2.2.2 in the meantime and report back here: CUETools_2.2.2_Mode296_first.zip Details: https://github.com/gchudov/cuetools.net/issues/192

drallim33 commented 2 years ago

The build you linked shows the same behaviour as the regular build.

c72578 commented 2 years ago

@drallim33 Thanks for the info. Could you please test the build from here: https://github.com/gchudov/cuetools.net/pull/203#issuecomment-1179143772

Support for choosing C2 error modes is added in this PR. Please test especially mode None in case of your ATAPI iHAS324 F drive, using setting 0. Further instructions are found in the PR.

drallim33 commented 2 years ago

-C 0 appears to work

-C 1 resulted in this:

Error: failed to autodetect read command:
BEh, 12h, , 16 blocks at a time: L-EC UNCORRECTABLE ERROR (6801.4798ms)
BEh, FAh, , 16 blocks at a time: L-EC UNCORRECTABLE ERROR (6817.2103ms)

   at CUETools.Ripper.SCSI.CDDriveReader.DetectGaps()
   at CUETools.ConsoleRipper.Program.Main(String[] args)

-C 2 counts up to 31 retries endlessly, always shows roughly 1906 or 1952 errors. Very slow progress.

-C 3 same as -C 2

c72578 commented 2 years ago

@drallim33 Thanks for testing and providing the details.

waltervn commented 2 years ago

I retested with the ASUS DRW-24D5MT 2.00 mentioned above:

-C 0: works fine

-C 1:

Error: Error reading CD: medium error: UNRECOVERED READ ERROR
   at CUETools.Ripper.SCSI.CDDriveReader.FetchSectors(Int32 sector, Int32 Sectors2Read, Boolean abort)
   at CUETools.Ripper.SCSI.CDDriveReader.PrefetchSector(Int32 iSector)
   at CUETools.Ripper.SCSI.CDDriveReader.Read(AudioBuffer buff, Int32 maxLength)
   at CUETools.ConsoleRipper.Program.Main(String[] args)

-C 2: counts up to 31 retries reporting ~2000 errors

c72578 commented 2 years ago

@waltervn Thanks for testing the build from PR #203 and the additional info concerning the ASUS DRW-24D5MT 2.00 drive. So, only C2ErrorMode None is working in this case. I guess the rips using `-C 0' are accurate?

waltervn commented 2 years ago

@c72578 Last year, after the iHAS124 discussion above, I compiled 2.1.9 myself to force C2ErrorMode None. I used that to rip my entire collection of hundreds of CDs and it worked great. A few CDs had really bad scratches preventing an accurate rip, but overall, the rips were accurate.

c72578 commented 2 years ago

@drallim33, @waltervn In the meantime there is a build available, which allows setting the C2 error mode from the CUERipper GUI. If you are interested, could you please check if it is working properly with your drives? https://github.com/gchudov/cuetools.net/pull/208#issuecomment-1193143138

waltervn commented 2 years ago

@c72578 Works great! Thanks.

drallim33 commented 2 years ago

Sorry for the late reply, I'm not getting notifications for some reason.

It worked perfectly. Same results for the different modes as before.

c72578 commented 2 years ago

@drallim33 thanks for checking. In the meantime, the code has been updated, so that the working C2ErrorMode.None is automatically used in case of an iHAS324 F drive. A build for testing is available from here: https://github.com/gchudov/cuetools.net/pull/214#issuecomment-1207330399

Feel free to test. Remark: You can leave the C2 error mode setting in the GUI of CUERipper at Auto now with your drive.