To do so, I need a little information first.
Below is the mapping scheme of hard sector numbers to DOS 3.3 soft
sector numbers and ProDOS block numbers. ProDOS blocks have an 'a'
and 'b' designation as each block spans two sectors.
HRD DOS PDOS HRD DOS PDOS
--- --- ---- --- --- ----
0 0 0a 8 B 2a
1 7 4a 9 3 6a
2 E 0b A A 2b
3 6 4b B 2 6b
4 D 1a C 9 3a
5 5 5a D 1 3b
6 C 1b E 8 7a
7 4 5b F F 7b
Now, suppose that I have a disk image of a 5.25" 140K disk.
Every 256 sequential bytes represent one virtual sector. How are
those virtual sectors mapped throughout the file? Are they mapped
according to hard sector numbers or DOS 3.3 sector numbers?
That is, does the file resemble
track ##, sector # file-pos (HEX)
start ------------------ 00000
track 00, sector 0
------------------ 00100
track 00, sector 1
------------------ 00200
track 00, sector 2
------------------ 00300
track 00, sector 3
------------------ 00400
[....]
------------------ 22F00
track 34, sector F
end ------------------ 23000
-or-
start ------------------ 00000
track 00, sector 0
------------------ 00100
track 00, sector 7
------------------ 00200
track 00, sector E
------------------ 00300
track 00, sector 6
------------------ 00400
[....]
------------------ 22F00
track 34, sector F
end ------------------ 23000
Thanks for any help that you can offer.
--
Sean Dockery
doc...@griffin.cuc.ab.ca (preferred)
sbdo...@acs.ucalgary.ca (pending expiration)
The sectors in the disk image are mapped as sequential DOS 3.3
sectors, meaning:
Hard ProDOS DOS File
Sector: Block: Sector: Memory:
------- ------- ------- -------
00 0a 00 $000-$0FF
01 4a 07 $700-$7FF
02 0b 0E $E00-$EFF
03 4b 06 $600-$6FF
04 1a 0D $D00-$DFF
and so on...
The program reads in 4K (1 track) of the file at a time, reorders the
pages of data and uses WRITEBLOCK to move them to disk.
The source code is written in Merlin for restoring 5.25" disk images
under ProDOS. It is available to anyone who wants a copy; just speak
up.
I assume you are talking about doing this on an Apple II, and not for
an Apple II emulator running on another computer?
> HRD DOS PDOS HRD DOS PDOS
> --- --- ---- --- --- ----
> 0 0 0a 8 B 2a
> 1 7 4a 9 3 6a
> 2 E 0b A A 2b
> 3 6 4b B 2 6b
> 4 D 1a C 9 3a
> 5 5 5a D 1 3b <- 7a
> 6 C 1b E 8 7a <- 3b
> 7 4 5b F F 7b
[Note the obvious mistake in the table, which I've corrected]
> Now, suppose that I have a disk image of a 5.25" 140K disk.
OK. Generated by which program?
Copy II+ (version 7.x) is one program I know of which can generate
disk images. From a quick look at a 5.25" disk image file created by
Copy II+ 7.4, it looks like it writes the sectors out in physical order
(bytes 0 to 255 are track 0, sector 0, bytes 256 to 511 are track 0,
sector 1, etc.)
Copy II+'s image files use file type $F7, and are 143360 bytes in size
for a 5.25" disk image (i.e. there is no extra data saved in the file).
For other devices, the image files are written in ProDOS block order.
The IIgs program "Replicator" (from EGO systems, publishers of GS+
magazine) can also create disk images. I haven't tried 5.25" images,
but I expect it would use ProDOS block ordering.
There may be other programs that create disk images, and they might
use different sector ordering.
--
David Empson
dem...@swell.actrix.gen.nz
Snail mail: P.O. Box 27-103, Wellington, New Zealand
| I assume you are talking about doing this on an Apple II, and not
| for an Apple II emulator running on another computer?
Yep.
| > HRD DOS PDOS HRD DOS PDOS
| > --- --- ---- --- --- ----
| > 5 5 5a D 1 3b <- 7a
| > 6 C 1b E 8 7a <- 3b
Oops.
| > Suppose that I have a 5.25" disk image.
|
| OK. Generated by which program?
I didn't know at the time. I have found out since then that they were
created with Diversi Copy.
It was for the XINU archives. Unfortunately, GIF documentation has
limited appeal when you have to use IIGIF to read them. :-(
Even more unfortunate is the fact that the source files are in an old
(v1.x!) LISA format (which ran under DOS 3.3). The oldest version of
LISA (v4.x) I could find (which ran under ProDOS) refused to load the
XINU source code files. As LISA uses tokenized opcodes to speed up
assembly, the source code files are unusable to me. :-S
| Copy II+ (version 7.x) is one program I know of which can generate
| disk images. From a quick look at a 5.25" disk image file created by
| Copy II+ 7.4, it looks like it writes the sectors out in physical order
| (bytes 0 to 255 are track 0, sector 0, bytes 256 to 511 are track 0,
| sector 1, etc.)
I wonder if the ordering of sectors depends on either the file system
being worked on, or the file system being being worked under. That
is:
Running under ProDOS 8, does it behave differently when creating
a DOS 3.3 disk image?
Or, alternatively,
Running under DOS 3.3, do it use a DOS 3.3 sector ordering
scheme, and running under ProDOS 8, do it use a ProDOS block
ordering scheme?
| Copy II+'s image files use file type $F7, and are 143360 bytes in size
| for a 5.25" disk image (i.e. there is no extra data saved in the file).
There was no file type; I had to download the file from a UNIX site.
| The IIgs program "Replicator" (from EGO systems, publishers of GS+
| magazine) can also create disk images. I haven't tried 5.25" images,
| but I expect it would use ProDOS block ordering.
Helpful only if you have an Apple IIGS. ;-)
| There may be other programs that create disk images, and they might
| use different sector ordering.
Someone asked me to modify the program to allow the choosing of the
scheme to copy (ie: support both). I figure I might as well add the
feature of creating disk images as well. :-)
| David Empson
| dem...@swell.actrix.gen.nz