Page 1 of 3

OS-9 Level 2 for (updated) Dragons

Posted: Thu May 14, 2026 10:42 pm
by pser1
I am opening this thread to comment with anybody who would like to help ...
The idea is to apply the procedure explained by Bob Hall in the magazines Dragon Update issues 56-57-58-59 and 64 (1989-04,05,06,07,12)
You could download them here:
https://archive.worldofdragon.org/brows ... n%20Update

I do attach a docx by Mike Miller with all the actions to be done to patch some files ...
_Bob_Hall_MMU_OS9LII_Dragon_tabularnetlist.zip
(3.81 MiB) Downloaded 68 times
Bob's proposed goal was to create two discs
- A std Dragon DOS disc that will load the OS9 Bootloader and call REL
- A OS-9 disc with the needed modules either copied or patched

In issue 56 page 6 he indicates that we need to copy some modules from Tandy L2 v2.0.1 (D0), DragonData L1 v1.2 (D1) and Eutrohard L1 v2.0 (D2)
in parenthesis the name I have given to the discs from now on.

From D0 we need: OS9P1, OS9P2, IOMAN, RBF, SCF, INIT, CC3GO, SHELL

The first step I did was to boot with 'D0' on XRoar emulating a CoCo3 512K and mounting an empty disc in drive 1 to format it (named F2)
Once done, I have created a folder "NEWMODS" and inside it I created three more:
"L2","L1" and "L1E" (for Tandy, DData, Eurohard)
Then the easy part of copying the modules (already in memory) to folder L2
So I did:
- load save ; to avoid loading it a lot of times
- chd /d1/NEWMODS/L2 ; to point to the destination folder
- save OS9P1 OS9P1 ; and the same for the other modules
- unlink save ; clean memory
Unfortunately here CC3GO returned an error telling it is busy!
1-CC3GO - module busy Error.jpg
1-CC3GO - module busy Error.jpg (26.66 KiB) Viewed 1940 times
The result was that it created the file at destination, but empty!
2-CC3GO is copied ZERO length.jpg
2-CC3GO is copied ZERO length.jpg (35.9 KiB) Viewed 1940 times
Giving a peek at the loaded modules (mdir e) allows us to see that cc3go has an attribute different from the other modules ...
3-CC3GO has different attribute.jpg
3-CC3GO has different attribute.jpg (39.48 KiB) Viewed 1940 times
Searching in the Tandy disc, I found this module in the folder MODULES
4-CC3GO exists in MODULES folder.jpg
4-CC3GO exists in MODULES folder.jpg (37.79 KiB) Viewed 1940 times
So I just copied it after removing the empty one
- del CC3GO
- copy /d0/MODULES/cc3go CC3GO
5-Final Contents of L2.jpg
5-Final Contents of L2.jpg (36.03 KiB) Viewed 1940 times
The copied file has the same length than the one seen in memory (mdir e)
I asume this is correct, but maybe someone with better OS9 knowledge could confirm or deny this assumption ...

In next step we will be patching a few L2 modules
pere

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

Posted: Mon May 18, 2026 6:39 pm
by pser1
In Dragon Update issue 56 we see that we need to patch two modules from Tandy L2 (D0): CLOCK and REL

- Patching REL will be done in a Basic program "COCOSWITCH.BAS" as recommended by Bob Hall with
POKE&H272D,&H94:POKE&H272E,&HA9:POKE&H272F,&H55

- The CLOCK Module ('clock.50Hz' from Tandy Level II)
The Level Two CLOCK module handles all IRQ interrupts and hence drives the disk timeout, the keyboard scan, and any other interrupts.
The interrupts on the CoCo3 are slightly differently handled to the CoCo2/Dragon — on the CoCo3 it is possible to determine the interrupt
source by reading FF92 directly. The patched version reads FF03 instead and changes some tests. The patches are:

Code: Select all

change 2C from 92 to 03   2D from 9A to 12
       2E from AF to 12   31 from 85 to 12
       32 from 08 to 12   33 from 26 to 2B
       93 from 85 to 12   94 from 37 to 12
       95 from 27 to 2B
      1B0 from B7 to 12  1B1 from FF to 12
      1B2 from 98 to 12
      1E4 from 3C to 3D  1EF from B7 to 12
      1F0 from FF to 12  1F1 from 92 to 12
