test7800

command module
v0.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2026 License: GPL-3.0 Imports: 5 Imported by: 0

README

Test7800 is an experimental emulator for the Atari 7800. It's not complete and is missing some important features but it plays many of the 7800 ROM files that are available.

It supports a78 files, including non-bankswitching regular "flat" ROM files and several different bankswitching "supergame" ROM files. While it does not emulate all conglomerate cartridge hardware configurations, the POKEY chip and many of its layouts are supported.

Uniquely, Test7800 also supports the ELF cartridge type which makes use of an ARM chip embedded in the cartridge.

The 6502, TIA, RIOT and ARM emulations are taken from Gopher2600 and is therefore well tested. The implemenation of the MARIA is new to this project.

Basic Usage

Running the program from the desktop icon will open a file selection dialog. Opening a 7800 ROM will cause the emulation window to open.

When using the cursor keys control the stick and the space bar is the fire button. The 'B' key acts as the second fire button.

For gamepads, the d-pad or left analogue stick can be used and the face buttons are used for the joystick fire buttons. On an XBox 360 style controller the A and B buttons are the primary fire button and the X and Y keys are the secondary fire buttons

The Select, Start and Pause buttons on the console itself are emulated by the F1, F2 and F3 keys on the keyboard. For gamepad users the gamepad's Guide, Start and Back buttons can be used.

The mouse can be used for paddle and trackball input for those games that require it.

Debugger

A command line debugger is available if the program is run from a terminal. In this case, the ROM file should be specified as part of the command line (eg. test7800 centipede.a78). The debugger will start in a halted state. To run the emulation from this point, type RUN in the terminal.

Pressing Ctrl-C when the emulation is running will cause it to halt and to resume the debugger.

The debugger is currently very basic and missing a lot of features. However, some useful commands include STEP, RESET, CPU, MARIA, DL, DLL, VIDEO, INPTCTRL, RAM7800, RAMRIOT.

A useful option to the program is the -overlay argument. (eg. test7800 -overlay centipede.a78)). This adds an additional overlay to the TV screen, showing the state of the MARIA at each point in the display. The colours in the overlay are as follows

Colour Meaning
Red DMA Active
Blue WSYNC Active
Green CPU in Interrupt

By default, the NTSC BIOS is used. To select a PAL BIOS use the -tv argument (or -spec argument):

test7800 -tv=pal centipede.a78

BIOS

If you want the emulation to ignore the BIOS startup routine use the -bios option:

test7800 -bios=false centipede.a78

Alternatively, the checksum check can be skipped with the -checksum option:

test7800 -checksum=false centipede.a78

Both options are useful for running NTSC ROMs that have no been signed.

QuadTari

To enable QuadTari support use the -quadtari option:

test7800 -quadtari qtdemo.a78

By default, any attached controller or keyboard will be used for all player input. To change that, the -players option can be used.

For example, to specify that the second player uses the keyboard and the fourth player uses the first attached gamepad:

test7800 -quadtari -players=none,keyboard,none,gamepad qtdemo.a78

none indicates the player in that position has no controller. Instead of none you can also just leave that position empty. For example (making sure there are no spaces in the list):

test7800 -quadtari -players=,keyboard,,gamepad qtdemo.a78

Test7800 supports multiple gamepads. This means that gamepad can appear more than once in the -players list.

test7800 -quadtari -players=,gamepad,,gamepad qtdemo.a78

Multiple keyboards are not supported but keyboard can appear in the -players list multiple times. In thoses cases the physical keyboard will control all "keyboard" players equally.

The -players option also works without the -quadtari option and can be used to specify controllers for the first and second players.

Limitations and Future

This emulation was developed in order to gain an understanding of the Atari 7800 and so is missing many features. The debugger in particular only exists so that I could more easily debug the emulator itself during development. It probably isn't that useful for ROM development as it currently exists.

The ultimate plan is to combine this 7800 emulation with Gopher2600. However, it is proving to be a convenient stand-alone emulator and so is being released for general consumption. The integration with Gopher2600 will happen but probably not any time soon.

Performance

Because the emulator is currently only a test for future ideas it has not been written with performance in mind. No optimisation or perfomance analysis has been performed, with the exception of the automated use of profile guided optimisation. None-the-less, the emulator should run well on reasonably modern hardware. For comparison purposes, the development machine has an i3-3225 CPU running at 3.30GHz.

Resources Used

References to "7800 Software Guide" in comments are referring to this wiki page. This wiki is part of a larger set of 7800 related articles: Atari 7800 Development Wiki Home

7800 PAL OS source code

