lots of words

This commit is contained in:
Morgan 'ARR\!' Allen 2020-01-18 12:52:01 -08:00
parent 002caab791
commit ec4a412a95
1 changed files with 41 additions and 1 deletions

View File

@ -1,5 +1,45 @@
# 6502-hacking
> HACKING <
A project to work with [Ben Eater's 6502] computer kit, replacing the clock module
and EEPROM, amongst other things.
\> HACKING <
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.
## 6502-contoller
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.
## 6502-loader.py
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.
[Ben Eater's 6502]: https://eater.net/6502