I’ve been following Ben Eater’s tutorials to make a breadboard computer based around the classic 1970s processor, the 6502. This CPU was used in many classic 8-bit computers including the Apple 2, BBC Micro, Atari VCS as well as the first two computers I ever used, the Kim-1 and the Commodore PET.
I’ve pretty much caught up with Ben’s tutorials now, and reached a point where I’m probably going to diverge from his project. My aim is to make a computer like a Kim-1 or Acorn System 1: a single-board, self-contained computer with a simple display that you can program using machine language on a hexadecimal keypad.
As a start, I managed to create a program that displays the contents of memory locations. On the first line of the display it shows the address, the contents of that location in hex and then an ASCII representation of the byte in question. You step forwards through the program using a button connected just like Ben Eater’s counter button.
It’s a very small step towards a working monitor program, but quite pleasing to have made. I decided just to start at address #8000 – the ROM – because I know what’s in the ROM and can check the results against the display. Obviously eventually this will cover RAM addresses and allow you to enter new code and run it.
This program only scrolls through 256 locations, but I suspect that’ll be enough for hand-entered machine code programs. I’m unlikely to add any storage devices to this computer, unless anyone has a spare punch tape reader…
Watch the video above to find out more about how it works and find my source code here: https://github.com/blogmywiki/6502
Next step: add a hex keypad!