KIM-1 @ Retrobits

This is my personal homage to the Commodore and MOS Technology KIM-1
single-board microcomputers, fascinating relics of computing history long
since past, and a throwback to good-old-fashioned bare metal programming.
As the proud owner of three working KIM-1 systems (Revision A,
Revision D and Revision F) and the author and
maintainer of the Incredible KIMplement emulator,
I continue to discover new and impressive ways to wring utility and fun
out of a diminutive 1MHz, 1K computer-on-a-board. This site is designed to
offer resources to the new enthusiast, options for emulation, support for
current owners and ideas for further exploration. Please contact me at ckaiser@floodgap.com with any suggestions,
additional tips or software you've come up with,
or just to chat about these fine old units. -- Cameron Kaiser

Are you getting rid of KIM-1 equipment or
peripherals? Please don't throw it away!
E-mail me and let's see if
we can give it a new home! In particular, I am looking for a KIM-4 and a
Visable board, but anything accepted. Let me know your desired arrangements,
and it goes without saying that I will gladly cover any shipping, time and
inconvenience.

What's a KIM-1?

The MOS Technology KIM-1,
renamed the Commodore KIM-1 after MOS was purchased
by Commodore Business Machines
(the same Commodore that produced the famous Commodore 64 and Commodore Amiga
computers), is a single-board microcomputer designed around the MOS 6502
CPU released in 1975. For those not familiar with the 6502, it (or a customized
variant)
is the microprocessor powering all 8-bit Commodore computers, including the
Commodore 64, VIC-20 and 128; the Apple I, II and III series except the IIgs
(which used the 16-bit 65816);
all Atari 8-bits including the computer line, the Atari Lynx and the VCS
2600, 5200 and 7800; the Nintendo Famicom a/k/a NES (the Super NES also
used the 65816 in a variant form); the TurboGraphix-16;
and the BBC Micro series, among others.

The KIM-1 was made to allow engineers to become familiar with the 6502, which
was as released a completely different architecture. Previously, Chuck Peddle,
MOS' primary engineer, had developed an earlier 6501 microprocessor that was
fully pin- and bus-compatible
with the well-known Motorola 6800. However, MOS was
able to manufacture the 6501 at extremely high yields due to their
repairable mask process; this meant the 6501 could hit the market at a
rock-bottom price and undercut Motorola and Intel
significantly. Naturally, Motorola was quite
unhappy about the prospect of a cheap drop-in replacement for their CPUs and
immediately sued, winning after a protracted court battle.
To counter this, Peddle converted the 6501 into
the "lawsuit-compatible" 6502, essentially by merely
rearranging the pinout, but this left MOS with a part that could not simply
be dropped into existing designs without work. As an enticement to other
engineers, MOS threw
together a small evaluation board, slapped a 6502, I/O chips, a basic monitor
program and 1K (one kilobyte) of RAM on it, and
released that as the KIM-1 kit for just $245.

What Peddle didn't expect was that hobbyists, not engineers, would be the
KIM's greatest audience. At one of the lowest prices for a computer kit (due
to the 6502's extremely low price: just $25, compared with $179 for a 6800 or
an Intel 8080), a computer enthusiast could put together a complete,
state-of-the-art home system with teletype and tape drive -- both
directly supported by the KIM-1's ROM --
for less than $500. The immensely open architecture fostered a burgeoning
community of software authors, hardware developers and expansion options;
despite this, however, MOS Technology continued to suffer under the cost of
the Motorola lawsuit and the collapse of the calculator industry and sold
out to Commodore Business Machines in 1976. Commodore, wisely, continued to
produce the KIM-1 for several more revisions due to its continued popularity
until around 1979. Board versions through Revision G are known.

The KIM-1 is closely related to other 6502-based single-board computers,
including the Rockwell TIM (JOLT), the Rockwell AIM-65 and the Synertek SYM-1.
These will only be discussed here in the context of comparison to the KIM-1.

What features does a KIM-1 have?

Out of the box, a KIM-1 features one kilobyte of RAM (1024 bytes),
not counting the small amount of additional memory in the RIOTs;
a 6502 CPU running at a clock speed of
one megahertz; two dedicated RAM, ROM, I/O and
timer chips (hence the acronym "RIOTs"); a hexadecimal keypad for data
entry; and six seven-segment LEDs. It also has application connectors for
cassette tape and an external teletype, or other devices compatible with the
bus. A simple monitor program for data entry and driving the optional
teletype and cassette drive is built-in.
You add your own power supply and case.

What can I do with a KIM-1?

The very popular First Book of KIM by Jim Butterfield, Stan Ockers
and Eric Rehnke lists these popular applications: many, many simple games
(including quite a few that play purely on the LEDs themselves) such as
Microchess, assemblers and disassemblers such as MicroAde, multiple
interpreters such as Tiny BASIC
and FOCAL, text editors and mathematics
packages. Also, due to the KIM's open and well documented architecture, many
hardware projects have been built for it from simple monitoring circuits and
tripwires all the way up to complex data acquisition circuitry and
multiplexers.

How do I use a KIM-1?

The KIM keypad is actually very easy to figure out, so here is a basic primer.

When you turn on the power supply, the six
LEDs light up with the current address (left 4) and its contents (right 2) --
if they don't light up, tap RS and they should appear.
Press AD to enter a new address, DA to enter data in that address, and + to
move from cell to cell. To set yourself up into a sane environment, turn the
keypad switch (the Single Step Toggle) to OFF, and punch in this sequence:

