Commit graph

31828 commits

Author SHA1 Message Date
JMC47
59e8aacf42
Merge pull request #10745 from JosJuice/softmmu
JitArm64: Implement "soft MMU"
2022-07-08 15:55:49 -04:00
JMC47
828afc6735
Merge pull request #10673 from iwubcode/spirv-backends
D3D: Generate HLSL from SPIRV*
2022-07-08 15:29:58 -04:00
Dentomologist
e1e0f42b37 VideoCommon: Fix D3D shader warning X3557 (single iteration loop)
Fix warning "loop only executes for 1 iteration(s), forcing loop to
unroll" when vertex_in == 1
2022-07-08 00:25:55 -07:00
Dentomologist
71541c1324 VideoCommon: Fix D3D shader warning X4000 (uninitialized variables)
Initialize alpha_A and alpha_B. They were previously only initialized in
cases where they were used, but D3D isn't able to figure that out.
2022-07-08 00:25:14 -07:00
Dentomologist
0fac1d6e87 VideoCommon: Fix D3D shader warning X3571 (negative base for pow())
Add abs() to fix "pow(f, e) will not work for negative f, use abs(f) or
conditionally handle negative values if you expect them".
2022-07-08 00:19:05 -07:00
Merry
3092f40e9f Arm64Emitter: Simplify LogicalImm logic
Heavily simplify logical immediate encoding.

