MCL65+ Bus Test

I used a logic analyzer to observe the 6502 bus timing that I able to achieve and it appears to have under 300ns clock to out for the address bus which is within spec. It is difficult to implement parallel GPIO input and outputs with the Teensy 4.1, so I decided to use parallel inputs for the received data[7:0] and sequential writes for each bit of the address bus. I will try to perform parallel writes to GPIO6 directly, but I believe there could be issues with unwanted bits being updated…

MCL65+ Bus Test

New Project – MCL65+

I thought it would be fun to implement a MOS 6502 inside of a Teensy 4.1 and build a board to allow drop-in replacement of the original CPU! The Teensy is a 600Mhz micro controller board which uses the Arduino IDE and should provide enough speed to implement both the 6502 instruction set and the bus interface… at least at 1Mhz. With 1MB of memory, it could also emulate the system’s memory and run it at 600Mhz!

The initial steps were to write the 6502 emulator, test the correctness, port it to the Teensy, and check the bus timing. I believe the core is cycle accurate, maybe even cycle exact, to the original 6502. The bus timing also seems to be within the data sheet requirements…

The next step was to build a small PCB which performs the 5V to 3.3V translation (Teensy is not 5V tolerant). I was able to tweak the pinouts to allow the use of an inexpensive ($5 for quantity 10) two-sided PCB with solid ground plane and 100% through-hole components. This way anyone can solder together a board at home! I used two transparent latches and one hex-inverter.

The board and parts should arrive in a few weeks, after which I will drop it into my first test machine, the Commodore VIC-20.

The plan is to first run the system at normal speed, meaning the MCL65+ will be cycle accurate and will access all memory ranges through the external bus which should run exactly the same as the real MOS 6502.

The next goal is to move RAM and ROM into the Teensy and then run those address ranges in “accelerated” mode which is at 600Mhz. This would probably make this the World’s Fastest VIC-20! 🙂

All of the code and design files will be uploaded to GitHub. Stay tuned…

New Project – MCL65+