A DOSPlus Extender for Drivewire & CoCo-SDC

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

Re: A DOSPlus Extender for Drivewire & CoCo-SDC

Post by pser1 »

Yes, Tony
this will work for sure. I have used this many times.
Anyway, probably we don't need the CLEAR because BASIC begins at $2400 by default
and the stack is on the $7Fxx range while we will be using:
$3000 until $6F00
but anyway it is safely to move the stack.
I use this version
PCLEAR1: CLEAR200,&H2FFF

cheers
pere
tjewell
Posts: 346
Joined: Mon Oct 19, 2009 4:58 pm
Location: Cambridge, England

Re: A DOSPlus Extender for Drivewire & CoCo-SDC

Post by tjewell »

Oh wow, I've done it! It works!

Now, what exactly have I done? I wanted a version of DOS that could auto-start - either run a program from the floppy (thanks Pere!) or via Drivewire's AUTOLOAD.DWL, in the same way that Tormod's tweaked Basic ROM does.

How did I do it? Well, I wanted to make as few changes to Pere's or Tormod's code as possible - and guys, I'd love your feedback on how I've done it. I'm basically relying on the fact that DWLOAD will load AUTOLOAD.DWL if run without any arguments. So, in Pere's extender code, just before it boots the floppy, I put a jump to DWLOAD in the RAM hook at $016A (the one that gets fired when waiting for input). So this means that once DOS is loaded, and the DOS auto-start has run (if present), and the OK prompt comes up, it then runs DWLOAD. I've added a couple lines to DWLOAD to reset the hook, and run the 'check for shift' routine (so you can hold down shift at power-on to stop it auto-running - I guess we could do one for DOS too).

It's not perfect - if you do hold down shift, you get two OK prompts, which is a little odd. Pere, Tormod, is there a better way of doing this?

You can see my little mods in the attached source file - just do a diff on the previous version or search for 'TJ'.