This is based on the observation that if a valid repeating element
exists, it repeats through `value`. Thus it does not matter which
one you analyse. Thus we skip over the least significent element
if LSB = 1 by masking it out with `inverse_mask_from_trailing_ones`,
to avoid the degenerate case of a stretch of 1 bits going 'round
the end' of the word.
2022-07-07 22:53:36 +01:00
Admiral H. Curtiss
eccf527bf6
Merge pull request #9147 from jordan-woyak/imu-accel-weight-setting
WiimoteEmu: Expose IMU pointing accelerometer weight setting.
2022-07-07 23:17:47 +02:00
Admiral H. Curtiss
ccdb909d06
Merge pull request #10710 from jordan-woyak/rename-range
DolphinQt: Renamed "Range" to "Multiplier" in advanced mapping window and improved UX.
2022-07-07 23:04:11 +02:00
JMC47
7321802b4b
Merge pull request #10811 from Pokechu22/bs2-dfi-typo
BS2Emu: Fix DFI typo
2022-07-06 03:23:55 -04:00
Pokechu22
263d2a419a BS2Emu: Fix DFI typo 2022-07-05 17:15:59 -07:00
OatmealDome
c6eb5e2623 FileUtil: Only attempt to write to the destination in Copy if there is actually content to write 2022-07-05 15:13:20 -04:00
Admiral H. Curtiss
24498ca315
Merge pull request #10712 from tellowkrinkle/ControllerLocks
InputCommon/ControllerEmu: Use more locks
2022-07-05 11:39:48 +02:00
Admiral H. Curtiss
de3d1344d5
Merge pull request #10762 from CasualPokePlayer/fix_slow_audio_desyncs
Reduce gradual audio desyncing in dumps and apply the correct sample rate for GameCube audio
2022-07-05 11:37:30 +02:00
CasualPokePlayer
4234b25682 Do not directly store input sample rate, rather just store a divisor for that sample rate, with it using a fixed dividend of 54000000 * 2.
This should reduce (but not completely eliminate) gradual audio desyncs in dumps. This also allows for accurate sample rates for the GameCube.
Completely eliminating gradual audio desyncs will require resampling to an integer sample rate, as nothing seems to support a non-integer sample rate.
2022-07-03 15:07:06 -07:00
schthack
01ada3850f BBA: Added BuiltIn device that allow BBA emulation without the need of a TapDevice Configuration include a dns server setting 2022-07-02 18:02:50 -04:00
Admiral H. Curtiss
3bcd7aced9
Merge pull request #8467 from CookiePLMonster/interruptable-shader-precompile
Make shader precompilation interruptable
2022-07-02 13:08:37 +02:00
Admiral H. Curtiss
2f228310af
Merge pull request #10794 from TryTwo/PR_MemoryWidget_Cell_Edit
Debugger MemoryViewWidget: Allow direct editing of memory cells.
2022-07-02 13:05:39 +02:00
JosJuice
2a791116f1
Merge pull request #10800 from Pokechu22/registerwidget-crash
RegisterWidget: Fix crash when right-clicking when there is no selected cell
2022-07-02 09:18:28 +02:00
JosJuice
07a15a3228
Merge pull request #10624 from Minty-Meeo/resolve-gcc-warnings
Resolve Linux GCC Warnings
2022-07-02 09:17:44 +02:00
JMC47
b5f4b0dffe
Merge pull request #10803 from Zopolis4/clangingaround
Resolve additional warnings generated by clang
2022-07-02 03:12:34 -04:00
Zopolis4
0f07deb0ef
Remove unused variable in SI_DeviceKeyboard.h left over from SI_DeviceGCController.h 2022-07-02 16:16:54 +10:00
iwubcode
66f5085800 DolphinQt: add word wrap to graphics mods description 2022-07-01 19:31:19 -05:00
iwubcode
8dd4e916a7 DolphinQt: save changes to disk before refreshing mod list 2022-07-01 19:31:19 -05:00
TryTwo
bd59b0a490 Debugger MemoryViewWidget: Allow direct editing of memory cells. 2022-07-01 17:30:24 -07:00
Pokechu22
bf68211878 RegisterWidget: Fix crash when right-clicking when there is no selected cell 2022-07-01 17:13:00 -07:00
Minty-Meeo
69e32dea52 Resolve GCC Warnings 2022-06-30 15:26:48 -05:00
iwubcode
4788a05c76 VideoCommon: fix projection graphics mod affecting more than the intended draw call 2022-06-29 20:04:59 -05:00
JMC47
5d04e1e1de
Merge pull request #10518 from iwubcode/draw-mod
Introducing a 'GraphicsMod' system for creators
2022-06-28 13:35:39 -04:00
JMC47
e50e45f400
Merge pull request #10700 from sepalani/ssl-handshake
Socket: Fix some non-blocking connect edge cases
2022-06-27 21:39:36 -04:00
iwubcode
8aef0015fd DolphinQt: add warning if graphics mods are not enabled 2022-06-27 18:28:28 -05:00
iwubcode
f3054aa99f DolphinQt: add widget in game properties to list the various graphics mods available 2022-06-27 18:22:06 -05:00
iwubcode
1480b78f64 VideoCommon: dump EFB with size and texture format details and dump XFB with size details. Finally move count to front of image for XFB/EFB dumps so as to make it easier to see them in order. Change the count value prefix to 'n' 2022-06-27 18:20:52 -05:00
iwubcode
69839df1eb VideoCommon: support dynamically updating game mods at runtime 2022-06-27 18:20:52 -05:00
iwubcode
892678648e VideoCommon: trigger mod calls in TextureCacheBase (efb/xfb calls), VertexManagerBase (draw calls), and VertexShaderManager (projection calls) 2022-06-27 18:20:52 -05:00
iwubcode
62c186e14b VideoCommon: add UninitializeEFBMemory to mirror XFB function 2022-06-27 18:20:52 -05:00
iwubcode
0f88155729 Core / DolphinQt / VideoCommon: add setting for enabling graphic mods 2022-06-27 18:20:52 -05:00
iwubcode
f416b71925 VideoCommon: add logic to handle a GraphicsMod while Dolphin is running 2022-06-27 18:20:52 -05:00
iwubcode
254246b814 VideoCommon: add logic to read a GraphicsMod from configuration 2022-06-27 18:20:52 -05:00
Jordan Woyak
87fb42b64c DolphinQt: Renamed "Range" to "Multiplier" in advanced mapping window. Removed the slider. Moved the spin box. 2022-06-26 22:52:20 -05:00
Jordan Woyak
4c409411ed DolphinQt: Don't show the advanced input settings on the main dialog. 2022-06-26 22:48:13 -05:00
Jordan Woyak
80d9e79cf1 ControllerEmu: Allow settings to be categorized as "advanced". Make "Virtual Notches" and "Gate Size" categorized as such. 2022-06-26 22:42:16 -05:00
Jordan Woyak
643f82539c ControllerEmu: Expose gate size setting for octagon analog sticks. 2022-06-26 22:33:44 -05:00
iwubcode
f92beb611f VideoCommon: add game mod constants 2022-06-26 21:53:21 -05:00
iwubcode
3857e1fa66 Core: add GraphicsMod directory 2022-06-26 21:53:21 -05:00
iwubcode
4fbbd85ef4 VideoCommon: create variables for EFB/XFB copy prefix. Reword prefix to 'efb1' and 'xfb1' to match textures 2022-06-26 21:53:21 -05:00
iwubcode
b9995b04a0 VideoCommon: add a way to get have a graphics directory count for all games by using a special 'all.txt' instead of a 'gameid.txt' file 2022-06-26 00:45:13 -05:00
iwubcode
7854afe512 VideoCommon: add support for setting and getting the stage from the texture info 2022-06-26 00:45:13 -05:00
iwubcode
a1892a9c68 VideoCommon: add function to check whether TextureFormat is a valid value 2022-06-26 00:45:13 -05:00
Pokechu22
76401e8ffb BS2Emu: Initialize the last rows of postMatrices to the identity matrix
This fixes Datel titles having missing textures (which was an issue with the previous commit).
2022-06-25 17:29:49 -07:00
Pokechu22
b2ddffeeb1 BS2Emu: Set HID0/1/2/4 and MSR with correct default values
These values were obtained by setting a breakpoint at a game's entry point, and then observing the register values with Dolphin's register widget.

