Commit Graph

79 Commits

Author SHA1 Message Date
YoshiRulz bb110d4f5e Minor refactors to other MSBuild files 2024-04-04 10:07:22 +10:00
Morilli b10f8969ac Don't allocate extra buffers in lua [Push|To]String 2024-03-19 12:19:56 +01:00
YoshiRulz d31047ffc3 Use NuGet central package management 2024-02-14 16:24:31 +00:00
CasualPokePlayer e576d1862c update rcheevos for linux 2024-01-16 20:03:58 -08:00
CasualPokePlayer d03d076fa7 several rcheevo updates, mostly for 3DS stuff 2024-01-16 20:00:45 -08:00
James Groom 1e5d11bf84
Increase verbosity of `dotnet build` in CI 2023-12-22 03:20:19 +00:00
CasualPokePlayer cc0b6c0d99 update rcheevos to latest release, change a ton of ints to uints (what's actually used often)
todo: trim out unneeded defs and do c# 10 cleanups
2023-12-09 02:25:40 -08:00
CasualPokePlayer 1441bf98ba pull in some windows specific SDL2 fixes
see https://github.com/libsdl-org/SDL/issues/8617
2023-11-28 13:26:37 -08:00
CasualPokePlayer 20defc890b build newer SDL2 on linux (Debian 10), also pull in some linux specific build fixes 2023-11-25 17:49:49 -08:00
CasualPokePlayer f40e68e903 add in cmake scripts for building SDL2
this gives us a great level of control over how we build SDL2, omitting parts we don't want, and including parts we do want, like libusb support!
windows sdl2 normally doesn't support libusb, but with some magic it can be built and linked in fairly easily, giving windows sdl2 libusb support.
libusb support in sdl2 means official GC adapter support! (resolves #1879)

linux build will be done in a later commit
2023-11-24 22:33:19 -08:00
James Groom a605443590
Mute code style warnings in iso-parser 2023-11-24 05:28:41 +00:00
CasualPokePlayer 1909950742 Rebuild most of the .so's on Debian 10
Also fix up libbizhash so it builds on clang
Slight fixes to sameboy and msxhawk makefiles
Fix rcheevo submodule commit (no actual changes, just make it point to a commit upstream actually has)
SDL2 .so not yet rebuilt, need to consider how to do that
citra seems to need at least Debian 11 to build
libe_sqlite3.so seemed to have already been built with Debian 10 so not bothering touching that
libwaterboxhost.so is Rust / targets glibc 2.28 anyways, nothing needs to be done there
2023-11-22 00:50:47 -08:00
CasualPokePlayer 33a512235a Fix NRE for lua cothreads
fixes ba24907d9c
2023-11-17 19:46:59 -08:00
CasualPokePlayer ba24907d9c Improve NLua lua library loading, using C# function pointers. It now no longer depends on BizHawk.BizInvoke/BizHawk.Common. It might be faster too
Add in liblua-* variant for Linux lua library names (resolves #3678)
Remove some more unused NLua code
Make LuaState internal, we don't need to see it (NLua.Lua API slightly changed to accommodate this, tests could be broken due to this?)
Make various other NLua classes internal, we don't need to see them
Check against lua library loading failing, provide a non-fatal message box if it has failed instead of crashing on some exception.
Remove UnixSearchPaths (unneeded with LD_LIBRARY_PATH being set) and unused IImportResolvers
2023-11-17 19:03:03 -08:00
CasualPokePlayer cef72bef4b try to fix crashes under Mono when calling a cached function with the wrong arguments 2023-11-16 09:08:20 -08:00
CasualPokePlayer fba66c3d28 re-enable analyzer for NLua 2023-11-16 03:15:44 -08:00
CasualPokePlayer 582446651f fix all the analyser warnings in NLua 2023-11-16 03:14:47 -08:00
James Groom b961aa2ec5
Allow NLua to be built again 2023-11-16 15:46:03 +10:00
Morilli 7d4b21f9c7 Fix some analyzer warnings
also improve globalconfig readability
2023-11-03 11:56:23 +01:00
CasualPokePlayer 7e5efea4bc fix symlinks in BizHawk.SrcGen.SettingsUtil 2023-11-03 02:33:45 -07:00
James Groom dae3fe3803
Fix import placement in Analyzers
fixes 362269c98, presumably, and f2a479410
2023-10-26 23:03:14 +10:00
CasualPokePlayer 00e0a5fb2a fix default value arrays source generation
this change doesn't actually do anything since we don't even have arrays in default values
2023-10-25 22:55:46 -07:00
CasualPokePlayer f2a4794105 Use source generation for SettingsUtil.SetDefaultValues 2023-10-25 22:52:06 -07:00
Morilli 71e08e27b9 bump AnalysisModePerformance to Recommended
fixes CA1841

silence CA1805 and CA1822 because of sheer amount of violations

reduce severity of CA1838 because I don't wanna fix it lol
2023-08-14 14:18:45 -07:00
Morilli 8e557b0b9d bump AnalysisModeGlobalization to Recommended
fixes CA1304, CA1309, CA1310, CA1311

temporarily silences CA1305

reduce severity of CA2101
2023-08-14 14:18:45 -07:00
Morilli 8a46af0b25 Fix lua project with analyzer change 2023-05-24 18:44:21 +02:00
YoshiRulz 4a752f66b7
Add Analyzer to require checking or discarding `TryGetValue`
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
2023-05-05 06:27:15 +10:00
CasualPokePlayer 5f6d70ac46 Fix random crashes with rcheevos. The issue was that rc_runtime_t can store pointers to itself, which is bad when rcheevos expected the user to allocate that struct and did not provide functions for that. I've added that functionality and PR'd it (I'll fixup submodule to point to upstream when it's merged)
PR can be found here: https://github.com/RetroAchievements/rcheevos/pull/239
Also minor fixes wrt the ContinueWith usage in InternalDoRequest
2023-05-03 01:54:57 -07:00
YoshiRulz 8a5921182e
Add Analyzer to disallow discarding locals e.g. `_ = result;`
fixes 70bd081a9, a2185d9ef
2023-04-29 01:52:43 +10:00
YoshiRulz b5e2a0c422
Move some .gitignore entries to nested dirs 2023-04-19 15:59:34 +10:00
CasualPokePlayer 4268c50617 Fix RetroAchievements rich presence not working
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
2023-04-18 21:35:58 -07:00
YoshiRulz ebd36f08b6
Downgrade `System.Drawing.Common` to 6.0.0 and enable Unix impl.
fixes 65ffa3fc2
testroms run now, CBB checking GambatteSuite runs but I'm guessing it does too
2023-04-16 10:49:18 +10:00
YoshiRulz a1fe557d31
Re-enable MA0020 and fix noncompliance 2023-04-16 09:02:40 +10:00
YoshiRulz 65ffa3fc2e
Blindly update NuGet deps
temporarily disabled MA0020
2023-04-16 09:02:40 +10:00
YoshiRulz da65ad6226
Fix CS0168 warning 2023-04-16 09:02:36 +10:00
Moritz Bender ddc3e929e9
Use source generation for VersionInfo (#3625)
* Use source generator for VersionInfo

* Remove leftover hacks

* Use same fallbacks as NixHawk when Git not available

---------

Co-authored-by: YoshiRulz <OSSYoshiRulz@gmail.com>
2023-04-12 21:14:44 +02:00
CasualPokePlayer 03aa420bd5 fix last issue in #2951 properly 2023-04-09 23:43:28 -07:00
YoshiRulz 389fd5015f
s/ProjectDir/MSBuildProjectDirectory/ in MSBuild include files
I don't think anything was broken, this is just a precaution
2023-03-16 12:39:26 +10:00
YoshiRulz 38b5f16ccc
Refactor enable Roslyn Analyzers flag
kept the old name, but turns out `-p:RunAnalyzersDuringBuild=true` also works
...good thing the old name wasn't documented
2023-03-16 12:39:25 +10:00
CasualPokePlayer 27eef71085 Fix some more edge cases against PSX RetroAchievements hashing (and do it a bit nicer)
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.
2023-02-19 23:42:33 -08:00
CasualPokePlayer b11bb4fc22 fix check for IsParamsArray
fixes #3513
2023-01-10 05:53:58 -08:00
YoshiRulz e2ca00c8c4
Fix symlinks cp'd as regular files
fixes 339915c01
2022-12-24 12:35:40 +10:00
CasualPokePlayer 2c75e9bf96 remove this unneeded using of System.Drawing (i don't know how that got here) 2022-12-20 23:32:12 -08:00
CasualPokePlayer 91ce98ef12 better handle lua on linux, be compatible with lua 5.3 (we don't actually use any API exclusive to 5.4 so no real change in this case) 2022-12-20 23:30:33 -08:00
CasualPokePlayer 339915c013 check-in NLua to main repo
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
2022-12-17 21:51:10 -08:00
dependabot[bot] 6edac4bd2f
Bump System.Drawing.Common in HawkQuantizer (#3463)
Bumps [System.Drawing.Common](https://github.com/dotnet/runtime) from 5.0.2 to 5.0.3.
- [Release notes](https://github.com/dotnet/runtime/releases)
- [Commits](https://github.com/dotnet/runtime/compare/v5.0.2...v5.0.3)

---
updated-dependencies:
- dependency-name: System.Drawing.Common
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-02 01:22:18 +10:00
CasualPokePlayer 92c1cdff22
RetroAchievements Support (#3407) 2022-11-30 23:51:17 -08:00
CasualPokePlayer 5ae4470466 Correct floating point arg support with msabi<->sysv adapter
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)
2022-11-16 15:26:31 -08:00
CasualPokePlayer 62c3b4b8e3
Use a small dll for handling the msabi<->sysv adapter (#3451)
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)
2022-11-16 09:02:13 -08:00
YoshiRulz 7efafc18da
Extract helper code for Analyzers and Source Generators 2022-10-01 04:13:55 +10:00