Kjetil's Information Center: A Blog About My Projects

ASCII Atari 2600 Emulator

Here is another emulator called "atarascii" that can run in a Linux terminal using curses, this time targeting the Atari 2600 system. Much inspiration and code is based on my earlier work on the lazyboNES emulator. Compared to the NES graphics handled by it's PPU, the Atari 2600 and it's TIA graphics chip is quite different. The NES PPU is based around a tile-set that is updated each frame, but the TIA uses some simple registers that are updated for every scanline.

The Atari 2600 TIA can output 228 visible scanlines of video, so this emulator uses some approximation to fit this into lines/rows on the terminal. A classic terminal has only 24 lines/rows, but by using an X terminal the font size can be reduced and the window size increased to fit everything if needed. To improve a little bit on the possibly reduced screen real estate, the vertical blanking scanlines are also filtered out by default. Wether or not high graphics fidelity is needed depends entirely on the game. Make sure to run with a 256-color supported terminal for the best experience. The color palette should match well with the default "xterm-256color" and "rxvt-unicode-256color" types at least.

The emulator also depends on SDL2 for audio and input support. It is highly recommended to use a joystick/gamepad through SDL2 to play, since the keyboard input on the terminal is sketchy and not possible to emulate fully. Audio is supported but not entirely accurate since part of the implementation has been simplified. Video output on SDL is also possible and is shown in parallel with the terminal output. A CSV file can be used for TAS input as well.

ROM cartridge support is currently limited to the most common 2K, 4K and 8K sizes. I have only tested a handful of games and have no idea about the extent of compatibility. Pressing Ctrl+C in the terminal will break into a debugger where various data can be dumped, including a CPU trace.

You can download version 0.1 here or check the GitHub repository which might be updated.

Some screenshots:

Pitfall in atarascii

Yars Revenge in atarascii

Adventure in atarascii


Here are some video demos of "Dragster", "Tennis" and "River Raid".

Topic: Open Source, by Kjetil @ 03/02-2023, Article Link