Tonight I was trying to determine where in my code a screwed up value was being written to a specific memory location. Specifically, I wanted to know when the value '$#ee' was being written to ZP memory location '$28'.
I was unable to find any comprehensive documentation on the full syntax of what can be put into the "condition" text input field in the breakpoint dialog box.
So I dug into the source code for FCEUX and found the parser:
http://fceux.sourcearchive.com/document ... ource.html
The grammar is listed near the top of the source file, right under the GPL banner. I won't quote it here.
I had been staring at the problem for too long. thefox helped me. This is what we did, and it worked.
I was omitting the '#' and that was screwing it up. The first three bullet points I assume that all of us using FCEUX's debugger have already figured out. I knew that this memory location was only every written to by the 'X' register, so I used 'X'. Had I used all three, I could have typed 'R' instead (as in 'R == $ee').
I hope that this info can help others. It was a bit annoying to track down.
Again, thanks to our arctic fox for his help.
(edited, to fix typo found by mottzilla)
I was unable to find any comprehensive documentation on the full syntax of what can be put into the "condition" text input field in the breakpoint dialog box.
So I dug into the source code for FCEUX and found the parser:
http://fceux.sourcearchive.com/document ... ource.html
The grammar is listed near the top of the source file, right under the GPL banner. I won't quote it here.
I had been staring at the problem for too long. thefox helped me. This is what we did, and it worked.
- Set address = '28' (no quotes)
- Click 'write'
- Memory should be 'CPU' (the default)
- Condition = 'X == #ee' (no quotes)
I was omitting the '#' and that was screwing it up. The first three bullet points I assume that all of us using FCEUX's debugger have already figured out. I knew that this memory location was only every written to by the 'X' register, so I used 'X'. Had I used all three, I could have typed 'R' instead (as in 'R == $ee').
I hope that this info can help others. It was a bit annoying to track down.
Again, thanks to our arctic fox for his help.
(edited, to fix typo found by mottzilla)