Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
JIT compiler for 6502 machine code, built on lib6502 and LLVM (github.com/zornslemma)
59 points by luu on April 13, 2015 | hide | past | favorite | 7 comments


Related - Statically Recompiling NES Games into Native Executables with LLVM and Go (http://andrewkelley.me/post/jamulator.html)


Super-interesting article, thank you for sharing.

Two great quotes from near the bottom...

"At this point in the project we have Super Mario Brothers 1 running mostly on native code, although not very highly optimized. We've learned that static compilation, while possible, is rendered pointless by some of the inherent challenges that emulating a system presents."

and...

"These issues must be resolved if we want a playable game. Sadly, the solution marks the final nail in the coffin of the integrity of this project."

So brave. 10/10 - would read again.


I don't think the 6502 will ever die. It is too popular and was used in a lot of 8 bit computers and video game consoles.

http://www.cc65.org/ Is a C based 6502 compiler that people looking at this JIT compile might be interested in.



I only wish that this JIT compiler was for cc65 so that it produced faster 6502 code. Anyone know of any efforts to do that - my Oric Atmos sessions would definitely benefit!


Dealing with self-modifying code must be one of the hardest tricks to pull off. Saw a notice in TODO about memory leaks, I guess that means there is actually some support for this? Even with leaks that sounds quite impressive.


JIT compiling 6502 code is an idea that has been around for a long, long time.

http://tuxnes.sourceforge.net/




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

Search: