Commit Graph

41 Commits

Author SHA1 Message Date
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
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
YoshiRulz 5488c80f4d
Enable SA1400 and fix noncompliance (except in Cores)
"Access modifier should be declared"
2020-09-08 21:57:14 +10:00
YoshiRulz 14653fac0e
Fix or mute remaining code style warnings 2020-08-29 00:52:23 +10: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
YoshiRulz e5de63ea94
Cleanup VersionInfo and code gen 2020-08-01 11:57:14 +10:00
YoshiRulz 966a2abe3f
Call base.Dispose to banish warning 2020-07-22 06:34:32 +10:00
nattthebear 4639c1f2ca minor cleanup of calling convention adapters
sync the generator code with the generated code, remove useless endbr64 shit
2020-07-11 11:09:48 -04:00
nattthebear c8985e3007
Waterbox: Stack Marshalling (#2209)
Waterbox guest code now runs on a stack inside the guest memory space. This removes some potential opportunities for nondeterminism and makes future porting of libco-enabled cores easier.
2020-07-07 17:48:12 -04:00
nattthebear 3a18f6356d Rebuild all of waterbox as sysvabi, not msabi
This helps linux at the expense of windows, except it seems like windows gets a nice little speed up as well
2020-07-03 18:21:48 -04: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 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
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
YoshiRulz f37b74c4ba Enable CS1570 and fix noncompliance
malformed XML
2020-06-20 21:31:15 -04: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
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
nattthebear 2952ac24aa savestates on waterbox 2020-06-07 09:26:08 -04:00
nattthebear aa48af9c94 linux: support gpgx
as before, do not load state even if your life depends on it
2020-06-06 18:25:59 -04:00
nattthebear 364d551940 waterbox linux progress
uzem runs.  i don't know about anything else yet.  DO NOT ATTEMPT TO LOAD A SAVESTATE.
2020-06-06 15:51:51 -04:00
nattthebear dcaf504202 Some progress on loonix waterbox
It doesn't work
2020-06-06 14:39:55 -04:00
nattthebear e8b84b466b More hacks, just need to unblock yoshi and fix this for real later pinky swear 2020-06-06 10:05:10 -04:00
nattthebear db934f3689 quick hack to hopefully unbreak quicknes on loonix 2020-06-06 08:21:26 -04:00
YoshiRulz b88f20faed
Rename Verison to BizHawk.Version, fixes #2101 2020-06-06 00:20:48 +10:00
nattthebear 7792eb2e80 Improve waterbox "lazystates"
Cores that used the .invisible section to store data were saving it; this was a regression from before, so PCFX states should be back down to the previous release size, or perhaps a bit smaller.

Add the ability to dirty track libco cothreads, as used in the bsnes core.  This saves a lot of space in those states and they're now quite competitive in size.
2020-06-04 12:13:28 -04:00
nattthebear d06ed05929 waterbox - track writes for smaller savestates
The waterbox system now uses host os facilities to track whether memory has been written to, to automatically choose what thing to savestate.  This results in a large size decrease for some cores, like snes9x or gpgx (when running cartridge games).  Doesn't do much for cores that were already memory efficient, or for bsnes because of libco compatibility issues; but those cores don't regress either.
2020-06-03 07:13:40 -04: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 472a954da0 Minor cleanup in some waterbox memory functions 2020-05-25 17:31:50 -04:00
nattthebear 4ec0753f52 all that stylecopp shizz and it doesn't have a line length limit =/ 2020-05-25 12:49:35 -04:00
nattthebear f37a51ef27 Rework memory block os abstraction
The existing code had a lot of copy paste and things that needed to be done twice to keep both impls in sync.  Refactor to use a minimal abstraction layer and keep all other code common
2020-05-25 12:49:35 -04:00
nattthebear 0f65351e13 Marching onward 2020-05-25 12:49:31 -04:00
nattthebear 09f75c281c Play musical names with MemoryBlock
The refactoring of platform abstractions should never have changed the name of the public interface.  No one cares about MemoryBlockWindows or MemoryBlockUnix - those names are impl details.
2020-05-21 12:59:36 -04:00
YoshiRulz 6e0148d921
Cleanup references 2020-05-21 17:25:35 +10:00
YoshiRulz 01460cec1b
Re-add docs for MemoryBlockBase, rename End to EndExclusive
see 4a5ece207, 4abe3f793
2020-05-17 15:07:41 +10:00
YoshiRulz 7afa4a2f98 Replace GetProcAddrOrNull with GetProcAddrOrZero
both in ILinkedLibManager and its inheritors, and in IImportResolver and its
inheritors; see aa8fe56ef
2020-05-16 11:41:58 +00:00
YoshiRulz 3e51bbe5c2 Revert "Fix up Nullable<IntPtr> brain damage"
This reverts commit aa8fe56ef9.
2020-05-16 11:41:58 +00:00
nattthebear 61f269f097 maybe fix a maybe bug in maybe code that maybe will ever be run 2020-05-15 19:44:28 -04:00
nattthebear aa8fe56ef9 Fix up Nullable<IntPtr> brain damage
It'd be one thing if we needed a sentinel value distinct from IntPtr.Zero but we don't.  It's a pointer, and 0 is globally understood to be The Bad Value.

Some brain damage remains:
* LoadLibrary abstraction also returns Nullable<IntPtr>
* I named it `Resolve` and not `GetProcAddr` because I didn't want to see win32 everywhere I went :(
2020-05-15 18:56:34 -04:00
nattthebear 4abe3f7932
Revert 4a5ece2076 (#2007)
Because of intervening commits, there may be some other incidental changes.

While well intentioned, the refactoring was just a mess when it came to actually groking this low level memory block shuffling code.
2020-05-15 07:40:28 -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