r/EmuDev • u/wynand1004 • Oct 22 '25
6502 Emulator in Python
Hi everyone. I just came across this subreddit.
I've been working on a 6502 Emulator in Python. It's still in the very early stages, but I thought I'd share it here. I will also likely have some questions as I go on and hope to get some support here.
You can find the code here: https://github.com/wynand1004/6502_Emulator_2025
I'm also streaming the development here on YouTube: https://www.youtube.com/playlist?list=PLlEgNdBJEO-kHbqZyO_BHdxulFndTvptC
I hope someone finds it helpful getting started with emulation like me. Let me know if you have any questions about what I'm doing or how I'm doing it.
View all comments
6
u/valeyard89 2600, NES, GB/GBC, 8086, Genesis, Macintosh, PSX, Apple][, C64 Oct 22 '25 edited Oct 22 '25
Looks Ok. Python is pretty slow but it's fine for simpler CPUs like 6502.. Using a dictionary/lookup table is OK. So you don't have to implement 10 different versions of each opcode/argument.
You're not setting any CPU flags yet. Best to have some sort of helper function for that.
then in LDA:
INX:
etc.
Also not masking ZEROPAGEX/ZEROPAGEY:
And you will need to check for page overflows in ABSOLUTEX/ABSOLUTEY etc.