Commit Graph

1583 Commits

Author SHA1 Message Date
nattthebear 6ee62023a2
Re-add M3U capability (#2390)
Only supports optical disks.
2020-10-02 00:32:56 -04:00
alyosha-tas 38838fa3c1 GBHawk: fix window latching, x-scroll only latching lower 3 bits, and MBC3 RTC reg behaviour. 2020-10-01 20:09:26 -04:00
alyosha-tas 7ebc3a3058 GBHawk: FiX serial port emulation (somewhat) and cleanup some minor bugs 2020-10-01 15:17:58 -04:00
YoshiRulz 60da770532
Replace goto without throwing 2020-10-02 04:19:01 +10:00
zeromus f363acd16a Revert "Replace goto" (goto is superior to throwing an exception in unexceptional codepaths)
This reverts commit f22f5b732b.
2020-10-01 14:11:41 -04:00
YoshiRulz f22f5b732b
Replace goto 2020-10-01 22:33:41 +10:00
YoshiRulz ac5d53b44e
Code style: add explicit private modifier 2020-10-01 22:33:37 +10:00
YoshiRulz 03f82226cf
Cleanup GetRelativePath after move from MultiDiskBundler
fixes 5d001f3aa
2020-10-01 22:33:32 +10:00
nattthebear 7f4d29d0ff Revert "resume m3u support by turning the m3u to an xml game and then loading that. fixes #2378"
This reverts commit 8da5525819.
2020-10-01 08:17:30 -04:00
zeromus 8da5525819 resume m3u support by turning the m3u to an xml game and then loading that. fixes #2378 2020-10-01 03:40:19 -04:00
zeromus 5d001f3aa9 put MultiDiskBundler's GetRelativePath() in PathExtensions.cs. but I didn't end up using it... 2020-10-01 03:12:42 -04:00
zeromus 99f9b9b447 rename GetTempFilename `extension` arg to make it clear that you should provide the dot... 2020-10-01 03:02:13 -04:00
zeromus 3fd7e11f60 small improvements to MultiDiskBundler 2020-10-01 02:24:17 -04:00
adelikat 995993357f
StateManager - increase performance when there are a lot of states, fixes issue #2428 (#2433)
* StateManager - switch from SortedSet to List<int> + duplicate checks.  Seems to make raw capture speed to be slighly slower, but greatly speeds up invalidate which speeds up painting

* Add SortedList<T> : ICollection<T> which wraps List<T>

More interfaces can be added as needed. There's an indexer though ICollection
doesn't specify one.

* Update SortedList<T>

* StateManager - use SortedList<int>, seems to offer raw unthrottled drawing speed with no drawbacks, painting is still smooth when there is a high number of states

* remove a space

* Add RemoveAfter to our SortedList for efficiency

* fix unit tests to use [DataRow]

Co-authored-by: YoshiRulz <OSSYoshiRulz@gmail.com>
Co-authored-by: RetroEdit <30182911+RetroEdit@users.noreply.github.com>
2020-09-30 08:37:36 -05:00
alyosha-tas 7a4c5afce4 GBHawk: fix x-scroll latch and add some notes 2020-09-28 21:41:56 -04:00
RetroEdit 8449f9fcb8
Firmware Manager: replace unnecessary gotos 2020-09-28 15:34:28 +00:00
nattthebear d3f1d0f6ac Revert "Because the real GBA version of the GBC BIOS is quite obscure, a fallback is needed"
This reverts commit f3f70276df.
2020-09-27 22:32:55 -04:00
TiKevin83 f3f70276df Because the real GBA version of the GBC BIOS is quite obscure, a fallback is needed 2020-09-27 20:45:55 -04:00
zeromus 9884c93fbf Revert "Revert "Change build path of executables to output/dll but gooder""
This reverts commit f078709b6b.
2020-09-27 17:27:02 -04:00
zeromus cfbc148975 fix GB and SNES graphics viewers (and maybe others) due to incorrect (non-100%) windows DPI scaling setting 2020-09-27 17:26:44 -04:00
zeromus f078709b6b Revert "Change build path of executables to output/dll but gooder"
This reverts commit bb0e92a830.

I can't build again. e.g:
Unable to move file "..\..\output\BizHawk.WinForms.Controls.dll" to "../../output\dll/BizHawk.WinForms.Controls.dll". Cannot create a file when that file already exists.

We've failed twice now. Please give a rationale for why we have to move these files around.
2020-09-27 16:46:25 -04:00
YoshiRulz 96f4f24968
Fix weirdness in a specific rom loading scenario (fixes #2024)
Without this commit, choosing "Cancel" from a tool form's "Save changes?" dialog
(i.e. AskSaveChanges) while trying to load a rom from `File` > `Recent ROM`
would treat that recent rom as though it were missing. With this commit, an OSD
message is displayed instead.
This isn't the best fix. The return value from LoadRomInternal isn't even used
anywhere apart from LoadRomFromRecent, which is the only place the new out param
is used.
2020-09-28 05:10:40 +10:00
RetroEdit 3adcc26752
Simplify Gambatte's sync settings for selecting GBA (#2431)
Having GBA be a console mode is more straightforward for users to understand and a more logical way of arranging options. GBA is literally a console mode, not an additional modifier to a console mode.
2020-09-27 13:06:55 -05:00
adelikat e4d4c3a9d8 Lua - tastudio library - supress lua console updates when invoking tastudio methods that cause tool udpates, fixes #2172 2020-09-27 12:59:16 -05:00
RetroEdit b5cf9cb241
Restore Game Boy Pocket firmware to Acceptable
It does not have the same issues as early revisions of the GB/C boot roms
2020-09-27 17:13:41 +00:00
adelikat 32b7358f07 Macro tool - fix NRE on File -> Load Macro, fxies #2375 2020-09-27 11:16:18 -05:00
adelikat 32a20dcb3d Tastudio Markers - scroll to newly added marker instead of assuming it is the last in the list and scrolling to bottom, fixes #2350 2020-09-27 10:54:09 -05:00
adelikat c8a7c9d98f Tastudio - Markers - remove some nonsense code 2020-09-27 10:41:33 -05:00
adelikat 7920d148be InputRoll - auto-initialize MultiSelect to true, to match the DefaulValue attribute 2020-09-27 10:38:16 -05:00
adelikat 6a09bbce38 Branches - fix settings the designer barfed on in a previous commit, and a bit of cleanup 2020-09-27 10:35:58 -05:00
adelikat cc66ba81c9 Tastudio - branches - disable toolbar buttons and menu items that need specifically 1 branch selected when multiple branches are selected 2020-09-27 10:23:51 -05:00
adelikat a5884622c8 Tastudio - BookMarks - sanely handle updating toolbar buttons, fixes buttons not disabling when de-selecting 2020-09-27 10:15:19 -05:00
adelikat a0943000a3 InputRoll - fire selected index changed event on DeselectAll() 2020-09-27 10:10:30 -05:00
adelikat 33c8808ee4 PSX - initialize with a single controller + memcard instead of two, to be consistent with other cores 2020-09-27 09:59:05 -05:00
adelikat ad9a04d918 Lua Console - fix Session saving saving the session filename instead of the script filename, fixes #2400 2020-09-27 09:48:45 -05:00
adelikat 725cee8b62 Ram Search - persist Use Undo History, and also set it to true by default, fixes #2413 2020-09-27 09:32:34 -05:00
adelikat 63f9de42a7 Tas Profile - fix mistake of snes9x being the snes core instead of bsnes. Also turn off GBC in GBA setting, after discussing with tasvideos staff, this setting is specifically preferred to be false. 2020-09-27 09:10:15 -05:00
RetroEdit cf58dd8ad1
Minor GB/C and PCFX firmware detection revisions (#2430)
Change the status of alternate GB/C firmware options to unacceptable. Quoting from CasualPokePlayer "Gambatte is definitely not emulating those cpus [dmg0 and cgb0]. So you would end up with quirks of newer cpus being combined with bootroms only present in older cpus."

Also fix what looks to be a longstanding typo where the PCFX BIOS v1.01 was not being properly detected.
2020-09-27 13:30:12 +00:00
TiKevin83 a932cce636 Revert "initial attempt at a firmware fallback for Gambatte's clean room patch"
This reverts commit be25ad0bc8.

Meant to push this to a different branch for PR
2020-09-26 19:14:20 -04:00
TiKevin83 be25ad0bc8 initial attempt at a firmware fallback for Gambatte's clean room patch 2020-09-26 19:12:58 -04:00
YoshiRulz bb0e92a830
Change build path of executables to output/dll but gooder
fixes 5ae13a230, 49a18d83b
2020-09-27 02:28:42 +10:00
zeromus 49a18d83bf I don't know what the fuck this is, and I don't care. If I can't open the sln and debug emuhawk, then it's broken.
Revert "Change build path of executables to output/dll"
2020-09-26 00:47:10 -04:00
alyosha-tas bac502671f GBHawk: rewok interrupt handling to pass more tests and behave like gambatte on Gensan 2 2020-09-25 20:19:53 -04:00
alyosha-tas 39f6668f18 dual gameboy: fix XML generation and core preference selection 2020-09-25 09:12:33 -04:00
alyosha-tas 7e7713c955 GBHawk: fix color displayed when BG is off 2020-09-24 17:26:50 -04:00
nattthebear 7ea7f75f50 Fix some arm disassembly stuff
Some random code which is trying to align columns or something gets pooped up because "BLX" has no second part
2020-09-24 14:52:28 -04:00
nattthebear fe929c0c55
Fix SGB core picker which was broken (#2422)
* Fix SGB core picker which was broken

* Restore default SGB core choice of SameBoy

In 2.4.2 and before, SameBoy was implicitly the default, but this makes the choice more explicit and the core picker UI properly show the chosen core when nothing has been selected yet.

* Cleanup core picker UI gen

* Remove now defunct SgbUseBsnes option from Config

Co-authored-by: RetroEdit <30182911+RetroEdit@users.noreply.github.com>
Co-authored-by: YoshiRulz <OSSYoshiRulz@gmail.com>
2020-09-24 09:23:12 -04:00
nattthebear 757ac4e27e Fix crash saving zwinder state manager when things align a certain way 2020-09-23 22:03:37 -04:00
YoshiRulz f8e624befe
Create common property IsTargetingNetFramework
* if true, will add reference assemblies <PackageReference/>
* slightly less dumb <Move/>
2020-09-22 22:11:00 +10:00
YoshiRulz 1fdd2d5eb1
Import MainSlnCommon.props in MainSlnExecutable.props 2020-09-22 20:51:36 +10:00
YoshiRulz 5ae13a2309
Change build path of executables to output/dll
* post-build step moves .exes up a level, to output
* also fixed OpenTK.dll.config location
* also removed redundant step from packaging scripts
* future executables need to be capable of resolving assemblies in dll
2020-09-22 09:39:53 +10:00
YoshiRulz 000e2af543
Extract .props for executable projects 2020-09-22 09:33:53 +10:00
YoshiRulz da26a18bf5
Remove redundant <AppendTargetFrameworkToOutputPath/> 2020-09-22 09:33:49 +10:00
YoshiRulz 877bb2ccea
Move Assets to output <Target/> to BizHawk.Common 2020-09-22 09:33:44 +10:00
zeromus c64fb11d0d dialogs shouldnt be opened without an owner. so give all them an owner. fixes #2420 2020-09-21 13:11:28 -04:00
YoshiRulz fb5a5ed78c
Add libdarm.so, migrate Darm class to BizInvoker
`Tools` > `Debugger` no longer crashes immediately on Linux with mGBA core
2020-09-21 01:38:09 +10:00
Moritz Bender e5d04e1e52
Fix tasproj backup files getting saved with savestates / greenzone (#2416) 2020-09-20 09:31:48 -05:00
RetroEdit b1a64e2212
Broaden usage of TAStudio-specific movie-loading. (#2411)
* Broaden usage of TAStudio-specific movie-loading.

fixes #2386

* TAStudio drag-drop: use LoadMovieFile for consistency
2020-09-18 20:08:49 -05:00
nattthebear 302b12cda8 Remove infinite loop on certain stream copy failures
Instead we get an error message now
2020-09-18 18:10:40 -04:00
RetroEdit 0d72cd901a
Replace SelectionFocused variable I accidentally added 2020-09-18 20:38:10 +00:00
RetroEdit 9e4f81e3a4
Markers/branch multi-selection (#2409)
Fixes #2215 

* Make marker/branch columns use ColumnType.Text

One step towards fixing multiselect for markers and branches

* Disable some input operations while TasView is unfocused

This prevents accidentally deleting inputs while branches or markers are selected.
2020-09-18 19:39:04 +00:00
adelikat 0ecd155758 Lua console - enable multi-select, InputRoll - refresh on select/deselect all, fixes #2401 2020-09-18 14:29:46 -05:00
RetroEdit 35754469aa
Select only the new branch when created, fixes #2405 2020-09-17 22:34:00 +00:00
YoshiRulz b6a3c20b49
Code style: Remove a redundant semicolon 2020-09-18 07:28:11 +10:00
YoshiRulz 727c6bc51f
Make ToolFormBase implement IToolForm 2020-09-18 07:28:08 +10:00
YoshiRulz 8aa3dcf72f
Remove ToolFormBase.Config and use base property
The non-weird init in ToolManager can't pass in the ctor because 1. Config is
written to in Restart as well as Load and 2. it's a base class and that's not
how ctors work and I should know this
2020-09-18 07:27:59 +10:00
YoshiRulz 9a6b853a49
Fix line breaks in two labels in OpenAdvancedChooser (fixes #2407)
fixes 64d14a7f9
2020-09-18 02:52:42 +10:00
alyosha-tas 2f01ac2212 GBHawk: add in missing variable to state 2020-09-16 20:54:51 -04:00
YoshiRulz afbce436cd
Restore FormBase.WindowTitleStatic semantics without breaking Designer
fixes daf6f516c which fixed regression in aa1de1c9d
2020-09-15 13:47:51 +10:00
scrimpeh 70b695a456 TAStudio: Disengage TAStudio after loading .bk2 2020-09-14 15:14:06 -05:00
YoshiRulz aa74209b3a
Use .so in OAC for Libretro cores on Linux 2020-09-14 16:20:38 +10:00
YoshiRulz 5ed192c5ce
Bump version 2020-09-14 16:19:07 +10:00
zeromus 82c4fa4881 re: #2393 - fix something related to ed9b7b3eb1 (maybe) 2020-09-13 21:16:12 -04:00
adelikat 284af73b14 nes palette viewer - dont' new up brushes on every draw 2020-09-13 12:52:37 -05:00
adelikat 5c5438ea18 add advanced config option that will remove the "Mixed" key priority when clicking the statubar icon or pressing hte hotkey 2020-09-13 12:23:15 -05:00
adelikat 40fe4b3022 Merge branch 'release' 2020-09-13 11:10:38 -05:00
adelikat f104807193 update version info 2020-09-12 20:36:29 -05:00
adelikat 043ec74206 set Faust release flag to true 2020-09-12 09:26:04 -05:00
YoshiRulz 17440fad2f Fix crash when painting selected row backgrounds in InputRoll 2020-09-12 09:22:58 -05:00
nattthebear d619a3c7c3 Fix two mostly unrelated nyma settings issues
Mednafen has extra aliases of enum values that we don't need here and were confusing the system.  Now, NGP no longer has three different "English" options for language.
Internal Mednafen code expects MDFN_GetSettingB ("bool") to work with enum values, so long as those enums are 0 and 1, but we weren't handling that.

Fixes #2385
2020-09-12 09:22:28 -05:00
adelikat 76c97e49e7 Ram watch - clear on screen watches when doing fast updates, fixes #2379 2020-09-12 09:20:29 -05:00
zeromus be98f272f2 remove parallel from watchlist 2020-09-12 09:20:14 -05:00
YoshiRulz 5099614dbe Disable "Stay on Top" setting of IToolFormAutoConfigs on Unix 2020-09-12 09:18:17 -05:00
YoshiRulz f6dde5914d Prevent trying to load VB.NET assembly on Linux 2020-09-12 09:17:30 -05:00
alyosha-tas a0c35b397e GBHawk: Fix start up screen color. 2020-09-12 09:16:33 -05:00
YoshiRulz 15deab90e5 Fix typo
forgot to stage this -_- fixes d1de18119
2020-09-12 09:15:53 -05:00
YoshiRulz 27d4bfc8b9 Fix de/serialisation of .tasproj MovieVersion header (fixes #2377)
.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-12 09:15:27 -05:00
YoshiRulz d48bea5056 Fix joypad.setanalog implementation and docs (fixes #2310) 2020-09-12 09:12:54 -05:00
YoshiRulz 99440b6095 Change IJoypadApi methods from float to int, allow null in SetAnalog
also from Dictionary<,> to IDictionary<,>
2020-09-12 09:12:16 -05:00
alyosha-tas 12c5658050 GBHawk: Add note to use existing SRAM sync setting, fixes #2354 2020-09-12 09:10:50 -05:00
YoshiRulz f07c24cfcc
Fix crash when painting selected row backgrounds in InputRoll 2020-09-12 21:14:25 +10:00
nattthebear ddd229e03d Fix two mostly unrelated nyma settings issues
Mednafen has extra aliases of enum values that we don't need here and were confusing the system.  Now, NGP no longer has three different "English" options for language.
Internal Mednafen code expects MDFN_GetSettingB ("bool") to work with enum values, so long as those enums are 0 and 1, but we weren't handling that.

Fixes #2385
2020-09-10 08:05:11 -04:00
adelikat d1257e302b Ram watch - clear on screen watches when doing fast updates, fixes #2379 2020-09-09 13:28:52 -05:00
adelikat 48b7980cb9 Revert "some fixes to input roll drawing, but it is massively messed up"
This reverts commit 23fcb4c1a0.
2020-09-09 12:38:41 -05:00
zeromus 23fcb4c1a0 some fixes to input roll drawing, but it is massively messed up 2020-09-08 19:51:16 -04:00
zeromus daf6f516c6 fix bugs from aa1de1c9d2 that made tool windows undesignable 2020-09-08 19:35:42 -04:00
zeromus e840a32ccc remove parallel from watchlist 2020-09-08 19:29:40 -04:00
YoshiRulz bf3f037bd7
Enable SA1212 and fix non-compliance
"Property accessors should follow order" (setter should not come before getter)
2020-09-08 22:23:10 +10:00
YoshiRulz 0dd89de0d8
Enable SA1205 and fix non-compliance (except in Cores)
"Partial elements should declare access" (type decl. modifier not copied across
all parts)
2020-09-08 22:14:47 +10:00
YoshiRulz 5488c80f4d
Enable SA1400 and fix noncompliance (except in Cores)
"Access modifier should be declared"
2020-09-08 21:57:14 +10:00
YoshiRulz 4bf50e6e51
Fix docs/strings/identifiers copypasta'd between various Hawk cores
A2600 standard controller and A7800 standard controller were using the same
keybinds, now only Atari2600Hawk uses those and A7800Hawk's are blank unless
configured manually or configured on config regen
2020-09-08 12:02:53 +10:00
YoshiRulz d170972e3c
Cleanup various Hawk cores' controller decks
The main point is referencing types directly instead of iterating them by
reflection and also calling their ctors by reflection.
(disclaimer: [DisplayName] attrs are still necessarily read by reflection)
2020-09-08 00:05:35 +10:00
YoshiRulz 329a7de8b8
Disable "Stay on Top" setting of IToolFormAutoConfigs on Unix 2020-09-07 22:43:54 +10:00
YoshiRulz f1ef8c64cb
Make *.ReflectionCache.Asm props private 2020-09-07 22:36:24 +10:00
YoshiRulz f7ccb7dfca
Change signature of CoreInventory ctor 2020-09-07 22:35:14 +10:00
YoshiRulz e10e139f10
Encapsulate Assembly.GetManifestResourceStream in *.ReflectionCache 2020-09-07 22:31:38 +10:00
YoshiRulz 209fbc6de0
Add and use ReflectionCache classes 2020-09-07 22:01:26 +10:00
YoshiRulz 9325e2f002
Prevent trying to load VB.NET assembly on Linux 2020-09-07 22:01:03 +10:00
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 #1996)
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 #2377)
.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 #2281)
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 #2371
2020-09-03 19:38:05 +00:00
RetroEdit 1f19281ed1
Merge pull request #2372 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 #2371
2020-09-03 18:11:37 +00:00
YoshiRulz 242dcf04c7
Fix joypad.setanalog implementation and docs (fixes #2310) 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 #2354 2020-09-02 17:24:40 -04:00
nattthebear c1a113ce24 fix NRE
closes #2363
2020-09-02 11:09:22 -04:00
nattthebear 7bca0426bf fix NRE
closes #2363
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 #2222, for real this time 2020-09-01 12:52:41 -05:00
adelikat 36b7d9df28 lua functions list - convert from using ContextMenu to ContextMenuStrip, fixes #2222 2020-09-01 10:56:00 -05:00
RetroEdit f3bc89055b Remove default joypad bindings for fast-forward/rewind. Fixes #2297 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 #2345) 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 #2351 2020-08-30 11:36:17 -05:00
adelikat e46de9e5c3 Virtualpads - fix single axis controls being tied to each other, fixes #2351 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 (#2334)
* 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 #2323)
2020-08-29 13:39:48 -05:00
RetroEdit 4456e84bf0
mGBA: Update SaveRAM mem domain to a hardcoded size. (#2311)
* Revert "mgba - try resetting sram memdomain after frame advance, so sram autodetection can progress and feed into frontend. addresses #1620, 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 (#2337)
* TAStudio import: ask before saving the bk2

* Only save cycle count at movie end; fixes #2203

* 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. (#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
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
adelikat 353ec518c7 update GB/GBC profile settings:
longplays - gambatte, require bios (per longplays request)
tas - gambatte, require bios, CGB in GBA (per tasvideos request)
2020-08-15 11:23:34 -05:00
RetroEdit 1f5128bf6b
zwinder: Make GetStateClosestToFrame actually get closest state. (#2291)
* zwinder: Make GetStateClosestToFrame actually get closest state.

* Clarify docs
2020-08-14 11:00:56 -05:00
RetroEdit e89449ed27
Input display: At movie end, show both last movie inputs and current inputs; fixes #2295 (#2305) 2020-08-14 10:49:06 -05:00
nattthebear 5ea32b875b rewinder UI - limit target frame length to 500000
I guess the 16383 came from looking at the code, but 16383 is a limit on the number of states (which also needs to be increased, TODO) not how many frames back those states go.  There is effectively no limit except numerical calculation limits on the target frame length; if you had room for only 10 savestates, but wanted to cover a 10 million frame range, we'd just save once every million frames
2020-08-14 10:20:02 -04:00
zeromus 1d87bcd29c Dispose MemoryBlock in zwinderbuffer (fixes #2304) 2020-08-14 08:12:44 -04:00
nattthebear 356dfcebdb Change the designer for rewinder to allow up to 32GB of rayums used
Since the rewinder scales in powers of two, we might want to reconsider how this control works
2020-08-13 21:14:34 -04:00
nattthebear 4062584719 zwinderbuffer: use memoryblock instead of junko .net arrays. This bad boy can hold more than 1GB of shite now 2020-08-13 21:08:48 -04:00
nattthebear 5d3b85ab9f Clean up and remove a lot of no longer used memory block stuff
All of the cool and quirky stuff it did was solely to support waterbox, which has its own native impl of this now.  So now it just lets you allocate memory and change protection on it.  Boring.  Note that the slot based callback system in waterbox gives constant function pointer addresses inside the box, so it doesn't matter where exactly CallingConventionAdapter is allocated.
2020-08-13 19:41:52 -04:00
RetroEdit ad07eb8574
Clean up truncate behavior and docs. Fixes #2285 (#2286)
* Clean up truncate behavior and docs. Fixes #2285

To start with, 770ddc26db (6 years ago, prior to 1.7.0) made the documentation of how truncate is supposed to work. However, judging by my testing of 1.9.0 and 2.4.2, it probably hasn't ever worked that way in practice. It seems justified to change the documentation to match the behavior that the user is familiar with, and what I see as the commonsense behavior anyway (I can justify this further if anyone is curious).

Note this is not changing the behavior of truncate itself; it is simply documenting what the behavior has always been.

Secondly, Invalidate was modified to become InvalidateAfter. This modifies how it gets called, but otherwise remains mostly identical internal to the Zwinder. This was done to make it easier to reason about relative to the input log, which should be the foundation for an understanding of related components.

* zwinder: "frame after" interpretation in all Invalidate methods
2020-08-11 17:53:27 +00:00
YoshiRulz 953a14016f
Fix phantom NRE from ProcessInput during some crashes on Mono
Pretty sure this only affected Mono. The infinite loop in ProgramRunLoop
continued even after the form was disposed (in the testing I did, this was
always during the call to CheckMessages). However, DisplayManager (actually
GlobalWin.DisplayManager) was cleared during disposal, so the call to
DisplayManager.UntransformPoint rightly threw an NRE. After this change, the
"real" stacktrace is still printed as always.
2020-08-11 16:11:28 +10:00
YoshiRulz 6f5028bfcf
Fix line breaks in label
see #2284
2020-08-11 13:41:45 +10:00
YoshiRulz ecfeecdb70
Make Bk2Movie type and ctor public 2020-08-11 12:36:14 +10:00
SuuperW 07d0688f45
Merge pull request #2268 from TASVideos/FixLuaMemoryReadWrite
Lua 16/32-bit read/write
2020-08-10 17:23:30 -05:00
zeromus aa49ac5cf2 change IRewindSettings to use a 'long' for buffer size, for the future. this makes math using it automatically be long. 2020-08-10 16:07:57 -04:00
zeromus 6b57c1e504 cap rewinder buffer size at 1024MiB 2020-08-10 16:07:20 -04:00
nattthebear 2feece847f
I don't understand why we're clearing the rewind buffer, but if we want to do that, just do it, and don't deallocate + reallocate many megs of ram on every loadstate (#2282) 2020-08-10 09:59:23 -05:00
alyosha-tas f08ab6dda8 GBHawk: disassemble second byte of STOP 2020-08-10 10:40:44 -04:00
zeromus 8fbd45b03f rewinder was being disabled as an approximation for clearing it when loading state while in a movie session. change it to actually just clear it (by recreating it). I decided this was safer than making the rewinder learn how to clear itself. Should fix #2280 2020-08-10 03:46:48 -04:00
nattthebear 337f71357e PCE cores - rework loading
The gods have decreed that PCECD will be PCE, so they all have to come in through the same constructor.  Fixes #2279
2020-08-09 18:00:43 -04:00
nattthebear 56e3642d5c Refactor how movie loading handles preferredCores
First of all, use a try..finally pair around the mutating calls to make it clear that Config.PreferredCores will always be rolled back, and to the correct value, after the operation is done.
Then, assume that when Movie.Core is set, we always want to prefer that core... no matter what system comes up.  Seems to fix #2259
2020-08-09 17:11:31 -04:00
nattthebear 5a0b49726e Revert "hack rom loader to keep doing the bullshit we've been doing for 8 years now, where Game.System == "GBC" results in an Emulator with a SystemID. Don't revert without volunteering to fix tasvideos"
This reverts commit 31bf9b9147.
2020-08-09 16:31:49 -04:00
adelikat 31bf9b9147 hack rom loader to keep doing the bullshit we've been doing for 8 years now, where Game.System == "GBC" results in an Emulator with a SystemID. Don't revert without volunteering to fix tasvideos 2020-08-09 15:29:41 -05:00
adelikat c844af3bbb RomLoader - remove an unused parameter in LoadOther 2020-08-09 15:15:26 -05:00
adelikat 729934aa42 unknown PCE-CD games should have PCE as the Game.System, to be consistent with the discs that can be properly identified 2020-08-09 15:11:35 -05:00
adelikat 3eca5286b5 DS - avoid allocating a byte buffer everytime a savestate is made 2020-08-09 11:47:52 -05:00
adelikat a2414f2b4e Tastudio - branches - enable multi-select and implement ability to remove multiple branches 2020-08-08 16:24:07 -05:00
nattthebear 5cbd1ed385 zwinder buffer - when saving to disk, only save what has actually been put in the buffer 2020-08-08 13:11:19 -04:00
adelikat 78b03cbdec remember to set pauseInterrupted = false, when responding to said flag. Use TasView mouse leave instead of form leave for leave logic, since form leave doesn't fire if you move your mouse too fast because winforms is bad. This fixes #2275 and #2258 2020-08-08 10:49:12 -05:00
adelikat b101df8235 Allow multiple marker selection, and multiple marker deletion, also dejunkify some hack workarounds that aren't needed anymore, and fix focus issues on input roll 2020-08-07 21:03:04 -05:00
Paul Kratt 05c5148610
Merge pull request #2277 from Sappharad/gpgx_ssfmapper
Migrate to latest MD cart mappers from GPGX upstream
2020-08-07 20:48:36 -05:00
adelikat 0818e40149 misc cleanups in client.common 2020-08-07 16:19:54 -05:00
nattthebear 25bdeb7f69 Use alloc_plain to allocate the md_cart space so it will be writable if needed
This lets us support mapper32k_w without needing extra hacks.  Because of lazystates, this doesn't hurt us on state size either (lazystates did not exists when we did 722358c1b1
2020-08-07 07:17:14 -04:00
YoshiRulz 476295ccec
Remove unused HawkFile static helpers 2020-08-07 16:30:17 +10:00
YoshiRulz e02a3d3baf
Fix double HawkFile construction 2020-08-07 16:29:09 +10:00
YoshiRulz 74bfac2359
Add missing imports to tests
fixes c4202fea2
2020-08-07 12:59:39 +10:00
YoshiRulz c4202fea2e
Fix namespaces in test project 2020-08-07 12:46:40 +10:00
adelikat 84df4141ea tastudio - bump up the default statemanager buffer settings 2020-08-06 19:25:24 -05:00
adelikat 491c5c20b6 Tastudio - fix NRE when input editing after importing a bk2 2020-08-06 13:22:11 -05:00
adelikat f2dba97197 Tasproj versioning - use constant in unit test so it doesn't fail on next version bump, when converting bk2, slap the current tasproj verison on it, converting to bk2, remove tasproj version 2020-08-06 13:15:29 -05:00
adelikat af5acb457d a few pointless refactors 2020-08-06 13:15:29 -05:00
nattthebear c32ca26790 saturnus - default ss.correct_aspect to off 2020-08-06 13:13:11 -04:00
adelikat ac139eabf2 remove byte[] SavestateBinary() from IStatable, consolidate IBinaryStatable into IStatable now that they are the same 2020-08-05 21:07:30 -05:00
adelikat a93a94aead remove some usages of SavestateBinary() with the CloneSavestate() extension method 2020-08-05 20:50:46 -05:00
adelikat 2a4cba4f7e remove option to not save SavestateHistory in .tasproj files, turns out the pre-zwinder implemetnation never exposed a way to turn this off either (except direct json editing). And it seems questionable, we have export to .bk2, clear history, auto-save options, etc if you need a historyless file 2020-08-05 20:48:08 -05:00
adelikat 296b321796 remove some unused code 2020-08-05 20:43:14 -05:00
adelikat 357d87239b
Rewrite TasStateManager (#2274)
* zwinder state manager wip

* stuff

* fixes

* slightly better defaults

* stuff

* re-delete TasStateManager - re-added by my bad rebase attempt

* add back in saving of a default.tasproj, we are a lot of refactors away from not having to do this

* Make zwinder loadstate a factory method

* progress on wiring up Zwinder to movie shenanigans

* zwinder now survives save/load

* hack for settings to exist

* fix test

* shenangians for frame 0, add some asserts to the unit test

* Add crappy impl of integrity check for zwinderstatemanager

* remove Any() from the IStateManager contract, since it should always have at least 1 state

* move ZwinderStateManagerSettings to its own file

* use NonState, it's there and I suppose this was the intent

* add a test

* don't attempt to capture states if we aren't "currentt"

* ugh

* small cleanup

* ZwinderStateManagerSettings - implement necessary copy constructor

* wire up Settings updating, get rid of Settings setter, add some documentation to IStateManager

* shenanigans to fix Savestate settings UI

* Play around with "high priority"

It's really a mess because there's no information feeding between high priority and normal priority on what captures should take place...

* this fixes the branch gap problem

* bump tasproj version to 1.1, warn user and gracefully handle loading an incompatible version

* if a movie starts from savestate, stuff the anchored state into TasStateManager instead of a frame zero state

* ZwinderBuffer - remove some unused usings

Co-authored-by: nattthebear <goyuken@gmail.com>
2020-08-05 20:39:15 -05:00
YoshiRulz fcbe8333a6
Move Comm and SaveState APIs to Client.Common 2020-08-06 00:29:50 +10:00
YoshiRulz 13ab27ca4e
Simplify API impl. instantiation 2020-08-06 00:19:08 +10:00
alyosha-tas c8b8efedac GBHawk: Fix start up time of HDMA 2020-08-04 10:14:47 -04:00
SuuperW b6f80b53dc reformat code
also fix error message (regression from commit 99141e8)
2020-08-04 04:20:00 -05:00
nattthebear 75aca0e7c6 Up the sbrk heap size for dobiestation
Guess it manages to run out with 4MB on some stuff?
2020-08-03 21:11:28 -04:00
SuuperW 99141e84bf fix: Lua multi-byte read/write operations used single-byte read/writes to the core 2020-08-03 15:44:51 -05:00
zeromus 93c3f0f217
Merge pull request #2266 from TASVideos/ps2-disque-check
Reorder the optical disk id checks
2020-08-03 16:43:15 -04:00
SuuperW 12ef0fe35b fix Lua crash (run Lua script, close Lua console, open different ROM) 2020-08-03 13:55:00 -05:00
nattthebear 8e8575ad69 Reorder the optical disk id checks
Seems like PS2 games have an appId of PLAYSTATION sometimes, so move the SYSTEM.CNF;1 check first
2020-08-03 12:14:59 -04:00
YoshiRulz 166c50b6cf
Finish implementing WebSockets
fixes dbcd6b5b6
2020-08-03 14:30:50 +10:00
David Ackroyd dbcd6b5b68
Add WebSocket support; wraps BCL ClientWebSocket (squashed PR #2237)
Co-authored-by: David Ackroyd <davidackroydmusic@gmail.com>
2020-08-03 13:11:29 +10:00
SuuperW 22d78efabd fix separator bug in RAMWatch 2020-08-02 17:13:32 -05:00
SuuperW 9af25f7180 rename NdsSettings to NdsSyncSettings, since that's what it is 2020-08-02 14:06:38 -05:00
SuuperW 2c0fa143c1 fix: attempting to change current movie's GreenzoneSettings would actually change the defaults 2020-08-02 10:40:12 -05:00
adelikat 8531a292bc rip out Savestate History settings form and reuse the default settings form instead 2020-08-01 17:30:50 -05:00
adelikat 07429a4640 Tastudio - rework DefaultGrezoneSettings to only depend on a settings object and a savecallback 2020-08-01 17:19:30 -05:00
adelikat 3da1df9252 Tastudio -more shenanigans to fix bk2 loading, fixes #2255 2020-08-01 13:43:29 -05:00
alyosha-tas 2499c9b872 GBHawk: update Kirby tilt n- tumble controls 2020-08-01 14:31:08 -04:00
adelikat e525d512f8 lua - fix NRE when when movie.mode() is called with no movie active, fixes #2262 2020-08-01 13:24:10 -05:00
nattthebear 96bee60cda nyma -- only ask the frontend for firmwares the core actually requests
Fixes #2240
2020-08-01 09:16:01 -04:00
nattthebear 78bf2285fc
Waterbox: Add pseudo-thread implementation and experimental DobieStation (PS2) core (#2263)
Waterbox supports threads now, but they're not real threads on the host side because that's complicated and can be nondeterministic. Instead, everything is scheduled to share one host thread. This means that scheduling is actually cooperative and certain patterns of spinlocks and other nonsense can fail to work at all, but "regular" code probably will.

With this, add DobieStation PS2 core. This core was selected because it has threads and is otherwise simple to port; easy to build and a good core/frontend separation. It's not a wonderful core however, with low speed (made abysmally lower by our lack of real threads) and low compatibility, so it remains a curiosity for now.
2020-08-01 07:03:29 -04:00
YoshiRulz f6edd02195
More cleanup of VersionInfo code gen 2020-08-01 17:48:27 +10:00
YoshiRulz e5de63ea94
Cleanup VersionInfo and code gen 2020-08-01 11:57:14 +10:00
YoshiRulz ebd9645c1e
Cleanup assembly attributes
We're not using this metadata for anything, except one [InternalsVisibleTo] for
unit tests, and a half-assed version check in EmuHawk.Program.
2020-08-01 11:56:30 +10:00
alyosha-tas 9fc8db14c3 Vectrex: fix controls (Hyperchase) 2020-07-31 21:24:58 -04:00
YoshiRulz 00b67f4156
Remove unused prop from a MainForm interface
fixes 62537118a
2020-07-31 16:22:02 +10:00
YoshiRulz b77cd9a7bf
Remove IEmuClientApi.RunningSystem from the API
other code in EmuClientApi (the impl.) uses this prop, so it's staying for now
2020-07-31 16:17:02 +10:00
alyosha-tas 9b5997cf7f GBHawk: fix behaviour of writing to LY reg, fixes Zen console verificaiton 2020-07-29 18:29:26 -04:00
YoshiRulz a54b9acba2
Pass in globals to Throttle and UpdateChecker 2020-07-29 08:55:56 +10:00
YoshiRulz fbb38d61fd
Use a DLIR for Mupen core and plugins
AttachPlugin still returns IntPtr (thanks to reflection hack) so the code for
audio/input/video is unaffected
2020-07-28 20:29:02 +10:00
YoshiRulz 771621e0c9
Teach DLIR that dirs are not files on Unix
even though everything is a file
2020-07-28 20:28:46 +10:00
YoshiRulz b6f4344592
Pass lib path from run script as env. var and read it in DLIR
It's always set by the run script, but I've added a fallback in case someone
hardcodes the mono command in a .desktop or something
2020-07-28 18:15:37 +10:00
YoshiRulz 34d56ca555
Update search paths order for DLIR on Unix and add mupen lib dir 2020-07-28 17:54:54 +10:00
YoshiRulz 75e815f09e
A little cleanup of DLIR 2020-07-28 17:53:28 +10:00
SuuperW ae667eca29 optimizations and a bug fix 2020-07-27 15:47:49 -05:00
SuuperW c7c4a08cfd Further refactoring of state decay.
Also, use a larger zeros array size. 16 is pathetic. Probably should go even higher than this.
2020-07-27 15:47:42 -05:00
SuuperW 10dd5b746c refactor StateManagerDecay to not use goto, and remove the unused align
(Align didn't seem to make any sense, it was just weighting priority less towards the current frame. Perhaps helpful in some situations, but I don't think enough so to justify complicating the decay algorithm. Either way it was a misnomer and I don't know what there is to align to.)
2020-07-27 15:43:47 -05:00
SuuperW 60cc8d944f Merge branch 'master' of https://github.com/TASVideos/BizHawk 2020-07-27 10:43:46 -05:00
SuuperW a868cd5f5c fix TAStudio state gap 2020-07-27 10:43:20 -05:00
nattthebear 0d3b26ead9 Re-refix gpgx loading
Pier solar needs the rom and the cd

This reverts commit 503469e4e0.
2020-07-27 08:10:00 -04:00
zeromus 503469e4e0 fix oopsie loading cds in gpgx after recent romloader cleanups. fixes #2252 2020-07-27 00:57:51 -04:00
nattthebear 2cdc978e2f rework mgba callbacks to not be global junks 2020-07-26 15:36:29 -04:00
nattthebear 9339c02b82 emergency containment on bad code 2020-07-26 15:11:29 -04:00
nattthebear 105250f60d wow that was hard 2020-07-26 15:06:44 -04:00
adelikat 98da2ebb85 fix loading of bk2 and tasproj files from tastudio menu items 2020-07-26 12:47:46 -05:00
YoshiRulz d8a92af617
Move Comm and Input Lua libraries to Client.Common 2020-07-26 05:38:55 +10:00
YoshiRulz 2b50f4f112
Cleanup ApiContainer 2020-07-26 05:34:58 +10:00
YoshiRulz 911cb096de
Merge ApiContainer and ApiSubsetContainer
(also merge DelegatingLuaLibrary and DelegatingLuaLibraryEmu)
Not sure why this wasn't done earlier, there doesn't seem to be any technical
roadblocks. The contract of the API provider requires an implementation for
IEmuClientApi et al. so they (all 15 interfaces) are free to be used from
Client.Common.
2020-07-26 05:29:04 +10:00
YoshiRulz 1fa7395e20
Screw around with networking helper init 2020-07-26 05:15:56 +10:00
YoshiRulz 1912851186
Expose networking classes in CommApi, delegate its Lua ver. to ApiHawk
HttpTest/HttpTestGet in the .NET API now return null instead of throwing (Lua
still throws)
2020-07-26 05:03:58 +10:00
YoshiRulz da5f76967f
Inline TestGet 2020-07-26 05:01:58 +10:00
YoshiRulz a931d75143
Add string overload for WriteToFile
and also use UTF-8 instead of ASCII to match reads -_-
2020-07-26 04:45:59 +10:00
YoshiRulz b7eb90f990
Add public prop for setting IP+port simultaneously 2020-07-26 04:34:06 +10:00
YoshiRulz 6acf4ae6fb
Tiny ToolManager.Load cleanup 2 electric boogaloo
see 2d6bac879, 7c3ccd664
2020-07-26 03:49:59 +10:00
adelikat 1f6ead6354 now that restore is on mouse up instead of mouse down, we need to auto-unpause the emulator (if it were paused before editing input) on mouse up instead of mouse down. Mouse down was causing unpausing while painting which caused input to be added without invalidating greenzone. This code introduces unpausing as long as there is not a need to invalidate (if the user only painted down). If the user paints up beyond the original mouse down event it will invalidate and seek to the original mouse down frame and pause. 2020-07-25 10:42:07 -05:00
adelikat 7c3ccd6646 Revert "Tiny ToolManager.Load cleanup"
This reverts commit 2d6bac8798.
2020-07-25 09:26:47 -05:00
adelikat 4a6b3e407a TasMovie - InvalidateAfter - flag changes if Lag OR States were invalidated, increment rerecords on only on state invalidation not lag validation, this may address 2168 2020-07-25 09:09:43 -05:00
adelikat 4439310250 remove unused method 2020-07-25 08:39:40 -05:00
zeromus fd30826655 experimental ffmpeg downloading: in place of the ffmpeg encode settings is a download form. This downloads it to the prescribed local location. It then checks to make sure it is the EXACT required version -- the only version we support 2020-07-24 22:25:00 -04:00
zeromus b24a4ecc09 rename to FFmpegService 2020-07-24 22:25:00 -04:00
zeromus dd01c26c92 move FFmpeg sources to FFmpeg service 2020-07-24 22:25:00 -04:00
zeromus 72ad0d8d74 copy DiscDecoding.cs to FFmpegService.cs in another project 2020-07-24 22:24:59 -04:00
YoshiRulz 2d6bac8798
Tiny ToolManager.Load cleanup 2020-07-25 08:44:50 +10:00
YoshiRulz 0fc3ac2105
Don't need this anymore
no idea when that happened sorry
2020-07-25 08:30:15 +10:00
adelikat b0c76f28ca PCETileViewer - remove unnecessary load event 2020-07-24 14:50:01 -05:00
adelikat 0ed95429cb simplify some closing closing logic in some tools 2020-07-24 14:36:34 -05:00
adelikat 4f2bf8071e fix a few tools I missed in previous commit 2020-07-24 14:32:29 -05:00
adelikat e7e5ebfa90 have tool manager automatically add a Close button to any tool with a File menu, removes a lot of boilerplate from tools, also gives consistency, since half the tools had Close, half had Exit and not all had the shortcut display string 2020-07-24 14:21:53 -05:00
adelikat d67f97c4e1 Tasutido - slight simplification 2020-07-24 13:20:24 -05:00
adelikat a51eba88da move some repetitive logic from tools to the RollColumns class 2020-07-24 13:17:03 -05:00
adelikat 4a3e2113af convert RamSearch to IToolFormAutoConfig 2020-07-24 12:29:26 -05:00
adelikat f1a9ba7a08 Ram Search - watch options and settings menu item names 2020-07-24 12:11:34 -05:00
adelikat c26659187e convert RamWatch to IToolFormAutoconfig 2020-07-24 12:03:23 -05:00
adelikat 42864977cb Convert cheats tool to use IToolFormAutoConfig 2020-07-24 11:52:44 -05:00
David Ackroyd a416841770
clone x times (#2242)
* tasstudio: clone sequence of inputs x times

* extend frameprompt so that you can put in a custom messagfe

* making FramesPrompt designer compatible
2020-07-24 10:18:15 -05:00
YoshiRulz e36098becf
A little dedup 2020-07-24 13:33:12 +10:00
adelikat 39424891b4 virtualpads - add another constructor overload to simplify schema classes more 2020-07-23 17:42:36 -05:00
adelikat 6b921c91fb remove another unused image 2020-07-23 17:09:04 -05:00
adelikat 35d3a7e716 Ram Search - fix typo in menu Option "Always Exclude From Ram Search" to "Always Exclude From Ram Watch" 2020-07-23 17:06:28 -05:00
adelikat d6be73f395 silly that visual studio rename doesn't save changes on open files, add a bunch of non-saved things, also consolidate two refresh images into 1 2020-07-23 16:55:51 -05:00
adelikat ed8912db92 rename and reorg stuff in Resources.cs 2020-07-23 16:51:29 -05:00
adelikat bda8a5ed4e implement SGX virtual pads 2020-07-23 16:35:09 -05:00
adelikat a1c6092de1 c64 virtualpad - fix a few keyboard buttons that were not mapped to a key 2020-07-23 16:32:57 -05:00
adelikat 34da24933a remove more unused images, start using c64 symbol on c64 virtualpad 2020-07-23 16:32:57 -05:00
nattthebear 1c606c1eb6 waterbox - expose read-only information about the guest memory page table 2020-07-23 16:08:24 -04:00
adelikat e778e5248d remove a bunch of unused images that we don't intend to use, make lua console menu item image consistent wtih the dialog image 2020-07-23 14:56:48 -05:00
adelikat 4d24b0bcf0 remove some unused usings 2020-07-23 14:25:39 -05:00
adelikat ae6d512e11 durp 2020-07-22 16:31:52 -05:00
adelikat 5dd65c0ee8 add an osd message when a rewinder is created 2020-07-22 16:24:25 -05:00
YoshiRulz 966a2abe3f
Call base.Dispose to banish warning 2020-07-22 06:34:32 +10:00
nattthebear 85be93c9d2 What was this?
Apparently we had random crashes in savestate on waterbox since some recent dev commit woops my bad
2020-07-21 15:43:28 -04:00
YoshiRulz 6371766130
Remove redundant semicolon 2020-07-20 23:42:42 +10:00
YoshiRulz 86e82b97c1
Cleanup internals of comms APIs 2020-07-20 23:42:35 +10:00
adelikat d94ce80eaa Tastudio - gracefully fallback to a new tasproj when attempting to load a .tasproj from another core 2020-07-19 16:47:54 -05:00
adelikat 1162e89675 a slight hack to fix Tastudio when loading a different rom while it is open 2020-07-19 15:09:26 -05:00
adelikat ffd255bb8e on tool restart, update base properties (particularly needs the Game property to update) 2020-07-19 14:50:05 -05:00
adelikat 4e6d190d48 Tastudio - check MainForm.GameIsClosing in a better place 2020-07-19 14:26:49 -05:00
adelikat b6cfb9aab7 remove restarting of trace loger in CloseGame, the ToolManager handles this logic just fine 2020-07-19 14:05:46 -05:00
adelikat f7f6839e6c fix NRE of Trace Logger close, if the Trace Logger was not used before closing 2020-07-19 13:56:27 -05:00
adelikat ddbeabf198 Tastudio - pointless refactors 2020-07-19 13:30:07 -05:00
YoshiRulz 86829751aa
Scale VirtualPadAnalogStick correctly when the range isn't ~256 values 2020-07-20 03:18:49 +10:00
adelikat f6273f2f92 Virtualpads - flip the read-only flag when a movie changes from read-only to another mode 2020-07-19 11:12:38 -05:00
alyosha-tas 77a958af8e O2: fix mousing cat (timer divider was wrong) 2020-07-18 17:04:24 -04:00
adelikat 74a57c320e Saturn Virtual pads - fix L/R 3d controller values 2020-07-18 13:36:31 -05:00
adelikat 59661fea86 Tastudio - fix "New" menu item broken by last commit 2020-07-18 13:26:21 -05:00
adelikat 0925997557 have Tastudio control RebootCore when it is open, fixes #2201 2020-07-18 10:24:46 -05:00
alyosha-tas d8056b3deb Move code to avoid NRE 2020-07-14 19:18:59 -04:00
adelikat 219b33732c make TasMovie Emulator null check a bit clearer as to what is going on 2020-07-14 17:47:22 -05:00
adelikat 7040eca741 tastudio - simplify image setting 2020-07-14 17:43:31 -05:00
alyosha-tas 6f461c715d TAStudio: Fix #2191 with a null check 2020-07-14 17:02:52 -04:00
adelikat 5515e9fea7 Tastudio - add some paranoia checks when drawing markers and branches. This happened one time while debugging and I couldn't reproduce, but it is possible the controls might need be told to redraw while still rebooting the core, in which case there is no TasMovie to read from yet, so check for null 2020-07-13 19:39:29 -05:00
adelikat 946ff45608 Tastudio - just print "File saved" instead of the filename since it is redundant to the Title which has the filename, and it overlaps other text in the status bar, fixes #2142 2020-07-13 19:15:30 -05:00
nattthebear 175556529e waterboxhost refactor
Set up a second mirror of guest memory; easily accomplished because we were already using memfd_create / CreateFileMappingW.
This lets us simplify a lot of host code that has to access guest memory that may not be active right now, or might have been mprotect()ed to something weird.  Activate is only needed now to run guest code, or when the C# side wants to peer into guest memory for memory domains and such (waterboxhost does not share the mirror address with the C# side).
2020-07-13 19:38:29 -04:00
adelikat 40e19e64fe oops 2020-07-13 17:25:16 -05:00
adelikat b87f976c39 remove some unused usings 2020-07-13 15:01:14 -05:00
adelikat 6a3b014fe3 make a thing readonly 2020-07-13 12:06:48 -05:00
nattthebear 59be09b515 Make picodrive work again
All picodrive games were broken by 316a9d1568
2020-07-13 06:16:16 -04:00
nattthebear 5a1b5915bf Fix compiling on ancient compilers, and add a global.json which restricts bizhawk to ancient compilers 2020-07-12 17:24:12 -04:00
nattthebear 570f17cedd Bit more W65816 disassembler cleanup 2020-07-12 17:14:47 -04:00
adelikat 316a9d1568 gamedb - replace pico with picodrive, remove core name look up in romloader in favor of this pico change combined with a case insensitive compare 2020-07-12 16:10:01 -05:00
adelikat b22a1070a4 W65816 Disassembler - assign ibuf to null, so it compiles 2020-07-12 16:06:45 -05:00
adelikat ed9b7b3eb1 Lua address several memory leaks - when a script stops, take any registered functions and spawn new threads for them to execute, and regularly dispose them. Also, the main lua thread needs to have scheduled disposes run on it, even if there is no active scripts (it was being run as part of disposing individual scripts, needs refactoring). All of this fixes #1920 2020-07-12 15:48:50 -05:00
nattthebear 9278c526d0 fix a few compiler warnings 2020-07-12 16:02:26 -04:00
adelikat 1e3324cfab Registered Lua Functions dialog - update when a lua script unregisters a file, make dupating more robust to catch other possible scenarios where it failed to update 2020-07-12 13:19:48 -05:00
adelikat c4bcb2451a remove now unused class in RomLoader.cs 2020-07-12 13:03:32 -05:00
adelikat 05709628e8 remove a jillion unused usings in RomLoader.cs 2020-07-12 13:02:12 -05:00
adelikat 40ad7ed67e Lua - account for callbacks with no parent script creating more callbacks by generating a mock lua file with a new thread, and register the thread with the sandbox. Fixes #1983. Not super proud of this. 2020-07-12 12:58:43 -05:00
nattthebear 021b1639c2 Remove special code for UnsupportedGameException in RomLoader
This shouldn't be needed anymore
2020-07-12 13:48:46 -04:00
nattthebear 78bbc75f33 multi rom loading by xml all uses core inventory now 2020-07-12 13:45:33 -04:00
nattthebear 8d56b65734 Convert all single-CD loading to use CoreInventory 2020-07-12 13:21:10 -04:00
nattthebear ab07e67a07 PCEHawk: Use CoreLoadParameters for cd mode 2020-07-12 13:06:15 -04:00
nattthebear 744a9a97d0 Remove custom loader code for ChannelF 2020-07-12 12:54:36 -04:00
nattthebear 5c5ffed5ff Next piece of the puzzle
This probably breaks something.  I am sorry, grab me and I'll fix it
2020-07-12 12:52:27 -04:00
adelikat 33a0954087 lua console - fix recent scripts not updating when creating a new script, opening a script, or duplicating a script. Might be other scenarios that are currently missing (regression from some refactors about a month ago) 2020-07-12 11:12:29 -05:00
nattthebear 4ad89667d6 This will get simpler I promise 2020-07-12 11:37:06 -04:00
nattthebear 6f218ff20b Remove a benign null reference exception
This was in a try catch so you got the null you needed anyway, but it could be confusing to see in a debugger report
2020-07-12 11:10:57 -04:00
alyosha-tas 06fa96e335 O2: finish g7400 graphics set 2020-07-12 10:44:11 -04:00
nattthebear 81d0b4ec9e Revert "Replace dynamic type w/ casts in CoreInventory/CLP"
This reverts commit 9ee4821148.

# Conflicts:
#	src/BizHawk.Emulation.Cores/CoreLoadParameters.cs

This didn't actually work, so revisit later
2020-07-12 10:18:08 -04:00
nattthebear f41a70ef32 swish swish 2020-07-12 09:06:20 -04:00
alyosha-tas f5efbff1d3 O2: more g7400 work 2020-07-12 09:03:28 -04:00
nattthebear 9072614dfb romloader cleanup 2020-07-12 08:09:50 -04:00
nattthebear dc8615ca06 fix compile, sorry sorry 2020-07-12 07:36:06 -04:00
nattthebear 80793836d3 Use CoreLoadParameters on dual gambatte 2020-07-12 07:28:06 -04:00