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
513 stars 45 forks source link

Varying Errors Imaging old Macintosh disc #226

Closed genekellyjr closed 10 months ago

genekellyjr commented 10 months ago

Version AppVersion - 32 bit, AnsiBuild, 20230606T110637

Describe the bug I am trying to image an old Macintosh disc (Operation: Weather Disaster). I get two different types of errors depending on the two drives I have.

I am using this call: C:\Utilities\DiscImageCreator\DiscImageCreator.exe cd F "E:\Game Installers\Operation Weather Disaster\Operation Weather Disaster.iso" 16

The errors are as follows:

PIONEER BD-RW BDR-209D 1.34-ID61 (F:) (SATA) Platform RS8600

This drive (BD-RW BDR-209D 1.34 16/04/25 PIONEER ) can read data sectors at scrambled state [OpCode: 0xbe, C2flag: 0, SubCode: 1] Failed to get write-offset This drive (BD-RW BDR-209D 1.34 16/04/25 PIONEER ) can read data sectors at scrambled state [OpCode: 0xbe, C2flag: 0, SubCode: 2] LBA[000000, 0000000]: [F:ExecSearchingOffset][L:196] Opcode: 0xbe ScsiStatus: 0x02 = CHECK_CONDITION SenseData Key-Asc-Ascq: 05-24-00 = ILLEGAL_REQUEST - INVALID FIELD IN CDB lpCmd: be, 04, 00, 00, 00, 00, 00, 00, 01, f8, 04, 00 dwBufSize: 2448 This drive (BD-RW BDR-209D 1.34 16/04/25 PIONEER ) can't read data sectors at scrambled state [OpCode: 0xbe, C2flag: 0, SubCode: 4]

HL-DT-ST BD-RE WH16NS60 1.02 (D:) (SATA) Platform MT1959 - Patched

LBA[302310, 0x49ce6]: [F:ReadCDForCheckingReadInOut][L:859] Opcode: 0xbe ScsiStatus: 0x02 = CHECK_CONDITION SenseData Key-Asc-Ascq: 05-21-00 = ILLEGAL_REQUEST - LOGICAL BLOCK ADDRESS OUT OF RANGE lpCmd: be, 04, 00, 04, 9c, e6, 00, 00, 01, f8, 00, 00 dwBufSize: 2352 This drive can't read the lead-out

ImgBurn info

TOC Information: Session 1... (LBA: 0 / 00:02:00) -> Track 01 (Mode 1, LBA: 0 / 00:02:00) -> LeadOut (LBA: 302310 / 67:12:60)

Track Information: Session 1... -> Track 01 (LTSA: 0, LTS: 302310, LRA: 0)

ImgBurn can almost read it but errors on two sectors (302159 and 302160 of 302310 total sectors) on both drives. The resulting .ISO is not mountable via Windows but 7zip can open it and it gives an error "MacOS.hfs - Cannot open the file as [HFS] archive" then I guess manages to open it and shows a MacOS.hfs file and a PartitionMap.Apple_partition_map file. I have a feeling that the disc is OK - it looks good, but maybe the format being just a HFS file system dump is tripping it up?

Disc title Operation: Weather Disaster Macintosh CD-ROM published 1996

Disc ringcode H311113-1

JVC 466-011

Log file https://files.catbox.moe/xys1mt.7z <- 7zip file with outputs from both drives

saramibreak commented 10 months ago

BD-RW BDR-209D 1.34 16/04/25 PIONEER

This drive can't support when CD is dumped.

HL-DT-ST BD-RE WH16NS60 1.02

DiscImageCreator_test.zip Added it as 0xF1 drive. Try to dump plz.

genekellyjr commented 10 months ago

Thanks for the quick update!

The output did change, but it's still having trouble.

Here are the results: https://pastebin.com/k70rUvrW

Here are the associated files, one folder is the first call with no /mr one is with /mr 50 as it suggested - note I do not know what /mr is since not in the docs, the output just suggested it so I tried it! https://files.catbox.moe/v1fwn5.7z

I was able to load SheepShaver (Mac OS 9 emulator with direct disc support) and it was able to open the disc and I was able to copy the all contents of the disc off (no errors reported...) - but without a disc image the game isn't playable. There's a disc image creating program in Mac OS 9 (Disk Copy) but it errors in the emulator with no info, so it probably isn't supported. Know the disc is good enough, though!

