harry
d0d822447d
Preparing to merge debug profiler in to main dev line.
2023-05-09 18:28:49 -04:00
harry
5847c0c364
Initial add of execution profiling debug code. This code is only included in the build if the __FCEU_PROFILER_ENABLE__ macro is set.
2023-05-08 07:50:26 -04:00
harry
99bc0fa17f
Add nullptr check to ensure that libarchive version strings are valid before printing. They will be null when a particular format or filter is not supported.
2023-04-24 23:14:43 -04:00
harry
b7bc8a29f0
Added libarchive version info to Qt GUI about window.
2023-04-24 23:08:05 -04:00
harry
45b0ea6f8d
Added cross-platform libarchive interface to allow Qt GUI to use 7zip ROM archives. Code is setup to allow for libarchive to be an optional dependency and will fallback to regular minizip if unavailable.
2023-04-24 22:49:30 -04:00
harry
084b2b9ccc
Added snap by number of frames (instead of by time) option for Qt state recorder.
2023-04-22 15:56:31 -04:00
Fritz Mahnke
dbb688ec41
Fixes for updating the cheats list.
...
Update the cheats list after adding a new cheat from the Game Genie window. With
this change, the new cheat is shown immediately in the cheats window, if it's
open.
Fix an issue where the cheats list isn't always immediately updated after a
change. For example, clicking Add while an item is already selected might not
show the item until some other user action is taken. This change updates the
cheats list QTreeWidget viewport explicitly after making changes to its items.
This causes changes to be shown immediately.
Remove unused GuiCheatsDialog_t::actvCheatRedraw member.
2023-04-20 13:11:27 -04:00
Fritz Mahnke
783aa5f38c
Don't divide by 0 when PPU/sprite viewer windows are small.
...
Some of the views are proportional to window dimensions. This caused division by
0 where window dimensions round down to 0. This change avoids that, instead
setting those views' sizes to 0 in these cases.
2023-04-19 01:41:44 -04:00
thor2016
50d4d58276
Merge pull request #634 from fmahnke/no-scroll-pc
...
Don't always scroll to PC when updating debug window assembly view.
2023-04-17 21:26:54 -04:00
thor2016
b3d2a5f230
Merge pull request #633 from fmahnke/null-fix
...
Don't index into empty QString in HexEditor.
2023-04-17 21:26:34 -04:00
harry
da7c7761a2
Added breakpoint editor address validity checking to Qt GUI.
2023-04-17 21:21:59 -04:00
Fritz Mahnke
39bb749f5d
Don't always scroll to PC when updating debug window assembly view.
...
Change ConsoleDebugger::updateWindowData and updateAllDebuggerWindows to support
two different types of updates: UPDATE_ALL and UPDATE_NO_SCROLL. The new
"no scroll" type lets callers request the assembly view be updated without
scrolling the view to the PC line.
Change the hex editor and trace logger calls to updateAllDebuggerWindows to use
the no scroll update. The user may use these functions with the current
disassembly position in mind and not want to lose it.
2023-04-17 17:41:24 -07:00
Fritz Mahnke
f885abb71b
Don't index into empty QString in HexEditor.
...
QKeyEvent::text may return an empty string in some environments for some keys,
such as modifier keys. This can cause a cause a crash. Add a check for the
hex editor to skip the editing code, which assumes the keyboard event is a
printable character and depends on a non-empty keyboard event text.
2023-04-17 08:28:37 -07:00
Fritz Mahnke
46ad7bbd38
Remove redundant setFocus call, which actually removes focus.
...
Under i3wm 4.21.1/Qt 6.4.1, the existing code actually removes keyboard focus
from the newly-activated window. Removing the call to setFocus in these cases
fixes the problem. The call to activateWindow is enough to put keyboard focus on
it.
The documentation for activateWindow implies the same.
2023-04-17 08:13:09 -07:00
harry
8649a38ef9
Removed old commented out method in Qt debugger.
2023-04-16 21:41:49 -04:00
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
Sam James
6ad3837eeb
Fix build with GCC 13
...
GCC 13 (as usual for new compiler releases) shuffles around some internal includes and so etc is no longer transitively included:
```
In file included from /var/tmp/portage/games-emulation/fceux-2.6.5/work/fceux-2.6.5/src/drivers/Qt/AboutWindow.cpp:33:
/usr/include/x264.h:40:4: warning: #warning You must include stdint.h or inttypes.h before x264.h [-Wcpp]
40 | # warning You must include stdint.h or inttypes.h before x264.h
| ^~~~~~~
/usr/include/x264.h:127:5: error: uint8_t does not name a type
127 | uint8_t *p_payload;
| ^~~~~~~
```
See https://gnu.org/software/gcc/gcc-13/porting_to.html .
Bug: https://bugs.gentoo.org/900611
2023-04-10 05:20:23 +01:00
harry
4cb6d97183
Added state recorder config dialogs to Qt GUI that prompt user to apply selected settings and to restart recorder for changes to take effect.
2023-04-03 21:42:24 -04:00
harry
47f795b04b
For Qt GUI, added state recorder status display to config window.
2023-04-02 07:39:00 -04:00
harry
55bcb3d41a
Added a load prev and next state functions for state recorder.
2023-04-01 21:17:34 -04:00
harry
e95c0fe86b
For Qt GUI, hooked up state recorder pause on load options.
2023-04-01 18:22:54 -04:00
harry
86c6d3e56c
Qt GUI state recorder config window updates. Added estimated state save CPU time display. Pause on load time widgets in work.
2023-03-31 06:55:59 -04:00
harry
b6a8b46de0
For Qt GUI, added feature that allows save state files to be loaded via window drag n drop from a file dialog.
2023-03-26 17:05:19 -04:00
harry
4b8528588d
Added code to save/load state recorder config parameters for Qt gui.
2023-03-12 20:46:45 -04:00
harry
bb76573112
State recorder config setup in work.
2023-03-11 20:45:13 -05:00
harry
f87d746350
State recorder config dialog in work for Qt GUI.
2023-03-11 15:54:44 -05:00
harry
bc6164260d
State recorder in work.
2023-03-11 07:47:58 -05:00
harry
5bdbf628a0
For Qt GUI, set palupdate flag after force grayscale or use custom palette settings changeto ensure that PAL 3x filter updates appropriately. Fixes issue #618
2023-02-21 18:56:06 -05:00
harry
da05b56cba
Added checkbox to Qt debugger menu to control trace logger auto start function on debugger open. Also added code to stop the trace logger on debugger close if it was the debugger who started it in the first place.
2023-02-20 18:36:07 -05:00
harry
92b021171f
Fixed compiler endianness detection. Unified to use common macros in endian.h
2023-02-19 20:07:50 -05:00
harry
d5fd976ccf
Added button icons for ok/cancel buttons on Qt select from zip archive window.
2023-02-19 15:39:04 -05:00
harry
56c0d30f83
Fix crash in Qt CDL when cdloggerVideoDataSize is zero.
2023-02-19 15:22:34 -05:00
harry
903e035a95
For Qt GUI added code to warn user that symbol table will be wiped when importing ld65 dbg files. Added code to clear and redraw debugger window data after importing new symbols.
2023-02-14 20:33:46 -05:00
harry
07617997f4
Added hooks to Qt GUI for importing of ld65 debug symbol files.
2023-02-12 09:09:17 -05:00
harry
cb0301b12d
Added a flag to control whether duplicate debug symbol names are allowed. Default value to true.
2023-02-08 04:38:06 -05:00
harry
47530d614c
Added code to check for duplicate debug symbol names when editing the name of an existing symbol.
2023-02-05 20:44:36 -05:00
harry
98008bcd4d
Fixed memory leak in Qt GUI when adding a new symbolic debug fails. Added error messaging to inform user why it failed.
2023-02-04 21:00:29 -05:00
harry
fb75b34b1d
Added smarts to Qt debugger context menu to show add/edit for symbols and bookmarks on whether they already exist or not.
2023-02-04 20:14:47 -05:00
harry
b3386027bd
Fixed ASAN error in debug symbol delete.
2023-02-04 15:40:52 -05:00
harry
575b019659
Changed core symbol table to have private data that can be accessed via methods. The goal is to control access to this data to prevent table lookups getting messed up when symbols are editted via the gui.
2023-02-04 15:15:31 -05:00
harry
2d81c9c7b2
Added frame advance delay config parameter to Qt GUI and set delay default to 40 frames to match win port timing. Also, reset frameAdvance_Delay_count to zero before setting frameAdvanceRequested flag to avoid possible race condition where emulation thread can miss seeing zero count and not temporarily pause when it should.
2023-02-01 01:06:48 -05:00
harry
d4c2a7e2d9
Fix for Qt ram watch window save file symbol type parameter sometimes being undefined.
2023-01-30 22:13:28 -05:00
harry
6a2e384469
Fix for Qt Ram Watch window save files to allow for max path.
2023-01-30 21:41:03 -05:00
tsone
d5a3cecea0
Moved debug symbol table (.nl file) related code to own file and added symbol name -> address lookup. Example uses in Lua and Debugger breakpoint.
2023-01-30 17:00:10 -06:00
harry
d061ba2bfa
Fixes for -Wformat compiler warnings when using custom printf style functions.
2023-01-30 09:24:49 -05:00
harry
f815c849c2
Added FCEU printf format specifier macros to enable compiler checking of format strings for custom printf style functions.
2023-01-29 19:38:30 -05:00
harry
421c7b35e7
Resolved strncpy -Wstringop-truncation warning in Qt NES header editor.
2023-01-29 11:28:58 -05:00
harry
727e403917
A couple more int compare sign warning fixes.
2023-01-28 22:51:33 -05:00
harry
7c3c3caf93
More int comparison sign mismatch compiler warning fixes.
2023-01-28 20:24:17 -05:00
harry
213f4e2579
More fixes for int compare sign mismatch warnings in Qt TAS Editor.
2023-01-28 16:24:04 -05:00
harry
7910da7805
More int comparison sign mismatch compiler warning fixes.
2023-01-28 16:03:05 -05:00
harry
7a40075f3e
Build fix for ssize_t not being available in windows.
2023-01-28 15:05:58 -05:00
harry
c075cdca4f
More int comparison sign mismatch compiler warning fixes.
2023-01-28 14:05:21 -05:00
harry
4434974350
Cleaned up int comparison sign mismatches in Qt TasEditor markers.
2023-01-28 13:49:09 -05:00
harry
01821d89b5
Fix for Qt GUI Avi codec save settings to support max file path.
2023-01-23 22:26:56 -05:00
harry
41878d95ef
Added Qt empty scan code to Qt Key map for Mac OS platform. QKeyEvent::nativeScanCode() does not return valid codes on Mac OS, so this backup conversion method will not work on that platform.
2023-01-23 21:40:59 -05:00
harry
53288c0a75
Cleaned up native scan code to Qt key conversion code for windows. Use known key definitions instead of hardcoded values when possible.
2023-01-23 21:20:19 -05:00
harry
f4a9fa6898
Comment out debug print statements for Qt keyscan code.
2023-01-22 21:51:29 -05:00
harry
39aafe7a88
Cleaned up native scan code to Qt key conversion code for linux. Use known key definitions instead of hardcoded values when possible.
2023-01-22 21:15:56 -05:00
Alexey 'Cluster' Avdyukhin
9a74d64b2c
Fix for #510 , for Windows
2023-01-22 21:32:13 +04:00
Alexey 'Cluster' Avdyukhin
99dc99831c
Fix for #510
2023-01-22 20:43:30 +04:00
harry
a4a799feef
Changed Qt GUI TAS editor recent menu to show file name separated by some space and then full path to file. This is so that the file name can still be read when the full path is ridiculusly long.
2023-01-22 10:00:00 -05:00
harry
6d622cc787
Fix for Qt GUI TAS editor to support max file path for fm3 files.
2023-01-22 09:55:20 -05:00
harry
93c0e13572
Fix for Qt GUI wave file recording to support max file path length.
2023-01-22 09:45:22 -05:00
harry
26f623f5ea
Fix crash in Qt GUI for movie player file path parser.
2023-01-21 11:59:56 -05:00
harry
aad52488ac
Bug fix for ASAN error overlapping strcpy source and destination caused curMovieFilename being passed to openRecordingMovie which copies over itself. Changed type from char array to std::string whose assign function will allocate new memory to copy to before deleting the old string buffer.
2023-01-21 09:59:50 -05:00
harry
5f44e8f374
For Qt GUI, fixed http references to https://fceux.com to avoid redirection.
2023-01-19 06:45:15 -05:00
harry
5c1c71be67
For Qt GUI, added feature that allows for lua script loading via file drag and drop operations.
2023-01-17 07:02:03 -05:00
harry
dd77569621
More large filepath parsing updates for Qt GUI.
2023-01-16 21:11:09 -05:00
harry
1adffbdf00
Modified Qt GUI recent ROM menu items to show the ROM base name following by a tab space and then the full path. This allows for the ROM file name to be in view in the event that the full path is excessively long.
2023-01-16 20:57:26 -05:00
harry
38089b62c0
Fix for Qt GUI compiler warnings in iNesHeaderEditor for potential stack buffer overflows on snprintf usage.
2023-01-16 20:34:00 -05:00
harry
42039004b5
Fix for Qt GUI symbolic debug filename widget size exploding when the ROM file path is large.
2023-01-16 20:21:10 -05:00
harry
50a7bb70c8
Changed Qt symbolic debugger file save function to use std::string for filepath.
2023-01-16 09:50:38 -05:00
harry
ba47f169ca
Fixed stack buffer overflow in Qt GUI loading a ROM with a large filepath from file dialog.
2023-01-16 09:44:32 -05:00
harry
3564f61849
Changed Qt GUI NL filename utility functions to operate on std::string arguments instead of char buffers to better allow for large file paths.
2023-01-16 09:35:22 -05:00
harry
600588910f
Another build fix for Qt GUI.
2023-01-15 04:38:53 -05:00
harry
2be7794ab5
Build fix for Qt GUI.
2023-01-15 01:44:34 -05:00
harry
8a59bd3191
Qt GUI build fix for new ffmpeg macro that expands to a C++20 designated initializer that is not supported by earlier compiler standards.
2023-01-15 01:04:39 -05:00
harry
c837c8981c
For QT GUI added logic to check for an FCEUX_CONFIG_DIR environment variable to specify the folder where fceux data resides. This allows users to specify there own data folder that doesn't have a .fceux hidden folder get auto created.
2023-01-14 18:34:03 -05:00
harry
90d03a6374
For Qt GUI, add libav version preprocessor guard to make sure that AV_OPT_TYPE_UINT64 definition exists before using it in source. Fixes issue #578
2023-01-13 01:18:58 -05:00
harry
a3240e9c2e
Qt GUI deprecation usage fixes for ffmpeg 5.1.x libavutil. Code is now compatible with new AVChannelLayout data structure. Used proper version macros so that code is still setup to be backwards compatible with ffmpeg 4.x
2023-01-13 00:45:44 -05:00
harry
ec4d76707c
Reset Qt GUI audio buffer samples to zero when killing SDL sound.
2023-01-11 21:57:51 -05:00
harry
37bf5c9bf2
Added logic to Qt GUI to protect against invalid audio sample rates or buffer sizes being fed from the command line to the sound system. Sound will use default values if inputs are deemed invalid. Fixes issue #603
2023-01-11 21:38:29 -05:00
harry
cc1e6a8f8b
Minor change to Qt GUI window focus audio mute logic. Ensure that it is always re-computed on a window active change event.
2023-01-11 21:08:55 -05:00
harry
739c01f051
Added Qt GUI sound mute function. This function is accessible either via hot key or checkbox on sound config window. Mute state is a config parameter and will persist between application boots. Fixes issue #591
2023-01-11 20:47:11 -05:00
harry
e06d1cd506
Modified Qt GUI parseFilepath to output std::string types instead of char * buffers to remove file path length limitations.
2023-01-10 21:14:10 -05:00
harry
6ae834a1df
Changed interface to Qt GUI function getDirFromFile to pass reference to std::string so that returned string will not have string length limitations. Buffer size will grow as needed for the path and will not be allocated on the stack.
2023-01-07 01:47:45 -05:00
harry
4e54ea54ac
Refactor Qt GUI function fceuExecutablePath to be more efficient. Since the path to the executable never changes during the lifetime of the process, save it off the first time this function is called for later use. Function interface changed to just pass back a pointer to the saved string. Saves on stack memory and is more efficient since it does not have to continually copy data onto the stack.
2023-01-07 01:19:29 -05:00
harry
b3717c008b
Refactor Qt GUI function getDirFromFile to use QFileInfo to get absolute directory path. Also, added a input buffer size argument to prevent string copy buffer overflows. Fixes issue #598 .
2023-01-07 00:43:35 -05:00
harry
77b894df0e
Changed Qt debugger data save file extension to be .fdb instead of .dbg so that it does not conflict/overwrite ld65 debug symbol files. Fixes issue #600 .
2023-01-06 23:27:06 -05:00
Alexey 'Cluster' Avdyukhin
d2aed113b8
More NES 2.0 header fields: Vs. System settings, expansion type
2023-01-06 16:03:34 +04:00
harry
900305b587
For Qt GUI, added option to use palette background color as video background color. This option can be accessed from via main menu -> option submenu.
2022-10-09 21:09:52 -04:00
harry
06467ce73a
Fix for Qt GUI OpenGL blending parameters.
2022-10-09 20:11:54 -04:00
harry
1ad9a3d857
For Qt GUI, added logic to prevent controller buttons that are bound to the keyboard from being active when family keyboard is enabled. Controller buttons that are mapped to physical gamepad or joystick are unaffected. For issue #572 .
2022-10-08 09:56:49 -04:00
harry
eaa5d6f88f
For Qt GUI, added code to update debugger window ASM view when RAM or ROM edits are made from the hex editor. Fixes #508 .
2022-09-01 20:32:51 -04:00
harry
d0add7a609
For Qt GUI added separate hot keys for soft and hard reset functions. Changed soft reset to be default Ctrl+R and hard reset to Ctrl+Shift+R.
2022-08-23 18:36:39 -04:00
harry
77b18ba989
Added keyboard state feedback to lua input.get() function for Qt GUI. Returned key codes are slightly different but at least it does something. Issue #536 .
2022-08-21 22:43:35 -04:00
harry
319b365787
Cheats config improvements for Qt GUI. Added global cheat enable/disable hotkey functionality. Added code to raise and set focus on cheat dialog when attempting to open it when it is already opened. Add code to update/refresh cheat dialog when loading a new ROM.
2022-08-21 14:57:03 -04:00
harry
f3b33a628f
Minor fixes for warnings found by gcc undefined behavior sanitizer.
2022-08-19 22:33:09 -04:00
harry
f4ea336349
Qt GUI fixes for recent changes to fceu core cheats API.
2022-08-19 19:57:27 -04:00