Anders Nielsen Proves Steve Wozniak Right, Builds a Single-Stepping Board for the MOS 6502
A pernicious myth about the difference between NMOS and CMOS versions of the MOS 6502 has been put to bed — and you can prove it yourself.
Maker and vintage computing enthusiast Anders Nielsen has brought a piece of computer history to life by building a modern incarnation of Steve Wozniak's single-stepping circuit for the MOS Technology 6502 eight-bit microprocessor — and, in doing so, has put to bed rumors that it couldn't possibly work as-designed.
"If you've ever played around with the 6502 microprocessor found in a ton of old computers, like the ones from Atari, Commodore, Apple, and Nintendo, you might've heard that you absolutely must get the CMOS version that came out in the 1980s because the original 6502 from 1975 can't be run one cycle at a time, making debugging harder," Nielsen explains of the myth he set out to bust. "I'm happy to tell you that you've been mislead and it's not only possible to single cycle the original 6502 — it's an intentionally built-in feature with it's own dedicated pin."
Well-read Apple fans will know that co-founder Steve Wozniak included a circuit for single-stepping a MOS 6502 processor — manually clocking it so that it would only run an instruction when a button was pushed, allowing programs to be debugged at the lowest possible level — in the manual for the Apple-1, the company's first personal computer as-launched in 1976.
In more recent years, though, the functionality of that circuit design was brought into question with claims that only the later complementary metal-oxide semiconductor (CMOS) version of the 6502 would work, and that it would fail on the original N-type MOS (NMOS) version of the chip.
"The confusion on the matter stems from the fact that the [NMOS] 6502 has dynamic registers and the newer [CMOS] 65C02 is a fully static design," Niesel explains. "That means the 65C02 won't lose the contents of its registers if you stop the clock, whereas the original 6502 will if run it slower than about 10kHz."
While Nielsen found nothing wrong with the concept of Wozniak's design, actually getting it to work in the 21st century was a little more challenging — but only barely. "We need to update the schematics a bit by putting pull-up resistors on most of the inputs," Nielsen explains. "Other than that, I had to take a good long look in the junk drawer to find some appropriate switches."
A video on Nielsen's recreation of the single-stepping circuit is embedded above and available on his YouTube channel, while design files for the board have been published to GitHub under the reciprocal GNU General Public License 3; Nielsen is also selling assembled version of the board on iMania.dk at 46.88 DKK (around $9.60) plus shipping.