Playing around with the 6502

I’ve been playing around with electronics since last year, when I bought a Raspberry Pi so I could make use of GPIO etc with python.

Anyway, during my time playing around with this stuff I came across Veronica which is a home-brew computer and thought I’d like to try something like that myself!


Over the last few months I’ve been playing around with a 6502 myself
I started out with just a Breadboard, some SRAM and another SRAM module acting as the ROM
The WDC 65C02 has a Bus Enable pin, which I used to allow programming of the SRAM using the Raspberry Pi and two MCP23017 GPIO Expanders
Once it’s programmed, my Raspberry pi starts watching the bus, acting as a logic analyser/bus pirate so I can watch exactly what the code is doing.

Once I got a basic system set up, I plugged in an LCD module I had lying around and interfaced it, wrote some janky assembly code to get it going.

Getting some text output on it was a good feeling!
The hardest part was the code, I’d never done any Assembly before but the 6502 doesn’t have many instructions so I got there in the end.



Once I had that confirmed working, I designed a PCB to carry the CPU, RAM and ROM so I could use my breadboards for other stuff.
It was pretty easy, I designed it using Eagle and then ordered the boards from OSHPark. they came quickly and they look brilliant!


Boards arrived!

Ready to go

I decided to go with an ISA edge connector so that I could easily design the boards within Eagles design limits, and build boards as I go.
I’m thinking I might try to make a single-board design once I’m done with this
I was worried I might’ve missed something, or screwed up the design but it actually worked first go!

I then bought some 6551s and 6522s, the 6551 is a RS232 UART so I can get some real I/O going and the 6522 is a dual 8-bit IO Port controller.

I got these both working on a breadboard pretty quickly, more time was spent porting the WOZ Monitor rom from the Apple 1 to work on this so I could use it to poke and peek at memory locations easily.

6551 and 6522 hooked up

6551 and 6522 hooked up

Woz monitor

Woz monitor

That’s where I’m up to now, I’ve designed a PCB for the Serial and IO ports and am waiting on that to come in, I’m also waiting on a board to come in for the passive backplane as ISA slots don’t fit breadboards properly.

I might try porting MS Basic next, also need to work on an SD Card interface so I can just load programs easily instead of having to program the SRAM with the raspberry pi, or flash the ROM

Also down the track are a PS/2 Keyboard controller and a Video interface. I want to try doing both without using any microcontrollers to do the job, the Video is going to require at least an FPGA or CPLD. not really sure about the keyboard interface