superg / redumper

Low level CD dumper utility
GNU General Public License v3.0
179 stars 16 forks source link

Add fallback for CD-R detection #170

Closed HeroponRikiBestest closed 1 week ago

HeroponRikiBestest commented 1 week ago

Some drives don't properly return whether media is recordable with the current configuration check. This pull request adds a fallback after the mediatype is determined, checking if the media is of type CD-ROM, and if it is, checking for the presence of an ATIP, setting mediatype to CD-R if it is.

superg commented 1 week ago

First of all, such check doesn't belong to cmd at all. Second, I don't think I do any profile checks for CD-ROM other than distinguishing it from DVD/BD. What problem does it solve, just displays wrong profile or there is some functionality that is affected by this? Also, which drives are affected?

HeroponRikiBestest commented 1 week ago

I have a CD-R that redumper recognizes as being a CD-ROM on my JB8 ASUS drive, but recognizes as a CD-R on my PX-4824.

iambicASUS.zip iambic.log current profile: CD-ROM

iambicPLEX.zip iambic.log current profile: CD-R

With this change, redumper identifies it as a CD-R on my ASUS drive too. I've dumped other CD-R discs on my ASUS drive in the past, and they were correctly identified, so the issue with the current profile check doesn't affect all CD-R discs.

I apologize if this change is not desired; while I noticed that it was a CD-R when I went to read the ringcodes, I usually rely on redumper's log output to determine if a disc is a CD-R, as that info needs to go in the comments when submitting to redump. If this change is desired, and there is anything I can do to better implement it, please let me know.

superg commented 1 week ago

Ok, so this doesn't affect any functional behavior, just the console output. I am fixing some profile misdetection for BD-R, but I am using layer descriptor information where it clearly says BDR, the check like this is great. But CD lacks such definitive descriptors. I don't think that ATIP check is suitable here, what if some pressed discs will return ATIP?

I suggest to look at the disc using eyes if you aren't sure if it's pressed or not. Funny, I know :)

HeroponRikiBestest commented 1 week ago

I thought it was safe to add because Aaru and other sources say that pressed discs can't have ATIP.

I apologize, but please don't make fun of me; I already check the physical disc as well when dumping, I just wanted to see if I could fix the check.

superg commented 1 week ago

PMA and ATIP are somewhere in the leadin. True that specs say that it shouldn't exist on pressed CD's but I don't think anything prevents you from structuring the disc the way it's there even on pressed media. Also, there are bootleg discs that were mastered from CD-R like media (2 C2 errors in the end) and I have plenty of them, there is a chance that there might be other CD-R properties there, that's why I am cautious.