Commit Graph

19843 Commits

Author SHA1 Message Date
Peter Jorgensen 3958348e94
Add auto save state on close (squashed PR #3218)
resolves #1861

* Add configuration for auto-saving state on exit
* Update MainForm to auto save on close game if configured
* Fix config serialization test.
* Revert unnecessary changes to Designer file
* Move autosave configuration into Save States menu off of File
* Undo previous test changes
* Remove explicit size on menu item.
* Fix logic
2022-08-17 14:27:50 +10:00
CasualPokePlayer f1fc05fe60 quick fix some graphical bugs
this isn't right but should suffice in practice most of the time
2022-08-16 17:49:54 -07:00
Morilli 7ffa605b28 BSNESv115: fix crash when audio output is disabled
(fixes 039d822144)
2022-08-17 01:35:02 +02:00
Moritz Bender 039d822144
BSNESv115+: Replace the 'snes_audio_sample' callback with a dynamic audio sample vector to reduce callbacks (#3010)
* BSNESv115+: Replace the 'snes_audio_sample' callback with a dynamic audio sample vector to reduce callbacks

* fix integration for subbsnes core

* reduce buffer allocations
- also make frame setter private now that it's possible
2022-08-15 20:50:26 +02:00
Morilli f1e11dfc36 simplify Stream.ReadAllBytes extension and use it more 2022-08-15 20:35:57 +02:00
CasualPokePlayer 31c7f59e86 fix some edge cases with new zip compression 2022-08-15 10:59:27 -07:00
CasualPokePlayer 0ff4aca182 [Gambatte] Remote control controls and remote control emulation expanded to HuC1 IR and CGB IR (previously only done in HuC3) 2022-08-15 02:49:34 -07:00
YoshiRulz aba3359dde
Add CPP's testroms to GB testroms project 2022-08-14 16:21:27 +10:00
YoshiRulz 18a7201004
Fix building testroms project
fixes b8d5dd899
also addressed code style warnings and fixed a typo in GambatteSuite.BeforeAll
note the last acid suite fail is gone after a recent SameBoy update,
unfortunately the same update added a bunch of fails in the mealybug suite,
though the suite itself needs updating too
2022-08-14 00:33:12 +10:00
YoshiRulz a5652ee3bc
Backport `IEnumerable.Order`/`OrderDescending` shorthand
at time of writing, in .NET 7 preview
https://github.com/dotnet/runtime/pull/70525
2022-08-13 02:18:26 +10:00
Moritz Bender 929432086f
BSNESv115: add dedicated subframe core (#3281)
* BSNESv115: allow subframe inputs

* BSNESv115: Implement ICycleTiming

may be correct, not sure

* BSNESv115: add dedicated subframe core

I have probably overlooked something...

* Don't implement ICycleTiming in the non-subframe core

requires re-implementing the "FrameAdvance" function in the subframe core

* Register previously missing services in the subframe core as well

* Wire up SubBsnes everywhere in the frontend

* Change reset cycle to reset instruction

* Deduplicate some code

* Slightly rework frame advance logic. The main intent here is to prevent a case where two frames are ran within a single "frame." The current code probably wouldn't crash due to that, but best not to do that.
Also make SGB work here. A bit of a joke since you really can only abuse it for subframe resets, but might as well especially with the settings implying it's possible (and someone is bound to complain).

Co-authored-by: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com>
2022-08-10 23:08:44 +02:00
CasualPokePlayer 1a27aae45b update sameboy 2022-08-10 12:34:46 -07:00
CasualPokePlayer b8444f8bd2 update ares 2022-08-10 04:42:38 -07:00
YoshiRulz b1207b9c2c
Further fix test execution on GitLab CI 2022-08-10 19:58:25 +10:00
CasualPokePlayer afb0b8a435 maybe fix tests? 2022-08-10 02:55:01 -07:00
YoshiRulz 4ce1ec2e37
Fix test execution on Linux / GitLab CI 2022-08-10 17:35:32 +10:00
CasualPokePlayer 5be8b0aab9
Zstd Compression (#3345)
Deflate compression in rewinder is now zstd compression
Binary blobs in zip files are zstd compressed (text is uncompresed for user ease).
All wbx cores and resources are re-compressed with zstd, wbx build scripts are changed to account for this. Shaves off a bit with download size and it's faster to decompress to.
2022-08-09 23:33:28 -07:00
CasualPokePlayer 32e8afcedc
Implement hardware accelerated CRC32 and SHA1, using them if possible (#3348)
* 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>
2022-08-09 23:30:17 -07:00
YoshiRulz 0236a820ec
Unindent `RomLoader.MakeGameFromDisc` 2022-08-06 09:22:51 +10:00
YoshiRulz 8f153fd503
Restore PS2 sysID and add some others from RomLoader 2022-08-06 09:22:51 +10:00
CasualPokePlayer 5cd37c76b2 dobie removal cleanup
fixes 89972a3579
2022-08-05 03:32:09 -07:00
YoshiRulz 1452f831af
Fix Lua Wiki export, add more notes to fill in some of the holes
frameadvance loop is documented now so for the first time you can write a script
without reading someone else's :O imagine that
2022-08-05 11:41:24 +10:00
YoshiRulz 7bb4b28093
Remove dumb in `MainForm.WindowTitle` so you can see FPS w/ chromeless
(window title is shown in the toolbar / application switcher on Win and Linux)
2022-08-05 07:23:43 +10:00
YoshiRulz 22a328cd36
Remove unused service props
unused since 1ce8a368d and 70e0954f2, respectively
2022-07-30 09:26:18 +10:00
YoshiRulz 5c48cb96fd
When starting new `.tasproj` from SaveRAM, don't clone array twice 2022-07-30 09:26:06 +10:00
CasualPokePlayer d3c42f5dfc Only shift right by 1 for volume with Gambatte, sounds very close to SameBoy, probably resolves #3338 2022-07-28 17:27:30 -07:00
YoshiRulz ccc11be896
Explicitly discard required-but-unused `IStatable` service prop 2022-07-28 05:51:38 +10:00
YoshiRulz 787b413913
Change Basic Bot's addresses to `ulong?`
fixes empty address fields being saved as `0x0`, see #3326
2022-07-28 05:48:05 +10:00
YoshiRulz 5f572442c4
Save game info to `.bot` files and check when loading (resolves #3340) 2022-07-28 05:27:13 +10:00
YoshiRulz 140e340a8d
Add Analyzer rule to warn of `FirstOrDefault` on list of structs 2022-07-28 03:06:01 +10:00
YoshiRulz 8453c0e44d
Fix exception on opening Play Movie dialog with multiple movies
fixes 9211007a1
2022-07-27 05:08:33 +10:00
YoshiRulz bd58bde07c
Hopefully block edge cases where global `GameInfo` is uninitialised
`Game == null` conditions in `MainForm` ctor looked unreachable, so I changed
them to `Game.IsNullInstance()` which is what I assume was intended, and added
an assert to `RomLoader` in case a bug is introduced later
2022-07-26 07:59:57 +10:00
CasualPokePlayer d84da4ec4b wire up sameboy's rumble 2022-07-25 00:10:46 -07:00
YoshiRulz ea5e8b70d3
Fix compilation of ext. tools 2022-07-25 11:16:42 +10:00
YoshiRulz 8dcea24703
Fix `GameInfo.NullInstance` having a name... why did it have a name 2022-07-25 11:15:19 +10:00
YoshiRulz d796210437
Cancel tool loading when services aren't satisfied (fixes #3329)
also cleaned up other calls
2022-07-25 10:52:02 +10:00
YoshiRulz 070e7035b3
Ensure there can be no edge cases involving SGXCD sysID
breaks config, in case you care about setting a custom save dir for PCE
2022-07-25 08:15:24 +10:00
YoshiRulz 3d42b19797
Pass `VSystemID.Raw.NULL`, not `null`, for `SystemId` 2022-07-25 08:15:17 +10:00
CasualPokePlayer cb468ba806 pull in latest sameboy master, add stub camera pixel callback to prevent nondeterminism, wire disabling joypad bounce as a sync setting, various cleanup 2022-07-24 04:35:03 -07:00
zeromus e2a36c7242 DisplayConfig defaults button should whack the padding back to 0 2022-07-22 16:38:42 -04:00
zeromus 3b181ba6e4 DisplayManager - fix crashes when setting absurdly large padding values (fixes #3321) 2022-07-22 16:09:49 -04:00
tom_mai78101 6eafdf7156 Fixed issue where the Copy button in Basic Bot is not toggled on/off properly.
If the Copy button is enabled, but there is no best attempt recorded, it will crash BasicBot / EmuHawk if it attempts to copy a null Log of the best attempt.
2022-07-23 05:49:50 +10:00
CasualPokePlayer d8fc32f1a8
[mGBA] Add in missing save types 2022-07-21 15:38:59 -07:00
YoshiRulz 0f6e6a5a03
Enable MA0084 and fix noncompliance (except in Cores)
"Local variable should not hide other symbols"
2022-07-22 07:28:32 +10:00
YoshiRulz d142555ec3
Enable MA0066 and fix noncompliance
"Hash table unfriendly type is used in a hash table"
2022-07-22 07:28:31 +10:00
YoshiRulz 41d46dd37d
Fix `%recent%` in Paths config
broken since introduction in 017743133 (pre-1.0 according to GitHub)
also enabled MA0052 "Replace constant Enum.ToString with nameof", which is what
tipped me off to this
2022-07-22 07:28:25 +10:00
YoshiRulz 0309cdc4bc
Disable MEN015 "Use Preferred Terms" (spellcheck)
you're supposed to be able to configure this but I couldn't figure it out
2022-07-22 05:39:03 +10:00
YoshiRulz 9211007a18
Fix bug in `PlayMovie.PreHighlightMovie` heuristics
for the record, the bug was that it had `_movieList[indices[0]]` in the loop
instead of `_movieList[indices[i]]`
2022-07-22 05:06:05 +10:00
YoshiRulz 3f2a07e582
Fix remaining MA0098 code style warnings
"Use indexer instead of LINQ methods"
fixes 17df5673d, forgot I was in the middle of this when I pushed
2022-07-22 04:51:56 +10:00
YoshiRulz 17df5673d2
Enable MA0098 and fix noncompliance
"Use indexer instead of LINQ methods"
2022-07-22 03:51:47 +10:00