bsnes-plus
bsnes-plus copied to clipboard
Highlighting memory changes in memory editor
I made issue #304 which talked about trying to add something akin to Mesen's data change and access highlighting for the ram viewer. I made this addition last weekend as a kind of proof of concept. It starts disabled, but can be enabled on the right-hand panel.
This MR adds a basic value highlighting feature that illustrates changes in values when stepping through frames. Note that this only highlights actual changes in values, and doesn't highlight execution or reads. It would be a nice long term goal to have this work with arbitrary read/write/execute tracking, but this feels like a nice step toward that and could be extended to cover that in a later date.
The highlight color should respect system themes. Right now it uses the systems "link" color. It would also be nice for the other colors to respect system color schemes and provide a legend on the right-hand side for what each color means (since there's plenty of room to provide that info.)
Anyway, here's a kinda-low-quality gif of the feature in action. Should be enough fps to get the gist of what it's
doing, though I'm quite happy with the fade effect!
There's also a commit for ignoring QT project files in the .gitignore
entry -- which would be nice to have to prevent accidental IDE project files from being added to the repository.
Thanks!
Looks great, nice work! I'll take some time to look it over more soon.
There seems to be an issue with random-looking highlighting being applied (and not fading) to areas of memory that aren't being written to at all, like code or uninitialized RAM:
The way that data bytes get highlighted when being changed every frame (or nearly that often) also needs some adjustment, since it makes the background constantly the same as the foreground:
There seems to be an issue with random-looking highlighting being applied (and not fading) to areas of memory that aren't being written to at all, like code or uninitialized RAM:
Ah I think I messed up on my data types there. I cleaned it up and it seems to be working more as expected.
The way that data bytes get highlighted when being changed every frame (or nearly that often) also needs some adjustment, since it makes the background constantly the same as the foreground:
I was thinking about this myself. Could we perhaps transfer these colors to be compliant with QTs theming system? Here's how it looks on my system currently, where the blue text doesn't stand out on my dark theme:
Ideally we could have these colors respect system theming by using link / activated colors. This should also ensure that it stands out from the active text.
For now, I could actually just blend the color into the BG color so that the effect is more subtle. Alternatively, maybe a flashing hollowed box would be nice?