[AD] 1 7 F A [DA] 0 0 [+] 1 C [+]

This sets the NMI vector to the main monitor program so that stopping works.
Now, enter a program or data, and when you're ready to run, set the address
to the starting point and punch GO. If your program hangs, hit ST to stop
it and return to the monitor (or if that doesn't work, hit RS for a
non-destructive reset, although you may not be able to return to the spot of
the foul).

You will need to know 6502 machine language opcodes to program the KIM-1
effectively, a topic far beyond this page.
For more, look at the Links and
Archives page for a copy of the KIM-1 User Manual.

What peripherals exist for the KIM-1?

Of the enormous number of possible projects that could be interfaced to the
KIM-1, the most common peripheral was a cassette drive, which was directly
supported by the KIM-1. There were also a large selection of 4K and 8K memory
boards; the 4K was particularly popular as the decoding for that address
range already existed on the KIM-1 (to expand memory above $1fff, additional
work was needed). Commodore/MOS made their own 4K card, called the KIM-2,
and their own 8K board, the KIM-3 (KIM-3B for "Buffered").
There were also more gargantuan 16K and 32K boards. All of the boards over
4K had the additional hardware for handling the more complex addressing
requirements, and most 8K boards allowed you to move the 8K page around in the
6502's 64K addressing range.

Many users interfaced their KIM-1s to a teletype, usually some form of ASR-33
or a relative. Naturally, you didn't have to use a real ol' antique
teletype; many users converted the connection to work with "glass teletypes"
(a/k/a standard dummy terminals). More on that in a second.

KIM-1s could also drive video displays with appropriate hardware. Probably the
best known was Don Lancaster's TV Typewriter, affectionately dubbed the "TVT,"
most relevant for the KIM-1 in the 6800 bus compatible TVT-6 (thus also with
the 6502). The TVT-6 supported multiple text resolutions, including
the original TVT's 32x16 display plus 64x13 and 64x25; the TVT-6L did all
that plus lowercase. It was extremely popular due to its low cost and easy
construction, although much of the cost reduction was achieved by making the
CPU do some of the display work, an (IMHO) impaired design. For this reason
other display peripherals emerged, but my personal favourite is the K-1008
Visable Memory Board [sic: NOT Visible] by MTU, an 8K memory board with a
clever secondary function: plug in a composite monitor, and the 8K of RAM
is seen as a monochrome 320x200 hi-resolution display. Commodore 64 denizens
will be delighted to know that the bit addressing is very simple; the byte
offset is (199-y)*40+INT(x/8) and the bit is x modulo 8,
with the leftmost bit being bit 0. PolyMorphic made a VTI card that had the
video and keyboard interface all on the same device.

Finally, with all these cards, you needed heavy duty power and card management,
and Commodore/MOS made the KIM-4 for you to stick them all in. This device
offered six slots, buffering circuitry and and beefier power management.
And if you wanted to connect S-100 cards to the KIM instead, then you could
get a KIMSI from Forethought Products and plug your cards into that. (It is
interesting to note that the KIMSI works with the Apple I as well, so that
means that the KIM and Apple I must have the same 44-pin cardedge pinout.)

Commodore/MOS also made the KIM-5, an ROM application card with a resident
editor and single-pass assembler that could read source from memory or tape,
and the KIM-6, a wirewrap prototyping board for homebrew projects.

Nowadays, you can still get new KIM-1 peripherals. Bob Applegate, for example,
offers his own 4K memory board as well as a custom I/O board. This last is
particularly handy as it converts the 20mA "current loop" TTY interface into
standard RS-232, ready to connect to any modern computer with a serial port
(and now you can have your own "glass teletype"). Here is Bob's
KIM-1 peripherals page.

How can I emulate a KIM-1?

The KIM-1 is not difficult to emulate in its basic form as it is not a
terribly complicated system. For example, you can run a "virtual KIM"
on your Palm Pilot handheld.
There is also a MESS driver.

That said, most of the emulators only give you the basic hardware (the
MESS driver is particularly unadorned). This was part of the reason I wrote
my own.

The Incredible KIMplement,
in my very biased opinion,
will give you probably the fullest view of what a KIM can do of the presently
extant emulators. While I am
still working on its feature set, it provides a standard
TTY (a simulated ASR-33), includes an emulated KIM-4 with a total of 16K RAM,
and is complete enough to run many programs from The First Book of
KIM and even Tiny BASIC! What's more, it will run on a real Commodore 64,
or any system that has a Commodore 64 emulator available (Macintosh, DOS,
Windows, Linux/most Unices). Please give it a spin. ROMs are built-in and not
required.

How can I build/buy/expand a KIM-1 of my own?

Ruud Baltissen gives you instructions on how to build your own KIM-1 clone
using (mostly) off-the-shelf components, especially because the 6530 RIOTs
are a trick to get -- Ruud shows you how to do this with the related 6532
and standard EPROMs. Schematics included.

If you don't want to build your own, you can always buy used, and KIM-1 units
do appear on eBay or other auction sites
in varying condition from time to time. Particularly fine specimens in
working condition with manuals and accessories may not be cheap, however.
Perhaps going homebrew is looking better and better ...

If you're just interested in playing with the 6502, you might look at one of
the single-board KIM relatives such as the SYM-1 or AIM-65; 6502.org's Trainers Section
has some resources for you to start.
Or get a Commodore 64, which is a cheap and plentiful computer,
and enjoy life on a
wonderful 6502-based platform that's fun to program and plays great
old school games (and can emulate a KIM, too).