3 ms·
The structure of a loop around a big switch statement (based on value at PC) to blocks of code that manipulate the register variables (A, X, Y, PC, etc) and RAM
by bdowling 6y ago
The structure of a loop around a big switch statement (based on value at PC) to blocks of code that manipulate the register variables (A, X, Y, PC, etc) and RAM looks exactly like an emulator core.
The code also appears to include the Commodore BASIC ROM. (See initialization of llvm_cbe_ROM in cbmbasic.c).
So, it looks like an emulator that was written in some other language then converted to C using the LLVM C backend.