Hacker News new | ask | show | jobs
by emerged 3221 days ago
I've been meaning to do something similar, except by generating C code which is compiled JIT. This way the compiler can optimize blocks of 6502 in more efficient ways than just a direct mapping between opcodes and registers. Of course there's no real purpose to doing this, but it's on my backlog of "projects to do if I'm ever really bored" - one of my first ever C++ projects was writing a dynamic recompiler for 6502, nearly 20 years ago.
1 comments

I think the common way to do something like this these days would be to generate LLVM IR.