3 ms·
Thanks for the reference! This was a long time ago but I think I didn't use that decoding table. Just a couple of days ago I was reading about the x86 one, I re
by ggambetta 13y ago
Thanks for the reference! This was a long time ago but I think I didn't use that decoding table. Just a couple of days ago I was reading about the x86 one, I really wasn't aware that opcodes were anything but random bytes mapped to operations.
As for the improvement, I never liked switch, for unknown reasons :) You mean an improvement in style, performance or both?
- userbinator 13y agoThere's always a pattern to the opcodes, even though in some cases it's not quite so obvious (like x86 - it's octal too). The reason has to do with how it's implemented in hardware. The 6502's is only slightly less regular than the z80 and here's an interesting article about that: http://www.pagetable.com/?p=39 http://www.pagetable.com/?p=39 IMHO the switch would improve both style and performance, what caught my eye when I looked over the code was that different flags would require different amounts of time to execute, which really seems an odd thing for an emulator to do.