News for hackers. Stuff that matters.
Re:The 6502 CPU's overflow flag explained at the silicon level by vidarh on Tuesday January 15, 2013 @09:28AM (#5060212)
Almost 38 years, even... If you're interested in the story around MOS and the 6502, the early parts of "Commodore: A Company on the Edge" by Brian Bagnall covers it quite a bit including parts about the manual layout work that Bill Mensch did.

Here's an article about it too: http://research.swtch.com/6502

Not only did they route / layout by hand-drawing, and then cut the Rubylith photomask by hand (it's not a drawing they use to reduce it photographically - they cut out holes..), but Bill Mensch got it right the first time. 3,510 transistors according to the article.

Bill Mensch left MOS to found Western Design Centre quite early, and so is covered less in that book than Chuck Peddle which was instrumental in Commodore for a long time after they acquired MOS. The amazing thing is WDC still sell variations of the 6502 design, including various replacements such as a 16 bit version.

Peddle (the other main designer) and Mensch deserve a lot more attention than they've gotten.

(EDIT: From WDC's website: "Annual volumes in the hundreds (100’s) of millions of units keep adding in a significant way to the estimated shipped volumes of five (5) to ten (10) billion units. " Yikes...)

Re:The 6502 CPU's overflow flag explained at the silicon level by kens on Tuesday January 15, 2013 @12:47PM (#5061558)
I'm glad to see the 6502 getting so much attention on HN. I like the article title Unwind used here, so I've changed the article's original title to match. (Note to self: try to come up with better titles.)

I've seen that story before that the 6502 worked perfectly the first time, but I think there's some mythologizing going on. The ROR instruction was totally broken on the first release of the 6502 and wasn't fixed until months later. [1]

The quote above says that the 6502 has 3510 transistors, and this number appears many other places. It turns out that the 6502 has 3510 enhancement transistors and 1018 depletion transistors, for a total of 4528 transistors, according to the visual6502 analysis.

And if you're interested in the inner workings of the 6502, you should definitely check out the huge transistor-level schematic at: http://www.downloads.reactivemicro.com/Public/Electronics/CP...

[1] http://en.wikipedia.org/wiki/6502#Bugs_and_quirks and details at http://www.pagetable.com/?p=406

Re:The 6502 CPU's overflow flag explained at the silicon level by joezydeco on Tuesday January 15, 2013 @03:43PM (#5062864)
Have you checked out the documentary that Jason Scott is working on? He ran a Kickstarter to fund the development of three films. One of them is specifically about the 6502:

http://www.kickstarter.com/projects/textfiles/the-jason-scot...

Re:The 6502 CPU's overflow flag explained at the silicon level by vidarh on Friday January 18, 2013 @04:43AM (#5077905)
I suspect that the "worked perfectly the first time" basically implies (whether that is accurate or not) "they only had to create one mask before their tests passed", not that it was entirely bug free. Possibly that the mask faithfully replicated the design, but that the revision of the design they first manufactured still had bugs.

In any case, the main thing is that a lot of MOS' early success came from saving a tremendous amount of money being able to get to market quickly and cheaply compared to the competition thanks to actually having guys like Mensch and Peddle coupled with superior process (though that did not last all that long).

Re:The 6502 CPU's overflow flag explained at the silicon level by simcop2387 on Tuesday January 15, 2013 @01:34PM (#5061898)
You might also want to check out someone building a computer based off a 6502, very fun to see someone going through the steps to design and build something out of older hardware.

http://quinndunki.com/blondihacks/?p=680

Re:The 6502 CPU's overflow flag explained at the silicon level by vidarh on Friday January 18, 2013 @04:57AM (#5077949)
Part of the appeal to me of this hardware is that it is so simple that even without much electronics experience you can get away with a lot more trial and error while learning.

I did all kinds of crazy things with my C64 and got away with it without breaking stuff, like powering it off batteries (the C64 takes multiple different voltages in, but you can get away with just one - don't remember if it was 5v or 9v - just that some things like the user port and realtime clock won't work) and attaching leds and relays to the user port without a clue what I was doing, replacing the IO chips (CIA) with a different version from my 1541 disk drive when one of the ones in the C64 broke (standard troubleshooting: If the CIA chips were hot right after turning the machine on, they had short-circuited - they were the source of breakage on C64's and Amiga's...), and at a later point with one from my Amiga (they're all pin compatible, but some functionality is different, e.g. the Amiga version has a 32 bit timer instead of the realtime clock nobody used...), or replacing the 6510 in my C64 with a 6502 from a 1541 just to see what would happen (the 6510 has 8 general purpose IO lines, mapped to the tape drive IO and I think bank switching - I believe the machine will still start but...)

On my Amiga I at one point made a pause switch by soldering stuff straight onto a pin on the CPU...