Commit Graph

119 Commits

Author SHA1 Message Date
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
harry 5adbc1fcf2 Minor initialization fix for state recorder. 2023-04-15 15:53:17 -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 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 bb76573112 State recorder config setup in work. 2023-03-11 20:45:13 -05:00
harry bc6164260d State recorder in work. 2023-03-11 07:47:58 -05:00
harry d7c23fa92e FCEU state recorder in work. 2023-03-04 16:34:21 -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 92b021171f Fixed compiler endianness detection. Unified to use common macros in endian.h 2023-02-19 20:07:50 -05:00
harry 4a54f43246 Updated state.cpp so that .luasav file paths use std::string so that they aren't limited in size. 2023-01-31 00:27:01 -05:00
harry be9ad4ccf2 Fix small memory leak that occurred when loading a ROM with auto-resume enabled and now resume save file currently exists. Created fceuScopedPtr class type to help prevent memory leaks on temporary memory allocations in functions with early outs. 2023-01-30 23:10:03 -05:00
harry d530bab2e7 Resolved gcc -Wsign-compare compiler warnings in state.cpp. 2023-01-28 09:11:42 -05:00
harry 2b468be264 Changed temp save/load state file path variables to be std::string. 2023-01-20 23:53:29 -05:00
harry 47435295ff Fixed if conditionals using lastSavestateMade address that always evaluates to true. Changed lastSavestateMade and lastLoadstateMade to std::string instead of char buffer, ensures proper initialization at startup and allows for unix max path. 2023-01-20 22:37:17 -05:00
Alexey 'Cluster' Avdyukhin 90aecc0543 COOLGIRL mapper (mapper 342) 2022-12-05 14:56:31 +04:00
zeromus 892e7cb5f5 change how memory is allocated to clean up a lot of messed up junk (mainly strange alignment adjustments which didnt completely make sense and frees which didnt match the allocation function that was used).
In case there are problems on other platforms (a few seems probable), here's the idea
1. Get rid of all manual alignment adjustments
2. use FCEU_malloc or malloc, as you see fit
3. use FCEU_free (or FCEU_gfree) if you use FCEU_malloc or FCEU_gmalloc. There's no real reason to need FCEU_gfree; this rule might be eliminated in the future (at which time FCEU_gfree will be removed)
4. If you need more alignment, increase it in FCEU_malloc. It's unlikely more alignment will ever be needed.

On windows, since the FCEU_*malloc functions now use aligned_alloc, we will catch instances where free() is used to free them (which happens frequently). allocates and frees should be matched. fix the free call if you ever observe this happening.

also

