Show HN: Arduino 6502 Controller
github.comThe 6502ctl project is an Arduino controller for the 6502 CPU. The controller controls all 6502 pins, including the clock signal and interrupts, and simulates an address and data bus with attached memory and an output peripheral. The controller includes a clock-cycle debugger with disassembler. An assembler is also included with the project. Wow! A 6502 ICE, nice! That would certainly make developing a retro 6502-based machine these days much easier. I came across a similar project in the past - a shield to drive a 6502 from an arduino: https://www.tindie.com/products/8bitforce/retroshield-6502-f... I bought the z80 variant and had a bit of fun with it, single-stepping and emulating RAM, before I moved on to a single-board computer. Using half of zero-page for IO (and then dedicating 1/4 of that to a string printing interface) is a somewhat odd design choice. Most nontrivial 6502 software leans heavily on zero page (since there are very few registers and shorter/faster instructions for zero-page memory access). Simulating something that looks like a serial port (transmit/receive/status registers) would seem more natural, peripheral-wise. NOTE: Most modern debuggers show the next statement/instruction that is going to be executed. The 6502ctl debugger always shows the last operation (not instruction) that was executed. That "note" should be more of a "warning". I can't think of any debugger, "modern" or otherwise, that doesn't show the next instruction to be executed. Expect this to cause a lot of confusion. Would OP like to elaborate on what exactly this does? I'm guessing the 6502 otherwise does not have good debugging/development support? ??? It allows you to program a 6502 chip and simulate peripherals. Back in the day you couldn’t even single step a 6502. IIRC the apple 1 manual had a super smart Woz way to nop the 6502 in between steps to keep it alive. That being said I love the 6502 and have a few laying around and will play with this on Monday. I worked on some 6502 based stuff in the early 80s, thanks to a college internship. As I learned from my mentor, the original 6502 was NMOS and had some dynamic registers, i.e., their contents needed to be refreshed, thus limiting how slow the machine could run. But the 65C02 was CMOS with all static registers and could be slowed down to zero through appropriate control of the clock. The thing we were building for my internship used a very low clock speed to conserve battery power, since CMOS draws current only during transitions. Yep. The only 6502s that I’ve seen recently can single step. But it’s still amazing they are being sold to this day!