-
Notifications
You must be signed in to change notification settings - Fork 607
Description
State your operating system:
Windows
DesMuME version
latest
Isse
There are a few issues with the AR codes automatically generated in the internal cheats editor.
One, you should be passing the cheat size directly into generateAR, not whatever is in that array you're indexing.
See https://github.com/TASEmulators/desmume/blob/master/desmume/src/frontend/windows/cheatsWin.cpp#L415
This is noticeable after making a cheat, closing the editor, then re-opening the editor. It will default to a 32-bit code size(0 prefix).

But the bigger issue is that the codes are just completely wrong for sizes other than 32-bit. The existence of 24-bit value type in the cheat editor throws off the AR code generation. If you refer to documentation on DS AR codes you can see that there is no 24-bit write type.
https://doc.kodewerx.org/hacking_nds.html
DeSmuME will currently generate a 1-prefix(16-bit) AR code for 24-bit codes, a 2-prefix(8-bit) AR code for 16-bit codes, and a 3-prefix(some comparison) AR code for 8-bit codes.