The Apple-1 Software Library Beta

Browse all the Apple-1 programs that ever existed. A tribute to history and their hackers.
Run them in any emulator, or instantly on the (real) machine.

Microchess

by Peter R. Jennings in 1976

Beat the machine in a game of chess.

assemblywithin 4k

Also referred to as MicroChess, Micro-Chess or Micro Chess.

History

Initially this game was developed for the KIM-1, a single-board computer launched in 1976. In this same year, and being the result of six months of programming, Peter R. Jennings created a program that enabled a human to play chess against this machine.

At the end of 1976, the KIM-1 User Notes announced this chess-playing program running within 1K of memory. Peter Jennings writes on his website:

It was a program to bring the KIM-1 to life. Something to show friends and relatives that it was not just a toy, or a useless pile of wires and blinking LEDs, but a powerful computer, capable of playing chess.

A couple of months later Peter founded Micro-Ware Ltd and the game was ported to other micros like the Altair 8800, IMSAI 8080, TRS-80, Commodore PET, Sol 20 and the Apple ][. Eventually, several million copies were sold.

Porting

Home computer owners, like Larry Nelson, were marvelled at the game. He adapted the original KIM-1 version to make it work on his Apple-1. He stated in an interview:

A fellow named Peter Jennings wrote a chess-playing program for the KIM-1 computer, another 6502-based microcomputer. I sent off for a listing of his program and successfully adapted it to the Apple I.

At the time, Larry created a battle between two instances of Microchess, as mentioned here:

... on his Apple-1, and then used that computer to challenge the Micro-Chess program on his Radio Shack TRS-80. (As he recalls, the contest was a draw.)

In a recent e-mail conversation with Peter Jennings, he looks back at those days:

Although Micro-Ware did the porting to the TRS-80, Apple ][ etc, the Apple I port would have been done by an interested user based on the source code from the KIM-1 version. Instructions there were sufficient to make it run on any 6502 computer in its KIM-1 style. There were lots of home brew 6502 computers and some little known commercial ones. Owners of those computers would do their own ports and sometimes tell us about it or write it up in newsletters. Mostly they just did it and kept it to themselves.

Instructions

For beginners, learn how to play chess using this tutorial or read more about it here.

The chess board of Microchess uses a coordinate system, see the table below.

                  COMPUTER                        PIECE EXAMPLES
   ---------------------------------------
y | 00 | 01 | 02 | 03 | 04 | 05 | 06 | 07 |      
  |----+----+----+----+----+----+----+----+     WK = White King
A | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |     WQ = White Queen
x |----+----+----+----+----+----+----+----+     WB = White Bishop
i | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
s |----+----+----+----+----+----+----+----+
  | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 |
  |----+----+----+----+----+----+----+----+
  | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 |
  |----+----+----+----+----+----+----+----+
  | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 |     BN = Black Knight
  |----+----+----+----+----+----+----+----+     BR = Black Rook
  | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 |     BP = Black Pawn
  |----+----+----+----+----+----+----+----+
  | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 |
   --------------------------------------- 
                   PLAYER           x Axis

To make a move, a from and to coordinate has to be entered. The Computer plays at the top side. The pieces on the chess board are indicated by two letters: the first letter meaning Black or White, the second stands for its type. See above for examples.

Quick start

  • Press 0 for normal level of play.
  • Press RETURN for random opening and to not use default chess openings.
  • Press G to start a new game, the chess board is being drawn with all pieces in their regular starting positions.
  • Move a piece by using the coordinates (see table above) from yx and to yx followed by M.
    • For example, typing 6747M moves the right most Black Pawn two places forward.
    • The Computer acknowledges the move by printing it, like BP 67 47.
    • Press RETURN to tell the Computer to make a move.
  • After some thinking, the board is redrawn and shows the moves of both the Player and the Computer. The move of the Computer is printed below the board, like WP 13 33.
  • Player's turn, type in the move command again.

Options and commands

After the game starts, the level of play can be selected. Press 0 for Normal, 1 for Blitz or 2 for SuperBlitz. The higher the number, the lower the quality of the Computer's play and the quicker it will make a move.

Optionally, one of the chess openings can be selected by number 0-9. A chess opening consists of a fixed set of moves by the Black and White. Selecting an opening does not have effect on the initial setup of the pieces, these always have the normal starting position.

Note that when selecting the Computer to play Black, R has to be used to reverse sides before starting to play. Skip the use of a default opening by pressing RETURN, the Computer then plays a random opening.

Command Description
G New game.
R Reverse sides. The Computer always stays at the top side, but the chess board is rotated 180 degrees.
P Prints the current chess board.
yxyxM Moves a piece. For example, typing 6040M moves the left most Pawn two steps forward.
RETURN Pressed after the Player's move is confirmed to tell the Computer to make a move.
L Start over and go to the opening screen.
Q Quit and return to Wozmon.

Notice these commands are different from the ones listed in the original manual for the KIM-1 version of this game.

References

Screenshot of Microchess

Historical reference : hardware

In 1976, the Apple-1 Computer was advertised for $666.66 and came with 4K of on-board memory. For a $120 extra, this doubled to 8K of RAM. The provided Operation Manual included the circuit diagram and assembly code of the monitor program, also called Wozmon.

The Apple-1 Computer main board
The Apple-1 Computer main board.

The Cassette Interface (or ACI) was used to load and save programs from cassette tape. The ACI Manual showed how to install it (the main board had to be jumpered correctly) and explained how it had to be used. Priced at $75, it included a cassette of Apple BASIC.

The Apple-1 Cassette Interface or ACI
The Apple-1 Cassette Interface or ACI.
Cassette with Apple BASIC
Cassette with Apple BASIC.

Software

Its BASIC was written by Woz himself. It did not support floating point arithmetic, but was tiny enough to fit in 4K of memory. The software itself was free. The Preliminary Apple BASIC Users Manual explained how to write your own games and programs with it.

Cassette tapes could be bought as an original accessory to your new Apple-1. A total of nine programs were available and listed $5 each. Pick one below and go back in time.

At the time, people were also inspired by publications like 101 BASIC Computer Games. They spent their evenings and nights to key-in the games, but soon were disappointed to discover that some of these did not work at all because of the missing floating points... Arghh.

Dive deeper? Read more here and here.

How to emulate?

It is easy to run the software with one of these emulators:

View a comparison of emulators here.

...and run a program

First, start the emulator of choice and have it run Wozmon (or BASIC), then use the Wozmon button to copy-paste the program code into the emulator.

For example: open Apple 1js in another browser tab. Hit CLS to clear the screen and RESET to enter Wozmon. Then paste the copied Wozmon code from this website.

In-website transfer to an Apple-1 Order now!

This website can connect directly (and locally) to the Keyboard Serial Terminal from 8BitFlux.com. It uses the Web Serial API for this and is supported by Chrome or Edge browsers. The Wozmon code of any program can be transferred quickly.

The Keyboard Serial Terminal connected to an Apple-1
The Keyboard Serial Terminal connected to an Apple-1.

Use the Serial button to transfer the current program to the Apple-1. For example, BASIC takes around 20 seconds to transfer at a speed of 57.6 kbps. The board is compatible with the higher-speed TurboType™ format (with CRC check).

After the transfer of the game or program, switch over to the normal Apple-1 keyboard (by pressing a button) and enjoy it. This makes also a great kit for museums and public events. Kits available now »

Further exploration

  • Talk on Applefritter, the home ground of the Apple-1 Owners Club.
  • For an anarchistic collection of Apple docs and software see the Asimov FTP.
  • Antoine's collection of Apple cassettes, with scans and audio extracts of the tapes.
  • The Apple-1 Registry keeps track of all real Apple-1 machines that ever existed.
  • The story of a homebrew Apple-1 computer by Bryan.
  • Vince Briel's GitHub repository has all the information on his Replica 1.
  • P-Lab lists interesting Apple-1 projects on his website.
  • San Bergman's website has a lot of well-documented information on the Apple-1, from its internal workings to programming it in assembly.
  • Take the online course in 6502 assembly language programming.

Credits

This library is an initiative of 8BitFlux.com. It can be put to full use with a Keyboard Serial Terminal adapter board, which let you run software instantly on a (real) Apple-1.

The textual descriptions and screenshots of the programs on this website are licensed under CC BY 4.0

Many thanks to Uncle Bernie for his support and provision of his TurboType™ algorithm, which is part of his Apple-1 Toolchain. Last but not least, all this was not possible by all the authors of Apple-1 software and emulators. The hobby computer enthusiasts of the past, but also people of the present, who keep this hobby so alive. Thank you all.

Disclaimer

This website is not associated with Apple Inc. in any way.

It tries to be a tribute to (their) history. It wants to list only software that is already considered to be in the public domain, or its license permits further publication. The (online) sources of the program and other references are listed when known.

Mistakes happen, as this website is not generated by any AI, please report any nonconformities.

Like it?

Buy me a ☕ coffee.

Check out my products, or just spread the word! Incorrect or missing content can be reported here. Thanks!

No trackers and zero cookies 🍪

Made behind an 🍎 in The Netherlands.