[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
Wed Sep 18 03:03:45 EDT 2013


On Wed, Sep 18, 2013 at 1:11 AM, Aaron Wolfe wrote:
> On Tue, Sep 17, 2013 at 7:07 PM, Darren A wrote:
>> On Tue, Sep 17, 2013 at 4:22 PM, Tormod Volden wrote:
>>
>>> On Tue, Sep 17, 2013 at 11:04 PM, Aaron Wolfe wrote:
>>> > IIRC, the sequence is supposed to be sent at 230k, and the server is
>>> > supposed to be at 115.
>>> > The result of this mismatch is static and detectable, and that is what
>>> > the server is looking for.
>>>
>>> I am curious to know how that works. The HDB-DOS code simply sends an
>>> $E6 byte at turbo speed. From what I can see the server simply checks
>>> for $E6 as well, but at the slower speed.
>>>
>>>
>> The CoCo sends an $E6 byte (lsb first) at turbo speed.  If the server is
>> running at the same speed as the CoCo then it receives $E6 and no change is
>> required.  If the server is running at half turbo speed then it will see
>> the $E6 byte as $FD.
>>
>> Darren

Thanks for clearing that up Darren! And for your fantastic code!

What I missed here is that the CoCo sends lsb first and only receives
msb first. Somehow I started out correctly, the $67 example was not
something I came up with by chance :) So for the record, the corrected
illustration would be:

^^^^^^^^ _ _^^_ _^^^ ^^ ^^^^^^^^^ (idle, start bit, 6, E, stop bits,
idle) sent at high speed, LSB first = $E6

^^^^ _ ^_^^ ^^^^ ^  (start bit, D, F, stop bit) interpreted at half
speed, LSB first = $FD


> Was just about to confirm this :)
>
> Here are the relevant op code values..
>
> public static final byte OP_230K230K = (byte) 230; // 0xE6
> public static final byte OP_230K115K = (byte) 253; // 0xFD

Ah, I didn't notice there were two of these when I glanced through the
code. Now I also understand the opcode names...

> OP_230K115K is FD, which is what E6 sent at 230k looks like to a
> serial port running at 115k.  I don't know if that holds true for a
> 115k E6 sent to a 56k serial port... ?
>
> OP_230K230K (E6) is just a NOP so that an E6 on the line when server
> is already at 230k doesn't throw a "unknown opcode" error.
>
> I will be publishing an update in the next few minutes to fix the baud
> rate change to 2x instead of always 230k.  It is untested but should
> work :)

Not tested it either, but did you check in all the modified files?
DWSerialDevice.java (line 491) hasn't changed.

BTW is there a way to list all changed files for a changeset in ViewVC?

Tormod



More information about the Coco mailing list