Impossible, for me, to modify the module already loaded in memory because the changes affect
its operation and the first patch 'hangs' the system :-(

Finally I decided do the work as much as possible on my PC with 'modern' tools. So I copied the clock.50hz into disc F2 (mounted in drive 1)
copy /d0/MODULES/clock.50hz /d1/clock.50hz

Next we need to use IMGTOOL to extract the file in a Windows folder, doing
imgtool get coco_os9_os9 F2.DSK clock.50hz CLOCK50

Now we must disassemble it, I have used F9DASM, where I created a bat file named dos9.bat
f9dasm -os9 -offset %2 -noconv -out %1.asm %1
and called it that way "dos9 CLOCK50"
and we get the CLOCK50.ASM source file
CLOCK50-original.zip
(3.39 KiB) Downloaded 8 times
This file has to be edited manually to introduce the changes proposed by Bob Hall.
I have commented the old code and once done I have saved it as PCLOCK50 (patched)
PCLOCK50.zip
(3.74 KiB) Downloaded 8 times
To compile OS9 files we need to add to the folder where we have the LWASM the file os9defs. I have used os9defs.l2v3
After compiling, I compared CLOCK50-original to PCLOCK50 and found just the changes recommended by Bob Hall, as expected!
0-differences-patches.jpg
0-differences-patches.jpg (22.6 KiB) Viewed 1494 times
The PCLOCK50 binary must be added to the F2 disk. Again, I used IMGTOOL, doing
imgtool put coco_os9_os9 F2.DSK PCLOCK50 clock.50hzP

We need to go to XRoar and start a CoCo3 emulation and run OS9-L2. I put disc D0 in drive 0 and disc F2 in drive 1, then just issue DOS
The first step is to verify the patched file in order to correct its CRC
chd /d1 ; to point to files drive
verify <clock.50hzP >clock.50hzV u
Applying command ident we can compare files ... patched vs verified
1-ident of both files.jpg
1-ident of both files.jpg (26.49 KiB) Viewed 1494 times
Still one step to go. We must change the attributes of clock.50hzV so that it has the same that have all modules (exec and public exec are missing)
Before changing attributes we could see this
2-File Patched and File Verified.jpg
2-File Patched and File Verified.jpg (24.76 KiB) Viewed 1494 times
And after applying this attr command "attr clock.50hzV e pe"
3-After changing attributes.jpg
3-After changing attributes.jpg (24.81 KiB) Viewed 1494 times
Now we have the file clock.50hzV that can be used instead of clock.50hz for the Dragon.
I created folders WORKING and DONE and moved the files there
copy clock.50hz WORKING/clock.50hz
copy clock.50hzP WORKING/clock.50hzP
copy clock.50hzV DONE/clock.50hzV
And finally I copied the verified module with the other L2 modules to be used later
copy clock.50hzV /d1/NEWMODS/L2/clock.50hz
4-once archived in folders.jpg
4-once archived in folders.jpg (21.47 KiB) Viewed 1494 times
Next time we will be patching files from level 1
cheers!
pere

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

Posted: Thu May 21, 2026 10:23 pm
by pser1
We need to patch some modules from Eurohard OS9-L1 v2.0 and Dragon Data OS9L1 v1.2
We will do that starting OS9-Level 1
; ---------------------------------------------------------------------------------
<=> PRINTER (without modifications) from Eurohard goes right to:
/d1/NEWMODS/L1E/Printer
In this case we don't need to correct the CRC, but can verify it doing
IDENT /d1/NEWMODS/L1E/Printer
I am including the source code of that module once unassembled
Printer.zip
(1.27 KiB) Downloaded 6 times
; ---------------------------------------------------------------------------------
<=> The device descriptor patches are as follows (from Eurohard)
- P, TERM, P1, T1, D0, D1 (etc) ----> P1,T1 not found in Eurohard v2.0!! (Taken from DragonData v1.2)
For all of them:
change 0E from FF to 07

- for TERM also
change 0F from C0 to FF and 10 from 00 to C0

- for P also
change 0F from 00 to FF and 10 from 00 to 02

The original and the patched modules have been copied to
/d1/WORKING with names
- P, Term, P1, T1, D0, D1
- PP, TermP, P1P, T1P, D0P, D1P
1-AfterPatching.jpg
1-AfterPatching.jpg (24.02 KiB) Viewed 402 times
Then for each patched module we have corrected the CRC doing
chd /d1/WORKING
load VERIFY
verify <PP > PV U
verify <TermP > TermV U
verify <P1P > P1V U
verify <T1P > T1V U
verify <D0P > D0V U
verify <D1P > D1V U
unlink verify
2-AfterVerifying.jpg
2-AfterVerifying.jpg (25.61 KiB) Viewed 402 times
And also have given them execution permission
load attr
attr PV e pe
attr TermV e pe
attr P1V e pe
attr T1V e pe
attr D0V e pe
attr D1V e pe
unlink attr
3-AfterAttr.jpg
3-AfterAttr.jpg (25.78 KiB) Viewed 402 times
Finally we have copied the verified files to their destination folders
load copy
copy PV ../NEWMODS/L1E/P
copy TermV ../NEWMODS/L1E/Term
copy D0V ../NEWMODS/L1E/D0
copy D1V ../NEWMODS/L1E/D1
copy P1V ../NEWMODS/L1/P1
copy T1V ../NEWMODS/L1/T1
unlink copy

Finally, just to verify our current work status, we issue
dir /d1/NEWMODS/L2 e
dir /d1/NEWMODS/L1 e
dir /d1/NEWMODS/L1E e
; ---------------------------------------------------------------------------------
In order to save as much information as possible for all of these modules, I have included a zip with the unassembled files both from the original disassembled module as well as the source of the patched version
SourceFiles.ZIP
(8.73 KiB) Downloaded 6 times
; ---------------------------------------------------------------------------------
cheers!
pere

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

Posted: Fri May 22, 2026 5:10 pm
by pser1
Hello,
just a question about Bob's comment concerning the device descritors
He wrote "P, TERM, P1, T1, D0, D1 (etc) " ... What other descriptors are 'referred' by the etc?
I started a Tandy OS9Level2 and issued a mdir command, showing this
MDIRxTandyOS9L2.jpg
MDIRxTandyOS9L2.jpg (22.72 KiB) Viewed 386 times
Then I did list modules/Bootlist, with these two pages ...
OS9L2-Bootlist-01.jpg
OS9L2-Bootlist-01.jpg (16.26 KiB) Viewed 386 times
OS9L2-Bootlist-02.jpg
OS9L2-Bootlist-02.jpg (15.43 KiB) Viewed 386 times
Any idea/hint about what other descriptors should we have?
Sooner or later we will need to execute OS9Gen using a text file like Bootlist containing
all of the modules we want to be included in the file OS9Boot in the final OS9L2 disquete (F2)
These will be the ones we are saving in /d1/NEWMODS subfolders L1,L1E,L2

cheers!
pere

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

Posted: Sun May 24, 2026 3:08 pm
by pser1
More modules from Eurohard OS9L1 v2.0
<=> DDISK, KBVDIO, ACIA51
From issue 58 we will use these patches
*DDISK

Code: Select all

0) change 03 from B5 to 8D
1) change 4C from 01 to 03   4D from 25 to 34
	  4E from BF to 9F   4F from 01 to FC
	  50 from 0A to 12   51 from 86 to 12
	  52 from 7E to 12   53 from B7 to 12
	  54 from 01 to 12   55 from 09 to 12
	 37C from F0 to ED
	 382 from 60 to 86   383 from 6E to FF
	 384 from 7C to 1F
