6502 by dbhqGitHub

All machines

Atari 2600

1977, Atari, 6507 at 1.19 MHz (NTSC), 1.18 MHz (PAL).

Acceptance test Atari2600AcceptanceTests: 181 passing.

It models the picture, drawn a colour clock at a time as the TIA draws it; the TIA's two sound channels; two joysticks and the console switches; NTSC and PAL; and the cartridge boards 2K, 4K, F8, F6, F4 and FA, and F8, F6 and F4 with the Superchip, chosen by the file's size.

An original Atari 2600 from the front left and a little above, on white: a black case with a ribbed top and a wood-grain front, and across the back a raised panel edged in orange with six silver switches, labelled power, tv type, left difficulty, right difficulty, game select and game reset, either side of the empty cartridge slot.
Photograph: an original six-switch Atari 2600, the model its file page calls the Light Sixer, taken 22 November 2014.By Evan-Amos. Source: commons.wikimedia.org. Licence: Public domain. Changes: resized and converted to WebP for this page.

The machine

The picture is the machine's own, pixel for pixel, as its TIA draws it, through a palette computed from each region's colour signal, in the region's pixel shape, wide and short. It models the picture and is not a CRT: no scan lines, glow, curve or colour bleed. A frame shorter or longer than a television's is shown as it is.

With the screen focused, joystick 1 is Up arrow, Down arrow, Left arrow, Right arrow to move and Space to fire, and joystick 2 is W, S, A, D and F. R holds Reset and T holds Select; C flips the colour switch, 1 the left difficulty and 2 the right. Tab moves on and Escape lets go, so the page never keeps the keyboard. Gamepads work too, in the browser's standard layout: the first is joystick 1 and the second joystick 2. The d-pad or the left stick moves, the bottom face button fires, and the middle pair are Select and Reset. Every key held goes to the machine as it is, opposite directions together included.

The Atari 2600 runs in your browser and needs JavaScript. Without it, the page is shown, but nothing runs.

Sound is off.

The console switches

Reset and Select are held while pressed and spring back, as on the console. The colour switch (C) and the two difficulty switches (1 and 2) flip on each press and stay; each button says where its switch is. Power off and on leaves them as they are.

The region

A cartridge has nothing in it to say which region it was made for, so the machine starts as NTSC. Changing the region changes the colours and the clock at once, with no restart.

The cartridge

Start puts 2048 2600 in.

Drop a cartridge file on the page, or press Load a cartridge file. It is read in this tab and is not uploaded anywhere. A cartridge file has no header, so the board is chosen by the file's size, and the line above says which. A game made for another board of the same size will not run: choosing the board from the file itself is issue 126.

The game in it is 2048 2600, by Carlos Duarte do Nascimento (Chester), under the MIT licence. Commercial games are not bundled and never will be: load your own. Full rights: Whose game this is.

The Atari 2600 has no frame buffer: its program draws each line as the beam crosses the screen. So its picture chip, the TIA, runs one colour clock at a time, three for every CPU cycle. That takes a fast computer to run at full speed. The line under the screen says how fast this browser runs it, measured while it runs, and a computer that cannot keep up runs it slower than the real console and says so. Making it faster is issue 130.

NTSC and PAL, the two regions

The console was made for both kinds of television: NTSC, the console of North America and Japan, and PAL, the console of Europe and Australia, whose clock is a little slower and whose games draw more lines a frame. A cartridge file does not say which it was made for, so the machine starts as NTSC. The lines under the region control give the lines the last frame had, and suggest PAL when a game's frames are PAL's length, but the page never changes the region by itself. Changing it changes the colours and the clock at once, with no restart.

Try it

Start puts 2048 2600, by Carlos Duarte do Nascimento (Chester), in the console and switches it on. The acceptance test boots the same cartridge, from the same file, and checks its picture against the one recorded.

  1. Press Start on the page.

    The machine switches on with 2048 2600 in it. The title shows the tiles in two rows, 2, 0, 4, 8 over 2, 6, 0, 0, the tiles changing colour every frame, with the author's handle, CHEST over ERBR, below them.

  2. Press the left fire button.

    A one-player game starts: a grey board of four by four cells with one 2 tile, and the score, at zero, above it.

  3. Push the joystick up, down, left or right.

    Every tile slides as far as it can that way. Two equal tiles that meet join into one of twice the value, and a new tile appears. The game ends when no move is left.

  4. On the title, press the right fire button or GAME SELECT.

    The right fire button starts a two-player game, the players taking turns on one board. GAME SELECT switches between the one-player and two-player game, and the game it chooses starts at once.

  5. If the page is set to PAL, flip the colour switch to black and white.

    The game makes PAL frames only with the switch at black and white, as its author's README says. At colour it makes NTSC frames.

The controls in 2048 2600
On the consoleWhat it doesOn your keyboard
JoystickShifts every tile on the board one wayUp arrow, Down arrow, Left arrow and Right arrow
Left fire buttonOn the title, starts a one-player game; when a game is over, starts it againSpace
Right fire buttonOn the title, starts a two-player game; when a game is over, starts it againF
GAME SELECTSwitches between the one-player and two-player game, which starts at onceT
Colour switchAt black and white the game makes PAL frames; at colour it makes NTSC framesC