There are other registers that aren't handled by this PR, including CR, XER, SRR0, SRR1, and "Int Mask" (as well as most of the GPRs). They could be added in a later PR if it turns out that their values matter, but probably most of them don't.

This fixes Datel titles booting with the IPL skipped (see https://bugs.dolphin-emu.org/issues/8223), though when booted this way they are currently missing textures. Due to somewhat janky code, Datel overwrites the syscall interrupt handler and then immediately triggers it (with the `sc` instruction) before they restore the correct one. This works on real hardware due to icache, and also works in Dolphin when the IPL runs due to icache, but prior to this change `HID0.ICE` defaulted to 0 so icache was not enabled when the IPL was skipped.
2022-06-25 14:27:29 -07:00
Pokechu22
9675faa232 DSPHLE: Properly reflect initial halt state in mail handler
DSPHLE::Initialize sets the halt and init bits to true (i.e. m_dsp_control.Hex starts as 0x804), which is reasonable behavior (this is the state the DSP will be in when starting a game from the IPL, as after `__OSStopAudioSystem` the control register is 0x804).
However, CMailHandler::m_halted defaults to false, and we only call CMailHandler::SetHalted in DSPHLE::DSP_WriteControlRegister when m_dsp_control.DSPHalt changes, so since DSPHalt defaults to true, if the first thing that happens is writing true to DSPHalt, we won't properly halt the mail handler.
Now, we call CMailHandler::SetHalted on startup. This fixes Datel titles when the IPL is skipped with DSP HLE (though this configuration only works once https://bugs.dolphin-emu.org/issues/8223 is fixed).
2022-06-25 14:06:55 -07:00
Admiral H. Curtiss
caf0e5b3e8
DSPHLE: Add variables in CMailHandler to savestate. 2022-06-25 19:15:21 +02:00
Pokechu22
52f32e61dc DSPHLE: Fix build error in the libasnd uCode
This was a conflict between 8a144a735f and b063f15dcc.
2022-06-24 19:29:31 -07:00
JMC47
75943a7a2c
Merge pull request #10763 from Pokechu22/dsp-hle-asnd
DSPHLE: Add HLE version of libasnd ucode
2022-06-24 21:51:27 -04:00
iwubcode
a8b5266347 VideoCommon: enable optimizer and remove debug details when converting GLSL to SPIR-V with validation layers turned off 2022-06-24 18:09:53 -05:00
iwubcode
dda1479ecf VideoBackends / VideoCommon: refactor Vulkan to use new SPIRV functionality 2022-06-24 18:09:53 -05:00
iwubcode
c2d3b7e7f5 VideoCommon: update pixel shader output to match old D3D code 2022-06-24 18:09:53 -05:00
iwubcode
0eb9352579 D3D: update BoundingBox to match generated shader code 2022-06-24 18:09:53 -05:00
iwubcode
cad1d6ce90 VideoCommon: fix support of stereoscopic rendering after moving d3d to SPIRV generation 2022-06-24 18:09:53 -05:00
iwubcode
993fa3bf94 VideoCommon: update UberShaderPixel to properly support logic ops, matching the specialized shader 2022-06-24 18:09:53 -05:00
iwubcode
5dd2704416 D3D / VideoCommon: generate HLSL from SPIRV 2022-06-24 18:09:53 -05:00
iwubcode
3790c99a7d VideoCommon: add common spirv helper functions
Co-authored-by: tellowkrinkle <tellowkrinkle@gmail.com>
2022-06-24 17:52:31 -05:00
iwubcode
1c90d836a5 Externals: add spirv-cross using upstream commit 50b4d5389b6a06f86fb63a2848e1a7da6d9755ca
Co-authored-by: tellowkrinkle <tellowkrinkle@gmail.com>
2022-06-24 17:52:31 -05:00
Pokechu22
1faca4bfc7
Merge pull request #10752 from tellowkrinkle/BetterShaderNames
VideoCommon: Better shader names
2022-06-24 15:50:48 -07:00
JMC47
76f890f6b0
Merge pull request #10761 from Pokechu22/dsp-halt-mail
DSPHLE: Handle mail more accurately
2022-06-24 18:46:20 -04:00
JMC47
ffa3bf86fb
Merge pull request #10760 from tellowkrinkle/std430
VideoCommon: Fix SSBO layout and remove associated "bug"
2022-06-24 18:40:47 -04:00
Zopolis4
5d2290ba3c
Removed unused variable MAX_MSGLEN in LogManager.cpp 2022-06-24 14:57:03 +10:00
Pokechu22
8a144a735f DSPHLE: Add HLE version of libasnd ucode 2022-06-23 10:50:24 -07:00
Admiral H. Curtiss
0a2aabe6ec
Merge pull request #10753 from Pokechu22/dsp-hle-cdd1-constants
DSPHLE: Move CDD1 constants to UCodes.h
2022-06-23 13:43:57 +02:00
Pierre Bourdon
2bd72dfc6f
Merge pull request #10758 from shuffle2/x64-on-arm64
windows: detect and warn if running x64 dolphin on arm64
2022-06-23 07:34:34 +02:00
Pokechu22
f3c8e75666 DSPHLE: Move CDD1 constants to UCodes.h
These are used by *all* uCodes, though not all uCodes support MAIL_RESUME or MAIL_CONTINUE.
2022-06-22 22:01:13 -07:00
Shawn Hoffman
29ddd0e6f0 windows: detect and warn if running x64 dolphin on arm64 2022-06-22 15:33:12 -07:00
Pokechu22
a72fa4b9cc DSPHLE: Don't generate new mail if the DSP is halted
This fixes booting Datel titles with DSPHLE (see https://bugs.dolphin-emu.org/issues/12943). Datel messed up their DSP initialization code, so it only works by receiving a mail later on, but if halting isn't implemented then it receives the mail too early and hangs.
2022-06-22 09:57:33 -07:00
Pokechu22
3aeafcc70b DSPHLE: Return last mail with top bit cleared if there is no new mail
This is an accuracy improvement, though I don't think it matters for anything in practice.
2022-06-22 09:56:51 -07:00
Pokechu22
bdbb23fa1a DSPHLE: Rename CMailHandler::m_Mails to m_pending_mails 2022-06-22 09:56:51 -07:00
Pokechu22
0fec8ffb3c DSPHLE: Remove empty destructors
Most of these were made unnecessary by the previous commit.
2022-06-22 09:56:51 -07:00
Pokechu22
567f9bede4 DSPHLE: Remove unneeded calls to m_mail_handler.Clear()
It's cleared whenever the uCode changes, so there's no reason to clear it in a destructor or during initialization.

I've also renamed it to ClearPending.
2022-06-22 09:56:50 -07:00
Pokechu22
b063f15dcc DSPHLE: Replace CMailHandler::IsEmpty with CMailHandler::HasPending 2022-06-22 09:56:50 -07:00
Pierre Bourdon
c8e716234e
Merge pull request #10732 from Pokechu22/dsp-init
Increase accuracy of DSP initialization process
2022-06-22 14:36:04 +02:00
Pierre Bourdon
6ddff87d42
Merge pull request #10755 from tellowkrinkle/DebugUID
VideoCommon: Don't add garbage to shader uids in debug builds
2022-06-22 14:33:23 +02:00
Pierre Bourdon
dc61f87fe4
Merge pull request #10772 from shuffle2/morepch
msbuild: add pch for dolphinqt
2022-06-22 14:27:44 +02:00
Pierre Bourdon
ceef02ed2a
Merge pull request #10750 from Pokechu22/hermes-test
Enhance DSPAssemblyTest, and fix various DSPTool bugs discovered while doing so
2022-06-22 14:26:50 +02:00
Pierre Bourdon
efcb9bec9c
Merge pull request #10774 from spotlightishere/bsd-determine-nameserver
IP/Top: Expand host nameserver usage
2022-06-22 13:02:05 +02:00
Spotlight
430c58cf27
IOS: Use host nameserver on more BSDs 2022-06-21 21:49:02 -05:00
Spotlight
a2530e3b93
IOS: Use first available IPv4 nameserver 2022-06-21 21:49:02 -05:00
Zopolis4
0dfd9d4b43
Replace Cpp11 (A Deprecated alias for Latest) in .clang-format 2022-06-22 08:57:32 +10:00
Shawn Hoffman
b39a11e23b msbuild: add pch for dolphinqt
since this now includes Qt headers it's better than only using
the vanilla DolphinLib one alone (previous behavior before Qt6)
2022-06-21 13:35:14 -07:00
Pokechu22
a334883c47 Qt/MemoryViewWidget: Don't elide text
Before, the Hex 32 display would get truncated on Linux.
2022-06-20 18:53:23 -07:00
Admiral H. Curtiss
f441e3ab98
Merge pull request #10723 from Pokechu22/dsp-lle-unsigned-loop-counter
DSP LLE Recompiler: Fix LOOP and BLOOP when the counter is between 0x8001 and 0xFFFF
2022-06-21 02:01:13 +02:00
Admiral H. Curtiss
d524a92963
Merge pull request #10767 from Pokechu22/dsp-lle-dirq-zero-log
DSPLLE: Don't log when DIRQ is set to 0
2022-06-21 01:31:03 +02:00
JosJuice
fafc78b9b5 Re-run code formatting after update to Android Studio 2022.2
Android Studio 2022.2 "Chipmunk" changes the code formatting rules a
little. Let's apply the new formatting in this PR so that the lint bot
doesn't take it out on innocent PRs.
2022-06-20 17:41:41 +02:00
Pokechu22
c317f7fd22 DSPLLE: Don't log when DIRQ is set to 0
No interrupt is generated in this case. The homebrew liband uCode writes zero fairly frequently, so logging it results in spam.
2022-06-19 10:46:41 -07:00
Braxton Anderson
2b2b8e932d Rename FPS_REFRESH_INTERVAL in VideoCommon/FPSCounter 2022-06-17 20:11:53 -06:00
TellowKrinkle
f79ac768d8 VideoCommon:ShaderCache: Add const to some local variables 2022-06-17 20:14:32 -05:00
Admiral H. Curtiss
23ed611077
Merge pull request #10729 from Pokechu22/libusb-error-wrap
Improve libusb error logging
2022-06-17 16:01:46 +02:00
Admiral H. Curtiss
b199108964
Merge pull request #10520 from AdmiralCurtiss/resource-pack-init-crash
ResourcePack: Avoid crashes on invalid packs during Init().
2022-06-17 13:55:16 +02:00
Admiral H. Curtiss
efbf5a450b
ResourcePack: Avoid crashes on invalid packs during Init(). 2022-06-17 03:49:05 +02:00
TellowKrinkle
26529a31ab VideoCommon: Fix SSBO layout and remove associated "bug" 2022-06-16 20:26:11 -05:00
Shawn Hoffman
896d5454f0 updater: use new platform id for win-arm64 2022-06-16 14:55:51 -07:00
Pokechu22
053b3e725b DSPHLE: More accurately handle initialization behavior
This improves timing, but does not fix Datel titles.
2022-06-16 12:18:05 -07:00