5. In general, remove crufty error handling for allocation failures. This just gunks up the code. If allocation fails, the application terminates.
2022-08-22 22:53:09 -04:00
harry 44c8e15503 Fix for small memory leak in GetBackupFileName(). strdup allocates memory and returns a char pointer to it. However std::string allocates its own memory already. Since FCEU_MakeFName returns a std::string already, there is no reason to use strdup in between the assignment of one std::string to another. 2022-08-04 21:15:59 -04:00
harry 3fed0331cc Fix for global variable SFCPU read overflow error when running with clang/gcc address sanitizer. The code that writes the save state to disk expects the parameter description to at least be 4 bytes. 2022-08-04 21:15:59 -04:00
mjbudd77 caa9e67544 Bug fixes for Qt GUI load/save state hot keys. 2021-04-06 22:44:49 -04:00
mjbudd77 35bb4be6f6 First successful build of Qt windows fceux. 2021-02-06 12:15:28 -05:00
Dan Weiss b66bcfb3e2
Fix SFMDATA getting a terminator that it shouldn't get if NULL pointer is given (#290) 2020-12-31 16:48:54 +03:00
mjbudd77 6724062581 Fixed NULL check for SPostSave function pointer. Initialized SPreSave and SPostSave pointers to NULL to ensure their initial state is consistent. Also, init FCEU_state_loading_old_format to false as it is always better to have an initial state defined than none at all. 2020-12-30 15:20:34 -05:00
Matthew Budd 7919071a25 Cleaned up gcc compiler warning : ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings] 2020-06-19 23:58:12 -04:00
owomomo 9adcbf16cb 1. Fix crash when add multiple watches in RAM Search window, and adding multiple watches here can be batch named.
2. New cheat list box 0.0.0.3 Alpha, changed the possibilities box to a CListCtrl rather than a simple CListBox, use a map for its buffer. It may not quite efficient currently, but I personally think it's much better than adding and deleting the items repeatedly every frame, and now its item can be selected while emulation is running, although there's not much usage for this...
3. added several context menus to possible list, now you can directly add address to memory watch or ram watch, or go to hex editor from here, currently it's still a single select list.
2019-05-08 13:55:53 +08: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 00b4304241 win32: added Config->Enable->Auto-resume old play session 2012-12-15 17:42:53 +00:00
CaH4e3 43ee931dec cleanup and version bum... hmmm (not no mention something else) 2012-10-21 16:40:04 +00:00
punkrockguy318 449ac4352f updated FSF license in COPYING license file and source and header files 2012-08-04 22:33:16 +00:00
zeromus 0458e5555a fix savestate configuration bug in m023 which as of r2532 started causing the emulator to crash on purpose (fixes #523) 2012-07-05 21:40:12 +00:00
zeromus 8d885fa94d fix savestate engine to throw errors when a buggy SFORMAT is passed to AddExState, and fix those errors in m015 and m253 2012-06-19 20:44:05 +00:00
ansstuff f79d4f9a3f * Taseditor: changed the order of "Select between Markers"
* Taseditor: applying PAL and PPU flags when loading projects
* Taseditor: much better way of calculating Branches Tree; hinting full timelines
* Taseditor: miniarrow showing current Playback cursor position in Branches Tree
* Taseditor: "Bookmark#" modtype, undo/redo works for Bookmarks
* Taseditor: version data in fm3
* fixed HUD/messages dumping in AVI

[[Split portion of a mixed commit.]]
2012-04-07 17:10:29 +00:00
ansstuff 0638d88ff9 * Taseditor: Config->Deselect on doubleclick
* Taseditor: checking ROM checksum when saving/loading projects
* more correct way to launch TAS Editor when trying to rerecord a fm3
* TAS Editor can have mouse wheel input even when keyboard focus is on FCEUX window
* disabled FCEUX context menu when TAS Editor is engaged
* added SoundDisplay2.lua
2012-03-09 15:20:51 +00:00
ansstuff e1950ba025 Small save/load state speedup, noticeable only in TAS Editor or lua bots 2012-02-25 23:55:35 +00:00
ansstuff 578c974062 * Tasedit: more refactoring
* Tasedit: resizing TAS Editor window
* Tasedit: INPUT_TYPE_1P
* Tasedit: File->New Project
2012-01-12 19:56:17 +00:00
zeromus bf31670246 vcproj cleanup and fix [3441099] printf bug in SwapSaveState() 2011-11-22 20:43:18 +00:00
CaH4e3 6cb352f626 resetexstate crash fix 2011-09-28 13:28:21 +00:00
ansstuff 92ff246e15 * Tasedit: progressbar
* Tasedit: "||" button accepts double clicks
* Tasedit: holding "<" and ">" buttons
* Tasedit: Ctrl-Delete leaves selection
2011-09-25 18:17:26 +00:00
ansstuff 72e04788fe * deleted "Lag Counter Reset" hotkey, as it was obsolete since FCEUX 2.0.2; added "Open TAS Edit" hotkey
* Tasedit: auto clear "Disable speed throttling" and "Run in background", auto set "Set high-priority thread" when entering TASEdit; FCEUX runs in bg when TASEdit has focus
* Tasedit: Config->"Mute Turbo" check (same as in Config->Sound)
* fixed long "savestate" messages containing path
2011-09-22 16:02:09 +00:00
qeed fc1a10b2a4 fixed fp issue again, and then change vsprintf for something 2010-10-01 19:27:12 +00:00
qeed 983dbd3823 added filename the load state message, for easier debugging 2010-09-17 19:13:13 +00:00
qeed 2c1c1a0a6c added proper file checking for opening files 2010-09-17 18:56:17 +00:00
mart0258 e717a16398 Fix crash (loadstate on missing file) and memory leak (failed to write screenshot) 2010-08-12 06:27:06 +00:00
punkrockguy318 dfccec8c7a sdl: fixed recent bug i introduced that prevented loading savestates 0-9 2010-07-26 17:19:25 +00:00
punkrockguy318 f4535346fb sdl: fixed segfault when loadstating 0-9 when state did not exist 2010-07-20 01:58:13 +00:00
adelikat 988753e116 Bind SSLOADPARAM_BACKUP to backupsavestates bool 2010-05-28 03:28:44 +00:00