OS-9 Level 2 for (updated) Dragons

A place to discuss everything Dragon related that doesn't fall into the other categories.
pser1
Posts: 1853
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: OS-9 Level 2 for (updated) Dragons

Post by pser1 »

Hello,
this is much heavier than I had expected :-(
Anyway, I have traced the boot sequence along a lot of steps without issues:
- REL reallocates boot track code to $ED00 and jumps to the new place
- OS9P1 creates the module directory entries for modules already in memory (Rel, Boot, OS9p1)
- Searches module 'Init' but it doesn't exist in memory
- Tries to call 'Boot'. Finds it in the module directory and switches to it
So far so good, the excellent comments I have found in OS9L2 and NitrOS9L2 have helped me a lot!
But now the code has entered 'Boot', a module without any explanation. I cannot find any source file
for that module :-(
I know that it *must* read sector/track 0 to find the exact place where the file 'OS9Boot' is in the disk
and once found, it has to read/load the whole lot of modules into RAM
I am sure that this step is failing, butI need to know exactly where it fails and the reason why this happens
that's why I would love to have more info about that module ...
The debugging/tracing process is dramatically slow because I use to write down on paper every asm code and the results (registers changed)
basically to be able to compare results starting the Tandy OS9L2 that works flawlessly ... sorry for being of so old school-like but right now I prefer
to advance slowly but being sure I am always going forwards ;-)
If any of you know about a place where I could find the source code for the BOOT module, please let me know!!
thanks in advance
pere
lcurtisboyle
Posts: 31
Joined: Thu Nov 05, 2020 9:47 pm

Re: OS-9 Level 2 for (updated) Dragons

Post by lcurtisboyle »

Boot modules vary by drives hooked up (hard drive, floppy, etc.) so you need to find the one for the floppy controller that the Dragon normally uses. I would think the NitrOS9 GitHub should have those somewheres (for Level 1, anyways, although I don't think there is much difference between a Level 1 boot vs a Level 2 boot). NitrOS9 EOU should include some sample commented Boot source for floppy and/or the CocoSDC. In the current version of EOU, they will be in:
/dd/sourcecode/asm/nitros9/kernel. I think there is even a D64 boot source in there.
pser1
Posts: 1853
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: OS-9 Level 2 for (updated) Dragons

Post by pser1 »

Thanks a lot, L.Curtis
In fact, I am applying Bob Hall's procedure to convert a Level II Tandy OS9 into a Dragonized version ...
I am using the boot track from Tandy (REL+BOOT+OS9p1) but then I overwrite the BOOT module with
the one included in Dragon Data Level 1 v1.2 patched as proposed by Bob.
I could download the source code of OS9P1 very well commented from Tandy and from NitrOS9 and that
has allowed me to trace the execution of REL and OS9p1 'knowing' what they are doing every time they call a
subroutine, but now that I am entering 'Boot' to load the big file (OS9Boot) from disk, I have no comments
at all. I just unassembled it with F9DASM and have added a few comments related to things I 'think' I know
but, despite being a short module, there are plenty of code lines without comment/explanation and I haven't
been able to find a commented Boot file on internet.
I will try to debug/trace it anyway tomorrow ... I know it must read sector zero of the disk and somehow it
must calculate/find the place where OS9Boot begins. After that it should load the whole file into RAM and
return control to OS9p1 just to try again to link the module 'INIT'
I am afraid I am going to have problems with the disk I am using to contain OS9Boot and CMDS ...
I just formatted a double sided disk (368Kb) wiht Tandy OS9L2 and used OS9Gen to create the OS9Boot
using all of the modules Bob Hall has said.
Probably the descriptors D0, D1 and Ddisk could be not compatible with disks 368K ... but I am not sure
about that. Hope to find out the problem along this weekend!
cheers!
lcurtisboyle
Posts: 31
Joined: Thu Nov 05, 2020 9:47 pm

Re: OS-9 Level 2 for (updated) Dragons

Post by lcurtisboyle »

As mentioned, there is commented source for a variety of the Boot Modules (including Dragon 64) included in NitrOS9 EOU. One thing that may really help you is download Kevin Darling's book "Inside OS-9 Level II" from the Color Computer archive - it actually describes how the boot process works and exactly what it is doing. It was an invaluable reference for us when we made NitrOS-9 in the first place.
pser1
Posts: 1853
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: OS-9 Level 2 for (updated) Dragons

Post by pser1 »

Hi, L.Curtis
I already own this book ... amongst 14 more, I will have a read at it ...
The same applies to the NitrOS9 EOU project. Must search for these source files too

By now I have already debugged a great part of the Boot module.
It has read sector #0 from the OS9L2 disk in drive 0 (1 for dragon) and has asked for some space ($43D5 bytes) and, apparently
the OS9 function F$BtMem has found it.
Now I have to trace how this is used, mainly to the point where the OS9Boot file will be read from disk and stored into RAM
I think that this is going to be the part that is failing ... but need to verify that!
Thanks a lot for the pointers!
cheers!
pere
Post Reply