Atari 2600/VCS#

VCS Specifications#

Lifespan

1977–1992

Media

ROM cartridge (2K-64K)

CPU 8-bit

MOS Technology 6507 @ 1.19 MHz

Memory

128 bytes RAM (can be expanded by cartridge)

Controllers

Joystick, paddles, driving, keypad, Trak-Ball

Best-selling game

Pac-Man

Atari 2600 (by Evan-Amos, CC-BY-SA 3.0)

History#

Atari was founded by Nolan Bushnell and Ted Dabney in 1972 to commercialize video games, which were at this time only found in university basements. They developed the arcade games Computer Space and Pong, the latter becoming a huge success. They also developed more complex games like Tank which included a ROM chip.

Atari developed a Pong home console, but wanted to develop a console that could play more than one game. In 1975 MOS Technology announced the 6502 CPU, which at $5 (volume pricing) made a programmable home console feasible. To save money on RAM, they’d omit the typical frame buffer, relying on the 6502 to program the TIA chip right before each scanline.

By 1974, Atari had acquired Cyan Engineering, and hired Joe Decuir to help debug the first prototype, codenamed “Stella”, and to demonstrate that it could play Tank (later released as the Combat cartridge.) Jay Miner worked on the ASIC design for the TIA chip, and they completed the second prototype by March 1976. The final system included these chips:

  • 6507, a cost-reduced 6502 in a 28-pin package.

  • 6532, with 128 bytes of RAM, 16 I/O ports, and a programmable timer

  • TIA, which generates video and audio

  • a 2K or 4K ROM via cartridge slot

Bushnell considered taking Atari public but instead sold the company to Warner Communications for US$28 million; subsequently, Warner provided approximately US$100 million in new funding, allowing Stella to be prioritized and fast-tracked.

The Atari VCS (Video Computer System) was released in time for Christmas 1977 at $199 ($840 adjusted for inflation), and shipped with two joysticks and a Combat cartridge. Other launch titles included Air-Sea Battle, Basic Math, Blackjack, Indy 500, Starship, Street Racer, Surround, and Video Olympics.

The VCS was the best-selling console during the 1979 holiday season, with more than 1 million units sold. It helped Atari earn more than $2 billion in 1980. In 1982 it was rebranded the Atari 2600.

Activision, formed by four former Atari VCS programmers, led the vanguard of third-party game development thanks to a victory in court. But changing market conditions made the boom short-lived. By mid-1984, software development for the 2600 had essentially stopped except for that of Atari and Activision. Atari’s Consumer Division was sold to Commodore founder Jack Tramiel, who shifted the business’ focus to home computers and ended all development of console games.

Programming#

Because of the precise timing required, the VCS is usually programmed in 6502 assembly language. A “kernel” runs while the video signal is active, setting up the TIA for each scanline. Other game logic usually runs during the blank portions of each frame.

batariBASIC is also available.

Registers (vcs.h)#

Hex

Name

Bit Mask

Description

00

VSYNC

......x.

Vertical Sync

01

VBLANK

xx....x.

Vertical Blank / Latched Port Enable

02

WSYNC

strobe

Wait for Horizontal Blank

04

NUSIZ0

..xx.xxx

Number-size Player/Missile 0

05

NUSIZ1

..xx.xxx

Number-size Player/Missile 1

06

COLUP0

xxxxxxx.

Color – Player/Missile 0

07

COLUP1

xxxxxxx.

Color – Player/Missile 1

08

COLUPF

xxxxxxx.

Color – Playfield/Ball

09

COLUBK

xxxxxxx.

Color – Background

0A

CTRLPF

..xx.xxx

Control Playfield, Ball

0B

REFP0

....x...

Reflect Player 0

0C

REFP1

....x...

Reflect Player 1

0D

PF0

xxxx....

Playfield 0 (pixels 0-3)

0E

PF1

xxxxxxxx

Playfield 1 (pixels 4-11)

0F

PF2

xxxxxxxx

Playfield 2 (pixels 12-19)

10

RESP0

strobe

Reset Player 0

11

RESP1

strobe

Reset Player 1

12

RESM0

strobe

Reset Missile 0

13

RESM1

strobe

Reset Missile 1

14

RESBL

strobe

Reset Ball

15

AUDC0

....xxxx

Audio Control Channel 0

16

AUDC1

....xxxx

Audio Control Channel 1

17

AUDF0

...xxxxx

Audio Frequency Channel 0

18

AUDF1

...xxxxx

Audio Frequency Channel 1

19

AUDV0

....xxxx

Audio Volume Channel 0

1A

AUDV1

....xxxx

Audio Volume Channel 1

1B

GRP0

xxxxxxxx

Graphics Bitmap Player 0

1C

GRP1

xxxxxxxx

Graphics Bitmap Player 1

1D

ENAM0

......x.

Enable Missile 0

1E

ENAM1

......x.

Enable Missile 1

1F

ENABL

......x.

Enable Ball

20

HMP0

xxxx....

Horizontal Motion Player 0

21

HMP1

xxxx....

Horizontal Motion Player 1

22

HMM0

xxxx....

Horizontal Motion Missile 0

23

HMM1

xxxx....

Horizontal Motion Missile 1

24

HMBL

xxxx....

Horizontal Motion Ball

25

VDELP0

.......x

Vertical Delay Player 0

26

VDELP1

.......x

Vertical Delay Player 1

27

VDELBL

.......x

Vertical Delay Ball

28

RESMP0

......x.

Reset Missile 0 to Player 0

29

RESMP1

......x.

Reset Missile 1 to Player 1

2A

HMOVE

strobe

Apply Horizontal Motion (fine offsets)

2B

HMCLR

strobe

Clear Horizontal Motion Registers

2C

CXCLR

strobe

Clear Collision Latches

30

CXM0P

xx......

Collision M0-P1, M0-P0

31

CXM1P

xx......

Collision M1-P0, M1-P1

32

CXP0FB

xx......

Collision P0-PF, P0-BL

33

CXP1FB

xx......

Collision P1-PF, P1-BL

34

CXM0FB

xx......

Collision M0-PF, M0-BL

35

CXM1FB

xx......

Collision M1-PF, M1-BL

36

CXBLPF

x.......

Collision BL-PF

37

CXPPMM

xx......

Collision P0-P1, M0-M1

38

INPT0

x.......

Dumped Input Port 0

39

INPT1

x.......

Dumped Input Port 1

3A

INPT2

x.......

Dumped Input Port 2

3B

INPT3

x.......

Dumped Input Port 3

3C

INPT4

x.......

Latched Input Port 4

3D

INPT5

x.......

Latched Input Port 5

80-FF

xxxxxxxx

128 Bytes RAM

0280

SWCHA

xxxxxxxx

Joysticks/Controllers

0281

SWACNT

xxxxxxxx

Port A DDR (Data Direction Register)

0282

SWCHB

xxxxxxxx

Console Switches

0283

SWBCNT

xxxxxxxx

Port B DDR (hardwired as input)

0284

INTIM

xxxxxxxx

Timer Output

0294

TIM1T

xxxxxxxx

Set 1 Cycle Timer

0295

TIM8T

xxxxxxxx

Set 8 Cycle Timer

0296

TIM64T

xxxxxxxx

Set 64 Cycle Timer

0297

T1024T

xxxxxxxx

Set 1024 Cycle Timer

Macros (macro.h)#

CLEAN_START

Standardised start-up code at start of program.

VERTICAL_SYNC

Inserts the code required for a proper 3 scanline vertical sync sequence. Modifies A.

SLEEP n

Sleep n cycles.

SET_POINTER variable constant

Set a 2 byte pointer to an absolute address. Modifies A.

SKIP_SCANLINES n

Skip a given # of scanlines. Sets X to 0.

Extra Macros (xmacro.h)#

TIMER_SETUP lines

The timer will be set so that it expires before lines scanlines. A WSYNC will be done first.

TIMER_WAIT

Use with TIMER_SETUP to wait for timer to complete. Performs a WSYNC afterwards.

Comments