CDFix

by Robin Watts

This little application is designed to fix various flaws within Acorns CDFS filing system. It works by ripping the exisitng CDFS module out of the RMA, patching it, and writing it back. In the process of doing this, the module grows by about 128 bytes.

The bugs fixed are:

Filetypes: CDFS contains a routine that maps file extensions to filetypes. Unfortunately this routine is broken due to a typo. This program reassembles working code over the top of the old version.

Opaque Files: CDs can contain "Opaque files". These are special files which are usually associated with ordinary files on the CD. These are explained below in more detail. This program patches CDFS so as to allow them to be accessed by replacing occurences of "/" with "_".

Both of these bugs are to be fixed in a future release of CDFS by Acorn, but
this is intended as a stopgap measure. We also allow:

Spaces in Filenames: CDs with spaces in filenames now have these transparently changed to having <160>'s instead (i.e. hard-spaces). This means that these files can be accessed as normal.

A debt of Gratitude is owed to Martin Sperl and Mike Martin who wrote the
original Filetypes/CD_Type program on which this is based.


Opaque Files:
In the mad mad world of Apples, 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 CDs as separate files, with the same names. They are differentiated by the resource fork 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. Typically this means you can only get to the resources for a file, and not the data itself (in fact it can be the other way round, but either way is useless).

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

I wrote this application so as to allow MovieFS to run transparently from CD. Versions of MovieFS (from Warm Silence Software) now automatically detect the dual files and use them transparently.

Contact Addresses:
I can be contacted by email to robin.watts@wss.co.uk or by post via the RISC User office. Mark such post for the attention of the disc editor.

Martin Sperl (who wrote the original !Filetypes) can be contacted at:

Martin Sperl,
Nattergasse 12/32
A-1170 Vienna
Austria
Fido: 2:313/16.6
Email: Sperl@Astro1.auniw.ac.at

Copyright  Robin Watts, 1999