Skip to content
0:00 / 0:00

#mos6502#visual6502#michaelsteil

27c3: Reverse Engineering the MOS 6502 CPU (en)

Christiaan008

73K subscribers • 19 videos on Hallway

YouTube
  • Recommended by 3 people: 2 on Hacker News and 1 in engineering communities.
  • A classic. People kept recommending it from 2014 to 2019.
  • Presented by Michael Steil

Advanced. Deep dive for people who know the field.

476K views15 years ago3 recommendations

HardwareSystems programmingCPUs and computer architectureReverse engineeringRetro computing

Michael Steil explains how the Visual6502 project reverse-engineered the MOS 6502 CPU from die shots into a transistor-level software simulation.

Speaker: Michael Steil 3510 transistors in 60 minutes The MOS 6502 CPU, which was designed in 1975 and powered systems like the Apple II, the Atari 2600, the Nintendo NES and the Commodore 64 for two decades, has always been subject to intense reverse engineering of its inner workings. Only recently, the Visual6502.org project has converted a hi-res die-shot of the 6502 into a polygon model suitable for visually simulating the original mask at the transistor level. This talk will present the way from a chip package to a digital representation, how to simulate transistors in software, and new insights gained form this research about 6502 internals, like "illegal" opcodes. The presentation only requires a basic understanding of assembly programming and electronics, and is meant to teach, among other things, the methods of efficient and elegant chip design used in the early years of integrated CPUs. The talk consists of three parts. The first part, "6502 from top down", describes the programmer's model, as well as the basic layout of the components of the CPU. In the second part, "6502 from bottom up", we describe how to decap and photograph chips, convert each physical layer of the chip into a polygon model, and how to finally convert this into a network of wires and transistors suitable for logic simulation. The third part, "6502 from the inside out", explains the inner workings of the CPU: how the logic blocks work together, how an instruction is decoded by the PLA ROM into controlling these blocks and busses, and how details like interrupt delivery work. Finally, this information can be used to describe and explain undocumented behaviour, like illegal opcodes and crash instructions, and explain bugs like the BRK/IRQ race, the ROR bug and spurious reads and writes in certain situations. For more information visit:bit.ly/27c3_information To download the video visit: bit.ly/27c3_videos

Why it's here

3 people recommend this

What people say. Recommended as an excellent, detailed walkthrough of how to reverse engineer and simulate classic CPU hardware at the transistor level.

u/thatreguyin r/ReverseEngineering • Recommends

27c3: Reverse Engineering the MOS 6502 CPU (480p)

joshvmon Hacker News • Recommends

On “A Japanese-based multinational made a CD-based console once”

There's a lot of information about reverse engineering some of the older CPUs around e.g. the MOS6502 (NES, Apple II, C64, etc). This is a great presentation showing how this CPU is reverse engineered: link to this video Basically it comes down to the fact that you can't really hide transistors and ultimately that's something you can reconstruct. It sounds like a lot of work, and it is, but if you do it you can perfectly emulate a chip. If you can dig out non volatile memory then potentially you have the firmware. Once someone has their hands on that it'll be broken, almost guaranteed, as it becomes a software problem. Lots of people are very good at assembly hacking.

joshvmon Hacker News • Recommends

On “Ask HN: How to Self-Study Integrated Circuit Design?”

…des some context to otherwise pretty dry textbooks. There is quite a bit of difference between how an FPGA works and is programmed versus a totally custom chip. You could also take a look at reverse engineering walkthroughs eg Ken Shirrif has a few on his blog. Nand2tetris is another good thing to look at. Finally, reverse engineering the MOS6502: link to this video…

leocon Hacker News • Recommends

On “Visual6502 Remix”

Here's a nice talk video covering the story from the origins of the 6502 to the Visual 6502 (but not the wasm Remix): link to this video .

7373737373on Hacker News • Mentions

On “BBC Micro at 40: How it inspired a generation of coders [video]”

It used the MOS 6502 CPU, which was also used for the Apple I, Apple II, the Commodores and Atari and Nintendo (NES, SNES) game consoles! link to this video link link