Add from 385 on (original contents unespecified)
	     8B; 16, FD, EA; 12
Original and patched files copied to /d1/WORKING (Ddisk and DdiskP)
Verified file copied to /d1/DONE (DdiskV)
and also copied to /d1/NEWMODS/L1E (Ddisk)
; ---------------------------------------------------------------------------------
The Keyboard and Video driver KBVDIO (as loaded INITIALLY by Level I v2.0). It is the equivalent to CC3IO for the CoCo3
The changes here are required to link in the keyboard scan to the IRQ interrupt via 00B2, and to extend the routine which
sets the video page to also set the video bank - the basis of this routine is stolen from the Tandy VDGINIT module.
It's also necessary to change some code because the address of the device descriptor and of the sleeping flag within it
are different fron Level I
*KBVDIO

Code: Select all

0) change 03 from 00 to 40
1) change 94 from FC to BF   96 from 32 to B2 	; was 94-95 in Bob's article. Corrected by Mike Miller
	  97 from FD to 8E   99 from 6B to 00
	  9B from 00 to 10   9C from 32 to 17
	  EF from 6B to E0
	  F2 from 32 to B2
2) change
	 318 from 44 to 17   319 from C6 to 05
	 31A from 07 to E2
	 8FD from 6A to 1F   8FE from 0F to 89    ; overwritting old CRC
	 8ff from 9F to C4
