Previous Thread
Next Thread
Print Thread
Page 1 of 7 1 2 3 4 5 6 7
Sub-channel support for CDs #106171 06/26/16 08:25 PM
Joined: Mar 2011
Posts: 53
F
Fake Shemp Online Content OP
Member
OP Online Content
Member
F
Joined: Mar 2011
Posts: 53
As far as I know, the CHD format for CDs currently doesn't support dump formats such as CCD/SUB, MDF/MDS and those from RawDump, which arguably would be better for preservation. At least they would allow for CD+G, LibCrypt and other copy-protected and subchannel-abusing discs to work.

I'm an amateur coder who don't really know much about the core of MAME. Would it be a very intense project to implement support for one/some of these formats?

I can see that the reverse engineering of the formats might be a handful, but I'm thinking more in the terms of getting sub-channels and such to integrate well with MAME.

I'm thinking of working on it myself of course. This is no request.

Re: Sub-channel support for CDs [Re: Fake Shemp] #106177 06/27/16 12:01 AM
Joined: Aug 2009
Posts: 1,140
Kale Offline
Very Senior Member
Offline
Very Senior Member
Joined: Aug 2009
Posts: 1,140
Your best bet is to start supporting CCD/SUB format first then go all-in for CHD (if possible at all).

Re: Sub-channel support for CDs [Re: Fake Shemp] #106187 06/28/16 07:03 AM
Joined: Nov 2003
Posts: 804
S
smf Offline
Senior Member
Offline
Senior Member
S
Joined: Nov 2003
Posts: 804
Originally Posted By Fake Shemp
As far as I know, the CHD format for CDs currently doesn't support dump formats such as CCD/SUB,


The chd format does and so does mame, it's just chdman that doesn't. I wrote a clonecd to bin/toc converter years ago, so if anyone submits dumps in that format they can still be used.

Last edited by smf; 06/28/16 07:05 AM.
Re: Sub-channel support for CDs [Re: Fake Shemp] #106197 06/28/16 02:36 PM
Joined: Oct 2007
Posts: 300
F
F1ReB4LL Offline
Senior Member
Offline
Senior Member
F
Joined: Oct 2007
Posts: 300
The only possible proper "MAME-grade" way of storing the CD images at all would be to store lead-in with TOC + user data + lead-out in a single 2448 bytes/sector scrambled image inside of CHD, if some of the data is missing in the image that is being converted to CHD format, it should be generated (like, subs + leadin + leadout for the bin-cue image or only lead-in + lead-out for the CCD image).

Re: Sub-channel support for CDs [Re: Fake Shemp] #106260 07/01/16 03:49 PM
Joined: Mar 2011
Posts: 53
F
Fake Shemp Online Content OP
Member
OP Online Content
Member
F
Joined: Mar 2011
Posts: 53
Originally Posted By smf
The chd format does and so does mame, it's just chdman that doesn't. I wrote a clonecd to bin/toc converter years ago, so if anyone submits dumps in that format they can still be used.

OK, that's great. So if I understand it correctly, for user convenience, just writing a CCD/SUB parser for chdman would be an idea then. Is your CloneCD converter available online somewhere?

Originally Posted By F1ReB4LL
The only possible proper "MAME-grade" way of storing the CD images at all would be to store lead-in with TOC + user data + lead-out in a single 2448 bytes/sector scrambled image inside of CHD, if some of the data is missing in the image that is being converted to CHD format, it should be generated (like, subs + leadin + leadout for the bin-cue image or only lead-in + lead-out for the CCD image).

I was thinking in similar lines myself. Although it probably isn't really possible to get all data reliably off of a CD with today's dumping methods, we at least have knowledge of all the data that should be there, right? I thought it would be a good idea to represent all the data that the disc should contain, and if something is missing from an available dump, necessarily generate the missing information, just like you said.

Re: Sub-channel support for CDs [Re: F1ReB4LL] #106265 07/01/16 09:54 PM
Joined: Dec 2013
Posts: 132
X
xinyingho Offline
Senior Member
Offline
Senior Member
X
Joined: Dec 2013
Posts: 132
Originally Posted By F1ReB4LL
The only possible proper "MAME-grade" way of storing the CD images at all would be to store lead-in with TOC + user data + lead-out in a single 2448 bytes/sector scrambled image inside of CHD

