You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Morgan 'ARR\!' Allen e13aeffb3c in use image 3 years ago
6502-controller include controller code 3 years ago
arduino-bin-loader but will anyone.... 3 years ago try to do proper resetting 3 years ago in use image 3 years ago
in-action.png in use image 3 years ago
requirements.txt update requirements 3 years ago
test-setup.jpg image of test setup and basic usage instructions 3 years ago


A project to work with Ben Eater's 6502 computer kit, replacing the clock module and EEPROM, amongst other things.


This is very much work in progress but does manage to demonstrate several things. It's made up of two parts. 6502-contoller is an Arduino firmware for interacting with the 6502 and 6502-loader is a python script to interact with the Arduino.

test setup with Nucleo F401RE 6502-loader in action!


This Arduino firmware started off fairly similarly to Ben's monitor firmware but I needed a couple additional things. As I didn't have the clock module it also provided a clock signal from the start. It can also be tied to the 6502 RSTb line and control the reset signal. I also opted to not buy the EEPROM reader for several reasons. One, I don't have the money and additionally I just hate the idea of having to pull a chip to program it, place it back in, blah, blah. I spend 20 years in web development damn it! CTRL-R is my compiler! So the firmware can load the entire ROM into memory, read the ADDRESS lines coming off the 6502 and provided the addressed byte on the DATA lines.

This second feature, while being generally great and speeding up development does have one major hiccup. It's requires not only an Arduino with many IO, like a Mega, it also requires a device with over about 60kb of memory... unlike a Mega. For this project I'm using an inexpressive STMicro Nucleo F401RE devboard. While inexpressive these are still not as accessible as a Mega for some people. The originally I had wanted to request each byte over serial as the address lines change but could not manage to make this work. Now that the entire project is working better and my understanding has improved I do think it's possible and might be worth revisiting.

This part interacts with the Arduino firmware. In it's basic flow it handles several things.

  • Stopping the clock
  • Putting the 6502 into reset
  • Loading the ROM into the Arduinos memory
  • Restarting the clock
  • Bringing the 6502 out of reset
  • Runs monitor mode

At this point the script can be exited and the 6502 will continue to run. A normal terminal can be opened to stop the clock and use single stepping from the devboard.


The Arduino firmware should be fairly straight forward. If you're using a similar Nucleo devboard you should be able to install the STM32 boards from the Board Manager. The 6502-loader requires python3, virtualenv and pip. It can be setup and run as follows.

git clone
cd 6502-hacking
virtualenv .
. bin/activate
./6502-loader --port /dev/ttyACM0 a.out --start