Preserving Great Tech For Posterity — the 6502
trebonian writes "For great old hardware products like the MOS 6502 (used in the Apple II, the C64, the Nintendo NES), the details of the designs have been lost or forgotten. While there have been great efforts to reverse engineer the 6502 from the outside, there has not been the hardware equivalent of the source code — until now. As Russell Cox states: 'A team of three people accumulated a bunch of 6502 chips, applied sulfuric acid to them to strip the casing and expose the actual chips, used a high-resolution photomicroscope to scan the chips, applied computer graphics techniques to build a vector representation of the chip, and finally derived from the vector form what amounts to the circuit diagram of the chip: a list of all 3,510 transistors with inputs, outputs, and what they're connected to. Combining that with a fairly generic (and, as these things go, trivial) "transistor circuit" simulator written in JavaScript and some HTML5 goodness, they created an animated 6502 web page that lets you watch the voltages race around the chip as it executes. For more, see their web site visual6502.org.'"
But wasn't the C64 processor a 6510? I could be wrong.
"the details of the designs have been lost or forgotten. While there have been great efforts to reverse engineer the 6502 from the outside, there has not been the hardware equivalent of the source code — until now"
The schematic for the 6502 has been available for years on the net. Printed on one sheet of photo paper at 1200 dpi, every transistor is visible. It's quite amazing.
A simple google search for "schematics of 6502" reveals the link above. Also, there are books out there, in Bulgarian, with the schematics and design of Pravetz 82, a 6502 clone.
The 6502 as used in the Apple ][ had some interesting quirks -- such as dummy read cycles that appeared on the bus when executing indexed operations. Woz used these dummy memory cycles in designing the original Apple ][ disk controller to whack the disk controller state machine. Undocumented at the least! Some of the Apple ][ disk copy protection schemes (particularly for games on 5 1/4 inch floppies) also relied upon undocumented behaviors in the processor, such as some of the "unused" opcodes.
6502 made up for lack of registers with extra addressing modes, but they were relatively uniform across the instruction set, making the instruction set simpler and more orthogonal, whereas many x80 instructions designate specific (and different) registers for operand, making the instruction set rather ugly. You could see the nasty root of x86 instruction set even then, although, as you said, it wasn't so bad because 8080/z80 was much simpler.
6502 didn't have multiply either, and it's true z80 was more powerful in several ways.
Fuck systemd. Fuck Redhat. Fuck Soylent, too. Wait, scratch the last one.