7800 Hardware Facts

Atari 7800 Difficulty Switches Guide

Common Emulator Development Issues

Has Anyone Worked on an FPGA Atari 7800?

A78 Primer

A78 Header Specification

Bank Switching Specifics

Two Button Controllers

Trakball Field Service Manual

Trakball Schematics

QuadTari Development Guide

POKEY

POKEY C012294 Documentation

Altirra Hardware Reference Manual, Chapter 5

POKEY implementation in the Altirra emulator

Original Atari document for POKEY

POKEY schematics

High Score Cartridge

HSC BIOS Disassemblies

Initial SRAM contents

Test ROM

Game Values

Acknowledgements

Zachary Scolaro helped with the MARIA emulation, particular to get it off the ground when I wasn't sure about it at all. And Rob Tuccitto has provided much advice and links to information about the 7800 internals. Thanks to both.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package coprocessor contains the helper functions for cartridge coprocessors.
Package coprocessor contains the helper functions for cartridge coprocessors.
faults
Package faults records memory faults generated by a coprocessor.
Package faults records memory faults generated by a coprocessor.
Package crunched provides the Data interface.
Package crunched provides the Data interface.
gui
arm
Package arm imlplements the ARM7TDMI instruction set as defined in the ARM7TDMI Instruction Set Reference:
Package arm imlplements the ARM7TDMI instruction set as defined in the ARM7TDMI Instruction Set Reference:
arm/architecture
Package architecture defines the Map type that is used to specify the differences in cartridge and ARM archtectures.
Package architecture defines the Map type that is used to specify the differences in cartridge and ARM archtectures.
arm/rng
Package rng contains an implementation of a RNG peripheral found in some ARM CPU packages.
Package rng contains an implementation of a RNG peripheral found in some ARM CPU packages.
arm/timer
Package timer contains implementations of timer peripherals found in the various ARM CPU packages.
Package timer contains implementations of timer peripherals found in the various ARM CPU packages.
cpu
Package cpu emulates the 6507 microprocessor found in the Atari VCS.
Package cpu emulates the 6507 microprocessor found in the Atari VCS.
cpu/execution
Package execution tracks the result of instruction execution on the CPU.
Package execution tracks the result of instruction execution on the CPU.
cpu/instructions
Package instructions defines the table of instruction for the 6507.
Package instructions defines the table of instruction for the 6507.
cpu/registers
Package registers implements the three types of registers found in the 6507.
Package registers implements the three types of registers found in the 6507.
cpu/registers/test
Package test contains functions useful for testing CPU registers.
Package test contains functions useful for testing CPU registers.
cpu/tests/klaus2m5
Package klaus2m5 contains the various 6502 functional tests as created/maintained by Klaus Dormann.
Package klaus2m5 contains the various 6502 functional tests as created/maintained by Klaus Dormann.
memory/external/elf
Package ace implements the ELF cartridge mapper.
Package ace implements the ELF cartridge mapper.
memory/external/hsc
Package hsc implements the high-score cartridge shim for the 7800.
Package hsc implements the high-score cartridge shim for the 7800.
peripherals/savekey
Package savekey implements the SaveKey external memory card.
Package savekey implements the SaveKey external memory card.
peripherals/savekey/i2c
Package i2c facilitates the reading of i2c data for the SaveKey (and AtariVox) peripherals.
Package i2c facilitates the reading of i2c data for the SaveKey (and AtariVox) peripherals.
pokey
Package pokey implements the audio generation of the POKEY.
Package pokey implements the audio generation of the POKEY.
tia
tia/audio
Package audio implements the audio generation of the TIA.
Package audio implements the audio generation of the TIA.
tia/audio/mix
Package mix is used to combine two distinct sound sources into either a mono or stereo signal.
Package mix is used to combine two distinct sound sources into either a mono or stereo signal.
Package logger is the central log repository for gopher2600.
Package logger is the central log repository for gopher2600.
Package resources contains functions to prepare paths for test7800 resources.
Package resources contains functions to prepare paths for test7800 resources.
fs
Package fs is an abstraction for OS/filesystem functions that may be missing or require special handling.
Package fs is an abstraction for OS/filesystem functions that may be missing or require special handling.
unique
Package unique contains functions that compose filenames that should be unique on the filesystem.
Package unique contains functions that compose filenames that should be unique on the filesystem.
Package test contains helper functions for standard Go testing.
Package test contains helper functions for standard Go testing.
Package version provides a version string that can be used to indicate the version number of the project.
Package version provides a version string that can be used to indicate the version number of the project.
httpd command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL