[Coco] DriveWire for TC-9/SWTPC/M68MM17

Aaron Wolfe aawolfe at gmail.com
Sun Dec 29 18:13:11 EST 2013


On Sun, Dec 29, 2013 at 5:47 PM, Joel Ewy <jcewy at swbell.net> wrote:
> Just to confirm my understanding:  The CoCo's Bitbanger uses pins from PIA
> IC4.  DriveWire for the Dragon uses the same client driver with the addition
> of a little extra hardware to invert and possibly level-translate the same
> pins from its 6821 parallel port. Correct?  So with a similar adapter one
> should be able to use one of the TC-9 Tomcat's PIAs for DriveWire, and the
> same should be true of a 6821 board on an SWTPC, GIMIX, Motorola Micromodule
> 17, S-100 6809, or SBC, assuming you are using the driver appropriate to
> your CPU type and clock speed, and you have a descriptor pointing at the
> right address.
>
> Actually, as I think about it, the clock speed might be a problem. The DW
> code is very, very tight and relies on instruction timings that are only
> going to be valid for the exact clock speed of the CoCo.  So if you have an
> SWTPC running at 2 MHz it won't be able to run an unmodified DriveWire
> client written to work at 1.78MHz, will it?  Since the TC-9 uses the GIME it
> is probably running at CoCo 3 speed, though I think I remember FHL claiming
> some kind of speed-up.  How hard would it be to modify the DW client code to
> run at 2 MHz or 1 MHz?  Or would it be worth it to replace the crystals and
> drop 10-20% of the CPU clock to get DriveWire?  Hmm.
>

If your platform(s) have a UART, that might be an easier/more
universal approach (I thought most of the 6809 based machines other
than the CoCo had one).   Otherwise yes you would need to adjust the
routines to produce a standard bps rate on the target platform.  If
the platform is faster than the CoCo then I think you would just need
to insert some delays in the proper places, probably preferable to
reducing your CPU clock.

The DW client code is very modular so it is easy to swap out the low
level I/O.  There are a few variants already (standard bitbanger,
turbo bitbanger, becker interface, maybe more?).  Some of them live
here:

http://sourceforge.net/p/nitros9/code/ci/lwtools-port/tree/level1/modules/

if you want to take a look...  fairly straightforward to add a new i/o type.



More information about the Coco mailing list