Add from 900 on (original contents uncertain)
          1F; 34, 04; 84, E0; 44; 44; 44; 44; 12; 9E, 4C; 30, 86; 
          A6, 01; B7, FF, E0; 85, 08; 27, 03; B7, FF, 80; 48; 48;     - $A6 was not in Bob's article. Corrected  by Mike  
          48; 48; 48; 12; AA, E0; 44; 8E, FF, C6; 
          C6, 07; 39; 39;					      - $C6 was not in Bob's article. Corrected  by Mike  
3) change
	 104 from 4B to 50
	 107 from 36 to 19

this last modifies the interrupt service rutine in KBVDIO, which does the keyboard scan, to mesh in properly with the patched CLOCK module.
4) change
	 4E1 from A6 to 96   4E2 from 03 to AF	; Bob wrote 4E2-4E3 - detected by Claude (consulted by John Whitworth)
	 4E5 from 6E to 39   4E6 from 9F to 12       ; Bob wrote 4E6-4E7 - detected by Claude
	 					                    ; Bob wrote old values as $63-9F
	 4E7 from 00 to 12   4E8 from 38 to 12	; Bob wrote 4E8-4E9 - detected by Claude
	 4FE from 6E to 39   4FF from 9F to 12	; Bob wrote 4F3-4FF - corrected by Mike
	 500 from 00 to 12   501 from 6B to 12
Original and patched files copied to /d1/WORKING (Kbvdio and KbvdioP)
Verified file copied to /d1/DONE (KbvdioV)
and also copied to /d1/NEWMODS/L1E (Kbvdio)
; ---------------------------------------------------------------------------------
*ACIA51
This requires the same mod as KBVDIO to pick up the sleeping flag

Code: Select all

1) change 2D from 4B to 50
	  F7 from 4B to 50   FA from 36 to 19
	 103 from 0D to 0C
Original and patched files copied to /d1/WORKING (acia51new and acia51newP)
Verified file copied to /d1/DONE (acia51newV)
and also copied to /d1/NEWMODS/L1E (acia51.new)

I attach here a screenshot showing the contents of folder 'DONE' where we have already
put 10 patched or copied files
1-Done so far step 4.jpg
1-Done so far step 4.jpg (28.06 KiB) Viewed 362 times
And another screenshot showing contents of WORKING and DONE to compare names
2-Working-Done so far step4.jpg
2-Working-Done so far step4.jpg (22.48 KiB) Viewed 362 times
Next step will be the last module 'BOOT' from OS9 Level 1 (Dragon Data v2.1)
cheers!
pere

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

Posted: Sun May 24, 2026 4:07 pm
by pser1
Hello,
I do attach here a zip file containing the source files (asm) for the three last modules
You will find the original files (just extracted from disc) and the Patched ones, these have an uppercase 'P'
at the end of the name
cheers!
pere
Sources-Original-Patched.ZIP
(46.08 KiB) Downloaded 7 times

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

