[Coco] .DSK Partition extract/inject tool?
Bill Pierce
ooogalapasooo at aol.com
Tue Sep 24 19:59:07 EDT 2013
Chad, The offsets I was referring to in my question in the other thread were for actual drive partitions between OS9 and RSDOS. Nothing to do with the rsdos disk parttions. This offset allows the user to have a single drive with both rsdos and os9. This is only set by pokeing the 24-bit offset into $D938, $D939, & $D93A in HDBDOS or by setting the "offset" value in the "Drive Parameters" sub-menu in DW4.
Bill Pierce
My Music from the Tandy/Radio Shack Color Computer 2 & 3
https://sites.google.com/site/dabarnstudio/
Co-Webmaster of The TRS-80 Color Computer Archive
http://www.colorcomputerarchive.com/
Co-Contributor, Co-Editor for CocoPedia
http://www.cocopedia.com/wiki/index.php/Main_Page
E-Mail: ooogalapasooo at aol.com
-----Original Message-----
From: Chad H <chadbh74 at hotmail.com>
To: 'CoCoList for Color Computer Enthusiasts' <coco at maltedmedia.com>
Sent: Tue, Sep 24, 2013 7:32 pm
Subject: Re: [Coco] .DSK Partition extract/inject tool?
Now this post concerning offsets has made the most sense out of all I've
read so far... Thanks for the breakdown. From what I read it made it seem
like DW4 asked you to use "Sector" offsets, not "Drive" offsets, which was a
disconcerting notion. I see now that there is a 'point' behind being able
to do 'sector' offsets, like if the disk sizes are not 630 sectors because
of different size/capacity. But we do have the option of going either way
of offset type. Great!
-----Original Message-----
From: coco-bounces at maltedmedia.com [mailto:coco-bounces at maltedmedia.com] On
Behalf Of Aaron Wolfe
Sent: Monday, September 23, 2013 9:44 PM
To: CoCoList for Color Computer Enthusiasts
Subject: Re: [Coco] .DSK Partition extract/inject tool?
On Mon, Sep 23, 2013 at 10:10 PM, Chad H <chadbh74 at hotmail.com> wrote:
> I was just wondering if there existed a tool in any Toolshed or
> elsewhere that made it easy to take a single virtual disk (0-255) out
> of a .DSK partition and inject it into another .DSK partition at a
> specified virtual disk (0-255). Anyone?
>
Well... I don't know if this qualifies as "easy", but you can do it with DW4
:)
It involves offsets, so maybe this will help explain those too.
First, you need to understand "HDBDOS translation mode". This setting is
found under the Tools menu in the GUI and it changes how disk sector
requests are routed to "drives" in DW4.
Historically, HDBDOS uses partitions of 256 disk images as "drives".
This makes sense when talking to a partition on a CF card, but not so much
when talking to disks on a connected DriveWire server since most .dsk images
you will find available on the internet are single disk images, not 256 disk
images. I used to get some form of the question "why doesn't drive 2 work"
or "why does the disk in drive 0 get bigger when I write to drive 1" etc
because people did not expect or understand the way HDBDOS works.
This lead to the addition of "HDBDOS translation" in DW4. When this mode is
enabled, DW4 actually ignores the Drive # parameter completely. Instead, it
routes requests for sectors 0 - 629 to the image in "drive 0" of the DW4
server, 630 - 1259 to drive 1, and so on.
This has the effect of allowing a user to insert arbitrary single disk
images into any of the drives on the server, copy between them without any
special tricks, and overall just acts more like users seem to expect things
to act. It's important to remember though that the server is really not
working as HDBDOS would expect, and it is not possible to use 256 disk
images "normally" in this mode.
You *can* still use 256 disk images however, and this is how you can copy
between individual disk images inside two different 256 disk image files.
The trick is to set your offset correctly so that the
630 sectors corresponding to the disk you wish to access are mapped into the
630 sectors that correspond to the requests that will come from HDBDOS.
It's not actually difficult, though there is a lot of translation happening.
Maybe an example will make things clear(er?):
Example: You have 2 files called big1.dsk and big2.dsk. These are both 256
disk images. You wish to copy disk #6 in big1.dsk to disk #2 in big2.dsk.
Step 1: Insert big1.dsk in DW4 Drive 0. Right click on Drive 0 and
choose "Drive 0 Parameters..". In the parameters dialog, set
"offsetdrv" to 6. (You could also do the math and set "offset" to the
starting sector # for disk 6, but offsetdrv is more convenient when dealing
with 630 sector DOS images.)
Step 2: Insert big2.dsk in DW4 Drive 1. Right click on Drive 1 and choose
"Drive 1 Parameters..". In the parameters dialog, set "offsetdrv" to 2.
In HDBDOS, you can now type DIR 0 and see the contents of Disk 6 from
big1.dsk, or DIR 1 and see the contents of Disk 2 from big2.dsk. You can
copy between these images using normal BASIC commands.
Note that you can also mount different sections of the same image file in
two or more DW4 drives simultaneously if needed. Turning HDBDOS translation
off and doing this just right would allow a single image file to contain
256*256 disk images. It would be quite ridiculous, but possible :)
Hopefully that explains both HDBDOS translation and offsets. Another reason
to use the offset setting would be an image containing both an HDBDOS
partition with DECB disks and an OS9 partition with an RBF filesystem. OS9
expects the RBF filesystem to start at sector 0, so you can use offset to
align that section of the image file and OS9 is happy.
--
Coco mailing list
Coco at maltedmedia.com
http://five.pairlist.net/mailman/listinfo/coco
--
Coco mailing list
Coco at maltedmedia.com
http://five.pairlist.net/mailman/listinfo/coco
More information about the Coco
mailing list