Commit Graph

20008 Commits

Author SHA1 Message Date
CasualPokePlayer 2804ad3041 fix crashes in mame due to bad single thread handling 2022-11-17 00:45:42 -08:00
CasualPokePlayer d507246033 c# side for previous commit 2022-11-16 21:33:55 -08:00
CasualPokePlayer 44944e1d70 more simple string and double handling, allow SaveRAM usage with different bios files 2022-11-16 21:32:29 -08:00
CasualPokePlayer d0266816a5 Fix #3448. Support MAME 7z romsets 2022-11-16 17:32:20 -08:00
CasualPokePlayer 4479fec74d Add in the actual c# code for 5ae4470466
Apparently forgot to actually add this in for the commit >:
2022-11-16 15:35:37 -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
CasualPokePlayer a0de42b1b3 remove struct hack, it's not actually needed
out double is System.Double& while double is System.Double, so it doesn't actually trip paramenter verifier
2022-11-15 01:12:31 -08:00
CasualPokePlayer eec86ad81a Use actual doubles for figuring out aspect ratio
Fixes issues when mame sends over < 1 bounds which round down to 0 with a long cast (resulting in div by 0 exceptions)
Also fix some oopsies with incorrect function signatures.
Remove MAME string docs as they aren't really relevant anymore, as only MameGetString handles lua string handling now
2022-11-15 00:57:30 -08:00
CasualPokePlayer 64044845a6 resolve erroneous LibMAME errors due to mame_lua_get_string returning nullptr with an empty string
(now will only do so on an error)
add back in mame_lua_get_double, to be used to resolve other issues (c# code pending...)
2022-11-15 00:37:09 -08:00
CasualPokePlayer 715f4f497c add some missing mame mnemonics 2022-11-11 08:45:02 -08:00
Morilli c21fedc76a BSNESv115+: add option for disabling ppu sprite limit 2022-11-10 23:22:17 +01:00
CasualPokePlayer 066297d5e7
MAME Waterbox (#3437) 2022-11-10 00:05:25 -08:00
YoshiRulz e7e587d625
Restore old behaviour of "Always use recent path for ROMs"
fixes 41d46dd37, see #1574
2022-11-08 06:30:12 +10:00
YoshiRulz 948084a97e
Use `Movie.NotActive` extension instead of negated `IsActive` 2022-11-07 06:10:37 +10:00
YoshiRulz 84cc71e454
Use `DialogResult.IsOk` extension everywhere and clean up 2022-11-07 06:03:55 +10:00
YoshiRulz 36cb62a792
Create and use `ToolStripDropDownItem.ReplaceDropDownItems` extension 2022-11-07 06:03:55 +10:00
YoshiRulz 5df9879842
Refactor `MultiDiskFileSelector.BrowseButton_Click` 2022-11-07 05:27:15 +10:00
YoshiRulz 04f34ac7af
Add `Util.BreakDebuggerIfAttached` helper 2022-11-07 04:37:34 +10:00
YoshiRulz f1f0f1695c
Encapsulate `OpenFileDialog`/`SaveFileDialog` 2022-11-05 09:10:11 +10:00
YoshiRulz 2db5235319
Cache and reuse `FilesystemFilterSet`s 2022-11-05 09:10:11 +10:00
YoshiRulz 1232157cc1
Improve caching of `FilesystemFilterSet.ToString` 2022-11-05 09:10:11 +10:00
YoshiRulz 1b5ec471e0
Disable SA1015 "Closing generic bracket should be followed by a space" 2022-11-05 09:10:11 +10:00
YoshiRulz c153505b58
Invert some conditionals to reduce nesting 2022-11-05 09:10:10 +10:00
YoshiRulz df63853cd5
Add `IDialogParent` interface to a couple of config dialogs 2022-11-05 09:10:05 +10:00
YoshiRulz 8949b1aa6b
Make sure `CheckLib` in `Program` static ctor disposes GUI properly 2022-11-04 07:08:54 +10:00
YoshiRulz c891cc2cb5
Don't ignore mGBA skip BIOS setting when recording (resolves #2465)
also disable skip BIOS with TAS profile and enable with Casual profile
also removed `DeterministicEmulation ||= !SkipBios`, does it matter?
2022-11-03 12:04:16 +10:00
YoshiRulz 77f824ab55
Clean up `MGBAHawk.DeterministicEmulation` assignment 2022-11-03 11:56:01 +10:00
YoshiRulz 13a01340de
Refactor Libretro ControllerDef generation, fixing input display
see #3360
2022-11-03 11:02:53 +10:00
YoshiRulz 781c152bf6
Remove old ControllerDef copying that was messing with ControlsOrdered 2022-11-03 11:02:52 +10:00
YoshiRulz a8f571f2d6
Reinstate `GameInfo.NullInstance`'s name, and only instantiate it once
reverts 8dcea2470
`PathEntryCollection.RetroSystemAbsolutePath` extension didn't like this, there
may be others, and I don't want to look through them all
2022-11-03 11:02:44 +10:00
YoshiRulz 3e79e68d1d
Dedup in `CheatEdit.GetCheat` 2022-11-02 01:05:12 +10:00
YoshiRulz 414c21609b
Disallow updating cheats when multiple rows selected (resolves #1726) 2022-11-02 01:01:09 +10:00
YoshiRulz 5ae23c63bf
Change "Edit" button in Cheats dialog to read "Overwrite"
kept the mnemonic because idk
2022-11-02 01:00:16 +10:00
YoshiRulz fd2772707b
Update `forms.drawImageRegion` documentation with a diagram
only embeds on TASVideos Wiki, which I held off on updating because there are a
lot of changes and we can do them all at once
2022-10-30 18:19:23 +10:00
CasualPokePlayer 8ee75879e6 Rework MAME integration a bit
The periodic callback is now used as a way to service "commands" sent from the main thread
Upon servicing a command, the mame thread will set the current command to NO_CMD then wait for the main thread allow the mame thread to continue
During this wait, the main thread may optionally set the next command (done here for STEP -> VIDEO), ensuring the next callback will service that command
A dummy "WAIT" command can be sent to trigger this waiting behavior, allowing the main thread to safely touch mame while the mame thread is frozen (important for mem accesses and probably savestates?)

A/V sync is also reworked. We can assume that 1/50 of a second worth of samples will be sent each sound callback. We can also assume 1/FPS of a second worth of time will be advanced each frame advance
So, we can just give hawk 1/FPS worth of samples every GetSamplesSync, if they are available. If we have less (probable on first few frames), we'll just give all the samples, and hope it balances out later.
2022-10-29 17:07:50 -07:00
CasualPokePlayer cc71882059
BSNES Memory Domain Fixes (#3423)
* Use SameBoy submodule symlink for BSNES

* SGB memory domains

* Fix SGB saveram issues (extra data like rtc will be saved correctly now here)

* Various cleanups, avoid unneeded unsafe use, a little better EnterExit use

Co-authored-by: Morilli <35152647+Morilli@users.noreply.github.com>
2022-10-28 19:22:49 -07:00
YoshiRulz 02d1542e40
GitLab CI: Switch to Alpine Docker images where possible
partially reverts cdeec7cfb
2022-10-27 15:53:02 +10:00
Morilli 256a8617e9 Fix #3399 by always calling UpdateViewerMouseover 2022-10-27 01:30:41 +02:00
YoshiRulz cdeec7cfb4
GitLab CI: Pin Nix Docker image 2022-10-24 20:25:23 +10:00
CasualPokePlayer 2d6c0af570 Fix oops from fe9e97e505 2022-10-21 18:58:08 -07:00
CasualPokePlayer fe9e97e505 Fix #3425 2022-10-21 18:52:18 -07:00
Morilli e073173a8c Update make-all-cores.sh 2022-10-22 03:18:59 +02:00
CasualPokePlayer dd33e92a9f ensure ClockRate in the Bk2Header uses . instead of , 2022-10-21 02:34:59 -07:00
CasualPokePlayer c8d4e606af suppress updates while rebooting core, fixes #3424 2022-10-21 02:19:22 -07:00
CasualPokePlayer b81728b2dc Correctly account for multiboot GBA ROMs, fixes #3421 2022-10-20 02:42:31 -07:00
CasualPokePlayer 8f1a0b9bb1 update melonds (TODO: Wire up camera) 2022-10-20 00:47:16 -07:00
Prcuvu ad85be7bed
Register TCM areas for melonDS core (#3420)
* Register TCM areas for melonDS core

* reorder mem domains a bit, add TCM to ARM9 System Bus, build

Co-authored-by: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
2022-10-19 23:47:42 -07:00
CasualPokePlayer f29113287e add Jaguar to MultiDiskBundler menu 2022-10-11 21:51:26 -07:00
YoshiRulz cbe298b467
Nix expr: Add FlatBuffers package
fixes 158c897702
2022-10-12 14:08:50 +10:00