2048 2600 is by Carlos Duarte do Nascimento (Chester), with PAL support by SvOlli and a fix by Ben Combee, under the MIT licence. It is a port of 2048 by Gabriele Cirulli. The cartridge art, by Jenn Harrison, is not part of the game and is not shown here. Its licence: MIT.

To play something else, load your own cartridge file with the button under the screen, or drop it on the page. It is read in this tab and not uploaded. The board is chosen by the file's size. A file the machine cannot run is refused with the reason, and the game already in carries on.

About the Atari 2600

What is modelled, and what is not

Not modelled, each part with an issue that says what it would take:

  • SECAM, the third television colour system beside NTSC and PAL, and its console: issue 106
  • The paddles: issue 108
  • The keypads: issue 124
  • The driving controller: issue 125
  • Other peripherals: the trak-ball, the light gun, AtariVox and SaveKey: issue 127
  • The analogue picture, such as PAL's colour loss on frames with an odd number of lines: issue 128
  • Choosing the board from the image itself, not only from its size: issue 126
  • The cartridge boards beyond the ones modelled, listed below: issue 107

The cartridge boards that are not modelled, one issue each. A game made for one of them whose file is the size of a modelled board runs as that board, and does not work.

The 3D models, the outside and the board, are a project of their own: issue 129.

How it is checked

The acceptance test runs the test cartridges of missingno-vcs-tests, a suite for the console's chips, from this project's copy, in both regions. The tests the design trusts must pass: the chips' self-tests and the cartridge tests for the plain boards and F8, F6 and F4. The rest are recorded: the cartridge tests whose own notes say they are untested on a console or only report what they find, and the comparisons with the suite's reference pictures. The repository keeps what each recorded test gives, and a change fails the build. The tests for cartridge boards and for SECAM, which are not modelled, are not run. The acceptance test also starts 2048 2600 from power on in each region and checks its picture against the one recorded, pixel for pixel.

The suite's notes say its tests were checked on one console, a PAL console from Australia, and the TIA is known to behave differently from chip to chip and between models of the console. So a trusted result is the behaviour of the one console the suite was checked on, not of every Atari 2600. The suite's photographs of that console's screen are not compared yet: issue 162. Where this machine knowingly differs from the suite or the documents it was built from, the list of known differences says so.

The two photographs of the original, and their credits

Each is credited as its source gives it.

An original Atari 2600 from the front left and a little above, on white: a black case with a ribbed top and a wood-grain front, and across the back a raised panel edged in orange with six silver switches, labelled power, tv type, left difficulty, right difficulty, game select and game reset, either side of the empty cartridge slot.
Photograph: an original six-switch Atari 2600, the model its file page calls the Light Sixer, taken 22 November 2014.By Evan-Amos. Source: commons.wikimedia.org. Licence: Public domain. Changes: resized and converted to WebP for this page.
A later Atari 2600 from the front left, on white: a black and wood-grain case with four silver switches, POWER and TV TYPE at the left and GAME SELECT and GAME RESET at the right. In front of it is a joystick: a square black base with a black stick, an orange fire button and a ring of orange dashes marked TOP.
Photograph: a later four-switch Atari 2600 with wood veneer, which its file page dates to 1980 to 1982, and its standard joystick, taken 28 February 2011.By Evan-Amos. Source: commons.wikimedia.org. Licence: Public domain. Changes: resized and converted to WebP for this page.
Whose game this is

The Atari 2600 has no system ROM: the console runs whatever cartridge is in it. Commercial games are not bundled and never will be: load your own, which is read in this tab and not uploaded. The cartridge Start puts in is 2048 2600, by Carlos Duarte do Nascimento (Chester), a port of Gabriele Cirulli's 2048, which its author released under the MIT licence: his repository's LICENSE says "Copyright (c) 2014 Carlos Duarte do Nascimento (Chester)", and its source carries the same licence with a second line, "Original 2048 game Copyright (c) 2014 Gabriele Cirulli". Our copy is the author's own build, 2048.bin, unchanged, from his repository at commit 35de3c1b3b7bc4c3aadc8cf7fe630050a6984761: https://raw.githubusercontent.com/chesterbr/2048-2600/35de3c1b3b7bc4c3aadc8cf7fe630050a6984761/2048.bin, SHA-256 c85dc2204299b0a29209d3f80ae112678c171dab216719593625647d2436f1e1. The cartridge art, by Jenn Harrison, is not in the ROM and is not shown here. The game is kept in this repository under machines/atari-2600/cartridges/2048/, with its licence as its author published it and where it came from, and checked by SHA-256 each time it is read. Its notice is in NOTICE.md.

  • 2048 2600, by Carlos Duarte do Nascimento (Chester): the copy in the repository, SHA-256 c85dc2204299b0a29209d3f80ae112678c171dab216719593625647d2436f1e1

The game's folder, machines/atari-2600/cartridges/2048/, keeps its licence as its author published it, the MIT licence, and where it came from. The site checks it against its hash when it is built, and serves it beside the emulator.