Commit Graph

18455 Commits

Author SHA1 Message Date
YoshiRulz 50b17096e1
Remove WinForms dep from Virtual Pads schemata 2020-12-22 14:07:28 +10:00
YoshiRulz 9168b59382
Add base interface for *CheckBoxEx and *RadioButtonEx controls 2020-12-21 16:58:49 +10:00
nattthebear 56b158e72a minor comment clarification 2020-12-20 21:06:22 -05:00
SuuperW b5b1e17851 Fix eviction logic for _gapFiller. (we were attempting to remove the wrong value from StateCache, and also weren't checking for reserved) 2020-12-20 18:06:50 -06:00
SuuperW 01bcf22802 Deal with this TODO. Removing from the StateCache here was removing extra frames. (frames between the old last gap frame and new last gap frame which were in another buffer) 2020-12-20 18:04:02 -06:00
nattthebear 55c08dc77f Revert "misc cleanups in neshawk boards, mostly removing redundant else's"
This reverts commit 2b5d0b6219.

A lot of these make things harder to read:

- Extra empty lines in large switch stacks mean they're more likely to go off one screen
- `if` and its condition on the same line is super hard to read, please never do that.  (Are the extra empty lines an attempt to mitigate the above)
- Removing terenaries obscures intent, and now there's more copy paste than before
- """Redundant""" else clauses on if...return kept things nice and lined up.

That was a huge churning diff with no value; let's stop it from spreading.
2020-12-20 15:26:08 -05:00
SuuperW 3d84812341
add a Lua method to get inputs from the movie () 2020-12-20 13:16:28 -06:00
adelikat 2b5d0b6219 misc cleanups in neshawk boards, mostly removing redundant else's 2020-12-20 13:12:51 -06:00
nattthebear 374f646f75 CoreInventory tweaks
When constructing a core using ConstructorInfo.Invoke, any exceptions thrown by the core are packaged inside TargetInvocationExceptions.  This has no value to us -- the fact that reflection is used is an implementation detail, and it breaks checking specific exceptions for specific information.  Accordingly, consumers have to deal with e.InnerException checks.  Fix this up so that we only expose the actual exception thrown.

In addition, undo a bad change in 6225e7854b that made the entirety of CoreInventory nonfunctional.
2020-12-20 09:15:22 -05:00
adelikat 7bb5506ba8 remove 2 deprecated nes library methods (add/remove game genie), they were marked deprecated for enough releases that I think we can go ahead and remove them 2020-12-19 20:17:26 -06:00
adelikat 6225e7854b a few cleanups in CoreInventory.cs 2020-12-19 20:07:09 -06:00
adelikat 68f9ac9730 remove unused usings in Emulation.Cores 2020-12-19 20:03:37 -06:00
adelikat aaa1c8e7a8 AutofireController - remove autofire flag that was always true 2020-12-19 18:55:22 -06:00
adelikat c730a78994 remove redundant null check before assigning null 2020-12-19 13:43:04 -06:00
SuuperW ec5e88c808 fix: loading a tasproj wouldn't set autofire (despite the gui showing it did) 2020-12-19 13:42:10 -06:00
alyosha-tas 3cc9684ebd GBHawk: better initial RAM state 2020-12-17 21:02:41 -05:00
adelikat fe5655d1e3 misc cleanups in BizHawk.Common 2020-12-15 17:54:44 -06:00
adelikat cb6ef03982 use explicit private/internal modifiers 2020-12-15 16:49:23 -06:00
adelikat b83556fc6f make fields readonly where possible 2020-12-15 16:00:55 -06:00
adelikat 213729550d remove redundant array initializers 2020-12-15 16:00:55 -06:00
nattthebear eeca40e072 libsnes: Cache region from core once at start
The region value in the comm struct is set once and then gets wiped out later.  I don't know what wipes it, but so many things have their hands on that, it's not surprising.  Someone knew about this and handled _mapper appropriately, but not _region.

Fixes 
2020-12-15 08:51:08 -05:00
alyosha-tas a8e2a420f0 GBHawk: cleanup 2020-12-14 19:32:22 -05:00
alyosha-tas 08f1b69197 GBHawk: prep for future audio work 2020-12-14 19:30:22 -05:00
alyosha-tas 3df6dfb350 GBHawk: update clearing screen for subgbhawk and linked modes 2020-12-14 11:41:19 -05:00
alyosha-tas b85e7cac2c O2; set released to true 2020-12-14 11:40:23 -05:00
nattthebear 1c27943707 Make SNES rom memory domain writeable
Use at your own risk
2020-12-13 20:11:58 -05:00
nattthebear fbee96c76b GPGX: Allow writing to rom memory domains
Don't let the diff fool you, a massive amount of work went into making this possible.
2020-12-13 19:49:04 -05:00
nattthebear 72ea5ce866
Waterbox: Allow SEH unwinding through guest calls. ()
The goal of the separate stacks was to allow this, but I never quite finished the job.  Now, when a SEH exception (generally a Rust panic in a guest syscall handler, or a C# Exception in a callback) tries to unwind through guest code, it works.  Note that we don't actually unwind the guest stack, as there's nothing useful to be gained from that;  When an emulator core throws an exception like this, it should be considered completely hosed.  Throw it out and get a new one.

There were two bugs stopping this from working.

First of all, we had custom thunks that lacked sufficient unwind information for RtlUnwind to get through.  For the sysv <-> msabi adapter, this was fixed by making it regular Rust code instead of hand assembled junkus.  So the compiler generates valid unwind information for all of that.  Then we just JIT a small stub on top in the MsHostSysVGuest code, which needs no unwind information because it won't throw an exception itself and transparently passes execution to something with valid unwind information without invalidating that information.  (NB:  Clr JIT stubs use the same strategy.)  For the host <-> guest stack transition code, a small hand generated unwind stub was added to interop.s that is registered with `RtlAddFunctionTable`.  I've seen the unwind work successfully without this second set of unwind information, but better safe than sorry.

Secondly, our misuse of SubSystemTib caught up with us.  It's an old field, allegedly from OS/2, that we repurposed to hold TLS information needed for the waterbox stack transitions.  Most people think nothing uses it any more, but in fact if it's set to a non-NULL value, but doesn't contain valid information, `KERNELBASE!GetModuleFileNameW` will crash when it tries to get a module name from there.  The fix here was to simply tighten up our usage of SubSystemTib:  We were already nulling it out when returning from guest code, but not when calling back to host code in guest code.

Fixes .  Unwinding of this sort has never worked well in waterbox; the reason why that issue is more recent is that the particular reproducing case of firmware didn't cause an exception in a callback in older code; the exception happened in pure managed code.
2020-12-13 19:12:16 -05:00
YoshiRulz fa6fd88d62
Import and use OSTailoredCode in DiscoHawk program class 2020-12-14 06:40:06 +10:00
YoshiRulz 24f90c922f
Fix incorrect import
I blame Rider
2020-12-14 06:33:46 +10:00
adelikat 28f161ce18 remove unnecessary string interpolation in a few places 2020-12-13 12:12:42 -06:00
adelikat 10d4f66248 Hex Editor - some small cleanups 2020-12-13 11:44:10 -06:00
nattthebear 6130a7241f Fix Saturn cart detection
Closes .
Similar to ddd229e03d, Mednafen internals expect enumeration setting types to work with MDFN_GetSettingI, but we weren't doing that.
2020-12-12 13:40:33 -05:00
nattthebear 2f2f104e3d Update nyma cores to Mednafen 1.26.1
See Mednafen release notes for full changes.  Mostly just Sega Saturn stuff.

Closes 
Closes 
2020-12-12 10:50:18 -05:00
alyosha-tas 4447d5ddc7 GBHawk: bug fix, initial ram change, and double speed mode input dumping 2020-12-09 22:54:12 -05:00
Andrew Cook 58cbec6dd6
[PSX] Make Octoshock more debuggable ()
* [PSX] Bodge in a system bus memory domain

Fixes: debugger window crashes when adding a breakpoint

* [PSX] Use Octoshock's built-in disassembler

* [PSX] Add support for execute memcbs to the core

* [PSX] Have memcbs include actual values

* [PSX] Use SafeHandles instead of raw pointers

* [PSX] Use core's internal peek and poke functions for System Bus

* [PSX] Move memory maps into IDebuggable impl to be next to memory map hooks

* [PSX] Revert using SafeHandles

* [PSX] Fire execution callback after trace callback instead of at end of fetch
2020-12-08 11:34:24 -06:00
alyosha-tas e81fa92f80 GBHawk: forgot a commit 2020-12-08 11:04:03 -05:00
alyosha-tas 401d635afc GBHawk: properly fade to white in GBC mode 2020-12-08 10:41:37 -05:00
zeromus 28af57de18 fix mistake in libsnes CARTROM-D CDL block 2020-12-07 15:55:15 -05:00
alyosha-tas 699fb1171c GBHawk: more mode 1 work 2020-12-06 19:39:25 -05:00
alyosha-tas a46ffefc77 GBHawk: mode 1 overhaul, fixes several bugs 2020-12-06 15:50:21 -05:00
zeromus e9f365a4a5 libsnes - core dll update for prior commits 2020-12-05 23:37:16 -05:00
zeromus 96aa3e85c0 libsnes - remove pointless registers 2020-12-05 23:37:16 -05:00
zeromus f580773342 add CARTROM-DB and CARTROM-D blocks to libsnes CDL 2020-12-05 23:37:16 -05:00
alyosha-tas b7c821f8d6 GBHawk: mode1 bug fix 2020-12-05 19:32:34 -05:00
YoshiRulz 877c11d5f9
Merge UpdateChecker.ParseVersion into VersionInfo.VersionStrToInt 2020-12-06 07:35:12 +10:00
YoshiRulz 66e0d4b214
Misc. cleanups in VersionInfo 2020-12-06 07:28:31 +10:00
YoshiRulz 508dc4a9d9
Use readonly instead of const in VersionInfo 2020-12-06 07:28:23 +10:00
YoshiRulz 9dcc8f56f4
Move VersionStrToInt helper to VersionInfo 2020-12-06 07:27:54 +10:00
YoshiRulz 98e2d494a2
Bump supported Windows versions 2020-12-06 07:12:27 +10:00