Jump to content





Reverse Engineering the 6502 (52-minute video presentation)

Posted by JeremiahK, 30 December 2017 · 181 views

6502 reverse engineering

I stumbled across this video presentation about reverse engineering the MOS 6502, and of course I had to watch it.  Quite an interesting watch!
 

 
I always wondered about the LAX/SAX instructions, and why there aren't similar illegal opcodes for other register combinations.  Turns out that the opcode's lower bits define which register is to be worked with, %00 for Y, %10 for A, and %01 for X.  %11 is not intended to be used, but when it is used, it causes both A and X to be affected, explaining why we don't an opcode for, say, LAY.
 
As stated in the video, visual6502.org has a lot of information about the 6502 line of processors, and many others, as well.  The ultra-high-resolution images of the chip are there, and my nerd wants to print them up and frame them on a wall.
 
I'm not really a hardware guy, more of a software guy, but for some reason I love learning how computers work (or trying to).  I guess that's why I prefer the low-level programming languages.  Assembly is about as low as you can get without getting into machine code, and it's a lot of fun for something like the Atari 2600.  It brings you closer to the machine, and although it doesn't let you see the physical chip layout, it gives you an idea of how it must theoretically work.
I would love to try programming for the other old 6502 systems like the NES after I have a 2600 game or two complete, but anything other than that is better suited to a higher-level language.  C++ is my favorite language for programming, although Python is nice for simple tasks that you just want to write quickly without worrying about code efficiency.






July 2018

S M T W T F S
1234567
891011121314
15161718192021
22 232425262728
293031    

Categories