For reference, I installed this on my Dragon by first compiling it using this script (and Pere's pack of files posted a few messages back):

Code: Select all

!/bin/sh -x
asm6809 -9 -B -v --define becker=0 --define drgrom=1 --exec=$2 --o=${1}RDW4.rom ${1}.asm 
asm6809 -9 -B -v --define becker=0 --exec=$2 --o=PATCHER.rom ${1}.asm 
asm6809 -9 -B -v --define becker=0 --define drgbin=1 --l=${1}DDW4-PATCHER.lst.asm --o=${1}DDW4-PATCHER.bin ${1}.asm
cat DP50NEW.rom ${1}RDW4.rom > DP50PSR-DW4.rom
asm6809 -9 -B -v 2dweeb.asm --o=DP50BINS
rm PATCHER.rom
rm ${1}RDW4.rom
Then, on the Dragon, I did:

Code: Select all

PCLEAR1:CLEAR200,&H2FFF
DWLOAD"LROM"N"DP50PSR-DW4"
WRITE MEM@0
(I had a blank bank in slot zero - you might not, so take care)

Oh, and Pere, Tormod and everyone else involved - I've come to realise over the last few weeks how clever the work you've done on Drivewire is (and the SDC too). Indispensable stuff!
pser1
Posts: 1655
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: A DOSPlus Extender for Drivewire & CoCo-SDC

Post by pser1 »

Hi Tony,
glad to hear about these mods, but I cannot find any attached file in your last post ...


cheers
pere
tjewell
Posts: 346
Joined: Mon Oct 19, 2009 4:58 pm
Location: Cambridge, England

Re: A DOSPlus Extender for Drivewire & CoCo-SDC

Post by tjewell »

Ha, whoops, forgot to attach it in my excitement that I got it working!
Attachments
DW42-2503-TJ.zip
(44.51 KiB) Downloaded 378 times
pser1
Posts: 1655
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: A DOSPlus Extender for Drivewire & CoCo-SDC

Post by pser1 »

Hi Tony,
I like the idea, but there are some flaws:
- If you have the drivewire server 'out', then the computer hangs!
- If the file AUTOLOAD.DWL doesn't exist, then the computer hangs too
- If you have a bootable disk in drive A that runs a Basic program, it is more likely to have
problems because of the modified hook, and immediately the AUTOEXEC.DWL will take control.

So:
- we should find a way to call AUTOLOAD.DWL without modifying any hook
- we must ensure that when DW4 is not 'on' or the .DWL file doesn't exist the program returns back to the interpreter.

I will make some tries on that tomorrow ...

cheers
pere
tjewell
Posts: 346
Joined: Mon Oct 19, 2009 4:58 pm
Location: Cambridge, England

Re: A DOSPlus Extender for Drivewire & CoCo-SDC

Post by tjewell »

Ah, my excitement at having got this working overrode my usual desire for rigorous testing! Pere, I have a couple questions about your code - I'll drop you an email.
pser1
Posts: 1655
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: A DOSPlus Extender for Drivewire & CoCo-SDC

Post by pser1 »

Hi all,
after adding the BOOT feature to the extender, Tony thought that it would be nice to be able to
'boot' drivewire, that's to say, start the file AUTOLOAD.DWL when loading the extender if drivewire
is connected to the Dragon and of course if that file exists on the server ...
After some attempts, I have added this possibility too. I have found a problem with the Becker
DWRead function that has no timeout control and if Drivewire is off or AUTOLOAD.DWL doesn't exist
it loops gracefully forever.
I have changed a bit this implementation to add a timeout and notify the error to the caller program.

Now the beta version I have, is working flawlessly in XRoar with Becker port and in the Dragon64 with
the drivewire adapter ... I will be testing along the weekend and if everything works alright, then I will
upload here a new version (v0.25.04) with both possibilities enabled and some explanations.

Have a nice weekend

cheers
pere
pser1
Posts: 1655
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: A DOSPlus Extender for Drivewire & CoCo-SDC

Post by pser1 »

Hello, back again to update the extender ...
I upload here a zip containg the usual files and a readme.txt that shows
the files you should find in the zip file and its use.
In the file "_changes v0.25.04.txt" you will find an explanation about the
added features.
In brief they are:
- When starting, if you press the SPACE bar, the program will try to boot
the floppy in drive 1 (if it is bootable)
- If not pressed, then it will try to call the AUTOLOAD.DWL file in drivewire
(it's kind of an autoexec.bat) if the server is on and that file exists.
Anyway you could avoid this simply pressing the SHIFT key

So, to start normally you have to press Shift (if you work with DW4 and have
the Autoload.dwl file) else do nothing.
If you want to boot drive 1 you have to press space bar

cheers
pere
Attachments
DP50Ext_v0.25.04.zip
new version with BOOT and DW autostart
(148.49 KiB) Downloaded 369 times
User avatar
tormod
Posts: 416
Joined: Sat Apr 27, 2013 12:06 pm
Location: Switzerland
Contact:

Re: A DOSPlus Extender for Drivewire & CoCo-SDC

Post by tormod »

pser1 wrote:I have found a problem with the Becker
DWRead function that has no timeout control and if Drivewire is off or AUTOLOAD.DWL doesn't exist
it loops gracefully forever.
This is a known issue with the Becker routines (for emulation) in HDBDOS, where they are taken from. The HDBDOS code has meanwhile gotten a timeout option (build with BECKERTO) however it is not enabled by default because so many people run overclocked emulators where the timeout would be too short. So you can try that code also. Of course, this is not a problem on real systems.
So, to start normally you have to press Shift (if you work with DW4 and have
the Autoload.dwl file) else do nothing.
If you want to boot drive 1 you have to press space bar
This is awesome! I am sure that for everybody using this, "to start normally" very soon will mean running their autoload.dwl ;)
pser1
Posts: 1655
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: A DOSPlus Extender for Drivewire & CoCo-SDC

Post by pser1 »

Hi Tormod!
after having added the autoboot feature, I realized that most of the time
I didn't want it to happen so I decided to let it boot only if the user
presses the SPACE bar key.
Then Tony had the good idea of making it start the AUTOLOAD.DWL file
if it existed and DW4 was on.
To have the same behaviour that has your modified Dragon 64 ROM, I chose
to let it start immediately unless the user presses the SHIFT key.
The precedence priority is
First BOOT (if space is pressed)
Then AUTOLOAD.DWL (if shift is not pressed)

Concerning the Becker, I ended adding a few code lines to create a word
counter in the stack to control a timeout and exit the routine. It works well.

cheers
pere
Post Reply