Commit Graph

125 Commits

Author SHA1 Message Date
harry 259c5754ee Code cleanup of conddebug.cpp. Make functions that are not externally used static. Changed condition to have a constructor/destructor and allocate via std new/delete. Fixed a small memory leak. For Qt GUI, refactored debugger breakpoint editor window so that it has its own class to allow for more detailed error checking methods to be added. 2023-04-16 21:38:50 -04:00
harry 66e2576595 Fixed string over-read in win port by added a exit condition for loop in ASM debugger logic. 2023-02-06 21:26:40 -05:00
Alexey 'Cluster' Avdyukhin d1368c8213 Debugger and hex editor fix for Vs. System ROMs 2023-01-07 19:46:10 +04:00
Alexey 'Cluster' Avdyukhin 2c35a6dfae Allow to open HEX editor when emulation is not paused + minor fix 2023-01-06 16:37:47 +04:00
zeromus bb1fc08d8e rename all iNES Header Editor to NES Header Editor (re #519) 2022-08-04 21:23:34 -04:00
Alexey 'Cluster' Avdyukhin 0e04da81b3 Fix for release config 2022-02-09 22:04:24 +03:00
Alexey 'Cluster' Avdyukhin 132e062d77 Debugger address validation, fix for #444 2022-02-09 20:06:22 +03:00
Alexey 'Cluster' Avdyukhin 2837e929d0 Fix for #370 2021-06-13 22:16:56 +03:00
owomomo 30fcc91fdc
Customizing Hex Editor and Debugger Highlight Colors (#310)
* Configurable Hex Editor text colors.
* Add a customizable color for address title.
* 1. Add some more colors to Debugger highlight
2. Sorting all the colors out for future customization.
3. Re-arranged some includes.
* Make the debugger highlight color customizable.
* Move the button to the right and make the default window size wider.
* Adding color icons and hex values to the color menu items.
* 1. Enlarge the color icon a few pixels
* Debugger and Hex Editor shares the same custom color buffer.
This function finally completed. I believe there is no more details can be developed in recent period.
* 1. Add icon to color menu in another way to prevent the odd space between icons and text.
2. Free some malloc() resources when exit, though it would be somehow eventually recycled by system, but that's not a good rabbit.
3. GetROMName and GetROMPath has malloc() and called so many times in the code, it seems there's no any free() call for their returned char*, it's OK to make them directly return a std::string which is more comfortable for use.
* I forgot hDebug is still NULL in WM_INITDIALOG.
* 1. Rewrite debugger resizing logic, now all the controls on the dialog can stretch and shrink with the window size, when you enlarge the window, the controls on the right is also stretched to fit the height.
2. Moved Syntax highlight and Default window size button to the menu bar, in the past, if the window size is too small to show the default size button on the bottom right corner, it can't be pressed to restore the window, but now you can press it anytime.
* Changed ID of color menu to prevent conflict of some existing dialog controls.
* I don't know why restore default window size cannot be done before game loaded.
* 1. Fix Debugger default width with IDA font.
2. Fix Hex Editor single byte highlight in red.
2021-02-01 20:41:02 +03:00
owomomo f173e11152 1. Fix "Restore Window Size" restores to a wrong size when screen dpi is not 96.
2. Fix Issue #283, currently no break or crash have been found...
3. Detail.
2020-12-28 23:23:55 +08:00
owomomo 4828b29338 1. Trying to fix Issue #88.
2. Fix a grammar mistake.
2020-12-19 13:31:00 +08:00
owomomo 1f42929f4f 1. Fix an ancient bug: .deb file doesn't store edit mode for Hex Editor, when the next time it launches, all the bookmarks are treated as RAM bookmarks.
Since this bug was forgotten by developers for years, saving the missing data along with the other preferences would make the emulator backward incompatible. So I finally decided to append them to the end of the preferences.
The older version of FCEUX didn't read/write the .deb file that far, they would stop earlier though the file created by the newer version has more data, because they don't have the appended code.
I hope this modification doesn't break anything as I've tried my best to prevent incompatibilities.
We're facing a difficult choice here, fortunately, it looks like the preferences of Hex Editor stores at last of .deb, so I can just append information in the function. However what could we do if someday someone found a bug in the middle of the deb file such as debuggers etc? As we can only append data, the functions have to be split into more parts, which is damage to the code maintainability and readability.
The problems can't be easily resolved as far as I can think, although currently it is possible to make it work without too much problems.
2. Improved Bookmark Editing Dialog of Hex Editor, now it can edit almost all properties the bookmark has, you can directly change its address and even its view.
3. Changed some logic of debugger bookmark, the address can be directly changed in the dialog.
4. Decoupled Debugger and Hex Editor bookmark editing dialogs and callback functions from sharing one dialog, as they are not in the same system, the differences is worth to make them apart.
5. Disabled input barcode menu in movie recording and no game loading.
6. Detail.
2020-09-01 21:42:06 +08:00
owomomo 935cdaf178
Merge pull request #17 from TASVideos/master
Sync code to the newest
2020-01-31 19:46:54 +08:00
Brad Smith fbabd180eb
restore symbolic addresses for debugger
some of the debugger addresses should not be filtered, as strings can be used like NMI, RST, IRQ, LOAD, INIT, PLAY, NMI1, NMI2, NMI3
2019-11-10 21:10:40 -05:00
owomomo 2e6b728e57
Merge pull request #14 from TASVideos/master
Sync code to the newest
2019-07-29 11:02:15 +08:00
Brad Smith 72120b0bb9
Windows 64-bit build support (#66)
* correcting x64 configurations to actually use x64
defining NOMINMAX to fix std::max error

* more preprocessor definitions for x64

* 64-bit libraries from the last published version of DXSDK with dinput

* should define WIN64 as well? unfortunately seem to require retention of WIN32

* added an x64 build of luaperks.lib, this compiles links and runs now

* relocate win32 luaperks.lib to src/drivers/win/lua/win32 and leave a note explaining it

* luaperks.lib x64 needed to be /MT
two more missing x64 libs
debug x64 configuration was set to compile C++ as C?

* importing the rest of the usable WIN32 preprocessor defines, debugger now functions!

* revert unnecessary VS solution version change

* 64-bit lua working (fixed the 64-bit build of luaperks.lib)

* VSUIENTRY hashes are unsigned, not signed

* more hashes that are actually unsigned

* fix a few pointer to int casts in lua console

* fix a few more pointer truncations in windows dialog stuff
a few printf arguments need a cast to int

* explicit size_t cast to quiet spurious warnings on an inline function
2019-07-23 15:12:03 -04:00
owomomo 297ff8ee31 ... 2019-06-29 10:34:07 +08:00
owomomo 7dde5467fd 1. Limit text input for Edit watch dialog and ram search.
2. As bbbradsmith in Pull Request #62 mentioned, SetWindowLong is replaced by SetWindowLongPtr for 64 bit compatible, I partially changed those written by myself.
2019-06-27 00:53:52 +08:00
bbbradsmith 2396d1c702 Replace SetWindowLong with SetWindowLongPtr for 64-bit compliance 2019-06-21 15:02:11 -04:00
bbbradsmith 850390e5ba Merge branch 'master' into dlgproc_fix 2019-06-21 14:15:41 -04:00
bbbradsmith c33ab17da4 DLGPROC return type is INT_PTR, not BOOL and not LRESULT. These are compatible return types in 32-bit but not 64-bit. 2019-06-21 14:03:05 -04:00
owomomo d138a01860 1. Add popup tip for "Auto load / save with game" checkbox, because its tri-state may be perplexed for some reason.
2. Fix a bug, when the cheat editing controls lost focus, but editing mode is still there, which makes case EN_UPDATE triggered when user is not typing in them, that's an inappropriate circumstance. It might make the cheat editing control shows nothing when selecting a cheat.
3. Re-arranged some controls in resource file.
4. Changed some directory dialog logic, use defined ID rather than hard-code the actural number.
5. Detail.
2019-06-21 19:59:57 +08:00
owomomo fee4fc83a8 1. Add more controls to limit input text.
2. Changed limit input behaviour to match the system default ES_NUMBER.
2019-06-20 01:58:35 +08:00
owomomo fb1d489cfa Cheat console:
1. Added a global switch for all cheats, it is checked by default. Check or uncheck it can quickly tweak all cheats enabled or disabled. It's not game specific and effective to all games.
2. Added a checkmark to check behaviour of automatically load cheats.
3. Fixed a wierd bug in loading names of cheats from file.
iNES Header Editor:
4. Disable iNES header editor menu when currently loaded game is not in iNES format.
Others:
5. Some of the checkbox passed parameter MF_CHECKED, the right one is BST_CHECKED, though they have the same value.
6. Code/Data Logger is created by CreateDialog(), but destroyed by EndDialog()? A non-modal window should be destroy by DestroyWindow(), EndDialog() is for DialogBox(). It seems nobody noticed this bug for years.

Currently there are some opposite tweaks in the config file for the new feature in cheat console, for example the unchcecked state is 1 in config file, that's for backward compatibility.
The iNES header editor might not quite stable as newly baked from the oven, there might be some improvements to its code.
2019-06-12 22:16:01 +08:00
zeromus bf372552bc fix overflowing buffer made worse by 0d26e6f or possibly created by that commit. fixes #30 better.
the debugger was replacing comments and names inside a buffer returned from the old portable disassembly function, which was returning a privately retained 64 byte buffer. previously names were limited to 30 characters, so it's possible expanding names in disassembly never blew that buffer.

testing of the 0d26e6f commit either stressed it harder than ever before, or hard enough to break it for the first time

solved by copying the disassembly buffer into a new buffer for expanding address labels to names, etc
2019-06-06 13:33:45 -04:00
zeromus abed13c392 Revert "Fix for the interframe-pause-skips-updating-next-frame bugs, mostly noticeable when dumping AVIs."
This reverts commit c7710ae244.

fixes #39
2019-02-22 20:48:59 -05:00
aquanull 3b531d0d7c Small fixes. 2018-04-04 18:26:57 +08:00
aquanull c7710ae244 Fix for the interframe-pause-skips-updating-next-frame bugs, mostly noticeable when dumping AVIs. 2018-04-12 22:43:39 +08:00
zeromus 717153ac19 fix hang in symbolic debugger syntax highlighting in rare cases. fixes #18 2018-11-12 03:19:07 -05:00
zeromus 0307e3b827 migration tidying (build master from trunk) 2018-04-08 17:35:15 -05:00
punkrockguy318 2be5084a7b create new subversion repo structure (trunk, tags, branches)
[[Split portion of a mixed commit.]]
2013-03-15 19:00:14 +00:00
ansstuff d748d3219c Debugger: ported "smart scrolling" from an obscure version of FCEUXD 1.1 2013-03-14 15:40:52 +00:00
ansstuff 3d9095fc29 * Fixed iNesSave and iNesSaveAs (#579)
* Moved "Config->Game Genie" to "Config->Enable->Game Genie ROM"
2013-02-11 12:03:37 +00:00
ansstuff 7b99bfc321 * Tracer: fixed RTS padding
* Tracer: always force Trace Logger update when a breakpoint is hit
* Debugger: always open Debugger window when a breakpoint is hit
2013-01-17 15:32:09 +00:00
ansstuff 00b4304241 win32: added Config->Enable->Auto-resume old play session 2012-12-15 17:42:53 +00:00
ansstuff b8c1d1e29b * added NES->Emulation Speed->Set Custom Speed
* added NES->Emulation Speed->Set FrameAdvance Delay
* added NES->Emulation Speed->Set custom speed for FrameAdvance
* Debugger: fixed mouse wheel scrolling
2012-12-13 15:59:45 +00:00
ansstuff 24098b5159 Hexeditor: reverted font to Courier 2012-11-10 19:50:28 +00:00
ansstuff 82add52a52 * Taseditor: update RAM Search and RAM Watch when jumping causes game state to change
* added BoulderDash_AmoebaAI.lua
* added CustomLagIndicator_RvT.lua

[[Split portion of a mixed commit.]]
2012-10-29 12:43:22 +00:00
ansstuff a0b7c35ada * Hexeditor: fixed font spacing 2012-10-14 13:52:18 +00:00
ansstuff c999dba979 * Cheats: applied bugfix patch by rimsky82, updated the Cheats dialog
* Debugger/Tracer: symbolic comments use the ";" prefix instead of "//"
2012-10-02 12:22:05 +00:00
ansstuff 572ac98f02 Fixed Tracer, changed Symbolic Names and Comments display 2012-09-30 18:56:12 +00:00
CaH4e3 32774646fd trace/logger fine tuning 2012-09-30 16:36:45 +00:00
ansstuff 84bb3a8d1d * improved FPS display, added a hotkey to toggle it
* Debugger: single click on any address copies this address to the "Seek To" field and "Bookmark Add" field
* Debugger: "Name" button in Bookmarks, total revamp of Bookmarks
* updated docs

[[Split portion of a mixed commit.]]
2012-09-26 20:19:01 +00:00
ansstuff caac39d4d0 * Fixed replay engine bug that doubles the last input of the movie
* Tracer: RTS instructions output caller address/name
* Debugger: RTS instructions are emphasized by "-----"
2012-09-25 20:28:14 +00:00
ansstuff e30c685c5e * Lua: auto-clearing previous frame drawings (same behaviour as other emulators)
* Debugger: fixed mouseover when using Symbolic debugging
* Debugger: mouseover works for the disassembly window too
* updated docs

[[Split portion of a mixed commit.]]
2012-09-23 12:45:28 +00:00
ansstuff 48a55b2fa2 * Tracer: added "Log current Frame number" option
* Tracer: added "Log emulator messages" option
* Tracer: added "Log breakpoint hits" option
* Tracer: added "Symbolic tracing" option
* Taseditor: added deselection stretching by Ctrl+clicking in a selected frame
2012-09-22 15:33:31 +00:00
ansstuff 35541256d7 Added emu.setlagflag() Lua function 2012-09-13 19:48:14 +00:00
ansstuff 95a301dbb2 * "Tools->TAS Editor" gives focus to Taseditor when it's already open; fixed the setfocus behavior for other tools as well
* Taseditor: AdjustDown operation now works faster (not rewinding anymore)
* Taseditor: AdjustLag always combines with current History item, not creating its own item in the History Log
2012-09-13 16:11:03 +00:00
ansstuff 571d3cc550 * Debugger: deleting a breakpoint leaves selection in the Breakpoints list
* Debugger: changed "Load .DEB" checkbox caption to ".DEB files" to emphasize that it also affects saving .deb files, not just loading them
* updated docs
* Taseditor: fixed extremely rare LagLog bug in History.jump() and RegisterBranching
* Taseditor: fixed RegisterLuaChange to also consider LagLog changes

[[Split portion of a mixed commit.]]
2012-09-11 15:32:11 +00:00
ansstuff a0fc6b9680 * Debugger: fixed Symbolic Debugging (Names and Comments display)
* Debugger: special strings (NMI/IRQ/etc) can be also used in "Seek To" field and Bookmarks
* updated docs

[[Split portion of a mixed commit.]]
2012-09-06 15:00:27 +00:00