drhelius / Gearcoleco

ColecoVision emulator for macOS, Windows, Linux, BSD and RetroArch.
https://x.com/drhelius
GNU General Public License v3.0
62 stars 15 forks source link

Memory comparison/search feature #39

Open npiegdon opened 6 months ago

npiegdon commented 6 months ago

In most emulators this is usually found near the "cheat" features, but something like (the NES emulator) FCEUX's Tools --> RAM Search window would be very helpful while tracking things down during decompiling work.

The essence of the feature is grabbing a snapshot of RAM (and maybe VRAM?) at the start of a search session, then, whenever one of the >, <, >=, <=, =, or != buttons are clicked, Gearcoleco would compare the current values in RAM to those from the snapshot and discard anything that doesn't match. There are a few more details (like data size and signed/unsigned comparisons) that FCEUX covers pretty well.

Implementation-wise, because all 1k of the Colecovision's RAM can fit on screen pretty easily, instead of having a separate window that lists the matches, the memory search feature could just change the text highlight in the RAM window. Maybe green if it still matches and ImGui's disabled color if it doesn't? (This would override the "Grey Out Zeroes" option.)