The floppy disk drives manufactured for Commodore 8-bit computers (by Commodore itself and by various third parties) are either single-drive units, or dual-drive units where two disk drives share the same housing and controller. Each unit is assigned a device number from 8 to 15 on the serial bus, and each drive within a unit is assigned the drive number 0 or 1. When issuing disk commands from BASIC or via Commodore DOS, you specify both the device and drive number. For example:
LOAD"1:FERRET",10loads the BASIC program
FERRETfrom drive 1 of device 10.
OPEN 15,8,15,"C1:GNU=0:YAK":CLOSE 15copies the file
YAKon drive 0 of device 8 to the file
GNUon drive 1 of device 8.
Of course, there are certain exceptions—the drive number can usually be omitted, and will default to 0; for some BASIC commands on some machines, the device number can be omitted and will default to 8; and on single-drive units, drive 1 behaves as an alias for drive 0.
Commodore(-compatible) drives are notable for being completely autonomous computers with their own CPU and memory. Would it be possible to reprogram a pair of single-drive units to emulate a dual-drive unit? For example, if I had a Commodore 64 with two single-drive Commodore 1541s, assigned device numbers 8 and 9, and each with drive 0, could I make them behave like a single dual-drive unit with device 8 and drives 0 and 1? To be clear, I am talking about reprogramming the internal drive computers themselves, not adding a wedge to the Commodore 64 that intercepts and reinterprets BASIC disk commands. The reprogramming should be completely transparent to any C64 program, be it BASIC or machine language, that accesses drive 8 using standard commands.
In order for this to work, the custom program running on the 1541 assigned device 8 drive 0 would have to intercept all the commands sent to the device by the Commodore 64, check what drive numbers are specified, and take the appropriate action for commands involving drive 1. In most cases (loading, saving, validating, scratching, etc.) it would need to forward the command to the 1541 assigned device 9 drive 0, wait for it to finish processing the command, check the error status, and then forward this back to the C64. The only two DOS commands that (possibly) allow two different drives to be specified simultaneously,
Copy (for copying files within or across drives) and
Duplicate (for copying an entire disk from one drive to another), would probably need custom code.
The question is, is the approach I've described feasible? In particular,
- Are programs running on the 1541 (or similar single-drive units) even capable of intercepting and reinterpreting standard DOS commands?
- If so, is there enough memory on the 1541 (or similar single-drive units) to do this (including support for the
- Has anyone actually done this before?