Commit Graph

5145 Commits

Author SHA1 Message Date
warmCabin be59ac98d9 fix PC relative screen position not working 2021-07-09 10:34:40 -04:00
warmCabin 639d04ac26 change "bad opcodes" to "unofficial opcodes" 2021-07-09 10:34:40 -04:00
warmCabin cb830bfd50 add ROM offsets param to DisassembleToLine 2021-07-09 10:34:39 -04:00
warmCabin 61842ca7e8 make DisassembleLine just call DisassembleData 2021-07-09 10:34:39 -04:00
warmCabin d8043b7a96 add showTrace param to asm.cpp functions
Previously there were several spots that manually removed it by adding null
bytes. How silly!
2021-07-09 10:34:38 -04:00
warmCabin 557f73c56a remove ancient comments 2021-07-09 10:34:38 -04:00
warmCabin d143c69bd6 refactor the comment offset stuff into methods that deal with it for you 2021-07-09 10:34:37 -04:00
warmCabin fbb6176468 remove SP CODE comments
The time where these meant anything to anyone has long past.
2021-07-09 10:34:36 -04:00
warmCabin 7c5f08ff80 remove the unused permanent buttons 2021-07-09 10:34:36 -04:00
warmCabin aa2c6aef92 combine PCLine and PC_pointerOffset
Both of them represented the same information.
2021-07-09 10:34:35 -04:00
warmCabin 8afeb34539 make scrolling comment-sensitive (for real)
This has the added benefits that PC relative positioning works right, and there
is no longer a need for that HACK that ensures the PC is visible when you jump
to it.
2021-07-09 10:34:34 -04:00
warmCabin 4370400c59 initial attempt at making scrolling comment-sensitive
It's a little awkward because I'm trying too hard to be clever. I just need to
have ScrollDown check the name node data and set skiplines as appropriate.
2021-07-09 10:34:31 -04:00
warmCabin e2cb9dae39 fix '>' in comments highlighting like the PC 2021-07-09 10:34:30 -04:00
warmCabin d55e8ecc8f show a blank screen when no game is loaded 2021-07-09 10:34:30 -04:00
warmCabin 4e0f034891 janky merge conflict dodge 2021-07-09 10:34:29 -04:00
warmCabin 2b0e483a72 obfuscate callback return type so it compiles on 64-bit machines 2021-07-09 10:34:29 -04:00
warmCabin 86d6c1bd46 rename stuff and add comments 2021-07-09 10:34:28 -04:00
warmCabin c376a44607 add "break on bad opcodes" to menu 2021-07-09 10:34:27 -04:00
warmCabin 2312ff3293 Add enter-press functionality for break-when-exceed fields
Not quite sure how I feel about this one.
2021-07-09 10:34:27 -04:00
warmCabin e23e64392e add enter-press functionality to a few text fields 2021-07-09 10:34:26 -04:00
warmCabin 58b1510012 replace remaining instances of that confusing comment with my verbiage 2021-07-09 10:34:25 -04:00
warmCabin 53c36d94c6 use new callbacks instead of DebuggerCallB when posible 2021-07-09 10:34:24 -04:00
warmCabin cd13ee29f7 revive that "dead" EN_CHANGE code in a new callback
I have absolutely no idea how the old version ever worked!
Seriously, it makes no sense. It checked if the HIWORD of wParam equaled
EN_CHANGE even though it was in a BN_CLICKED case...but it still got the events.
This implies that BN_CLICKED == EN_CHANGE, but 0 very much does not equal 0x300.
2021-07-09 10:34:24 -04:00
warmCabin fc60358f79 add IDCANCEL and IDOK processing to patcher 2021-07-09 10:34:23 -04:00
warmCabin 81e62e1653 add loading cursor and wait beep for long dumps 2021-07-09 10:34:22 -04:00
warmCabin 34fcc1243b add file browsing functionality 2021-07-09 10:34:22 -04:00
warmCabin db071d0551 clean up message handling for more fluent control 2021-07-09 10:34:21 -04:00
warmCabin a57ecb82d3 support .NES file addresses checkbox 2021-07-09 10:34:21 -04:00
warmCabin b9359d8066 split out separate handler methods 2021-07-09 10:34:20 -04:00
warmCabin 86aee79504 fix input handling in dumper dialog 2021-07-09 10:34:19 -04:00
warmCabin eb7847e5f0 split Dump stuff to dumper.cpp and add some frontend 2021-07-09 10:34:18 -04:00
warmCabin 784771f95c tweak dumper window in editor 2021-07-09 10:34:18 -04:00
warmCabin c262b0803c initial commit for code dumper UI
It looks so derpy!
2021-07-09 10:34:17 -04:00
warmCabin e178581d32 split patcher, assembler, and some disassembly logic to where it belongs 2021-07-09 10:34:16 -04:00
warmCabin af47c8c66d clean things up a bit 2021-07-09 10:34:14 -04:00
warmCabin ff4c742bc4 remove trace info 2021-07-09 10:34:12 -04:00
warmCabin e1a73c3700 refactor to avoid goto
I guess I did care :(
2021-07-09 10:34:10 -04:00
warmCabin ff41cbc330 refine the logic so it still writes the raw bytes 2021-07-09 10:34:10 -04:00
warmCabin 6527ab4de8 add logic to make it respect labels
This heuristic only works if you've been poking around in the debugger
for a while.
2021-07-09 10:34:09 -04:00
warmCabin 5dfa77abf1 initial implementation of code dumping 2021-07-09 10:34:09 -04:00
warmCabin 31a90b9dba split out the mousey ones 2021-07-09 10:34:08 -04:00
warmCabin 8dec80e43d move UpdateOptionsPopup call into InitMenuPopup 2021-07-09 10:34:07 -04:00
warmCabin ca11b6479b split out the context menu
I'm going one at a time from now on!
2021-07-09 10:34:07 -04:00
warmCabin d3a15d78ae move UpdateSymbolsPopup calls into DebuggerInitMenuPopup 2021-07-09 10:34:06 -04:00
warmCabin 6b004b4482 split out some of the "gameful" callbacks into dedicated functions
My personal favorite is the WM_MOUSEWHEEL one. The lParam contains cursor X and
Y coords, but someone had misinterpreted it as a handle to the scrollbar and
used it to update the scroll info. So what happened? Garbage pointer
dereference leading to nonsense scrolling and crashes? Nope! The ScrollInfo
calls silently did nothing and everything worked as intended.
2021-07-09 10:34:06 -04:00
warmCabin c1d2af7042 split out the "gameless" window callbacks into dedicated functions 2021-07-09 10:34:05 -04:00
warmCabin a44232d47e add a few comments 2021-07-09 10:34:04 -04:00
warmCabin b1db239d9a add tools menu
It runs the ROM patcher, as well as a placeholder for my planned
code dumper ideas.
2021-07-09 10:34:03 -04:00
warmCabin 7bc2d5e4a8 put color menu item labels in title case 2021-07-09 10:34:02 -04:00
warmCabin 545a25b30f implement the Options menu 2021-07-09 10:34:02 -04:00