Atari 2600 Public Domain Skeleton Code
This repository contains a minimal test program for the Atari 2600 VCS, written in 6502 assembly code, in the Ophis assembler format. It assembles to a 4 kilobyte ROM image which can be burned onto a cartridge EPROM, or used with an Atari 2600 emulator such as Stella. It displays a single "player" sprite with a fixed size at a fixed location.
The source code is entirely in the public domain. It is based on Chris Cracknell's Atari 2600 clock, which is also in the public domain.
(Yes, this is actually in the actual public domain. This is in contrast to how the term "public domain" is misused by many retro/homebrew enthusiasts to mean "you can download it". So, you are free to copy this code and use it as the basis of a more elaborate program -- even a game you intend to sell. You don't even have to mention where the program originally came from. See the file UNLICENSE for more information.)
The source code is somewhat documented, but note that it assumes you are familiar with assembly language and 6502 programming and, more importantly, it may contain inaccuracies. I'm doing this in part to teach myself Atari 2600 programming, so I don't necessarily understand this stuff well yet. The canonical guide for understanding how to program this architecture is the Stella Programmer's Guide and I strongly recommend you refer to it rather than relying solely on my lousy comments!
The program has only been tested on the Stella emulator, not on a real Atari 2600.
Some slightly more sophisticated examples, based on the skeleton, are also included. To build and run (on Stella) one of these examples, run the following from the root directory of this distribution:
joystick or the basename of one of the other
files in the