Close
0%
0%

R200 Relay Computer

Reconstruction of what a computer enthusiast could built in mid-20th century (well, to a degree)

Similar projects worth following
R200 project is a personal project centered around creating general purpose relay computer. "200" in the name suggests that the machine will be constructed with use of about 200 electromagnetic relays.
Below is a short description of the project, you can find more detailed information on the github page. I intend to use this page as a construction log.

Ground rules
1. The machine should be self-sufficient and independent of any external entities except for power supply and a human operator.
2. No semiconductors allowed except diodes. (there’s gonna be TONS of diodes, though)

Video (PC register, PC increment, ROM, clock generator)

Main specs

  • ALU with 16 functions
  • 2x16bit GPR (General Purpose Registers)
  • 64x8bit instruction ROM
  • 8x12bit RAM
  • 16x12bit data ROM
  • 2 IPS (Instructions per second)
  • 24-LED output / dip-switch input

Block diagram

Instruction set
R200 Instruction Set

 

Emulator

There’s simple emulator available, made in C#. It accepts assembler file as an input, does simple preprocessing and executes the program. No actual byte-code generation present.

Here's the emulator running fibonacci.R200 program at x10 speed.

Construction progress

  • Blocks assembled, mounted and tested (the pic in the gallery and the video): PC register, PC increment, ROM, clock generator.
  • Blocks assembled: ALU, RA register, RB register, RAM
  • Blocks that need to be designed: instruction decoder

Example of programs it can run (currently on the emulator)

  • Multiplication (12-bit X 12bit = 24bit)
  • Division (24-bit / 24-bit = 24-bit[result] 24-bit[reminder])
  • Fibonacci numbers (12-bit)

R200-AUG-2018.pdf

Schematic of currently assembled part (Program Counter, ROM and CLOCK GENERATOR / SEQUENCER)

Adobe Portable Document Format - 97.73 kB - 08/26/2018 at 06:06

Preview

R200 Instruction Set And Codes.xlsx

Instruction encoding as requested.

sheet - 18.13 kB - 08/25/2018 at 16:31

Download

  • No progress at all. Sorry.

    Alexander12/15/2018 at 09:37 10 comments

    Even after almost half year break on the project I still cannot find motivation to continue. After playing with the R200 emulator I got a little disappointed with the fact that you cannot really make any meaningful program with just 64 words of ROM. I wasn't even able to figure out 24-bit square root. Still open for suggestions on some kind of cool program ideas.

  • Emulator GUI update

    Alexander08/27/2018 at 10:48 1 comment

    Thanks to  Alexander Tsidaev there's now awesome GUI for the emulator. Check out the gif of the emulator running fibonacci.R200 program at x10 speed.

  • -

    Alexander08/25/2018 at 11:58 0 comments

    I had idea of this machine since 2009, so you can imagine how slowly the process is going. But it mostly due to fact that my interest for the project spikes for several weeks and then fades for the rest of the year. It actually took me just two months of weekends in order to design and assemble that hookup on the pic from scratch.

    But I am in no hurry. It’s not like the machine can become even more out of date.

View all 3 project logs

Enjoy this project?

Share

Discussions

zpekic wrote 11/22/2019 at 02:15 point

Really amazing project, I can only imagine the hard fight making all these relays work! As far as the minimalistic algorithmic ideas go, you may want to try finding successive primes and maybe have a buzz generated (and value displayed) once one is found. I wrote a "minimal" CPU in VHDL which is able to do just that (see https://opencores.org/projects/signed_unsigned_multiplier_and_divider ) and it didn't need much more than R200:

> 3 16-bit registers n, m, i (this one is just to count the number of primes found)

> 2 8-input 16-bit multiplexers to feed the data to ALU inputs

> 16-bit ALU, with 2's complement addition and substraction, and special operations to convert BCD nibbles to ASCII

> 16-input condition code multiplexer

> Microcode store (32 words by 32 bits deep) encoding the prime number finding algorithm

> Control unit - contains a 4 deep 8-bit microinstruction pointer stack and can execute goto/gosub/wait/return etc. microinstructions

I did have a dedicated divider unit, but that algorithm is already readily available on R200 and can be incorporated.

  Are you sure? yes | no

Alexander wrote 11/22/2019 at 06:47 point

Thank you for your comment!

Nice suggestion about generating primes, I'll see if I can fit the algorithm based on GCD in the available memory. If I understand right, I don't even need a full divisor or/and a multiplier for that one.

  Are you sure? yes | no

Yann Guidon / YGDES wrote 11/15/2019 at 16:53 point

Please, please, continue this project !

  Are you sure? yes | no

Alexander wrote 11/15/2019 at 17:22 point

Thank you for your interest in the project!
Frankly, I got a little discouraged that I couldn't fit more or less complex algorithm in 64 instructions (like Newton's method for square root). Also right now I spend all my free time on two other opensorce projects, that I really want to release this year. I intend to clear some time in January to return to this relay computer, though. Fingers crossed!

  Are you sure? yes | no

Yann Guidon / YGDES wrote 11/15/2019 at 17:43 point

Good luck !
Maybe you'll create a v.2 and it will solve most of your problems ?

  Are you sure? yes | no

Yann Guidon / YGDES wrote 08/03/2019 at 20:20 point

How did I miss this project ??? It's awesome !

  Are you sure? yes | no

danjovic wrote 08/28/2018 at 00:29 point

Amazing project! The relays ticking might sound great too!

  Are you sure? yes | no

roelh wrote 08/25/2018 at 11:32 point

Hi Alexander, good to see another relay computing project ! You might want to look at my RISC Relay computer https://hackaday.io/project/11012-risc-relay-cpu for inspiration. I'm looking forward to seeing schematics and instruction encoding of your computer.

  Are you sure? yes | no

Alexander wrote 08/25/2018 at 11:49 point

Hi! Cool project, great to see you took time to write so much documentation! I will undoubtedly study it.

The instruction set for my machine is available on the page. I must confess that drawing schematics is a real pain to me, it takes too much time. But I'll try to do the whole thing eventually.

Thanks for the first comment!

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates