root670 / CheatDevicePS2

Game enhancer for PlayStation 2 similar to Action Replay, GameShark, and CodeBreaker. (No longer in development)
GNU General Public License v3.0
79 stars 18 forks source link

8-bit / 16-bit constant serial write (patch code) support #24

Closed luisdallos closed 4 years ago

luisdallos commented 4 years ago

Implemented as code type 8. Same logic as the code type 4 (32-bit constant serial write), but with byte (8-bit) and half-word (16-bit) sized values.

"8-bit / 16-bit constant serial write"

8-bit write
8-aaaaaaa nnnnssss
000000vv 000000ii

16-bit write
8-aaaaaaa nnnnssss
1000vvvv 0000iiii

Starting with address @a, this code type will write the value
@v to @n addresses. In each cycle, the address is incremented
by @s (8-bit write) or @s * 2 (16-bit write) and the value is
incremented by @i.

Note that no cheat tool for the PS2 implements constant serial write for values with size other than full-word (32-bit), and (according to online documentation) the code type 8 was originally intended as "master command" code type (as code types 9 and F).

Test build: http://www.mediafire.com/file/2no2uizdb6c3r8o/cheatdevice.elf/file