Skip to content

[Windows] Internal cheat AR code generation is broken #917

Description

@windwakr

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).
Image

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions