Chip8Java icon indicating copy to clipboard operation
Chip8Java copied to clipboard

Implement `shift_quirks`

Open craigthomas opened this issue 1 year ago • 0 comments

In order to be compatible with a wide variety of Chip 8 ROMs, a change to the shift operation is required. In the original language specification two registers were required: the destination register x, and the source register y. The source register y value was shifted one bit left or right, and stored in x. For example, shift left was defined as:

Vx = Vy << 1

However, with the updated language specification, the source and destination register are assumed to always be the same, thus the y register is ignored and instead the value is sourced from x as such:

Vx = Vx << 1

Setting --shift_quirks will alter the shift operation to the latter behaviour.

craigthomas avatar Sep 02 '24 14:09 craigthomas