Commit Graph

1013 Commits

Author SHA1 Message Date
alyosha-tas 35fdec2132 Use a forward slash instead. the file name will display incorrect (as Movie/name) when first loaded, but at least it's in the right place. 2020-07-03 17:40:52 -04:00
alyosha-tas 53b61d9cfa TAStudio: add trailing slash so loading a bk2 multiple times properly puts the file in the movies folder 2020-07-03 17:05:07 -04:00
alyosha-tas 32031d0f67 Atari 7800: support serpentine 2020-07-03 16:07:26 -04:00
adelikat ce0a529362 pass InputManager dependencies to more virtualpad controls 2020-07-03 14:50:57 -05:00
adelikat 2be1d04182 cleanup ToolStripEx 2020-07-03 14:29:48 -05:00
adelikat 728a946470 pass InputManager to tools, remove other usages of GlobalWin in various tools 2020-07-03 14:26:08 -05:00
adelikat 20a1a49851 remove unnecessary usage of GlobalWin.Emulator (instance was already being passed in) 2020-07-03 13:34:17 -05:00
adelikat 8bb055b392 FilePreferences config - fix message when clicking ok, reduce dependency from the entire config file to the only object it sets, remove usage of GlobalWin 2020-07-03 13:31:47 -05:00
adelikat 7ab20f5667 mainform - a few simplifications 2020-07-03 13:10:48 -05:00
adelikat c681be033d rename an interface 2020-07-03 12:59:10 -05:00
nattthebear 2ee3125724 Refactor gpgx init method to use fewer arguments
Upcoming waterbox changes will likely limit the number of arguments a function can take to 6, which should be enough for anybody
2020-07-03 13:24:54 -04:00
adelikat c64eff6baf reorg controller and input adapter classes 2020-07-03 11:54:10 -05:00
adelikat 6db1d7e61d cleanups 2020-07-03 11:39:50 -05:00
adelikat d9e563a655 simplify setting the font style of a ToolStripMenuItemEx 2020-07-03 11:08:48 -05:00
adelikat 715e457a4e Mainform - property wrapper for GlobalWin.OSD 2020-07-03 11:08:48 -05:00
adelikat 910c37d434 move some logic from mainform to InputManager 2020-07-03 11:08:48 -05:00
adelikat a3c586b480 mainform - use InputManager property instead of GlobalWin reference 2020-07-03 11:08:48 -05:00
nattthebear 42ceba7d21 Fix linux waterbox
Sorry about that -- some things were removed but not others to go with them.  It had been working before.
2020-07-03 12:02:11 -04:00
nattthebear 2c2ed72dc6 Remove some unused variables
Leftovers from a zwinder refactor
2020-07-03 11:48:51 -04:00
nattthebear fa5885d7a1
Rewrite WaterboxHost in rust. (#2190)
This replaces the old managed one.  The only direct effect of this is to fix some hard to reproduce crashes in bsnes.

In the long run, we'll use this new code to help build more waterbox features.
2020-07-03 11:45:59 -04:00
adelikat 374964bfb0 a few mainform simplifications 2020-07-03 10:07:56 -05:00
alyosha-tas e3afead876 SubGBHawk: have TotalExecutedCycles reflect run time 2020-07-03 10:40:17 -04:00
nattthebear 2f18ad5be1 Defer deserialization of core config
That was simple.  No config file change either.  Doesn't seem to have a noticeable effect on startup speed, but it's not any slower, and we're more resilient to core changes now.
2020-07-03 05:54:01 -04:00
adelikat eede99a505 simplify a few mainform methods with the ToClipBoard() extension method 2020-07-02 17:26:09 -05:00
alyosha-tas b09b9681e2 TAStudio: don't jump to greenzone on single mouse click of analog cell (this is not an edit event.) 2020-07-02 17:46:21 -04:00
adelikat be2ba08c10 remove unused method 2020-07-02 13:30:28 -05:00
adelikat 82ae83919a Lua Console - cleanup 2020-07-02 12:57:02 -05:00
adelikat fbbe3b6e40 LuaConsole - bump message count max to 100, clear count after using the command input box on the console 2020-07-02 12:33:41 -05:00
adelikat bb7f933429 Lua - refactor console logging to use a string builder to concat messages, reduces the actual call to the console to 1 call, greatly improving performance (less calls to scrolling and other methods that invoke drawing) 2020-07-02 12:29:37 -05:00
adelikat 8e79f0d5e2 LuaConsole - warn when message cap has been reached 2020-07-02 12:15:02 -05:00
adelikat ee263fbfbf LuaConsole - simplify WriteToOutputWindow some 2020-07-02 12:10:15 -05:00
adelikat 12897bb00d default to TurboNyma instead of PCEHawk - fixes #2122 2020-07-02 09:09:00 -05:00
adelikat d60e5dc1a2 change View Log Window menu item to Open Log Window, with some different styling, fixes #2110 2020-07-02 08:56:16 -05:00
adelikat a1278df02e add icon to MacroInput 2020-07-02 08:40:03 -05:00
adelikat 21823196fc
Add some menu "Ex" controls (#2187)
* add MenuItemEx and StatusLabelEx and use in MainForm

* use ToolStripMenuItemEx

* use ToolStripSeparatorEx

* fix toolbox sizing
2020-07-02 08:35:15 -05:00
YoshiRulz 1360210331
This was flooding stdout in Release builds 2020-07-02 10:08:26 +10:00
YoshiRulz 4f9d9d29ef
Fix NRE on clicking RecordMovie's browse button (fixes #2185) 2020-07-02 10:05:55 +10:00
zeromus ffabb48f07 remove TopMost from commondialogs (OpenFileDialog, etc.). Fixes #2182 but it is unclear what this was intended to fix in the first place. please gather more information 2020-07-01 14:18:09 -04:00
adelikat edc31793cf StatusStripEx, ToolStripEx - lock down size and text properties 2020-07-01 13:13:24 -05:00
adelikat bf03f3861a ToolStripEx - don't have a size option (toolstrips flow), or location (they are always 0,0) 2020-07-01 13:04:08 -05:00
adelikat 52f2596492 Move ToolStripEx to WinForms.Controls, break into separate files, add namespaces, make ClickThrough built in instead of an option (if the functionality isn't desired just use the original class) 2020-07-01 12:55:21 -05:00
YoshiRulz 07c6063da1
Slightly change execution order in MainForm ctor (fixes #2184) 2020-07-01 19:10:34 +10:00
adelikat 498ba66e8c Revert "cleanup some icon images by removing some unnecessary resolutions (large images and low bit images)"
This reverts commit b40812798b.
2020-06-30 18:08:09 -05:00
adelikat 5ef46b9969 log window icon 2020-06-30 18:08:09 -05:00
nattthebear 6e938718f5 bizinvoker - fix a bug that caused the CLR to reject any [BizInvoke, Compatibility = false] method with a string parameter in any position except the first
According to the rules (which are hard to find), there must be nothing on the evaluation stack when localloc is called (except its own size parameter).  The generated string interop code didn't respect that.  This didn't cause any problems in existing code.
2020-06-30 17:56:11 -04:00
adelikat ef311576ee Use LastInputColor config value instead of hardcoded color 2020-06-30 16:40:00 -05:00
adelikat e5bbec1800
Message Config - Simplify code and some cleanup (#2183)
* move messageConfig to its own folder

* start MessageEdit user control

* more setup

* wire stuff up

* progress

* progress

* fixes and cleanup

* start mesage row component

* move method from MessageConfig to extension method

* MessageRow - progress

* progress

* Message row - progress

* progress

* fix initial load

* fix Restore btn

* use RadioButtonEx

* start ColorRow user control

* progress

* progress

* progress

* rename

* make color picker work

* cleanup

* cleanup

* Message config - don't immediate set config values on restore defaults, allow user to press ok or cancel to decide to actually save

* cleanup

* cleanup
2020-06-30 16:16:54 -05:00
alyosha-tas 7aa1a497f7 GBHawk: only latch new window y value if greater then current line (fixes pokemon crystal artifact) 2020-06-30 17:15:00 -04:00
YoshiRulz dddeab8e12
Refactor UndoHistory 2020-06-30 14:25:02 +10:00
YoshiRulz 05eaf2cfb7
Fix wrapping of 2 labels in DisplayConfig
fixes 64d14a7f9
2020-06-30 13:20:39 +10:00
YoshiRulz cba0eada69
More nullability 2020-06-30 12:57:57 +10:00
YoshiRulz 52203314ca
Misc. style fixes 2020-06-30 11:32:52 +10:00
YoshiRulz 62537118ac Add GetPanelNativeSize() to DisplayManager
not really that helpful, but removes the annoying dependency on
PresentationPanel from IEmuHawkMainForm (ready for move to Client.Common)
2020-06-30 11:02:17 +10:00
YoshiRulz 962ac0d9d4 Extract interface from MainForm 2020-06-30 11:02:17 +10:00
YoshiRulz e3c54b2268 Change some MainForm event handlers to delegate typed properties
makes encapsulation easier
2020-06-30 11:02:17 +10:00
nattthebear 499b59a0bd zwinder refactoring
Looks like a big diff, but isn't.  It separates the zwinder buffer part (which does most of the work) with the rewinder impl on top of it.  This is part of the effort for a zwinderstatemanager for tastudio, which isn't done yet, but these changes can come in just fine
2020-06-29 15:55:53 -04:00
adelikat ed49e58489 remove some references to multitrack in some comments 2020-06-29 10:37:05 -05:00
adelikat 452611477b delete multitrack message position config values, and message config ui, also reposition thingsin message config and fix some positioining, hence designer barf 2020-06-29 10:32:04 -05:00
scrimpeh 1c82340cac ram search - fix loading of wch files 2020-06-29 09:01:33 -05:00
adelikat 64d14a7f92 mass replace System.Forms.Label with LocLabelEx 2020-06-29 09:00:05 -05:00
adelikat 80599ddbe8 BatchRun - use LabelLocEx 2020-06-29 09:00:05 -05:00
YoshiRulz 141541bc1f
Pass delegates instead of MainForm to RewindConfig 2020-06-29 14:47:53 +10:00
YoshiRulz e4df38602b
Pass delegates instead of MainForm to BatchRunner 2020-06-29 14:47:51 +10:00
YoshiRulz c0aefd438a
Pass delegates instead of MainForm to OpenAdvancedChooser 2020-06-29 14:47:44 +10:00
YoshiRulz 4f4a875382
Pass delegates instead of MainForm to EmuHawkOptions 2020-06-29 14:47:42 +10:00
adelikat b40812798b cleanup some icon images by removing some unnecessary resolutions (large images and low bit images) 2020-06-28 15:11:02 -05:00
adelikat 3c9a7ff7a5 Multidisk bundler - use LocLabelEx 2020-06-28 13:29:38 -05:00
scrimpeh 286b56de5a ram search - pr fixes. also remove out of range searches in ramsearch
- adds a static IsValid method to IMiniWatch implementations
- reverts .csproj changes
- 'remove out of range' button on ram search didn't seem to actually do anything. this was fixed
2020-06-28 12:29:49 -05:00
scrimpeh c8ca09724c ram watch - fix two minor bugs
fixes two minor bugs relating to ram watch display type

1.binary display was broken on 32 bit watches
2.changing a watch's size to one with an incompatible display type resulted in an exception (e.g. 32 bit float -> 8 bit unsigned)
2020-06-28 12:29:49 -05:00
scrimpeh f9e174fd2d ram search - incorporate domain checking 2020-06-28 12:29:49 -05:00
scrimpeh 1721e4f9ea ram watch - add IsValid method 2020-06-28 12:29:49 -05:00
adelikat cacf04f8ca N64pluginConfig - replace Label wtih LocLabelEx 2020-06-28 09:04:16 -05:00
adelikat 4d53efcf85 N64 plugin config - use property grid in video plugin tabs 2020-06-28 09:04:16 -05:00
adelikat ff4eda68c8 N64 plugin config - remove use of GameInfo that was nonsense. It was setting per game hacks to GameInfo settings if enabled, but these values are already overridden on RomLoad, so this code was doing nothing 2020-06-28 09:04:16 -05:00
zeromus bc0849ad9d add a path entry for libretro ROM, even though it doesn't make sense, because it just isn't worth making sure every consumer of the ROM path is prepared for the possibility that ROM may be missing. This fixes #2176, but there's any number of other settings we could choose. 2020-06-27 22:32:51 -04:00
YoshiRulz 4f7c1a0b76
Enable nullability in AxisSpec and related types 2020-06-26 15:03:28 +10:00
YoshiRulz d0f96339ce
Fix reboot.png; no clue what was wrong but the warning is gone
for reference, I converted it to .bmp and back w/ ImageMagick
the warning was to stderr and it read `libpng warning: sRGB: cHRM chunk does not
match sRGB`
2020-06-26 14:45:33 +10:00
YoshiRulz 69146b04b2
Add and use DEBUG-conditional WriteLine methods 2020-06-26 14:37:36 +10:00
diddily 46e744cd33
Catch and retry when DirectSound crashes (squashed PR #2166, fixes #1212)
* Handling for BufferLost
Fixes issue #1212 where adding/removing headphones would lead to a crash by restoring the sound device when it's detected and being defensive with exception handling.

* Internalize the handling of buffer lost and make it a bit more efficient.
Remove interface function for SoundLost and move the logic to soley live inside DirectSoundOutput. Additionally I discovered I did not need to tear down the entire device to restore sound, typically Restore() and Play() handle it. Still need to wrap every place that can throw an exception in a try/catch block and wait for WriteSamples to handle it.

* Update DirectSoundSoundOutput.cs
Logic is hard.

* Retry limiter added to recovery
Added a self reducing retry counter that will try to start sound 5 -> 4 -> 3 -> 2 -> 1 times each time it tries to recover until it succeeds, at which point the counter returns to 5. This allows for quicker attempts at recovery without the risk of an infinite loop or terrible performance from sleeping 10 ms.
2020-06-26 11:56:27 +10:00
adelikat 312f029b0b Ram Watch - user LocLabelEx 2020-06-25 18:13:08 -05:00
YoshiRulz 3d8ed7483f
Move axis types to own files 2020-06-26 09:00:33 +10:00
YoshiRulz a0c8f722d2
Use constraints for grouping, add new class for unconstrained pairs
e.g. for Intellivision `_controllerDeck.Definition.Axes["P1 Disc X"].PairedAxis`
gives "P1 Disc Y"
2020-06-26 08:53:10 +10:00
YoshiRulz 1e67fc1d4b
Use inheritance for AxisConstraints 2020-06-26 08:43:17 +10:00
YoshiRulz 15906af6e4 Merge AxisRange into AxisSpec
was going to move only Mid but this made more sense
2020-06-26 08:08:58 +10:00
YoshiRulz 6cb60aa9fd Merge AxisControls, AxisRanges, and AxisConstraints into a single dict 2020-06-26 08:08:58 +10:00
adelikat af2649d9a0 move icon references in designer files to the main files before the designer eats them 2020-06-25 16:32:29 -05:00
adelikat 09a6f54735 add icon back to LogWindow AddToDatabase button, that got eaten by the designer at some point 2020-06-25 09:40:19 -05:00
adelikat 39535eacda RomStatus picker - remove image setting out of designer before it gets eaten by a designer based change 2020-06-25 09:18:33 -05:00
adelikat 371a7bd4f3 use MainForm.thing instead of GlobalWin.thing in some places, this is marginally better, maybe 2020-06-25 08:52:53 -05:00
alyosha-tas 49cb426a59 GBHawk: Double speed mode timing fix 2020-06-24 17:17:46 -04:00
scrimpeh 85d140c4b5 ram watch: allow duplicate identical ram watches
Allows duplicating identical Ram Watches. Previously, the Duplicate Watch dialog would silently discard a new watch if the address didn't change. As a side effect, multiple watches can now be duplicated simulatenously. This commit also removes the check for separate memory domains - it doesn't seem to cause any problems
2020-06-23 11:55:37 -05:00
scrimpeh d6994ea1af ram watch: watches are deleted by index
If you have two watches with an identical address, deleting one will always delete the first one. This commit fixes that
2020-06-23 11:55:37 -05:00
adelikat c13430896f remove empty controller mappings from defctrl, also remove duplicates that caused it to be invalid json (.net happily was deserilizing it anyway), don't save empty mappings when saving from the ui 2020-06-22 19:54:36 -05:00
adelikat 93c47b87b9 Controller config - take label width into account when generating columns 2020-06-22 18:11:31 -05:00
nattthebear 1ce0905deb Minor zwinder tweaks
Change the implementation of state eviction slightly.  The result is identical, but this is slightly easier to understand and will be needed to allow an evicted state to be read before eviction.
2020-06-22 18:52:18 -04:00
adelikat b9f59337dd fix Saturn and NGP default controls 2020-06-21 17:31:28 -05:00
adelikat 29a492fc2a fix pc-fx controller name to match old name 2020-06-21 17:22:00 -05:00
nattthebear 53c2318b56 nyma - activate controller deck names 2020-06-21 16:55:41 -04:00
adelikat cf4a0176a3 bk2 mnemonic lookups - we have a lot of keyboards now, make fkeys standard mnemonics instead of core specific 2020-06-21 15:32:45 -05:00
nattthebear ae9405fb84 saturn: autofire blah blah again 2020-06-21 16:14:50 -04:00
YoshiRulz 31e621d64e
Move init of form icons to ctor (from InitializeComponent)
tested the `global::` syntax on VS2019, the Designer refuses to cooperate
2020-06-22 06:06:59 +10:00
adelikat 03d7fc2498 Saturn virtualpad work 2020-06-21 14:51:22 -05:00
zeromus 2a4ac1f7e1 display manager: fix "use 1:1 pixel size" aspect ratio (re #2159) 2020-06-21 15:27:51 -04:00
adelikat c76515d7f7 Saturn - fix virtualpad logic broken by settings changes, fix mnemonic in 3d controller 2020-06-21 13:14:30 -05:00
adelikat 5404fb90d7 nyma - do button name overrides on analog stick suffixes 2020-06-21 12:36:01 -05:00
adelikat 0862024ba6 virtualpad support for NGP 2020-06-21 12:14:12 -05:00
adelikat 39ff851972 tastudio track engaged flag better 2020-06-21 11:00:57 -05:00
adelikat 4d0d9e04aa TAStudio - don't draw unless Tastudio is "engaged", fixes a lot of NREs through various core reboot scenarios 2020-06-21 10:57:23 -05:00
adelikat b0258ef3db fix NRE when closing tastudio 2020-06-21 10:43:05 -05:00
zeromus 4319096b50 format shader compiling errors better 2020-06-20 22:25:41 -04:00
zeromus f6f7847b95 allow copying selected text from ExceptionBox 2020-06-20 22:25:41 -04:00
YoshiRulz e24ddc9ebe
Finish renaming floats to axes 2020-06-21 12:16:32 +10:00
alyosha-tas 6fc1228ec2 GBHawk: HDMA timing bug fix 2020-06-20 22:05:05 -04:00
YoshiRulz 3d45799fc5 Specify [SpecializedTool] belongs on classes 2020-06-20 21:31:16 -04:00
YoshiRulz f76f301f8d Enable SA1015 and fix noncompliance
"Closing generic brackets should be spaced correctly"
2020-06-20 21:31:16 -04:00
YoshiRulz 3c02545066 Enable SA1026 and fix noncompliance
"Code should not contain space after new or stackalloc keyword in implicitly
typed array allocation"
2020-06-20 21:31:16 -04:00
YoshiRulz 14e0c96fd8 Enable SA1121 and fix noncompliance
"Use built-in type alias"
2020-06-20 21:31:16 -04:00
YoshiRulz 0021cfee70 Enable SA1130 and fix noncompliance
"Use lambda syntax"
2020-06-20 21:31:16 -04:00
YoshiRulz 0a3cb5f23f Enable SA1410 and fix noncompliance
"Remove delegate parenthesis when possible"
2020-06-20 21:31:16 -04:00
YoshiRulz dcae34ce47 Enable SA1314 and fix noncompliance
"Type parameter names should begin with T"
2020-06-20 21:31:16 -04:00
YoshiRulz a8bd9733f4 Enable SA1626 and fix noncompliance
"Single-line comments should not use documentation style slashes"
2020-06-20 21:31:16 -04:00
YoshiRulz a1aca37476 Enable SA1617 and fix noncompliance
"Void return value should not be documented"
2020-06-20 21:31:15 -04:00
YoshiRulz 135490c740 Enable CS1572, CS1574, and CS1734, and fix noncompliance
malformed references or wrong XML tag
2020-06-20 21:31:15 -04:00
YoshiRulz 0e1271c7c2 Fix exception creation 2020-06-20 21:31:15 -04:00
YoshiRulz abcf91f7d6 A bit of Range cleanup 2020-06-20 21:31:15 -04:00
YoshiRulz f37b74c4ba Enable CS1570 and fix noncompliance
malformed XML
2020-06-20 21:31:15 -04:00
YoshiRulz 43cc80f6a3 Mess w/ doc comment warnings 2020-06-20 21:31:15 -04:00
zeromus dfe027cf8f finish renaming hyper/turbo wbx files 2020-06-20 20:20:42 -04:00
zeromus 602dec0c4c clarify that CloneSaveRam() can return null 2020-06-20 20:13:00 -04:00
zeromus f98c4d18b1 dont create empty file when manually flushing null save ram 2020-06-20 20:12:59 -04:00
nattthebear a9d1ad16b1 GPGX: Saveram tweaks
When saveram doesn't exist, return null, not new byte [0].  If passed a 0-length saveram file, do not pass it to the core (this crashed in interop stubs).  Note that as best as I can tell, this is not fixing any problem; even without this commit it seems impossible to get BizHawk to actually generate a 0 byte saveram file for GPGX because of other checks that already existed.
2020-06-20 19:21:55 -04:00
zeromus fc5e325608 add Reset Speed hotkey. it's bound to Shift+Equals by default because.. well, it's kind of logical... kind of. If you have any better suggestions...
fixes #2154
2020-06-20 18:55:39 -04:00
zeromus 936b7606d0 cleanup to Choose A/V writer dialog 2020-06-20 18:46:37 -04:00
adelikat c6694a5e29 TasMovie - cache mnemonic look ups, gives a noticeable speed boost to drawing 2020-06-20 16:00:08 -05:00
adelikat 249259d7b3 move QuickCollections to the PCEHawk core where it is used, since we don't expect to use it elsewhere, and one of it's advantages was speculating that being in the same assembly would give it good inlining, so being in a common library was negating this 2020-06-20 14:54:21 -05:00
adelikat dc656ccb23 remove unused extension method 2020-06-20 14:36:57 -05:00
adelikat 21d2667736 remove useless dropdown opened event 2020-06-20 14:27:23 -05:00
adelikat 46188f977c convert SMSHawk to generic core menu 2020-06-20 14:11:23 -05:00
adelikat f1d5ef0f0f create ISmsGpuView and have the Sms VdpViewer tool depend on it 2020-06-20 14:03:57 -05:00
adelikat 8bfe6011bc convert PCE to generic core menu 2020-06-20 13:42:00 -05:00
adelikat 5570af6514 convert Genesis to generic core menu 2020-06-20 13:12:09 -05:00
adelikat 831197aeaa created a SpecializedTool attribute for system/core specific tools, and use it to dynamically add available tools to the generic core menu, replace the hardcoded GBA menu using this 2020-06-20 13:05:36 -05:00
adelikat f1131b1907
Create a generic core menu (#2155)
* poc - have a default core menu that provides a generic settings menu item, wire up some cores to this generic menu that only have settings to begin wtih

* vectrex - remove strong type for settings, if there are no settings the convention is to use object, which allows GenericCoreConfig to be smart

* convert saturn menu to default core menu

* fixups

* convert PCFX menu to generic core menu

* convert snes9x and faust to generic core menu

* convert GBLink to generic core menus

* convert MAME to generic core menu

* convert NGP to generic core menu

* convert GGLink to generic core menu

* convert wonderswan to generic core menu

* convert virtualboy to generic core menu
2020-06-20 11:28:23 -05:00
nattthebear e6858c702b nyma - fix bug that stopped NGP from booting
Happened in a recent refactoring.  NGP hides the constantfb setting (Because it is always at a constant fb), and that needs to override the core provision, not cause an exception.
2020-06-20 12:12:34 -04:00
zeromus 5e399b8fc3 fix crash shutting down when GL retroshaders failed compiling 2020-06-20 00:52:38 -04:00
zeromus 1b4a6f6415 get gl display method working, at least, minimally, with the scanlines shader. someone else can fix up the others if they need to or make me a bug. at least the hard part is past 2020-06-20 00:48:42 -04:00
zeromus 00e546a537 keep working on CGC-removal 2020-06-20 00:48:42 -04:00
zeromus b842f3ed16 remove cgc (step 1) 2020-06-20 00:48:42 -04:00
nattthebear 1f966a4cc1 Fix potential crash on exit if certain native resources weren't disposed
Finalizers in SpeexResampler and QuickNes assume that the underlying native dll still exists when they run, as they have to in order to successfully clean up leaked memory.  This is not true if those resolvers, which were stored as static fields themselves, had been finalized, which can only happen on app exit (because the static fields were readonly and always kept their value).  If a SpeexResampler or QuickNes was never disposed and itself lasted all the way to app exit, then the order of these two finalizers would be unspecified and a crash could happen.

In normal circumstances, this was only observable in DS core because apparently Suuper couldn't copy paste properly and missed the dispose part, but that was already fixed in 129d454a67.
2020-06-19 23:10:56 -04:00
nattthebear 129d454a67 blah blah dispose blah blah 2020-06-19 20:56:16 -04:00
zeromus ee963e8d64 I found this old icon on an old hard disk. I think I meant it for the log window, but maybe that was back when it opened the windows console instead of another window? Anyway, it's cute, maybe someone will figure out what to do with it. 2020-06-19 19:07:20 -04:00
adelikat 65a6ec03f6 reduce some mainform redundant menus for gb3/4x, they have the same logic as gbhawk link 2020-06-19 17:07:42 -05:00
adelikat 7bac6e933b add icon that the designer ate 2020-06-19 16:49:23 -05:00
nattthebear 020e5a7e32 minor cleanup 2020-06-19 17:26:58 -04:00
adelikat 487c596d76 cleanup Zwinder 2020-06-19 16:16:07 -05:00
adelikat 53716a40e5 Rewind Config - add UI for Rewind.TargetFrameLength, and a bit of visual re-org. Designer was used so this includes designer file barf 2020-06-19 16:09:17 -05:00
adelikat da59add3f6 add TargetFrameLength to rewind settings 2020-06-19 15:58:18 -05:00
adelikat 4978fe4b92 Rewind config - more cleanup - calculate maths correctly 2020-06-19 15:53:08 -05:00
adelikat 32b14641f1 Rewind config - better buffer size settings 2020-06-19 15:22:39 -05:00
adelikat 9faa159647 Rewind settings cleanup, make default buffer size 512mb 2020-06-19 15:19:50 -05:00
adelikat d431947d4e rewind config cleanup 2020-06-19 15:14:11 -05:00
adelikat 392611d6c6 Rewind - rename Small state enable to just enabled 2020-06-19 15:09:59 -05:00
adelikat c83027b817 remove medium and large state enabled rewind options 2020-06-19 15:05:49 -05:00
adelikat 6b514293ff Rewind - remove speed multiplier option, very redundant given that speedup and turbo calculate toward rewind speed 2020-06-19 15:02:03 -05:00
adelikat 6440d92a34 remove rewind frequency settings 2020-06-19 14:57:09 -05:00
adelikat 63533888ad Rewind config - remove on disk option 2020-06-19 14:47:25 -05:00
adelikat 9d17cd40e8 Rewind - remove ability to define Small, Medium, Large state sizes 2020-06-19 14:45:08 -05:00
adelikat a58a10e633 remove rewind threading config option 2020-06-19 14:37:36 -05:00
adelikat 270d03bf40 rewind - change UseDeltaCompression to UseCompression 2020-06-19 14:35:55 -05:00
adelikat dec20a4683 remove old rewinder code 2020-06-19 14:10:06 -05:00
adelikat 84c691021b settings hacks - actually map compression to a compression settings, give rewind an "off" switch, hacked to small states for now 2020-06-19 14:05:38 -05:00
adelikat 02a2efbed1 oopsies 2020-06-19 14:05:38 -05:00
adelikat 7dd78a9fa4 zwinder - hack in some settings from the ui 2020-06-19 14:05:38 -05:00
nattthebear 3b8e0ce39d Zwinder: Don't tell the mainform we're rewind-state-capping every 0 frames, that's just silly 2020-06-19 14:05:38 -05:00
nattthebear 1121d430f4 zwinder: add optional compression 2020-06-19 14:05:38 -05:00
nattthebear 5bd75fd001 Testing a new "zwinder" rewinder 2020-06-19 14:05:38 -05:00
alyosha-tas a914cb69e0 GBHawk: Speed change and window fixes 2020-06-19 14:09:03 -04:00
adelikat 75bd2f8063 fix NRE fix fail 2020-06-19 10:18:28 -05:00
adelikat 91c33a49c0 Rewind config - fix NRE when turning off rewind then going back to the config dialog 2020-06-19 10:01:01 -05:00
zeromus 25327b510d 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 2020-06-18 03:08:57 -04:00
zeromus 1efc91cb94 hex editor: handle tiny (even 0 size) memory domains without crashing 2020-06-18 03:07:44 -04:00
YoshiRulz 8e414aea29
Enable CA1829 and fix noncompliance
"Use Length/Count property instead of Count() when available"
2020-06-18 09:44:01 +10:00
YoshiRulz 620e54580d
Enable CA1052 and fix noncompliance
"Static holder types should be Static or NotInheritable" (classes with only
static members should be static classes)
2020-06-18 09:43:57 +10:00
YoshiRulz 16d1782c9e
Enable CA1018 and fix noncompliance
"Mark attributes with AttributeUsageAttribute"
2020-06-18 09:43:53 +10:00
YoshiRulz 7f99dd95d6
Enable CA1010 and fix noncompliance
"Collections should implement generic interface"
2020-06-18 09:43:50 +10:00
YoshiRulz 8ca791852a
Enable MEN011 and fix noncompliance
"Align using directives"; this file had 2 BOM chars for some reason
2020-06-18 09:43:47 +10:00
YoshiRulz e71f5b32f0
Minor style cleanups 2020-06-18 09:43:36 +10:00
alyosha-tas 01e3a6cf43 QuickNES: blacklist Burai Fighter fixes #2145 2020-06-17 13:58:51 -04:00
nattthebear 4d3558d7e3 State manager API cleanup
add some comments.  Remove two methods from the interface definition that aren't actually used in public API
2020-06-17 07:31:00 -04:00
YoshiRulz abca8e02f2
Move some static data from MainForm to RomLoader 2020-06-17 10:46:54 +10:00
YoshiRulz 77e6a7300a
Create and use MainForm.ShowDialogAsChild(Form) helper 2020-06-17 10:46:51 +10:00
YoshiRulz 0e767add09
Rename ApiHawk files to match type name 2020-06-17 10:38:31 +10:00
YoshiRulz 9d1dfd71a1
Fix EmuClientApi not being registered and merge CloseEmulator()s
fixes a74d657a2, 51a83193a
2020-06-17 10:35:14 +10:00
alyosha-tas c53bda9235 NESHawk: make game genie compare cheats work 2020-06-16 20:01:34 -04:00
YoshiRulz ff4662efe8
Delegate more of ClientLuaLibrary to ApiHawk 2020-06-17 08:02:09 +10:00
YoshiRulz a74d657a2a
Promote IEmuClient to a full-fledged IExternalApi
also remove UnpauseEmulation() (duplicate of Unpause()) and rename
SetExtraPadding to SetClientExtraPadding (to match Lua)
2020-06-17 08:02:02 +10:00
nattthebear 9597be621a Partially revert c42889ceef
Pretty sure it's impossible for this to be null; the entry assembly always has a location and only weird dynamic assemblies can have none.

But if somehow it was, then we don't want to create a jumplist item that doesn't work!
2020-06-16 17:30:18 -04:00
nattthebear 8607f7891f Fix virtual size output on nyma cores. Expose more debugging info to console about screen sizes. 2020-06-16 15:53:10 -04:00
YoshiRulz 51a83193a1
Merge overloads of CloseEmulator to param w/ default 2020-06-17 02:15:33 +10:00
YoshiRulz cb08d00372
Replace single-use delegate type with Action<bool> 2020-06-17 02:15:11 +10:00
YoshiRulz 03acb1ded7
Move LoadRomArgs to own file 2020-06-17 02:14:33 +10:00
nattthebear 8b9debb8b9 Hide mission stick autofires again
I hope someone comes into irc screaming about how they can't do their TAS because we don't support the exact hardware semantics of the mission stick, but the more realistic outcome is that no one ever uses the mission stick for anything
2020-06-16 10:20:11 -04:00
nattthebear fa4a95f1b1 Looks like this existed solely to support the old bsnes interop, which everyone agrees was awful and something we only did because we had to 2020-06-16 07:45:34 -04:00
nattthebear 7b2ac98520 guess nothing was using this 2020-06-15 17:10:27 -04:00
adelikat 27bb2759a6 more mnemonics for saturn 2020-06-15 15:33:54 -05:00
adelikat c5ec8eb0ba saturn - mnemonic for smpc reset button 2020-06-15 14:59:24 -05:00
adelikat 03e2bccf6c remove a debug line of code 2020-06-15 14:49:26 -05:00
zeromus 98b3d8d335 change PSX framerates to follow mednafen instead of nocash (fixes #2138) 2020-06-15 15:10:29 -04:00
adelikat e6a2fe39e1 faust - support virtual pads 2020-06-15 14:02:34 -05:00
adelikat cf3e1d51e0 nyma cores - fixes to mnemonic lookups and add a few overrides 2020-06-15 13:43:23 -05:00
adelikat c8a0b6c323 virtual pads - pce, pcfx - add console buttons 2020-06-15 13:29:31 -05:00
adelikat 25dddf5160 hack to fix Nyma roman numeral buttons, virtualpads - PCE and PCFX fixes 2020-06-15 13:20:40 -05:00
adelikat 3d8920308c remove nyma virtual pad hacks for direcitonal buttons now that nyma buttons conform to typical naming conventions 2020-06-15 13:20:40 -05:00
adelikat 4122a51153 bk2 mnemonic lookup - remove some nyma hacks now that nyma directional buttons conform to the typical naming scheme 2020-06-15 12:59:54 -05:00
nattthebear b8bea93cce Rework nyma controller overrides 2020-06-15 13:37:50 -04:00
nattthebear 5b2b1cf13b Enable SNES and GBA gpu view on linux
I tested the SNES one and it seemed to work.  Don't have any working GBA cores right now in linux, I think?  But no reason to expect it wouldn't work
2020-06-15 10:49:17 -04:00
nattthebear 8e689dae76 Don't lock out the GB gpu view on linux
It works there, why was it disabled?
2020-06-15 10:42:47 -04:00
YoshiRulz 77a810600b
Inline the thing I deleted into somewhere it shouldn't be used, again 2020-06-15 13:09:58 +10:00
YoshiRulz 5f809d8e24
Cleanup N64 controller def init and re-init 2020-06-15 13:03:15 +10:00
nattthebear e5e4983464 waterbox - remove some unused saverammerer junkus
ngp doesn't use this, so...
2020-06-14 20:29:22 -04:00
adelikat 67489bfc3a PCFX - fix virtualpads, support mouse 2020-06-14 16:21:37 -05:00
nattthebear 30fd675903 woops 2020-06-14 16:27:08 -04:00
adelikat 9027223018 PCE - virtualpads - support all the buttons 2020-06-14 15:19:28 -05:00
adelikat cecf29e90a Support PCE mouse in movie mnemonics and virtualpads 2020-06-14 15:19:28 -05:00
nattthebear ecdfc66617 nyma big setting update
Moves a lot of settings around, hopefully addressing some concerns
2020-06-14 16:02:33 -04:00
YoshiRulz 99a5563490
Inline value that was public for some reason 2020-06-15 05:12:14 +10:00
YoshiRulz dbeb279bf0
Add an extension method to help w/ ControllerDefinition init of axes 2020-06-15 04:47:54 +10:00
nattthebear 2707d1cd92 nyma - rework settings architecture a bit
This gives us flexibility to define more featureful overrides
2020-06-14 14:18:13 -04:00
adelikat e41659e237 rough in for gamepad or none virtualpad support for Turbo and Hyper Nyma cores, only 2 button currently supported, support some uppercase button names in mnemonics 2020-06-14 12:02:09 -05:00
adelikat 9dfd6c3fb3 remove nyma button name overrides, they don't help with virtualpads, and ar e a hassle to maintain, we can just consistently be inconsistent for these cores 2020-06-14 11:32:01 -05:00
nattthebear a0aa1fb805 Bare minimum to unbreak some mnemonics 2020-06-14 11:58:00 -04:00
nattthebear 278317685c actualportdata api 2020-06-14 11:47:02 -04:00
nattthebear aa3369a080 Get saturn virtualpad closer to reworking again
This is a mess and we need a new notion of controller definition
2020-06-14 11:33:51 -04:00
nattthebear 7ba3f6db03 saturn - fix crash in dead or alive
It does look pretty awful with interlacing, but that's not something bizhawk is equipped to solve at present
2020-06-14 10:15:05 -04:00
adelikat 3610ca2b4c virtualpads - prevent crash on Turbo and HyperNyma cores, just empty for now, will support these cores later 2020-06-13 18:17:11 -05:00
nattthebear f2b461bed1 nyma - overhaul some input stuff to support some more things
saturn guns and keyboards now work
2020-06-13 18:19:41 -04:00
nattthebear 7f83f311f9 saturnus - wire up the needed analogs for 3d controller 2020-06-13 17:00:59 -04:00
nattthebear 77e3f9acb3 saturn - hide unavailable ports depending on multitap
One slight issue is that the bulitin smpc reset is always "player 13", but that's not enough of an issue for me to care
2020-06-13 16:53:46 -04:00
nattthebear d6cc6abfec pcfx - hide ports based on multitap 2020-06-13 16:50:01 -04:00
nattthebear 13a5e9d102 faust - hide ports 3-5 and/or 6-8 depending on multitap settings 2020-06-13 16:45:06 -04:00
nattthebear 60614ffa7b PCE: Hide controllers 2-5 if multitap is disabled
They have no power in that situation
2020-06-13 16:39:26 -04:00
adelikat 2dd618b6f2 PCFX - remap some buttons, add (bad) mnemonics for mode buttons 2020-06-13 15:21:52 -05:00
adelikat 573b544a88 new pce cores - add some button name overrides, and support mnemonics 2020-06-13 15:11:00 -05:00
adelikat b1c2ed0d3d set movie = null on stop movie, this used to crash tastudio but I can't make it crash anymore, either we fixed the underlying problem or I didn't reproduce it correctly, will fix if it comes up 2020-06-13 14:29:47 -05:00
nattthebear 398d9c45cb Revert "fix nyma button binding label"
This reverts commit 14661f4c76.

Dunno what was going on here, this is a feature that we'll need to fix #2129 and similar... please don't randomly delete code?
2020-06-13 15:08:20 -04:00
zeromus 14661f4c76 fix nyma button binding label 2020-06-13 13:42:45 -05:00
YoshiRulz f48e3cd2ea
Re-enable A/V recording on Linux and add a big ol' disclaimer dialog 2020-06-14 02:59:50 +10:00
adelikat 4c77ebd3d1 remove tastudio hack that I'm convinced is either 1) does nothing 2) causes bugs 3) fixes something that should be handled in a different place in the code 2020-06-13 11:47:21 -05:00
adelikat 51e1ee3a46 MovieSession - simplify and improve performance - remove unnecessary CopyController wrapper on MovieIn, and don't set movie controller state unless recording 2020-06-13 11:38:30 -05:00
adelikat 268ab96ae9 remove built-in multitrack movie recorder, justification: tastudio is a much better alternative, it isn't used, and it's causing strain on better movie architecture, also this logic is easily done via lua script. It could be built from scratch one day in a way that plays nice with better movie architecture, if there's demand, but we need to remove this to keep moving forward 2020-06-13 09:49:25 -05:00
nattthebear 03d10cebb9 Support bsnes on LOO-NICKS
Had to fix up libspeex and some waterbox cothread funsies
2020-06-12 19:10:42 -04:00
adelikat bb2e82c94a GlobalWin.MainForm begone 2020-06-12 16:59:44 -05:00
adelikat 590a2fc245 VirtualPadButton - be more thorough about not responding to keyboard input, instead of focusing on mainform to avoid it 2020-06-12 16:31:38 -05:00
adelikat 336d2fc3a9 simplify EditSubtitlesForm 2020-06-12 15:53:01 -05:00
adelikat ee0d32d56f simplify the EditCommentsForm and remove usages of GlobalWin 2020-06-12 15:29:45 -05:00
nattthebear 25a5449a48 Work around mono marshalling issue
Fixes #2116, but it'd be nice if mono fixed it too
2020-06-12 15:22:46 -04:00
adelikat f21132a2ac move EnsureCoreIsAccurate() out of EmuUtil and back into mainform since it has so many dependencies, including mainform itself, and 50% of its use is in mainform anyway 2020-06-12 13:57:28 -05:00
adelikat ac54318cfb GlobalWin.Cheatlist begone 2020-06-12 13:39:31 -05:00
nattthebear eb811b7d79 Remove check that stops a nymacore from creating "thread" in deterministic mode
The MT ppu renderer in saturn looks cool to me, so it probably won't cause nondeterminism, probably

Fixes #2126
2020-06-12 14:31:09 -04:00
adelikat 61b852c571 remove some unused usings 2020-06-12 12:56:58 -05:00
adelikat 53b0472c1a N64 plugin config - simplify use of GameInfo 2020-06-12 12:56:58 -05:00
adelikat ac61701aa3 GameInfo - simplify 2020-06-12 12:56:58 -05:00
adelikat 4e7e314a33 GameInfo - simplify a method name 2020-06-12 12:56:58 -05:00
adelikat 0c300cf5bf Remove our home-grown ReadonlyDictionary in favor of the built in .net one (as of 4.5 we have one of these built in), Gameinfo.GetOptionsDict() - return IReadonlyDictionary instead of Dictionary 2020-06-12 12:18:50 -05:00
adelikat c81f052f94 GameInfo - demand a value for key params, and force calling code to pass in an empty string if that's what they choose (better would be to pass a bool or a 0/1 even if we don't require it) 2020-06-12 12:11:53 -05:00
adelikat 10c62764ba improve some if checks in OSDManager 2020-06-12 11:58:17 -05:00
adelikat 5ef2a4d7e6 use IGameInfo instead of GameInfo in various palces 2020-06-12 11:56:05 -05:00
adelikat 066e282b39 remove GlobalWin usage in RecordMovie.cs 2020-06-12 11:48:51 -05:00
adelikat 13b6b09771 pass in systemId dependency to PathConfig 2020-06-12 11:36:21 -05:00
adelikat 777a2e8f3e reduce some copy pasta for Bmp file creation across various tool dialogs 2020-06-12 11:14:25 -05:00
adelikat f9fff69ce4 BmpView - use DesignMode flag instead of shenanigans 2020-06-12 10:21:19 -05:00
adelikat 195b01fb44 nitpick 2020-06-12 09:25:05 -05:00
YoshiRulz 5d25d537d1
Hopefully EmuClientApi will now have the loaded emu/game
see f78af85cc, 109ba1d31
2020-06-12 09:47:07 +10:00
YoshiRulz aca3768c78
Align ApiHawk and Lua library names 2020-06-12 09:47:04 +10:00
adelikat 597e010faf use GlobalWin.Game less 2020-06-11 18:31:32 -05:00
adelikat ba939466df Pass an IGameInfo into ToolFormBase and use it in tools 2020-06-11 18:25:34 -05:00
adelikat 109ba1d31a fix NRE on startup for EmuClientApi, this is a band-aid, I think _emulator should never be null 2020-06-11 17:48:41 -05:00
adelikat f1818e7f7e add Api suffix to ApiHawk interfaces, so they will stop colliding with non-api interfaces 2020-06-11 17:40:39 -05:00
adelikat d9ef084e2f add a readonly interface for GameInfo for code that only needs to read, pass into SynclessRecordingTools instead of globals, refactor SynclessReocrdingTools a bit 2020-06-11 17:35:40 -05:00
YoshiRulz 52cc0050b8
Allow ApiManager to pass some extra globals to the 5 EmuHawk APIs 2020-06-12 06:14:32 +10:00
YoshiRulz d2e20a7a1e
Pass MainForm.AllowInput to Input instance as delegate 2020-06-12 05:57:52 +10:00
YoshiRulz b972b8a771
Inline MainForm.IsLagFrame and change global usage in OSDManager 2020-06-12 05:47:23 +10:00
YoshiRulz dc352c0225
Pass globals to EmuClientApi as ctor params 2020-06-12 05:37:04 +10:00
YoshiRulz f78af85cc6
Delegate ClientApi implementation to an instantiable class
The new class, EmuClientApi, is abstracted as IEmuClient, but this interface is
not an IExternalApi. This is because a future commit will add a ctor not
compatible with the current instantiation code in ApiManager.
2020-06-12 05:37:00 +10:00
adelikat a930b5f950 fix typo in a comment 2020-06-11 13:06:27 -05:00
adelikat 8270c5f997 put classes in MultitrackRecording into separate files, and make a few of them internal 2020-06-11 12:27:26 -05:00
nattthebear 638c2095ed Update labelling for every mednacore that we updated
WonderSwan/Cygne did not move to nyma, but I manually backported changes so it counts as "1.24.3" mostly
2020-06-11 12:22:32 -04:00
nattthebear f14dace4a0 Move saturn over to nyma, get latest version. 2020-06-11 12:17:10 -04:00
adelikat 73e2922a0d Fix logic that news up new Rewinders, properly dispose of the Rewinder on closeRom, this might fix memory leaks in rewinder that pre-date the recent refactor 2020-06-10 15:06:34 -05:00
adelikat af93cf3e92 consolidate logic that instantiates a new rewinder, be sure to dispose the old one 2020-06-10 09:15:52 -05:00
adelikat de5508ca6c rewinder - fix potential NRE 2020-06-10 08:56:25 -05:00
zeromus c9c1aa91ad fix temp directory pathing in path manager which was previously making no attempt to do the right thing (fixes #2118). did I do this right? I don't see what was so hard about it in the first place, but I had left a todo there..... i dunno 2020-06-09 23:27:49 -05:00
feos f9ffeec81b we can launch and use mame debugger 2020-06-09 22:34:15 +03:00
feos 9b3e18e992 mame: document build command 2020-06-09 21:43:59 +03:00
feos 36787d7292 mame: obtain rom names and hashes 2020-06-09 21:38:34 +03:00
nattthebear ef02263122 fix mouse on the pcfx core
this was a regression from the move around, it worked before
2020-06-09 13:12:12 -04:00
nattthebear 69e30ee33f Decrease state size in pcfx, pce, pce-fast 2020-06-09 10:09:17 -04:00
nattthebear 9bb56f0b5c move pcfx to nymacore 2020-06-09 08:15:06 -04:00
nattthebear 11e1019590 nyma -- support cd switching
motorcycle shifter, but neutral is before 1st instead of between 1st and second
Yes, I had to rebuild the non cd cores here, and I am sorry
2020-06-08 20:24:30 -04:00
zeromus 9c875b42f4 background thread bootgod loading 2020-06-08 16:45:44 -05:00