It was never so easy to get YouTube subscribers
Get Free YouTube Subscribers, Views and Likes

Emulating a CPU in C++ (6502)

Follow
Dave Poo

This isn't a full implementation of the 6502, this is more just a from scratch into in learning how a CPU works by writing an emulator one (in this case the 8bit 6502).
If you want a more in depth video on writing a full 6502 emulator then see One Lone Coder's "NES Emulator Part #2":    • NES Emulator Part #2: The CPU (6502 I...  
Another good talk to watch is this video from Matt Godbolt about the BBC Emulator he wrote in Javascript!!!:    • Emulating a 6502 system in JavaScript...  

Code is here: https://github.com/davepoo/6502Emulator

Links:
6502 Processor: http://www.obelisk.me.uk/6502/
C64 Memory Map: https://sta.c64.org/cbm64mem.html
C64 Reset Process: www.c64wiki.com/wiki/Reset_(Process)

Timestamps:
0:00 Intro
0:29 The 6502
4:24 Creating CPU Internals
9:23 Resetting the CPU
12:48 Creating the Memory
15:10 Creating the Execute function
23:32 Emulating "LDA Immediate" instruction
28:00 Hardcoding a test program
31:50 Emulating "LDA Zero Page" instruction
37:20 Emulating "LDA Zero Page,X" instruction
38:42 Emulating "JSR" instruction
48:30 Closing comments

posted by astefeada1j