Commodore Chessmate: 6530-024 RRIOT

The Chessmate is a 6530 – KIM-1 like computer. Keyboard, LED display are used as in the KIM-1. Peter Jennings, who designed this chess computer with Commodore, build upon his Microchess 1. from the KIM-1, and used the extra ROM space to enhance it to Microchess 1.5: more chess features, a chess clock, sounds, dedicated keys, status LEDs.

The 6530-024 delivers the I/O and timer and RAM used by the Chessmate, the RRIOT ROM is used by the main ROM as a Chess openings book.

It will not be that difficult to ‘clone’ this chess computer with the information here. A 6532 can easily take the role of the 6530. A 6502 instead of a 6504, some SRAM, a 2732 or similar ROM. The ROMs are dumped, see below.

On this page:

My Chessmate


Technical specifications

  • MOS MPS 6504 1 MHz 4 KB ROM 320 bytes RAM total
  • 6530-0024 RRIOT (of which I/O lines, timer and 64 bytes RAM are used, ROM has data as chess openings book
  • 256 SRAM (2x 2111)
  • 4K ROM (6332), early models have 2x 2K ROMs
  • Display: Four 7 Segment LED type (which indicates either the move or the time)
  • 19 membrane keys
  • LEDs for Check, Chessmate, or whether the computer is playing black or white
  • Eight skill levels
  • Piezo loudspeaker for 14 Electronic sounds
  • Built-in chess clock
  • The computer has 32 International standard openings in its memory and tries to follow them for 16 moves
  • Chessmate plays black or white
  • Can verify position of pieces at any stage of the game
  • En passant and castling
  • Playing strength (DWZ/ELO): ca. 1050

Related, identical specifications and hardware, and the same software, images below:

  • Novag Chess Champion MK II (A)
  • Novag Chess Champion MK II (B)
  • TEC Schachcomputer

Memory map (deduced from disassembled source and hardware schematic, note that for the 6504 this is collapsed to the smaller address space 0000-1FFF. The software is written for the 6502 though!
$0000 – $01FF RAM 256 bytes, stack and zeropage mirrored
$8B00 – RRIOT I/O
$8B80 – RRIOT RAM 64 byte
$8C00 – $8FFF RRIOT ROM
$F000 – $FFFF Main ROM

Manuals and ROM dumps

Commodore Chessmate manual
Another Commodore Chessmate manual
ROMs of early Commodore Chessmate, in two 2K parts
and later main 4k ROM and the 630 024 RRIOT ROM
ROMs of Novag Chess Champion MK II
(Main 4k ROM and 630 024 RRIOT ROM, identical to Commodore ROMs!
Novag Chess Champion MKII manual
Partially commented source by me of the ROM of the Chessmate


Notes on the 6530 024 RRIOT

Michael Gardi helped me discover the following about the use of the RRIOT in the Chessmate, comments added to the source:
1. The timer is used for the random selection of openings.
CKINT = $8B0E
F38D AD 0E 8B LDA CKINT
2. The openings are stored in the RRIOT 1K ROM at $8C00
3. The RRIOT Timer is also used to implement the CHESSmate chess clock mode, see the source.

Opening book deciphered

The Chessmate chooses at random an opening from the opening book, which is in the 1K ROM of the 6530 024 RRIOT.
The first thing that pops out is that 28 of the 32 openings start with either D2-D4 (10) or E2-E4 (18). That explains the very high percentage of the time that these occur when openings are randomly selected. The Operation Instructions explicitly states that CHESSmate chooses one opening at random and tries to follow it for 16 moves

Micheal Gardi deciphered the coding of the openings:
There are 32 bytes for each opening representing 16 moves. Even bytes represent start positions and odd bytes represent end positions. A pair of bytes make a move. Moves alternate between white and black starting with white. Each byte represents a position on the chess board. The high nibble is the rank (row 1-8) and the low nibble the is the file (column A-H).


col_table = ['H','G','F','E','D','C','B','A']
row_table = ['1','2','3','4','5','6','7','8']

with open("Opening Book.bin", 'rb') as f:
    buffer = f.read()
   
    # For each line.
    ent_file = []
    even = 0
    address = 0x8C00
    for i in range(0,len(buffer),2):
        if i % 32 == 0:
            ent_file.append("\n")
            ent_file.append(hex(address))
            ent_file.append(": ")
            address += 32
        # Assume bytes are contiguous.
        if (even % 2) == 0:
            ent_file.append(col_table[buffer[i]&0x0F]+row_table[buffer[i]>>4]+"-"+
                            col_table[buffer[i+1]&0x0F]+row_table[buffer[i+1]>>4] +", ")   
        else:
            ent_file.append(col_table[7-(buffer[i]&0x0F)]+row_table[7-(buffer[i]>>4)]+"-"+
                            col_table[7-(buffer[i+1]&0x0F)]+row_table[7-(buffer[i+1]>>4)] +", ")
        even += 1     
    ent_file.append('\n')
    
    # Output the result.
    with open("Opening Book Dump.txt", 'w') as f:
        f.write(''.join(ent_file))

Running that code delivers this

8c00: E2-E4, E7-E5, G1-F3, B8-C6, B1-C3, G8-F6, F1-B5, F8-B4, E1-G1, E8-G8, D2-D3, D7-D6, C1-G5, B4-C3, B2-C3, D8-E7
8c20: D2-D4, D7-D5, C2-C4, D5-C4, G1-F3, G8-F6, E2-E3, E7-E6, F1-C4, C7-C5, E1-G1, A7-A6, D1-E2, B8-C6, B1-C3, C5-D4 
8c40: F2-F4, D7-D5, E2-E3, G8-F6, G1-F3, C7-C5, B2-B3, E7-E6, C1-B2, B8-C6, F1-B5, C8-D7, E1-G1, F8-D6, D2-D3, D8-C7 
8c60: E2-E4, E7-E5, F1-C4, G8-F6, D2-D4, E5-D4, G1-F3, F6-E4, D1-D4, E4-F6, C1-G5, F8-E7, B1-C3, C7-C6, E1-C1, D7-D5 
8c80: E2-E4, C7-C5, G1-F3, B8-C6, D2-D4, C5-D4, F3-D4, G8-F6, B1-C3, D7-D6, F1-E2, G7-G6, C1-E3, F8-G7, E1-G1, E8-G8 
8ca0: E2-E4, C7-C5, B1-C3, B8-C6, G2-G3, G7-G6, F1-G2, F8-G7, D2-D3, E7-E6, C1-E3, D7-D6, G1-E2, C6-D4, E1-G1, G8-E7
8cc0: E2-E4, E7-E5, G1-F3, B8-C6, F1-C4, F8-C5, C2-C3, G8-F6, D2-D4, E5-D4, C3-D4, C5-B4, B1-C3, F6-E4, E1-G1, E4-C3 
8ce0: G1-F3, G8-F6, C2-C4, C7-C5, D2-D4, C5-D4, F3-D4, E7-E6, B1-C3, F8-B4, C1-D2, E8-G8, E2-E3, B8-C6, F1-E2, D7-D5 
8d00: E2-E4, E7-E5, G1-F3, G8-F6, F3-E5, D7-D6, E5-F3, F6-E4, D2-D4, D6-D5, F1-D3, F8-D6, E1-G1, E8-G8, C2-C4, C7-C6 
8d20: D2-D4, G8-F6, C2-C4, E7-E6, G2-G3, D7-D5, F1-G2, D5-C4, D1-A4, B8-D7, A4-C4, A7-A6, G1-F3, B7-B5, C4-C6, A8-A7
8d40: E2-E4, G8-F6, E4-E5, F6-D5, D2-D4, D7-D6, C2-C4, D5-B6, F2-F4, D6-E5, F4-E5, B8-C6, C1-E3, C8-F5, B1-C3, E7-E6 
8d60: D2-D4, F7-F5, C2-C4, E7-E6, G1-F3, G8-F6, G2-G3, F8-E7, F1-G2, E8-G8, E1-G1, D7-D5, B1-C3, C7-C6, C1-F4, D8-E8 
8d80: E2-E4, E7-E5, G1-F3, B8-C6, F1-C4, G8-F6, D2-D4, E5-D4, E1-G1, F6-E4, F1-E1, D7-D5, C4-D5, D8-D5, B1-C3, D5-A5 
8da0: D2-D4, G8-F6, C2-C4, E7-E6, B1-C3, F8-B4, D1-C2, B8-C6, G1-F3, D7-D6, C1-D2, E6-E5, A2-A3, B4-C3, D2-C3, D8-E7 
8dc0: E2-E4, B8-C6, D2-D4, D7-D5, E4-D5, D8-D5, G1-F3, E7-E5, B1-C3, F8-B4, C1-E3, C8-G4, F1-E2, E8-C8, E1-G1, D5-A5 
8de0: D2-D4, D7-D5, C2-C4, E7-E6, B1-C3, G8-F6, C1-G5, B8-D7, G1-F3, F8-B4, C4-D5, E6-D5, E2-E3, C7-C5, F1-D3, D8-A5
8e00: D2-D4, D7-D5, C2-C4, C7-C6, G1-F3, G8-F6, B1-C3, D5-C4, A2-A4, C8-F5, F3-E5, B8-D7, E5-C4, D8-C7, G2-G3, E7-E5
8e20: E2-E4, E7-E5, G1-F3, B8-C6, F1-B5, D7-D6, D2-D4, C8-D7, B1-C3, G8-F6, E1-G1, F8-E7, F1-E1, E5-D4, F3-D4, E8-G8 
8e40: D2-D4, D7-D5, C2-C4, E7-E6, B1-C3, C7-C5, C4-D5, E6-D5, G1-F3, B8-C6, G2-G3, G8-F6, F1-G2, C5-D4, F3-D4, F8-C5 
8e60: E2-E4, E7-E5, G1-F3, B8-C6, F1-B5, A7-A6, B5-C6, D7-C6, D2-D4, E5-D4, D1-D4, D8-D4, F3-D4, C8-D7, B1-C3, E8-C8 
8e80: D2-D4, C7-C5, D4-D5, D7-D6, C2-C4, G7-G6, B1-C3, F8-G7, E2-E4, G8-F6, F1-E2, E7-E6, C1-G5, E8-G8, G1-F3, E6-D5 
8ea0: E2-E4, E7-E5, G1-F3, B8-C6, D2-D4, E5-D4, F3-D4, G8-F6, B1-C3, F8-B4, D4-C6, B7-C6, F1-D3, D7-D5, E4-D5, C6-D5 
8ec0: D2-D4, G8-F6, C2-C4, G7-G6, B1-C3, F8-G7, E2-E4, D7-D6, F2-F3, E7-E5, D4-D5, E8-G8, C1-G5, H7-H6, G5-E3, F6-H5 
8ee0: E2-E4, C7-C6, D2-D4, D7-D5, B1-C3, D5-E4, C3-E4, C8-F5, E4-G3, F5-G6, H2-H4, H7-H6, G1-F3, B8-D7, F1-D3, G6-D3 
8f00: D2-D4, G8-F6, C2-C4, E7-E6, G1-F3, B7-B6, G2-G3, C8-B7, F1-G2, F8-E7, E1-G1, E8-G8, B1-C3, F6-E4, D1-C2, E4-C3 
8f20: C2-C4, G8-F6, B1-C3, E7-E6, E2-E4, C7-C5, G1-F3, B8-C6, D2-D4, C5-D4, F3-D4, F8-B4, D4-C6, D7-C6, D1-D8, E8-D8 
8f40: E2-E4, E7-E5, G1-F3, B8-C6, F1-B5, G8-F6, E1-G1, F6-E4, D2-D4, F8-E7, D1-E2, E4-D6, B5-C6, B7-C6, D4-E5, D6-B7 
8f60: E2-E4, E7-E6, D2-D4, D7-D5, B1-C3, G8-F6, C1-G5, F8-E7, E4-E5, F6-D7, G5-E7, D8-E7, D1-D2, E8-G8, F2-F4, C7-C5
8f80: E2-E4, E7-E5, D2-D4, E5-D4, D1-D4, B8-C6, D4-E3, G8-F6, B1-C3, F8-B4, C1-D2, E8-G8, E1-C1, F8-E8, F1-C4, D7-D6 
8fa0: E2-E4, E7-E5, D2-D4, E5-D4, C2-C3, D4-C3, F1-C4, C3-B2, C1-B2, G8-F6, B1-C3, B8-C6, G1-F3, F8-B4, D1-C2, D7-D6 
8fc0: C2-C4, E7-E5, B1-C3, G8-F6, G1-F3, B8-C6, E2-E3, D7-D5, C4-D5, F6-D5, F1-B5, D5-C3, B2-C3, F8-D6, D2-D4, C8-D7 
8fe0: E2-E4, E7-E5, G1-F3, B8-C6, F1-B5, A7-A6, B5-A4, B7-B5, A4-B3, C6-A5, B3-F7, E8-F7, F3-E5, F7-E7, D2-D4, G8-F6

Chessmate emulator by Stephen Crane

An emulator with the look and feel of the Chessmate by Michael Gardi

Images of Chessmates

My Commodore Chessmate.

My Chessmate


Photo by Commodore International Historical Society on twitter @commodoreihs

Photo by Commodore International Historical Society on twitter @commodoreihs

On this early Chessmate two ROMs were used, each 2K. The TTL IC on the top right was added manually and wire wrapped, the wires running from it to the ROM selection inputs.

Boxes

Photo by Michael Gardi

Novag Chess Champion MK II A and B


TEC Schachcomputer

KIM-1 revisions

Update 24 march 2022: added KIM-1 Re v photos from HomeComputerMuseum (thanks Bart!)

The KIM-1 went trough several revisions without any change to the specifications. The first revisions appeared as MOS Technology products, the label MOS in in the front top right corner. When Commodore took over MOS late 1976 the label changed to Commodore C MOS.

MOS did three versions, the unnamed first one, a Revision A and a Rev B. I have never seen a Rev C.
Commodore MOS did Rev D to G, starting in 1977 and well into the 80ties. Many KIM-1s were sold, first to industry and later to education and hobbyists. Nowadays KIM-1s are not rare but have become quite expensive, collectors value especially the early ones with a white 6502 IC. The KIM-1 was an OEM product by Rockwell, with its Rockwell branded documentation and a Rockwell sticker at the right top part covering the Commodore MOS label. I know of at least two versions by Rockwell, a Rev D and my Rev F.

See this page for images of the revisions known to me.

post

KIM-1 revisions

The KIM-1 went trough several revisions without any change to the specifications. The first revisions appeared as MOS Technology products, the label MOS in in the front top right corner. When Commodore took over MOS late 1976 the label (Rev D) changed to Commodore C MOS.

MOS did three versions, the unnamed first one, a Revision A and a Rev B. I have never seen a Rev C.
Commodore MOS did Rev D to G, starting in 1977 and well into the 80ties. Many KIM-1s were sold, first to industry and later to education and hobbyists. Nowadays KIM-1s are not rare but have become quite expensive, collectors value especially the early ones with a white 6502 IC.
The KIM-1 was an OEM product by Rockwell, with its Rockwell branded documentation and a Rockwell sticker at the right top part covering the Commodore MOS label. I know of at least two versions by Rockwell, a Rev D and my Rev F.
Some companies made KIM-1 clones with the same specifications but with more modern SRAM (2114), see the KIM-1 related page.

The visible changes were cosmetic: color of PCB,  label MOS first and Commodore later, and housing of ICs used (white and violet ceramic to black on the later revisions.).
Early on in the Rev A period the 6502 with defective ROR instruction was replaced with the repaired 6502, this NMOS IC continued to be the CPU to the latest revision.

A real change was the keyboard. A different one was used by Commodore, with the SST switch moved to the other side of the top row. See the page about the differences and how to repair.

Components used were of course the NMOS 6502 CPU and the RRIOTs 6530-002 and -003. I see many manufacturing dates, from 1975 to 1980 on the IC’s. It seems RRIOTs were not made after that date and enough stock was available to build the Rev F. The SRAMs were in the beginning MOS 6102s, later the equivalent (and more reliable) 2102 took its place. LED displays, TTL and transistors came from the then current manufacturers and varied a lot. The capacitors were mainly the distinct yellow axial type.

Serial numbers (thanks Dave McMurtrie for this information) appear on many KIM-1s. Not all, perhaps the handwriting wears off. Early ones (to ReV B) go without a prefix (most) or a ‘M’. On later Rev’s, the Commodore ones, numbers have a prefix PA or SC. SC stands for Santa Clara, PA for Norristown, Pennsylvania, production locations of Commodore at that time. Perhaps the number on that Rev G SC38488 means there are at least that many KIM-1s produced in Santa Clara? A Rev F with PA9047? If that is really a sequence number, how many KIM-1’s were produced? 50000? or more?

Here after are shown images of the revisions, some from photos by myself, others from the internet. I have tried to name the origin, if I failed and you are the origin, please report it.
If available, both front and back are shown.

Prototype KIM-1
On team6502  I found a photo of a prototype KIM-1 at MOS Technologies, Terry Holdt has this in his office.
The layout is different from the final product, everything seems to be present on this prototype.

No revision, 1976

From pagetable.com

From pagetable.com

Rev A


KIM-1 enthousiast


KIM-1 enthousiast


Rev A, photo by Guido Lehwalder


Rev A, photo by Guido Lehwalder

Rev B

 

Rev C

None found!

Rev D

Chuck Hutkins

Chuck Hutkins

Chuck Hutkins

Dave Dunfield

Dave Dunfield

Rev E

Stephan Slabihoud

Rev F

My original KIM-1

My original KIM-1

KIM-1 enthousiast

KIM-1 enthousiast

From HomeComputerMuseum.nl

From HomeComputerMuseum.nl

Rev G

Stephan Slabihoud

Dick Dral

KIM-1 related updates

KIM-1s, not made by Commodore but nearly identical.

More photos at the KIM-1 related page

KIM-1 keyboard repair

The KIM-1 keyboard is a special one. Made especiallyfor the KIM-1, as you can see in the SST switch. It shows its age in the design, and looks quite familiar to the keyboards hand-held calculators of the 70ties.

In those days replacement keyboards could be bought. I have repaired several KIM-1s with it. The older revisions were worse than what appeared on later revisions.

See also this page about KIM-1 keyboard repair, local copy here.

Original KIM-1 version, SST switch on the right.

KIM-1 Rev D, SST switch on the left.

The keyboard is connected to the mainboard with two screws, as you can see on the next image, and the solder connections on the front of the motherboard to the top of the keyboard.
You also see seven holes with access to screws on the bottom of the keyboard. Those keys hold the top of the keyboard connected to the bottom part. Unscrew those seven to get inside the keyboard. Leave the two screws not in a hole alone!

Over time the keyboard may develop problems like stick keys and non-responsive keys. Due to wear or dirty contacts.

A post in the vcfed.org forum may be helpful to fix some of these problems.

User Mindwalker posted this:

I (mindwalker) remember cleaning the keyboard at one point and I found this picture from my archives.
It seems the key membrane connects to the PCB over four contacts right on the bottom row, you probably have a bad contact there. Cleaning and (carefully) tightening the screws may cure it! Just be careful with the membrane.

Or you could replace the keyboard with other keypads:

An article in KIM User Notes 10/11 has this advice for the first Revisions key (No Revision, Rev A, Rev B):

Construction of a nearly exact KIM-1 replica keyboard.

Original version: Design, images and original text in German by Ralf (ralf02, forum64.de), from the KIM-1 Aufbau anleitung, and KIM-1 Keypad by user hackup, October 30, 2022 on thingiverse

Circuit diagram of the Keyboard PCB

For the keyboard construction you need the following parts:

  • 1 3D printed keyboard frame, STL from thingiverse
  • 2 keypads with 16 keys each as shown (actually, you just need 1 1/2)
  • 1 keypad PCB, see the gerber file
  • 1 SPDT slide switch, 2.54mm pitch
  • 1 female pinheader connector, 15 pins, preferably low profile
  • 1 male pinheader, 15 pins to match the female one
  • 6 self tapping screws, 2x6mm
  • labels printed white on black for the keys E, F, AD, DA, PC, +, GO, ST, RS
  • double sided adhesive tape to glue the clips to the motherboard

The keyboard PCB has to be gold plated (ENIG). With tin-plated PCBs the contact from the keys is not reliable.

Downloads made available by Ralf:

First dismantle the two keyboards and cut the two rubber contact mats as seen in the next picture. Keys 0-0 and A-D have the right lettering, make the other with a letter printer white on black.

Place the keycaps in the 3D printed case:

Now solder the slide switch and the pinheader on the PCB. Cut the rubber mat on the location of the slide swithc. Put the mat in the 3d printed case and fix with 6 screws:

Next place the four M3 screws in the holes in the PCB and the parts in the case. Now place the PCB on the 1 pin pinheader and fix the four screws with washers from the bottom.



The two red wires are only for decoration, to make it look like as on the KIM-1.

KIM-1 keyboard repair

The KIM-1 keyboard is a special one. Made especially for the KIM-1, as you can see in the SST switch. It shows its age in the design, and looks quite familiar to the keyboards hand-held calculators of the 70ties.

In those days replacement keyboards could be bought. I have repaired several KIM-1s with it. The older revisions were worse than what appeared on later revisions.\
Read this page how to repair some common problems.

Scanned book: Anwendungsbeispiele für den Mikroprozessor 6502

Anwendungsbeispiele für den Mikroprozessor 6502
Herwig Feichtinger

Hardware-Tips und nützliche Programmierbeispeile in Maschinensprache


KIM-1 Simulator V1.1.2

Updates for the KIM-1 Simulator, now V1.1.2
– KIMDLe runs, with free running timer for randomizer (first step towards working timer emulation) and fix of KIM Keyboard return value of No key $15
– Fixes for console keyboard handling, German and International settings and uppercase/lowercase handling, width character font now 1 pixel different for Linux and Windows
– Testkeydown first line bug

Executables for Windows, Ubuntu and Raspberry PI OS, sources for Lazarus

MCS6500 Microcomputer Family Programming Manual


High-res quality typeset manual by Pickledlight. Local copy. Check to original for updates!
MCS6500 Microcomputer Family Programming Manual
MCS6500 Microcomputer Family Programming Manual Hardcover

Pocket calculator for the KIM-1


Siep de Vries Westvries Computing The Netherlands 1977

Simple calculator (integer 6 digits positive) + – / *

I/O via TTY or keypad/LED display, the same method as used by the KIM-1 monitor.

Two versions (scans included): a special publication from the first days of the KIM Club in a traditional 6502 assembler and a later version for the Micro ADE assembler editor.

The versions are functionally identical, the memory layout of zeropage is different.

Sources included of both versions (TASM 32), with resulting listing and papertape and Intel hex files.
As close to paper original, changes due to assembler quirks.

Usage:
– Load papertape
– choose TTY or keypad/LED via switch

– Input is given by entering a decimal number followed by a function key
(only + – / * seems to work)

Functions (first KIM-1 keypad, second TTY keyboard)
A = + = add number to result
B = – = subtract number from result
C = * = multiply result by number
D = / = divide result by number
E = c = clear input number
F = A = clear result
AD = r = remainder of last division
DA = i = number stored in memory
+ = c = number from memory
PC = % = calculate percentage
GO = C = clear result

? displayed means integer arithmetic error (overflow or negative)

Hans Otten, 2021 – 2022
Tested and Screenshots made with theKIM-1 Simulator