Gopher2600 is an emulator for the Atari 2600 written in the Go language.
The accuracy of the emulation is very high and there are no known outstanding problems with the 6507, TIA and RIOT chip emulation. Emulation of the ARM chip is currently limited to the Thumb subset of instructions but it does include accurate cycle counting and performance monitoring.
It is an ongoing project and bug reports are welcome.
The key features of the emulator:
- Support for many of the known cartridge formats including the Supercharger
- Emulation of the ARM7TDMI as found in the
- Network access through PlusROM emulation
- AtariVox and SaveKey support
- CRT Effects
- Accurate audio reproduction (and optional stereo output)
- Support for common TIA revisions
- Implementation of Movie Cart
- Gameplay rewinding
- Tracker/Piano Keys visualisation
- Gameplay recording and playback
- Support for (and auto-detection of) the stick, paddle, keypad and also Sega Genesis style controllers
The graphical debugger:
- Optional Color Clock level interaction
- Breakpoints, traps, watches on various CPU, TIA and RIOT targets
- Specialist windows for specific cartridge types (eg. supercharger tape)
- Terminal interface (headless operation optional)
- Script recording and playback
- ARM peformance monitoring
The following screenshots were taken in
playmode with CRT effects enabled.
The Stella project (https://stella-emu.github.io/) was used as a visual reference for video output. In the absence of VCS hardware (which I didn't have during initial TIA development) Stella was a good alternative for checking the accuracy of video output.
In addition, Stella was used as reference in the following areas:
During the development of the CDF cartridge formats. These recent formats don't seem to be documented anywhere accept in the Stella source.
ParkerBros fingerprint taken from Stella. I can't remember why I did this but a comment in the fingerprint.go file says I did.
As a reference for the audio implementation (the 6502.ts project was also referenced for this reason).
The EF cartridge format.
Fingerprint patterns for automated controller/peripheral selection.
In all these instances, primary sources of information could not be found.
Many notes and clues from the AtariAge message boards. Most significantly the following threads proved very useful indeed:
- "Cosmic Ark Star Field Revisited"
- "Properly model NUSIZ during player decode and draw"
- "Requesting help in improving TIA emulation in Stella"
- "3F Bankswitching"
- "TIA Sounding Off in the Digital Domain"
And from and old mailing list:
- "Games that do bad things to HMOVE..." https://www.biglist.com/lists/stella/archives/199804/msg00198.html
These mailing lists and forums have supplied me with many useful test ROMs. I aim to package these up and distribute them sometime in the future (assuming I can get the required permissions).
Extensive references have been made to Andrew Towers' "Atari 2600 TIA Hardware Notes v1.0"
Cartridge format information was found in Kevin Horton's "Cart Information v6.0" file (sometimes named bankswitch_sizes.txt)
The "Stella Programmer's Guide" by Steve Wright is of course a key document, used frequently throughout development.
Colour values for NTSC and PAL television signals taken from https://www.qotile.net/minidig/docs/tia_color.html
The TIA Audio implementation is based almost entirely on the work of Chris Brenner.
Musical information as seen in the tracker window taken from Random Terrain.
The 6507 information was taken from Leventhal's "6502 Assembly Language Programming" and the text file "64doc.txt" v1.0, by John West and Marko Makela.
Undocumented 650x instructions and implementation details in "6502/6510/8500/8502 Opcode matrix"
US Patent Number 4,644,495 was referenced for the implementation of the DPC cartridge format (the format used in Pitfall 2)
DPC+ format implemented according to notes provided by Spiceware https://atariage.com/forums/topic/163495-harmony-dpc-programming and
DPC+ARM information on Spiceware's blog
The "Mostly Inclusive Atari 2600 Mapper / Selected Hardware Document" (dated 03/04/12) by Kevin Horton
Supercharger information from the Kevin Horton document above and also the
Reference for the ARM7TDMI-S, as used in the Harmony cartridge formats:
For detail about the Thumb instruction set the following document was preferred. Mnemonics used in the ARM disassembly are from this document:
Further information from the ARM Architecture Reference Manual:
Specific information about UXP ARM7TDMI-S
Thumb-2 information in the ARM Architecture Reference Manual Thumb-2 Supplement
and the "ARMv7-M Architecture Reference Manual" can be found at:
In relation to ARM development, information about the DWARF format is being taken from the DWARF2 and DWARF4 standards
Other Software / Libraries
The following projects are used in the
- licensed under the Font Awesome Free License
- licensed under the MIT License
- licensed under the OFL-1.1 License
Bother 6502.ts and Stella were used as reference for the Audio implementation.
Some ideas for the fragment shader taken from:
The Festival Speech Synthsis System is an optional program that can be run alongside the emulator for AtariVox support
Personal Thanks and Acknowledgements
At various times during the development of this project, the following people have provided advice and encouragement: Andrew Rice, David Kelly. And those from AtariAge who have provided testing, advice and most importantly, encouragement (alphabetically): alex_79; Al Nafuur; Andrew Davie; DirtyHairy; John Champeau; MrSQL; Rob Bairos; Spiceware; Thomas Jenztsch; ZeroPageHomebrew