Interview with Terry Chamberlain, the developer of the A-Track system

BM: Hi Terry, I was absolutely amazed when I found the information about your A-Track system. Could you please shortly introduce it to those who did not (yet) read my article about it in this magazine?

TC: The A-Track for Atari system was developed in the late 1990s when DCC was in its infancy, and the small number of commercial DCC systems available on the market were rather expensive. Code to provide a user interface and support the DCC command structure and protocols defined by the National Model Railroad Association in the United States was written on an Atari 800XL 8-bit machine, which was then interfaced to a custom-designed DCC Command Station through the Parallel Bus Interface (PBI).

To complement the basic system, a set of Handheld Controllers were also designed and built, interfacing via one of the 800XL joystick ports. The second joystick port could then be used to support an Atari / Commodore mouse or trackball, providing an improved user interface. Because of the amount and complexity of code required, the software was written entirely in Assembler, and the final version represents one of the largest applications ever written for an Atari 8-bit machine.

BM: Does it mean NMRA used Atari to develop the DCC standards?

TC: No. The NMRA developed the DCC standards in 1992 without any reference to any type of computer system. I developed A-Track myself, totally independently of the NMRA, and only by reference to their published standards which were available to anyone with web access.

BM: Can you tell us more about how it works?

TC: The system description found on the A-Track page of my website under the 'History' section is as follows -

---
A-Track supports the full range of features defined in the DCC Standards and Recommended Practices issued by the National Model Railroad Association and, with the addition of a hardware interface box (the DCC Interface Unit or DIU) to link the computer to the track, and a set of handheld controllers plugged into a network of sockets wired around your layout, will let you operate up to eight locomotives on the track at the same time. A-Track provides total control over a model railroad layout from your Atari computer keyboard, allowing you to set up a roster of locomotives for an operating session, allocate locos to consists and to selected handheld controllers, and even to operate all turnouts or signals from a central location. A-Track also incorporates full programming facilities for the decoders in the locomotives, and can save all details of the set-up for each locomotive, and the operating session, to disk for safekeeping and use at future sessions.

DCC allows the simultaneous operation of almost any number of model locomotives on complex track layouts without the use of conventional block switching, ie. each locomotive does not have to be controlled within a single section of track allocated specifically to it. The speed and direction of each locomotive can be set independently regardless of where it is on the track (a feature, naturally, which has to be used with care !). Control can also be exercised over multiple locomotives treated as a single unit (MUs or consists) and over accessories such as lighting, signalling, and points (turnouts).

The same decoders fitted to locomotives can be used to control static trackside accessories such as signals and turnouts. However, specialised accessory decoders with multiple switched outputs are normally employed for this purpose unless, of course, the accessory (a turntable or crane, for example) requires control of an electric motor.
---

BM: Which decoders are supported by A-Track?

TC: A-Track and the DIU are designed to be fully compliant with NMRA Standards and to work with all makes of commercial decoder. During the period of operation, the system was successfully tested with Digitrax, Lenz, Model Rectifier, North Coast Engineering (NCE), Wangrow SystemOne (now ceased trading), and ZTC decoders.

BM: You started the A-Track business in late 90s. It was already after the golden era of (not only) Atari 8-bits. Why did you choose 8-bit Atari to become the heart of your product?

TC: The first thing to understand is that A-Train Systems is not a business - it is just a convenient title to cover my hobby activities. I do not sell any products for profit - any payments that I have received from users for hardware items just cover the cost of the components and shipping. All software and documentation is provided free-of-charge.

The Atari 8-bit computer was chosen to support A-Track because I had one and had become a fan not only of its very well-written operating system, but also of the 6502 processor which, with a very small instruction set (the first reduced-instruction-set-computer (RISC)), was a joy to program compared with the unstructured complexity of Z80 and similar processors. Again, the full story is in the A-Track History section of my website -

---
In the Jan/Feb 1996 issue of Atari Classics magazine there was an appeal from an enthusiast in California, one Decker McAllister, for some help in designing an interface from an Atari 8-Bit home computer to control model railways using the Digital Command Control system - since neither he nor his colleagues had the necessary electronics or assembler code skills.

I volunteered to assist, and then spent virtually all my free time over the next four years designing first the hardware (the easy bit - I'm an electronics engineer by profession) and then the software. Because of the need to function and control locomotives in real time, the use of Basic was out of the question, and all software was written in Assembler code. The source listing stretches to over 15,000 lines of code (around 200 pages). I think it must be one of the biggest assembler programs ever written for the Atari Classic (the Atari 400/800 Operating System runs to 5800 lines). To ease operation, the software also includes a handler to allow use of a mouse - although a normal peripheral on PCs, a mouse was never supported by Atari Classic operating systems. Mice intended for either the Atari ST or the Commodore Amiga can be connected to a joystick port, although it is not possible to connect up a Serial or PS/2 mouse intended for PC use. Less than 250 lines of Assembler are required to implement a general-purpose mouse handler which can then be incorporated in the standard Atari CIO system and, hence, made accessible to any application program written in Basic or machine code.

After nearly two years of work (and considerably beyond my initial estimates) the first demonstration version of the software, was delivered to Decker and his colleague Bob DeMoss in Long Beach, California and to Charles Cole of the Cochise & Western Model Railroad Club in Sierra Vista, Arizona (co-opted into the project by Decker) just before Christmas 1997 for evaluation. Much to my relief it ran perfectly on the NTSC (USA) versions of the Atari Classic - since the software involves a lot of critical timing routines I was worried that changing to 60Hz screen frame rate from the normal PAL (UK) 50Hz rate would disrupt operations.
---

BM: Not a surprise, that it took so long, when you developed such a system as just a hobby. What was still missing after the first two years?

TC: It took another full year of work to complete the design of the interface electronics, to bring them into line with the needs of the software, and then to build sets of equipment for delivery to my patient 'customers' in California and Arizona. First deliveries were made in Spring, 1999 and followed up by personal visits to the installations to set them up fully, and to iron out the inevitable teething troubles.

There was yet another year of development to produce final versions of the plug-in, walk-around handheld controllers to complete the A-Track system, together with associated software upgrades, but final delivery was achieved in March 2000.

Sadly, although Decker Mcallister had seen the initial successful installation, he passed away in late 1999 following a short illness. Decker's boundless enthusiasm sustained the project throughout its lengthy development, and ensured that it does what model railroaders want - without them having to be computer experts. A-Track is dedicated to his memory.

BM: Great success. How long did they use A-Track?

TC: The largest installation, at the C&WMRRC was in continuous operation, with only minor (and easily rectified) glitches, since then right up until late 2007.

BM: Why did they stopped using A-Track with Atari?

TC: During the period of successful operation, it became clear that the limit of 64 locomotives in the A-Track roster was a serious limitation for club operations, being unable to accommodate all the locos belonging to the members. A-Track could not easily be expanded to hold a larger roster since the program already used all but a few hundred bytes of the available standard Atari 64Kbyte memory. The solution was to write a companion program, A-STILE, which allows all the club's locomotives to be handled in a single file, and selected rosters of up to 64 locos to be transferred to A-Track for specific operating sessions. Further details of A-STILE can be found on the Projects page.

BM: You mentioned the limit of 64 locomotives in the A-Track roster caused by the size of RAM. But there are possibilities to extend the Atari RAM by 64, 256 KiB or even more. Didn't you consider this to improve A-Track's capacity?

TC: Yes, I did consider this, but the groups in the USA were not very interested in expanding their Atari machines (model railroads were their principal interest - not computers) so I worked with the standard machine only. Note that I did develop a subsidiary program, A-STILE, which can be used to handle larger rosters and split them into smaller rosters for use with A-Track. A-Stile was used by the C&WMRR Club briefly to handle their very large roster.

Second reason was, that the Atari computers (and more importantly, their disk drives) belonging to the Cochise & Western club were becoming unreliable by 2007. The club decided that it would be more economical to invest in a commercial DCC system, from NCE, rather than to try and maintain the Atari equipment - so I decided to follow them, and move my efforts into supporting NCE systems - with software on a PC. Initially, I designed and produced custom hardware to interface from the PC to both the A-Track DIU (with Handheld Controllers) and the NCE system, so that the original hardware could still be used, but this was only in use for a year or two before moving entirely over to NCE hardware.

(End of part 1)