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'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!
The result was that it created the file at destination, but empty!
Giving a peek at the loaded modules (mdir e) allows us to see that cc3go has an attribute different from the other modules ...
Searching in the Tandy disc, I found this module in the folder MODULES
So I just copied it after removing the empty one
- del CC3GO
- copy /d0/MODULES/cc3go CC3GO
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
OS-9 Level 2 for (updated) Dragons
Re: OS-9 Level 2 for (updated) Dragons
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:
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 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) 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! 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 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 And after applying this attr command "attr clock.50hzV e pe" 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 Next time we will be patching files from level 1
cheers!
pere
- 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 12its 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 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) 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! 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 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 And after applying this attr command "attr clock.50hzV e pe" 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 Next time we will be patching files from level 1
cheers!
pere
Re: OS-9 Level 2 for (updated) Dragons
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 ; ---------------------------------------------------------------------------------
<=> 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 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 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 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 ; ---------------------------------------------------------------------------------
cheers!
pere
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 ; ---------------------------------------------------------------------------------
<=> 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 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 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 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 ; ---------------------------------------------------------------------------------
cheers!
pere
Re: OS-9 Level 2 for (updated) Dragons
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 Then I did list modules/Bootlist, with these two pages ... 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
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 Then I did list modules/Bootlist, with these two pages ... 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
More modules from Eurohard OS9L1 v2.0
<=> DDISK, KBVDIO, ACIA51
From issue 58 we will use these patches
*DDISK
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
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
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 And another screenshot showing contents of WORKING and DONE to compare names Next step will be the last module 'BOOT' from OS9 Level 1 (Dragon Data v2.1)
cheers!
pere
<=> 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; 12Verified 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 12Verified 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 0CVerified 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 And another screenshot showing contents of WORKING and DONE to compare names 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
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
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