6502 by dbhqGitHub

All machines

KIM-1

1976, MOS Technology, 6502, 1 MHz.

The keypad, the six LED digits, the RS and ST keys, the SST switch and both 6530s, with the original monitor ROM. Not modelled: the teletype interface, the cassette interface and the expansion bus.

Acceptance test Kim1AcceptanceTests: 6 passing.

An original KIM-1 board seen from directly above on a black background: a dark green circuit board with gold edge contacts on two tabs down its left side, three 40-pin chips at the top left, a column of eight memory chips, a crystal and the KIM-1 name at the top right, the six-digit display behind a dark filter, and the black keypad of 23 keys with its SST switch at the bottom right.
Photograph: an original MOS Technology KIM-1, on display at the Musée Bolo, EPFL, Lausanne, taken 24 August 2010.By Rama & Musée Bolo, cropped by Tomer T. Source: commons.wikimedia.org. Licence: CC BY-SA 2.0 fr.

The machine

The KIM-1 runs in your browser, and it needs JavaScript to do that. With JavaScript off, the keypad and the program below are shown, but nothing runs.

Try it

Type these keys in order, by clicking them or with the keyboard. After each line the digits should show what is written beside it: x is any digit, and blank means dark. This is the program the acceptance test types in, from the same file, so the two cannot disagree.

  1. RS

    Reset. The monitor starts and shows an address and the byte stored there.

    Shows xxxx xx

  2. AD17FADA00+1C

    Point the NMI vector at the monitor, at $1C00, so that ST can stop a program. The manual's section 4.6 asks for this before ST is used.

    Shows 17FB 1C

  3. AD0200DAAD+10+02+18+6D+11+02+8D+12+02+4C+0A+02

    Enter the program at $0200: LDA $0210, CLC, ADC $0211, STA $0212, then JMP $020A, which loops for ever.

    Shows 020C 02

  4. AD0210DA27+15

    Enter the two numbers it adds, $27 at $0210 and $15 at $0211.

    Shows 0211 15

  5. AD0200GO

    Run it from $0200. A running program does not scan the display, so the digits go dark.

    Shows nothing: dark

  6. ST

    Stop it. The monitor shows where the program stopped: the JMP at $020A.

    Shows 020A 4C

  7. AD0212

    Read the result at $0212: $27 plus $15 is $3C.

    Shows 0212 3C

With focus on the machine, the keys 0 to 9 and A to F on a keyboard press the same keys on the keypad.

Photographs of the original

The five photographs of the original KIM-1 that this page uses, each credited as its source gives it. Under each is what the 3D model above took from it.

An original KIM-1 board seen from directly above on a black background: a dark green circuit board with gold edge contacts on two tabs down its left side, three 40-pin chips at the top left, a column of eight memory chips, a crystal and the KIM-1 name at the top right, the six-digit display behind a dark filter, and the black keypad of 23 keys with its SST switch at the bottom right.
Photograph: an original MOS Technology KIM-1, on display at the Musée Bolo, EPFL, Lausanne, taken 24 August 2010.By Rama & Musée Bolo, cropped by Tomer T. Source: commons.wikimedia.org. Licence: CC BY-SA 2.0 fr.Used for the model: the tracks on the top face, as one of three photographs of it; the keypad's size and its keys' places, the display window, the crystal, the name and the red wire; and a check on where the chips sit.
The same KIM-1 board photographed from above its other end on black, so the keypad is at the bottom left, the edge connector along the top and the KIM-1 name at the bottom right, with a loose red wire running across the left of the board.
Photograph: the same board at the Musée Bolo, from its other end, taken 24 August 2010.By Rama & Musée Bolo. Source: commons.wikimedia.org. Licence: CC BY-SA 2.0 fr.Used for the model: the tracks on the top face, as one of three photographs of it, and the heights of the parts, by triangulation with the next photograph.
The same KIM-1 board photographed at a low angle from one corner, so that the heights of its parts show: the keypad's raised bezel, the display window, the crystal's can, the chips and the cream capacitors standing on the green board.
Photograph: the same board at the Musée Bolo, from a low corner, taken 24 August 2010.By Rama & Musée Bolo. Source: commons.wikimedia.org. Licence: CC BY-SA 2.0 fr.Used for the model: the heights of the parts, by triangulation with the photograph before.
Another original KIM-1 of the same revision, seen from directly above on white: a bright green board with yellow capacitors, two white ceramic chips and a purple one, the six separate LED digits and the black keypad.
Photograph: another MOS Rev B KIM-1, its component side, on a white ground, taken 17 March 2016.By Hans Otten's Retro Computing site, which does not name the photographer. Source: retro.hansotten.nl. Licence: no licence stated.Used for the model: the tracks on the top face, as one of three photographs of it: a different board, so where a part or the red wire hides a track on the Musée Bolo's, this one often shows it; and a check on where the chips sit.
The solder side of the same Rev B KIM-1, seen from directly above on white: green lacquer over tinned tracks, rows of solder joints where the chips' legs come through, and the gold edge contacts now on the right.
Photograph: the same Rev B board turned over: its solder side, taken 17 March 2016.By Hans Otten's Retro Computing site, which does not name the photographer. Source: retro.hansotten.nl. Licence: no licence stated.Used for the model: the tracks on the underside: the only photograph of it.

Whose ROM this is

The monitor ROM is MOS Technology's, copyright 1975, and MOS was bought by Commodore in 1976; who holds it now was not established, and no licence or permission from any holder was found. Our copy is Hans Otten's dump of real 6530-002 and 6530-003 chips, kept in this repository under roms/, with where it came from, and checked by SHA-256 each time it is read.

The ROM is kept in the repository, in roms/, with where it came from. It is checked against its hash when the site is built, and served from this site beside the emulator.