view 3rdparty/utils/gene/bootlink.doc @ 2977:2e740da2088e

3rdparty/utils: Add disk with Gene's bootlink and vfy utilities
author Tormod Volden <debian.tormod@gmail.com>
date Sat, 05 Apr 2014 01:01:32 +0200
parents
children
line wrap: on
line source

			bootlink

A utility to facilitate using different boot vdisk images on a hard drive
as the next default vdisk to boot from.

I'm an owner with both the superdriver, and HDB-DOS, the combination of which
seems to be at least as good as sliced bread or bottled beer.
HDB-DOS opens up so many possibilities for os9 that I can't see a good
reason not to have it.

One of the possibilities is being able to use the superdrivers /sh descriptor
to handle 99.9% of the bootup differences you can envision, like booting to
a bootfile composed so as to be a web server, and another one more designed
to develop programs in, and another just to run driverwire, or ultimuseIII,
and the list probably includes all the os9 games ever written for level 2
also.

Generally the default HDB-DOS disk it boots from is disk 128, aka $80 when
set into your /sh.dd descriptor.  Generally it should look similar to this:

{t2|03}/DD/SRC:dmode /sh 

 nam=SH mgr=RBF ddr=rbsuper
 hpn=07 hpa=FF74 drv=07 stp=80 typ=81 dns=08 cyl=0023 sid=01
 vfy=01 sct=0012 t0s=0012 ilv=00 sas=08 wpc=1D ofs=BB90 rwc=

Where the 'stp' value, in hex, is the same as HDB=DOS's disk 128.

Couple of things to note here.

1. dos128 only does one thing that is guaranteed to come from that actual
virtual disk, and that is to load the boottrack from its track 34.

2. Once that is loaded, and the stuff moved around so its located at the
proper place in memory by relXX, then the boot module is entered.  Its
a bit dumb and has no clue about the os9 file system or its directory
stucture.  So it does the next best thing, it goes and reads the first
sector of the drive specified in the last byte of the boot module -4 bytes.
I have not done this, but it follows that one could even get the  OS9Boot
file FROM A DIFFERENT HARD DRIVE if you wanted to.

Anyway, having read the LSN0 of the specified drive, it then looks at the
5 bytes of where the file is in its absolute address on the drive, and how 
big it is.  These are the 3 bytes of offset DD.BT, and the 2 bytes that 
follow which are DD.BSZ, its size.  Then the boot module seeks to the DD.BT 
specified location in the drive, and loads DD.BSZ worth of data, which it
hopes is the OS9Boot file.

Because there is no absolute certainty that it is an os9boot file, my
offering here, bootlink, goes to extraordinary lengths to assure that
the address you pass it as the argument, actually IS an os9 formatted
35 track SS floppy image that was generated by os9gen, and has valid data 
for its DD.BT and DD.BSZ entries and that a file named OS9Boot with an 
$87CD as the first 2 bytes actually exists in this image.  Failing any 
one of those tests results in an error message and an exit without doing 
anythng.

Since you'll want to store some of your game disks, say using the first 
50 HDB-DOS 'disks', in that case you could have 205 (talk about overkill)
different OS9Boot files to choose from just by running "bootlink xxx" or 
$xx, it works with either format of input, and rebooting.  It will get 
the boottrack from the default drive, but then finish the custom boot 
from any drive that has a valid bootable image backed up to it from a 
floppy, best done with the HDB-DOS driveoff:backup0toxxx command.  I 
think I'd wind up with post-it notes all over so I could recall which 
was which, but however you solve the record keeping is up to you.  Some, 
or many of the games will have a custom boottrack, so you will probably 
need to use the link.bas program to run those.  Say you have DoD on 
disk 33, you will probably need to run bootlink 033, reboot, chose H 
after the green screen comes up, and then a "dos33" to run it.

One final note, bootlink absolutely must have a 3 digit input argument.
So it can be in the range of 000-255, or $00-$ff.

I hope this is a useful tool.

Cheers, Gene


A utility to facilitate using different boot vdisk images on a hard drive
as the next default vdisk to boot from.
Copyright (C) 2014  Gene Heskett

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 2
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, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.