[Coco] Drivewire for Dummies - Part 4 - DRIVE #n vs. DRIVE n

Robert Hermanek rhermanek at centurytel.net
Fri Mar 23 11:07:58 EDT 2012


When it comes to daily usage, the most initially confusing thing about drivewire I think is all this talk of "devices" versus "disks," and sometimes other terms are used.  I'm not really sure what the best approach is to clarify this, but I'll take a shot at it...

First, it is unfortunate perhaps that we did not choose a different file extension for files that are collections of images, as opposed to a single image.  If you have a .DSK file that contains a single image, this is what you will have (in terms of DECB)

35 tracks X 18 sectors X 256 bytes per sector = 161,280 bytes, or approximately a 160k file.

For the purposes of drivewire however, when you mount a .DSK file as DRIVE #0 for example (in the slot for device 0), this .DSK file is actually a collection of images, and as I mentioned before, perhaps we should have chosen a different file extension such as ".DEV" for "device" or "DWD" for drivewire disks (or something.)  Regardless, this file is simple, and is just virtual disk images lined up one after another.  The server application figures out what offset is necessary to find the right data.  

An example:  Let's say you mount file "MyUtils.DSK" in slot 0 on drivewire server, and "MyGames.DSK" in slot 1 on drivewire server.  Then the following HDB-DOS commands on your coco will perform these functions:

DRIVE #0 
    -- selects MyUtils.DSK

DRIVE 0 
    -- will access first 160k disk, data starting at byte 1 through byte 161,280.

DRIVE 1 
    -- will access second disk, data starting at byte 161,281 through byte 322,560

DRIVE 2 
    -- will access third disk, data starting at byte 322,561 through byte 483,840

To access your games...

DRIVE #1
    -- selects MyGames.DSK

Now, the DRIVE 0 command mentioned above will not give you access to the first disk on your Utils collection, but instead the first disk in your Games collection.

In the new Drivewire 4 server applicaiton, it sounds like all these mappings can be changed as needed, but for this discussion I'm just assuming that DRIVE 0 through DRIVE 255 on the coco are mapped in the same order into a corresponding file on the server side.

This is basically all you need to know about drivewire to access data from your PC... When I have a little more time, I'll try to list the commands for some of the more common things people do with Drivewire.



More information about the Coco mailing list