Chess computer “Intellect-02”, or making interactive ROM

The chess computer Intellect-02 was described in the magazine “Radio” in 1983, No. 9. Presumably, this was the first serial household device in the USSR, made on a general-purpose microprocessor (our first calculators on a processor core appeared about 10 years earlier (Elektronika B3-09), but they had their own processor cores and their own narrow-purpose architecture).

The computer is designed in the form of a chessboard.

Below is an indicator of four LED indicators. To the left of them are two red LEDs “You have won” and “You have lost”. To the right is the keyboard.

The cartridge is inserted at the top. I have seen cartridges with the games “Chess” (two versions) and GRAN-KALAH.

Chess is a regular chess set, while Gran and Kalah use special pieces.

Image from a magazine "Radio" 1983 No. 9

Image from Radio magazine 1983 No. 9

The chessboard slides and is removed from the board, and underneath the board is a recess for the game pieces.

Description of the game in the magazine "Radio" 1983 No. 9

Description of the game in the magazine “Radio” 1983 No. 9

In general, they planned different cartridges, including NIM-1, NIM-2, SMESH, kuspak, backgammon, corners, tic-tac-toe and renju checkers, but apart from two cartridges “Chess” and “Gran-kalakh” I did not see any others.

Despite the apparent simplicity, there are quite a lot of microcircuits inside.

The basis is the microprocessor KR580IK80A (KR580VM80A).

RAM is made on KR565RU2 microcircuits, total 1 kilobyte.

Inside the cartridge there is a masked ROM microcircuit of the KR568RE1 or KR568RE2 type with a capacity of up to 8 kilobytes.

The internal structure is described in more detail on the website https://emuverse.ru/wiki/Intellect-02

You can read more about its architecture there. I will only add that in fact the scan codes of the buttons look like this:

  СБ   ВИ   ПП   A1   B2   C3   D4   E5
[  ] [bf] [fb] [f1] [f2] [f3] [f4] [f5]
 ВВ   СТ   УИ   F6   G7   H8    9    0
[df] [7f] [fa] [f6] [f7] [f8] [f9] [f0]

And there is no possibility to light dots on the indicators. Only seven segments.

I have not seen the basic scheme of the chess computer. Most likely it was taken from the prototype – from the chess computer Chess Challenger 3. Or maybe from a computer. Schachcomputer SC2Here is its diagram:

Schachcomputer SC2 Schematic

Unlike the prototypes, the Intellect has a ROM in the form of a separate replaceable cartridge. If you buy a chess computer without a cartridge, it will not work.

Cartridge from the game Gran-Kalah

Cartridge from the game Gran-Kalah

Inside the cartridge there is only one ROM chip and a few resistors.

When I played with a chess computer, I thought, is it possible to make your own firmware with a chess engine? In theory, it is not difficult to do, if you do it in the codes of the KR580VM80A microprocessor. But what if you want something more powerful and faster? Then the cartridge should have a more powerful microcontroller. This can be done. But then the problem arises, how to make interaction between the chess computer and your microcontroller, if the chess computer has only ROM with an address range from 0x0000 to 0x1FFF? The chess computer cannot write anything to the ROM, it can only read, setting the address on the bus.

The conclusion that emerged was that it was necessary to dynamically change the contents of the ROM so that the chess computer processor continued to think that it was only executing code from the ROM.

As a result, a board with a ROM emulator appeared.

ROM emulator diagram

ROM emulator diagram

This board has a lot of extra stuff in case it is used autonomously (buttons, indicator, etc.)
The circuit is quite simple – STM32F205VET6 microcontroller and 74HC373 register for setting levels and turning off the output at the end of the CS signal.

It works like this: the chess computer's microprocessor sets the address on the bus and pulls the CS signal. When the CS signal arrives, the emulator board's microcontroller simply sets the output byte from its RAM on the data bus from the required address. In the C listing, this looks like several lines:

  IDR = (GPIOB->IDR) & 0b1111111111111; // считываем адрес
  GPIOA->ODR = Chess_RAM[IDR];          // выводим ROM

Our address is sitting in port B by interrupt. We read it and put a byte out of the array.

If you do not change the Chess_RAM RAM, then having previously loaded known firmware into it, you get a simple emulator of current cartridges.

But what if you need to make your own cartridge with a reaction to buttons and output to the indicator?

Then, as a firmware, a small program was written in the KR580VM80A codes, which works like this:

  1. Four cells with addresses 0003, 0004, 0005, 0006 contain codes that need to be displayed on the display.

  2. The program, written in KR580VM80A codes, outputs these cells to four indicators in turn (port 0xF6 selects the indicator number and port 0xF5 the byte value).

  3. The program then reads port 0xF4 of the chess computer, which contains the code 0xFF if the button is pressed, or the code of the button pressed.

  4. The program transfers the read code to the cartridge, accessing the ROM address range depending on the button pressed. For example, if the button is not pressed, the program reads from the ROM at address 0x10FF. If the “UI” button with the code 0xFA is pressed, the program reads from the ROM at address 0x10FA.

The STM32 program in the cartridge, after it has issued the ROM code at the address, analyzes at what address, in fact, there was an access. And if the access was in the range 0x1000-0x10FF, then it means that my program in the chess computer transmitted the code of the pressed button in this way.

Well, then this code is analyzed, the program on the STM32 is executed and the result of its work, be it your own chess engine, or a simple “Clock” program, displays the time simply by writing the numbers that need to be displayed, changing the RAM (for a chess computer this is ROM) with addresses 0003, 0004, 0005 and 0006.

The result was a homemade cartridge. As an experiment, I made a choice of three well-known cartridges when loading – Chess 1, Chess 2, Gran-kalakh, so that it would be possible to play those games in case the user does not have the original cartridges, and additionally adapted the chess engine made on the basis of mcu-max. As a result, four games appeared in the cartridge with the emulator.

I don't know how much the three chess engines differ in terms of gameplay. I know that the first “Chess” cartridge is most likely adapted from the game Chess Challenger 3, since it responds with the same moves. But the rewritten factory “Chess” cartridge that was supplied with the later Intellects is completely different. It takes up almost the entire ROM volume and plays completely differently.

It turned out to be such a funny interactive cartridge. And the conclusion can be the following: if there is, for example, some semi-closed computer system, then you can use such cartridges that emulate ROM and quickly change its contents

For example, if you suddenly decide to repair a ZX Spectrum or an AGAT PC with broken RAM, you can implement a test firmware (and add your own LCD to the cartridge), which will be inserted instead of the standard ROM, and will allow you to more clearly understand what is not working there, without analyzing the signals with an analyzer or oscilloscope.

That's all. Thank you for your attention.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *