
by Ian Gledhill (
)
Note: This is still in development phase. I am not responsible for anything that happens from running this software. I would also very much appreciate any reports of success or failure using any of this software, or any general comments of feature requests!
Note 2: These are drivers are not written by nor supported by Jens Schoenfeld, the creator of the Catweasel hardware. However I would like to offer my thanks to him for his provision of technical documents pertaining to this hardware.
Note 3: If you're using MorphOS, don't forget you need your filesystems installed! 68K versions of FastFileSystem, CrossDOSFileSystem, fs1541 etc. should work, remember to put them into L:!
Instructions for setting up your Catweasel
First, set up your Catweasel Mk4 as directed in the instruction manual. You shouldn't connect the Catweasel to the motherboard floppy interface, this isn't supported yet.
If you will be using SID chips, be absolutely sure that you have jumpered the SID sockets correctly. If you're not using any SID chips, don't worry about them.
The Catweasel should now be connected to your disk drive(s). Your Catweasel can have none, one or two disk drives. As with any other disk interface, unit 0 is the drive after the twist in the floppy cable (some modern cables only have two connectors, with a twist in the middle. This will work fine for unit 0). 3.5" floppy disk drives are jumpered to be unit 1 - putting the drive after the twist sets it to unit 0. If you are connecting a 5.25" drive, be sure that it is set to unit 1 (many drives do not have jumpers - these will almost certainly be wired to be unit 1 anyway). If you are connecting a 3" drive, it will be hard-wired to either unit 0 or unit 1, and the cable will not have a twist, so unit 0 may be unavailable but unit 1 will work.
Once the Catweasel is installed correctly, start up the computer. When the desktop has booted up, decompress the archive to RAM:, and drag the contents of the Catweasel directory to your boot drive (this will be some directories such as "devs" and "utilities").

Once the files are installed, go to your Prefs directory on your boot drive, and run the program called "Catweasel". This will allow you to tell the Catweasel what kind of devices are attached to your Catweasel. It is important that these are set correctly; usually you will want these set to 3.5" High Density drive or 5.25" High Density drive as these are by far the most common types, and are found as standard in IBM compatibles for many years. For almost all cases, you will not need to change the pin 34 function from the default.
You should also set here which SID sockets are occupied.

The hardware attached to the Catweasel
This tells the driver what kind of disk drive is attached for each unit.
Time for drive to step 1 track
This is the time taken for the stepping motor to move the head by one track. If this is set too low, disk operations may be unreliable. If set too high, performance will be lower than necessary. The usual default is 6mS, as this is standard for most drives. Some drives such as 3" Amstrad drives, however, require a longer stepping time. The defaults will normally work.
Function of Pin 34
The default of this will almost always be correct. If your drive misbehaves and thinks disks have been changed for no reason, you could try changing this setting.
Technical info:
Some early drives, notably 3" Amstrad drives and 40 track IBM compatible drives, use pin 34 for a "Ready" signal (RDY) which tells the controller that it is ok to write data (the pin is set logical low when the head is at the correct position and the spindle motor is operating at >85% speed). Other drives usually use pin 34 for a "Disk Change" (DSKCHG) signal, which goes logical low when a disk has been changed since the last access. This signal is updated when the drive is asked to do an operation such as a head step - this is why Amiga disk drives, and indeed, this Catweasel driver, "gronk" the disk drive: causing the head step updates the disk change signal and notifies the controller that a disk has been inserted or removed.
Note that on drives which use pin 34 for a RDY signal, the operating system cannot determine when a disk change has been made; in this case, when using a mounted device, you must execute a diskchange command: for instance (from a shell):
1.RAM Disk:> diskchange OS0:
Enable/Disable SID sockets
Use these cycle gadgets to tell the driver which SID socket has been occupied. This way, if you open unit 0 of catweaselsid.device, you will always get a SID as long as one is installed, whichever socket it is in. Having two SIDs will enable stereo SID support where the application supports this.
Included files

