Commit Graph

1175 Commits

Author SHA1 Message Date
alyosha-tas 2a285af5ae GBHawk: Fix start up screen color. 2020-09-06 19:00:11 -04:00
YoshiRulz aa1de1c9d2 Unify setting of window titles, add static title option (fixes )
The only forms that did anything special with their window title were Basic Bot,
CDL, Hex Editor, Log Window, MainForm, and TAStudio. That behaviour is in
WindowTitle, while the rest use WindowTitleStatic.
The implementations of WindowTitleStatic in those six forms are new. There's a
checkbox in `Config` > `Display...` > `Misc` to disable their special behaviour
and use the new static titles.
The Text property is hidden from Designer de/serialisation as well.
2020-09-06 16:18:08 -05:00
YoshiRulz 2c77f76a67
Fix typo
forgot to stage this -_- fixes d1de18119
2020-09-06 09:43:36 +10:00
YoshiRulz d1de181194
Fix de/serialisation of .tasproj MovieVersion header (fixes )
.tasproj files written from both American/global and European PCs will now load
anywhere. No new files will use ',' in the header, only '.'.
2020-09-06 09:36:08 +10:00
YoshiRulz 8e72dddd41
Set menu de/activate handlers on tool form MenuStrips (fixes )
these call methods on MainForm, which decides whether or not to pause/unpause
2020-09-05 18:49:29 +10:00
alyosha-tas 1c5f9fccb3 O2Hawk: Mostly fix 4 in a row 2020-09-04 19:46:49 -04:00
RetroEdit aa00184737
Revert "DeveloperBuild = false"
This reverts commit e524f3e4e5.
2020-09-03 20:15:44 +00:00
RetroEdit cd499b2378
Merge branch 'release' 2020-09-03 20:14:45 +00:00
RetroEdit f3f5774bbb
Fix new bugs from painting during auto-restore
fixes 
2020-09-03 19:38:05 +00:00
RetroEdit 1f19281ed1
Merge pull request from TASVideos/painting-auto-restore-fix
Fix new bugs from painting during auto-restore
2020-09-03 19:08:20 +00:00
RetroEdit 98498f9d50
Fix new bugs from painting during auto-restore
fixes 
2020-09-03 18:11:37 +00:00
YoshiRulz 242dcf04c7
Fix joypad.setanalog implementation and docs (fixes ) 2020-09-03 09:32:45 +10:00
YoshiRulz e77631922e
Change IJoypadApi methods from float to int, allow null in SetAnalog
also from Dictionary<,> to IDictionary<,>
2020-09-03 09:32:12 +10:00
alyosha-tas 1ed9adf3cb GBHawk: Add note to use existing SRAM sync setting, fixes 2020-09-02 17:24:40 -04:00
nattthebear c1a113ce24 fix NRE
closes 
2020-09-02 11:09:22 -04:00
nattthebear 7bca0426bf fix NRE
closes 
2020-09-02 11:07:39 -04:00
YoshiRulz affd1914c2
Change default input method on Windows to DirectInput
for the record I think this is a bad idea
2020-09-02 07:50:38 +10:00
YoshiRulz 1793e991ca
Move Windows version check to OSTailoredCode and cleanup 2020-09-02 07:47:57 +10:00
adelikat dbddcfe665 input widget - delete deafult ContextMenu property, this was done to supress the context menu, but we supress it by other means, fixes , for real this time 2020-09-01 12:52:41 -05:00
adelikat 36b7d9df28 lua functions list - convert from using ContextMenu to ContextMenuStrip, fixes 2020-09-01 10:56:00 -05:00
RetroEdit f3bc89055b Remove default joypad bindings for fast-forward/rewind. Fixes 2020-09-01 09:33:56 -05:00
YoshiRulz a89b0dfdcd
Split TargetedPairSchema.MaxValue to MaxX/MaxY and cleanup
* split TargetedPairSchema ctor and added docs to clarify its behaviour
* renamed VirtualPadTargetScreen.RangeX/RangeY to MaxX/MaxY
* left TODOs in the three places MaxValue was actually used
2020-09-01 09:07:06 +10:00
YoshiRulz 509560fa1a
Use RangeTo extension 2020-09-01 08:23:00 +10:00
YoshiRulz 10ac846256
Chain ExceptionBox ctors 2020-09-01 08:21:24 +10:00
YoshiRulz 15c5cd516c
Rename AxisSpec.Mid to Neutral (resolves ) 2020-09-01 08:09:02 +10:00
adelikat e524f3e4e5 DeveloperBuild = false 2020-08-30 11:54:48 -05:00
adelikat 5b93ef14dc update version info 2020-08-30 11:49:48 -05:00
adelikat 33b1bdfcae Tastudio - fix obvious mouse up typo, if we are going to invalidate from _paintingMinFrame, then we should compare against it, fixes 2020-08-30 11:36:17 -05:00
adelikat e46de9e5c3 Virtualpads - fix single axis controls being tied to each other, fixes 2020-08-30 11:21:50 -05:00
adelikat 8b46500e32 Tastudio greenzone settings dialog - fix positioning a bit 2020-08-30 09:10:40 -05:00
feos 2e88ddf3c5 description typos 2020-08-30 15:26:58 +03:00
RetroEdit d3c5bb4990
TAStudio: Fix a typo in tasproj import message 2020-08-30 12:05:16 +00:00
adelikat b4d89da5d3 be more careful with using gapFiller, it's important that the state not get out of order 2020-08-29 19:21:13 -05:00
adelikat e98a12eaa3 TAstudio - check initializing flag when doing draw callbacks, in fluky circumstances, a draw can be invoked while trying to load a new movie 2020-08-29 18:36:38 -05:00
adelikat 9db5ee2e7b hack to fix Tastudio loading when importing an existing bk2 2020-08-29 18:14:54 -05:00
YoshiRulz 7e99989746
Omit ".exe" from FFmpeg on Unix, and hack a note into the downloader 2020-08-30 09:03:18 +10:00
YoshiRulz 252e878b53 Disable single-instance mode on Unix so we can drop VB.NET dependency 2020-08-30 07:19:36 +10:00
YoshiRulz 45063aa6fa Add helper for when calling .GetTypes() on EmuHawk assembly 2020-08-30 07:19:36 +10:00
YoshiRulz 3179dc8ebe
Put IComm.WebSockets and Lua comm.ws_* behind #ifdef ENABLE_WEBSOCKETS
Not confident in the API shape, especially for ApiHawk
2020-08-30 06:35:31 +10:00
YoshiRulz dc7f5ef7a2
Fix typo
fixes a11a7017a
2020-08-30 05:52:50 +10:00
adelikat 1671cd32c4 GBA virtual pad - adjust size so light sensor actually shows 2020-08-29 13:49:06 -05:00
James Groom a11a7017a7
Fix scaling of axes ()
* Cleanup NormalizeAxes

