craigthomas / Chip8Java

A Super Chip 8 emulator written in Java
MIT License
27 stars 2 forks source link

Store Subset of Registers #23

Closed craigthomas closed 1 month ago

craigthomas commented 2 months ago

Currently, the Fx55 instruction will save the number of registers specified by x into the memory space pointed to by index. The index register is then post-incremented by the number of registers stored (or not, depending on which quirk mode is activated).

The XO Chip specification calls for a subset store command as follows:

Fxy2

This will save a subset of registers starting from x and ending at y in the memory space pointed to by index. Note that the index is not post-incremented. If x is larger than y - for example x=6 and y=2 - then registers are stored in reverse order into memory (e.g. 6, 5, 4, 3, 2). The order is inclusive of start and end values.