Friday, January 13, 2012

Development Environment

Some people have asked me about the development environment I am using to produce Fahrfall.  I suppose I could pretend that I am hunched over a CoCo, inches away from a television, furiously typing on the old chiclet keyboard while I wait for the assembler to finish writing to my floppy disk drive.  But in reality, I'm not quite that hard-core!

Development Host

Instead, I am comfortably seated at the controls of my laptop running Linux.  If it matters, I use the Fedora distribution of Linux.  I edit code in vi, and I use make to build it.  My assembler runs from a command-line as well, of course.  OK, maybe I am a little bit hard-core. ;-)

The assembler I use is called mamou.  I believe that the mamou assembler is derived from Motorola's freeware 6809 assembler.  It also includes some functionality to assist in targeting the CoCo platform (such as support for the CoCo's machine language binary format), and some features to mimic other assemblers from the CoCo's past.  The mamou assembler is part of a package of tools called Toolshed, which also contains a number of other utilities related to using the CoCo and for developing CoCo software.

I haven't yet reached the point with Fahrfall where I need macro support in my assembly language sources.  But if/when I do, I will probably just use m4 for the job.  Stop booing!  I used m4 in my CoCo3 Digital Video Player project in order to support building different versions both for the SuperIDE device and for the emulated hard drive interface that many CoCo emulators support.  It isn't that bad!  No seriously... :-)  Well, it gets the job done for me anyway.

One last little tool that I use for lots of development is minicom.  This requires some code running on the target, of course, and hardware as well.  But I do find that having that little terminal window into the soul of the CoCo provides a lot of power for software development.

CoCo Target Hardware

Here is a secret -- I'm not developing on a CoCo!  Well, not exactly...  I am using a TDP-100 for my development target.  The TDP-100 was a clone of the CoCo produced by Tandy and sold through stores other than it's own Radio Shack.  I guess the marketing folks back then thought this was a good idea?  Well whatever -- it is the same as a CoCo on the inside.  This particular box has been modified to output composite NTSC video so that I don't need an RF tuner to use it.  It has an internal speaker added as well, FWIW.

As I mentioned, I am using a serial connection as part of my development.  The hardware I am using is the "Wireless Drive Pak", which seems no longer to be available.  Anyway, it is basically a clone of the RS-232 serial expansion that Radio Shack sold for the CoCo years ago.  But, the serial port itself is replaced by an off-the-shelf Bluetooth module that implements the RFCOMM profile.  This allows me to hack on the CoCo from across the room -- awesome!!

CoCo Target Software

So what is on the other side of that serial link?  A 6809 monitor program, of course!  The one I am using is MON09, available as part of the Micro-C for the 6809 package from Dunfield Development Systems.  I ported it to run as a CoCo ROM as part of another project a couple of years ago.  I used that code to replace the EPROM that came with the Wireless Drive Pak originally.

Having a monitor program available is insanely handy, especially for initial development and experimenting.  Easy commands allow for you to poke at memory and registers for a variety of purposes, including video mode experiments that would be painful to do at the actual CoCo keyboard.  Loading code over the serial port is trivial, especially since mamou outputs the S-record format that MON09 expects to see.  And did I mention that the monitor supports breakpoints, single-stepping, and automatic disassembly of the code?  It is hard to imagine doing CoCo work without it.


Well, there you have it -- a nice overview of my development setup.  If you have any questions about what I'm doing or how I'm doing it, then feel free to ask.  If you have any suggestions to make it better then I would love to hear those as well.

Otherwise, stay tuned for more Fahrfall progress reports coming soon!


  1. Wow! I would say thats hardcore!!!

    Did I mention I wish I could write machine language for the coco?

    1. As far as these things go, writing for the 6809 in the CoCo really isn't that bad. The 6502 is quite a bit less flexible and it's assembly language is a bit more inscrutable. Somewhat later processors were a bit more friendly (e.g. the 68000), but assembly on modern machines (e.g. PowerPC or ARM) is quite a bit more complex.

      If you are really interested, then I recommend that you pick-up a copy of the Barden book and find a version of EDTASM to run in an emulator. That should be enough to get you started with an environment that isn't too awkward to use.

      Good luck!