2 ms·
As best I understand it, bsnes is purely a bytecode interpreter. It does fancy tricks with stack-swizzling to quickly switch between different parts of the code
by thristian 16y ago
As best I understand it, bsnes is purely a bytecode interpreter. It does fancy tricks with stack-swizzling to quickly switch between different parts of the code to get the timing right, but it never ever generates instructions for the host CPU architecture.
- lscharen 16y agoActually, I think it's more accurate to say that (at least for the 65816 core), that bsnes is a pipeline interpreter. Each 65816 opcode takes between 2 and 8 cycles to execute (more for the MVN and MVP opcodes) and there are rules about when interrupts can be asserted -- bsnes correctly emulates these processor details. Also, I believe the bsnes properly takes into account the read and write states of the memory bus. This is also an intra-opcode level of detail. AFAIK, some of the other CPU cores (esp. the DSP-n and Supergameboy cores) are straightforward opcode interpreters.