Close

6502 speed throttling

A project log for PZ1 6502 laptop

I am building a laptop with a W65C02, lots of memory, SID-sound, decent graphics and a filesystem.

adamklotblixtadam.klotblixt 05/07/2020 at 09:430 Comments

I've decided to cap the 6502 speed to 2.0MHz, but it can easily run 12MHz. Why? Well, it IS a retro laptop, and I also want head-room to do all the HW-emulation without problem. It would be possible to build an equivalent laptop in real HW, doing a lot more soldering.

The way I do the trottling: there is a 50Hz counter running in the Teensy. I execute (2000000 / 50) emulated 6502-cycles, calculate the sound buffer (more on that later) and then wait for the counter to increment to the next "frame". Really simple code.

Discussions