You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My idea is to add a new window "Variable Finder" in the Debug menu.
This new window contains the following:
A Start Address TextBox where the user enters the start address as a 8 digits hexadecimal number.
A Stop Address TextBox where the user enters the stop address as a 8 digits hexadecimal number.
A "Break on RAM change" checkbox
A "Ignore the following addresses" ListView
A "Clear all ignored addresses list" button.
A "Automatically add all changed addresses to the ignore list" checkbox.
The "Ignore the following addresses" ListView has two columns:
The first column is "Address" and the second column is "Size" which is always either Byte, Half or Word.
The "Clear all ignored addresses list" button simply clears the "Ignore the following addresses" ListView on click.
While the "Break on RAM change" checkbox is ticked the game is paused whenever the RAM in the range defined by both the start and stop addresses is changed as long as the changed address is NOT in the "Ignore the following addresses" ListView.
Additionally the cursor of the memory editor will be changed too to point to the changed address.
Additionally to the context menu of the Memory Editor add three new commands:
Add this byte to the ignore list
Add this half to the ignore list
Add this word to the ignore list
The "Add this byte to the ignore list" command adds a new row to the "Ignore the following addresses" ListView where the address of the right clicked byte in the Memory Editor is added to the "Address" column and the word "Byte" is added to the "Size" column.
"Add this half/word to the ignore list" commands do the same but Half/Word appears in the "Size" column instead of Byte.
If the "Automatically add all changed addresses to the ignore list" checkbox is ticked then:
Every address that was changed by a sb instruction will be added to the "Address" column and "Byte" to the "Size" column as a new row in the "Ignore the following addresses" ListView.
Every address that was changed by a sh instruction will be added to the "Address" column and "Half" to the "Size" column as a new row in the "Ignore the following addresses" ListView.
Every address that was changed by a sw instruction will be added to the "Address" column and "Word" to the "Size" column as a new row in the "Ignore the following addresses" ListView.
The user may want to tick the "Automatically add all changed addresses to the ignore list" checkbox if he or she doesn't want to use the "Add this Byte/Half/Word to the ignore list" commands on every break on RAM change.
In most cases the Memory Observer window can be used instead to find addresses of variables that change sometimes or even seldom or rarely but variables that change so often, frequently or quickly are very hard to find with Memory Observer.
For example or instance in Crash Bandicoot there may be a byte that is always 0 while Crash is alive but when Crash touches any enemy this byte may be changed to a non-zero number for a millisecond and then change back to 0 and then Crash dies and 1 live is lost.
Another example or instance is Pang! When hitted by a colored ball or bubble, there may be a byte that is changed from 0 to a non-zero number for a millisecond and then change back to 0.
Finding the addresses of such bytes is nearly impossible with the "Memory Observer" window but absolutely possible with the "Variable Finder" window that I suggest.
Just keep adding the unwanted bytes, halfs and words to the ignore list with the memory editor context menu commands or simply tick the "Automatically add all changed addresses to the ignore list" checkbox and click on the "Resume" button several times until you find the address of the variable that interests you that was too hard to find with Memory Observer.
At last don't forget to untick the "Break on RAM change" checkbox and clear the "Ignore the following addresses" ListView by clicking on the "Clear all ignored addresses list" button.
Variable Finder doesn't have to work with the recompiler at all. If Variable Finder works only with interpreter then this is alright because nowadays PS1 games run fast enough with interpreter on modern computers and processors.
This means that every memory address that is changed is printed on the Logs window or the PC that executed the sb, sh or sw instruction that changed the memory address is printed on the Logs window but preferably print the address whose value changed on the Logs window in this context.
The "Ignore the following addresses" ListView will also be used with "Log on RAM change" too of course.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
My idea is to add a new window "Variable Finder" in the Debug menu.
This new window contains the following:
The "Ignore the following addresses" ListView has two columns:
The first column is "Address" and the second column is "Size" which is always either Byte, Half or Word.
The "Clear all ignored addresses list" button simply clears the "Ignore the following addresses" ListView on click.
While the "Break on RAM change" checkbox is ticked the game is paused whenever the RAM in the range defined by both the start and stop addresses is changed as long as the changed address is NOT in the "Ignore the following addresses" ListView.
Additionally the cursor of the memory editor will be changed too to point to the changed address.
Additionally to the context menu of the Memory Editor add three new commands:
The "Add this byte to the ignore list" command adds a new row to the "Ignore the following addresses" ListView where the address of the right clicked byte in the Memory Editor is added to the "Address" column and the word "Byte" is added to the "Size" column.
"Add this half/word to the ignore list" commands do the same but Half/Word appears in the "Size" column instead of Byte.
If the "Automatically add all changed addresses to the ignore list" checkbox is ticked then:
sb
instruction will be added to the "Address" column and "Byte" to the "Size" column as a new row in the "Ignore the following addresses" ListView.sh
instruction will be added to the "Address" column and "Half" to the "Size" column as a new row in the "Ignore the following addresses" ListView.sw
instruction will be added to the "Address" column and "Word" to the "Size" column as a new row in the "Ignore the following addresses" ListView.The user may want to tick the "Automatically add all changed addresses to the ignore list" checkbox if he or she doesn't want to use the "Add this Byte/Half/Word to the ignore list" commands on every break on RAM change.
In most cases the Memory Observer window can be used instead to find addresses of variables that change sometimes or even seldom or rarely but variables that change so often, frequently or quickly are very hard to find with Memory Observer.
For example or instance in Crash Bandicoot there may be a byte that is always 0 while Crash is alive but when Crash touches any enemy this byte may be changed to a non-zero number for a millisecond and then change back to 0 and then Crash dies and 1 live is lost.
Another example or instance is Pang! When hitted by a colored ball or bubble, there may be a byte that is changed from 0 to a non-zero number for a millisecond and then change back to 0.
Finding the addresses of such bytes is nearly impossible with the "Memory Observer" window but absolutely possible with the "Variable Finder" window that I suggest.
Just keep adding the unwanted bytes, halfs and words to the ignore list with the memory editor context menu commands or simply tick the "Automatically add all changed addresses to the ignore list" checkbox and click on the "Resume" button several times until you find the address of the variable that interests you that was too hard to find with Memory Observer.
At last don't forget to untick the "Break on RAM change" checkbox and clear the "Ignore the following addresses" ListView by clicking on the "Clear all ignored addresses list" button.
Variable Finder doesn't have to work with the recompiler at all. If Variable Finder works only with interpreter then this is alright because nowadays PS1 games run fast enough with interpreter on modern computers and processors.
EDIT:
After posting the Logpoints feature request https://github.com/grumpycoders/pcsx-redux/discussions/1075 came to my mind a new idea to add a "Log on RAM change" checkbox in addition to "Break on RAM change" checkbox.
This means that every memory address that is changed is printed on the Logs window or the PC that executed the
sb
,sh
orsw
instruction that changed the memory address is printed on the Logs window but preferably print the address whose value changed on the Logs window in this context.The "Ignore the following addresses" ListView will also be used with "Log on RAM change" too of course.
Beta Was this translation helpful? Give feedback.
All reactions