CDFix  -  Use 'Dual Format' CD-ROMs under RISC OS

Public Domain

Like CD_Type, which is also included on this disc, CDFix is designed to fix various flaws within Acorn's CD-ROM filing system, CDFS. CDFix does everything that CD_Type does, as well as provide support for 'dual format' Mac/PC CD-ROMs which contain what are known as 'opaque' files. However, CDFix is not guaranteed to work in all cases, so if you experience any problems with it, use CD_Type instead.

Bugs fixed by CDFix and CD_Type

When you open a Filer window on an MS-DOS disc under RISC OS, RISC OS automatically maps the MS-DOS filename extensions to the equivalent RISC OS filetypes. For example, any DOS file with the extension .TXT is given the RISC OS filetype &FFF and appears in the Filer window with a TEXT icon, .JPG extensions are mapped to the RISC OS JPEG filetype, etc. This automatic mapping means that you can load files directly off MS-DOS discs by double-clicking on their icons.

The problem with Acorn's CDFS is that the extension-to-filetype mapping routine for DOS CD-ROMs doesn't work. The result of this is that you can't double-click on DOS CD-ROM files to load them into RISC OS applications. This is not a serious problem if the file is only 100K or so, as you can simply copy it to your hard drive and then set its filetype. However, if the file is a 50Mb AVI movie, copying it to your hard drive is not particularly practical.

CDFix and CD-Type solve this problem by ripping the CDFS module out of the RMA, adding new code to perform the extension-to-filetype mapping, and rewriting the fixed CDFS module to the RMA. This process has to be performed every time you reboot the computer, so the best way to install the fix is to add either CDFix or CD_Type to your Risc PC's !Boot.Choices.Boot.Tasks directory or your !Boot file.

CDFix support for opaque files

In the world of Apple computers, files are generally split into two sections or "forks". One fork is known as the data fork and contains (for instance) the compressed frames of a movie, or the image data for bitmaps. The other is known as the resource fork, and contains information on how to interpret the data fork, for instance where the frames start, what speed they should be played back at, what compression type they use, etc.

These are stored on CD-ROMs as different files with the same names. They are differentiated by the resource fork file having the "Opaque" bit set.

Unfortunately on RISC OS this means that the Filer window shows two identically named files. As soon as you try to access one of them, it is always the first of the pair that is actually accessed. This means that you can only get to the resources for a file, and not the data itself.

As a blatant hack to get around this problem, CDFix patches CDFS to rewrite any / in an opaque file's filename as a _. Thus if you have a file FRED/MOV on a CD-ROM, you will now see FRED_MOV and FRED/MOV.

This program is public domain
