DragonDOS-compatible OS with workspace in high memory?

Hardware Hacking, Programming and Game Solutions/Cheats
Post Reply
MaestroSoftware
Posts: 24
Joined: Wed Jan 01, 2014 6:59 pm

DragonDOS-compatible OS with workspace in high memory?

Post by MaestroSoftware »

Hello everyone,

I am re-acquainting myself with the old beast, and rediscovered that many of the games, when loaded from disk (with a standard DragonDOS cartridge), cause the machine to crash. I found some software that makes it possible to "detach" DragonDOS (and its BASIC extensions) and to then EXEC the games without issues.

35 years ago, I used to save the game under FLEX and run them from DBASIC, with good compatibility.

But, if I remember correctly, most of the incompatibilities come from the memory mapping of a DOS workspace between $0600 and $0BFF and the resulting shifting of the graphic workspace. Since the DOS ROM does not occupy memory between $E000 and $E5FF, I guess it should be possible in 64K mode for a DragonDOS-compatible DOS to use that workspace. I vaguely remember some DOS used to do that, but I can't recall whether it's a Coco or a Dragon DOS.

Can someone help me? And/or is the ML source of some DragonDOS available anywhere - so I could compile my own?

Thanks

Philippe
sixxie
Posts: 1181
Joined: Fri Jul 18, 2008 8:36 am
Location: Hertfordshire
Contact:

Re: DragonDOS-compatible OS with workspace in high memory?

Post by sixxie »

It would seem that yeah... that's not too hard

http://www.6809.org.uk/tmp/dplus/

Not perfect - you have to DRIVE 1 after switching so it's obviously not initialised quite right.

And maybe it would be better done by knowing about various DOSses and copying & patching whichever one you have in ROM...
Serenarian
Posts: 22
Joined: Thu Oct 25, 2012 1:28 pm

Re: DragonDOS-compatible OS with workspace in high memory?

Post by Serenarian »

@MaestroSoftware

Once upon a time, when the Dragon was new (or about 1984/5), my friend Alan Butler and I tackled this problem by patching DragonDos in RAM.
We created a program DISCUP which was distributed free to members of The NorthWest TRS-80 User group and Pulser Software.
It requires a 64k system because (as you suggest) it copies the DOS ROM into RAM and then patches it.
You will find an early version in the archive here ...

http://archive.worldofdragon.org/archiv ... %21%5D.zip

I haven't looked at that version - but I have the source code for several later versions somewhere (including Dos 4.0 and Tandy DOS),
If you disassemble it you will see that what we did is really quite simple...
I'll refer to my original notebook here:
1. Disable interrupts
2. Copy the DragonDos 1.0 ROM from Map0 into RAM (Map1)
3. Move the contents of the DOS workspace that was initialised by the DOS ROM code, from its original location &H0600 up to &HE000
4. Find all the places in DOS that refer to addresses in the original DOS workspace at &H0600 to &H05FF and change them to point to corresponding &HE0** addresses ie. in the RAM area just above our copy of the DOS ROM - that is to say just change the first byte of the address to E0 as appropriate.
5. Now reset the BASIC pointers to the non-DOS values, so that BASIC starts at &H1E00. ($19, $1B, $1D, $1F, $2F, $33)
6, And the Graphics pages too. ($B7, $BA, $BC).
7. Set USR Vector at $B0/B1 to point to &HE083
8. Change the cursor colour to red to distinguish it from normal (&HBBC2)
9, Set the Warm Start Vector at $72 to point to a NOP
10. Alter &HC000/1 so that it doesn't have 'DK' (that is what is detected to trigger DOS initialisation code at &HC002). Put 'DU' there instead.
11. Restore interrupts, clear disk drive buffers, flags etc (JSR &HC0B8)
12 Display our SOFTSYSTEMS copyright message.

A variant was written to load and execute Discup and then run a menu program to select and run games programs. The trick was to set the BASIC pointer not to &H1E00 but to point to a tokenised lines of Basic text at &H0600 and jump to the RUN command at &H85A8.

It was also possible to incorporate the DU (Discup code) and its Menu Runner into a BOOT program stored on a disk at Track0 sector3. If the first two bytes are "OS" then it will load sectors 3 to 18 into memory at &H2600 to &H35F and execute the code from &H2600 onwards.

There you are then. Try it and see... plenty to digest. I hope it helps.

Peter Mooney
Serenarian
Posts: 22
Joined: Thu Oct 25, 2012 1:28 pm

Re: DragonDOS-compatible OS with workspace in high memory?

Post by Serenarian »

I found that the link to the DISCUP disk that I used in my previous post doesn't work.

Try this one.

http://archive.worldofdragon.org/archiv ... Disc%20Up/

Peter Mooney
Post Reply