Posted: Thu May 28, 2026 4:02 pm
by pser1
Now for the last module to be patched ...
<=> BOOT (From Dragon Data v1.2)
Bob Hall's note:
Here the problem is to hook the NMI interrupt routine into the new vectot table at 00FC - unfortunately the first bit ot the noutine in OS9PI
clears the DP register from FF to 00, so this has to be reset to FF. In addition, BOOT needs its size changing so that REL can jump over it to find OS9P1, and also needs some temporary workspace to store the position and size of OS9BOOT file (I've stolen some from the bottom of MMU block 3F). Note that I've not patched DDISK to make format work correctly.

Code: Select all

0) change 03 from 82 to D0		     ; old byte was $7F in actual BOOT file
1) change 31 from 00 to 01 ; 32 from D2 to 4C
	  33 from BF to 9F   34 from 01 to FC
	  35 from 0A to 12   36 from 86 to 12
	  37 from 7E to 12   38 from B7 to 12
	  39 from 01 to 12   3A from 09 to 12
	 17F from 8C to 86  180 from 92 to FF
	 181 from C7 to 1F
Add from 182 on (original contents unespecified)
	     8B; 20, 80; 12
2) change 52 from 9E to CC   53 from 20 to E0	     
	  54 from DE to 00   55 from 22 to 12
	  56 from 10 to 12   57 from 3F to 12
	  58 from 12 to 12   59 from 25 to 12
	  5A from 41 to 12   5B from 1E to 12
	  5C from 89 to 12
	  70 from 28 to 36
bootP.zip
(3.33 KiB) Downloaded 4 times
I don't know the reason why Bob Hall decided to add the 'new' code past the old CRC (three bytes). In other modules we have overwritten these bytes.
We must provide some free bytes at the end so that the module length is $1D0, the same lenght of the Tandy OS9L2 BOOT module

This patched version of BOOT must be saved into the DDOS starting disk (F1) with the name BOOT6.BIN

Compiling the patched source file generates an OS9 binary, so in order to have it as a DOS-like binary, I have copied the source file and
named it as "BOOTP2" and have added the 9 header bytes to convert to a DOS file.
Now compiling creates a binary that can be loaded in XRoar and saved into the final disk for autostarting (named F1)
SAVE"BOOT6",&H3430,&H3600,&H3442
BootP2.ZIP
(3.89 KiB) Downloaded 5 times
F1 - step1 with BOOT6.BIN.zip
(901 Bytes) Downloaded 4 times
; ---------------------------------------------------------------------------------

Once done all work on modules, let's prepare the final F2 disk (OS9 Level II)
We need to put together most of the modules we have copied or patched

Cobbler and OS9Gen are the commands used to create the file "Os9Boot" with all of the modules we want to be loaded when booting the Dragon
At the same time they copy the Kernel to the boot track. The kernel is made of three modules saved sequentially: REL, BOOT, OS9P1
In the Tandy CoCo they use track #34 full, from sector 0 to 17 so 18 x 256 = 4,608 bytes
In Dragon they use track #0 from sector 2 to 17 so 16 x 256 = 4,096 bytes
As a sidenote, Cobbler is only to be used on OS9 Level 1, while OS9Gen is for both L1,L2

As I have not found anywhere in Bob's aticles which modules have to be put into OS9Boot,
I have chosen most of them comparing to the 'mdir' result of Tandy OS9L2. This is the Bootlist I created and saved to /d0/NewBList

Code: Select all

NEWMODS/L2/OS9P2
NEWMODS/L2/IOMAN
NEWMODS/L2/INIT
NEWMODS/L2/CC3GO
NEWMODS/L2/clock.50hz
NEWMODS/L2/RBF
NEWMODS/L1E/Ddisk
NEWMODS/L1E/D0
NEWMODS/L1E/D1
NEWMODS/L2/SCF
NEWMODS/L1E/Kbvdio
NEWMODS/L1E/Term
NEWMODS/L1/T1
NEWMODS/L1E/Printer
NEWMODS/L1E/P
NEWMODS/L1E/T1
Previously I had copied all the modules from /d1/NEWMODS/L1-L1E-L2 to /d0/NEWMODS/L1-L1E-L2
in order to work on a newly formatted disk on drive2

Then started TandyOS9L2 on a CoCo3 emulated by XRoar, then I did
chd /d0
OS9Gen /d1 </d0/NewBList
F2 - step5 with OS9BOOT.zip
(18.45 KiB) Downloaded 3 times
Once done, I verified the OS9Boot file in /d1
ident-s /d1/Os9Boot
1-Contents of OS9Boot.jpg
1-Contents of OS9Boot.jpg (25.88 KiB) Viewed 291 times
The OS9L2 disk on drive 2 has by now only one file inside. Before starting to fill it with folders like CMDS, SYS, DEFS and other files
we should decide if we have all the needed files in the Bootlist or maybe we should add some more.
For instance I am not sure if files like SHELL, acia51.new or others should be there too
I think that the two I have named should, but it is just something I cannot be sure of
So any idea/hint will be highly appreciated!!
cheers!
pere

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

