Discussion:
Reverse Engineering the MOS 6502
Tracy Reed
2011-01-02 07:35:49 UTC
Permalink
Wow. Amazing work:



Be sure to watch all 6 parts.

I am left wondering how much of the netlist creation can be automated. I see it
as potentially an even easier problem than optical character recognition. Just
how impossible would reverse engineering a modern CPU be and how
parallelizeable is the emulation of the hardware?

This makes me want to pull out the Apple IIc and do a little assembly hacking.
It is hard to imagine that the same CPU was present in the KIM-1, Atari 2600,
and Nintendo NES given the vastly different capabilities of these systems.
Although to be fair most of those new capabilities were enabled by add-on sound
and video hardware which complimented the CPU.

It also makes me a bit sad that as a young kid I did not have enough
information available to me to be able to take advantage of the hardware that I
had. I wonder how many people would be getting into hacking this stuff if
machines still came with a ROM monitor that fired up by default when powered on
and no other OS was found.
--
Tracy Reed
http://tracyreed.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.kernel-panic.org/pipermail/kplug-lpsg/attachments/20110102/eda54699/attachment.pgp
David Brown
2011-01-02 15:40:09 UTC
Permalink
Post by Tracy Reed
I am left wondering how much of the netlist creation can be automated. I see it
as potentially an even easier problem than optical character recognition. Just
how impossible would reverse engineering a modern CPU be and how
parallelizeable is the emulation of the hardware?
Some interesting challenges:

- 3,510 transistors in the 6502. An i7-950 has 731 million, for about
200,000 _times_ as many transistors. The 6502 is within reasonable
comprehension, but I think trying to understand an i7 would be a bit
overwhelming.

- Feature size. The 6502 die components can be resolved visually.
Modern CPUs are built with vastly smaller transistors, much smaller
than can be resolved with visible light.

Fascinating video.
Post by Tracy Reed
This makes me want to pull out the Apple IIc and do a little assembly hacking.
It is hard to imagine that the same CPU was present in the KIM-1, Atari 2600,
and Nintendo NES given the vastly different capabilities of these systems.
Although to be fair most of those new capabilities were enabled by add-on sound
and video hardware which complimented the CPU.
There are numerous emulators that would probably be easier to use than
the real hardware. You could store your code on the host, and use more
powerful tools to compile and assemble.

David
Post by Tracy Reed
It also makes me a bit sad that as a young kid I did not have enough
information available to me to be able to take advantage of the hardware that I
had. I wonder how many people would be getting into hacking this stuff if
machines still came with a ROM monitor that fired up by default when powered on
and no other OS was found.
The progression of complexity kind of hurts this. With my C64, I read
ROM disassembly output, and had a pretty solid understanding of the
whole machine. When I got my first x86, I still did a lot of low-level
stuff (I didn't have a hard disk for quite a while), but there was still
much I didn't know. As the machines progressed, the BIOS became less
important. Now, I find that although I can read x86-64 assembly, it
would take a lot of learning to be able to write it.

David
bsder
2011-01-06 15:20:43 UTC
Permalink
On Sun, 02 Jan 2011 09:39:48 -0800
Post by David Brown
- 3,510 transistors in the 6502. An i7-950 has 731 million, for about
200,000 _times_ as many transistors. The 6502 is within reasonable
comprehension, but I think trying to understand an i7 would be a bit
overwhelming.
It's not as bad as you think. Most of those transistors are RAM. The functional blocks are pretty much the same for the last 15 years. The issues are generally memory controller and instruction decode.

-a
David Brown
2011-01-06 16:45:49 UTC
Permalink
Post by bsder
On Sun, 02 Jan 2011 09:39:48 -0800
Post by David Brown
- 3,510 transistors in the 6502. An i7-950 has 731 million, for about
200,000 _times_ as many transistors. The 6502 is within reasonable
comprehension, but I think trying to understand an i7 would be a bit
overwhelming.
It's not as bad as you think. Most of those transistors are RAM. The
functional blocks are pretty much the same for the last 15 years. The
issues are generally memory controller and instruction decode.
Actually, the 731 million count doesn't include the caches. The core is
really amazingly complicated.

David

Loading...