[Coco] rebuild NitrOS9 with superIDE

Christopher Hawks chawks at dls.net
Mon Sep 24 10:44:25 EDT 2012

Retro Canada said the following on 09/24/2012 08:00 AM:
> Hi,
> I have a superIDE and a floppy drive (FD-500). But I don't have a
> multipak. I want to rebuild the NitrOS-9 Boot because the cloud-9
> stock distro comes without any support to 32 columns and the drivers
> needed to run Sierra games and others. So far I split the process in
> two: first using drivewire with the FD-500 plugged and second plugging
> the sIDE.
> I stared generating a floppy through drivewire (copying the missing
> CLOUD9 drivers into it) and using the bootlist as follows in this
> email I generated a 35 track floppy using the following boot track:
> format /d0 1 '35' "NitrOS-9 Boot" r
> merge ../MODULES/BOOTTRACK/rel_32 ../MODULES/BOOTTRACK/boot_ide
> ../MODULES/BOOTTRACK/krn>bttemp
> os9gen /d0 -t=bttemp<../BOOTLISTS/superdriver_ide.bl
> And after using drivewire (with HDB-DOS translation) I can backup from
> the generated floppy into a DSK image on PC and using SIDEWalk I can
> copy this DSK in to the CF virtual drive 255. Then , plugging the sIDE
> back I run LINK.BAS wich finds correctly the boot track and links the
> disk.
> But when booting from DOS 255, the NitrOS-9 Boot starts in 32-colunmn
> mode but fails after reading all modules.
> What could I be missing ? The floppy does contains an IDE boot track
> and the modules file has the all ide support as well as the
> .../CLOUD9/dd_ide_256mb_CFpart.dd There is only this DD module on it.
> I managed to create a similar DW build in 32 columns (changin of
> course to boot_dw) where I included all the ide support. So booting
> from this drivewire distro I can use the sIDE and play all the Sierra
> games on it but I want to to change the installed CF boot too.
> Am I missing something ? I use the 3.2.9 6809L2 and a 512K coco3.

	It sounds like NOS9 is not able to open the 32 column console (the boot 
process uses it's own routines). I noticed that in your bootlist you have 
term_vdg.dt selected, but, neither of the covdg.io modules. term_vdg requires 
scf and vtio, and vtio requires covdg (or covdg_small).

	Otherwise refer to the attached description of NOS9 boot process. Can you tell 
us what (all) is printed on the screen during boot?? This will point to where 
the error occurred during the boot process.

Christopher R. Hawks
I develop for Linux for a living, I used to develop for DOS. Going from
DOS to Linux is like trading a glider for an F117.
	-- Lawrence Foard
-------------- next part --------------

NitrOS-9 Level 2 Booting and (trouble)Shooting.

by Chris Hawks.  12 May 2006

	One of our local Coco-nuts was having a problem with NitrOS-9 on
his Coco3. It had recently stopped booting NitrOS-9 from HDB-DOS in
his SuperIDE. We got together at the monthly Glenside Color Computer Club
meeting to see if we could resolve the problem. He brought his system
and I brought a sub-set of my system to the meeting. We were the 
'presentation' for that meeting. I booted my system from HDB-DOS and
my SuperIDE adapter with his compactflash card in a compactflash to
IDE adapter as the slave drive. After my systems booted, I looked at
the root directory of his compactflash card. It looked OK to me, but,
he did have some odd files there. I shut down my system and swapped the
compactflash cards.  (His as mastr and mine as slave. The boot process
started and loaded track 34 and the OS9boot and then just stopped. From
the debugging clues posted to the screen during the boot process, I was
able to determine the the boot process was unable to find the 'sysgo'
module. I re-booted with my compactflash as master and his as slave,
and copied 'sysgo' from my root directory to his. We swapped the
compactflash cards once again and his compact flash was able to boot!

	I was asked to write-up our adventure as a article for the GCCC
newsletter (Coco 1 2 3). I had not been able to find any information on
debugging the boot process in NitrOS-9 (except from the source code) so
here it is.

	The modules 'rel', 'boot', and 'krn' are loaded into memory from
track 34 by the 'dos' command. 'Rel' ensures that it is located in the
correct part of memory, sets up some of the hardware, clears the screen,
and installs the debugging 'print' routine. It prints 'NITROS9 BOOT' in
the center of the screen and jumps to the execution address of the
module 'krn'.

	The module 'krn' uses the debug 'print' routine to put a 'K' on the
startup screen. It validates the modules in memory ('rel', boot, and
'krn') which prints their names on the startup screen and makes a system
call (F$Boot) which puts a 't' on the startup screen and links the module
'boot'. It puts a 'b' on the startup screen and calls 'boot'. 'Boot' reads
LSN0 to find OS9boot and puts a '0' on the startup screen. 'Boot' then
loads OS9boot and puts a '.' on the startup screen for each sector read.
'$F$Boot' validates all modules in OS9boot which prints their names to the
screen, and puts a second 'b' on the startup screen. Next 'krn' links to
the 'init' module and puts 'i' on the startup screen. Following this it
links to and executes 'krnp2' the second part of the kernel.

	'Krnp2' puts a '2' on the startup screen, and puts an 'x' on the
startup screen. Then 'krnp2' tries to 'chd' to the system device named in
'init' (usually '/dd'). Next 'krnp2' puts a 'o' on the startup screen and
tries to open the output console named in 'init' (usually '/term'). 'Krnp2'
checks for 'krnp3' and runs it if available. Then 'krnp2' puts a 'C' on
the startup screen and tries to run the startup module named in init
usually 'sysgo'.

	'Sysgo' opens the output console, prints the NitrOS-9 startup banner
and sets the data and exec directories. 'Sysgo' will execute 'startup' and
'autoexec' if available (unless you hold the 'shift' key) and finally
starts a 'shell' on the console.

	If something goes wrong during the boot, the module will call the
'crash' routine which will put a '*' and single character on the startup
screen.  The '*' indicates that an error occured and the character's ascii
value plus 128 is the error number. For instance '*X' would indicate a
'Path Name Not Found' error. 'X' is ascii 88, and 88 + 128 = 216, the
error code for 'Path Name Not Found'. This is the error we saw when sysgo
was missing from the root directory of the disk.

	So, the start up messages look something like this:
Krel boot krn tb0...................................................
......... bkrnp2 dd d0 rbf rb1773 term w w1 w2 w3 w4 scf cowin clock 
clock2 init i2xoC

	Of course, YMMV (Your Modules May Vary)

	This should give you some insight into what goes on during a NitrOS-9
boot, and berhaps some debugging assistance when something goes wrong.

More information about the Coco mailing list