Commit Graph

16833 Commits

Author SHA1 Message Date
nattthebear 6da864f4f7 waterbox: fix linker script putting __eh_frame_hdr_start in the wrong place
This was benign, because libunwind will ignore a frame header it doesn't understand (__eh_frame was still fine).  But now there's no spew in the console.  And over the next 50 years it will save a combined 0.3 seconds of cpu time
2020-05-25 21:02:01 -04:00
adelikat 7778fccd77 add uzebox path entries, fixes #2043 2020-05-25 19:21:31 -05: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
adelikat 87c48879fc move Global.Emulator to GlobalWin.Emulator now that no Client.Common files reference it 2020-05-25 18:05:34 -05:00
adelikat 5b7d612238 SaveStateManager - simplify video buffer loading and don't use Global.Emulator 2020-05-25 17:59:09 -05:00
adelikat 7a374f0013 CheatList - has memory domains passed in to the Load() method 2020-05-25 17:50:42 -05:00
adelikat 8798d0c03e CheatList - remove some unused code 2020-05-25 17:43:03 -05:00
adelikat e498476b55 CheatList - move a config check to the calling code 2020-05-25 17:29:57 -05:00
adelikat 705af68f65 check if ITasMovie not TasMovie, still not great that it needs to check types but better 2020-05-25 16:50:56 -05:00
adelikat 5e4983c93f TasMovie.RecordFrame() - duplicate desired base class logic instead of calling base, because base does some "VBAStyleLoadState" stuff that is very undesireable in tastudio 2020-05-25 16:47:26 -05:00
nattthebear 472a954da0 Minor cleanup in some waterbox memory functions 2020-05-25 17:31:50 -04:00
feos 5539308398 mame: fix configs being dumped to disk hopefully, also fix the thing
mame lua figuring out cpu and address space every time I read a byte was a dumb idea it seems. accessing maincpu program space directly via C API is much wiser. ram search does the thing now.
2020-05-26 00:04:43 +03:00
adelikat 2ce79fc356 Move SoundMaxBufferDeficitMs and DisableSecondaryThrottling from Global to GlobalWin or Sound class, since only EmuHawk code accesses these 2020-05-25 15:40:23 -05:00
adelikat aec01b794a Have movies maintain a copy of the current core since their lifecycle should never extend past the core, removes a lot of global usage, downside is that it makes IMovie have more things when it is already very complex 2020-05-25 15:03:45 -05:00
nattthebear 8340bd0cf2 Actually add pce.wbx file 2020-05-25 13:55:55 -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
adelikat fbb47b2297 StateManagerDecay - pass in Global.Emulator.Frame instead of referencing it directly 2020-05-25 12:47:30 -05:00
nattthebear f9b5b9e374 pce - implement most memory domains our existing core does
The mednafen debugger system makes this easy, unfortunately that has a lot of other baggage, so do it this way
2020-05-25 12:49:36 -04:00
nattthebear 1000b74f2d tweak waterbox hash detection
A game could wild pointer into a slightly out of range part of the sealed heap during init, and then do so differently on a subsequent init, and we wouldn't detect it
2020-05-25 12:49:35 -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 b871f95dc0 pce - fix drive light 2020-05-25 12:49:35 -04:00
nattthebear 586117462e add back the old wonderswan controller config category labels
no hack this time
2020-05-25 12:49:35 -04:00
nattthebear bc8d298a88 support pce-cd and sgx in nyma 2020-05-25 12:49:34 -04:00
nattthebear 8c9f4e24d8 settings infra 2020-05-25 12:49:34 -04:00
adelikat daaa28f451 wire up as much as I can pcecd to TerboGrafix core 2020-05-25 12:49:34 -04:00
adelikat e332096731 wire up more pce core picker 2020-05-25 12:49:34 -04:00
adelikat d9eb9c86ec prep work for pce core picker 2020-05-25 12:49:34 -04:00
nattthebear 0caa087684 recompile all remaining existing cores that weren't compiled since the linkscript change 2020-05-25 12:49:33 -04:00
nattthebear 69d3dbc35f pce: basic rom loading and playing works 2020-05-25 12:49:33 -04:00
nattthebear d82d67996f Rework controller config
What _was_ this?  A new categoryLabel abstraction was added so we'd need fewer hacks, but in order to use it you need to add extra hacks to it per core?  Nonsense code, too.  Fix it properly.  (Maybe; I didn't test it.  Why bother?  No one else puts any effort into this either.)
2020-05-25 12:49:33 -04:00
nattthebear 257aa991fd progress, or regress, or somegress 2020-05-25 12:49:33 -04:00
nattthebear 24286be735 Linking and unwinds
The goal here is to provide an unwind implementation that works.  We (probably) don't have a working ldso, so reconfigure libunwind to work without that.  To do that, it needs __eh_frame_* variables which it can addressof to find the locations of .eh_frame and .eh_frame_hdr.  There is no way I could get gold to add these at all, so switch back to ld and add a custom linkscript.  The custom linkscript gives us the opportunity to simplify the savestate memory mapping stuff inside ElfLoader, which should knock a bit of time off of state loads -- those VirtualProtect calls are not cheap.  This also removes a potential source of nondeterminism with certain clever out of range pointers.

Any waterbox core that I didn't recompile for this commit will assert now until it is recompiled, because .wbxsyscall is in the wrong palace.
2020-05-25 12:49:32 -04:00
nattthebear 815d49bd63 cap nullemulator to <=200fps
realistically, about 160-165fps for me
2020-05-25 12:49:32 -04:00
nattthebear a1ce5e514c Some changes, most notably syscall cleanup 2020-05-25 12:49:32 -04:00
nattthebear a213423efd recompile libcxx and friends with nopic nopie, and recompile libsnes to test it out
once again, roughly 10% filesize savings.  seems to be about 3% faster too
2020-05-25 12:49:32 -04:00
nattthebear c8d558a275 fix set_thread_area + get_thread_area, recompile libc nopic nopie
So far I've only recompiled gpgx against the new libc, but I get a 10% smaller wbx file, which is cool
2020-05-25 12:49:32 -04:00
nattthebear 0f65351e13 Marching onward 2020-05-25 12:49:31 -04:00
nattthebear 2de9c1d117 Teach yourself C++ in 5000 easy crashes 2020-05-25 12:49:31 -04:00
nattthebear 39c0402bd8 Starting to work on some api stuff
ngp only for now
2020-05-25 12:49:31 -04:00
nattthebear 9f358bc8cc pcfx compiles 2020-05-25 12:49:31 -04:00
nattthebear 9fe80952ff zlib blah blah 2020-05-25 12:49:30 -04:00
nattthebear fa139cbcf8 lynx and wonderswan compile
At least one of these is in need of upstream updates, so maybe we waterbox them, maybe we don't
2020-05-25 12:49:30 -04:00
nattthebear e892dcef82 milestone: vb and ngp compile 2020-05-25 12:49:30 -04:00
nattthebear 311b549b6f Add mednafen sobmodule 2020-05-25 12:44:22 -04:00
adelikat 4e3ae130e2 move some logic out of TasLagLog that belongs at the caller level 2020-05-24 19:56:29 -05:00
alyosha-tas 43e796d256 SubGBHawk: no longer add vblank count to header 2020-05-24 18:37:24 -04:00
adelikat c22e02d22b ToTasMovie() extension method - remove vestigial default bool param 2020-05-24 17:10:14 -05:00
adelikat 0acb697808 use MovieService more 2020-05-24 16:43:04 -05:00