Commit Graph

30983 Commits

Author SHA1 Message Date
JosJuice 6119f77626 Android: Increment targetSdkVersion to 30 (Android 11)
This enables scoped storage for new Dolphin installs on Android 11
and up (along with a few other changes in behavior which unlike
scoped storage are uncontroversial). Existing installs are unaffected.

We have to do this in order to be able to release updates on
Google Play from November 2021 and on.
2021-09-16 20:12:20 +02:00
JosJuice 3adb07ac74 Android: Show a dialog for scoped storage incompatible settings
The following settings are currently not SAF compatible,
and might never be due to the performance impact:

Dump Path
Load Path
Resource Pack Path
Wii NAND Root

This commit makes us show a message to the user if they try to
change one of these settings while scoped storage is active.
I don't want to entirely remove the settings from being listed
in the settings activity, because it's important that the user
is able to reset them if they were set to something custom in
a previous version of Dolphin.
2021-09-16 20:12:20 +02:00
JosJuice 820420c5f5 Android: Use app-specific directory as User folder by default
This lets Dolphin function without the user granting access to
external storage. We need this for scoped storage compatibility.

When scoped storage is not active, we still ask for permission to
access external storage the first time the app is started so that
we can use the existing dolphin-emu folder if there is one. But
if it doesn't exist, or the user denies the permission, or scoped
storage is active, the app-specific directory will be used instead.
2021-09-16 20:01:47 +02:00
Léo Lam 7379450633
Merge pull request #10092 from JosJuice/android-cheats
Android: Add cheat GUI
2021-09-16 19:21:33 +02:00
JosJuice 0ca4c6dbd4 Android: Add save button to cheats activity
By request. Matches the settings activity.
2021-09-16 18:48:40 +02:00
JosJuice ffa25c4cf5 Android: Allow $ line when entering cheat code
Port of cda442d.
2021-09-16 18:48:40 +02:00
JosJuice 53ae1a0725 Android: Add Gecko code downloading 2021-09-16 18:48:39 +02:00
JosJuice 47efd3317d Android: Fix CheatsActivity d-pad navigation
Special shoutout to Android for not having RTL compatible
variants of nextFocusRight and nextFocusLeft.

Ideally we would have some way to block the user from using
the d-pad to switch between the two panes when in portrait mode,
or make the list pane act as if it's to the left of the details
pane rather than the right when the details pane is open, but I
don't know of a good way to do this. SlidingPaneLayout doesn't
really seem to have been implemented with d-pad navigation in mind.
Thankfully, landscape is the most important use case for gamepads.
2021-09-16 18:48:39 +02:00
JosJuice 215492152c Android: Show warning when Enable Cheats is off 2021-09-16 18:48:39 +02:00
JosJuice 1470dfcf81 Android: Add the ability to delete cheats 2021-09-16 18:48:39 +02:00
JosJuice 404eb13e2f Android: Add the ability to add cheats 2021-09-16 18:48:39 +02:00
JosJuice 6934b9a21d Android: Add headers to cheat list 2021-09-16 18:48:38 +02:00
JosJuice 109aef4b81 Android: Scroll to field with error when error occurs 2021-09-16 18:48:38 +02:00
JosJuice e299be1d85 Android: Add creator and notes fields for Gecko codes 2021-09-16 18:48:38 +02:00
JosJuice 883a9f8a99 Android: Allow viewing/editing the actual codes 2021-09-16 18:48:38 +02:00
JosJuice fc6c31c3db Android: Update cheat list when a cheat is edited
The way I'm implementing events using LiveData feels rather
unorthodox, but I'm not aware of anything in the Android framework
that would let me do it in a better way... One option I did
consider was wrapping the cheat lists in LiveData and observing
those, but then CheatsAdapter wouldn't know which cheat had
changed, only that there was some kind of change to the list,
necessitating the use of the not recommended notifyDataSetChanged.
2021-09-16 16:46:50 +02:00
JosJuice 43dcbf33ad Android: Add edit button for cheats 2021-09-16 16:46:49 +02:00
JosJuice a303b4bc98 Android: Programmatically open/close cheat details
Only has an effect when using a narrow screen.
2021-09-16 16:46:49 +02:00
JosJuice 95879c2e76 Android: Add details view for cheats
The details view only contains the name of the cheat for now.
2021-09-16 16:46:49 +02:00
JosJuice 93a1271386 Android: Add checkboxes for toggling cheats enabled 2021-09-16 16:46:49 +02:00
JosJuice 67a8855d9a Android: Add "Enable Cheats" setting to GUI 2021-09-16 16:46:49 +02:00
JosJuice 4d609c769f Android: Implement basic read-only cheats list 2021-09-16 16:46:48 +02:00
JosJuice ee3a5a4a81 Android: Create CheatsActivity 2021-09-16 16:46:48 +02:00
Admiral H. Curtiss bd92c29ef5
Core/CheatSearch: Avoid length underflow on new search. 2021-09-16 08:13:02 +02:00
Admiral H. Curtiss c40e8ee3a8
Qt/CheatsManager: Show disabled AR and Gecko tabs when no game is running. 2021-09-16 08:01:40 +02:00
Admiral H. Curtiss dd9047f7c5
Qt/GeckoCodeWidget: Disable functionality if no game id is given. 2021-09-16 08:01:40 +02:00
Admiral H. Curtiss a4b1ea3d70
Qt/ARCodeWidget: Disable functionality if no game id is given. 2021-09-16 08:01:40 +02:00
Admiral H. Curtiss aa2d089d1b
Qt/MenuBar: Allow opening Cheats Manager regardless of emulation state and configuration. 2021-09-16 08:01:26 +02:00
Admiral H. Curtiss aee6e45386
Qt/CheatsManager: Let the 'Configure Dolphin' button shown in the Cheats Manager when Cheats are disabled actually open the settings. 2021-09-16 08:01:12 +02:00
JMC47 4d1bd54917
Merge pull request #10095 from phire/fix-out-of-range-efb
BPStructs: fix out-of-range EFB copy clamping
2021-09-15 13:26:23 -04:00
Admiral H. Curtiss 55397b6d52 DolphinQt: Rewrite cheat search GUI. 2021-09-15 19:05:49 +02:00
Admiral H. Curtiss f3346262d2 Core/CheatSearch: Implement cheat searching functionality. 2021-09-15 19:05:48 +02:00
Lioncash 2b9c65967e NetPlayClient: Change return value of OnData() to void
In all usage cases, the return value isn't utilized.
2021-09-15 11:31:32 -04:00
Lioncash ae714b25ba NetPlayClient: Split out OnData()
Over time OnData() has become a huge function-long case statement that
attempts to manage numerous packet-related behaviors, which makes it a
little difficult to reliably ensure certain handling doesn't interfere
with another case's. It's also mildly annoying to navigate due to its
size.

