A Commodore That Lives Up to Its Name
When software engineer Ioannis Anagnostopoulos pulled his old Commodore 128 out of the cellar, he had something a little more interesting in mind than playing a few of his favorite games from the 1980s. Having worked with maritime tracking systems professionally, he was curious to see if his old computer had enough horsepower to handle the job. That led to the development of AIS4CBM , an application that turns the decades-old 8-bit computer into a real-time ship tracking system.
Ships equipped with Automatic Identification System (AIS) transponders regularly broadcast information about themselves over VHF radio frequencies. These transmissions contain everything from a ship’s current location and heading to its speed and destination. With an appropriate receiver, this information can be fed to a computer for processing. Of course, doing that with a 40-year-old computer presents a number of challenges.
The first problem Anagnostopoulos encountered was that the Commodore’s software-driven serial interface struggled to communicate at even 2,400 bits per second, whereas AIS equipment typically spits out data at 38,400 bits per second. An Arduino initially served as an intermediary to buffer the data. However, even at a reduced data rate, the Commodore was struggling to keep up. An early decoder written in BASIC took about 10 seconds to process a single message.
To speed things up, Anagnostopoulos rewrote the decoder in 6502 assembly language. He also got his hands on a high-speed serial interface from GGLabs and adapted an existing driver to receive incoming data using hardware interrupts. A separate interrupt firing 100 times per second was used to transfer the buffered data to the decoder. This arrangement allowed the comparatively slow BASIC code to handle the user interface without constantly tending to the serial port.
Anagnostopoulos wanted to do more than display a list of geographic coordinates, so he turned to BASIC 8, a graphics-oriented extension to Commo




Comments
No comments yet. Be the first to share your thoughts.