Replica of the Kenbak-1: the first personnal computer.
All the internal TTL logic has been replaced by an Arduino Nano. An MCP23017 handle the inputs. An TLC5940NT handle the LEDs.
- Useful shortcuts (see below).
- Memory initialized to 0.
- Unprecise timing (original Kenbak-1 instructions had an unknown number of cycles).
If you want to learn more about the computer, here are some publications taken from the Kenbak-1's original website:
- Programming Reference Manual: everything you need to program the computer.
- Laboratory Exercises: to learn how to use the computer, how to handle binary numbers, how to make algorithms and flowcharts… Awesome book, I read it completely (that's how passionate I am about this computer) and filled it so if you need some answers or look at sample programs assemblies I made, look here: Programming Reference Manual Completed.
- Theory of Operation: all electronic schematics to understand the inner workings of the Kenbak-1.
You will need PlatformIO (first time I use it in a project, amazing tool).
- To compile:
$ pio run
. - To upload:
$ pio run -t upload
.
- STOP + START: As the original Kenbak-1, executes one instruction.
- STOP + READ: Load RAM n°X. X is determined by the input number entered on the Kenbak-1 (input register: memory address 0377). Programs 0-3 come from the Arduino's EEPROM, others from the Arduino's Flash (sample programs).
- STOP + STORE: Store RAM in EEPROM bank n°X. Only numbers 0-3 are allowed.
- STOP + CLEAR: Clear all RAM (initialized to 0).
- STOP + DISPLAY: Dump RAM to serial if
DEBUG
is defined (config.h)[src/config.h] in a C-array friendly manner. I use this so I can enter a program from the Kenbak-1 and then easily save it as a sample program. - STOP + B0-B7: Change LEDs' brightness.
0-3. User saved programs (EEPROM)
You can find listing and instructions for the following programs in the Laboratory Exercices completed by myself.
- Automatic counter (Laboratory Exercises Exercise 2, page 2-3 and almost Exercise 12, page 12-5)
- Step-by-step counter (Laboratory Exercises Exercise 3, page 3-1)
- Binary to decimal training (Laboratory Exercises Exercise 4, page 4-3)
- Decimal to binary training (Laboratory Exercises Exercise 5, page 5-1)
- Adder (Laboratory Exercises Exercise 6, page 6-1)
- Combination lock, code is 42 (Laboratory Exercises Exercise 11, page 11-7)
- Separate tallies (Laboratory Exercises Exercise 13, page 13-4)
- Sum of consecutive values in memory (Laboratory Exercises Exercise 14, page 14-6, preloaded with values given page 14-4)
- Substraction (Laboratory Exercises Exercise 15, page 15-4)
- Two numbers adder by consecutive increments (Laboratory Exercises Exercise 15, page 15-5)
You can find listing and instructions for the following custom programs in the samplePrograms folder.
- K-2000: simple animation of an LED going back and forth.
- Multiplier: multiply two numbers.
- Pong: very simple Pong game.
- Put sample programs in Arduino's flash memory!
- Update and upload schematics, PCB, 3D model, GCode and everything.
- Add comments and maybe better format for sample program's listings. Those tabulations aren't the best.
- Use MCP23017 interrupts.
- Use internal timer to check battery's voltage every X sec.
- Uniformize
switch
s andif
s inexec()
. - Make a test suit for the emulator.
- Laboratory Exercises page 13-4: instruction
STORE A (200)
should beSTORE A OUTPUT
.