Model Railroad Electronics and Control

 

Home

Contact

Site Map

A-TRACK

DCC

Projects

Download

Links

About

 

A-TRACK - a comprehensive solution to Digital Command Control

 

Features

Further pictures of the various items of A-TRACK hardware, together with some screenshots showing A-TRACK in operation, can be found in files on the Download page.

 Top of Page

 

 Home

 

Summary

A-TRACK is a program for the (aged but venerable) Atari XL/XE range of computers which implements the Digital Command Control (DCC) system for the operation of model railroads.

A-TRACK supports the full range of features defined in the DCC Standards and Recommended Practices issued by the National Model Railroad Association (up to the year 2000 revision) 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.

A-TRACK and the DIU are designed to be fully compliant with NMRA Standards and to work with all makes of commercial decoder. To date, the system has been successfully tested with Digitrax, Lenz, Model Rectifier, North Coast Engineering, Wangrow SystemOne (now ceased trading), and ZTC decoders.

 Top of Page

 

 Home

 

History

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.

Yours truly 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 locmotives 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 50Hz rate would disrupt operations.

However, 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. The largest installation, at the C&WMRRC has been operating continuously, with only minor (and easily rectified) glitches, since then right up to the present day.

During this 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.

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.

 Top of Page

 

 Home

 

Acknowledgements

Production of the software for A-TRACK would have been almost impossible without the use of the excellent SIO2PC file transfer software produced by Nick Kennedy to connect my Atari 800XL to a PC. The actual connection is made through an RS232 interface, built around a Maxim MAX232 chip, connected between the the Atari SIO port and any serial port on the PC. The interface is relatively easy to construct following the clear documentation provided by Nick.

Once connected, the SIO2PC software running on the PC turns the PC into a set of 'super' Atari disk drives which can be handled under any Atari DOS system without any modifications to the Atari hardware, and without any additional software running on the Atari machine. Atari files can be stored on the PC hard drive or transferred to PC floppy disks, so you can have your complete Atari library almost instantly to hand.

Using SpartaDOS (my preferred operating system for the Atari Classic) it is possible to set up these 'super' disks on the PC with a capacity of 1MB  -  which was essential for the A-TRACK project where the source files amount to around 500KB and the Assembler list file alone occupies in excess of 650KB. I have to admit that files of this size are totally beyond the capabilities of any of the Atari text editors, so I actually use the PC to generate and edit all of the Assembler source code. This is then transferred to the Atari 800XL via an RS232 comms link, using a P:R: Connection and BobTerm at the Atari end to handle the communications. BobTerm, written by Bob Puff of CSS, is by far the best comms program for the Atari Classic machines and translates the PC's CR/LF ASCII characters to Atari 'End-of-Line' characters 'on the fly'. After a little more manipulation on the 800XL, the translated source file (held on an SIO2PC 'super' disk in the PC) can then be accessed by the Assembler/Editor cartridge and assembled to produce the required machine-code object program and the output list file. These are output directly to another SIO2PC 'super' disk file on the PC, since there is no way the very large files involved could be held within the 800XL’s 64 KByte memory, or on a real Atari disk drive.

Although it all sounds very complex, it is relatively easy to use in practice  -  and very satisfying to utilise the PC as an Atari peripheral!

 Top of Page

 

 Home

 

Future Development

Unfortunately, the Atari 8-bit machines became obsolete a long time ago with the relentless march of the IBM PC, so the future of A-TRACK will be to convert it to run on a PC under Windows. The initial intention, at least, will be to retain as much of the A-TRACK hardware as possible, including the DCC Interface Unit (DIU) and the handheld controllers, so there will be no changes required to the model railroad layouts where it is currently employed.

To make things as simple as possible for myself, the software is being written using Visual Basic (VB6), and the interface between the PC and the DIU (and the handheld controllers) will be via USB. Utilising USB means that the host PC must run Windows 98 SE as a minimum, and preferably Windows 2000 or XP, but this should not present too much of a restriction in today’s PC-oriented world. The A-Track USB interface will be based around a Microchip PIC microcontroller, probably one of the recently-released 18F2445 or 18F2550 devices which support a full-speed USB interface.

Currently, the bare bones of the user-inteface software is working, but it still needs a lot of work to support all of the necessary A-Track features before it can be released for evaluation. Watch this space !

 

 Top of Page

 

 Home

 

Copyright © JT Chamberlain 2004-2007  All rights reserved

All trademarks and logos used in these pages are the property of their respective holders

Page Last Updated  11 January 2007