Page 3 of 4

Re: cdrom-image file format specifications

Posted: Thu Jan 10, 2013 1:28 pm
by F1ReB4LL
Nexy wrote:You may want to make sure your emulator can also unscramble scrambled data sectors, sometimes due to bad mastering, there can be scrambled data sectors in audio pre-gaps.
Don't remember any for PSX Image

Re: cdrom-image file format specifications

Posted: Sat Feb 02, 2013 9:56 am
by nocash
Nexy wrote:Alcohol supports ISRC, this stuff is encoded in sub channels in mode 0 sub channel entries (normal ones are mode 1). So basically any image with valid sub channels can have ISRC codes.
Yes, that would work. But only if the .MDF files does contain subchannel data (which is optional, it could also contain raw sector data). And it won't work for stuff located in lead-in (namely CD-TEXT) (and I think EAN and maybe even ISRC could be also stored in lead-in, although the typical PC cdrom drives may be unable to extract that data).
Nexy wrote:Redump images are multi-file cue/bin's, they conform to bin/cue specs.
Yeah, guess I should support that, too. It isn't my first choice though - I'd much prefer fileformats where all data is stored in one file. And the required filenames are looking quite fragile to me (like: somebody renames the files, but doesn't edit the names in the .CUE accordingly).
At the moment I am completely ignoring the filename(s) inside of the .CUE (and just expect file.CUE to refer to file.BIN with same name).
F1ReB4LL wrote:
Nexy wrote:You may want to make sure your emulator can also unscramble scrambled data sectors, sometimes due to bad mastering, there can be scrambled data sectors in audio pre-gaps.
Don't remember any for PSX Image
Okay, then maybe I won't really need it in no$psx. Anyways, just for curiosity... trying to understand what scrambling means:

http://www.icdia.co.uk/cdprosupport/cdi … ambled.htm tells that data sectors are scrambled, and audio sectors aren't scrambled.

http://club.myce.com/f61/unscramble-sec … ost1267339 tells that scrambling and unscrambling is done by XORing some constants.

So, in the emulation, all I would need to do is:
Do the XORing when doing a DATA-READ on an AUDIO sector.
Do the XORing when doing an AUDIO-PLAY on a DATA sector.
Sounds easy... if I got that right.

Re: cdrom-image file format specifications

Posted: Sat Feb 02, 2013 11:38 am
by F1ReB4LL
nocash wrote:http://club.myce.com/f61/unscramble-sec … ost1267339 tells that scrambling and unscrambling is done by XORing some constants.

So, in the emulation, all I would need to do is:
Do the XORing when doing a DATA-READ on an AUDIO sector.
Do the XORing when doing an AUDIO-PLAY on a DATA sector.
Sounds easy... if I got that right.
Audio is always untouched, so it's only XORing when doing a data read on a scrambled data sector. Scrambled data sector consists of 16-bytes sync header (similar to the regular data sector sync, but slightly different) and 2336 scrambled data sectors, so it's not data-read on audio neither audio-play on data, it has a proper header telling there is some scrambled data below.

Re: cdrom-image file format specifications

Posted: Sat Feb 02, 2013 11:56 am
by pablogm123
You can download a samples of lead-in + first pregap + a piece of program area:

-Alien Trilogy, PC version, US release. First pregap is Sony style (1.74 - 0)

-Celine Dion - A New Day Has Come. A disc protected by Key2Audio, including scrambled data sectors marked as audio in the first pregap (-150,0), fake sessions, CD-Text, ISRCs and MCN. Interesting from technical viewpoint. First pregap is Philips style (10.00 - 1)

Regarding scrambling: data sectors (not audio sectors) are stored actually scrambled. Reason: data sectors not scrambled can contain certain regular data patterns which would render unreadable the disc. If you read as audio a data track from a disc (Read D8 or audio trap disc) you get the scrambled content, and with no offset correction. You cannot extract as data an audio sector (where user data=raw data) because the drive would expect to find sync, header, EDC, ECC... fields and would report a read error.

I know that ccd/img/sub CloneCD format supports scrambled data tracks. Also, IsoBuster can open scrambled data tracks, unscrambling the contents on the fly.

Re: cdrom-image file format specifications

Posted: Sat Feb 02, 2013 6:10 pm
by F1ReB4LL
pablogm123 wrote:I know that ccd/img/sub CloneCD format supports scrambled data tracks. Also, IsoBuster can open scrambled data tracks, unscrambling the contents on the fly.
Ever tried to burn the scrambled image with CloneCD or other tools? Or mount to virtual Clone drive or other? And how can you say it supports scrambled data?

Re: cdrom-image file format specifications

Posted: Sat Feb 02, 2013 8:04 pm
by pablogm123
[Disc]
TocEntries=4
Sessions=1
DataTracksScrambled=1
CDTextLength=0

I have burned a ccd/img/sub image (img file scrambled, 1 data track) successfully and the burned disc is fully readable. IsoBuster can open this image and shows its contents, too. Unfortunately, Daemon Tools doesn't support the scrambled ccd/img/sub image.

Re: cdrom-image file format specifications

Posted: Sat Feb 02, 2013 8:18 pm
by Nexy
Old daemon tools does support scrambled data tracks and so does alcohol. Maybe not from clonecd image, but I have mounted scrambled images and were able to read them fine.

Re: cdrom-image file format specifications

Posted: Sun Feb 03, 2013 5:01 am
by F1ReB4LL
pablogm123 wrote:I have burned a ccd/img/sub image (img file scrambled, 1 data track) successfully and the burned disc is fully readable.
Interesting. What burning tool was used?

Re: cdrom-image file format specifications

Posted: Sun Feb 03, 2013 6:36 am
by pablogm123
CloneCD 5.3.1.4. This is the image I burned, the bootable image of Memtest86+ 4.10 converted to ccd/img/sub format (lead-out subcode generated).

http://www.mediafire.com/?31b5rl3ebari4q4

I have tried the old Daemon Tools 3.47 and no luck. Scrambled ccd/img/sub not supported.

Re: cdrom-image file format specifications

Posted: Sun Feb 03, 2013 8:00 am
by F1ReB4LL
I knew about DataTracksScrambled parameter, but never seen a program understading scrambled data with DataTracksScrambled=1, so I've thought it's related to something else.
I have tried the old Daemon Tools 3.47 and no luck. Scrambled ccd/img/sub not supported.
What's about Virtual CloneDrive bundled with CloneCD?