-
Notifications
You must be signed in to change notification settings - Fork 3
Using DriveWire 4
Note: This was copied from the original sourceforge wiki and slightly modified.
DriveWire provides many services to your CoCo. These include disk drives that can mount disk image files, serial ports that can be used to communicate over the internet, a real-time clock, MIDI, and printing support.
The DriveWire server can provide any number of instances. Each instance supports one CoCo via one connection, such as a serial link or TCP/IP connection. A single server can run one or many instances at the same time. Each instance has its own set of virtual disks, ports, etc. Instances can be started and stopped using dw commands or using the Instance Manager in the DW4UI.
There are multiple interfaces which can be used to configure and control these services. The most basic tool for these tasks is the OS-9 command dw which comes on a DriveWire bootable NitrOS-9 image and can be found in the DriveWire CVS repository in source form. If you prefer to manage DriveWire from a PC, you can use the DriveWire 4 User Interface, a GUI that runs on modern computers.
When you insert a disk into one of DriveWire's drives, the contents of the source image are read into a buffer. All reads and writes done from the CoCo operate on the buffer contents, not directly on the source. This is similar to how applications such as word processors work: you load a file into the word processor and make changes to an in-memory copy of the document.
Similar to a word processor's "auto save" function, DriveWire will periodically write any changes made to the buffer back to the source in some situations. You can load a disk image from a wide variety of sources, and some are not writable or do not support random access operations. If DriveWire cannot do random access writes to the source, you will have to use the dw disk write or the equivalent "Write to.." function in the GUI to save any changes you make to the buffer. The "Write to.." function writes the entire buffer and so can support sources that are not randomly writable such as WebDAV and FTP servers.
This diagram displays how the various disk settings affect the operation of the buffers. These settings can be specified using the GUI, using various dw disk commands, or stored along with a source path in a disk set.
The dw utility runs in OS-9 and can be found on the latest NitrOS-9 disks for DriveWire. The subcommands and options available in dw provide many informational displays and give you a way to configure every aspect of DriveWire operation right from your CoCo.
You can also issue any dw command from the DW4UI GUI using the command box at the bottom of the main form.
All subcommands and options to dw may be abbreviated to their shortest unique form. For example, the command dw server show threads can be given as dw s s t.
For quick help on what subcommands are available, type dw by itself. For help on an individual subcommand, type dw <subcommand>, for instance dw disk.
HDBDOS for DriveWire allows access to DriveWire disks under DECB.
In DriveWire 3, DriveWire disks 0–3 are treated as a virtual hard drive containing 256 disk images. You can communicate with only one of these virtual hard drives at a time, switching between them using the command DRIVE #x. Within these large files you access the 256 individual disks with the standard DRIVE command.
DriveWire 4 defaults to identical behavior.
DW3/Default mode:
DriveWire 3 and HDBDOS together made some tasks difficult, like copying data between two different .dsk files. To make these tasks easier, DriveWire 4 has an alternate mode that can be enabled by specifying:
<HDBDOSMode>true</HDBDOSMode>inside any instance section or diskset definition. You can also toggle this mode on and off using the DriveWire user interface.
HDBDOSMode uses the sector number contained in each request sent from HDBDOS, not the drive number, to determine which .dsk file to access. This gives a one-to-one mapping between disks on the CoCo and disks in DriveWire. The DRIVE # command has no effect when DriveWire is in this mode.
HDBDOSMode:
HDBDOS allows you to access real floppy drives using the DRIVE OFF command. This allows access to real drives 0–3 and still provides DriveWire drives 4–255.
To copy a real floppy in drive 0 to a DriveWire disk in drive 4:
BACKUP 0 To 4
To write a .dsk image to a real floppy:
BACKUP 4 To 0
Existing 'hard disk' images containing 256 floppies in a single file can still be used in DriveWire 4. HDBDOS mode combined with sector offsets allows:
- Copying between disk images
- Mounting single disks from multi-disk images
- Mixing single-disk images with multi-disk images
Offsets let you access partitions or rearrange disks without HDBDOS enforcing size limits.
Options in config.xml under <Instance>:
<NamedObjectDir>E:\cocodisks\named</NamedObjectDir>
<NamedObjectSyncFromSource>true</NamedObjectSyncFromSource>
<CommandShortHelp>false</CommandShortHelp>
<DiskPadPartialSectors>true</DiskPadPartialSectors>-
NamedObjectDirsets the path for named object mount requests. -
NamedObjectSyncFromSourcereloads objects when changes are detected. -
CommandShortHelpreduces extra help output. -
DiskPadPartialSectorspads files to a multiple of 256 bytes for CoCoBoot.
DriveWire 4 uses the Apache Commons VFS libraries to access disk images. Supported sources:
- HTTP, FTP, SFTP, CIFS, WebDAV
- Local files
- ZIP, gzip, tar, and other archives
Paths use URI syntax; replace ! with * inside archives.
Examples:
dw disk insert 3 tgz:http://aaronwolfe.com/coco/dw4_beta_1.3.tar.gz*/dw4beta/disks/extras.dsk
dw disk write 3 ftp://maltedmedia.com/incoming/test_please_delete.dsk
Random-access files (local/LAN) are automatically synced using lazy writes. Remote locations generally require dw disk write to save changes. Use dw disk show # or dw server show to inspect disk types and dirty sectors.
The dw server list and dw server dir commands support the same paths as dw disk. Redirecting output to a local file can download files from remote sources.
Examples:
dw server dir tgz:http://aaronwolfe.com/coco/dw4_beta_1.3.tar.gz*/dw4beta/disks
dw server list ftp://www.rtsi.com/OS9/OS9_6X09/GAMES/cave.lzh > /dd/games/cave.lzh
Command abbreviations: dw d i 3 = dw disk insert 3.
DriveWire 4 supports many TCP ports. Avoid ports <1024 unless necessary.
UIPort (default 6800) is used for communication with UI clients:
<UIEnabled>true</UIEnabled>
<UIPort>6800</UIPort>Used when device type is tcp:
<DeviceType>tcp</DeviceType>
<TCPDevicePort>6799</TCPDevicePort>Used when device type is tcpclient:
<DeviceType>tcpclient</DeviceType>
<TCPClientPort>10001</TCPClientPort>
<TCPClientHost>some.host.com</TCPClientHost>Used for headless NitrOS-9 disks:
<TermPort>6801</TermPort>Use inetd to run internet services like shells, BBS, or web servers on your CoCo. Configure SYS/inetd.conf:
server_options,program,parameters
Optional flags:
-
telnet— process telnet control characters -
banner— show a banner before connection -
protect— use IP/geolocation blocking
Example line to provide a shell on port 6809:
6809 telnet auth protect banner,shell,
Printer configuration in config.xml:
<Printer category="printing">
<Driver list="TEXT,FX80" type="list">FX80</Driver>
<OutputDir type="directory"/>
<OutputFile type="file"/>
<FlushCommand type="string"/>
<CharacterFile type="file">default.chars</CharacterFile>
<Columns max="132" min="1" type="int">80</Columns>
<Lines max="132" min="1" type="int">66</Lines>
<DPI max="1200" min="50" type="int">300</DPI>
<ImageFormat list="JPG,GIF,PNG,BMP" type="list">PNG</ImageFormat>
</Printer>-
Driver=TEXTwrites raw CoCo output to a file -
Driver=FX80emulates Epson FX-80 and produces image files -
OutputDircreates new files per print job/page -
OutputFilewrites all output to a single file if set -
FlushCommandexecutes a command after each output -
CharacterFile,Columns,Lines,DPI,ImageFormatcontrol FX80 output
FTDI adapters can be ~20% slower than other serial ports. To improve performance, change the "receive buffer latency timer" to 4 ms in Windows Device Manager (default 16 ms).