Project catweasel

From www.evillabs.net
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

CatWeasel Mk2 Floppy Controller

The CatWeasel Mk2 Floppy Controller is available from [Individual Computers], and is readily available on the Ebay and Resale markets.

The CatWeasel Mk2 was designed to work only on the Amiga 1200 (via the 'clockport' internal expansion interface), or the Amiga 4000's IDE interface (which, due to a feature of its design, allowed extra hidden IDE control ports to be available as a side-band).


0x1f0-0x1f7 => Pass through to IDE devices

0x3f6 => Pass through to IDE devices

0x3f0-0x3f5 => Controls the CatWeasel Mk2

Interfacing with Linux

Unfortunately, we can't just plug the CastWeasel Mk2 into a PC's IDE port and go. The PATA IDE ports on the 'upper' range of the PC IDE interface are trimmed to only port 0x3f6. Ports 0x3f0-0x3f5 (needed for the CatWeasel interface) are not available.

However, we can use the CatWeasel Mk2 via the IDE port on almost any x86 Linux machine with native PATA IDE ports, with a simple IDE cable modification. By swapping the IDE_CS0 (pin 37) and IDE_CS1 (pin 38) lines, we can make a dedicated PATA IDE cable to talk to the CatWeasel Mk2.

  1. Build a 40-pin IDE cable with a twist on the next to last two lines (37 and 38).
    • This swaps the chip selects (IDE_CS0 and IDE_CS1) for the upper and lower set of registers. In this way, ports 0x1f0-0x1f7 will now actually be sent as ports 0x3f0-0x3f7.
  2. Connect this 'CatWeasel IDE' cable from a PATA motherboard port to the CatWeasel Mk2.
    • NOTE: A USB to IDE adapter will *not* work. You must use a motherboard PATA port!
    • NOTE: The 'index' pin may not removed on the CatWeasel Mk2 IDE connector of some models. Please be careful if you need to remove it.
  3. I have updated the following CatWeasel software:
    • [cw2dmk v4.4-ide] Mk2 via IDE support for Tim Mann's [cw2dmk] tool for preserving TRS-80 disk image.
    • [cw v0.13-ide] Mk2 via IDE support for Karsten Scheibler's [cw] Linux kernel driver and cwtool utility.

I am undecided about Michael Krause's block-level [cwfloppy] driver, as it has no write support for Linux 2.6. It is more likely that I will work on a user-space FUSE block driver that uses the Karsten Scheibler's cwio library as a back end. Not a pressing problem at the moment. It should be a Small Matter of Programming.