iromlab
iromlab copied to clipboard
Add support for CD-BRIDGE (AKA CD-ROM XA) discs
This is a CD-ROM/CD-i hybrid:
https://web.archive.org/web/20010306215434/http://www.ora.nsysu.edu.tw/~goldentime/cdterm08.htm
and:
https://en.wikipedia.org/wiki/CD-ROM#CD-ROM_XA_extension
Note here that for XA Form 2 each sector contains 2324 bytes of user data (instead of 2048).
Example:
Cd-info output:
CD location : H:
CD driver name: WIN32
access mode: ioctl
__________________________________
CD-ROM Track List (1 - 3)
#: MSF LSN Type Green? Copy?
1: 00:02:00 000000 data false no
2: 00:13:52 000877 data false no
3: 53:20:31 239881 audio false no 2 no
170: 61:23:05 276080 leadout (619 MB raw, 539 MB formatted)
__________________________________
CD Analysis Report
No CD-TEXT on Disc.
mixed mode CD
CD-ROM with CD-RTOS and ISO 9660 filesystem
ISO 9660: 276078 blocks, label `PCD1997 '
Application: CDI/CDI_APPL.PCD;1
Preparer :
Publisher :
System : CD-RTOS CD-BRIDGE
Volume : PCD1997
Volume Set :
mixed mode CD XA sectors Portfolio Photo CD
(Note that this is also a mixed mode disc that contains audio!)
What happens in this case:
- Audio is ripped OK.
- One small ISO image is written, doesn't pass Isolyzer check
- According to Iso-info, disc contains 2nd data track (which contains most of the data), which isn't currently extracted.
Note that Video CDs are also written in XA mode!
Some additional info: this particular disc is a Kodak Photo CD.
The small ISO image can actually be mounted, and it is possible to browse the file system. Attempts at opening any of the files results in an error, for example:

It seems the ISO image references data that are located on parts of the CD that are outside the ISO image. It is possible to open file from the physical CD. So I did a couple of experiments.
Experiment 1
Extract 2nd data track from CD with IsoBuster (extract as ISO). (Incidentally this resulted in some read errors at the end of the disc.) Then paste resulting data to existing ISO image using:
cat PCD1997.iso Track02.iso > combi.iso
Mount combi.iso. Image can be mounted and accessed. Files can be opened, but appear to contain garbage.
Experiment 2
Extract 2nd data track from CD with IsoBuster (extract as RAW) --> no error message this time! Then append to image of 1st data track again:
cat PCD1997.iso Track02-raw.iso > combi-raw.iso
Mounting works, but opening files stil results in garbage.
Experiment 3
Extract whole CD as RAW. Extraction completes without any errors. Image can be mounted in Windows using WinCDEmu, files can be opened normally!
BUT raw image cannot be mounted under Linux! Perhaps cdemu might help here, as its About page says:
CDemu was originally designed in 2003 by a group of friends (Robert Penz and Justus Schwartz) as a patch for MPlayer that allowed mounting .CUE/.BIN files. After the patch was completed, they realized the simplicity, and wrote a module for the kernel capable of emulating a CD-ROM from .CUE/.BIN files.
Installation:
sudo add-apt-repository ppa:cdemu/ppa
sudo apt-get update
sudo apt-get install gcdemu cdemu-client
Image can be mounted + is accessible but no audio!
Experiment 4
As 3, but generate a CUE sheet (so basically we're extracting to IN/CUE).
Result: image can be mounted with cdemu, both audio and data now work!
So the way forward is to image these discs as BIN/CUE. Since we're already creating BIN files (but without a cue sheet!) for CD-i discs, it would be best to also use BIN/CUE for CD-i.
Quick check to estimate number of these CDs in KB collection:
Gives 4 hits. But these are only photo CDs.