Over the years, CHIP-8 emulators have accumulated different "quirks" or differences in the way certain instructions are supposed to behave.
More information is available at:
We could introduce a bitmask or individual flags for the quirks which are checked at runtime in each emulator cycle, or we could implement different sub-interpreters (e.g. classic CHIP8, S-CHIP, XO-CHIP, etc.). The performance penalty should be negligible thanks to CPU branch predictors.
Sketch (taken from here):
type :: quirks
logical :: VfReset
logical :: Memory
logical :: DisplayBlank
logical :: Clipping
logical :: Shifting
logical :: Jumping
end type
Over the years, CHIP-8 emulators have accumulated different "quirks" or differences in the way certain instructions are supposed to behave.
More information is available at:
We could introduce a bitmask or individual flags for the quirks which are checked at runtime in each emulator cycle, or we could implement different sub-interpreters (e.g. classic CHIP8, S-CHIP, XO-CHIP, etc.). The performance penalty should be negligible thanks to CPU branch predictors.
Sketch (taken from here):