Why scrambled? Shouldn't having unscrambled data make more sense? I mean having scrambled or unscrambled data doesn't make any differences for emulation apart from the fact that scrambled data add a step during emulation with the need to be descrambled.

Maybe it's because "MAME-grade" means as close as possible to the actual raw data recorded on discs and we can't get anything closer with current consumer-grade devices?

Re: Sub-channel support for CDs [Re: xinyingho] #106269 07/01/16 10:47 PM
Joined: Oct 2007
Posts: 300
F
F1ReB4LL Offline
Senior Member
Offline
Senior Member
F
Joined: Oct 2007
Posts: 300
Originally Posted By xinyingho
Why scrambled? Shouldn't having unscrambled data make more sense? I mean having scrambled or unscrambled data doesn't make any differences for emulation apart from the fact that scrambled data add a step during emulation with the need to be descrambled.

Maybe it's because "MAME-grade" means as close as possible to the actual raw data recorded on discs and we can't get anything closer with current consumer-grade devices?

Reason 1: Because that's the way it's stored on real CDs (MAME doesn't use decrypted NeoGeo ROMs, because they are encrypted inside the chips, why should the CDs be stored in descrambled form?)

Reason 2: There are enough discs with various mastering errors and protections that are hard to descramble (different drives give different descrambled outputs on them depending on their internal firmware logic). For example, there are discs with incomplete sectors (less than 2352 bytes), if you want to keep them in the descrambled form, you need either to fix those sectors (so the image won't be accurate anymore, even its total size) or to keep the damaged sector and all the sectors after it in the scrambled form (so the image won't be usable if the emulator expects decrambled contents).

Re: Sub-channel support for CDs [Re: Fake Shemp] #106270 07/01/16 10:54 PM
Joined: May 2004
Posts: 1,611
H
Haze Offline
Very Senior Member
Offline
Very Senior Member
H
Joined: May 2004
Posts: 1,611
how things are stored inside the CHD is rather immaterial tho, as long as the tools used to process that can provide the image in any given format (scrambled, unscrambled etc.)

the only requirement of the CHD format is that it's lossless and streamable, even now error correction data is generated on the fly for cases where that data had no intentional errors in the original source and can be generated 100% accurately, it's just part of the lossless compression technique applied.

obviously you'd want to be able to feed it raw scrambled data, and get the very same raw scrambled data back out, but that doesn't mean internally it needs to be stored scrambled, it just needs the key / detail with which it was scrambled so it can be recreated.



Re: Sub-channel support for CDs [Re: Haze] #106271 07/02/16 12:17 AM
Joined: Oct 2007
Posts: 300
F
F1ReB4LL Offline
Senior Member
Offline
Senior Member
F
Joined: Oct 2007
Posts: 300
Originally Posted By Haze
obviously you'd want to be able to feed it raw scrambled data, and get the very same raw scrambled data back out, but that doesn't mean internally it needs to be stored scrambled, it just needs the key / detail with which it was scrambled so it can be recreated.

I've meant that the current chdman images keep the data from the source image format to be able to recreate the original image in original format (so there were problems with 2048 byte/sector images at some point as well as with the images with the pregaps cut), while the better idea would be to properly convert everything into a single 2448 bytes/sector image as a temporary solution replacing them with the proper 2448 bytes/sector + lead-in + lead-out dumps when possible. So all the drivers would work with real scrambled data (without workarounds for the images with mastering/protection issues) and real TOC + subchannels data (so you don't need to think whether to use P or Q channel gaps in the cue, TOC or subchannel indexes, etc.).

Re: Sub-channel support for CDs [Re: Fake Shemp] #106272 07/02/16 12:56 AM
Joined: Mar 2001
Posts: 16,523
R
R. Belmont Online Content
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,523
And this is why I stopped working on CDs. 6 people have 6 opinions, and meanwhile the current stuff works fine.

PS: taking a cue from the floppy subsystem, a bitstream of pits and lands would be the ultimate ideal form. It could represent PC copy protections that violate all possible axes of the ISO standards, for instance.

Page 1 of 7 1 2 3 4 5 6 7

Who's Online Now
1 registered members (1 invisible), 100 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics8,783
Posts115,580
Members4,908
Most Online890
Jan 17th, 2020
Powered by UBB.threads™ PHP Forum Software 7.7.3