source: xtideuniversalbios/wiki/SerialDrives.wiki @ 306

Last change on this file since 306 was 306, checked in by gregli@…, 10 years ago

Early draft of serial support documentation, seeing how this Wiki thing works.

File size: 8.5 KB
Line 
1#summary Instructions for emulating Serial Drives with the XTIDE Universal BIOS
2#labels Featured,Phase-Deploy
3*Table of Contents*
4<wiki:toc max_depth="3" />
5----
6= Introduction =
7
8With version 2, the XTIDE Universal BIOS can emulate floppy and hard disks over a serial connection.  By doing so, aging hardware can be bootstrapped from a floppy image, or even run without a physical hard disk.  No special hardware is required, the BIOS can work with any standard COM port that is installed on the machine.  And with high speed COM ports, performance can approach the performance of vintage hard disks.
9
10== System Requirements ==
11
12To use this feature, you will need:
13   
14* Client PC
15  Standard or High Speed COM Port
16  XTIDE Universal BIOS option ROM installed
17
18* Server PC
19  Standard or High Speed COM Port (USB add-ons serial ports work great)
20  Windows XP or later (In the future, support for additional platforms may be added)
21  Flat Disk Images of floppy disks or hard disks
22  Command line SerDrive server utility, included with the XTIDE Universal BIOS distribution
23
24* [http://en.wikipedia.org/wiki/Null_modem Null Modem cable] between the two machines
25
26== Getting Started ==
27
281. Connect the two machines via the serial connection.
29
302. Open a command prompt, and run the SerDrive utility on the server.  Arguments are described below.  In its simplest form:
31    C:/> SerDrive MyImage.img
32   If you do not already have an image, you can obtain boot floppies of FreeDOS from.
33   SerDrive will use the first available COM port by default, at a speed of 9600 baud (which is reliable, but relatively slow, you will likely want to increase this for continued use).
34
353. Boot the client computer.  During drive detection, hold down the Alt key, and at the end of drive detection, the BIOS will display “Serial Master on COM Detect”.  The BIOS will now scan the available COM ports on the client, looking for a server.
36
37If a server is found, the floppy and/or hard disk emulated will appear in the boot menu for the BIOS.  You can now proceed as normal.
38
39SerDrive is stateless, and flushes writes to the image files immediately.  You can start and stop the server at will, although this is not recommended.   If the server is stopped and a disk access is attempted by the client, that request will result in an error on the client.  Also, changing the image file without also rebooting the client may result in unexpected behavior and possible data loss.
40
41= Performance =
42
43= Configuring with XTIDECFG =
44
45Holding down the Alt key is a bootstrapping feature, which is always available.  In addition, xtidecfg can be used to configure the BIOS to always look on a particular COM port for a server, or to automatically scan on each boot (as if the Alt key had been pressed).
46
47Note that serial ports must be the last configured IDE controller.  Xtidecfg will move any serial ports to the end of the list if this is not already done.  This is done so that serial floppy disks, if any are presented, will be last on the list of drives.
48
49= SerDrive Command Line Arguments =
50
51Usage: SerDrive [options] imagefile [[slave-options] slave-imagefile]
52
53  -g [cyl:head:sect]  Geometry in cylinders, sectors per cylinder, and heads
54                      -g also implies CHS addressing mode (default is LBA28)
55
56  -n [megabytes]      Create new disk with given size or use -g geometry
57                      Maximum size is 137438 MB (LBA28 limit)
58                      Floppy images can also be created, such as "360K"
59                      (default is a 32 MB disk, with CHS geometry 65:16:63)
60
61  -p [pipename]       Named Pipe mode for emulators
62                      (must begin with "\\", default is "\\.\pipe\xtide")
63
64  -c COMPortNumber    COM Port to use (default is first found)
65                      Available COM ports on this system are:
66                          (none)
67
68  -b BaudRate         Baud rate to use on the COM port, with client machine
69                      rate multiplier in effect:
70                          None:  2400,  4800,  9600,  28.8K,  57.6K, 115.2K
71                          2x:    4800,  9600, 19200,  57.6K, 115.2K, 230.4K
72                          4x:    9600, 19200, 38400, 115.2K, 230.4K, 460.8K
73                          and for completeness:               76.8K, 153.6K
74                      (default is 9600, 115.2K when in named pipe mode)
75
76  -t                  Disable timeout, useful for long delays when debugging
77
78  -r                  Read Only disk, do not allow writes
79
80  -v [level]          Reporting level 1-6, with increasing information
81
82On the client computer, a serial port can be configured for use as a hard disk
83with xtidecfg.com.  Or one can hold down the ALT key at the end of the normal
84IDE hard disk scan and the XTIDE Universal BIOS will scan COM1-7, at each of
85the six speeds given above for BaudRate.  Note that hardware rate multipliers
86must be taken into account on the server end, but are invisible on the client.
87
88Floppy images may also be used.  Image size must be exactly the same size
89as a 2.88MB, 1.44MB, 1.2MB, 720KB, 360KB, 320KB, 180KB, or 160KB disk.
90Floppy images must be the last disks discovered by the BIOS, and only
91two floppy drives are supported by the BIOS at a time.
92
93= High Speed Operation =
94
95Normal COM ports top out their speed somewhere between the reliable 9600 baud and the unreliable theoretical maximum of 115.2K baud.  This includes COM ports that are included on the motherboard of even modern PCs.  COM ports with FIFOs can usually achieve the 115.2K speed.  In addition, High Speed COM ports were introduced with a clock multiplier, resulting in top speeds of 230.4K and 460.8K.  Many USB COM ports on the market can achieve 500K or higher speeds.
96
97The BIOS supports speeds up to 460.8K baud.  To achieve this speed, you will need:
98
99* COM port on the client machine capable of high speed operation.  Believe it or not, one can still buy new ISA High Speed COM ports that accomplish this, that can even be used in old 8-bit machines.  Serial cards that have been tested:
100
101 In addition, the XTIDE mk II has a high speed COM port installed for this purpose.
102
103* COM port on the server machine capable of high speed operation.  Most motherboard based COM ports can NOT attain high speed.  However, most USB COM ports can attain high speed.  USB serial ports that have been tested:
104
105Care must be taken when configuring the serial connection - the clock multiplier is not detectable by the client PC.  With a 4x clock multiplier, the client PC should be set to 115.2K baud, while the matching server needs to be set to 460.8K baud.
106
107= Disk Image Format =
108
109Disk image files, at this time, are flat hard disk images.  Sectors are laid out on disk, starting with sector 0, and proceeding in LBA order (literally 512-byte sector 0, then 1, then 2, etc.).  No meta-data about the size of the disk or disk geometry is stored in the file. Alo no compression of unused sectors is done.  SerDrive's "-n" switch can be used to create images of the proper size, with all sectors initialized to zeros.
110
111In the future, support for additional disk image formats may be added.
112
113== Image Utilities ==
114
115[http://www.winimage.com/winimage.htm WinImage] is a good tool that can manipulate image files - it can view, inject, and extract files from a file system stored on the image.   
116
117Other possible tools include [http://hp.vector.co.jp/authors/VA013937/editdisk/index_e.html DiskExplorer] and GNU has a set of tools called [http://www.gnu.org/software/mtools Mtools], although I have not seen a good port of those to Win32.
118
119== Emulators ==
120
121Floppy and hard disk image files can be shared between the XTIDE Universal BIOS and other emulators, such as [http://bochs.sourceforge.net Bochs].  One nice feature of this is that bootable images can be created and tested in an emulated enivornment, copmlete with multiple floppy and CD-ROM drives, and then the resulting image can be used with physical hardware through the BIOS.
122
123Bochs was heavily used in the development of the serial code, as its debugger offers control over the emulated system that is hard to accomplish on actual hardware.  You can run the XTIDE Universal BIOS in Bochs as an installed option ROM, and interface with Bochs' emulate IDE hard disks and serial ports.  To support serial ports, SerDrive's "-p" switch can be used to run over a Win32 named pipe instead of a physical COM port, and Bochs can be set to emulate a COM port over a named pipe.  In addition, it can be set to emulate a specific baud rate from the client (Bochs), using the standard "-b" switch.  The "-t" switch is useful to prevent the server from timing out on operations, if a breakpoint is hit in the BIOS code.
124
Note: See TracBrowser for help on using the repository browser.