Commit Graph

17776 Commits

Author SHA1 Message Date
SuuperW 46de6aca94 don't throw exceptions when passing a BufferSize or TargetFrameLength of 0 to a ZwinderBuffer
size 0 means 0 states will be captured; TargetFrameLength 0 means no spacing of states (result behavior is identical to TargetFrameLength of 1; capture every frame)
2020-08-28 16:30:36 -05:00
YoshiRulz 14653fac0e
Fix or mute remaining code style warnings 2020-08-29 00:52:23 +10:00
YoshiRulz 17ff66c61b
Opt-in to .NET 5 SDK's extra static analysis, update Analyzer packages
the extra CSxxxx rules should be available for Framework too if using the new
SDK, I haven't tried
2020-08-29 00:51:34 +10:00
YoshiRulz 52a559908e
Update Config.LastWrittenFrom/Detailed when saving 2020-08-28 06:15:59 +10:00
zeromus faa3d52500 not sure why we create two tasstatemanagers when engaging tastudio... i guess one is used in case theres existing data (even if theres no existing data). anyway, this fixes the leak 2020-08-27 15:50:49 -04:00
zeromus 46c15f94a9 mupen sln: remove x86 configuration so nobody can use it on accident 2020-08-27 15:43:34 -04:00
zeromus f33ac3cce6 change how mainform disposes itself. it seems we can be disposed from deep inside winforms, likely when the window is closed. changed to not accidentally run dispose again 2020-08-27 15:42:32 -04:00
zeromus 0b73ed77ef update mupen to build on vs2019 so it's simpler for people to hack on. gliden64 has a rendering bug (top left quarter of screen drawn only on nintendo logo on donkey kong 64) when build in vs2019 so I didn't change that one. maybe we need to update gliden64 or find the real bug (likely a numerical instability, despite the use of precise floating point). 2020-08-27 15:41:20 -04:00
zeromus 0cff659608 tired of seeing zwinder spam 2020-08-27 15:41:20 -04:00
RetroEdit 7aea4e0271
TAStudio: properly resume playback after painting. (#2340) 2020-08-27 13:58:19 -05:00
YoshiRulz 08e24c96a7
Skip "run third-party code?" warning when using --open-ext-tool-dll 2020-08-28 04:48:57 +10:00
YoshiRulz 57acee9bd5
Remove unused field
fixes e128cb82f
2020-08-28 04:41:17 +10:00
YoshiRulz e128cb82f2
Add command-line switch --open-ext-tool-dll
takes an absolute path; or a relative path with or without `.dll` (relative to
ExternalTools)
2020-08-28 04:38:38 +10:00
adelikat 0109386049 dispose of TasStateManager 2020-08-27 09:22:30 -05:00
adelikat 41109d6fc2 apparently you need powers of 2 2020-08-26 20:14:30 -05:00
adelikat 950eac5be2 TasStateManager settings - make less aggressive RAM consumption defaults, 512mb total instead of 832mb 2020-08-26 16:03:29 -05:00
RetroEdit 00f8129b4d
TAStudio: Fix deletion crashing when deleting invalid indexes (#2339)
* TAStudio: Fix deletion crashing when deleting invalid indexes

The problem occurs when trying to delete a selection where some of the frames were valid, but the last displayed line (which is currently an extra non-input frame) was in the selection.

* LINQ alignment tweak
2020-08-26 08:18:24 -05:00
SuuperW 956b71060e fix an error with new logic in commit 6b63db8 2020-08-24 18:34:59 -05:00
SuuperW 6b63db80e2 give user the option to (attempt) keep or discard states when changing state history settings 2020-08-24 18:31:22 -05:00
SuuperW 4b6ff639ac allow user to change the state history settings for the currently open TAS project 2020-08-24 18:20:47 -05:00
nattthebear bbc9054517
rohmloader tweak (#2330)
When a missingfirmwareexception is encountered, do not fallback.  It's presumed that these cases are fixable by the end user.

Absolutely does not in any way fix #2327 - the user was emphatic that they had the BIOS file, so they must have hit some other situation.
2020-08-24 15:52:49 -04:00
adelikat 44d7603622 only apply gap filling at the start of the start of an interval. This addresses the "odd" behavior that if you have a gap of 10 in current, and navigate from frame 100 to 99, you get a state saved at 91 2020-08-23 20:40:36 -05:00
adelikat e6ceb1c323 slight tweak to default state manager settings, make the Gap size to target proportional to Current, so that it gets the same "state gap" 2020-08-23 20:22:01 -05:00
adelikat 354ccd1b23 ZwinderStateManager - when considering evicting from recent to reserved, don't assume the reserved is linear or has all gaps covered. Instead check for "nearby" states. This fixes the problem that any state prior to the first used marker would never get an "ancient" state. Technicalyl this will mean that a state can be _ancientInterval * 2 - 1 frames away from its nearest neighbor, but this should be close enough the desired behavior 2020-08-23 20:10:42 -05:00
adelikat 83686a5a15 slight refactor - MarkerControl.AddMarker, force the caller to pass in the frame instead of implicitely assuming Tastudio.Emulator.Frame when one is not passed on, only 2 places didn't pass a value in anyway 2020-08-23 19:27:27 -05:00
alyosha-tas 6501c48b13 GBHawk: make controller setting only effect MBC7 games 2020-08-23 20:08:43 -04:00
adelikat 7d2e18004f actually use the default TasStateManager settings from config when creating a new TasMovie 2020-08-23 18:16:41 -05:00
adelikat 16771bb6bf ZwinderStateManager - speedup and simply the Last property using StateCache 2020-08-23 17:56:01 -05:00
adelikat 1b0139ebc3
Majorly refactor ZwinderStatemanager to address # 2287 (#2321)
* rename highpriority to ReGreenZone, and add a comment, to better document what it is used for

* rename again, from regreenzone to gapFiller, rename settings too, make gap frame length 1000 instead of 10000

* oops

* merge original state with ancient, since we can never invalidate frame 0 anyway, it can safely be stored here

* unremove nonstate

* change ancient to reserved, in preparation for marker and branch states to go here, add more comments

* capture branch states as reserved, reconsider gap logic to account for the fact that a reserved state might be greater than the last current/recent state

* do not capture to reserved states if the state is already rreserved

* add a callback to check if a state is "reserved", client code wil return whether it is a branch or marker state.  Wire up reserved logic into eviction logic.  If reserved, go to reserved list, else evict

* add API for evicting reserved states, and wire it up to marker removal

* just in case

* a bit of renaming, add a unit test for an edge case that was broken with the Last property, add unit tests to cover it

* Revert "a bit of renaming, add a unit test for an edge case that was broken with the Last property, add unit tests to cover it"

This reverts commit b0d01ffacb058eb26c68a7fdccb0010d3bca40b2.

* fix AllStates using Concat() and OrderBy(), add unit tests for HasState and GetStateClosestToFrame()

* Fix InvalidateAfter and add tests

* make HasState() a lot faster

* durp

* convert reserved to a Dictionary

* fix count being off by 1 due to no longer correct assumption of there being a separate frame zero state

* a few cleanups

* clean up tests and use less ram, fix a few things that I broke that unit tests caught, yay unit tests

* implement IDisposable and use in unit tests

* fix SaveCreateroundTrip (for me at least), by using a smaller buffer allocation, also be pedantic and use zw.Settings in zw2 to ensure they match

* some tests for Count

* attempt to cache which states have frames, doesn't work, ZwinderBuffer on the last state before it wraps, doesn't behave as I expect, dunno if it is intended

* fix typo when evicting recent to reserved, cleanups, make unit test work

* oops

* cleanup and account for Gaps in unit test

* use StateCache for HasState, fix unit test accordingly

* use statecache to check if a frame exists during Capture, and do this first, before gap logic

* fix reserved logic in Clear, add a unit test for Clear

* fix Engage bug that was breaking loading movies, remove CaptureReserved from the API and instead, call the reserved callback in Capture

* use state.Size to minimize memory thrashing in AddToReserved()

* cleanup some comments

* when loading a tasproj from disk, build up the state cache, without this commit, loading an existing movie was unuseable

* reserve the frame before markers, not hte marker itself, users expect instant navigation to markers, and since we always navigate 1 frame before the target frame to emulate and get a frame buffer, this is the frame that must be reserved
2020-08-23 17:12:33 -05:00
nattthebear fb6924bd83 improve error message reporting in romloader
fixes #2320
2020-08-22 15:24:17 -04:00
alyosha-tas 8499f54127 GBHawk: CPU halt emulation fixes 2020-08-22 15:14:16 -04:00
nattthebear 1f84dcdeb2 zwinder rewinder - fix all sorts of funsies when the state count cap is reached 2020-08-22 14:58:35 -04:00
alyosha-tas 7423a00fbf Gambatte: use homebrew fast load BIOS files instead of Sameboy when use real bios is false 2020-08-22 14:02:30 -04:00
nattthebear 18780a8752
Fix GBC-AGB bios issues (#2317)
All six combinations (bios, no bios) X (dmg, cgb, cgb in agb) should work now

Closes #2100
2020-08-21 13:14:50 -04:00
zeromus 6dfb09167c update gambatte submodule and post new dll 2020-08-21 00:04:24 -04:00
alyosha-tas 6e8362eef0 GBHawk: make timer <> cpu loop interaction consistent 2020-08-19 11:58:06 -04:00
alyosha-tas 96fa21e238 GBHawk:Basic GBA timer glitch implementation 2020-08-17 17:45:55 -04:00
alyosha-tas 9736fb44ba GBHawk: timer improvements, GB mode 2020-08-17 15:15:23 -04:00
nattthebear 94b47787dc minor cleanup
This variable was used before, but I accidentally changed it out in the process of other refactoring.  No behavioral difference
2020-08-17 14:56:21 -04:00
adelikat 4153df9471 simplify and remove some code in O2 constructor 2020-08-17 11:52:09 -05:00
feos 47fe939b41 fix #2313 2020-08-17 18:40:15 +03:00
alyosha-tas 475b1ac211 GBHawk: timer improvements 2020-08-17 11:23:48 -04:00
adelikat 68701e05de zstatemanager - puting this mistake directly into master, its a nasty one, needs to be fixed immediately 2020-08-17 09:37:55 -05:00
YoshiRulz e8bc7d50dd
Use float math for polar<=>rect if either range is outside -128..127
also set the max of the polar magnitude NUD to the actual measured maximum
2020-08-16 18:53:39 +10:00
YoshiRulz 08c234dcf2
Make VirtualPadDiscManager.OwnerEmulator a readonly field and cleanup
Did this as a separate commit because it seems like the intent was for
OwnerEmulator to be mutable, though it was only ever set immediately after
creation. Revert to make it mutable again.
2020-08-16 17:28:48 +10:00
YoshiRulz b204d65afe
Set properties via ctors instead of obj init syntax and cleanup 2020-08-16 17:17:10 +10:00
zeromus bea796fb2d experimental "Frame Inch" designed to make quick presses of frame advance always do something (concerning #2303). 2020-08-15 23:13:26 -04:00
nattthebear 732afe6a9e When the frontend ui generates an empty controller bind, remove it instead of doing nothing
Fixes #2264
2020-08-15 13:34:23 -04:00
nattthebear 7adeebb59a
TurboNyma/HyperNyma - make SystemId = "PCECD" when in cd mode 2020-08-15 12:20:26 -05:00
nattthebear 77057d4b16 minor cleanup 2020-08-15 12:53:04 -04:00