1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
|
Rainbow Disk Image Utilities
============================
The files contained in this archive are utilities for creating disk
images from RX50s and regenerating disks from said images. The
utilities are meant to work with MS-DOS version 2.11 or later on an
actual Rainbow 100 personal computer only.
The programs utilize RAW disk image format, which is a byte-by-byte
dump of all data on the disk in increasing track and sector order. The
RX50 disk drive (at least as implemented on the Rainbow 100) is an
80-track drive with 10 sectors/track and 512 bytes/sector. The RAW
image format for a Rainbow would be as follows:
Beginning of file: Track 0 Sector 1
Track 0 Sector 2
...
Track 0 Sector 10
Track 1 Sector 0
...
End of file: Track 79 Sector 10
With each sector containing 512 bytes, a valid RX50 image should be
exactly 409,600 bytes long. If the image file is a different size when
recreating a floppy disk, results are unpredictable.
These utilities make use of Rainbow interrup 0x65 for all
reading/writing. A true Rainbow RX50 floppy has sector skewing
implemented in both MSDOS and CP/M, meaning that physical sectors do not
equal logical sectors. Logical sectors are the way the operating
system(s) access the floppies, whereas the physical sectors represent
the actual layout on the disk. The call to interrupt 0x65 assumes the
calling program wishes to access everything by logical sector. The RAW
image format, however, would actually use physical sectors. The
utilities automagically "unskew" the sectors when creating an image and
"reskew" the sectors when writing the disk.
Logically addressed images can be dealt with as well by using the /L
option with the utilities. This option enables logical addressing. The
benefit of a logically addressed image file is that it may (but not for
sure...) be able to be mounted under operating systems that allow
mounting image files (i.e. GNU/Linux or *BSD).
A summary of the utilities appears below:
iwrite.exe
==========
The iwrite utility is used for regenerating a floppy disk from an
image file. The syntax is:
iwrite F:\path\to\image.img Drive
The Drive should be a single letter specifying an RX50 drive to
write to (A, B, C, or D, where applicable). Formatting the floppies
prior to writing should not be necessary. For example, to write the
image file "dos310b.img" to the B: drive, the following command would be
used:
iwrite dos310b.img B
The /L option can be used if the image file is known to be logically
addressed.
icreate.exe
=========
The icreate utility will create a new image file by reading the
contents of a true RX50 diskette. The syntax is identical to the iwrite
utility:
icreate F:\path\to\image.img Drive
The Drive parameter is a single letter specifying the drive
containing the disk to image (A, B, C, or D, where applicable). The
drive must be a true RX50 drive. For example, to image a disk in the A:
drive and store the result in the file "cpmv20.img", the following
command line would be used:
icreate cpmv20.img A
The /L option can be used to generate a logically addressed image if
desired.
Skewing
=======
As stated ealier, the Rainbow employs a skewing scheme on RX50
diskettes. Tracks 0 and 1 are not skewed (logical sector == physical
sector), whereas all other tracks use the following skew table:
Physical Logical
1 1
2 6
3 2
4 7
5 3
6 8
7 4
8 9
9 5
10 10
I do not personally know the reasons for the above, but the table
works. The table was lifted from the source code of ImpDrive by M.
Warner Losh.
Compatibility
=============
These utilities use a true RAW image format. The iwrite utility has
been tested with and is completely compatible with Will Kranz's
wteledisk utility. Wteledisk can convert Teledisk *.td0 images into RAW
image files. The resulting RAW image file can then be written to an
RX50 using the iwrite utility. The /L option should not be used in
these cases.
Building
========
The utilities were compiled using Borland Turbo C 2.0 on an actual
Rainbow 100. The executables can be generating by running:
make all
The code does not use any Borland extensions, but does rely on the
int86() and segread() functions from dos.h. It should be possible to
compile this code with Microsoft C as well, although the make file
certainly will not work.
Support
=======
Anyone needing support with this utility or encountering bugs with
various images can contact me at jeff@rainbow-100.com. These utilities,
although at version 0.1, are completely capable.
Copyright
=========
The utilities and their source code are copyrighted by Jeff
Armstrong and released under the GNU General Public License version 3.
The real meat of the licensing:
Rainbow Image Utilities
Copyright © 2008 Jeffrey Armstrong <jeff@rainbow-100.com>
http://jeff.rainbow-100.com/
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
The full license is compressed in COPYING.ZIP.
---
Jeff Armstrong
http://jeff.rainbow-100.com/
jeff@rainbow-100.com
January 15, 2009
|