[Coco] Eureka! I'm Running My Coco 3 with Drivewire 4 Server Finally! or I Found a Bug in HDBDOS v1.4 DW4 Coco 3!

Tormod Volden lists.tormod at gmail.com
Tue Sep 17 16:49:34 EDT 2013


On Tue, Sep 17, 2013 at 6:34 PM, Aaron Wolfe wrote:
> On Mon, Sep 16, 2013 at 11:29 PM, Kip Koon wrote:
>> Aaron,
>> In the HDBDOS portion of the toolshed repository,  there are two DW4
>> versions, HDBDW4CC2 and HDBDW4CC3.  They are built along with the other
>> versions of HDBDOS so I was under the impression that they were the latest
>> versions.  If they ARE 230K Baud versions, then that would be the reason why
>> there was no communications with the DW4 server.  The server is set to
>> 115200 Baud.  That raises another question.  If that is the case, then how
>> do you set 230K baud for the com port on the Windows PC?
>
> Hmmm I do not know exactly what those ROMs are, but IIRC there was a
> 230k ROM for CoCo 3 and a 115.2k ROM for CoCo 2 using Darren's
> technique, so that might be them.  If so, we should try to make it
> more clear that they are not "standard" nor required for DW4 use...
> that or I should make the wizard ask the user about which they have
> and then set the 230k mode accordingly.

Yes, I can confirm that the hdbdw4* images are built with the DW4 flag
which replaces the "normal" serial in/out code with Darren's Turbo
serial code. That is the only change IIRC.

> One problem the DriveWire project has is that while I'm happy to hack
> on the server, I really don't know much about ROMs or "hard core" CoCo
> stuff.  I can just barely write some ASM when I absolutely have to,
> but things like Darren's awesome serial routines are way over my head.
>  This leads to a disconnect between the ROMs and the server sometimes,
> and has limited some features I'd love to have due to lack of support
> on the ROM side.
>
> If these "DW4" ROMs are indeed the 230k version, you can set the
> following items in config.xml or via Config Editor to use them.
>
> Possibility #1: If the ROMs send the special sequence of bytes that
> the OS-9 driver does to identify 230k mode, you would only need to
> set:
>
> <DetectDATurbo>true</DetectDATurbo>

I think there is a bug in HDB-DOS for "DW4": It starts out with
sending the "switch-to-turbo" request, however this request is sent
with the 230K serial code, so if the server is in "slow" 115K mode it
probably won't be able to read this request...

>
> This detection was originally intended to allow automatic switching
> from a standard, 115k ROM to 230k mode when the OS-9 driver loads, and
> if you want to play with 230k mode without changing ROMs, this is a
> good way to do it.  When the 230k OS-9 module inits, the server will
> automatically kick up to 230k mode.
>
> Possibility #2: If the ROMs require the server already be in "DATurbo
> Mode", you will need:
>
> <SerialRate>230400</SerialRate>
> <SerialParity>none</SerialParity>
> <SerialStopbits>2</SerialStopbits>
> <ProtocolFlipOutputBits>true</ProtocolFlipOutputBits>
> <ProtocolResponsePrefix>true</ProtocolResponsePrefix>
>
> I believe that would do it.  Note that you also need a cable with CD
> and RD connected on the coco side.

I believe this cable modification is the same as described here for
another program: ftp://www.rtsi.com/RSDOS/TELECOM/bitbang.doc

As can be seen in the DW config above, the turbo mode requires (other
than 230400 baud setting for the CoCo 3, or 115200 for CoCo2/1/Dragon
since they run half the CPU speed), the double stop bit, reversed bit
order, and a prefix to each packet which is used for rough
synchronization. The fine synchronization is done with a 6809 "sync"
command which waits for a FIRQ interrupt triggered by the input which
would otherwise be connected to CD on modems. Hence the "short"
between RD and CD. A normal busy loop would be too slow to tune in on
the bits at this rate.

I quickly tried the Turbo mode on my Dragon last week without success.
Now looking at the server code [1] I understand why: The
"switch-to-turbo" request is answered by a switch to hard-coded 230400
baud, instead of simply doubling the current rate. So if a
CoCo2/1/Dragon is running at 57600 and asks for turbo, the server
switches to 230400 instead of 115200... And if you run HDBDOSDW4 and
configure the server for the correct 115200 as of "Possibility #2"
above it will still jump to 230400 when HDB-DOS boots and successfully
transmits the "switch to turbo" request. Would be great if you could
fix up this, Aaron.

Regards,
Tormod

[1] line 491 in
http://drivewireserver.cvs.sourceforge.net/viewvc/drivewireserver/drivewireserver/java/src/com/groupunix/drivewireserver/dwprotocolhandler/DWSerialDevice.java?revision=1.31&view=markup



More information about the Coco mailing list