the thread of 6502 variants

August 5, 2020

Everyone knows the 6502, but did you know there’s a bunch of extremely similar and compatible CPUs you could use instead?

what’s special or different about this CPU? much like the Hitchhiker’s guide to the galaxy, it wasn’t the best CPU available in its heyday. it was the cheapest. its unique design uses an extremely minimal number of registers and instead has a “zero page”, 256 bytes of fast memory, and specialised instructions for using them like registers

the 6507, used in the famous Atari VCS (2600), was virtually identical to the 6502 except it was

  1. cheaper
  2. had fewer pins, and consequently
  3. could address less memory (8kB vs 64kB)

the 65C02 was nearly identical to the 6502. the original MOS 6502 designers had a falling out with MOS technology, and founded their own company, Western Design Center (WDC).

important differences:

  1. uses a cmos process which makes it use much less power, and it can be clocked at higher speeds
  2. several new instructions and bug fixes

used in the apple iic, bbc master, atari lynx and others.

the 65CE02, a further development on the 65C02, is faster, and adds an extra register Z that lets you move the zero page anywhere in memory. it appears to have only been used in the unreleased commodore65 and an amiga serial card.

the Ricoh 2A03 is the customised 6502 used in the Nintendo Entertainment System. its main differences are that it removes Binary Coded Decimal instructions. (useless relics anyway) and adds a sound generator, DMA, and game controller I/O. cool!

the 65C816 is a 16-bit processor that can be clocked up to 14mhz. it boots into a backwards compatible 8-bit mode that can directly run 65C02 code without modification!

the related 65C802 is even pin compatible (at the cost of addressable memory)

it was used in the Super NES, the Apple IIGS, and some cpu upgrades for the Commodore 64.

the W65C02ST6PG-14 doesn’t have a very catchy name, but it’s the current produced version of the 6502 from WDC. it can be clocked up to 14mhz, is pin and software compatible with the original 6502, extended instruction set.

there’s also the 16-bit bit modern version, W65C816S also still backwards compatible with 6502. also clockable up to 14mhz. you can buy new ones today. or license them for fpga’s!

the hudsonsoft HuC6280 is a customised version of the 65C02 designed for the TurboGrafx-16/PC Engine game consoles. The enhancements were

  1. can be clocked up to 7.16mhz
  2. 2mb addressable memory
  3. sound generator
  4. extended instruction set

wait.. the turbographx 16 was an 8-bit machine?

the W65C134S is basically a 6502 packaged up with all the serial networking bus infrastructure you’d want for setting up a multicore computer. built in master/slave, message passing and scheduling machinery. W65C265S is the 16 bit version, also— still backwards compatible with 65c02 code.

holy crap, i just found out what the W65C134S was designed for. it’s designed to set up a LAN of up to 8 6502 based medical devices inside the human body

another nice thing about the W65C134S and W65C265S is that they also include a rom “monitor” program that means you can hook them up to a normal UART serial port and get a simple debugger console that lets you punch 6502 asm straight into the CPU

The Mensch computer is a reference design from WDC, a complete working system on a chip based around the W65C265S, which, once again, is a 16-bit 14mhz computer backwards compatible with 8-bit 6502 machine code.

and, a lot cheaper than I thought it was. interesting alternative to the raspberry pi and arduino for fans of the 6502.

Amazon.com: The Western Design Center, Inc. Mensch™ Microcomputer : Electronics

a couple interesting features about this. It’s a “fully static” computer. i had no idea what that meant, so I looked it up. a dynamic computer’s output can only be read at certain moments in the clock cycle, as there’s a number of transitional states and it cannot be easily paused.

A fully static computer, on the other hand, can have its external clock fully stopped, and be put into a low power state where only the static ram is maintained and the cpu is fully powered down, and resumed at will.

Ao, it turns out the MOS 6510 is what is actually in the Commodore 64, despite everyone assuming it’s a 6502.

well, it basically is the same processor, except the 6510 adds extra I/O pins which the C64 uses to address additional memory and to operate the tape drive.