[Coco] Bike Shedding new SDC OS-9 Commands
Gene Heskett
gheskett at wdtv.com
Fri Nov 14 05:36:58 EST 2014
On Friday 14 November 2014 01:19:35 Kip Koon did opine
And Gene did reply:
> Hi Guys!
> How about a command to format large format dsk files with hard drive
> sizes as well. I can see a need to specify the needed capacity as
> well and let the command figure out the number of tracks and sides
> which it could print out during its execution. What do you think?
>
> Kip Koon
> computerdoc at sc.rr.com
> http://www.cocopedia.com/wiki/index.php/Kip_Koon
That capability was already done quite some time ago, Kip. Read the docs
and read through the source file for the superdesc(riptors)
There is a bit in the individual descriptor that controls how format
behaves. If it is clear, format queries the drive for its size and
formats the whole drive, if it is set, it uses the descriptor values and
formats only that much of the drive. I have forgotten which bit controls
that behavior, but its part of the magic that lets me format just the 630
sectors of a large(for the coco) hard drive that represents the hdbdos
vdisk that the offsets, and the stp value*630 in the descriptor point to.
For comparisons, some dmode output maestro!
{t2|08}/X0/NITROS9/6309L3/MODULES/KERNEL:dmode /s1
nam=S1 mgr=RBF ddr=rbsuper
hpn=07 hpa=FF74 drv=01 stp=00 typ=91 dns=01 cyl=007F sid=40
vfy=01 sct=0020 t0s=0020 ilv=01 sas=08 wpc=00 ofs=0000 rwc=
{t2|08}/X0/NITROS9/6309L3/MODULES/KERNEL: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=
2 things of note, the differences in the wpc, and ofs for each.
For the /sh, those wpc/ofs values are the lba of the beginning of hdbdos's
first 256 virtual drives. So /sh is a virtual 35 track, ss, 18 sectors per
track, indistinguishable from a real floppy of that size. Those are
zeroed for /s1 as its the whole 1 Gigabyte drive, formatted in this case
with a cluster size of $10, or 16, meaning each bit in the restricted to
64k allocation map represents 16 sectors of the hard drive.
/dd OTOH, is not that whole drive although both drives are 1Gb seagate
hawks.
{t2|08}/X0/NITROS9/6309L3/MODULES/KERNEL:dmode /dd
nam=DD mgr=RBF ddr=rbsuper
hpn=07 hpa=FF74 drv=00 stp=00 typ=85 dns=00 cyl=1FB7 sid=06
vfy=00 sct=0028 t0s=0028 ilv=00 sas=20 wpc=00 ofs=0000 rwc=
Here, only about 500 megabytes is formatted as one drive for os9, which
just barely remains at a 4 sector cluster size. The remainder of the disk
is then available for a series of hdbdos 256 disk "banks" of disks. One
could theoretically do that 8 or 9 times on this same drive with
additional descriptors (or pokes in basic to those 3 bytes at
$d9something) in the rsdos/rsbasic mode to do the same thing) before the
drive itself was full of 35Trk,ss floppy images. Even if I copied every
disk I have, I wouldn't be able to fill it up. But a lot of the disks I
do have, are 84 trk ds floppies, with about a 780k capacity because they
were made in old full height tandon drives that could step in to the 85th
track before the head hit the spindle. So, I could setup an hdbdos
nitros9ified, set of 80 trackers for all my 3.5" disks, and yet another
bank of 84 trk ds drives above that. HDBDOS can't do that that I know of,
but nitros9 can. setup an /si descriptor for the 80 trackers, and an /sj
descriptor for the 84 track ds images. They would be copies of the sh.dd
descriptor, renamed to si or sj internally, built into your os9boot after
determining the correct values for the wpc/ofs in the descriptor for this
scheme. So in my case, I would put 0x20, 0x3190 into wpc and ofs, which
would be the beginning of a group of 256 each 80 track images. Then add
to that, the amount of drive those images occupy. Then setup sj.dd with
the resultant hex values.
We don't do partition tables on the drive like bigger stuff does, but this
is how we do "partition tables" in nitros9.
With nitros9, the ideas of how to do this are limited only by our
imagination.
The offsets shown in the /sh descriptor are in fact the LBA address for
the beginning of the hdbdos vdisk (drive0), on that same physical drive.
In this manner we can use as much of an sdcard as we have room for in a 3
byte offset, or 4,294,967,040 bytes, so regardless of how we arrange it,
we can only use the first 4,294,967,040 bytes of an 8Gb card because os9
is out of LBA addressing space in that 3 byte offset. Because of that we
may as well see if we could find 8Gb cards and figure on only using the
first 4Gb of them, because internally that gives the card the ability to
bad sector replace every sector we use before declaring the card DITW
(dead in the water) as it can no longer simulate a 100% good card.
How's that for a warm fuzzy?
What we would really need, would be a utility that can query the card and
report how many bad sector replacements have been done so that we would
have a chance to predict the end of life and copy it to a fresh one. Such
a utility might just be handier than bottled beer and sliced bread
combined!
> -----Original Message-----
> From: Coco [mailto:coco-bounces at maltedmedia.com] On Behalf Of tim
> lindner Sent: Wednesday, November 12, 2014 11:00 PM
> To: CoCoList for Color Computer Enthusiasts
> Subject: [Coco] Bike Shedding new SDC OS-9 Commands
>
> http://en.wikipedia.org/wiki/Parkinson's_law_of_triviality
>
> Darren said he had one person offer to make OS-9 commands, but it would
> have to wait after a project. So I decided to offer up my services as
> well.
>
> What should they be named? How should they work?
>
> I propose:
>
> sdir
>
> A command with no parameters that prints out a list of disk images
> available on the SDC.
>
> sdrive n name
>
> A command with two parameters:
>
> n - 0 or 1 - the drive number to attach a new disk image
>
> name - The 8.3 file name to attach.
>
> sformat [SDF] tracks sides
>
> Optional SDF parameter to invoke creating an SDF image, otherwise a
> normal disk image is created.
> tracks - the number of tracks
> sides - the number of sides
>
> [I guess it'll have to do a logical format as well]
>
> seject 0/1
>
> Eject a disk image from slot 0 or 1
>
> sconfig
>
> No parameters. Prints out the current images attached to the slots.
>
> --
> --
> tim lindner
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>
US V Castleman, SCOTUS, Mar 2014 is grounds for Impeaching SCOTUS
More information about the Coco
mailing list