To make it a little easier to read and find the specific behavior, we
can break the relevant pieces of code out into their own functions.
2021-09-15 11:31:28 -04:00
Léo Lam 94cfbfc49d
Merge pull request #10099 from AdmiralCurtiss/directoryblob-read-between-files
DiscIO/DirectoryBlob: Handle reads between files.
2021-09-15 14:38:37 +02:00
Léo Lam 94e9751dfe
Merge pull request #10100 from Pokechu22/no-wglShareLists
GLInterface: Remove unneeded wglShareLists call
2021-09-15 14:37:19 +02:00
Léo Lam 111c36e6cd
Merge pull request #10101 from lioncash/kb
SI_DeviceKeyboard: Shorten MapKeys()
2021-09-15 13:24:05 +02:00
Lioncash 7c909a73de SI_DeviceKeyboard: Shorten MapKeys()
We can wrap this logic into a lambda to avoid copy-pasted checking of
the over 400+ lines of code.
2021-09-15 01:58:02 -04:00
Scott Mansell eb8bfabdfd BPStructs: make copy width/height const 2021-09-15 11:54:40 +12:00
Léo Lam 15ec7bd546
Merge pull request #10097 from JosJuice/jitarm64-w0-clobber
JitArm64: Fix fresx/frsqrtex unlocking W0 too early
2021-09-14 23:51:24 +02:00
Pokechu22 b8f4a4ae44 GLInterface: Remove unneeded wglShareLists call
When RenderDoc is attached, wglShareLists fails for some reason (see baldurk/renderdoc#2361).  wglCreateContextAttribsARB has a parameter for the share context, so there's no reason to use a separate wglShareLists call.

Co-authored-by: baldurk <baldurk@baldurk.org>
2021-09-14 10:55:33 -07:00
Léo Lam 819a0a69ff
Merge pull request #10076 from lioncash/sibf
SI: Migrate bitfields to Common::BitField
2021-09-14 19:10:39 +02:00
Admiral H. Curtiss f76aaf65f6 Common/FileUtil: Strip trailing path separator in ScanDirectoryTree(). 2021-09-14 17:39:38 +02:00
Scott Mansell 37b80e2170 BPStructs: fix out-of-range EFB copy clamping
Previous code from #7950 only clamps correctly when the efb copies
left and top coordinates are (0, 0)

Now we should handle all situations.

Spyro: A hero's tail is an example of a game that does an oversized
EFB copy with a non-zero origin.
2021-09-15 02:31:38 +12:00
Admiral H. Curtiss 06d41c53ce DiscIO/DirectoryBlob: Handle reads between files. 2021-09-14 07:09:55 +02:00
JosJuice 74f2acd83b JitArm64: Move fresx/frsqrtex RW calls earlier
If W0 is locked when fpr.RW is called, the indirectly called
ConvertSingleToDoubleLower may need to emit a push+pop, so it's
better for fresx/frsqrtex to call RW before locking W0 than after.
2021-09-13 19:27:16 +02:00
JosJuice 1c4155f800 JitArm64: Fix fresx/frsqrtex unlocking W0 too early
fpr.RW may clobber GPRs that are not locked.
Fixes https://bugs.dolphin-emu.org/issues/12656.
2021-09-13 19:03:43 +02:00
Lioncash d00e7d5a75 SI: Collapse interrupt generation check in UpdateInterrupts()
We can simplify this by storing the result of the test into a variable
instead.
2021-09-13 11:25:03 -04:00
Lioncash ca24c32cbf SI: Eliminate trivial sign conversion cases in RegisterMMIO()
Previously differently signed types were being used to create addresses
and bit offsets.
2021-09-13 11:24:59 -04:00
Léo Lam ee863e6722
Merge pull request #10014 from OatmealDome/wiimote-disconnect-crash
WiimoteReal: Fix Wiimote disconnection causing Dolphin to crash on macOS
2021-09-13 15:26:02 +02:00
Léo Lam 5f2a8d98fb
Merge pull request #10093 from JosJuice/revert-revert-10025
Revert "Revert "DolphinQt: Minor consistency fixes for the Settings window""
2021-09-13 14:54:01 +02:00
JMC47 05f86b9f5b
Merge pull request #10012 from Pokechu22/thps4-green-sky
UberShaderVertex: Fix Tony Hawk Pro Skater 4
2021-09-09 17:58:35 -04:00
JosJuice 5ea121eeb5 Revert "Revert "DolphinQt: Minor consistency fixes for the Settings window""
This reverts commit e376a985e4.

A beta build has been released now, so there's no reason to keep
it reverted anymore.
2021-09-08 22:09:19 +02:00
JosJuice b4787cdbd3
Merge pull request #10077 from lioncash/dvdbf
DVDInterface: Migrate bitfields over to Common::BitField
2021-09-08 21:37:09 +02:00
JosJuice 52304df943
Merge pull request #10011 from JosJuice/android-cheats-preparation
Split out code for serializing/deserializing cheat lines
2021-09-08 21:36:56 +02:00
JosJuice 2a22367211
Merge pull request #10056 from lioncash/qtloc
DolphinQt: Minor localization changes
2021-09-08 21:36:46 +02:00
JosJuice 15eb56142a JitArm64: Read BATs in psq_l/psq_st address check
Same approach as Jit64 here as well.
2021-09-08 21:32:16 +02:00
JosJuice 93e968208e JitArm64: Lock fewer registers when assumeNoPairedQuantize 2021-09-08 21:32:11 +02:00
JosJuice 96760093e9 JitArm64: Move psq_st address check to EmitBackpatchRoutine
This way the address check will take up less icache (since it's
only emitted once for each routine rather than once for each
psq_st instruction), and we also get address checking for psq_l.
Matches Jit64's approach.

The disadvantage: In the slowmem case, the routines have to
push *every* caller-saved register onto the stack, even though
most callers probably don't need it. But at long as the slowmem
case isn't hit frequently, this is fine.
2021-09-08 21:26:10 +02:00
JosJuice cd84339dfd JitArm64: Use EmitBackpatchRoutine more for psq_l/psq_st
In the case of the JitAsm routines, we can't actually use
backpatching. Still, I would like to gather all the load and
store instructions in one place to make future changes easier.
2021-09-08 21:26:10 +02:00
JosJuice de21dc5fd9 JitArm64: Add bitset constants for caller saved registers 2021-09-08 21:26:05 +02:00
JosJuice 6c3141e0cc JitArm64: Change parameter order for quantized load routines
EmitBackpatchRoutine (see the upcoming commits) expects
the address to be in W0 for loads and W1 for stores.
2021-09-08 21:26:03 +02:00
JosJuice 36b3d51523 JitArm64: Restructure the BackPatchInfo flags enum
This makes it possible to construct flag combinations like
"load 16 bits into an FPR".
2021-09-08 21:23:00 +02:00
Mai M 059794b551
Merge pull request #10087 from JosJuice/jitarm64-psq-caller-saved
JitArm64: Move psq_stXX GetCallerSavedUsed calls later
2021-09-08 04:00:43 -04:00
Mai M 8809d8eb61
Merge pull request #10089 from AdmiralCurtiss/jit-cache-valid-block-clear
PowerPC/JitCache: Clear valid_block bits for long invalidations.
2021-09-08 04:00:23 -04:00
Pokechu22 52c82733f6 Use custom isnan implementation to avoid HLSL optimizer issues
This adjusts the NaN replacement logic introduced in #9928 to work around the HLSL compiler optimizing away calls to isnan, which caused that functionality to not work with ubershaders on D3D11 and D3D12 (it did work with specialized shaders, despite a warning being logged for both; that warning is also now gone).  Note that the `D3DCOMPILE_IEEE_STRICTNESS` flag did not solve this issue, despite the warning suggesting that it might.

Suggested by @kayru and @jamiehayes.
2021-09-07 19:04:40 -07:00
Admiral H. Curtiss 34992f52c7 PowerPC/JitCache: Clear valid_block bits for long invalidations. 2021-09-07 23:14:20 +02:00
JosJuice 23f6fdebcb Revert "JitArm64: Indexed paired loadstores workaround, attempt 2"
This reverts commit 3071a1d13b.
2021-09-05 11:45:40 +02:00
JosJuice 743de44f03 JitArm64: Move psq_stXX GetCallerSavedUsed calls later
This is a proper fix for the issue that 3071a1d was a workaround for.
It wasn't some kind of bug in the register cache that had laid dormant,
it was a simple mistake made in b24b79e.
2021-09-05 11:42:07 +02:00
Mai M 282fda1530
Merge pull request #10086 from JosJuice/jitarm64-w0
JitArm64: Fix W0 being present twice in register cache
2021-09-04 21:14:40 -04:00
JosJuice ea1210773c JitArm64: Fix W0 being present twice in register cache
Fixes a regression from ecf86bb.

The GPR allocation_order is initialized with only 28 elements,
so the 29th element ends up getting zero initialized.
Very sneaky bug...
2021-09-04 12:48:45 +02:00
JosJuice 156ccdb805
Merge pull request #10082 from lioncash/texenum
BPMemory: Make ZTexOp enum an enum class
2021-09-02 08:14:05 +02:00
Lioncash f36fd5fa39 BPMemory: Make ZTexOp enum an enum class
Avoids placing generic names in the surrounding namespace.
2021-09-01 18:23:22 -04:00
Lioncash 269b7a2166 MemoryInterface: Eliminate trivial sign conversion cases
We can just use unsigned loop variables instead of signed ones.
2021-09-01 06:39:06 -04:00
Lioncash 163b24833d MemoryInterface: Migrate bitfields over to Common::BitField 2021-09-01 06:36:25 -04:00
Pokechu22 e9c6c13886 msbuild: Move DivUtils to DolphinLib.props
It was accidentally put into the main DolphinLib.vcxproj in #9566.
2021-08-31 22:48:07 -07:00
Lioncash 15566048f0 DVDInterface: Migrate bitfields over to Common::BitField 2021-08-31 17:27:43 -04:00
Lioncash e68b9de62c SI: Migrate bitfields to Common::BitField 2021-08-31 16:26:07 -04:00
Léo Lam 32c7524f4d
Merge pull request #10021 from Dentomologist/make_windows_tabbar_scroll_buttons_opaque
DolphinQt: Make Windows tab bar scroll buttons opaque
2021-08-31 19:18:03 +02:00
Léo Lam c3dadd140b
Merge pull request #10074 from lioncash/pte
MMU: Tidy up PTE-related code
2021-08-31 19:17:08 +02:00
Léo Lam ef358a122a
Merge pull request #10075 from lioncash/memcheck
MMU: Don't truncate 64-bit values when calling Memcheck()
2021-08-31 19:06:33 +02:00
Lioncash ed0aa5928f Gekko: Remove unused UReg_PTE
PTEs are only ever operated on in terms of their halves in our code
currently, so this can be removed.
2021-08-31 12:18:31 -04:00
Lioncash 029aff0741 MMU: Remove now-unused defines
Now that we're using register unions where applicable, we can remove
these defines, since they're now unused.
2021-08-31 12:18:28 -04:00
Lioncash 7a6b63b309 MMU: Don't truncate 64-bit values when calling Memcheck()
Previously in Read_U64 and Write_U64 the value that was read or written
would be truncated to a 32-bit value before being passed off to the
memcheck handler, which can result in incorrect values being logged out.
2021-08-31 11:39:13 -04:00
Dentomologist 1fa1e7135c DolphinQt: Make Windows tab bar scroll buttons opaque 2021-08-31 08:33:00 -07:00
Lioncash a8ebca4fc6 MMU: Invert conditionals in Memcheck()
Lets us unindent code a little bit.
2021-08-31 11:30:57 -04:00
Lioncash ee40b640d3 MMU: Make use of UPTE_Lo and UReg_SR in TranslatePageAddress()
Allows us to get rid of a bit of masking in exchange for stating the
bits being accessed or written to directly.
2021-08-31 10:52:52 -04:00
Lioncash e687569e02 Gekko: Add union for segment registers
Will be used in the following commit.
2021-08-31 10:45:12 -04:00
Lioncash 75840f62ff MMU: Make use of UReg_SDR1 in SDRUpdated()
Lets us simplify SDRUpdated() a little bit.

This also fixes the layout of UReg_SDR1. Turns out this struct has been
incorrect (from a little-endian perspective) the entire time and went
unnoticed, since the union was never used.
2021-08-31 10:20:56 -04:00
Lioncash 1c776d8c1a MMU: Move invalidation logic into the TLBEntry struct
Puts the invalidation logic in one place and lets us tidy up
InvalidateTLBEntry a little.
2021-08-31 10:04:44 -04:00
Lioncash 3216040bfe MMU: Remove implicit sign conversions and truncation in UpdateTLBEntry
These are trivial to resolve.

Converting the structure member into a u32 results in no increase in
structure size, as it's making use of the three extra padding bits in
the structure.
2021-08-31 10:00:18 -04:00
Lioncash c008b1c335 MMU: Move UPTE1/UPTE2 unions into Gekko.h
Keeps the register definitions in one spot and lets us remove a comment
about them.
2021-08-31 09:45:28 -04:00
Lioncash 65e131ef5f MMU: Convert PTE unions over to Common::BitField 2021-08-31 09:36:13 -04:00
Léo Lam c5becb4a7e
Merge pull request #10040 from JosJuice/simplify-mcrfs
Interpreter: Simplify mcrfs implementation
2021-08-31 15:31:54 +02:00
JosJuice e376a985e4 Revert "DolphinQt: Minor consistency fixes for the Settings window"
This reverts commit 9d45bac175.
2021-08-31 09:15:03 +02:00
Tillmann Karras 72ca41b9bf DSPInterpreter: fix off-by-one errors in cycle counting 2021-08-31 01:51:42 +01:00
Léo Lam 8ecb0447b6
Merge pull request #10025 from mbc07/gui-fixes-settings
DolphinQt: Minor consistency fixes for the Settings window
2021-08-31 01:43:02 +02:00
Léo Lam 48339afb98
Merge pull request #10041 from lioncash/conv
Interpreter: Make signedness and narrowing conversions explicit
2021-08-31 01:07:27 +02:00
Léo Lam 95fcedeef3
Merge pull request #10053 from lioncash/kdreq
IOS/Network/KD: Minor tidy-up changes
2021-08-31 00:45:17 +02:00
Léo Lam 1fa74ab824
Merge pull request #10058 from AdmiralCurtiss/dsp-cleanup
DSPHLE: Minor cleanup & savestate fix for AX coefficients.
2021-08-31 00:16:54 +02:00
Admiral H. Curtiss f592565532 DSPHLE/AX: Reload resampling coefficients on savestate load if necessary. 2021-08-30 23:36:09 +02:00
Léo Lam 271612f328
Merge pull request #10064 from lioncash/regs
Gekko: Migrate register structs over to Common::BitField
2021-08-30 23:19:17 +02:00
Léo Lam d7109b149b
Merge pull request #10066 from leoetlino/abort-on-panic-alert-option
Add an option to abort when a panic alert occurs
2021-08-30 22:43:21 +02:00
Léo Lam 6659f8019e
Merge pull request #10035 from JosJuice/jitarm64-dcbx-in-loop
JitArm64: dcbx loop detection for improved performance when invalidating large memory regions
2021-08-30 22:39:20 +02:00
iwubcode 1f2f505373 VideoBackends / VideoCommon: allow the ability to set debug names for shaders / textures. These names are visible in applications like RenderDoc 2021-08-30 13:47:48 -05:00
JosJuice 9b83cf3e7f
Merge pull request #10069 from leoetlino/clang-format-12
Update clang-format to version 12
2021-08-30 09:13:15 +02:00
Léo Lam 815b590dfe
Update clang-format to version 12
12 is the latest release and various editors (VS, VSCode and CLion)
ship with clang-format 12 by default.
2021-08-30 00:20:18 +02:00
Léo Lam 86f2c7889d
Merge pull request #8932 from sepalani/cw-map
PPCSymbolDB: Improve symbol map column detection
2021-08-29 23:28:09 +02:00
Léo Lam ef98f209a2
IOS: Add missing writes of low MEM1 constants
On a real Wii, these constants are normally written by the system menu
(maybe even as part of common SDK code?)

However, they're cleared by IOS whenever a PPC title is launched.
IOS memsets 0x0-0x3fff and then manually writes some constants
in low MEM1. PR #4723 added most of the writes in the 0x31xx region
but left out the four writes to the legacy constant region.

Previously Dolphin didn't actually clear 0-0x3fff so those constants
would stick around after a system menu execution.
011f7789e0 exposed those missing writes.
2021-08-29 22:51:44 +02:00
Lioncash dbf8e27d7f Gekko: Convert UReg_PTE over to using Common::BitField 2021-08-29 06:16:55 -04:00
Lioncash e4e1b6064d Gekko: Convert UReg_THRM3 over to using Common::BitField 2021-08-29 06:16:55 -04:00
Lioncash 11e76e1f67 Gekko: Convert UReg_THRM12 over to using Common::BitField 2021-08-29 06:16:55 -04:00
Lioncash 12b87922fb Gekko: Convert UReg_BAT_Lo over to using Common::BitField 2021-08-29 06:16:54 -04:00
Lioncash b4496e6653 Gekko: Convert UReg_BAT_Up over to using Common::BitField 2021-08-29 06:16:51 -04:00
JMC47 006fc99e8e
Merge pull request #8901 from sepalani/dns-async
IOS/Network: Make name resolution asynchronous
2021-08-29 05:12:13 -04:00
Léo Lam e091c2e817
Add an option to abort when a panic alert occurs
Prompted by https://dolphin.ci/#/builders/24/builds/985

A 1-character typo in a recent PR caused FifoCI builds to break
horribly and spew millions of panic alerts until buildbot crashed.

This PR adds a new config option -- defaulting to off -- that allows
Dolphin to abort early on when a panic alert occurs instead of
continuing forever.
2021-08-29 02:02:07 +02:00
Mateus B. Cassiano 9d45bac175 DolphinQt: Minor consistency fixes for the Settings window 2021-08-28 16:45:22 -04:00
JosJuice b90008aadb Split out code for serializing/deserializing cheat lines 2021-08-28 19:31:27 +02:00
JosJuice fb96ecb7da Move patch saving code to PatchEngine 2021-08-28 17:34:28 +02:00
Lioncash 1e4ecfe3d4 Gekko: Convert UReg_DMAL over to using Common::BitField 2021-08-27 11:20:37 -04:00
Lioncash 474e09c239 Gekko: Convert UReg_DMAU over to using Common::BitField 2021-08-27 11:19:21 -04:00
Lioncash a126821d5e Gekko: Convert UReg_WPAR over to using Common::BitField 2021-08-27 11:18:03 -04:00
Lioncash 8ac079a647 Gekko: Convert UReg_MMCR1 over to using Common::BitField 2021-08-27 11:16:41 -04:00
Lioncash 300f7c10bd Gekko: Convert UReg_MMCR0 over to using Common::BitField 2021-08-27 11:15:15 -04:00
Lioncash 1ec3768b84 Gekko: Convert UReg_SDR1 over to using Common::BitField
Also fixes a typo in the struct name, since it was referring to SPR1
instead of SDR1. Given this isn't used anywhere yet, it's a painless
change.
2021-08-27 11:12:30 -04:00
Lioncash 9e183e63f1 Gekko: Convert UReg_HID4 over to using Common::BitField 2021-08-27 11:10:22 -04:00
Lioncash 6ab2e5ab16 Gekko: Convert UReg_HID2 over to using Common::BitField 2021-08-27 11:08:14 -04:00
Lioncash 02ec9c3b50 Gekko: Convert UReg_HID0 over to using Common::BitField 2021-08-27 11:05:51 -04:00
Lioncash 4591246608 Gekko: Convert UReg_FPSCR over to using Common::BitField 2021-08-27 11:01:32 -04:00
Lioncash 4ecdcc9d78 Gekko: Convert UReg_MSR over to using Common::BitField 2021-08-27 10:54:49 -04:00
Lioncash 1863212d94 Gekko: Convert UReg_XER over to using Common::BitField 2021-08-27 10:46:38 -04:00
Mai M 4816195366
Merge pull request #10054 from JosJuice/android-game-cache-lock
Android: Reduce gameFileCache lock contention
2021-08-27 10:15:25 -04:00
Mai M 7d88354659
Merge pull request #10061 from JosJuice/jitwidget-div-zero
DolphinQt: Fix divide by zero in JITWidget::Update
2021-08-27 10:13:52 -04:00
Franz-Josef Haider 9cd878218c Interpreter_Tables: specify FL_IN_A for twi.
rGPR[inst.RA] is an input to twi.
2021-08-27 16:59:02 +03:00
JosJuice f17584fc06 DolphinQt: Fix divide by zero in JITWidget::Update
I ran into this while fiddling with the debugger.
2021-08-27 10:30:18 +02:00
Admiral H. Curtiss a4d4dc82d4 DSPHLE/AX: Use in-class initialization. 2021-08-27 03:00:13 +02:00
JosJuice feefc17b02 JitArm64: divwx - Optimize comparisons to 0x80000000 2021-08-26 15:04:56 +02:00
JosJuice 91b112b984 JitArm64: divwx - Optimize division by 2
...and let's optimize a divisor of 2 ever so slightly for
good measure. Most GameCube games seem to hit this on launch.
2021-08-26 15:04:56 +02:00
JosJuice 9889e7eb33 JitArm64: divwx - Optimize power-of-two divisors
Power-of-two divisors can be done more elegantly, so handle them
separately.
2021-08-26 15:04:55 +02:00
JosJuice eb8581c26d JitArm64: divwx - Optimize constant divisor
Optimize division by a constant into multiplication. This method is
also used by GCC and LLVM.

We also add optimized paths for divisors 0, 1, and -1, because they
don't work using this method. They don't occur very often, but are
necessary for correctness.
2021-08-26 15:04:51 +02:00
JosJuice f8e97f5a8a JitArm64: divwx - Special case dividend == 0
Zero divided by any number is still zero. For whatever reason,
this case shows up frequently too.
2021-08-26 14:50:01 +02:00
JosJuice 09cdb076a3 JitArm64: divwx - Optimize constant dividend
When the dividend is known at compile time, we can eliminate some
of the branching and precompute the result for the overflow case.
2021-08-26 14:50:01 +02:00
Admiral H. Curtiss 83ba17fc25 DSPHLE: Set m_dsp_control to a consistent value in Initialize(). 2021-08-25 23:10:16 +02:00
Admiral H. Curtiss 54125516bb DSPHLE: Remove unused members. 2021-08-25 23:02:04 +02:00
Lioncash 3c0d4b7d8f NetKDTime: Eliminate implicit sign conversions
Silences compiler warnings and also makes the conversions here explicit
to the reader.
2021-08-24 12:04:04 -04:00
Lioncash caba81ad3b NetKDTime: Move internal IOCtl values into IOCtl function
These are only ever used here, so they can be turned into an internal
implementation detail.
2021-08-24 12:04:04 -04:00
Lioncash 6268ee44a1 NWC24Config: Provide name for unk_04 config member
According to WiiBrew this is a version number (thanks to Awesomebing1
for documenting this!)
2021-08-24 12:04:04 -04:00
Lioncash a60af199d8 NWC24Config: Move array length constants into the private part of the class
These are only used internally and not intended to be used outside of
the class itself.
2021-08-24 12:04:04 -04:00
Lioncash bc939df69c NWC24Config: Make creation stage an enum class
Makes the enum strongly typed instead of interacting with a raw u32
value. While we're at it, we can add helpers to the NWC24Config to make
using code poke at the internals of the class a little bit less and also
make the querying a little nicer to read.
2021-08-24 12:04:04 -04:00
Lioncash 82371b89fc NetKDRequest: Remove unused include 2021-08-24 12:04:04 -04:00
Lioncash e65363f05f NetKDRequest: Make use of constexpr arrays containing pairs instead of maps
Currently we were using heap allocating maps that last for the entire
duration of the emulator running.

Given the size N of both of these maps are very small (< 20 elements),
we can just make use of an array of pairs and perform linear scans. This
is also fine, given this code isn't particularly "hot" either, so this
won't be run often.
2021-08-24 12:04:01 -04:00
Lioncash 8c67f13256 ResourcePackManager: Translate unknown author string
This is text that should be translated, since it'll show up as English
for non-English speakers.
2021-08-24 11:31:47 -04:00
Lioncash 89ceef2a8a MainWindow: Use MainWindow variant of tr()
MainWindow derives from QMainWindow, so we can use tr() directly without
the qualification.
2021-08-24 11:13:55 -04:00
Lioncash 47b40698bb MainWindow: Fix typo in resource pack initialization error message
occured -> occurred
2021-08-24 11:10:49 -04:00
Lioncash 75b68c9e96 GBAWidget: Add ellipses for option selections that require more input
Makes the context menu selections consistent with the rest of the
application.
2021-08-24 10:43:34 -04:00
Lioncash a65fcb5e5b ConvertDialog: Provide complete translation string for conversion
Gives the translator full control over the string's localization instead
of only one part of it.
2021-08-24 10:21:53 -04:00
Lioncash 70399955a0 CheatsManager: Make use of plural variant of tr()
Allows translators to specify different translations if the target
languages have pluralization rules that differ from English.
2021-08-24 10:14:59 -04:00
JosJuice 719930bb39 Android: Add fast path to addOrGet
This path isn't really any faster in the normal case,
but it does let us skip waiting for the lock to be available,
which makes a huge difference if the lock is already taken.
2021-08-24 15:35:40 +02:00
JosJuice fb265b610d Android: Don't hold gameFileCache lock during updateAdditionalMetadata
It seems like we spend a lot of the game list scanning time in
updateAdditionalMetadata, which I suppose makes sense considering
how many different files that function attempts to open.

With the addition of just one little atomic operation, we can make
it safe to call updateAdditionalMetadata without holding a lock.
2021-08-24 15:35:39 +02:00
JosJuice bba33c7ced Android: Don't hold gameFileCache lock while finding games
FindAllGamePaths may take a little while, and holding the
gameFileCache lock isn't actually necessary until it's time to
put the results returned by FindAllGamePaths into gameFileCache.

The downside of this change is that we have to do an extra
round of JNI in between FindAllGamePaths and Update,
but I don't think that's much of a problem.
2021-08-24 14:56:33 +02:00
Mai M 7688db3cd3
Merge pull request #10047 from Dentomologist/remove_windows_help_buttons
DolphinQt: Remove Windows dialog help buttons
2021-08-24 08:34:31 -04:00
Mai M 922f53e16e
Merge pull request #10049 from JosJuice/jitarm64-fault-to-handler
JitArm64: Make HandleFastmemFault less unsafe
2021-08-24 08:33:58 -04:00
Mai M 19f8e39929
Merge pull request #10051 from Pokechu22/dsp-jit-revert-acs-extension
Revert "DSPJit: Sign-extend acS.h to 32 bits"
2021-08-24 08:33:32 -04:00
Lioncash b49bd76d91 NetKDRequest: Fix typo in IOCtl enum names (schedular -> scheduler) 2021-08-24 08:28:14 -04:00
Lioncash 3a38e99001 NetKDRequest: Make hardware model enum strongly typed
Makes it a distinct type instead of decaying to an ambiguous u8.
2021-08-24 07:46:53 -04:00
Lioncash 1e27880014 NetKDRequest: Make private member functions completely internal
These functions don't touch any class state, so they can be turned into
internal helper functions.

While we're at it, we can move the enumerations as well.
2021-08-24 07:45:56 -04:00
Lioncash ff3947a1b9 NetKDRequest: Minor adjustments to NWC24MakeUserID
- Make use of std::array
- Move helper functions inside it as lambdas
- Eliminate sign-conversions that were occurring (promotion of u8 to int)
2021-08-24 07:13:08 -04:00
JosJuice 6b8d17ce57 Revert "JitArm64: Disable indexed paired loadstore instructions"
This reverts commit f70ddebb40.
2021-08-23 11:01:07 +02:00
JosJuice 3071a1d13b JitArm64: Indexed paired loadstores workaround, attempt 2
f70ddeb did not make the issue go away.
2021-08-23 10:46:28 +02:00
Pokechu22 1abaff758a Revert "DSPJit: Sign-extend acS.h to 32 bits"
This reverts commit dc2eab1778.
2021-08-22 18:44:24 -07:00
Pokechu22 779cd479bc DSPLLE: NEG can set the carry and overflow flags 2021-08-22 17:07:44 -07:00
Pokechu22 3ee605d699 DSPJit: Rework overflow and carry handling 2021-08-22 17:07:44 -07:00
Pokechu22 4508ca6734 DSPInterpreter: Rework overflow and carry handling 2021-08-22 17:07:44 -07:00
Pokechu22 7cd1b2c4d1 DSPJit: Fix xA and xB 2021-08-22 17:07:44 -07:00
Pokechu22 a30a186d30 DSPInterpreter: Replace IsConditionA with IsConditionB
Although it's not clear what the xA and xB conditions are intended to do, the pattern indicates that xB is the regular version and xA is the inverted version, so for consistency, IsConditionB should be the main function.
2021-08-22 17:07:44 -07:00
Pokechu22 e5d130c4b3 DSPLLE: O is the mnemonic for overflow, not 0 2021-08-22 17:07:44 -07:00
Pokechu22 4865b322d0 DSPInterpreter: Improve CMPAR variable names 2021-08-22 17:07:43 -07:00
Pokechu22 dc2eab1778 DSPJit: Sign-extend acS.h to 32 bits
Thus, the 40-bit accumulator is treated as properly sign-extended when read as a 64-bit number.  This affects e.g. overflow detection.
2021-08-22 17:07:43 -07:00
Pokechu22 74440c468f DSPInterpreter: Sign-extend acS.h to 32 bits
Thus, the 40-bit accumulator is treated as properly sign-extended when read as a 64-bit number.  This affects e.g. overflow detection.
2021-08-22 17:07:43 -07:00
Pokechu22 105d8860fb DSPAnalyzer: Disable update SR analysis
It doesn't work right in all situations, including in the cond_test hardware test.  It could definitely be fixed, but it would be a hassle to do so.
2021-08-22 17:07:43 -07:00
Pokechu22 464575702b DSPSpy: Replace less_test with cond_test
This new test covers all conditions, and also tests overflow, carry, logical zero, and the behavior of NEG
2021-08-22 17:07:41 -07:00
Tilka 67dce9f35d
Merge pull request #10038 from Pokechu22/dsp-rti-srs
DSPLLE: Split SRS into SRS and SRSH and implement conditional variants of RTI
2021-08-23 01:02:45 +01:00
Mai M c227023375
Merge pull request #10050 from JosJuice/jitarm64-disable-psq-x
JitArm64: Disable indexed paired loadstore instructions
2021-08-22 19:11:16 -04:00
JosJuice f70ddebb40 JitArm64: Disable indexed paired loadstore instructions
Since the merge of b24b79e, we've gotten reports that the
following games are broken on JitArm64:

* Sonic Heroes
* The SpongeBob SquarePants Movie
* Astérix & Obélix XXL
* The Incredibles: Rise of the Underminer

Disabling the register cache avoids the issue, so the cause
of the bug might not actually have anything to do with the
newly implemented instructions. Nevertheless, I don't want
to ship a beta with this problem present, so I would like to
disable these instructions for the time being.
2021-08-22 22:16:02 +02:00
JosJuice 0cf8405126 JitArm64: Make HandleFastmemFault less unsafe
HandleFastmemFault works correctly when faults only happen in
expected locations, but it does some things that are rather
dangerous for faults in unexpected locations, like decrementing
an iterator without checking whether it's equal to begin.

This change cleans up the logic by making m_fault_to_handler's
key be the end of the fastmem region instead of the start.
2021-08-22 19:51:21 +02:00
Pokechu22 44129dda4c dsp_rom: Add version numbers and hashes to VerifyRoms and readme 2021-08-22 10:49:46 -07:00
Pokechu22 a5e2a0d973 dsp_rom: Remove illegal use of AX with SRS 2021-08-22 10:49:46 -07:00
Pokechu22 9b1d370478 DSPLLE: Implement conditional variants of RTI 2021-08-22 10:49:46 -07:00
Pokechu22 f9e36bfa67 DSPLLE: Split SRS into SRS and SRSH
Hardware testing indicated that SRS uses a different list of registers than LRS (specifically, acS.h can be used with SRSH but not LRS, and SRS does not support AX registers, and there are 2 encodings that do nothing).
2021-08-22 10:49:46 -07:00
Pokechu22 51c26d82a5 DSPSpy: Require user to specify a test_main label
This makes the point where execution starts more obvious compared to a start_of_test label at the end of the include, and allows putting other functions at the start of the file.  This change also modifies the existing tests to build with this change.
2021-08-22 10:49:46 -07:00
Pokechu22 5f7c852d22 DSPSpy: Split main dsp_base logic from interrupt handlers
This is so that interrupt handlers can be manually specified in tests that need them.
2021-08-21 20:10:42 -07:00
Pokechu22 87dc668522 DSPSpy: Fix hang when using the free DSP rom 2021-08-21 20:10:42 -07:00
Pokechu22 88d2a7260d DSPLLE: Improve various instruction comments
* DSP*Arithmetic: Fix grammar for ANDCF and ANDF
* DSP*Arithmetic: Fix registers used by MOVAX and MOV
* DSP*Branch: Fix documentation for JMPR
* DSP*Branch: Fix HALT encoding ("I think I saw a two")
* DSP*ExtOps: Fix 'LN encoding (The listed encoding was for 'L)
* DSP*ExtOps: Improve documentation for 'LD and 'LDAX
* DSPJitExtOps: Correct typo
* DSP*LoadStore: Remove obsolete comment about pc in SRS (This was fixed in 1419e7e5b2)
* DSP*LoadStore: Fix comments for LRR/SRR
* DSP*Misc: Improve documentation for SBCLR and SBSET
* DSP*Multiplier: Fix MULXAC encoding (The previous encoding was for MULXMVZ)
* DSP*Multiplier: Fix tabs in MULCAC and MULCMVZ (There are some other tabs in comments in the JIT, but these are the only ones that are in instruction comments instead of indicating the corresponding interpreter code.  Those other comments can be corrected in a different PR, as they're not documentation related.)
* DSPJitMultiplier: Fix MULXMVZ typo
2021-08-21 17:07:14 -07:00
Pokechu22 ddc2dd91d2 DSPSpy: Create README.md 2021-08-21 17:07:14 -07:00
Pokechu22 1ad8dd7634 DSPSpy: Remove build.sh and sbuild.sh
This also removes the emu folder from the Makefile, and the Config.h file.  I'm not entirely sure what build.sh was for, but my best guess is that it was some kind of tool to run emulated DSP code at the same time as the actual DSP code and compare the results.  I don't know if it ever worked, but it certainly doesn't work now.
2021-08-21 17:07:14 -07:00
Pokechu22 3eaf06d2e0 DSPSpy: Create .gitignore 2021-08-21 17:07:14 -07:00
Pokechu22 602163b623 docs/DSP: Fix typo with MULCMVZ and MULCMV 2021-08-21 17:07:14 -07:00
Pokechu22 408623b6e9 docs/DSP: Document behavior of LRS/SRS/SI with CR 2021-08-21 17:07:14 -07:00
Pokechu22 211c2b5d99 docs/DSP: Add most missing instructions
These instructions were already implememented by Dolphin, but never added to the manual.  Extension instructions will be handled in a later commit, as wlil instructions that were not previously implememented by Dolphin.
2021-08-21 16:05:05 -07:00
Dentomologist 87924f2ddd DolphinQt: Remove Windows dialog help buttons 2021-08-21 10:53:12 -07:00
JosJuice 90fcaf7e96 Jit: Use one less register in dcbx
We were using a "value" register to avoid clobbering physical_addr,
but this isn't actually needed anymore. The only bits we need from
physical_addr after we start clobbering it are bits 5-9, and
those bits are identical in effective_addr and physical_addr,
so we can read them from effective_addr instead.
2021-08-19 23:26:11 +02:00
Admiral H. Curtiss f5cd17925a PowerPC: Fix for calling InvalidateICacheLines() with a count of 1 causing a (harmless) second invalidation. 2021-08-19 22:54:34 +02:00
Tilka 3aaab25810
Merge pull request #10032 from Pokechu22/dsp-lle-masks
DSP masking and sign extension fixes
2021-08-18 20:20:31 +01:00
Pokechu22 c3dec34391 UberShaderVertex: Simplify color channel logic 2021-08-18 10:40:54 -07:00
Pokechu22 06579e4d53 VertexShaderGen: Simplify color channel logic 2021-08-18 10:40:54 -07:00
Pokechu22 2519d14e36 UberShaderVertex: Fix Tony Hawk Pro Skater 4
Fixes https://bugs.dolphin-emu.org/issues/12620

The changed code did not match the corresponding code in VertexShaderGen.  Some parts of the sky have 2 color channels in each vertex, while others only have 1, despite only color channel 0 being used and XFMEM_SETNUMCHAN being set to 1 for both of them.  The old code (from #4601) caused channel 0 to be set to channel 1 if the vertex contained both color channels but the number of channels was set to 1, which is wrong.
2021-08-18 10:40:53 -07:00
JosJuice 4f09c320e8 Interpreter: Simplify mcrfs implementation 2021-08-18 18:18:19 +02:00
Lioncash b7b45eb111 Interpreter: Make signedness and narrowing conversions explicit
Makes our conversions between the different signs explicit to indicate
that they're intentional and also silences compiler warnings when
compiling with sign conversion or stricter truncation warnings enabled.
2021-08-18 09:56:00 -04:00
Mai M 33154de614
Merge pull request #10039 from OatmealDome/spdx-leftovers
Fix some missed items from SPDX transition
2021-08-17 23:02:32 -04:00
Mai M 6863b7ae9e
Merge pull request #10036 from JosJuice/jitarm64-psq-x
JitArm64: Implement indexed paired loadstore instructions
2021-08-17 23:00:57 -04:00
Mai M 437b475254
Merge pull request #10037 from OatmealDome/min-macos-bump
Bump minimum macOS to 10.13 High Sierra
2021-08-17 22:59:43 -04:00
OatmealDome 5c5c3b8856 DolphinQt: Copy COPYING and Licenses directory to output 2021-08-17 22:40:27 -04:00
OatmealDome 6aa2a6b466 UISettings: Remove missed comment about license.txt 2021-08-17 22:35:42 -04:00
OatmealDome 0a6ac4d993 AboutDialog: Fix broken license link 2021-08-17 22:34:53 -04:00
OatmealDome e5a80995dc Bump minimum macOS to 10.13 High Sierra 2021-08-17 16:27:22 -04:00
JosJuice b24b79e373 JitArm64: Implement indexed paired loadstore instructions
After writing 23b81ef without realizing that we hadn't actually
implemented the indexed paired loadstore instructions yet,
I am now implementing them.
2021-08-17 11:29:38 +02:00
JMC47 a36855c983
Merge pull request #9818 from JosJuice/jits-cdts-double
Jits: Don't use fast double-to-single when input is double precision
2021-08-17 05:21:08 -04:00
JosJuice 62e7b34c88 JitArm64: Don't lock W30 in dcbx
If W30 is in use and we don't lock it, it will be pushed to the
stack before the BLR, so there isn't really any reason to lock W30.
2021-08-17 10:30:18 +02:00
JosJuice 856ff296ae JitArm64: Optimize dcbx being called in a loop over a large memory region
JitArm64 port of 8b2f5d5.
2021-08-17 10:30:17 +02:00
JMC47 d162015112
Merge pull request #10007 from AdmiralCurtiss/x64-dcbx-in-loop
Jit64: dcbx loop detection for improved performance when invalidating large memory regions.
2021-08-16 21:27:16 -04:00
Admiral H. Curtiss 8b2f5d5006 Jit64: Optimize dcbx being called in a loop over a large memory region. 2021-08-17 02:38:00 +02:00
Pokechu22 439bf1597b DSPJitUtil: Remove redundant handling of ac0.h and ac1.h
m_gpr.WriteReg calls PutReg which already handles the sign extension.
2021-08-16 15:09:20 -07:00
Pokechu22 3b4bc9852f DSPInterpreter: Fix sign extension of accumulators
The extension needs to happen in SetLongAcc, not GetLongAcc, as the extension needs to always be reflected in acS.h.

There is no functional difference with the write handler for acS.h, but it is more readable than 4 casts in a row.
2021-08-16 15:09:20 -07:00
Pokechu22 858d0675b9 DSPLLE: Handle cr, sr, and prod.h masking 2021-08-16 15:09:20 -07:00
Mai M 62c3c1a23b
Merge pull request #10034 from JosJuice/jitarm64-w
JitArm64: Fix paired loadstore instruction decoding
2021-08-16 17:08:43 -04:00
Mai M d48d6f280a
Merge pull request #10033 from Pokechu22/dsp-jit-table-masking
DSP/Jit: simplify opcode table by masking
2021-08-16 17:08:18 -04:00
JosJuice 23b81ef495 JitArm64: Fix paired loadstore instruction decoding
One of those fun "how did this ever work" bugs.
2021-08-16 22:08:30 +02:00
Pokechu22 6772d26935 DSP/Jit: simplify opcode table by masking
This was done for the interpreter in aaa19acbd0.
2021-08-16 12:47:31 -07:00
Tilka 0f628ff882
Merge pull request #10028 from GerbilSoft/bugfix/RVT-firmware-filenames
VolumeVerifier: Use correct IOS filename for development discs.
2021-08-16 20:47:07 +01:00
Pokechu22 3d6ff60a96 DSPSpy: Handle modified wr0 and cr registers correctly 2021-08-16 09:51:16 -07:00
Pokechu22 14119c86a4 DSPInterpreter: Fix IsLess
`IsLess` would incorrectly return true if both `SR_OVERFLOW` and `SR_SIGN` are set, as `(sr & SR_OVERFLOW) != (sr & SR_SIGN)` becomes `SR_OVERFLOW != SR_SIGN` which is true as the two masks are different.  This broke in e651592ef5.

This issue only affected the DSP LLE Interpreter, and not the DSP LLE JIT.

I've also included a simple test case for this.  `ax0.l` (on the top left) is set to 0 if the instruction following `IFL` does not execute and to 1 if it is executed.
2021-08-15 19:45:44 -07:00
David Korth 95d3416305 VolumeVerifier: Use correct IOS filename for development discs.
Retail-signed discs use the format: IOS56-64-v5661.wad
Debug-signed discs use the format:  firmware.64.56.22.29.wad

Debug-signed discs usually have a 128 version of the firmware as well,
since some devkits have 128 MB MEM2. (Retail has 64 MB.)
2021-08-15 12:41:35 -04:00
Tillmann Karras f9d2d42a4c VideoCommon: report games that set bits in XFMEM_CLIPDISABLE
The SDK only exposes the lowest bit. The Nintendo Channel intro is currently
broken because we don't implement this (see issue 12562).
2021-08-15 04:41:49 +01:00
Shawn Hoffman 4ef87194a4 revert workaround for msvc arm64 ICE in WIABlob 2021-08-14 03:57:53 -07:00
Shawn Hoffman f3031e2be2 bump msvc required version to align wth vs 16.11 2021-08-14 03:57:25 -07:00
Admiral H. Curtiss df1e59409b PowerPC: Handle translation if range given to InvalidateICache spans multiple BAT or Page Table pages. 2021-08-13 21:23:12 +02:00
Mai M 891726e924
Merge pull request #10013 from OatmealDome/wsd-thanos-snap
WiimoteReal: Remove WiimoteScannerDarwin
2021-08-13 13:24:38 -04:00
Mai M 82969db7de
Merge pull request #10018 from JosJuice/code-allow-name-line
DolphinQt: Allow $ line when entering AR/Gecko code
2021-08-13 13:22:25 -04:00
Mai M e2ccad7f95
Merge pull request #10017 from JosJuice/qt-gecko-notes-lf
DolphinQt: Don't add trailing newline to Gecko notes
2021-08-13 13:21:07 -04:00
Mai M c43f451da8
Merge pull request #10022 from MerryMage/codesign-debug
DolphinQt: Add entitlement to allow debugger to attach in Debug builds
2021-08-13 13:19:59 -04:00
Mai M 7cc8437050
Merge pull request #10023 from JosJuice/qt-breakpoint-focus
DolphinQt: Set default focus for NewBreakpointDialog
2021-08-13 13:18:58 -04:00
JosJuice 6c908f8ddb DolphinQt: Set default focus for NewBreakpointDialog
I found it a little bit annoying that you can't start typing
the desired address immediately after opening the window.

Also getting rid of the window's ? button while I'm at it.
2021-08-13 10:56:11 +02:00
Admiral H. Curtiss 57037a69f9 PowerPC: Call InvalidateICacheLine() in InstructionCache::Invalidate() for clarity. 2021-08-12 19:27:25 +02:00
Admiral H. Curtiss 4afbd87188 PowerPC: Fast path in InvalidateICache is only valid if the address is 32-byte aligned. 2021-08-12 19:27:25 +02:00
Merry ec2c10887f DolphinQt: Add entitlement to allow debugger to attach in Debug builds 2021-08-12 15:08:17 +01:00
Tilka a27dbe58a6
Merge pull request #10020 from K0bin/d3d12-state-fix
D3D12: Transition compute textures to UAV state
2021-08-12 00:04:25 +01:00
Léo Lam bfbbed8308
Merge pull request #10019 from JosJuice/port-enable-cheats
Port Enable Cheats to the new config system
2021-08-11 21:20:10 +02:00
JosJuice fa0525f826 Port Enable Cheats to the new config system 2021-08-11 18:07:43 +02:00
Robin Kertels 40dcf1c2e2
D3D12: Transition compute textures to UAV state 2021-08-11 00:17:04 +02:00
JosJuice cda442d2d8 DolphinQt: Allow $ line when entering AR/Gecko code
When you come across a cheat code in a place like the Dolphin
wiki, it's often posted like this:

$16:9 Widescreen
0441187C 3FE38E39

Sometimes users try to paste this in its entirety into the Code
field, which leads to Dolphin reporting an error on the first line.
I think it would be nice to make this a little smoother by having
Dolphin accept having a first line that starts with $.
2021-08-10 19:19:34 +02:00
JosJuice 7eabd9e830 DolphinQt: Don't add trailing newline to Gecko notes
Also fixing a string mistake where the text for AR codes
was copypasted for Gecko codes.
2021-08-10 18:29:54 +02:00
OatmealDome fba8bfe6a6 WiimoteReal: Check for error before discarding report 2021-08-09 21:29:50 -04:00
OatmealDome e9a11cdbfd WiimoteReal: Remove WiimoteScannerDarwin
For several reasons:
- It pegs the CPU at 95% for scanning even when Dolphin is idle
- WiimoteScannerHidapi works fine on macOS
- Less macOS code to maintain
2021-08-09 18:48:58 -04:00
Tilka 128e1029dd
Merge pull request #10010 from AdmiralCurtiss/jit-cache-translate-address-cleanup
PowerPC: Minor cleanup around JitCache_TranslateAddress().
2021-08-09 17:33:46 +01:00
Admiral H. Curtiss 116d1361d5 PowerPC: Let callers of JitCache_TranslateAddress determine whether the address was translated. 2021-08-09 18:25:35 +02:00
Admiral H. Curtiss 95fbd09691 PowerPC: Update variable name conventions and const-ness around calls to JitCache_TranslateAddress(). 2021-08-09 01:25:04 +02:00
Admiral H. Curtiss 3296d2fc1f PowerPC: Reorder members of TranslateAddressResult to reduce struct size. 2021-08-09 01:25:04 +02:00
Tillmann Karras eda2035874 AudioCommon: rename isValid() to IsValid() 2021-08-08 03:05:03 +01:00
Tillmann Karras b6d8c111bc AudioCommon: make SoundLoop() non-virtual and private 2021-08-08 00:15:05 +01:00
Tillmann Karras d14b9a73b2 AudioCommon: get rid of Update(), it never does anything 2021-08-08 00:14:49 +01:00
Tillmann Karras c2d396526b AudioCommon: fix "Error stopping stream" when emulation is paused 2021-08-08 00:14:24 +01:00
JosJuice a4e5d233be
Merge pull request #9864 from PEmu2/wiimote
Change "Wiimote" to "Wii Remote" in interface
2021-08-07 12:44:55 +02:00
JosJuice c79757618d
Merge pull request #9993 from Techjar/late-vi-output
VI: Implement post-scanout XFB output
2021-08-07 12:41:59 +02:00
Tilka f2a77069b7
Merge pull request #10004 from Pokechu22/dff-read-error-handling
FifoDataFile: Improve error handling when reading
2021-08-07 02:15:01 +01:00
Pokechu22 59a1a603ff FifoDataFile: Improve error handling when reading 2021-08-06 15:55:50 -07:00
Admiral H. Curtiss e3a784ffba PowerPC: Convert enum in TranslateAddressResult to enum class. 2021-08-07 00:07:46 +02:00
Tilka ac6d008008
Merge pull request #10002 from OatmealDome/macos-nunchuk-shake
Nunchuk: Use correct middle click expression on macOS
2021-08-06 22:05:43 +01:00
Tilka 5cd2160d43
Merge pull request #9996 from OatmealDome/spirv-opsource
ShaderCompiler: Attach shader source code to SPIR-V
2021-08-06 21:48:31 +01:00
OatmealDome fc4f6bb9b0 Nunchuk: Use correct middle click expression on macOS 2021-08-06 16:47:29 -04:00
JosJuice 37b218b344 PowerPC: Fix bad copypaste in LookupTLBPageAddress
Fixes https://bugs.dolphin-emu.org/issues/12611.
2021-08-06 18:03:54 +02:00
JosJuice 125af42e4b Jit: Re-add dcbx masking
When making 92d1d60, I checked whether the ~0x1f masking in dcbx
actually was necessary. I came to the conclusion that it wasn't,
so I removed it. However, I hadn't checked the second half of
InvalidateICache closely enough - the masking is actually needed.

This commit re-adds the masking, but this time in C++ code instead
of in jitted code in order to save icache. Though I suppose the
difference doesn't matter all that much, since this is in farcode
and all...

Hopefully fixes https://bugs.dolphin-emu.org/issues/12612.
2021-08-06 14:55:07 +02:00
JosJuice e753455abb JitArm64: Fix W8 slowmem store
Regression from 12629be.
2021-08-05 10:57:41 +02:00
OatmealDome d453390c48 ShaderCompiler: Attach source text to SPIR-V for debuggers like RenderDoc 2021-08-05 03:04:18 -04:00
Tilka 942545b7fc
Merge pull request #9964 from JosJuice/uncached-unaligned-writes
PowerPC: Implement broken masking for uncached unaligned writes
2021-08-04 22:23:07 +01:00
JosJuice f333c0949f PowerPC: Implement PI interrupt for uncached unaligned writes 2021-08-04 23:09:43 +02:00
JosJuice 543ed8a97c PowerPC: Implement broken masking for uncached unaligned writes
This implements the behavior described in
https://bugs.dolphin-emu.org/issues/12565.

Thank you to eigenform, delroth, phire, marcan, segher, and Extrems
for all helping in one way or another with the efforts to reverse
engineer this behavior, and to Rylie for reporting the issue.
2021-08-04 23:04:02 +02:00
JosJuice 12629beff8 JitArm64: Call swap variants of memory write functions
Write_U16_Swap leaves the upper 32 bits alone. Reimplementing this
correctly in the JIT would require more than one instruction,
so let's just call Write_U16_Swap instead, like Jit64 does.
2021-08-04 23:04:02 +02:00
JosJuice ecbce0a204 PowerPC: Pass on full 32-bit register contents for 8/16-bit writes 2021-08-04 23:04:02 +02:00
JosJuice c56526d5f8 PowerPC: Keep track of write-through/cache-inhibited
One of the following commits will add emulation of a quirk
that only happens when writing to memory which is mapped as
write-through or cache-inhibited, so let's keep track of
which memory is mapped in this way.
2021-08-04 23:04:02 +02:00
Tilka 9c65519e79
Merge pull request #9986 from Pokechu22/partition-info
FilesystemWidget: Show more information about partitions
2021-08-04 21:54:07 +01:00
Léo Lam 28b7e2ef30
Merge pull request #9995 from AdmiralCurtiss/dcbx-virtual-address
Jit64: Always pass effective address to InvalidateICache() in dcbx.
2021-08-04 22:24:41 +02:00
Admiral H. Curtiss 0e76dabbbb Jit64: Always pass effective address to InvalidateICache() in dcbx. 2021-08-04 22:17:42 +02:00
Sepalani 0553aeb0e0 IOS/Network: Make name resolution asynchronous 2021-08-04 20:08:42 +04:00
Techjar 797d0b7b1b VI: Implement post-scanout XFB output
This adds about a frame of latency, and since most games don't change
VI registers during scanout, we can get away with outputting the XFB at
the start of scanout. WWE Crush Hour is the (only currently known)
exception, which has flickering problems when doing it this way.

This adds a path to perform the output at the end of scanout, and gates
it behind an option which defaults to using the latency-reducing
pre-scanout path.
2021-08-03 23:37:50 -04:00
Léo Lam c68bd518c3
Merge pull request #9987 from Filoppi/patch-15
Preserve spaces in mapping preview of control names
2021-08-04 03:29:12 +02:00
Léo Lam c9c5f7a89c
Merge pull request #9928 from Pokechu22/shadow-the-hedgehog-eyelids-NaN
Convert NaN to 1 when generating texture coordinates
2021-08-04 03:08:34 +02:00
JosJuice 5bd188d40d Jit64: Fix BATAddressLookup bit test
BT sets the carry flag, not the zero flag.
2021-08-03 17:32:04 +02:00
Filippo Tarpini a99932da12
Preserve spaces in mapping preview of control names
PR https://github.com/dolphin-emu/dolphin/pull/9700 removed spaces from within control names, which some user complained about, and their point of view is kind of understandable:
https://bugs.dolphin-emu.org/issues/12605
with this change, only spaces outside (between) control names are trimmed, which are the ones we wanted to trim in the first place.
This will still retain the major advantages from 9700.

Basically, "`Button 1`   +  `Button 2`" was showing as "`Button1`+`Button2`", while it will now show as "`Button 1`+`Button 2`".
2021-08-03 00:04:22 +03:00
Pokechu22 0b86a03438 FilesystemWidget: Show more information about partitions 2021-08-02 12:20:48 -07:00
Tilka 4b022a4bb1
Merge pull request #9948 from Dentomologist/fix_wiimotescanner_shutdown_crash
WiimoteReal: Fix Dolphin shutdown crash
2021-08-02 17:44:17 +01:00
Léo Lam 35bf5e3839
Merge pull request #9962 from OatmealDome/macos-vulkan-default
VideoBackendBase: Prefer Vulkan over OGL on macOS Mojave and newer
2021-08-02 03:39:12 +02:00
Pokechu22 f46fe77264 GeometryShaderGen: Rename ApiType to api_type 2021-08-01 15:17:21 -07:00
Pokechu22 3b752c4d5d UberShaderPixel: Rename ApiType to api_type 2021-08-01 15:09:20 -07:00
JosJuice 56057c3dea
Merge pull request #9961 from Simonx22/update-dependencies
Android: update dependencies
2021-08-01 13:10:59 +02:00
Tillmann Karras f45bb89e97 DSPHLE: report games that use unimplemented AX features
Not including GC DPL2 mixing here since it's easy to find games that use it.
2021-08-01 03:46:27 +01:00
Mai M 627832355e
Merge pull request #9973 from JosJuice/jit-fma-negation-order
Jit: Use accurate negation order for FMA instructions
2021-07-31 20:18:49 -04:00
Mai M 7c365349ee
Merge pull request #9977 from JosJuice/jitarm64-mtfsfx
JitArm64: Implement mtfsfx
2021-07-31 17:54:48 -04:00
JosJuice a90b0a1c93 JitArm64: Implement mtfsfx
The sixth and final part of implementing the FPSCR system register
instructions.
2021-07-31 23:50:20 +02:00
Pokechu22 f3f466ae82 DSPDisassembler: Fix LSR/ASR formatting
Originally, 1479 (for example) would disassemble as `lsr $ACC0, #-7`.  At some point (likely the conversion to fmt), this regressed to `lsr $ACC0, #4294967289`.  Now, it disassembles as `lsr $ACC0, #7`.
2021-07-31 13:18:07 -07:00
Léo Lam 3b88ffbe60
Merge pull request #9978 from JosJuice/jit-ibat-table
Jit: Use ibat_table for dcbf/dcbi/dcbst address check
2021-07-31 18:59:17 +02:00
JosJuice 5c5de35568 Jit: Use ibat_table for dcbf/dcbi/dcbst address check
Minor mistake in 92d1d60. We should be using ibat_table instead
of dbat_table, since we're dealing with invalidating icache.
2021-07-31 14:30:03 +02:00
Tilka 0470be5884
Merge pull request #9972 from Pokechu22/validation-layer
Recompile shaders when 'Enable API Validation Layers' is toggled
2021-07-31 10:16:47 +01:00
Mai M bef1fdb4cb
Merge pull request #9974 from JosJuice/jitarm64-mtfsfix
JitArm64: Implement mtfsfix
2021-07-31 03:56:51 -04:00
Tillmann Karras 655bff5d44 DSPHLE: include compressor state in save states 2021-07-31 04:16:26 +01:00
Pokechu22 d36282ae61 Qt: Un-maximize GBA widget before resizing it 2021-07-30 18:50:45 -07:00
Léo Lam a208ff5aab
Merge pull request #9957 from JosJuice/dcbx-faster
Jit: Perform BAT lookup in dcbf/dcbi/dcbst
2021-07-31 03:27:24 +02:00
Tilka 48af29f4ce
Merge pull request #9968 from Tilka/ax2
DSPHLE: add support for dynamic range compression
2021-07-31 00:43:17 +01:00
Tillmann Karras 09faf0987d DSPHLE: add support for dynamic range compression
The CPU-side AX library enables it by default and uses hardcoded parameters.
CMD_COMPRESSOR_TABLE_ADDR (0x0A) was incorrect. It's always a nop on the
GameCube and was probably confused with the Wii version.
2021-07-31 00:05:49 +01:00
JosJuice 0e62dac4bb JitArm64: Implement mtfsfix
Part 5 of 6 of implementing the FPSCR system register instructions.
2021-07-30 10:24:41 +02:00
JosJuice 08b358a829 Jit64: Fix minor fmaddXX inefficiencies 2021-07-29 23:34:20 +02:00
JosJuice 93e636abc3 Jit: Use accurate negation order for FMA instructions
It was believed that this only mattered when the rounding mode was
set to round to infinity, which games generally don't do, but it
can also affect the sign of the output when the inputs are all zero.
2021-07-29 23:33:35 +02:00
Pokechu22 087ddfca83 Mention 'Enable API Validation Layers' also enabling symbols for D3D 2021-07-28 21:35:36 -07:00
Pokechu22 6db519793a AdvancedWidget: Fix strange text wrapping 2021-07-28 21:35:36 -07:00
Pokechu22 b6d2938731 Recompile shaders when 'Enable API Validation Layers' is toggled 2021-07-28 21:35:36 -07:00
Pokechu22 eb81968fe6 Convert ShaderHostConfig to BitField 2021-07-28 21:35:36 -07:00
Mai M c86c02e46b
Merge pull request #9960 from JosJuice/jitarm64-mtfsb1x
JitArm64: Implement mtfsb1x
2021-07-28 20:46:09 -04:00
Mai M 28ee0af9a3
Merge pull request #9970 from JosJuice/jit64-fmaddxx-accurate-nan
Jit64: Fix fmaddXX with accurate NaNs
2021-07-28 20:45:00 -04:00
Léo Lam 11d126965a
Merge pull request #9967 from Pokechu22/max-aniso-note
Remove note about anisotropic filtering requiring edge LOD
2021-07-29 02:02:30 +02:00
Léo Lam 0553b4a241
Merge pull request #9954 from Tilka/ax
DSPHLE: fix problems with older ucodes
2021-07-29 01:42:24 +02:00
JosJuice 3bb4a4e344 Jit64: Fix fmaddXX with accurate NaNs
So it turns out you have to pass XMM0 as the clobber register
to HandleNaNs, because HandleNaNs uses BLENDVPD and BLENDVPD
implicitly uses XMM0, and nobody noticed when I broke this in
2c38d64 because nobody plays the one game that needs accurate NaNs.
2021-07-28 23:03:03 +02:00
Pokechu22 1640fa9096 Remove note about anisotropic filtering requiring edge LOD
This was added because YAGCD's info on MAXANISO (near TX_SETMODE0 in Section 5.11.1) claims it's the case, but Extrems says it does work.  I haven't tested anything myself, and dolphin still does not actually implement anisotropic filtering based on this field.
2021-07-27 19:33:31 -07:00
JosJuice ca55d599e8 Jit: Mark ValidBlockBitSet::Test as const 2021-07-27 11:11:30 +02:00
Tilka 7fe97b27de
Merge pull request #9958 from Tilka/dspspy
DSPSpy: fix $prod printing
2021-07-26 00:43:17 +01:00
OatmealDome 46e331d000 VideoBackendBase: Prefer Vulkan over OGL on macOS Mojave and newer 2021-07-25 19:21:06 -04:00
Simonx22 9a33fd3f7f Android: update dependencies 2021-07-25 16:23:18 -04:00
JosJuice c9a4021537 JitArm64: Implement mtfsb1x
Part 4 of implementing the FPSCR system register instructions.
2021-07-25 19:18:43 +02:00
Tilka 3e04cb6e6b
Merge pull request #9959 from Bonta0/gba-qol
Qt: GBA QoL improvements
2021-07-25 17:23:57 +01:00
Tillmann Karras 14da138ed9 DSPHLE: fix and re-enable polyphase resampling
This fixes the title screen music of Snowpack Park.
2021-07-25 15:45:06 +01:00
Tillmann Karras a5dfd65eb4 DSPSpy: fix $prod printing 2021-07-25 15:15:15 +01:00
JosJuice 92d1d60ff1 Jit: Perform BAT lookup in dcbf/dcbi/dcbst
When 66b992c fixed https://bugs.dolphin-emu.org/issues/12133,
it did so by removing the broken address calculation entirely and
always using the slow path. This caused a performance regression,
https://bugs.dolphin-emu.org/issues/12477.

This commit instead replaces the broken address calculation with
a BAT lookup. If the BAT lookup succeeds, we can use the old fast
path. Otherwise we use the slow path.

Intends to improve https://bugs.dolphin-emu.org/issues/12477.
2021-07-25 15:15:15 +02:00
JosJuice b84a0704cd Revert "Jit: Fix correctness issue in dcbf/dcbi/dcbst"
This reverts commit 66b992cfe4.

A new (additional) correctness issue was revealed in the old
AArch64 code when applying it on top of modern JitArm64:
LSR was being used when LSRV was intended. This commit uses LSRV.
2021-07-25 15:13:57 +02:00
Pokechu22 3a4d8379bf Convert NaN to 1 when generating texture coordinates
This fixes eyelids in Shadow the Hedgehog during cutscenes (https://bugs.dolphin-emu.org/issues/11458)
2021-07-24 22:20:35 -07:00
Tilka 55a465c6e6
Merge pull request #9949 from JosJuice/wia-ice-3
DiscIO: Fix broken workaround for MSVC ARM64 ICE
2021-07-25 05:14:10 +01:00
Tilka c42b1c1b9f
Merge pull request #9921 from Pokechu22/non-power-of-2-wrap
Software: Handle texture wrapping more accurately
2021-07-25 05:08:11 +01:00
Bonta cfd0f4661f Qt: Implement GBA Interframe Blending 2021-07-24 20:34:26 +02:00
Tillmann Karras f7948ce7c9 DSPHLE: fix Wii System Menu 1.0 ucode 2021-07-24 19:04:39 +01:00
Bonta 6fc060bdca Qt: AlwaysOnTop GBA widget option 2021-07-24 20:00:16 +02:00
Bonta 501868ace0 Qt: Make GBA widgets movable with left click in borderless mode 2021-07-24 19:37:39 +02:00
Bonta 63ff86adff Qt: Borderless GBA windows 2021-07-24 19:12:17 +02:00
Tillmann Karras b1185fb239 DSPHLE: handle Wii Startup Menu ucode correctly 2021-07-24 16:57:12 +01:00
Sepalani 0b0bab11d8 PPCSymbolDB: Improve symbol map column detection 2021-07-24 17:50:01 +04:00
Bonta ee64e217f4 Qt/Core: Refactor GBA Core accessors 2021-07-24 14:54:57 +02:00
JosJuice 5fe23ccc3e DiscIO: Fix broken workaround for MSVC ARM64 ICE
The workaround added in 30f9f31 caused a regression where Dolphin
incorrectly replaced runs of one byte with runs of another byte
when writing WIA and RVZ files. ReuseID::operator< was always
returning false unless the ReuseIDs being compared had different
partition keys, which caused std::map<ReuseID, GroupEntry>
to treat all ReuseIDs with the same partition key as equal.
2021-07-24 13:29:03 +02:00
Dentomologist cb127509e1 WiimoteReal: Fix Dolphin shutdown crash
Clear m_scan_thread_running later to avoid accessing m_backends after it
has been cleared.
2021-07-23 17:17:11 -07:00
JosJuice f70df930a6 Android: Adjust DSP selection names
The Android strings were not updated in 59e6048 along with the
DolphinQt strings.
2021-07-23 08:57:39 +02:00
Mai M f380c23fda
Merge pull request #9890 from JosJuice/jitarm64-mtfsb0x
JitArm64: Implement mtfsb0x
2021-07-22 21:41:01 -04:00
Mai M 971f110b99
Merge pull request #9937 from Techjar/netplay-split-save-sd-write
NetPlay: Split save and SD card write settings
2021-07-22 21:40:31 -04:00
Mai M 4f87821f21
Merge pull request #9938 from Pokechu22/e-reader-context-menu-item
GBA: Add "Scan e-Reader Card(s)" context menu item
2021-07-22 21:39:10 -04:00
Mai M 885a4646f8
Merge pull request #9941 from JMC47/dsprecommendations
AudioPane: Adjust DSP selection names
2021-07-22 21:37:49 -04:00
JMC47 59e6048200 AudioPane: Adjust DSP selection names 2021-07-22 20:59:35 -04:00
Pokechu22 bcf2c6b9b9 MemoryViewWidget: Remove unnecessary column
This column would end up containing junk data after changing the data type.
2021-07-22 17:39:35 -07:00
Markus Wick 5af5656383
Merge pull request #9932 from JosJuice/jitarm64-dcbz-backpatch
JitArm64: Fix dcbz backpatch
2021-07-23 01:58:59 +02:00
Markus Wick 8ad7508620
Merge pull request #9767 from JosJuice/jitarm64-fpr-callee-saved
JitArm64: Improve Arm64FPRCache::GetCallerSavedUsed
2021-07-23 01:53:44 +02:00
Pokechu22 50109d70b6 GBA: Add "Scan e-Reader Card(s)" context menu item 2021-07-22 12:18:07 -07:00
JosJuice db5a78781f
Merge pull request #9929 from Tilka/ax
DSPHLE: re-enable low-pass filter
2021-07-22 19:05:29 +02:00
JosJuice 484279f013
Merge pull request #9933 from Dentomologist/remove_stringutil_buildcompletefilename
StringUtil: Remove unused function BuildCompleteFilename
2021-07-22 19:05:07 +02:00
JosJuice fdcea8566d JitArm64: Improve Arm64FPRCache::GetCallerSavedUsed
If we're only using the lower 64 bits of a callee-saved
register, GetCallerSavedUsed can return false for it.
2021-07-22 10:42:44 +02:00
Techjar 3ce5caf887 NetPlay: Split save and SD card write settings
This actually eliminates any setting pertaining to SD cards from the
NetPlay dialog, as it would effectively just be a duplicate of the
setting in the Wii pane, potentially causing confusion.

This also enables save data writing by default, as this is probably
what most players want, and should avoid them losing hours of progress
because they forgot to tick a checkbox.
2021-07-22 01:16:20 -04:00
Dentomologist f5e5e8553c StringUtil: Remove unused function BuildCompleteFilename 2021-07-21 12:39:00 -07:00
JosJuice 1df3456267 JitArm64: Remove a comment in dcbz implementation
This implementation is pretty efficient in my opinion. And "As
long as we aren't falling back to interpreter we're winning a lot"
applies to basically every instruction to some degree anyway.
2021-07-21 19:24:41 +02:00
JosJuice d91d6fcdc5 JitArm64: Fix dcbz backpatch
The dcbz instruction needs to lock W30 so that the slowmem code will
push and pop it when calling into C++. Also, the slowmem code expects
that the address is present in W0, so replace the use of W0 as a scratch
register in the fastmem code with the now locked W30.
2021-07-21 19:19:52 +02:00
JosJuice 302b47f5e6 JitArm64: Add temp reg parameter to Arm64RegCache::Flush
We currently have a bug when calling Arm64GPRCache::Flush with
FlushMode::MaintainState, zero free host registers, and at least
one guest register containing an immediate. We end up grabbing
a temporary register from the register cache in order to be
able to write the immediate to memory, but grabbing a temporary
register when there are zero free registers causes the least
recently used register to be flushed in a way which does not
maintain the state of the register cache.

To get around this, require callers to pass in a temporary
register in the GPR MaintainState case. In other cases,
passing in a temporary register is not required but can help
avoid spilling a register (if the caller already had a
temporary register at hand anyway, which in particular will
be the case in my upcoming memcheck pull request).
2021-07-21 16:28:19 +02:00
CrystalGamma c991904e04 PowerPC: Add reservation monitor to save state 2021-07-21 12:14:07 +02:00
CrystalGamma d763d693e8 PowerPC: Move lwarx/stwcxd. reservation into PowerPCState 2021-07-21 12:12:19 +02:00
Léo Lam 9a91b867ab
Merge pull request #9912 from Pokechu22/memory-viewer-physical-mem2
Fix MEM2 in the memory viewer in physical mode
2021-07-21 11:37:15 +02:00
JosJuice a3c8fb06c5 NetPlayClient: Remove a designated initializer
release-ubu-x64 currently fails with "sorry, unimplemented: non-trivial
designated initializers not supported". pr-ubu-x64 doesn't for some
reason, but we might as well remove the designated initializer.
2021-07-21 09:36:52 +02:00
JosJuice b2d87c49b6 JitArm64: Implement mtfsb0x
Part 3 of implementing the FPSCR system register instructions.
2021-07-21 09:22:13 +02:00
JMC47 a1e806ed76
Merge pull request #9600 from Bonta0/mgba-pr
Full GBA Controllers Integration with mGBA
2021-07-21 02:36:43 -04:00
Tillmann Karras 4a5c723114 DSPHLE: re-enable low-pass filter
Maybe this got fixed? Sonic Colors probably needs it for underwater audio.
2021-07-21 03:59:25 +01:00
Pokechu22 fa9c43cfaa Software: Handle texture wrapping more accurately
This fixes various texture offsetting issues with negative texture coordinates (bringing the software renderer in line with the hardware renderers).  It also handles the invalid wrap mode accurately (as was done for the hardware renderers in the previous commit).  Lastly, it handles wrapping with non-power-of-2 texture sizes in a hardware-accurate way (which is somewhat broken looking, as games aren't supposed to use wrapping with non-power-of-2 sizes); this has not been done for the hardware renderers.
2021-07-20 19:23:23 -07:00
Pokechu22 19332575aa WrapMode=3 behaves the same as Clamp 2021-07-20 19:23:23 -07:00
JMC47 b515786c8d
Merge pull request #9927 from OatmealDome/double-usbgecko
GeckoSockServer: Only join connectionThread if it is joinable
2021-07-20 22:18:33 -04:00
OatmealDome 48bcd96526 GeckoSockServer: Only join connectionThread if it is joinable 2021-07-20 14:56:09 -04:00
JosJuice 92fc4f1eca PixelShaderGen: Fix OpenGL ES bounding box compilation error 2021-07-20 11:39:32 +02:00
Techjar 5e0520b6e0 VideoCommon: Expand vector comparisons instead of overloading any()
For whatever stupid reason, Mali drivers do not allow overloading
built-in functions.
2021-07-20 05:24:47 -04:00
Dentomologist fe670a3e68 FileUtil: Remove duplication in FileInfo constructor 2021-07-19 11:50:17 -07:00
Pokechu22 2d460b8e31 Fix MEM2 in the memory viewer in physical mode 2021-07-18 13:09:42 -07:00
Tillmann Karras c948d7f436 PostProcessing: fix link error when switching shaders
Switching to a post-processing shader with different configuration options will
change the UBO, so we need to recompile the vertex shader as well.
2021-07-18 04:08:48 +01:00
Shawn Hoffman 8bddd8c675 remove SetRoundMode
we only care about SSE rounding mode, and set
that manually in SetSIMDMode
2021-07-17 19:29:22 -07:00
Tilka 3c90b657f3
Merge pull request #9907 from shuffle2/roundmode-bitfield
make FPSCR.RN an enum
2021-07-18 03:12:28 +01:00
Shawn Hoffman 197075293d make FPSCR.RN an enum 2021-07-17 18:55:06 -07:00
Shawn Hoffman e1bddd4c18 remove DSP::Profiler*
this is not used anywhere and seems trivial to
ressurect if it's ever needed again.
2021-07-17 18:26:32 -07:00
Shawn Hoffman c89ae53677 msvc: remove warning disables which no longer fire 2021-07-17 18:24:36 -07:00
Tilka d7a5558dc5
Merge pull request #9905 from shuffle2/msvc-outdated-comment
remove an outdated comment
2021-07-18 02:20:56 +01:00
Shawn Hoffman f5b05ae080 remove an outdated comment
seems to have been solved 5 years ago by
b707e199c2
2021-07-17 17:46:57 -07:00
Shawn Hoffman 1009825cb2 unittests: remove some msvc-specific casts
compiles on contemporary msvc
checked there is still a mul in release codegen
2021-07-17 17:41:41 -07:00
Shawn Hoffman 7117bd5772 msbuild: remove deprecated MinimalRebuild
we were explicitly disabling it, which is
effectively the new behavior
2021-07-17 14:29:03 -07:00
Léo Lam 5021a13aa9
DSPHLE: Fix running and is_stream checks in AX HLE
A voice is considered running if and only if `running` equals 1,
not if `running` is not equal to 0.

This fixes https://bugs.dolphin-emu.org/issues/12508 because for some
reason *The Sims 2 - Castaway* sets `running` to 8 when a stream
finishes playing; previously our AX HLE would just loop the voice
and eventually crash after accessing invalid memory addresses.

Thanks to JMC47 and delroth's help, I've verified that this is the
correct check for the following ucodes:

GC:
* 0x3ad3b7ac
* 0x3daf59b9
* 0x4e8a8b21
* 0x07f88145
* 0xe2136399
* 0x3389a79e

Wii:
* 0x347112ba
* 0xfa450138
* 0xadbc06bd

And while I was fixing the running check, I noticed that the is_stream
field was also being handled incorrectly, so I've fixed that as well.
2021-07-14 19:21:35 +02:00
Léo Lam 887fcfc99a
DSPHLE: Remove redundant accelerator end check for AX Wii 2021-07-14 19:20:25 +02:00
Connor McLaughlin 9b17805be9
Merge pull request #9881 from blaahaj/postprocessing-fix
PostProcessing: Fix OpenGL UBO linking with configuration options
2021-07-14 13:14:17 +10:00
Bonta b8f0e97c02 Movie: GBA Support 2021-07-13 16:44:04 +02:00
Bonta 45f2461a53 NetPlay: GBA Support 2021-07-13 16:43:59 +02:00
Bonta b73d16a71a Qt/Core: Implement GBA Hotkeys 2021-07-13 16:43:42 +02:00
Bonta d6f86e1754 Qt: Implement GBA host and widget 2021-07-13 16:43:28 +02:00
Bonta 9b80fb7deb Qt: GBA Pad config 2021-07-13 16:43:00 +02:00
Bonta d0f0b4c0e0 SI: Implement GBAEmu device 2021-07-13 16:42:57 +02:00
Bonta 9a22ff653f Core: Implement GBA Core using libmgba 2021-07-13 16:42:52 +02:00
Bonta 2d744da68c Core: Add GBA host interface 2021-07-13 16:42:49 +02:00
Bonta d849d56695 SI/DeviceGBA: Expose GetTransferTime 2021-07-13 16:42:44 +02:00
Bonta fdcee30a3d SI: Expose Commands constants and switch to enum class 2021-07-13 16:42:40 +02:00
Bonta 8ee21acf34 Pad: GBA config 2021-07-13 16:42:35 +02:00
Bonta d2353c79ea MappingWidget: Support for boxes with multiple columns 2021-07-13 16:42:31 +02:00
Bonta 27eab609dc GCController: Make HandleMoviePadStatus static 2021-07-13 16:42:27 +02:00
Bonta ec5d557895 Qt: GBA Config dialog 2021-07-13 16:42:23 +02:00
Bonta 110887435c Config: GBA settings 2021-07-13 16:41:18 +02:00
Bonta 502def7f71 Mixer: Support GBA samples mixing 2021-07-13 16:40:07 +02:00
Bonta 1b27f22cbc SI: Allow devices to schedule events 2021-07-13 16:40:01 +02:00
Bonta 44aaf108d1 Externals: Integrate mGBA as a submodule 2021-07-13 16:39:29 +02:00
Léo Lam b0d2df727a
Merge pull request #9686 from Dentomologist/convert_adapter_tooltip_to_balloontip
GeneralWidget: Convert Adapter tooltip to BalloonTip
2021-07-13 03:33:42 +02:00
Léo Lam de54856fbb
Merge pull request #9846 from jordan-woyak/report-dup-setting
Config: Add an ini setting to control real Wii Remote report duplication.
2021-07-13 03:32:49 +02:00
Léo Lam 162af2a7bb
Merge pull request #9870 from OatmealDome/ui-thread
macOS: Move UI API calls to the main thread
2021-07-13 03:29:49 +02:00
Léo Lam b09347c160
Merge pull request #9877 from JosJuice/android-early-panic
Android: Avoid crash on early panic alert
2021-07-13 03:27:12 +02:00
Tilka 8fcda4c315
Merge pull request #9889 from leoetlino/ax-symbols
DSPHLE: Prevent AX GC and AX Wii symbol mixups
2021-07-13 01:41:44 +01:00
Markus Wick edc4396603
Merge pull request #9888 from JosJuice/jitarm64-logicalimm-everywhere
JitArm64: Stop using hand-encoded logical immediates
2021-07-12 23:03:31 +02:00
JosJuice 3af21d3d22 JitArm64: Optimize FloatCompare's CR value emitting
Setting bit 32 is only needed in the case where EQ and GT are set
but SO and LT are not, which is not a possible outcome of a compare.
2021-07-12 22:54:37 +02:00
JosJuice 8af5095ff4 JitArm64: Stop using hand-encoded logical immediates 2021-07-12 22:25:49 +02:00
Léo Lam 474adcc601
DSPHLE: Prevent AX GC and AX Wii symbol mixups
Putting AX functions from AXVoice.h in an anonymous namespace does
successfully prevent compilers from merging those functions and
allows us to avoid ODR violations.

However, tools such as gdb still mix up AX GC and AX Wii functions
and variables because those have the exact same symbol names.

This can be fixed by using inline namespaces which are transparent
at the source code level but forces AX GC and AX Wii symbols to be
different.
2021-07-12 16:30:15 +02:00
CrystalGamma beb6ec0569 VideoCommon: fix generic build
On x86/ARM Common/Assert.h is included by way of
VideoCommon/VertexLoader{X64,ARM64}.h, on other platforms it is missing.
2021-07-12 04:30:43 +02:00
Pokechu22 b880be0aa5 Use separate fmt::formatters for each indirect matrix column
This also fixes a bug where the float version of row 1 actually showed row 0 again.
2021-07-11 15:01:42 -07:00
Pokechu22 f467c02d1a Ignore the top bit of the indirect texture matrix scale
This fixes the Zora eye coloration in Twilight Princess.
2021-07-11 15:01:37 -07:00
Tilka 20a8e9c872
Merge pull request #9876 from Pokechu22/skyward-sword-map
Fix indirect textures when format is not ITF_8
2021-07-11 22:59:23 +01:00
Tillmann Karras bd5c604718 GameFile: don't download covers for empty game IDs 2021-07-11 17:14:43 +01:00
JosJuice 6fe96d12c6 Jits: Don't use fast double-to-single when input is double precision
The fast path of using CVTSD2SS/FCVTN rounds the significand if it
can't be exactly represented as a single, whereas the accurate path
instead truncates the significand. So we should only use the fast
path if we know that the lower bits of the significand are not set.

This is not known to affect any games.
2021-07-11 13:04:02 +02:00
Markus Wick 88fd9fd577
Merge pull request #9869 from JosJuice/jitarm64-constexpr-isimmlogical
JitArm64: Encode logical immediates at compile-time where possible
2021-07-11 12:55:48 +02:00
JosJuice f903853cf7 JitArm64: Fix ps_cmpXX
Passing a width of 64 and registers encoded as double to
DUP resulted in an invalid instruction. The registers should
be encoded as quads in this situation.

Fixes https://bugs.dolphin-emu.org/issues/12575.
2021-07-11 11:43:19 +02:00
JosJuice 0f3b9a8874 JitArm64: Minor mcrfs optimization 2021-07-10 20:44:22 +02:00
JosJuice 9e80db123f JitArm64: Encode logical immediates at compile-time where possible
Manually encoding and decoding logical immediates is error-prone.
Using ORRI2R and friends lets us avoid doing the work manually,
but in exchange, there is a runtime performance penalty. It's
probably rather small, but still, it would be nice if we could
let the compiler do the work at compile-time. And that's exactly
what this commit does, so now I have no excuse for trying to
manually write logical immediates anymore.
2021-07-10 20:43:59 +02:00
JosJuice 10861ed8ce JitArm64: Turn IsImmLogical into a constexpr constructor 2021-07-10 20:31:28 +02:00
JosJuice ab024b218e JitArm64: Accept LogicalImm struct as bitwise inst parameter 2021-07-10 20:13:11 +02:00
Markus Wick f6ca70d094
Merge pull request #9822 from JosJuice/jitarm64-ps-cmpxx
JitArm64: Implement ps_cmpXX
2021-07-10 19:20:48 +02:00
JosJuice adbf6d55da JitArm64: Implement ps_cmpXX 2021-07-10 19:08:55 +02:00
Markus Wick 4ba4d7cc7d
Merge pull request #9878 from JosJuice/jitarm64-addmex
JitArm64: Implement addmex/subfmex
2021-07-10 10:11:20 +02:00
Dentomologist 59292a5c65 GeneralWidget: Convert Adapter tooltip to BalloonTip
Use a BalloonTip to inform the user when their selected backend (i.e.
OpenGL or NULL) doesn't support adapters, instead of using the default
tooltips.
2021-07-09 10:10:36 -07:00
JosJuice afe9c6fb9a
Merge pull request #9880 from OatmealDome/windows-updater
UpdaterCommon: Use File::Copy() on non-macOS platforms
2021-07-09 19:02:42 +02:00
OatmealDome a39b7a45c0 UpdaterCommon: Use File::Copy() on non-macOS platforms 2021-07-09 12:56:23 -04:00
JosJuice fc60e62622 JitArm64: Implement addmex/subfmex 2021-07-09 16:44:33 +02:00
Admiral H. Curtiss c9e4489e17 Core/MMU: Fix inverted condition in HostIsInstructionRAMAddress(). 2021-07-09 05:48:17 +02:00
Pokechu22 a379456f38 Fix indentation for alphabump 2021-07-08 15:48:14 -07:00
Pokechu22 2feced2e33 Fix indirect textures when format is not ITF_8 2021-07-08 15:48:14 -07:00
Markus Wick cfcc994f6c
Merge pull request #9840 from JosJuice/jitarm64-mffsx
JitArm64: Implement mffsx
2021-07-08 14:15:24 +02:00
Markus Wick a390d3f327
Merge pull request #9820 from JosJuice/jitarm64-simplify-addex
JitArm64: Simplify addex/subfex
2021-07-08 13:46:48 +02:00
Markus Wick f67f0488d2
Merge pull request #9844 from JosJuice/jitarm64-fctiwzx-constant
JitArm64: Improve fctiwzx constant generation in double case
2021-07-08 13:43:09 +02:00
Markus Wick 9df6f65834
Merge pull request #9867 from JosJuice/jitarm64-unconditional-exception-exit
JitArm64: Add the ability to emit an unconditional exception exit
2021-07-08 13:08:05 +02:00
Markus Wick 1827cb9cd8
Merge pull request #9874 from JosJuice/jitarm64-unconditional-farcode
JitArm64: Get rid of an unconditional branch to farcode
2021-07-08 13:01:21 +02:00
JosJuice 44c99f8cc1 Android: Avoid crash on early panic alert 2021-07-08 10:37:36 +02:00
Markus Wick 98098edad7
Merge pull request #9859 from JosJuice/jitarm64-stwbrx-sthbrx
JitArm64: Implement stwbrx/sthbrx
2021-07-07 21:45:06 +02:00
blåhaj debeb09dee PostProcessing: Fix OpenGL UBO linking with configuration options 2021-07-07 21:28:22 +02:00
JosJuice a6700a074d JitArm64: Get rid of an unconditional branch to farcode
If a branch is unconditional, its target should not be in farcode,
since that defeats the purpose of farcode (putting seldom executed
code in farcode to keep it out of the icache when possible).
2021-07-07 14:11:07 +02:00
Léo Lam de12890588
Merge pull request #9873 from JosJuice/jitarm64-tbz-encoding
Arm64Emitter: Fix 64-bit TBZ/TBNZ encoding
2021-07-07 12:39:07 +02:00
Léo Lam 2c66a08fd3
Merge pull request #9848 from Pokechu22/di-hw-resets
Implement resetting DI via HW_RESETS
2021-07-07 12:35:35 +02:00
Léo Lam 1450e97c28
Merge pull request #9522 from AdmiralCurtiss/host-read-optional
Core/MMU: Add HostTryRead/HostTryWrite functions to allow specifying the desired address space, and return whether it succeeded.
2021-07-07 12:32:47 +02:00
JosJuice cbbd3d3956 Arm64Emitter: Fix 64-bit TBZ/TBNZ encoding
We haven't actually used 64-bit TBZ/TBNZ anywhere in Dolphin, so
this mistake hasn't broken anything, but let's fix it regardless.
2021-07-07 12:21:07 +02:00
Léo Lam 4b5dabff33
Merge pull request #9871 from OatmealDome/leftrightclick
Core: Use proper names for left, right, and middle click on Quartz ciface
2021-07-07 12:15:41 +02:00
Léo Lam 925379cb9f
Merge pull request #9872 from JosJuice/jitarm64-msr-ee
JitArm64: Check MSR.EE for external exceptions, not MSR.FE0
2021-07-07 12:13:16 +02:00
JosJuice 0642ff8b25 JitArm64: Check MSR.EE for external exceptions, not MSR.FE0
Fixes a 58698b8380 regression. (The EXCEPTION_EXTERNAL_INT
immediate being wrong meant that we never took the branch,
masking the problem of the MSR.EE immediate being wrong...)
2021-07-07 11:55:53 +02:00
Admiral H. Curtiss c292351faa Core/MMU: Add HostTryWrite*() functions. 2021-07-07 04:26:28 +02:00
Admiral H. Curtiss b59fcae70a Core/MMU: Add HostTryRead*() functions. 2021-07-07 04:26:28 +02:00
OatmealDome f6fabec644 FreeLookManager: Use proper names for left, right, and middle click on Quartz ciface 2021-07-06 16:16:52 -04:00
OatmealDome a0ba78ded2 WiimoteEmu: Use proper names for left, right, and middle click on Quartz ciface 2021-07-06 16:07:56 -04:00
OatmealDome 8c728945fb AGL: Silence OpenGL deprecation warnings 2021-07-06 14:31:01 -04:00
OatmealDome 4d944342fc AGL: Move more UI API calls to the main thread 2021-07-06 14:30:15 -04:00
Pokechu22 f664cf1903 Implement resetting DI via HW_RESETS 2021-07-06 11:05:08 -07:00
Léo Lam 954f27c5d7
Merge pull request #9709 from AdmiralCurtiss/upnp-error-log
UPnP: Improve error messages on initialization failure.
2021-07-06 15:36:38 +02:00
JosJuice 02309bd0ac
Merge pull request #9868 from leoetlino/constexpr-intlog2
MathUtil: Mark IntLog2 as constexpr
2021-07-06 15:29:28 +02:00
Léo Lam 21d75099fc
Merge pull request #9866 from JosJuice/jitarm64-hardcoded-exceptions
JitArm64: Don't hardcode exception constants
2021-07-06 15:21:38 +02:00
Léo Lam b82b0683d5
MathUtil: Mark IntLog2 as constexpr
Mostly everything else was already marked as constexpr, and the only
function IntLog2 calls (CountLeadingZeros) is already constexpr.
2021-07-06 15:01:38 +02:00
Léo Lam be0163b7ad
Merge pull request #9841 from JosJuice/revert-9835
Partially revert "Android: Clean up some hardcoded strings"
2021-07-06 13:07:50 +02:00
Léo Lam 39e14b6b5f
Merge pull request #9854 from JosJuice/wia-ice
DiscIO: Store partition key directly in ReuseID
2021-07-06 13:05:09 +02:00
Techjar 3d5cf5286b NetPlay: Refactor some functions into a common header 2021-07-06 06:41:23 -04:00
Léo Lam 56fdde5d74
Merge pull request #9595 from Dentomologist/fix_vertex_loader_test_warnings
VertexLoaderTest: Fix memset assignment warning
2021-07-06 11:50:23 +02:00
JosJuice 1a64364ae3 JitArm64: Add the ability to emit an unconditional exception exit
In cases where we already know that there is an exception,
either because we just checked for it or because we were
the ones that generated the exception to begin with,
we can skip the branch inside WriteExceptionExit.
2021-07-06 11:33:46 +02:00
OatmealDome 1bb72f00b5 QuartzKeyboardAndMouse: Ensure windowNumber is fetched on the main thread 2021-07-06 04:46:27 -04:00
Mai M ffdc8538a1
Merge pull request #9862 from delroth/spdx-tags
Use SPDX for Dolphin licensing info
2021-07-06 01:02:57 -04:00
Léo Lam 683807abce
Merge pull request #9858 from OatmealDome/updater-fail
UpdaterCommon: Fix code signing error after updating on macOS
2021-07-06 02:33:05 +02:00
Léo Lam 27c560fdfa
Merge pull request #8915 from OatmealDome/updater-temp-dir
macOS: Untranslocate the app bundle's path for the updater
2021-07-06 02:22:28 +02:00
Léo Lam ccc2b7bd25
Merge pull request #8416 from JosJuice/shader-compilation-names
Change the names for shader compilation settings
2021-07-06 01:41:27 +02:00
JosJuice 58698b8380 JitArm64: Don't hardcode exception constants
Unlike most constants we emit in JitArm64, these constants are
*not* inherent to the CPU we're emulating, and can have whatever
values we want. Let's handle them more robustly, in case we
decide to change their values in the future.
2021-07-05 23:05:30 +02:00
JMC47 6cc195e02f
Merge pull request #9640 from v1993/patch-1
Allow post-processing shaders to query reciprocal of window resolution
2021-07-05 16:30:54 -04:00
PEmu2 84e3078307
Change "Wiimote" to "Wii Remote" in interface 2021-07-04 22:27:36 -07:00
JMC47 4808241648
Merge pull request #9843 from JosJuice/android-fallback-region
Android: Add Fallback Region setting to GUI
2021-07-05 00:26:41 -04:00
Pierre Bourdon eb119488ea
licensing: add missing license info to many Java files 2021-07-05 04:43:55 +02:00
Pierre Bourdon f4e34703c0
licensing: convert "public domain" to CC0 1.0
Public domain does not have an internationally agreed upon definition,
As such it's generally preferred to use an extremely liberal license,
which can explicitly list the rights granted by the copyright holder.
The CC0 license is the usual choice here.

This "relicensing" is done without hunting down copyright holders, since
it is presumed that their release of this work into the public domain
authorizes us to redistribute this code under any other license of our
choosing.
2021-07-05 04:43:55 +02:00
Pierre Bourdon 0cf041de24
licensing: various one-off conversions to SPDX tags 2021-07-05 04:35:56 +02:00
Pierre Bourdon 90379e243e
licensing: switch GLExtensions/ to use SPDX tags 2021-07-05 04:35:56 +02:00
Pierre Bourdon 51cdc5542c
licensing: fix license info for Crypto/{bn,ec}
This code was part of Dolphin's relicensing from v2 to v2+ a while back,
we just never updated these copyright headers. I double-checked that
segher gave us permission to relicense this code to v2+ on 2015-05-16.
2021-07-05 04:35:56 +02:00
Pierre Bourdon e149ad4f0a
treewide: convert GPLv2+ license info to SPDX tags
SPDX standardizes how source code conveys its copyright and licensing
information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX
tags are adopted in many large projects, including things like the Linux
kernel.
2021-07-05 04:35:56 +02:00
JosJuice f666df72c0 JitArm64: Implement stwbrx/sthbrx 2021-07-03 12:21:45 +02:00
JosJuice d3ef5d4ca4 JitArm64: Fix lwbrx/lhbrx with optimized MMIO access 2021-07-01 13:38:26 +02:00
JosJuice eafa2784d6 DiscIO: Store partition key directly in ReuseID
This lets us reuse blocks in the case where different partition
entries use the same key (which probably isn't very common).
2021-06-30 09:06:20 +02:00
JosJuice 98bdf3b1ce Partially revert "Android: Clean up hardcoded platform names"
This partially reverts commit cbc4989095
due to a crash: https://bugs.dolphin-emu.org/issues/12561

I can't debug what the cause of the crash is due to not having an
Android TV device. Let's just revert this for now to fix the crash.
2021-06-30 09:02:23 +02:00
OatmealDome dd5e0c6e15 UpdaterCommon: Move the updated file instead of copying
This prevents macOS from reading an old (cached) code signature on Mach-O executables.
2021-06-30 02:16:37 -04:00
Tilka e6dfb08746
Merge pull request #9855 from JosJuice/wia-ice-2
DiscIO: Add workaround for MSVC ARM64 ICE
2021-06-30 06:37:01 +01:00
JMC47 6042df71d9
Merge pull request #9853 from Bonta0/sinocancel
SI: Don't cancel transfer with TSTART=0
2021-06-29 22:00:13 -04:00
JMC47 04a1c2e1b2
Merge pull request #9847 from JosJuice/dvd-pitfall
DVDInterface: Don't evict cache block i unless block i + 2 was read
2021-06-29 21:58:20 -04:00
JMC47 6a46d35c73
Merge pull request #9839 from OatmealDome/bluetooth-scanning
WiimoteScannerDarwin: fix hang on quit and clean up
2021-06-29 21:07:47 -04:00
JosJuice e581d970d6 JitArm64: Fix MSVC warning '~': zero extending 'u32' to 'u64'
While the third parameter of ANDI2R is u64, the upper half of
it does not get read if we're emitting a 32-bit instruction
(which we are doing here).
2021-06-29 10:44:41 +02:00
Shawn Hoffman 30f9f31a69 DiscIO: Add workaround for MSVC ARM64 ICE 2021-06-29 10:24:09 +02:00
Tilka 3b3fb9d4c3
Merge pull request #9852 from Pokechu22/wii-change-disc
DVDInterface: Fix decrypting reads clearing the drive state
2021-06-29 04:09:28 +01:00
Tilka 901a4fb5f4
Merge pull request #9811 from JosJuice/fprf-denormal-singles
Fix FPRF handling of denormal singles
2021-06-29 03:18:18 +01:00
Tilka 856c82aa24
Merge pull request #9851 from JosJuice/jitarm64-mfcr
JitArm64: Handle SO and LT simultaneously in mfcr
2021-06-29 02:01:31 +01:00
Pokechu22 e440b21640 DVDInterface: Fix decrypting reads clearing the drive state
This broke ejecting Wii discs while the game is running, as the drive state was set to Ready even when no disc was present, but other code still reported the missing disc, which confused games as you can't be both ready to read and have no disc.  That would cause games to show an unrecoverable error screen, instead of a "please insert the game disc" screen.

This only affected Wii games; the GameCube games used regular disc reads which worked fine.
2021-06-28 10:38:03 -07:00
JosJuice 1df1f20c44 JitArm64: Handle SO and LT simultaneously in mfcr 2021-06-28 19:22:46 +02:00
Tilka bb2d576ecc
Merge pull request #9849 from Tilka/x87
x64Emitter: remove unused x87 instructions
2021-06-28 17:53:54 +01:00
Bonta aaea38be46 SI: Don't cancel transfers 2021-06-28 17:59:30 +02:00
JosJuice 2ef2eee2e0
Merge pull request #9464 from Sintendo/jit64addxreloaded
Jit64: addx revisited
2021-06-28 13:53:44 +02:00
JosJuice 4648e1a035 DVDInterface: Fix small backwards seek after non-cached seek
If we seek to a block that isn't in the cache, the block prior
to it doesn't end up getting read into the buffer.
2021-06-28 11:02:05 +02:00
JosJuice c6ede09035 DVDInterface: Don't evict cache block i unless block i + 2 was read
Intends to fix https://bugs.dolphin-emu.org/issues/12279.
I have hardware tested the behavior, but I haven't tested the game.
2021-06-28 09:48:04 +02:00
Tillmann Karras a68c1bf648 PowerPC: add enum values for emulator SO and LT shifts 2021-06-28 03:30:07 +01:00
Tillmann Karras 25a701aa1b PowerPC: move SO bit to a more convenient location
Spacing the LT and SO bits like in the native PowerPC format makes it easier to
convert to that format (see mfcr).
2021-06-28 03:06:45 +01:00
Tillmann Karras afb9398059 x64Emitter: remove unused x87 instructions 2021-06-28 02:56:37 +01:00
JosJuice ccd8233ea3 Jit64: Fix FPRF handling of denormal singles 2021-06-27 20:37:18 +02:00
JosJuice 8d2c069c34 Interpreter: Return float from ForceSingle
Performance optimization, along with making the code a little
neater. Saves us from performing a single -> double -> single
conversion when calling UpdateFPRFSingle.
2021-06-27 20:34:49 +02:00
JosJuice d56721ebb9 Interpreter: Fix FPRF handling of denormal singles 2021-06-27 20:34:49 +02:00
JosJuice def5666419 JitArm64: Fix FPRF handling of denormal singles
The interpreter was wrong after all. Hardware verified.
2021-06-27 20:34:49 +02:00
Tilka aff39af5fb
Merge pull request #9810 from JosJuice/fprf-cmp-mask
Jits: Fix fcmpX FPRF mask
2021-06-27 19:32:19 +01:00
Tilka 4166567f92
Merge pull request #9812 from JosJuice/fprf-x64-neg-zero
Jit64: Fix FPRF non-SSE4.1 handling of negative zero
2021-06-27 19:21:51 +01:00
Jordan Woyak a2acd0b92e Config: Add an ini setting to control real Wii Remote report duplication and decouple it from the speaker data setting.
It is enabled by default.
2021-06-26 17:45:50 -05:00
Sintendo 7de4623d48 Jit64: mtfsfx - Optimized masking
The masking logic can be eliminated when the mask is known to be all
ones. This case is very common.

Before:
66 48 0F 7E F0       movq        rax,xmm6
8B 55 5C             mov         edx,dword ptr [rbp+5Ch]
83 E0 FF             and         eax,0FFFFFFFFh
83 E2 00             and         edx,0
0B C2                or          eax,edx
89 45 5C             mov         dword ptr [rbp+5Ch],eax
48 8D 15 C3 3C FE 01 lea         rdx,[19520020h]
83 E0 07             and         eax,7
0F AE 14 82          ldmxcsr     dword ptr [rdx+rax*4]

After:
66 48 0F 7E F0       movq        rax,xmm6
89 45 5C             mov         dword ptr [rbp+5Ch],eax
48 8D 15 2A D1 FD 01 lea         rdx,[19440000h]
83 E0 07             and         eax,7
0F AE 14 82          ldmxcsr     dword ptr [rdx+rax*4]
2021-06-26 17:31:31 +02:00
JosJuice 36798b18e8 JitArm64: Improve fctiwzx constant generation in double case
If we already have to use a GPR, we might as well take advantage
of the nice immediate encodings provided by GPR ORR. This is
faster, smaller, and saves a register.
2021-06-26 15:41:23 +02:00
JosJuice 515d02fe26 Android: Add Fallback Region setting to GUI 2021-06-26 11:45:22 +02:00
OatmealDome 156ffef98c WiimoteScannerDarwin: Fix lint 2021-06-24 17:59:58 -04:00
JosJuice 8cd37e040a JitArm64: Implement mffsx
Part 2 of implementing the FPSCR system register instructions.
2021-06-24 12:00:58 +02:00
OatmealDome b494d109d4 WiimoteScannerBackend: Allow StopThreads to request that any Wiimote searching stops
Used by WiimoteScannerDarwin to know when to exit its runloop.
2021-06-23 23:09:01 -04:00
OatmealDome 0de30fa0bb WiimoteScannerDarwin: Initialize IOBluetoothHostController in constructor 2021-06-23 22:55:15 -04:00
Léo Lam c77a5f7e32
Merge pull request #9825 from JosJuice/jitarm64-mcrfs
JitArm64: Implement mcrfs
2021-06-24 03:05:15 +02:00
Léo Lam 0087eed235
Merge pull request #9793 from sepalani/template-mmio
MMIOHandlers: Move method definitions to MMIO.cpp
2021-06-24 02:42:52 +02:00
thyrc 7a1922fd8f
Fix includes for musl libc 2021-06-24 02:01:07 +02:00
Léo Lam 4979974a57
Merge pull request #9828 from JosJuice/android-pressed-opacity
Android: Apply opacity setting to pressed buttons too
2021-06-24 01:36:02 +02:00
Léo Lam 9476733a80
Merge pull request #9829 from sepalani/ai-samples
AudioInterface: Fix sample counter
2021-06-24 01:35:29 +02:00
Léo Lam cf26846225
Merge pull request #9830 from skylersaleh/m1-unit-tests
Apple M1: Add support for running unit tests on universal builds
2021-06-24 01:15:02 +02:00
Léo Lam a632a6a404
Merge pull request #9833 from Pokechu22/ubershaders-tevcoord
UberShaderPixel: always set tevcoord, even if the stage has no texture
2021-06-24 01:05:17 +02:00
Léo Lam b66e88e4b9
Merge pull request #9837 from AdmiralCurtiss/mysterious-voodoo-performance-fix
VideoCommon/Fifo: Move SConfig::GetInstance() outside the GPU loop.
2021-06-24 00:41:43 +02:00
JMC47 46120a6108
Merge pull request #9742 from Pokechu22/sw-resolution
Software: Fix bad backbuffer size
2021-06-23 18:36:04 -04:00
JMC47 63c028c5df
Merge pull request #9832 from Pokechu22/software-color-asserts
Software: Remove texinfo.sourcerow == SourceRow::Colors assert
2021-06-23 18:34:19 -04:00
JMC47 95ecb73b11
Merge pull request #9826 from Techjar/fix-tmem-mips
VideoCommon/TextureInfo: Fix mipmap loading from tmem
2021-06-23 18:21:55 -04:00
Admiral H. Curtiss 1183fb3d2d VideoCommon/Fifo: Move SConfig::GetInstance() outside the GPU loop. 2021-06-23 23:52:26 +02:00
OatmealDome eb7b70b48d WiimoteScannerDarwin: Don't attempt to scan if inquiry doesn't start 2021-06-23 14:31:16 -04:00
OatmealDome 6794532abe IOdarwin_private: Remove hack for bug fixed in newer macOS SDKs 2021-06-23 04:03:28 -04:00
OatmealDome 74755e5939 WiimoteScannerDarwin: Rename stopScanning for code style compliance 2021-06-23 04:01:42 -04:00
Mai M be2ec728e4
Merge pull request #9836 from JosJuice/android-getemulationactivity
Android: Don't use getEmulationActivity in GCAdapter/Wiimote code
2021-06-22 11:59:25 -04:00
Mai M a904cb846a
Merge pull request #9835 from JosJuice/android-hardcoded-strings
Android: Clean up some hardcoded strings
2021-06-22 11:57:41 -04:00
JosJuice 1a47780ab4 Android: Don't use getEmulationActivity in GCAdapter/Wiimote code
The app context should work just as well as an activity context.

Also moving a hardcoded string to strings.xml.
2021-06-22 15:25:51 +02:00
JosJuice 0cfd36495b Android: Store HomeScreenChannel's appLinkIntentUri as Uri
Cleanup of some code touched by the previous commit.
2021-06-22 15:12:03 +02:00
JosJuice cbc4989095 Android: Clean up hardcoded platform names
The same kind of change as the changes made in the previous
commit, but this change is more involved, in particular because
of how SyncProgramsJobService was using display names as keys.
2021-06-22 15:12:03 +02:00
JosJuice 5b8fe1e748 Android: Clean up some hardcoded strings
These would lead to problems if we ever add translation support.
2021-06-22 15:12:03 +02:00
JosJuice 1b3f05628b Android: Remove check for missing game ID
Now that DOL and ELF files are assigned game IDs, all games have
game IDs. (Unless you intentionally craft an ISO file that has
the first bytes set to null, but if you do that I think you can
live with Dolphin creating a file in GameSettings called ".ini")
2021-06-22 14:01:06 +02:00
Pokechu22 2f1726e3f3 UberShaderPixel: always set tevcoord, even if the stage has no texture
This fixes NES game graphics when UberShaders are in use.
2021-06-21 13:01:25 -07:00
Pokechu22 51862135d6 Software: Remove texinfo.sourcerow == SourceRow::Colors assert
These asserts were removed for the hardware renderer in #3684.
2021-06-20 18:05:57 -07:00
Techjar 2d59dcb95d VideoCommon/TextureInfo: Fix mipmap loading from tmem
Even address needs to be offset to the first mipmap entry.
2021-06-20 16:49:39 -04:00
iwubcode df53a5f880 VideoCommon: enhance hi res texture support by having exact matches be picked before wildcard matches. Additionally, add the ability to ignore the texture hash portion of the texture name when loading a hi res texture 2021-06-19 21:15:38 -05:00