[Coco] Virtual disk file formats
Barry Nelson
barry.nelson at amobiledevice.com
Thu Feb 18 12:30:28 EST 2016
I updated the latest VCC image from an older image using NitrOS9 3.2.8, I pretty much redid the NitrOS9 section from scratch. First I created a properly sized file:
dd bs=135659520 count=1 if=/dev/zero of=new.vhd
This created a file with 529920 sectors of 256 bytes each. I calculated this based on a hard drive geometry of 90 cylinders x 64 sides x 64 sectors per track for NitrOS9 + 35 cylinders x 1 sides x 18 sectors per track x 256 disk images for BASIC.
(90*64*64)+(35*18*256)=529920
So the file size needed with 256 bytes sectors is:
529920*256=135659520
Next I used dd on my Macintosh to copy over the Extended Basic piece from the old file like so:
dd bs=94371840 skip=1 seek=1 conv=notrunc if=old.vhd of=new.vhd
I calculated 94371840 by multiplying 90 cylinders x 64 sides x 64 sectors per track for NitrOS9 x 256 bytes per sector.
90*64*64*256=94371840
So the command above copied over the BASIC disks while skipping the NitrOS portion, leaving it blank.
Next I booted the old.vhd in NitrOS9 and used the NitrOS9 save command to save the modules emudisk, H0, DD and boot to a floppy. These drivers are not part of the standard NitrOS9 distribution. Then I booted from a NitrOS9 floppy with the new version of the OS, 3.3.0, mounted the disk with the modules in drive 1, and a blank disk in drive 2. I formatted the disk in drive 2, and ran cobbler. This gets around a bug in os9gen. After running cobbler, I deleted the os9boot file off drive 2, leaving a blank disk, except that it now has a boot track on track 34. Then I used os9gen to generate a new os9boot file, which included emudisk and h0. I then copied common utilities to the new disk using dsave, inserted this disk in drive 0 and rebooted.
After rebooting, I was able to use the new os9boot which included the emudisk driver and an H0 descriptor to access the NitrOS9 partition on the vhd. I ran dmode /h0 and checked that the drive geometry matched what I was expecting, then I formatted /h0. After formatting the drive I ran os9gen and built an os9boot file on the new drive, then I merge rel, the boot file I save earlier, and krn into a new boottrack file:
save rel
save krn
merge rel boot krn >newboottrack
I mounted a 35 track floppy on drive 1 and I ran formatted it and the same os9gen on it with these options.
os9gen -t=newboottrack /d1 <bootlist.txt
Where bootlist.txt contained a list of the modules I wanted in my boot. I copied sysgo to /d1, created a /d1/cmds directory, and copied grfdrv, shell, and utilpak1 to /d1/cmds. I don't think all those files were necessary, but I did it anyway.
Then ran dsave, copied more stuff to /h0 then booted into BASIC with HDBDOS and used backup to copy the 35 track boot disk to virtual drive 255.
I think that is everything, though I might have missed something.
Are you sorry you asked? :)
> Salvador Garcia ssalvadorgarcia at netscape.net
> Thu Feb 18 10:45:23 EST 2016
>
> Thanks Dave and Bill,
>
>
> Aside from wanting to learn more about these formats, I am curious as to ho people create these and then put them on Websites so that others can download them and mount them on VCC (or other). For example, a few months ago I downloaded an image recommended by some one here with NitrOS9. I mounted it on VCC as a hard drive. Now when I start VCC I get a menu that allows me to either drop into BASIC or load NitrOS9. That is what started to make me wonder how these images are created (and how it auto run when VCC starts, but that is another topic)-
> ***************************************************************************************************
> I further wanted to know how I could create these images with my own BASIC programs that I can load and run within VCC and further on, with DW4, especially if I do not have any CoCo hardware that I can "rip" to create the images. Thanks again to both! Salvador
More information about the Coco
mailing list