Commit Graph

315 Commits

Author SHA1 Message Date
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 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
YoshiRulz 75e815f09e
A little cleanup of DLIR 2020-07-28 17:53:28 +10:00
nattthebear a28ca37cfb
Fix issue with settings adapter (#2223)
This would fail to work on any core that used the serviceprovider to provide a settings definition that wasn't on the iemulator itself?  Guess we never did that
2020-07-11 13:35:09 -04:00
YoshiRulz 38d24901cf
Fix 4-octet peeks by Hex Editor having 2 zeroed octets
dumb typo
2020-07-10 03:39:02 +10:00
alyosha-tas 7f28bc2caf Fimware: Fix #2207 and add entry for g7400 2020-07-07 17:59:20 -04:00
hegyak f430df9575
Firmware Rename (2)
Fixed KoF 95 and Ultraman
2020-07-06 11:55:13 -07:00
hegyak 6a73dd0115
Firmware Rename
Rename All the Firmware Files to have a more Unified Naming Convention
2020-07-06 10:46:56 -07:00
alyosha-tas fa7ac3d4c1 A7800Hawk: Fix pokey 0x450 detection 2020-07-05 15:45:08 -04:00
YoshiRulz 4f7c1a0b76
Enable nullability in AxisSpec and related types 2020-06-26 15:03:28 +10:00
YoshiRulz 69146b04b2
Add and use DEBUG-conditional WriteLine methods 2020-06-26 14:37:36 +10: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
YoshiRulz e24ddc9ebe
Finish renaming floats to axes 2020-06-21 12:16:32 +10: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
zeromus 602dec0c4c clarify that CloneSaveRam() can return null 2020-06-20 20:13:00 -04: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 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
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
alyosha-tas c53bda9235 NESHawk: make game genie compare cheats work 2020-06-16 20:01:34 -04:00
YoshiRulz dbeb279bf0
Add an extension method to help w/ ControllerDefinition init of axes 2020-06-15 04:47:54 +10: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 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 5ef2a4d7e6 use IGameInfo instead of GameInfo in various palces 2020-06-12 11:56:05 -05:00
adelikat ba939466df Pass an IGameInfo into ToolFormBase and use it in tools 2020-06-11 18:25:34 -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
zeromus 9c875b42f4 background thread bootgod loading 2020-06-08 16:45:44 -05:00
zeromus d98bfc82c5 fix threaded DB loading (fixes #2113) 2020-06-08 14:08:50 -05:00
LodanZark 896612eb4d
update msx bios filenames and description
Updated the msx bios filename based on mame 0.221 and cbios0.29a, this way it fixes the filename conflict while using the feature "Organize" through Firmware Manager.
Couldn't figure it out about the bios_test origin, so I kept that one unchanged.
2020-06-08 03:32:18 +01:00
zeromus 93f06f2a68 oops, fix database loading 2020-06-07 18:43:13 -05:00
zeromus bd8003c725 thread gamedb load 2020-06-07 16:43:50 -05:00
YoshiRulz b88f20faed
Rename Verison to BizHawk.Version, fixes #2101 2020-06-06 00:20:48 +10:00
nattthebear 3962049847 Fix hex editor bulk multibyte reads
The existing API was such that BulkPeekUint(Start: 20, EndInclusive: 39) would actually read from the address range [20, 100) instead of [20, 40).  That's completely broken.  The hex editor, the only consumer of the API, made the same exact mistake in reverse so the problem wasn't immediately apparent, but it was a giant land mine waiting to happen.  Fix them both.
2020-05-30 13:13:42 -04:00
YoshiRulz b56e229a45
Target .NET Standard where possible, restore Virtu TFM
fixes 5a0992c2b
2020-05-30 15:53:20 +10:00
zeromus 5a0992c2b7 make projects build only once (for net48). this will probably displease anyone working on targeting one of the other 50 frameworks, but they need to do that in another branch until they can figure out how to make it peacefully coexist; maybe by an alternate solution+project configuration (done in common props, ideally) 2020-05-29 17:45:07 -05:00
YoshiRulz 33ff00714d
Change more input code to use int for axes instead of float
This probably breaks TAStudio or something, on the bright side a lot of the
float equality checks are gone. see e12b5d813
2020-05-26 21:45:20 +10:00
nattthebear a20c3c3ccb Change waterbox to use memory reserve semantics
If a particular core instance doesn't use up too much memory, then we don't charge the host OS for that memory.

The strange thing here is that, testing locally on Windows 10, we were already getting the desired semantics even with SEC_COMMIT and not SEC_RESERVE.  This commit is still important because:
1) Windows might be providing me an optimization it can't guarantee,
2) Linux might not be able to provide the same optimization
3) In any event, this patch also trims down xor snapshots to match the actual needed size.
2020-05-25 20:03:32 -04:00
nattthebear 07c627cc3e
Merge pull request #2044 from TASVideos/nyma
Add 'nyma' project

