Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

A 6502 in ~2500 lines of C? Really? Bookmarked :)


I can top that :) (although it hasn't been used in a production emulator)

I wrote this a few years ago - it's ~500 lines taking advantage of the logic behind the instruction set (instead of a jump table) and it can run Apple I BASIC at least.

https://github.com/happycube/chadslab/tree/master/m6502


Looks really clean. Nicely done.

That is similar to my approach to emulating the Gameboy Color's Z80-like CPU. Not yet completed - probably never will be :(


Yeah, imo trying to actually do some instruction decoding rather than just a massive switch case is a lot nicer.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: