[Coco] New trick for nitros9 users
gene heskett
gheskett at wdtv.com
Mon Jan 10 13:59:07 EST 2011
Greetings all nitros9 users;
I cannot write a dsk image on this machine as the FDC in it doesn't know
what to do with a 256 byte/sector disk, so I must find another way to take
the code snapshots to my coco. As a linux user, and having a few serial
ports available, I can run minicom here and effectively have a text
terminal here, connected to /t2 on the coco.
To make use of this trick, a 2nd hard drive is needed, I used an elderly
quantum P40S set as address 1 on the scsi bus as it will need 2 hard drives
to pull this off. And of course you will need superdriver-2.1 or drivers
that work like that does.
I had sent the dw3 .dsks to the coco by first running rz on the coco, then
doing a ctl_+a, z, s in minicom and selected the dw3 images to send, which
went with no errors in about 16 minutes an image.
Then I got to thinking about how the partitioning of a drive works on the
coco when using the superdriver2.1 drivers and wondered if it would be
possible to access these .dsk images directly without ever making a floppy
from them, and I couldn't see a reason why not. So I plugged the quantum
drive in, and realizing I needed a fully contiguous copy of that dsk to
pull it off, I set the /S1 descriptor's sas=ff, as high as it would go,
which on a nearly empty drive, should result in the allocation being made
far enough into the drive to be contiguous when I copied it from /dd to
/s1. That worked, and while filext said there were 2 FD.SEG's used, there
were no breaks in the file itself.
Another gotcha is that for some reason, the makefiles are writing a bogus
DD.TOT in these .dsk images, so once it is written in one piece, use ded to
fix the first 3 bytes, which are written as $004800, indicating that floppy
is a nearly 5 megabyte capacity floppy, and fix it to be a std 2880 sector
720k disks DD.TOT.
Then, using filext to determine where the file starts on the disk, like
this:
t2|07}/DD/NITROS9/3.2.9:filext /s1
FILES and disk locations in directory /s1
Filename FDsctr LSN sectors LSN Sectors LSN sectors
----------------------------- ------ ----------- ----------- -----------
nos96309l2_dw3.dsk 00023A 001000 0800 001800 008E
So the file starts at sector $1000.
But /s1 is a deblocking descriptor, but the values for wpc and ofs in the
/s1 descriptor are in the drives native sector (512 bytes/sector) counts,
not in os9 counts.
So next:
{t2|07}/DD/NITROS9/3.2.9:dmode /s1 wpc=00 ofs=0800
where the $0800 is half the $1000 that filext reports.
Now:
{t2|07}/DD/NITROS9/3.2.9:free /s1
"NitrOS-9/6309 Level 2" created on: 2010/12/28
Capacity: 2,880 sectors (1-sector clusters)
16,242 free sectors, largest block 16,242 sectors
So it worked, I can cd to /s1, do a dir -e on it, and run a dsave to make
the install script that will copy it back to /dd, which is a 1Gb seagate
drive. That has now been run, dw3 stuff has been made available so I can
build new boots with it and continue the conversion to drivewire, and the
rest of the drive has not been effected, clearing the ofs value restores it
to its full 40 meg capacity and it still gets a clean bill from dcheck.
And I did it in 10% of the time it would have taken to make a floppy & copy
it back with dsave as I think I have a squirrelly controller that makes it
fail to seek properly when writing. I am not getting good disks after
track 0 now for some reason.
What's not to like? Said with a VBWG. ;-)
Your magic trick for this day folks. Enjoy.
--
Cheers, Gene
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Perilous to all of us are the devices of an art deeper than we ourselves
possess.
-- Gandalf the Grey [J.R.R. Tolkien, "Lord of the Rings"]
More information about the Coco
mailing list