saramibreak / DiscImageCreator

This is the disc (CD, GD, DVD, HD-DVD, BD, GC/Wii, XBOX, XBOX 360) and disk (Floppy, MO, USB etc) image creation tool
http://forum.redump.org/topic/10483/discimagecreator/
Apache License 2.0
538 stars 46 forks source link

Dumping speed setting does not work on LG BH16NS40 drive #219

Closed MrPepka closed 1 year ago

MrPepka commented 1 year ago

Version The problem occurs in all versions

Describe the bug However I wouldn't set the disc dumping speed on my LG BH16NS40 it makes no difference and the drive dumps the disc at the same maximum speed. The Plextor PX-712A takes this setting into account and dumps discs at the speed I specify

MrPepka commented 1 year ago

In general, this problem is best seen when you have discs that return C2 errors and get them fixed. In PX-712A, when I set the speed to 4x, the drive fixes C2 errors exactly at 4x speed, while the BH16NS40, when I set the speed to 4x, it tries to fix C2 errors at max speed instead of the desired 4x

saramibreak commented 1 year ago

when I set the speed to 4x, the drive fixes C2 errors exactly at 4x speed, while the BH16NS40, when I set the speed to 4x, it tries to fix C2 errors at max speed instead of the desired 4x

It's weird. If it's true, probably this is not the application problem. Or BH16NS40 doesn't support SET_CD_SPEED (0xbb).

MrPepka commented 1 year ago

To make it funny, I tried to manually reduce the dump speed with the RimHillEx program, but when I dump a disc in DIC, whatever I set, DIC forces the drive to dump at the highest speed of 48x and this speed cannot be changed either in the program I mentioned or in the program itself DIC

MrPepka commented 1 year ago

I also confirmed this problem on the BW-16D1HT drive. After doing more research, however, I found out that both drives actually dump discs at the speed you set in the DIC, but when C2 errors are detected and the drive tries to fix them, for some reason the speed setting resets and the drive fixes C2 errors at the highest available speed instead of the one set. So is it possible for the DIC to take this speed reset into account and try to reset the speed that was set in the DIC when the C2 bugs were fixed?

saramibreak commented 1 year ago

"SetDiscSpeed" function is called only once before starting to dump. I don't understand why plextor is no problem but these drive that you reported are problem.

I added to call "SetDiscSpeed" function before asus/lg drive rereads sectors to fix the c2 errors. Its speed is 4x.

    if (IsValid0xF1SupportedDrive(pDevice) || IsValidAsusDriveWith310(pDevice)) {
        byTransferLength = 1;
        SetDiscSpeed(pExecType, pExtArg, pDevice, 4);
    }

DiscImageCreator_test.zip

MrPepka commented 1 year ago

Great, thanks BTW: Before I close the ticket, could you put in a switch so that the speed of the drive can be adjusted while it fixes the C2 errors?

saramibreak commented 1 year ago

Great, thanks

Does it means the drive speed changed to 4x?

MrPepka commented 1 year ago

Yes, it changes to 4x when fixing C2 errors

saramibreak commented 1 year ago

It's weird...

could you put in a switch so that the speed of the drive can be adjusted while it fixes the C2 errors?

Do you hope that the speed before dumping the disc and the speed before fixing the c2 error is the same? Or different?

MrPepka commented 1 year ago

Certainly, when I set the speed to a lower one (16x, 8x or 4x), the drive dumps the disc at the set speed. But when it fixes errors C2 then it sets the speed to the highest. Interestingly, during this error fixing C2 will stop the DIC, remove the disc, cool it down a bit, and then insert it into the drive, after reading the disc and resuming the DIC, the drive fixes errors again at the highest speed (and yes, it is felt even in the workaround version and the C2 bug fix speed is set to 4x). I think the LG/ASUS drive firmware just don't give a shit about any speed settings in some cases, that's why software workarounds are needed

saramibreak commented 1 year ago

Ok, then If you set the reading speed to 16x, should the reading speed of the c2 error fixing also set 16x?

MrPepka commented 1 year ago

It should, but instead the drive fixes C2 errors at the highest speed available (or 4x speed as you set it). That's why IMO it's worth making a switch so that you can adjust both the speed of disc dumping and the speed of fixing C2 errors in the case of LG/ASUS (because it works fine on Plextor as always)

saramibreak commented 1 year ago

I'll add the new argument in the /c2. Please wait a few days.

now

        /c2     Continue reading CD to recover C2 error existing sector
                        val1    value to reread (default: 4000)
                        val2    value to set the C2 offset (default: 0)
                        val3    0: reread sector c2 error is reported (default)
                                1: reread all (or from first to last) sector
                        val4    first LBA to reread (default: 0)
                        val5    last LBA to reread (default: end-of-sector)

next version

        /c2     Continue reading CD to recover C2 error existing sector
                        val1    value to reread (default: 4000)
                        val2    reading speed when fixing the C2 error (default: same as the <DriveSpeed(0-72)>)
                        val3    value to set the C2 offset (default: 0)
                        val4    0: reread sector c2 error is reported (default)
                                1: reread all (or from first to last) sector
                        val5    first LBA to reread (default: 0)
                        val6    last LBA to reread (default: end-of-sector)
saramibreak commented 1 year ago

DiscImageCreator_test.zip added.

MrPepka commented 1 year ago

Thx. I'll test it some more, but I think that's what I meant