Posted: Thu May 28, 2026 4:44 pm
by pser1
Talking about which modules should be inside the OS9Boot, I copy text from Bob's first article in Issue 56 (1989-04)
"The second disk is in OS9 format and contains the bulk of the modules (in an "OS9BOOT" file made up with OS9GEN)."

Unfortunately 'bulk' means most of, but without specifying which ones should not be there ... not clear enough (to me)
His procedure implied copying these modules from Tandy OS9L2:
OS9P1, OS9P2, IOMAN, RBF, SCF, INIT, SHELL, CC3GO, clock.50hz
But OS9P1 is added for free by the OS9Gen command inside the boot track (REL,BOOT,OS9P1)
later we will overwrite BOOT with the patched one from DData v1.2 so that one seems not to be included.
Shell is linked into memory by the file 'startup', so another one no to be included in NewBList
But it *must* be copied into the CMDS folder and copy 'startup' to the root of F2. That way it will be loaded at boot time.

Having a peek at the way that Coco Level 2 starts, we can see these three modules:
PIPEMAN, PIPE and PIPER. They are in memory. These help using pipes between commands
Bob did not talk about the pipe (!) command, so by now these are not included.
We could customize the OS9Boot later once we have something that is able to boot!

From Eurohard L1 v2.0 we have patched 'acia51.new' but on Level dos I just saw ACIAPAK that seems related
to serial ports on cartridges, for instance the De-Luxe RS232 or the std RS232 Pack
Do you think it should be added to the NewBList?
Your ideas/hints will help us a lot!
cheers!
pere

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

Posted: Thu May 28, 2026 8:57 pm
by bluearcus
Hi Pere,

You're doing some top methodical work here!

On the 'other' descriptors front... I think Bob is referring to descriptors for whatever drives you have, so a single or twin drive 40 track single sided system would include only /d0 and /d1 if required. If someone had more drives... more descriptors.

And then... what drivers are necessary? Well, OS9Boot needs drivers for any descriptor it includes. During boot, IOMan and the filemanagers get setup. After that the system looks for device descriptor modules, and finds their device driver module name in the descriptor data fields. That driver is then linked and initialised for the descriptor. So start at the included device descriptors and check each one's device driver name field. That will give you the list of required drivers. Oh, and clock lol.

But I know you're much further on than that now anyway! Keep up the good work.

Kind regards,

Mike

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

Posted: Thu May 28, 2026 9:38 pm
by pser1
Hi Mike,
thanks for your kind words!
I am just publishing the results of the work of some people.
The first one is Bob Hall, the one who devised that project, then John Whitworth for getting info through Claude.ia
finding/correcting some bugs and you putting together all of the Dragon Update articles and correcting some typos/errors
while making them more readable not so painful as the D.U. magazine copies are ;-)

I have searched in the 'device descriptors' added in the project and found that
- D0 and D1 are RBF type and need DDisk. We already have 'Ddisk'
- P is SCF type and needs PRINTER. We already have 'Printer'
- Term is SCF type and needs kbvdio. We already have Kbvdio
Finally taken from Dragon Data Level 1 v1.2 I had copied/included (not mandatory)
- P1 is SCF and needs acia51
- T1 is SCF and needs acia51
These two are clearly related to the serial port, P1 might be the serial printer and possibly T1 could be some kind
of serial device (maybe deLuxe RS232 or similar)
Anyway, we have a file named 'acia51.new' that identifies itself as 'acia51', so I would assume that including 'acia51.new'
in the NewBList and aplying OS9Gen another time, it should be enough to have a correct F2 (OS9L2) disk
As a final step for this F2 disk, I will use DSAVE to copy in it the files and folders from Tandy OS9L2 root,
basically CMDS, SYS, DEFS, MODULES and startup
Probably a few comands/files would have to be ommited for space safety in destination disk ...
cheers!
pere