saramibreak commented 10 months ago

According to this site (http://wiki.redump.org/index.php?title=DiscImageCreator:_Optical_Disc_Drive_Compatibility#Recommended_Non-Plextor_ODDs), WH16NS60 1.00 is supported. But Unfortunately, it seems 1.02 is not supported.

genekellyjr commented 10 months ago

Thanks for digging into this more!

Maybe this muddies the waters farther: the drive is actually a WH16NS40 that was flashed to be a WH16NS60 to run faster/read UHD blu ray discs (since hardware is the same and it's just software segmentation). I hoped the 1.02 patched version would pull it off.

Is there a work-around to tell the program where the "lead-out" is (sorry, I do not know what the "lead-out" actually is on a disc)? ImgBurn found it as "LeadOut (LBA: 302310 / 67:12:60)" so I could possibly use that to get the program to progress if I could specify it as an option.

As a side note, I did find a way to copy the files from the disc in SheepShaver (Mac OS 9 apparently lets you just drag and drop a disc and it'll dump the disc as a file copy - since the discs simply hold read-only Mac drives apparently) and then the Disk Clone utility did manage to repackage the files as a .img that works - so I guess I'll have to live with that if no work-arounds exist.

saramibreak commented 10 months ago

the drive is actually a WH16NS40 that was flashed to be a WH16NS60

If you re-flash to a WH16NS40, the drive may be able to read the lead-out.

Is there a work-around to tell the program where the "lead-out" is (sorry, I do not know what the "lead-out" actually is on a disc)?

Not all drives can read the lead-out.

If you are interested in the specification of the CD-ROM, you can see ecma-130. https://www.ecma-international.org/publications-and-standards/standards/ecma-130/

genekellyjr commented 10 months ago

Thanks for the reply and link to the standard!

I remembered it's actually a WH14NS40, so I flashed DE_LG_WH14NS40-NS50_1.02.bin from https://forum.makemkv.com/forum/viewtopic.php?f=16&t=22896 which should match the 1.02 (DE / Official) stipulation on http://wiki.redump.org/index.php?title=DiscImageCreator:_Optical_Disc_Drive_Compatibility#Recommended_Non-Plextor_ODDs.

The command E:\Utilities\DiscImageCreator\DiscImageCreator.exe cd D "E:\dump\Operation Weather Disaster.iso" 16 had the same error as before about not reading the lead-out, but E:\Utilities\DiscImageCreator\DiscImageCreator.exe cd D "E:\dump\Operation Weather Disaster.iso" 16 /mr 50 worked with

This drive can't read the lead-out
But 0xF1 opcode is supported
<something about caches>

I'll let you know if it finishes, it will take an extremely long time (8.25 hours based on its 10 .scm/s rate - very suspiciously close to a hard limit of 10/s as well) judging by the incrementation speed versus the goal of 302311 .scm's.

I am using the test binary - but the BD-RE WH14NS40 1.02 was probably already in your 0xF1 list. The BD-RE WH16NS60 1.02 with MK patch is definitely not 0xF1-able.

Final question for your expertise - when you get the time - how can other programs get by the drive not actually being able to read the lead-out? As on the BD-RE WH16NS60 1.02 with MK patch firmware both ImgBurn and whatever SheepShear/Mac OS 9 were able to dump (most in ImgBurn's case) of the disc. And again, thanks for your time & help!

saramibreak commented 10 months ago

I'll let you know if it finishes, it will take an extremely long time

It's weird. If you have other disc, try to dump it.

how can other programs get by the drive not actually being able to read the lead-out?

ImgBurn doesn't read the lead-out, but your disc is a single data track. In most cases, a single data track disc generates the same binary without reading the lead-out. For more information, you can see Drives and Features of this document. (https://dbpoweramp.com/spoons-audio-guide-cd-ripping.htm) Keywords are "offset" and "Over-reading".

genekellyjr commented 10 months ago

Thanks once again for the links and info, I see that your program uses the drive offset to get a very accurate, complete, and reproducible rip of a disc. I was able to rip other CD-ROMs that were multi-platform Windows & Macintosh (e.g., "How Would You Survive?" - link not my rip) with the drive in its upgraded BD-RE WH16NS60 1.02 with MK patch mode - but the speed was very slow at maybe 100/s for those as well. I assumed the slow speed had something to do with the scrambled mode this program uses, because that sounded like it would slow things down.

genekellyjr commented 10 months ago

It got close, but it did not finish successfully. Let me know if any files it outputs are useful - I'm going to try with the WH16NS40 firmware listed on the site and if that doesn't jive I'll have to leave the disc with whatever I've ripped as-is. Thanks for your help throughout, though!

(also will try DE WH16NS60 1.00 since I got that too, and I bumped up the call to 48 since nice and easy didn't help so should take about an hour for results for the next two)

E:\dump>E:\Utilities\DiscImageCreator\DiscImageCreator.exe cd D "E:\dump\Operation Weather Disaster.iso" 16 /mr 50
AppVersion
        32 bit, AnsiBuild, 20230829T190059
CurrentDirectory
        E:\dump
WorkingPath
         Argument: E:\dump\Operation Weather Disaster.iso
         FullPath: E:\dump\Operation Weather Disaster.iso
            Drive: E:
        Directory: \dump\
         Filename: Operation Weather Disaster
        Extension: .iso
StartTime: 2023-08-29T18:34:28-0700
Set the drive speed: 2822KB/sec
DiskSize of [E:\dump]
        Total:  4000768323584 bytes
         Used:  3173801844736 bytes
        ---------------------------
        Space:   826966478848 bytes
         => There is enough disk space for dumping
[WARNING] /c2 isn't set. The result of dumping may be incorrect if c2 error exists.
This drive (BD-RE  WH14NS40  1.02 N000100KLZK8HJ1859  ) can read data sectors at scrambled state [OpCode: 0xbe, C2flag: 0, SubCode: 0]
This drive (BD-RE  WH14NS40  1.02 N000100KLZK8HJ1859  ) can read data sectors at scrambled state [OpCode: 0xbe, C2flag: 0, SubCode: 1]
This drive (BD-RE  WH14NS40  1.02 N000100KLZK8HJ1859  ) can read data sectors at scrambled state [OpCode: 0xbe, C2flag: 0, SubCode: 2]
This drive (BD-RE  WH14NS40  1.02 N000100KLZK8HJ1859  ) can read data sectors at scrambled state [OpCode: 0xbe, C2flag: 0, SubCode: 4]
Checking SubQ adr (Track)  1/ 1
LBA[302310, 0x49ce6]: [F:ReadCDForCheckingReadInOut][L:859]
        Opcode: 0xbe
        ScsiStatus: 0x02 = CHECK_CONDITION
        SenseData Key-Asc-Ascq: 05-21-00 = ILLEGAL_REQUEST - LOGICAL BLOCK ADDRESS OUT OF RANGE
lpCmd: be, 04, 00, 04, 9c, e6, 00, 00, 01, f8, 00, 00
dwBufSize: 2352
This drive can't read the lead-out
But 0xF1 opcode is supported
========== Reading 302289 - 302309 INTO CACHE ==========
01 Cache LBA 302289, SubQ Trk 01, AMSF 67:12:39
02 Cache LBA 302290, SubQ Trk 01, AMSF 67:12:40
03 Cache LBA 302291, SubQ Trk 01, AMSF 67:12:41
04 Cache LBA 302292, SubQ Trk 01, AMSF 67:12:42
05 Cache LBA 302293, SubQ Trk 01, AMSF 67:12:43
06 Cache LBA 302294, SubQ Trk 01, AMSF 67:12:44
07 Cache LBA 302295, SubQ Trk 01, AMSF 67:12:45
08 Cache LBA 302296, SubQ Trk 01, AMSF 67:12:46
09 Cache LBA 302297, SubQ Trk 01, AMSF 67:12:47
10 Cache LBA 302298, SubQ Trk 01, AMSF 67:12:48
11 Cache LBA 302299, SubQ Trk 01, AMSF 67:12:49
12 Cache LBA 302300, SubQ Trk 01, AMSF 67:12:50
13 Cache LBA 302301, SubQ Trk 01, AMSF 67:12:51
14 Cache LBA 302302, SubQ Trk 01, AMSF 67:12:52
15 Cache LBA 302303, SubQ Trk 01, AMSF 67:12:53
16 Cache LBA 302304, SubQ Trk 01, AMSF 67:12:54
17 Cache LBA 302305, SubQ Trk 01, AMSF 67:12:55
18 Cache LBA 302306, SubQ Trk 01, AMSF 67:12:56
19 Cache LBA 302307, SubQ Trk 01, AMSF 67:12:57
20 Cache LBA 302308, SubQ Trk 00, AMSF 00:00:58
21 Cache LBA 302309, SubQ Trk 01, AMSF 67:12:59
22 Cache LBA 302310, SubQ Trk aa, AMSF 67:12:60 [Lead-out]
23 Cache LBA 302311, SubQ Trk aa, AMSF 67:12:61 [Lead-out]
24 Cache LBA 302312, SubQ Trk aa, AMSF 67:12:62 [Lead-out]
25 Cache LBA 302313, SubQ Trk aa, AMSF 67:12:63 [Lead-out]
26 Cache LBA 302314, SubQ Trk aa, AMSF 67:12:64 [Lead-out]
27 Cache LBA 302315, SubQ Trk aa, AMSF 67:12:65 [Lead-out]
28 Cache LBA 302316, SubQ Trk aa, AMSF 67:12:66 [Lead-out]
29 Cache LBA 302317, SubQ Trk aa, AMSF 67:12:67 [Lead-out]
30 Cache LBA 302318, SubQ Trk aa, AMSF 67:12:68 [Lead-out]
31 Cache LBA 302319, SubQ Trk aa, AMSF 00:00:00 [Lead-out]
-----------------------------------------------------
Cache SIZE: 31 (This size is different every running)
-----------------------------------------------------
Checking SubRtoW (Track)  1/ 1
Reading Partition Map 2/2
Set OpCode: 0xbe, SubCode: 4(Pack)
Checking SubQ ctl (Track)  1/ 1
LBA[302310, 0x49ce6]: [F:FlushDriveCache][L:219]
        Opcode: 0xa8
        ScsiStatus: 0x02 = CHECK_CONDITION
        SenseData Key-Asc-Ascq: 05-21-00 = ILLEGAL_REQUEST - LOGICAL BLOCK ADDRESS OUT OF RANGE
LBA[302310, 0x49ce6]: [F:FlushDriveCache][L:219]
        Opcode: 0xa8
        ScsiStatus: 0x02 = CHECK_CONDITION
        SenseData Key-Asc-Ascq: 05-21-00 = ILLEGAL_REQUEST - LOGICAL BLOCK ADDRESS OUT OF RANGE
Creating .scm (LBA) 302311/302311
[L:1373] Internal error. Failed to analyze the subchannel. Track[01]/[01]
EndTime: 2023-08-29T23:43:16-0700
saramibreak commented 10 months ago

It got close, but it did not finish successfully.

Would you upload all logs?

genekellyjr commented 10 months ago

Be warned that the _subError.txt is a substantial 270 MB when uncompressed (guessing repeating some error over and over).

https://files.catbox.moe/7b3v4s.7z

saramibreak commented 10 months ago

Try to use /c2 like

DiscImageCreator.exe cd D "E:\dump\Operation Weather Disaster.iso" 16 /mr 50 /c2
genekellyjr commented 10 months ago

On first run it errored: (also on DE WH16NS40 1.02 firmware now)

E:\dump>E:\Utilities\DiscImageCreator\DiscImageCreator.exe cd D "E:\dump\Operation Weather Disaster.iso" 48 /mr 50 /c2
AppVersion
        32 bit, AnsiBuild, 20230829T190059
/c2 val1 was omitted. set [4000]
/c2 val2 was omitted. set [48]
/c2 val3 was omitted. set [0]
/c2 val4 was omitted. set [0]
CurrentDirectory
        E:\dump
WorkingPath
         Argument: E:\dump\Operation Weather Disaster.iso
         FullPath: E:\dump\Operation Weather Disaster.iso
            Drive: E:
        Directory: \dump\
         Filename: Operation Weather Disaster
        Extension: .iso
StartTime: 2023-08-30T02:55:06-0700
Set the drive speed: 8467KB/sec
DiskSize of [E:\dump]
        Total:  4000768323584 bytes
         Used:  3170802933760 bytes
        ---------------------------
        Space:   829965389824 bytes
         => There is enough disk space for dumping
This drive (BD-RE  WH16NS40  1.02 N001401KLZK8HJ1859  ) can read data sectors at scrambled state [OpCode: 0xbe, C2flag: 1, SubCode: 0]
This drive (BD-RE  WH16NS40  1.02 N001401KLZK8HJ1859  ) can read data sectors at scrambled state [OpCode: 0xbe, C2flag: 1, SubCode: 1]
This drive (BD-RE  WH16NS40  1.02 N001401KLZK8HJ1859  ) can read data sectors at scrambled state [OpCode: 0xbe, C2flag: 1, SubCode: 2]
This drive (BD-RE  WH16NS40  1.02 N001401KLZK8HJ1859  ) can read data sectors at scrambled state [OpCode: 0xbe, C2flag: 1, SubCode: 4]
Checking SubQ adr (Track)  1/ 1
LBA[302310, 0x49ce6]: [F:ReadCDForCheckingReadInOut][L:859]
        Opcode: 0xbe
        ScsiStatus: 0x02 = CHECK_CONDITION
        SenseData Key-Asc-Ascq: 05-21-00 = ILLEGAL_REQUEST - LOGICAL BLOCK ADDRESS OUT OF RANGE
lpCmd: be, 04, 00, 04, 9c, e6, 00, 00, 01, f8, 00, 00
dwBufSize: 2352
This drive can't read the lead-out
But 0xF1 opcode is supported
========== Reading 302289 - 302309 INTO CACHE ==========
LBA[302289, 0x49cd1]: [F:ReadCDForCheckingReadInOut][L:886]
        Opcode: 0xbe
        ScsiStatus: 0x02 = CHECK_CONDITION
        SenseData Key-Asc-Ascq: 04-3e-02 = HARDWARE_ERROR - TIMEOUT ON LOGICAL UNIT
lpCmd: be, 04, 00, 04, 9c, d1, 00, 00, 01, f8, 00, 00
dwBufSize: 2352
EndTime: 2023-08-30T02:55:20-0700

But I just ran the call again and it worked, it's reading it exceptionally fast now. Writing every sector as an error to the _subError.txt file was aggressively slowing the program down, I guess? Does /c2 come with caveats?

genekellyjr commented 10 months ago

Here are the command-line outputs: https://pastebin.com/K1z53fBR

And here are the logs: https://litter.catbox.moe/pvqfqt.7z

Is it a good rip? Were the errors managed to be corrected by re-reading? I'm not too sure with the output. The .img file it produced acts very similar to the other ones I was able to produce, at least.

Edit: I re-ran it again, since it seemed to be a bit different each time. This run had 0 errors reported, so if that's accurate that sounds like success!

Checking SubRtoW (Track)  1/ 1
Reading Partition Map 2/2
Set OpCode: 0xbe, SubCode: 1(Raw)
Checking SubQ ctl (Track)  1/ 1
Creating .scm (LBA) 302311/302311
No C2 errors
Copying .scm to .img
Descrambling data sector of img: 302309/302309
Exec ""E:\Utilities\DiscImageCreator\EccEdc.exe" check TOC "E:\dump\Operation Weather Disaster.img""
Checking sectors: 302309/302309
[NO ERROR] User data vs. ecc/edc match all
Creating cue and ccd (Track)  1/ 1
Creating bin (Track)  1/ 1
Hashing: Operation Weather Disaster.scm
Hashing: Operation Weather Disaster.img
Hashing: Operation Weather Disaster.bin
EndTime: 2023-08-30T03:27:49-0700

Does this seem reliable to you?

Edit2: The .iso also works in the Mac OS 9 emulator.

saramibreak commented 10 months ago

Does this seem reliable to you?

Yes, because [NO ERROR] User data vs. ecc/edc match all.

genekellyjr commented 10 months ago

Excellent, thanks for all of your help! I'll try to figure out how to submit it for redump now since the Mac version of the game isn't cataloged yet. And I see now how exacting a science it is to get an accurate CD-ROM rip. Final thanks for your lending your expertise and time!