Commit Graph

294 Commits

Author SHA1 Message Date
6f25e20c6a VideoCommon: reset some CP registers during PI_FIFO_RESET
This fixes the shutdown error in SpongeBob Globs of Doom.
2025-05-05 21:18:37 +01:00
ac76deaef0 Merge pull request #13529 from jordan-woyak/StateBuffer
Core/State: Avoid unnecessarily value-initializing large buffers.
2025-04-22 16:30:51 -05:00
660232a12c Preliminary implementation of the Triforce Baseboard 2025-04-21 22:05:25 +10:00
ac3dbe2294 Core/State: Use UniqueBuffer instead of make_unique and std::vector for save state buffers. 2025-04-19 17:29:56 -05:00
ad3650abfc Merge pull request #13093 from mitaclaw/ranges-modernization-4-projection
Ranges Algorithms Modernization - Projection
2025-03-23 15:56:13 -04:00
951a84833a EXI: fix AD16
The GameCube IPL is now able to detect this device. However, this
triggers some memory clearing code that trips up Dolphin's I$.
2025-03-15 22:03:16 +00:00
c191ed5321 VertexShaderManager: Eliminate unnecessary m_viewport_correction member. 2025-03-11 03:55:57 -05:00
ff4486ee23 Merge pull request #13340 from Dentomologist/state_show_decompressing_osd_longer
State: Show "Decompressing State..." OnScreenDisplay message for longer
2025-03-10 15:04:50 -04:00
c9f589faa5 Modernize std::stable_sort with ranges and projections 2025-03-09 13:26:38 -07:00
84e72c185a VideoCommon: drop CP MMIO registers that were probably added in the wrong place
I think someone confused these with the actual token and bounding box
registers in PE, which were added later. In CP they never did anything
and it's suspicious that they have the same addresses as their PE
counterparts. On real hardware they always read as zero.
2025-02-08 11:46:49 +00:00
363155b597 State: Increase Decompressing OSD message duration
Show the "Decompressing State..." message for 2 seconds, instead of the
half-second duration that caused it to be halfway faded out immediately.
2025-02-06 17:17:18 -08:00
d92c68e1de Simplify std::find_if with Common::Contains 2025-01-01 09:52:03 -08:00
937bb2aa2e Cache normals in addition to binormals and tangents
Fixes LIT (https://bugs.dolphin-emu.org/issues/13635). The text does not include normals, but has lighting enabled. With the previous default of (0, 0, 0), lighting was always black (as dot(X, (0, 0, 0)) is always 0). It seems like the normal from the map in the background (0, 0, 1) is re-used.

LIT also has the vertex color enabled while vertex color is not specified, the same as SMS's debug cubes; the default MissingColorValue GameINI value of solid white seems to work correctly in this case.
2024-10-12 10:32:41 -07:00
618b41a459 Use 'contains' method 2024-08-14 22:18:28 +02:00
962230f91e Core: Store current state in less places
Core::GetState reads from four different pieces of state: s_is_stopping,
s_hardware_initialized, s_is_booting, and CPUManager::IsStepping.
I'm keeping that last one as is for now because there's code in Dolphin
that sets it directly, but we can unify the other three to make things
easier to reason about.

This commit also gets rid of s_is_started. This was previously used in
Core::IsRunningAndStarted to ensure true wouldn't be returned until the
CPU thread was started, but it wasn't used in Core::GetState, so
Core::GetState would happily return State::Running after we had
initialized the hardware but before we had initialized the CPU thread.
As far as I know, there are no callers that have any real need to know
whether the boot process is currently initializing the hardware or the
CPU thread. Perhaps once upon a time there was a desire to make the
apploader debuggable, but a long time has passed without anyone stepping
up to implement it, and the way CBoot::RunApploader is implemented makes
it rather difficult. So this commit makes all the functions in Core.cpp
consider the core to still be starting until the CPU thread is started.
2024-06-21 20:46:44 +02:00
22aa88109f Use a stub AchivementManager when USE_RETRO_ACHIEVEMENTS isn't defined
This lets us reduce the number of USE_RETRO_ACHIEVEMENTS ifdefs in the
code base, reducing visual clutter. In particular, needing an ifdef for
each call to IsHardcodeModeActive was annoying to me. This also reduces
the risk that someone writes code that accidentally fails to compile
with USE_RETRO_ACHIEVEMENTS disabled.

We could cut down on ifdefs even further by making HardcodeWarningWidget
always exist, but that would result in non-trivial code ending up in the
binary even with USE_RETRO_ACHIEVEMENTS disabled, so I'm leaving it out
of this PR. It's not a lot of code though, so I might end up revisiting
it at some point.
2024-06-06 08:26:20 +02:00
0df401b164 Core::IsRunning: Avoid Global System Accessor 2024-05-01 08:54:17 -07:00
0627209131 Add DoState to AchievementManager
While state loading is not allowed in the hardcore mode that most players will use, it is allowed in softcore mode; more importantly, if something fails to unlock or unlocks when it shouldn't in either mode the player can create a save that retains the current achievement state.
2024-05-01 06:43:20 -04:00
6e6b298030 Core::RunOnCPUThread: Avoid Global System Accessor 2024-03-28 10:10:03 -07:00
3948ac9513 Merge pull request #12606 from mitaclaw/state-global-system
State: Avoid Global System Accessor
2024-03-22 04:27:12 +01:00
f922129255 Core/State: Display messages on state write failures. 2024-03-20 20:38:04 -05:00
0d4cb5ddc7 State: Avoid Global System Accessor 2024-03-01 10:52:50 -08:00
d3140e72c3 Core: Fix crash when inspecting a savestate with a timestamp that causes localtime() to error out. 2024-02-18 04:45:37 +01:00
9a3e770c23 Migrate SConfig::bWii to System. 2024-01-31 12:54:07 +01:00
8d515d407c Migrate SConfig::m_is_mios to System. 2024-01-30 03:45:17 +01:00
6a86b35e88 State: Make use of re-entrant variant of localtime
Makes this member function thread-safe. We can also unify the string
handling to make it easier to maintain.
2024-01-23 15:28:30 -05:00
95cba6be2b Core/Movie: Refactor to class, move to System.
A bit of global state remains (the `header` in `BeginRecordingInput()`) due to unclear lifetime requirements.
2024-01-15 08:05:30 +01:00
5a633f0bcf Core/IOS/WiiIPC: Add missing variables to savestate. 2024-01-12 06:37:11 +01:00
3b0444be6b Core/DSPHLE: Move HLEAccelerator instance into AXUCode. 2024-01-08 03:53:52 +01:00
e55f9ed102 AchievementManager: Make GetInstance() return a reference
The internal static member will always have a valid lifetime. Makes this
consistent with other instance based objects in our code.
2023-12-11 13:36:39 -05:00
2c40d6ba31 Disable loading state in hardcore mode
While saving states is allowed (especially for the purpose of debugging), RetroAchievements does not allow loading saved states when hardcore mode is on.
2023-12-02 16:41:15 -05:00
095f946b66 Core: update State version due to adding XFStateManager 2023-11-26 16:30:54 -06:00
2333fc2701 MMU: Use VSID in segment register as additional TLB lookup key 2023-11-11 15:59:47 +00:00
437946fb1a Core/State: Refactor logic for determining the relative age of existing savestates.
The code previously did this indirectly via `std::map<double, int>`, the key being the timestamp, which required a questionable workaround for the case where multiple states have the same timestamp. By having a particular combination of timestamps in the on-disk savestates, you could cause this workaround to infinitely loop, locking up Dolphin. This avoids this completely by refactoring the logic and just using `std::vector` instead.
2023-10-30 19:19:01 +01:00
99a3bbc055 Core/State: Return an empty string on invalid input to SystemTimeAsDoubleToString(). 2023-10-30 19:19:01 +01:00
cddc75c28b Core: Fix UI slowdown for savestate timestamp reads 2023-10-26 22:32:47 -04:00
1eaa9380dd Savestates: Use LZ4 algorithm for faster decompression 2023-10-08 20:45:49 -04:00
b2ee958058 IOS/WiiSockMan: Move instance to IOS Kernel. 2023-04-18 01:24:10 +02:00
23843583bf PowerPC: Refactor to class, move to System. 2023-04-09 21:48:37 +02:00
4c21cdd0e6 HW/DVDInterface: Do DTK math in blocks instead of in samples. 2023-03-14 13:19:44 +01:00
43a5d506c8 Merge pull request #11644 from deReeperJosh/trapteamaudio
Skylander Portal: Play Trap Team Audio
2023-03-14 01:29:20 +01:00
026b6a3e0f HW: Pass System to functions. 2023-03-13 18:13:20 +01:00
f27e8216a5 Skylander Portal: Play Trap Team Audio
Asserts and length handling
2023-03-13 13:01:48 +13:00
2102e64299 HW/VideoInterface: Savestate members individually. 2023-03-11 12:48:02 +01:00
debed35c10 State: Fix shadowing warnings 2023-02-09 16:23:02 -08:00
aaad0cd39f Merge pull request #11539 from phire/improve_workqueuethread
Various WorkQueueThread improvements
2023-02-09 20:00:04 +13:00
05fad53fa0 Update STATE_VERSION
Co-authored-by: BhaaL <bhaalsen@gmail.com>
2023-02-09 18:36:20 +13:00
11de923dcb Move xfb tracking and IR scaling out of RenderBase 2023-02-09 18:36:20 +13:00
7c4fcc30a3 WorkQueueThread: provide name and function at same time 2023-02-04 15:56:27 +13:00
acdb0c5be1 WorkQueueThread: Implement thread name
Otherwise we will end up with a dozen threads named "WorkQueueThread"
2023-02-04 14:58:12 +13:00