Mounting a device
Devices in AmigaOS and compatible systems are mounted by double-clicking on the icon in SYS:Storage/DOSDrivers for the appropriate device, or by typing "mount
The following mountlists are included in the archive:
Dismounting a device
Devices can be dismounted from a shell by typing (for example):
1.RAM Disk:> dismount SAM0:
Note that the requires support in the filesystem! Many filesystem do not support this; if AmigaDOS returns an error saying "Invalid Packet Request", the file system does not support dismounting.
Running "Assing SAM0: dismount" will dismount the drive from the available devices, but does not close the device. You will therefore continue to hear the disk drives "gronking".
The catweasel.device support task
"catweasel.device", when it is opened, will start a similarly named task which governs disk changes. Every two seconds, the drives will seek (or "gronk") to check for a new disk. If a disk is inserted,
the drive will not seek in this way.
When the device is closed, the support task will quit.
Reading and writing disk images with SuperDiskImage
To read a disk image from disk to a file:
To write a disk image from a file to a disk:
Show Disk Parameters (not implemented yet)
Click on this to see the disk parameters for the currently selected format, i.e. block size, number of blocks, sides etc.
Catweasel format cycler
The formats which can be written will be available in the cycle gadget for the currently selected
unit. If the format you wish to read or write isn't listed, ensure you have the correct unit selected. If the format still doesn't show, check your Catweasel preferences (SYS:Prefs/Catweasel).
Available formats are:
Setting AmigaOS 4 up for protected disks
Using WHDLoad, you can now install protected disks! Most WHDLoad programs assume you're using trackdisk.device, though, as nothing else (until now!) could work! To prepare your system to do this:
Your system is now ready to read copy-protected disks! A side-effect of this is that all trackdisk commands will now be sent to the Catweasel instead of trackdisk!
This may break things, so if you need to stop redirecting trackdisk calls, comment out the line running NSDPatch in your S:Startup-sequence, or the added lines in DEVS:NSDPatch.cfg.
Using WHDLoad
This is the easy part! Just install WHDLoad as usual, downloaded from http://www.whdload.de.
Now download your game installer, and (once you've made sure that DF0: is mounted), run the installer as normal.
Your game should now install exactly as on a real Amiga! If you combine this with RunInUAE You can then run your Amiga game directly from the Workbench!
Using catweasel.device
To maintain compatibility with multidisk.device as used by earlier Catweasels on the Amiga, the same trackdisk commands will work with catweasel.device, and the flags are used in the same way.
To tell the Catweasel which format to use, the device is opened with an identifier in the flags field, as seen in the table above.
catweasel.device is commandset compatible with trackdisk.device, so programs written for the Amiga and which cleanly use trackdisk.device should also work with catweasel.device.
Using catweaselsid.device
"catweaselsid.device" is the interface to the SID chips. It requires catweasel.device to operate. Opening unit 0 will always open a SID, whichever socket it is in. Opening unit 1 will open the second SID chip.
Once the SID chip is opened for access, programming the SID chip is the same as the Windows method of writing data, that is a stream of register followed by value. So, writing a stream in hex of:
00 01 09 13
would set register 0x00 to value 0x01, and register 0x09 to 0x13. In this way the SID can be programmed quickly and easily. Reading from the SID chip is done in a similar way, but the return value is put into the value part,
i.e. reading the above would put the register 0x00 value into where "0x01" is.
08/09/2011 Oops.. wrong codebase...
06/09/2011 Changes to the disk detection..
19/11/2010 Silly bug in SuperDiskImage for MorphOS
18/11/2010 Catweasel.device now works under MorphOS!
03/10/2010 More drive types - now supporting Amiga drives! Be sure to check your preferences as the settings may have changed!
02/10/2010 Bugs fixed in disk detection!
01/10/2010 New version uploaded!
30/09/2010 RAWREAD support for copy-protected disks! Added a little section above on how to do this.
26/09/2010 A donation!
25/09/2010 More bugs fixes and MS-DOS formatting!
24/09/2010 Bugs fixes and MasonIcons added!
23/09/2010 First log entry:
Created this page!
Device Format
TD0: Amiga Double Density 880KB TH0: Amiga High Density 1.76MB PD0: MS-DOS Double Density 720KB PH0: MS-DOS High Density 1.44MB OD0: MS-DOS Double Density (5.25") 360KB OH0: MS-DOS High Density (5.25") 1.2MB OS0: MS-DOS Double Density (5.25") 320KB CBM0: CBM 1541 (C64, VIC-20 etc., (Partial write support, requires cbm1541_fs.lha) SAM0: MGT Sam Coupe (Currently Read Only, requires "samdos_fs.lha") 
ID (Flags) Required Hardware Format Formatted Space 0 Any DS 80 Track 3.5" or 5.25" Amiga Double Density 880KB 1 3.5" High Density Amiga High Density 1.76MB 1.76MB 2 Any DS 3.5" MS-DOS Double Density 720KB 720KB 3 3.5" High Density MS-DOS High Density 1.44MB 1.44MB 9 Any DS 3.5" Apple Macintosh DS varispeed 800KB 800KB 10 Any 3.5" Apple Macintosh DS varispeed 400KB 400KB 15 Any DS 5.25" MS-DOS 40 Track DSDD 8 Sectors 320KB 16 Any 5.25" Commodore 1541 (PET/C64/VIC-20/+4 etc.) 35 Track 190KB 17 5.25" HD MS-DOS 80 Track DSDD 1.2MB 1.2MB 18 Any DS 5.25" MS-DOS 40 Track DSDD 9 Sectors 360KB 19 Any DS 80 Track 5.25" Amiga Double Density 880K 5.25" 880KB 28 Any DS 3.5" 80 Track MGT Sam Coupé 800KB 29 Any 5.25" Texas Instruments TI-99/4(a) 90KB 30 Any 5.25" Atari 810 SSSD 90KB 90KB 31 Any 5.25" Acorn BBC Micro 40 Track SSSD 100KB 100KB 36 Any 80 Track 5.25" Acorn BBC Micro 80 Track SSSD 200KB 200KB 37 Any 3.5" Acorn BBC Micro 40 Track SSSD 100KB 3.5" 100KB 38 Any 3.5" Acorn BBC Micro 80 Track SSSD 200KB 3.5" 200KB 39 Any 3.5" Sinclair Spectrum MGT +D 800KB 800KB 40 Any 3.0" Amstrad CPC / Sinclair Spectrum +3 180KB 41 Any 3.0" Tatung Einstein TC-01/TC-256 200KB 42 Any 3.0" Amstrad PCW 8256/8512 180KB 43 Any DS 3.5" Atari ST DSDD 720KB 720KB 44 Any 3.5" Atari ST SSDD 360KB 360KB 45 Any 5.25" Triumph-Adler Alphatronic PC 360KB 46 Any DS 3.5" MS-DOS Double Density 640KB (8 sector) 640KB
DEVICE trackdisk.device UNIT 0 MAPTODEVICE catweasel.device MAPTOUNIT 0 MACHINE=machinetype
DEVICE trackdisk.device UNIT 1 MAPTODEVICE catweasel.device MAPTOUNIT 1 MACHINE=machinetype
31/03/2012 When is a broken PC disk not broken...?