The goal is to eventually update all of our Mednafen cores. For now, there is a work in progress import of the Mednafen pce core. Basic gameplay with hucard, turbocd, and supergrafix is supported, but the core is not complete yet.
2020-05-25 13:54:35 -04:00
nattthebear 9ec8536a5e Finish getting saveram working on PCE (theoretically)
This actually makes saveram saving and loading somewhat slower on all waterbox cores, but whatever... it's more important to be simple and readable in this code than fast.
2020-05-25 13:49:47 -04:00
nattthebear bc8d298a88 support pce-cd and sgx in nyma 2020-05-25 12:49:34 -04:00
nattthebear 815d49bd63 cap nullemulator to <=200fps
realistically, about 160-165fps for me
2020-05-25 12:49:32 -04:00
YoshiRulz 5689d69bfb
Make gamedb's WriteLine flooding conditional on DEBUG 2020-05-24 13:57:08 +10:00
YoshiRulz 6e0148d921
Cleanup references 2020-05-21 17:25:35 +10:00
nattthebear 21cdf5120b
Revamp waterbox build environment and runtime. (#2027)
Create an all new waterbox build environment:
WSL2 + Ubuntu 20.04 LTS (Other linuxes may work)
Musl libc with waterbox customizations
LLVM's libclang-rt, libunwind, libcxxabi, libcxx
Static linking to elf files

Compared with the old system, this is easier to set up a dev env for and easier to update in the future. The executables are larger but produce smaller savestates due to static linking. The modern toolchain means advanced library features and language features that sometimes appear in some upstream cores will be reusable.
2020-05-20 15:34:24 -04:00
YoshiRulz 2c817e3057
Use Range.Count extensions 2020-05-19 23:37:59 +10:00
adelikat 04aab3c41b add an IStatable extension method that will return a byte array that's safe to hold on to, but isn't optimized for speed, to be used in basic situations where we are making movies from savestate or getting a savestate length 2020-05-17 10:08:00 -05:00
adelikat 0154222737 a bit of reorg - put Emulation.Common sound files in the sound folder not unecessarily nested 2020-05-17 09:50:05 -05:00
YoshiRulz 7725d59636
Enable SA1124 "Do not use regions" and fix compliance 2020-05-15 17:00:53 +10:00
YoshiRulz 87ec2618a1
Revert "delete all regions"
This reverts commit e566d8e258.
2020-05-15 17:00:49 +10:00
nattthebear a49a372410 add bulk read of intptr memory domains.
speeds up ram search in quicknes
2020-05-14 18:10:16 -04:00
nattthebear e566d8e258 delete all regions 2020-05-14 17:33:40 -04:00
adelikat 976ea4967b cleanup IAsyncSoundProvider hacks and consolidate code that is only used for PCE 2020-05-09 11:01:02 -05:00
zeromus 6fc522072b plumbing for that skip option. do not look at this commit, it will displease you. 2020-05-02 21:10:50 -04:00
YoshiRulz 1bded467b3
Replace $(SolutionDir) with $(ProjectDir) in src/ 2020-05-03 11:05:26 +10:00
YoshiRulz 5a8349b5a5
Update paths in projects (fixes build) 2020-05-03 10:58:35 +10:00
YoshiRulz 3a3b22c03b
Move projects to src subdir (breaks build) 2020-05-03 10:57:38 +10:00