Commit Graph

4230 Commits

Author SHA1 Message Date
harry 584593816f Remove debug symbol save call from load symbols function so that live file edits are not overwriten. Added a save debug symbols debugger menu action so that this can be explicitly performed. Fixes issue #642. 2023-05-15 20:42:17 -04:00
harry 7573f1b7dc Added profiler per thread logging. 2023-05-13 20:26:56 -04:00
harry 58b87387eb Cleanup of Qt GUI video driver viewport loading/unloading. Use QObject::deleteLater for a cleaner shutdown of a viewport. 2023-05-11 08:05:14 -04:00
harry 52c53dfe5b Removed commented out code Qt GUI video interface code. 2023-05-10 21:30:27 -04:00
harry b125d48db5 For Qt GUI add code that forces video alpha bits to 255 for all pixels. Some video drivers aren't ignoring the alpha bits as they should so make sure they as always set to be safe. 2023-05-10 20:58:19 -04:00
harry 3208c01b38 Hooked up bi-linear filter for new QPainter video driver. 2023-05-10 00:25:07 -04:00
harry 13b52f5c8e A few corrections to the QPainter Video driver. 2023-05-09 23:01:53 -04:00
harry 3d6cf7a730 Added a third video driver option for Qt GUI that uses a QPainter object to render QImages to the viewport. Consolidated video driver interface into a base class so generic object pointer can be used throughout the code to control the viewport. 2023-05-09 22:57:05 -04:00
harry a9f4176f2b Minor profiler update 2023-05-09 22:53:40 -04:00
harry d0d822447d Preparing to merge debug profiler in to main dev line. 2023-05-09 18:28:49 -04:00
harry 157b8531a2 Added TSC timing to suppliment lower resolution time measurements. 2023-05-09 08:26:28 -04:00
harry 9a0578dba9 Merge branch 'master' of github.com:TASEmulators/fceux 2023-05-09 05:59:32 -04:00
Alexey 'Cluster' Avdyukhin 3d1062c9fe Removed debug code from mapper 342 2023-05-08 19:42:58 +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
Alexey 'Cluster' Avdyukhin 62b72b6141 Minor comments fixes 2023-05-08 15:17:53 +04:00
Alexey 'Cluster' Avdyukhin e95e1d1095 Mapper 342 fixes 2023-05-08 13:46:43 +04:00
harry f660f132af Added GNU profiler instrumentation build option to Qt GUI. 2023-05-07 07:37:48 -04:00
thor2016 94f2696a83
Merge pull request #626 from bbbradsmith/ppu_internal_memory_init
Memory initialization settings for PPU internal memory
2023-05-04 20:58:47 -04:00
Fritz Mahnke 150372eeca Remove some code that was ported to FCEUX from gens, but isn't used. 2023-05-04 14:50:11 -07:00
Fritz Mahnke 17e04a9b74 Implement LUA function memory.registerread. 2023-05-04 14:50:11 -07:00
Alexey 'Cluster' Avdyukhin f8b8e93eaf Mapper 342 memory optimization 2023-05-02 14:35:08 +04:00
Alexey 'Cluster' Avdyukhin 8b37ad91e5 Commit 8857f99d rollback 2023-04-28 17:33:05 +04:00
Alexey 'Cluster' Avdyukhin d72d9daebb Merge branch 'master' of github.com:TASEmulators/fceux 2023-04-28 15:02:22 +04:00
Alexey 'Cluster' Avdyukhin 8857f99dd0 Using 8KB of CHR RAM memory for UNROM-512 by default (required by some games), use NES 2.0 to override 2023-04-28 15:02:04 +04:00
harry e1e88b7298 Added libarchive to Qt win64 build. 2023-04-25 04:14:30 -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
negative c4ce3ac3fd Mapper 227: Fix CHR-RAM protect check 2023-04-17 17:53:42 +08: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
harry 5adbc1fcf2 Minor initialization fix for state recorder. 2023-04-15 15:53:17 -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 b4efaa91d8 Changed memory_savestate and compressed_buf buffers in state.cpp to be static file scope. No reason to export these to the linker with global scope. 2023-04-02 06:01:37 -04:00
harry 55bcb3d41a Added a load prev and next state functions for state recorder. 2023-04-01 21:17:34 -04:00
harry 99aefa563a Fix for state recorder load state function. Set EMUFILE_MEMORY read position back to beginning of memory block before calling FCEUSS_LoadFP. 2023-04-01 19:39:37 -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 3e9398f973 Added a timed pause state for use by the state history loader. When the user backs up to a previous state, give the option of temporarily pausing to give the user time to visually process the state before resuming game play. When in this state, an unpause count down can also be optionally shown on the upper left of the video display. Also, setting pause during this state down will cancel the count down and put the emulation into full pause. TODO add GUI config hooks to control video overlay and duration config options. 2023-03-31 05:34:32 -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
bbbradsmith 4774a773a8 Apply memory initialization settings to nametable, palettes, and sprites. 2023-03-26 15:40:30 -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 326d09d546 Merge branch 'master' of github.com:TASEmulators/fceux 2023-03-11 07:18:11 -05:00
negative 0aa49a5627 Mapper 205: Fix for split-rom variant (UNIF) 2023-03-06 14:42:25 +08:00
negative 012fbca2d8 Move mapper 205 to mapper 361/366, add proper mapper 205
- Current mapper 205 implementation moved to describe mappers 361 and 366
instead.
- Then add mapper new mapper 205.
These mapper changes should now reflect
what is described in mapper's wiki article
2023-03-06 14:03:18 +08:00
negative 43bdd96d7e Add mapper 174 2023-03-06 13:24:20 +08:00
negative 6babc7fdaf Mapper 78: Add submapper support 2023-03-06 13:13:06 +08:00
harry d7c23fa92e FCEU state recorder in work. 2023-03-04 16:34:21 -05:00
negativeExponent 9cf87738bf
Mapper 354: Add CHR-RAM protect
Fix https://github.com/TASEmulators/fceux/issues/621#issuecomment-1449284275
2023-03-01 11:42:28 +08: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 25cdc5ade1 Ensure proper initialized returns for emufile read functions. 2023-02-20 12:53:55 -05:00
harry 6f2c0a84f9 Refactor save game RAM code so that the mappers call a function to register their buffers instead of writing directly to the cartinfo variables. Added optional reset callback function that can registered and will be called when FCEU_ClearGameSave runs. This is for memory that needs to be reset to non-zero values. 2023-02-20 11:21:04 -05:00
harry b199bb9787 Update version.h so iterim git is not confused with latest release. 2023-02-19 21:02:06 -05:00
harry dfd5e13b8f Minor cleanup of unrom512 flash state save/load init. Removed debug pragma message. 2023-02-19 20:58:03 -05:00
harry 20b982854d Commented out unrom512 flash save RAM hooks until movie FCEU_ClearGameSave issue can be fixed. 2023-02-19 20:34:04 -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 6b73e91c38 Ensure a few static variables are initialized properly. 2023-02-18 16:24:28 -05:00
harry e9f97f520a Change size input for allocation functions to size_t type instead of uint32. 2023-02-18 16:23:28 -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 791ff7478d Commented out debug print. 2023-02-13 18:56:14 -05:00
harry 53cf1eaf2a Added a macro for NES header size to avoid having magic number 16 all over code. Fixed ld65 bank calculation to account for header. 2023-02-13 18:53:53 -05:00
harry b33b27c25b First semi-successful ld65 debug symbol import 2023-02-12 22:21:05 -05:00
harry e0aa5a71fa ld65 debug database loader in work. 2023-02-12 14:47:00 -05:00
harry 0beac5d725 ld65 debug file parser in work. 2023-02-12 12:54:20 -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 c1e7465fe5 Laying out framework for ld65 debug symbol loader feature. 2023-02-12 08:30:14 -05:00
harry 18f09c8e76 Fix for UBSAN left shift of negative number error in SexyFilter2 2023-02-09 20:06:18 -05:00
zeromus ea6ed69b87 add missing StateRestore on mapper 354 2023-02-08 17:47:15 -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 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
harry 410810ac18 Fix for win port editing core debug symbol table entries. 2023-02-06 20:49:09 -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 130d1dcd45 Changed symbolic debug table error printf statements to use FCEU_printf so that messages are logged in message viewer for user to read. 2023-02-05 08:20:28 -05:00
harry e4749425ba Added code to remap symbolic debug name in lookup table if editted via gui. 2023-02-05 03:57:23 -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 fa7da51ccd Patch new core debug symbol table into win port. 2023-02-04 07:25:39 -05:00
tsone ef1f7ec39a Renamed Lua debugger.getsymboladdress -> getsymboloffset and added the function documentation. 2023-02-01 16:00:28 +01: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 b602de6ce0 Removed old common config code from Qt build. The Qt port only uses the newer C++ style common config system. 2023-01-31 23:02:21 -05:00
harry d32ab0ad51 Added a mutex to the debug symbol table access functions to ensure that access to symbol maps is thread safe. Since a map change will invalidate any iterators operating on the map, it is important to ensure that access to the map is locked when a thread is iterating or operating on the map. 2023-01-31 22:14:49 -05:00