no behaviour change yet

* Use a more sensible scaling algorithm in NormalizeAxes

* Replace AxisSpec.FloatRange with AxisSpec.Range (ints)

* Use 0..255 for GBA light sensor, and set its Mid to 0 (fixes )
2020-08-29 13:39:48 -05:00
RetroEdit 4456e84bf0
mGBA: Update SaveRAM mem domain to a hardcoded size. ()
* Revert "mgba - try resetting sram memdomain after frame advance, so sram autodetection can progress and feed into frontend. addresses , maybe not in the best way"

This reverts commit 25327b510d. We decided exposing the whole buffer would be better than dealing with a variable size memory domain.

* mGBA: Update SaveRAM mem domain to a hardcoded size.
2020-08-29 13:38:02 -05:00
RetroEdit cdf20ff1be
TAStudio: improve saving behavior ()
* TAStudio import: ask before saving the bk2

* Only save cycle count at movie end; fixes 

* Rework the movie end cycle count warning.

* TAStudio import: allow saving even if no changes are detected
2020-08-29 13:33:13 -05:00
YoshiRulz 56b9ec2350 Add warning for loading config.ini from an older or new version
applies on startup and on `Config` > `Load Config From...`
also changed wording for corrupted config.ini warning
2020-08-29 13:29:12 -05:00
adelikat a421a60a20 restrict ZwinderStateManagerSettings to reasonable values 2020-08-29 13:18:02 -05:00
nattthebear 6de742b01b Revert a series of questionable zwinder changes
These all seem to have been made from the point of view of testing every possible value the UI allowed, and then fixing them all with as little effort as possible, with the fixes going deep in core logic instead of in the validation layer, and the fixes not making anything really "work"; just making it stop complaining.

ZWinderBuffers now require TargetFrameLength >= 1 again: A value of zero doesn't make much sense here, and didn't actually behave differently than 1.
ZWinderBuffers now require Size > 0 again: A size 0 buffer will never capture anything and has no value.  If you don't want a buffer, don't make one at all.  I believe that omitting some buffers might make sense for the state manager, maybe; those more familiar with all of its uses will have to chime in.  If that is the case, then the state manager should not instantiate buffers it does not plan to use.
ZWinderBuffers now throw exceptions again when a single state is bigger than the entire buffer:  If you're in this situation, things are phenomenally broken and your buffer is never going to capture anything successfully.  Users need to fix their settings in this case; they don't need to have a completely non functional system silently claim to work while not doing anything, leaving them befuddled as to why seeking is taking forever.
2020-08-29 12:42:25 -04:00
adelikat 39ac8864b6 TasMovie loading, simplify a bit by not relying on the existing instance of TasStateManager to hold onto settings 2020-08-29 11:32:41 -05:00
adelikat be6b1fa6e4 consolidate propertygrid heigh changing logic 2020-08-29 11:27:00 -05:00
adelikat 0951ef084f Tastudio - rework greenzone settings dialog to fix long descriptions, winforms is bad, this shouldn't have been this hard 2020-08-29 10:49:28 -05:00
adelikat 4b8cb22aba savestate history settings dialog - designer auto-gen 2020-08-29 10:49:28 -05:00
adelikat 991deee549 attempt to document ZwinderStateManagerSettings settings better 2020-08-29 10:49:27 -05:00
zeromus 234642ed0d fix some crashes in CDL. things were rough enough for CDL due to tool open/close and core life cycle being wrecked, but it totally melted down when CDL got sent through the service injection stuff, so this has been pretty broken for years now 2020-08-28 19:09:07 -04:00
zeromus f89840234d minimally fix nes CDL which was broken 3 years ago 2020-08-28 19:02:21 -04:00
zeromus 56082ddf44 move stackalloc in CDL 2020-08-28 18:50:11 -04:00
SuuperW 8789827100 instead of throwing an exception when the buffer is smaller than the state, don't capture the state 2020-08-28 16:30:50 -05:00
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 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 0cff659608 tired of seeing zwinder spam 2020-08-27 15:41:20 -04:00
RetroEdit 7aea4e0271
TAStudio: properly resume playback after painting. () 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 ()
* 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 ()
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  - 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 ()
* 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 
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 ()
All six combinations (bios, no bios) X (dmg, cgb, cgb in agb) should work now

Closes 
2020-08-21 13:14:50 -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 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 ). 2020-08-15 23:13:26 -04:00