This is an old revision of the document!


Cartridges

In the Astrocade's memory map, 8KB ($2000–$3FFF) is allotted to interchangeable cartridges (otherwise known as cassettes or Videocades).

Cartridge Memory Diagram

System Sentinel

The system sentinel byte may be one of two values indicating the cartridge type: standard or autostart.

Standard

The bulk of commercial Bally Arcade programs use the standard cartridge format, which transfers control to the program after game selection from the standard system menu. The system does considerably more initialization before control transfer:

  1. System RAM is cleared to 0
  2. The ACTINT interrupt routine is enabled
  3. The MENU colors are set in the left color map
  4. Vertical blank is set at line 96, horizontal boundary at 41, and interrupt mode at 8
  5. The screen displays the menu frame
  6. The shifter is cleared

A standard cartridge is indicated by a sentinel byte of $55 (or ASCII “U” for “User Mode”) at location $2000. Following this byte is the first node of the cartridge's menu data structure. This data structure gives the name and starting address of each program in the cartridge.

When the user selects a cartridge game, control transfers to the starting address with the address of the program name string in the registers. The cartridge program may then use the GETPAR system routine to prompt for game parameters (e.g., score to play to, game time limit, number of players).

Autostart

An autostart cartridge bypasses the standard Bally startup menu and jumps directly to the programmer-specified location. The only initialization that is performed before entry is the setup of the stack pointer to point just below system RAM and the establishment of “consumer mode” in the custom chips. RAM is not altered in this mode.

An autostart cartridge is indicated by a jump instruction (opcode $C3) at location $2000. This jump instruction should branch to the starting address of the cartridge.

Treasure Cove is one of the few commercial Bally Arcade cartridges that uses the autostart structure to jump immediately to a splash title screen.

write description

Restart Vectors

Restart vectors use the Z80's restart (RST) instruction to provide small, efficient CALLs to commonly-accessed subroutines. Two restart vectors are used, for example, to jump to program start on system reset (RST 0H) and execute the onboard system routines (RST 38H). Cartridges have access to six unused RST instructions residing in memory between $2007–$201B: RST8, RST16, RST24, RST32, RST40, and RST48.

Executing any of these instructions causes the program to jump to a location in memory. At that location, the user executes a jump instruction to vector the program to a new location. RST instructions are useful for optimization because they require less space and time (1 byte, 11 cycles) than an equivalent CALL (3 bytes, 17 cycles). RST pushes the PC onto the stack, so you can return with a RET call, and RST does not alter flags.

The Bally Arcade's reserved restart vectors are optional. Any unused vectors may be used for normal program memory.

Cartridge Memory Structure

Location Contents
2000 55 C3
2001,2 *Address of next menu table RST0 or RESET jumps to 2000
immediately after DI and outputs 00 to port 08.
2003,4 Address of this menu string literal
2005,6 Address to jump to if selected
2007 RST 8 jumps here.
200A RST 16H jumps here.
200D RST 24H jumps here.
2010 RST 32H jumps here.
2013 RST 40H jumps here.
2016 RST 48H jumps here.
2019 Player input routine (SENTRY) jumps here if location $4FFA contains 0AAH. [???]

*0218 = First onboard menu, 0000 = last menu.

Cartridge Series Numbers

Number Title ROM Size Date
Action / Skills Series
#2001 Zzzap / Dodgem 2K 1978
#2004 Clowns / Brickyard 4K 1978
#2007 Bally Pin 4K 1979
#2009 Astro Battle 4K 1979
#2017 The Incredible Wizard 1982
#2019 Cosmic Raiders 8K 1983
Sports Series
#3005 Astrocade Pinball (same as Bally Pin) 4K 1981
Educational Series
#4004 BioRhythm 4K 1981
Strategy Series
#5001 Amazin' Maze / Tic-Tac-Toe 2K 1979
#5002 Black Jack / Poker / Acey-Deucey 4K 1979
#5005 Artillery Duel 4K 1982
Functional Series
#6002 Bally BASIC 4K 1978
#6004 Bally BASIC (w/ tape interface) 4K 1981

[NM:72–4]

Reference: Bally On-Board ROM Subroutines [PDF]