I'm pretty sure all the existing instances were intended to use `default(T)` if
the key isn't present, except maybe the cheatcode converters but I don't care to
rewrite those at the moment
Cleanup this code so it plays nicer with BizHawk's "run everything on the main thread" (+ WinForms not playing nice with async methods)
Resend any game session start / achievement unlocks / leaderboard triggers if they failed. Wait for all achievement unlocks and leaderboard triggers to finish on Dispose() (mostly for catching them when user closes BizHawk)
Update rcheevos to 10.7.0
* Use source generator for VersionInfo
* Remove leftover hacks
* Use same fallbacks as NixHawk when Git not available
---------
Co-authored-by: YoshiRulz <OSSYoshiRulz@gmail.com>
Update rcheevos, and with that add in the new DSi console ID
Experimentally revamp the build system, I'm looking into cmake here and it seems to do a great job. The builds committed here were built with clang-cl 15.0.1 and clang 15.0.7 (for Windows and Linux respectively). gcc/clang with msys2 still works fine. gcc on Linux should still work fine. MSVC (cl) itself even works (although as a note, it doesn't work with lto (/GL) due to the force everything exported flag I set). The old Makefile is still kept for future reference.
combine NLua with KeraLua (KeraLua is "gone" now I guess)
make it use the BizInvoker (so now it can properly handle the liblua5.4.so and lua54.dll names differing), also delete the liblua54.so.
minor speedup when creating a new empty table
make lua default to UTF8 internally, so we don't need to manually change the state's encoding
While msabi and sysv do agree what to do with floating point args for 4 floating point args (pass in xmm0-4), they dont agree what to do with mixing
msabi will choose the register corresponding with argument position. so if you have (int foo, float bar), bar will use xmm1
sysv instead will choose the first register available in the group. so with the previous example, you instead have bar using xmm0
the simple solution is to simply prohibit mixed args for now. maybe someday we could support mixing, but that's probably overkill (best use a struct at that point)
make a small dll for handling the msabi<->sysv adapter, using only assembly (taken from generated optimized rustc output) and handcrafted unwind information (c# exceptions in a callback seem to work fine in testing)
additionally, allow floating point arguments. this really only needs to occur on the c# side. msabi and sysv agree on the first 4 floating point args and for returns, so no work actually has to be done adapting these
with assembly being used, we can guarantee rax will not be stomped by compiler whims (and avoid potential floating point args from being trashed)
* Implement hardware accelerated CRC32 and SHA1, use them if possible.
CRC32's generic function is also replaced with zlib's as it is much more performant than our implementation
Full hash of a ~731MB disc took only ~369 ms with this, and the generic CRC32 isn't so far behind at ~659 ms
SHA1 should perform 4x faster if the user's CPU supports the SHA instructions.
Co-authored-by: YoshiRulz <OSSYoshiRulz@gmail.com>
Co-authored-by: Morilli <35152647+Morilli@users.noreply.github.com>