[Coco] [COCO] Putting NitrOS-9 boot track in ROM

Gene Heskett gheskett at wdtv.com
Mon Feb 2 00:10:02 EST 2015


On Sunday 01 February 2015 23:26:17 Christopher R. Hawks did opine
And Gene did reply:
> On Sun, 1 Feb 2015 21:04:27 -0600
> 
> David Ladd <davidwladd at gmail.com> wrote:
> > Hello everyone,
> > 
> > I thought I would share something with everyone that I have been
> > tinkering with.
> > 
> > Last night I was thinking about NitrOS-9 in ROM, but not the OS9Boot
> > file like the docs normally talk about.  I was actually thinking of
> > putting the boot track for the given device into ROM.
> > 
> > The first reason I thought about doing this is saving the 4608 bytes
> > that is normally locked out of a given volume used for the boot
> > track.  So I figured if I put it into ROM I could gain back that
> > space.  Plus this might make it a bit easier to just link LSN0 to a
> > specific boot file. Here is my test code thus far:
> > ------------------------------*bootrom.asm*
> > 
> >         org     $C000
> > 
> > START   EQU     *
> > 
> >         fcc     "DK"
> >         lbra    ENTRY
> >         fill    $FF,9*256
> > 
> > ENTRY   EQU     *
> > 
> >         ldx     #$2600
> >         ldu     #BOOTTRK
> > 
> > LOOP1   ldd     ,u++
> > 
> >         std     ,x++
> >         cmpu    #BOOTEND
> >         bne     LOOP1
> >         jmp     $2602
> > 
> > BOOTTRK EQU     *
> > 
> >         use     boottrack.asm
> > 
> > BOOTEND EQU     *
> > RMSIZE  EQU     BOOTEND-START
> > 
> >         fill    $39,$2000-RMSIZE
> > 
> > ​
> > ------------------------------
> > Now to create the boottrack.asm file I use the os9 tool from
> > toolshed. Example as follows:
> > os9 dump -a kernel_becker >boottrack.asm
> > 
> > Then you just need to run lwasm on bootrom.asm and it will build the
> > ROM image of the boot track you selected.
> > 
> > Now so far I have tested this with becker, CoCoSDC, EmuDisk, and IDE.
> > Becker, CoCoSDC, and EmuDisk work fine no problems.  So far I
> > couldn't get IDE to work.  I will have to examine the source code for
> > boot_ide.asm to see how it works more closely.
> > 
> > Now the only problem I have ran into thus far is a easy way to update
> > the OS9Boot file on a pre-existing volume without writing a boot
> > track to the volume.  So far os9gen and cobbler both require writing
> > a boot track to the volume.
> > 
> > What I would like to know if anyone has run across a native
> > OS-9/NitrOS-9 utility that will link a file as being the OS9Boot file
> > to the information that would need to be set in LSN0?
> > 
> > Thanks :D

This is precisely what my "bootlink" on my web site, does Chris.
Basically the boot module you choose gets the address of the os9boot file 
from its hard drives LSN0.

So it doesn't have to even live on the same hdbdos disk as the boottrack 
since that address in LSN0 can be anyplace on the drive, including plumb 
out of the os9 formatted portion of the drive.  HDBDOS makes it piece of 
cake easy to have with its offset + vdisk allocation scheme.

The syntax is "bootlink $82" or "bootlink 130" which is the decimal 
version of $82. Bootlink translates according to whether or not the first 
of the 3 chars is a dollar sign.  It goes and gets the effective LSN0 of 
that hdbdos vdisk, seeks to the file and verifies that it is indeed a 
legit os9boot file, and if it is, does the math to dd.bt and dd.siz in the 
real lsn0, writes it into those 5 bytes, so the next time it boots or 
reboots, it will boot using the newly created os9boot file.

I have not done it yet, but what you want to do can (maybe) also be done 
with the B&B utils "ba" and "bd" to clear those track 34 bits in that 
disks FAT.  Hardly worth it since that only gains you 6144 bytes per 
vdisk. bd=Bit Deallocate.  However, I do not know if these utils are 
multiple sector cluster aware.  From what someone else said just this past 
week, the hint seems to indicate they are not.

Anyway, take a gander at it as I believe it can do this job.  Get it from 
my web page at the Genes-os9-stf link.
> > 
> > ​
> > ​
> > +----------+
> > 
> > |David Ladd|
> > 
> > +----------+
> 
> os9gen -q=pathtobootfile
> 
> 
> 
> Christopher R. Hawks
> HAWKSoft


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