CDC
The Chaos Disk Compactor Version 2.20 By Miles Vignol Released as Shareware, January 1990 Overview: The Chaos Disk Compacter (CDC) is a program that will turn whole disks into files. Why? Well, some uses could be to backup entire disks to your Hard Drive, send an entire disk over a modem, etc. If the ST can read the disk, CDC should be able to compress it. CDC has been designed to work in any resolution, and on any ST computer. Unfortunately, I've only used it on my 1040, so I cannot ensure it'll work on the Mega's, though I don't know why it wouldn't. Running CDC: Simply run the program in any of the normal ways, but the more memory that is available to the program the better. I suggest you run the program with no ACCs in memory, and from the DeskTop -- especially if you are using only 1 drive. Formatting a Disk: To format your Working Drive, click on 'Format Disk' from the Main Menu. The Format Menu allows you to alter the number of Sides and Tracks on the disk and the number of Sectors per Track. Click on 'Format' to begin formatting. Click on 'Cancel' to return to the Main Menu without formatting the disk. After formatting your disk, CDC will display it's statistics and check for a virus. The virus checking method is quite rudementary, but should find most auto-installing virus'. If a virus is detected on the recently formatted disk, then the virus must be active in memory. The best thing to do at this point is to turn off your computer and cold-boot (turn it off for a second or two then turn it back on). Find a nice virus checker and run it on the disk recently formatted by CDC. If it agrees with CDC -- or even if it doesn't -- you should check your other disks or at least the disk you booted from (as it would be the one to initially install the virus in your computer). Displaying Disk Information: Click on 'Disk Info' to display characteristics of the disk in the Working Drive. If the disk is unformatted or a non-ST format, the program will tell you this. Also, CDC checks to see if the disk is set to auto-boot. If the disk is set to auto-boot, you may have a virus. You should probably run a virus checking program on that disk, just to be certain. Keep in mind that the stats shown here are the stats that the ST BIOS will use. Occasionally, these stats will not accurately reflect the information on the disk. For instance, side two could be used to hold data for a program. Since the Operating System doesn't need to know about side two, the disk may say that it's only single sided. If the disk stats don't make sense, like a four-sided floppy with fourty-two sectors on each of its 14,000 tracks, then question marks will appear instead of numbers for all stats save the drive number. The disk is probably not meant to be read by the normal ST BIOS. It could be anything from a Spectre disk, to a data disk for a game. To compress such a disk, single-sided and eighty tracks would probably suffice. After the disk stats are displayed, you can tell the main menu to use the stats as read from the boot sector, click on 'Export These Values' from the disk info menu. This will pass the number of sides and tracks to the disk settings box. Compressing a Disk: Make sure the disk to compact is in the Working Drive. Multiple drive users should make sure that the disk containing the Working File is also present, unless of course it's the same drive as the Working Drive. Set the current function to 'Disk -> File' and set up the disk parameters, then click on 'Go'. The program will then take over, reading from the Working Drive and compressing the data until it's cache is full, then it will attempt to write out the data to the Working File. Single drive users will need to swap disks at this point. The process repeats till the entire disk is read, or the user aborts the process. The compression statistics are displayed as bytes are read. 'Bytes Read' is the number of bytes that have been read in from the Working Drive. 'Bytes Written' is the number of bytes to write to the Working File. 'Compression' is the ratio of Bytes Written to Bytes Read. Lower values are better. The two bars at the bottom of the display reflect the Bytes Read and Written values in graphical means. Decompressing a File: Make sure the Working File present in it's drive. Muliple drive users should also make sure that the Working Drive contains the destination disk, assuming that the Working Drive does not already contain the Working File. Set the current function to 'File -> Disk' and click on 'Go'. The program will then take over, reading from the Working File and decompressing the data until it's cache is full, then it will attempt to write to the Working Drive. Single drive users will need to swap disks at this point. The process then continues till all data has been read, an error occurs, or the user aborts the process. CDC will also decompress Magic Shadow Archiver files. MSA files (as they are known) are somewhat larger than CDC files, and contain limited information about the disk from which they were derived. CDC will recognize the file-type when it attempts to read it. If you wish to decompress an MSA file, simply select it as your working file. MSA files typically have 'MSA' as the filename extension, though the extension is really only for the users' benefit. Aborting the Process: Hitting the Undo key (and holding it down in some cases) will cause the program to pause and ask whether or not you wish to abort. If you do not wish to abort, the program will pick up where it left off. Some errors cause automatic abortion, while other are less fatal. Should an error occur, either an alert box will appear (in which case the error may be able to be corrected) or a simple message will appear, reporting the error and aborting the process. If the message is only a warning, then the program will continue after the message has been displayed. Message boxes will go away after a short period of time, if a key is pressed, or a mouse button is hit. Altering Disk Settings: To change the number of Sides and Tracks to compress, just point and click. The Left Button will increase the value, while the Right Button will decrease it. Holding down the the button will repeat the action. Holding down the button along with Shift, Alternate, or Control will speed up repeat. These are the values to use when compressing a disk. The left value is the minimum and the right value is the maximum. For instance, on loading the program, the these values represent a disk with 1 side and 80 tracks. Obvious limitations exist -- you can't have the maximum value less than the minimum value, there are no three sided floppies, etc. These values are not necessary for decompression, as they are contained in the file. Note that there is no Sectors per Track setting. This is because CDC uses its own disk reading routine to read disks, and figures out how many sectors are present on each track before it is read. Disk -> File -- File -> Disk: The function shown is the function to take place, ie 'Disk -> File' means that the current function is to make the Working File from the disk in the Working Drive, while 'File -> Disk' means that the current function is to make the disk in the Working Drive from the Working File. Clicking on this box will change the current function. Working Drive: Since there can only be two floppies connected to the ST at one time, only drives A and B are available to act as the Working Drive. If you have only one drive hooked up, drive B is disabled and cannot be selected. The Working Drive is the drive to which disks will be compressed to, or the drive from which disks will be read to be compressed. Working File: The Working File is the file to which disks will be compressed to or decompressed from. Clicking on the box will allow you to change the Working File. The default Working File is 'FILENAME.CDC', located in the current folder. For single drive users, select a Working File on Drive A (unless you have a RAMdisk installed). CDC will recognize the if the drives are the same and will have you swap disks when necessary. Note that the filename displayed is only the filename part of the path. Auto-Format and Write Verify: If 'Auto-Format' is set, the program will format each track prior to writing it out. I suggest that unless you're absolutely sure that the disk is the correct format, you leave this option set. While it does speed up the process to turn it off, it could easily cause problems if the program attempts to write ten sectors where there is space for only nine. If 'Write Verify' is set, the program will re-read each track after it writes it to make sure it was written correctly. Write verify is not essential, and could be turned off if speed is more important that data integrity. The chance of an error is very small, but it does exist. Writing is much faster if it's not verified. Both of the above options are only available for decompressing files to disks. They are considered 'set' if hilighted. Compression: For those curious, there are two compression routines currently used by CDC. The first routine is a highly specialized run-length encoding process (called 'Packing' here). Essentially, Packing checks for repeating strings and replaces them with a two byte code. After Packing is done, Squashing takes place. Squashing is a dynamic Lempel-Zev- Welch compression scheme. Packing and Squashing are the same as ARC's Packed and Squashed (or Crunched). CDC file sizes are about equal to ARC'd MSA files. Future Updates: Better reading and writing routines may be implemented if I find them (not that the ones already implemented are bad or anything). Better compression routines may also be implemented in the future. Misc: A big thanks goes out to Hagop Janoyan for suggestions and testing. Also thanks go out to Otto Junior of the O-Mayer V BBS for valuable source codes. This program was writtin 100% in Laser C version 2.1, C code and in-line assembly. Copy and distribute it freely so long as it remains unchanged and this doc file is present. If you find this program usefull, I'd appreciate your comments and/or donations. I've spent a good amount of time working to make it as bug-free and feature-packed as possible, so the least you could do is send me a post-card... History of CDC: 1.00 -- Original version using only a Pack compression scheme. 2.00 -- Completely revamped version using Pack and Squash compression shemes. MSA decoding added. Incompatible with version 1.00. 2.10 -- Fixed bug with compression routines going 'out of bounds' in some instances. 2.20 -- Fixed a bug with the Caching system that caused files to be only partially saved. Send Comments/Donations/Bug Reports to: Miles Vignol 4335 Verdugo Rd. apt #1 Los Angeles, CA 90065 -- USA (yeah, like it's really gonna get that far!) Or call the O-Mayer V BBS (213) 732-0229 or the ST Jungle (213) 254-9534 Leave e-mail to Arioch...
Back to Packer/Depacker