Commit Graph

26635 Commits

Author SHA1 Message Date
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
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
OatmealDome 46e331d000 VideoBackendBase: Prefer Vulkan over OGL on macOS Mojave and newer 2021-07-25 19:21:06 -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
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
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
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
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
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
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 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
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
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
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 9476733a80
Merge pull request #9829 from sepalani/ai-samples
AudioInterface: Fix sample counter
2021-06-24 01:35:29 +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
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
iwubcode 8fb0f91331 VideoCommon: split the texture hash from the base name when generating the texture name 2021-06-19 21:15:38 -05:00
Sepalani 0a7627d74e AudioInterface: Fix sample counter 2021-06-19 14:19:22 +04:00
JosJuice b11b5955ae Jit64: Optimize mcrfs when mask == 0 2021-06-18 18:26:49 +02:00
JosJuice 79a610b4b4 JitArm64: Implement mcrfs 2021-06-18 18:22:20 +02:00
JosJuice 93d2fd19e8 JitArm64: Use SBC/SBCS for emulating subfzex
I missed this one in fac8420.
2021-06-17 17:30:08 +02:00
JosJuice 752c4898b1 JitArm64: Simplify addex/subfex
Some of the code used when the carry flag is known to be a
constant value is really not much better than just setting
the carry flag and then using the normal code, and with how
rarely this code runs, it isn't well tested either.
Might as well get rid of some of this code and simplify things.
2021-06-17 16:47:55 +02:00
Markus Wick 503c62ec00
Merge pull request #9819 from JosJuice/jitarm64-sbc
JitArm64: Use SBC/SBCS for emulating subfex
2021-06-17 16:15:57 +02:00
JosJuice fac842021c JitArm64: Use SBC/SBCS for emulating subfex
SBC/SBCS does the same thing as subfex, except with the source
operands in the opposite order.
2021-06-17 15:30:17 +02:00
Sintendo 18aaf488b0 Jit64: subfic - Optimize constants for d != a
These optimizations were already present, but only when d == a. They
also make sense when this condition does not hold.

- imm == 0
Before:
41 BB 00 00 00 00    mov         r11d,0
45 2B DF             sub         r11d,r15d

After:
45 8B DF             mov         r11d,r15d
41 F7 DB             neg         r11d

- imm == -1
Before:
41 BD FF FF FF FF    mov         r13d,0FFFFFFFFh
44 2B EE             sub         r13d,esi
0F 93 45 68          setae       byte ptr [rbp+68h]

After:
44 8B EE             mov         r13d,esi
41 F7 D5             not         r13d
C6 45 68 01          mov         byte ptr [rbp+68h],1
2021-06-16 20:33:02 +02:00
Léo Lam 4c37cc7e5e
Merge pull request #9816 from JosJuice/aarch64-fma-true
Common: Set bFMA to true for AArch64
2021-06-15 13:04:21 +02:00
Léo Lam ee58f1c188
Merge pull request #9775 from dbrookman/fix-gameini-gfxbackend
GameINI: Fix GFXBackend crash
2021-06-15 12:47:55 +02:00
JosJuice 2b88a46b1a Common: Set bFMA to true for AArch64
Without this, the code added in ac28b89 misbehaves and considers
AArch64 netplay clients to not have hardware FMA support, telling
all clients to disable FMA support, which causes a desync between
x64 and AArch64 due to JitArm64 not being able to disable FMA support.
2021-06-14 15:51:59 +02:00
Daniel Brookman b214e0e71f GameINI: Fix GFXBackend crash
Fixes a regression from 5.0-12066, where setting the GFXBackend variable
to one other than the current global backend would crash Dolphin upon
launching the game.
2021-06-13 20:42:36 -04:00
Admiral H. Curtiss 360d05fe21 AudioInterface: Initialize s_cpu_cycles_per_sample to a sane value. 2021-06-13 20:41:20 +02:00
Léo Lam c2ac21c8d6
Merge pull request #9753 from mbc07/VolumeVerifier_TMD_severity
VolumeVerifier: increase problem severity for incorrectly signed TMDs
2021-06-13 16:37:38 +02:00
JosJuice be194dfc9c Jit64: Fix FPRF non-SSE4.1 handling of negative zero 2021-06-13 16:22:29 +02:00
Léo Lam d536a50878
Merge pull request #9756 from Techjar/memcard-size-config
Replace MemoryCard251 setting with generic MemoryCardSize
2021-06-13 16:09:54 +02:00
JosJuice 891a46596d Jits: Fix fcmpX FPRF mask
fcmpX only updates the FPCC bits, not the C bit.
This was already correctly implemented in the interpreter.
Not known to affect any games, but affects a hardware test.
2021-06-13 13:59:00 +02:00
Techjar 0e502062b4 Move some NetPlay-specific settings to SessionSettings 2021-06-13 06:58:05 -04:00
Léo Lam 2898cf5121
Merge pull request #9784 from PEmu2/master
Update buffer_storage warning message
2021-06-13 12:56:26 +02:00
Léo Lam 0cc1fc37b5
Merge pull request #9788 from sepalani/dsp-rate
AudioInterface: Fix AIDFR initialization
2021-06-13 12:55:31 +02:00
Léo Lam 90a994f937
Merge pull request #9802 from JosJuice/android-game-file-cache-path
Android: Stop using custom path for GameFileCache
2021-06-13 12:53:49 +02:00
Léo Lam 4e3e3bfd60
Merge pull request #9804 from JosJuice/revert-fma
NetPlay/Jit64: Avoid using software FMA
2021-06-13 12:38:09 +02:00
Léo Lam 8ef4bd682b
Merge pull request #9805 from JosJuice/rounding-mode-savestate
PowerPC: Set host CPU rounding mode on init and savestate
2021-06-13 11:49:29 +02:00
Léo Lam dd26106848
Merge pull request #9807 from Techjar/fix-glsl-any
VideoCommon: Define scalar any() and all() functions in GLSL
2021-06-13 11:15:11 +02:00
Léo Lam 38424d0c59
Merge pull request #9808 from xvrc/msghandler-label-fix
MsgHandler: Correct question and warning captions
2021-06-13 11:00:45 +02:00
Léo Lam 0a1f58ad77
Merge pull request #9730 from Dentomologist/remove_audio_pane_stretching
AudioPane: Remove main layout vertical stretching
2021-06-13 10:57:31 +02:00
Techjar 3da0976a81 VideoCommon: Define scalar any() and all() functions in GLSL
This fixes bounding box shaders failing to compile under Vulkan, due to
differences between GLSL and HLSL in the return value of vector
comparisons and what types these functions accept. I included all() for
the sake of completeness.
2021-06-13 04:50:35 -04:00
xvrc 0ad13db633 MsgHandler: Correct question and warning captions 2021-06-12 17:42:27 -04:00
JosJuice a09d9cf608
Merge pull request #9606 from Filoppi/patch-14
Qt: avoid queuing ConfigChanged() more than once
2021-06-11 18:59:39 +02:00
JMC47 0c6e00ce0c
Merge pull request #9801 from Techjar/bbox-rounding-hack
VideoCommon: Only include centered pixels in bounding box
2021-06-11 00:41:11 -04:00
Techjar b267f54259 VideoCommon: Only include centered pixels in bounding box
At higher resolutions, our bounding box dimensions end up being
slightly larger than original hardware in some cases. This is not
necessarily wrong, it's just an artifact of rendering at a higher
resolution, due to bringing out detail that wouldn't have appeared on
original hardware. It causes a texel to fall partially on what would
have been a single pixel at native resolution, resulting in the
coordinates getting bumped up to the next valid value. In many cases,
these slightly larger bounding boxes are perfectly fine, as games don't
hard-code expected dimensions. It is problematic in Paper Mario TTYD
though, for a somewhat complicated reason.

Paper Mario TTYD frequently uses EFB copies to pre-render a bunch of
animation frames for a character sprite (especially in Chapter 2), so
that it can then render 100 or more of them without bringing the
GameCube to its knees. Based on my observation, the game seems to set
aside a region of memory to store these EFB copies. This region is
obviously fairly small, as the GameCube only has 24MB of RAM. There are
2 rooms in Chapter 2 where you fight a horde of as many as 100 Jabbies,
which are also rendered using EFB copies, so in this room the game ends
up making 130(!) EFB copies just for Puni and Jabbi sprites. This seems
to nearly fill the region of memory it set aside for them.
Unfortunately, our slightly larger bounding boxes at higher resolutions
results in overflowing this memory, causing very strange behavior. Some
EFB copies partially overlap game state, resulting in reading it as a
garbage RGB5A3 texture that constantly changes. Others apparently
somehow trigger a corner case in our persistent buffer mapping, causing
them to partially overwrite earlier EFB copies.

What this change does is only include the screen coordinates that align
with the equivalent native resolution pixel centers, which generally
results in the bounding boxes being more in line with original
hardware. It isn't perfect, but it's enough to fix Paper Mario TTYD's
Jabbi rooms by avoiding the buffer overflow. Notably, it is more
accurate at odd resolutions than at even resolutions. Native resolution
is completely unaffected by this change, as should be the case. This
change may also have a small positive impact on shader performance at
higher resolutions, as there will be less atomic operations performed.
2021-06-10 21:49:52 -04:00
JosJuice 9db0ebd4b6 PowerPC: Set host CPU rounding mode on init and savestate
Not doing this can cause desyncs when TASing. (I don't know
how common such desyncs would be, though. For games that
don't change rounding modes, they shouldn't be a problem.)
2021-06-10 20:12:15 +02:00
Pokechu22 1500a0119b Eliminate TVtxDesc.GetLegacyHex 2021-06-09 20:50:50 -07:00
Pokechu22 820d9ffbfa Remove PixelShaderGen hasindstage 2021-06-09 20:50:49 -07:00
Pokechu22 c583cac568 Hack to hide debug cubes in Super Mario Sunshine
... while not breaking other games.
2021-06-09 20:50:49 -07:00
Tilka e62610e6bc
Merge pull request #9799 from Tilka/interpreter
Interpreter: deduplicate integer comparisons
2021-06-09 22:34:07 +01:00
JosJuice ac28b89fa5 NetPlay/Jit64: Avoid using software FMA
When I added the software FMA path in 2c38d64 and made us use
it when determinism is enabled, I was assuming that either the
performance impact of software FMA wouldn't be too large or CPUs
that were too old to have FMA instructions were too slow to run
Dolphin well anyway. This was wrong. To give an example, the
netplay performance went from 60 FPS to 30 FPS in one case.

This change makes netplay clients negotiate whether FMA should
be used. If all clients use an x64 CPU that supports FMA, or
AArch64, then FMA is enabled, and otherwise FMA is disabled.
In other words, we sacrifice accuracy if needed to avoid massive
slowdown, but not otherwise. When not using netplay, whether to
enable FMA is simply based on whether the host CPU supports it.

The only remaining case where the software FMA path gets used
under normal circumstances is when an input recording is created
on a CPU with FMA support and then played back on a CPU without.
This is not an especially common scenario (though it can happen),
and TASers are generally less picky about performance and more
picky about accuracy than other users anyway.

With this change, FMA desyncs are avoided between AArch64 and
modern x64 CPUs (unlike before 2c38d64), but we do get FMA
desyncs between AArch64 and old x64 CPUs (like before 2c38d64).
This desync can be avoided by adding a non-FMA path to JitArm64 as
an option, which I will wait with for another pull request so that
we can get the performance regression fixed as quickly as possible.

https://bugs.dolphin-emu.org/issues/12542
2021-06-09 22:56:26 +02:00
JMC47 0aa9e8dc9a
Merge pull request #9795 from Filoppi/fix_controller2_default_device
Fix controllers after the first one not defaulting to the default device
2021-06-09 16:09:09 -04:00
JosJuice d304d75aa5 Android: Stop using custom path for GameFileCache
Back when I wrote this code, I believe I set it to use a custom path
so that the cache would end up in a directory which Android considers
to be a cache directory. But nowadays the directory which Dolphin's
C++ code considers to be the cache directory is such a directory,
so there's no longer any reason to override the default path.
2021-06-08 18:34:40 +02:00
Connor McLaughlin c729852d72
Merge pull request #9782 from Techjar/bbox-ogl-upsidedown-fix
VideoCommon: Perform OpenGL bounding box inversion in pixel shader
2021-06-08 13:24:03 +10:00
Connor McLaughlin 1b3977990b
Merge pull request #9800 from Techjar/vulkan-subgroup-fix
Vulkan: Fix subgroup reduction
2021-06-08 13:21:41 +10:00
Techjar 58238e75a7 Vulkan: Fix subgroup reduction
It seems that we were writing values from helper invocations, which
produces wrong results.
2021-06-07 22:32:25 -04:00
JMC47 ec8257ebe1
Merge pull request #9794 from Filoppi/fix_input_focus_bug
Fix input focus checks being wrong (issue 12540)
2021-06-07 20:08:09 -04:00
Dentomologist a2e1ddc354 AudioPane: Remove main layout vertical stretching 2021-06-07 15:57:02 -07:00
Tillmann Karras 5fc3cb2379 Interpreter: deduplicate integer comparisons 2021-06-07 22:39:15 +01:00
Filoppi 702f86ccc0 InputCommon: fix 2nd+ controller not defaulting to the default device 2021-06-07 19:31:38 +03:00
Léo Lam edc18e60ad
Merge pull request #9785 from Dentomologist/fix_gamelist_grid_zoom_in
GameList: Fix grid mode zoom keybind inconsistency
2021-06-07 14:00:21 +02:00
Filoppi 7c83b745c5 Qt: fix input focus checks being wrong
When rendering to main and going full screen, we aren't using the main window handle
as the code assumed, but the other, detached, render widget.
2021-06-07 14:35:59 +03:00
Léo Lam 5e371bb4be
Merge pull request #9792 from sepalani/lint
Lint: End of namespace
2021-06-07 12:16:08 +02:00
Sepalani 1d48a33aed MMIOHandlers: Move method definitions to MMIO.cpp 2021-06-07 13:42:39 +04:00
Sepalani ce8004c9c1 Lint: End of namespace 2021-06-07 12:55:52 +04:00
Filoppi 83ea16f402 Qt: Fix IOWindow keeping a shared ptr to devices even after them being removed by the ControllerInterface
this prevented some devices from being recreated correctly, as they were exclusive (e.g. DInput Joysticks)

This is achieved by calling Settings::ReleaseDevices(), which releases all the UI devices shared ptrs.
If we are the host (Qt) thread, DevicesChanged() is now called in line, to avoid devices being hanged onto by the UI.
For this, I had to add a method to check whether we are the Host Thread to Qt.

Avoid calling ControllerInterface::RefreshDevices() from the CPU thread if the emulation is running
and we manually refresh devices from Qt, as that is not necessary anymore.

Refactored the way IOWindow lists devices to make it clearer and hold onto disconnected devices.
There were so many issues with the previous code:
-Devices changes would not be reflected until the window was re-opened
-If there was no default device, it would fail to select the device at index 0
-It could have crashed if we had 0 devices
-The default device was not highlighted as such
2021-06-07 11:48:30 +03:00
Filoppi a77e3b4a9b InputCommon: Make Wiimote rumble variable thread safe 2021-06-07 11:48:30 +03:00
Filoppi 08f8c27927 ControllerInterface: fix DSU thread safety and use PlatformPopulateDevices() 2021-06-07 11:48:29 +03:00
Filoppi 8b53af9cbc ControllerInterface: polish DInput Keyboard and Mouse (add comments and logs)
Also fix the cursor axis not being updated when the mouse device had failed aquiring,
despite them being completely unrelated
2021-06-07 11:07:06 +03:00
Filoppi 038b57fecc ControllerInterface: DInput Joystick fix non thread safe static variable
also fix devices being added to its own custom list of devices even when rejected by the CI
2021-06-07 11:07:06 +03:00
Filoppi a0ecca1a84 ControllerInterface: Implement ChangeWindow on DInput without recreating the devices
Also polished DInput code in general to try and mitigate issue 11702.
Added a lot of logging and comments.
2021-06-07 11:07:06 +03:00
Filoppi dcc345400e ControllerInterface: devices population is now async so implement devices sorting priority
This helps us keeping the most important devices (e.g. Mouse and Keyboard) on the top
of the list of devices (they still are on all OSes supported by dolphin
and to make hotplug devices like DSU appear at the bottom.
2021-06-07 11:07:06 +03:00
Filoppi 0718cfd7d7 ControllerInterface: make evdev use PlatformPopulateDevices
Also fix evdev non thread safe acces to static variables
2021-06-07 11:07:06 +03:00
Filoppi 2aa941081e ControllerInterface: make SDL use PlatformPopulateDevices()
and avoid waiting on SDL async population being finished for no reason
2021-06-07 11:07:06 +03:00
Filoppi 1d816f8f26 ControllerInterface: make real Wiimote use PlatformPopulateDevices() 2021-06-07 11:07:06 +03:00
Filoppi c238e49119 ControllerInterface: Remove OSX window handle
also make it more thread safe (avoid rare deadlock)
and fix it trying to add devices before the CI has init
2021-06-07 11:07:05 +03:00
Filoppi 2376aec135 ControllerInterface: Refactor
-Fix Add/Remove/Refresh device safety, devices could be added and removed at the same time, causing missing or duplicated devices (rare but possible)
-Fix other devices population race conditions in ControllerInterface
-Avoid re-creating all devices when dolphin is being shut down
-Avoid re-creating devices when the render window handle has changed (just the relevantr ones now)
-Avoid sending Devices Changed events if devices haven't actually changed
-Made most devices populations will be made async, to increase performance and avoid hanging the host or CPU thread on manual devices refresh
2021-06-07 11:07:05 +03:00
Filoppi f90d851e25 ControllerInterface: mixed comments 2021-06-07 11:07:05 +03:00
Filoppi c285ae57fb ControllerInterface: fix rare deadlock
A "devices changed" callback could have ended up waiting on another thread that was also populating devices
and waiting on the previous thread to release the callbacks mutex.
2021-06-07 11:07:05 +03:00
JMC47 ebe3fbe04c
Merge pull request #9771 from Filoppi/dsu_fixes
DSU improvements
2021-06-07 03:50:50 -04:00
Techjar 4866002c9b VideoCommon: Perform OpenGL bounding box inversion in pixel shader
Running the min/max operation on the upside down, quad-rounded pixel
coordinates before inverting them to the standard upper-left origin
produces wrong results. Therefore, we need to do the inversion before
rounding to pixel quads.
2021-06-06 20:55:06 -04:00
Léo Lam a208d529de
Merge pull request #9790 from AdmiralCurtiss/cheat-manager-config-change
CheatsManager: Avoid recreating child widgets on every OnStateChanged(), and take running game info directly from SConfig.
2021-06-07 02:37:11 +02:00
Admiral H. Curtiss c3560f033e UPnP: Improve error messages on initialization failure. 2021-06-07 00:36:35 +02:00
JosJuice 4ef4ac41d1 JitArm64: Fix clobbering LR in FakeLKExit
Fixes Need for Speed: Carbon accessing invalid memory when
branch following and BLR optimization are enabled simultaneously.
2021-06-06 22:43:57 +02:00
Admiral H. Curtiss 441d304317 CheatsManager: Use game information directly from SConfig, and only recreate widgets if game changes. 2021-06-06 21:56:34 +02:00
Admiral H. Curtiss 414e0f4598 GeckoCodeWidget: Take game ID and revision directly instead of through GameFile. 2021-06-06 21:25:37 +02:00
Admiral H. Curtiss 1fbe56210a ARCodeWidget: Take game ID and revision directly instead of through GameFile. 2021-06-06 21:23:17 +02:00
Léo Lam 684d09b342
Merge pull request #9789 from AdmiralCurtiss/netplay-efb-access-tile-size-bool
NetPlay: Sync the EFB access tile size as an integer instead of a boolean.
2021-06-06 19:20:38 +02:00
Admiral H. Curtiss 9fd16a93c5 NetPlay: Sync the EFB access tile size as an integer instead of a boolean. 2021-06-06 19:02:07 +02:00
Dentomologist 7a6098a7f6 GameList: Fix grid mode zoom keybind inconsistency
Add keybind to make 'control plus' zoom in as per convention, and also
'control shift minus' zoom out to maintain consistency.
2021-06-06 09:21:41 -07:00
Sepalani eaf8e30008 AudioInterface: Fix AIDFR initialization 2021-06-06 18:57:32 +04:00
Tilka 8139967768
Merge pull request #9787 from JosJuice/jitarm64-slwx-top
JitArm64: Discard top 32 bits in slwx result
2021-06-06 08:46:16 +01:00
Mai M 5470aceb63
Merge pull request #9786 from Tilka/dsp
DSP: small cleanup
2021-06-06 00:48:28 -04:00
Tilka 89af7b82f2
Merge pull request #9770 from JosJuice/jits-accidental-gt
Jits: Fix accidentally setting GT in CR when clearing EQ
2021-06-06 05:17:25 +01:00
Tilka 6c0180fc61
Merge pull request #9748 from JosJuice/fma-accuracy
Interpreter/Jit64: Emulate FMA accurately in more cases
2021-06-06 02:29:42 +01:00
Tillmann Karras f2c4041d39 DSPHLE: remove unused function 2021-06-06 01:09:30 +01:00
Tillmann Karras a13df9b251 DSP: use CR_* enum values 2021-06-06 01:08:45 +01:00
PEmu2 44206b7702
Update buffer_storage warning message 2021-06-05 15:08:47 -07:00
JosJuice 86de3df072 JitArm64: Discard top 32 bits in slwx result
srwx would like to be able to assume that the top 32 bits
are zero, and cmpl is already doing so.
2021-06-05 23:15:08 +02:00
JosJuice acc7d3710d
Merge pull request #9780 from Techjar/freelook-config-fix
Common/FileUtil: Add some missing configs to D_CONFIG_IDX
2021-06-05 13:40:37 +02:00
Techjar 7111d11161 Common/FileUtil: Add some missing configs to D_CONFIG_IDX 2021-06-05 07:34:36 -04:00
JMC47 638909aec6
Merge pull request #9751 from JosJuice/jitarm64-fcmpx-ftz
JitArm64: Make fcmpX with flush-to-zero enabled less bad
2021-06-05 05:27:52 -04:00
Techjar 83d55704aa VideoCommon: Round bounding box coordinates down and remove pixel center offset
Fragment coordinates always have a 0.5 offset from a whole integer, as
that's where the pixel center is on modern GPUs. Therefore, we want to
always round the fragment coordinates down for bounding box
calculations. This also renders the pixel center offset useless, as 0.5
vs ~0.5833333 makes no difference when rounding down.
2021-06-05 00:34:10 -04:00
Shawn Hoffman 4ce22c093c msvc: remove workarounds for old compiler issues 2021-06-03 18:33:24 -07:00
Shawn Hoffman d8cc419eb3 msvc: remove some unneeded warning disable
this was either for libusb.h or some now-removed code.
2021-06-03 16:32:54 -07:00
JosJuice b6cc3c4b6e JitArm64: Make fcmpX with flush-to-zero enabled less bad
See the added code comment for details. Fixes Pokémon Battle
Revolution not progressing past the title screen.
2021-06-02 20:15:33 +02:00
JosJuice 21ebc176fe JitArm64: Set FPCR.AH
Only tested on a CPU which does not support FEAT_AFP.
2021-06-02 20:15:24 +02:00
Dentomologist 99ed43280d Updater: Escape HTML characters in commit descriptions 2021-06-01 17:22:19 -07:00
JMC47 a12865570d
Merge pull request #9764 from Pokechu22/amd-opengl-bbox-fix
VideoCommon: Fix bounding box on AMD/OpenGL/Windows
2021-06-01 19:55:54 -04:00
Techjar 8cfe49295f VideoCommon: Add fallback handling for bounding box when disabled or unsupported
The SDK seems to write "default" bounding box values before every draw
(1023 0 1023 0 are the only values encountered so far, which happen to
be the extents allowed by the BP registers) to reset the registers for
comparison in the pixel engine, and presumably to detect whether GX has
updated the registers with real values. Handling these writes and
returning them on read when bounding box emulation is disabled or
unsupported, even without computing real values from rendering, seems
to prevent games from corrupting memory or crashing.

This obviously does not fix any effects that rely on bounding box
emulation, but having the game not clobber its own code/data or just
outright crash is a definite improvement.
2021-05-31 19:56:24 -04:00
Pokechu22 c58837964f VideoCommon: Fix bounding box on AMD/OpenGL/Windows
Co-authored-by: Techjar <tecknojar@gmail.com>
2021-05-31 16:22:50 -07:00
Techjar 2f1b639f0a VideoCommon: Restore BBox* forwarding functions 2021-05-31 18:01:47 -04:00
OatmealDome 833d5a3e9f AutoUpdate: Put updater log in the user log directory 2021-05-31 16:34:15 -04:00
OatmealDome 243c6b58fe UpdaterCommon: Replace FindOrCreateTempDir with File::CreateTempDir() 2021-05-31 16:34:11 -04:00
OatmealDome c87241479a FileUtil: Handle app translocation on macOS 2021-05-31 16:25:34 -04:00
JosJuice c404452d3e
Merge pull request #9759 from Techjar/netplay-sanitize-gci
NetPlay: Check file names when receiving GCI folder
2021-05-31 19:46:26 +02:00
Filoppi 98b00a28e4 ControllerInterface: make DSU inputs start from resting pose instead of 0. Add battery level 2021-05-31 02:24:41 +03:00
Filoppi 16e4dede72 ControllerInterface: DSU polish: avoid hanging host thread, add disconnection detection, ...
-Reworked thread waits to never hang the Host thread for more than a really small time
(e.g. when disabling DSU its thread now closes almost immediately)
-Improve robustness when a large amount of devices are connected
-Add devices disconnection detection (they'd stay there forever until manually refreshed)
2021-05-31 02:21:17 +03:00
Filoppi 83806462ec ControllerInterface: fix DSU using the same client uid between server and controllers queries
that's not the way it's supposed to work
2021-05-31 02:17:25 +03:00
JosJuice de3fed6093 Jits: Fix accidentally setting GT in CR when clearing EQ
https://bugs.dolphin-emu.org/issues/12526
2021-05-30 22:07:53 +02:00
Tillmann Karras faec77a971 Fix -Wreorder warnings 2021-05-30 17:10:20 +01:00
Techjar 1377f31cf8 NetPlay: Check file names when receiving GCI folder 2021-05-29 17:52:49 -04:00
Connor McLaughlin b3a414ea9d
Merge pull request #9766 from stenzek/ogl-bbox-memory-barrier
OGL: Force memory barrier when reading back bounding box values
2021-05-29 17:04:57 +10:00
Connor McLaughlin b31d4400e3
Merge pull request #9765 from Techjar/bbox-pixel-quads-2-electric-boogaloo
VideoCommon: Move bounding box pixel quads rounding to shader
2021-05-29 17:00:14 +10:00
Connor McLaughlin 6393f157f0 OGL: Force memory barrier when reading back bounding box values
We also need to ensure the the CPU does not receive stale values
which have been updated by the GPU. Apparently the buffer here
is not coherent on NVIDIA drivers. Not sure if this is a driver
bug/spec violation or not, one would think that
glGetBufferSubData() would invalidate any caches as needed, but
this path is only used on NVIDIA anyway, so it's fine. A point
to note is that according to ARB_debug_report, it's moved from
video to host memory, which would explain why it needs the
cache invalidate.
2021-05-29 16:57:40 +10:00
Techjar a24e78b3cf VideoCommon: Remove BBox* forwarding functions 2021-05-29 01:45:21 -04:00
Techjar e4aef0a85b VideoCommon: Move bounding box pixel quads rounding to shader
This avoids rounding values that the game writes to the bounding box
registers, especially the default values.
2021-05-28 23:30:22 -04:00
Mai M 7b2b05cc21
Merge pull request #9760 from JosJuice/jitarm64-msvc-warning
JitArm64: Fix MSVC warnings
2021-05-28 23:29:24 -04:00
JosJuice e0c81ae54a JitArm64: Fix MSVC warnings 2021-05-28 15:34:08 +02:00
Connor McLaughlin 7fd0a526e1 VideoBackends/OGL: Cache bounding box values between reads 2021-05-28 19:30:46 +10:00
Connor McLaughlin 0c11dca121 VideoBackends/D3D: Cache bounding box values between reads 2021-05-28 19:30:46 +10:00
Pokechu22 5928182a4c Skip indirect operation for out of bounds indirect stages
This fixes rendering issues in Viewtiful Joe (https://bugs.dolphin-emu.org/issues/12525), but it is not entirely hardware accurate, as hardware testing showed other, more complex behavior in this case.  However, it should be good enough for our purposes.
2021-05-27 22:13:42 -07:00
JMC47 45a5c9cc04
Merge pull request #9697 from Filoppi/cursor_locking
Implement Cursor Locking and input focus checks for it
2021-05-27 11:42:35 -04:00
Techjar 33a6701e56 Replace MemoryCard251 setting with generic MemoryCardSize
This allows for a broader range of game-specific memory card sizes to
be configured.
2021-05-27 03:50:57 -04:00
Filoppi 3c7c2dfaa1 Implement Cursor Locking and new input focus checks for it 2021-05-27 10:31:12 +03:00
Mai M 52a388af9a
Merge pull request #9754 from JosJuice/netplay-memcard-region
NetPlay: Check that memory card region is valid
2021-05-26 20:57:58 -04:00
Scott Mansell 37e532322b Port dump XFB option to Qt UI.
Looks like the option was added to the Wx UI at commit 198d3b69, which
was a few months after the advancedWidget was originally ported from
Wx to Qt, but before anyone was actually using Qt.
2021-05-27 12:48:36 +12:00
JosJuice ba7ad73e92 NetPlay: Check that memory card region is valid 2021-05-27 00:00:06 +02:00
Mateus B. Cassiano 2c598e46ab VolumeVerifier: increase problem severity for incorrectly signed TMDs 2021-05-26 05:52:21 -04:00
JosJuice 2c38d6419e Jit64: Emulate FMA accurately when determinism is enabled
When determinism is enabled, we either want all CPUs to use FMA or
we want no CPUs to use FMA. Until now, Jit64 has been been doing
the latter. However, this is inaccurate behavior, all CPUs since
Haswell support FMA, and getting JitArm64 to match the exact
inaccurate rounding used by Jit64 would be a bit annoying. This
commit switches us over to using FMA on all CPUs when determinism
is enabled, with older CPUs calling the std::fma function.
2021-05-25 12:37:52 +02:00
JosJuice 9bc5bd83a9 Interpreter: Use std::fma for emulating FMA
This is more accurate to the original hardware's rounding behavior.
2021-05-25 10:54:00 +02:00
Pokechu22 4a4244f04d Software: Fix bad backbuffer size
MAX_XFB_WIDTH/HEIGHT are the largest XFB sizes seen in practice, but do not make sense to use for the backbuffer size, which should be the size of the window.  The old code created screenshots with a size of 720x540 on NTSC games when "Dump Frames at Internal Resolution" is unchecked; now, the window size is used.
2021-05-24 12:16:39 -07:00
Léo Lam 51671921c4
Merge pull request #9441 from skylersaleh/master
Apple M1 Support for MacOS
2021-05-24 12:39:01 +02:00
JosJuice ed331291d1
Merge pull request #9747 from JosJuice/jitarm64-sync
JitArm64: Jump to dispatcher on downcount <= 0, not < 0
2021-05-24 12:02:20 +02:00
JosJuice 86d2c2a1c3 JitArm64: Jump to dispatcher on downcount <= 0, not < 0
All the other CPU emulation cores do it on <= 0.
2021-05-24 10:42:04 +02:00
Skyler Saleh 210f6e7f0d Apple M1: Update AutoUpdate PlatformID
Adds a new PlatformID for universal builds. This will allow single architecture
builds to be updated through the single architecture path, and universal builds
to be updated with universal builds.
2021-05-23 21:45:27 -07:00
Bonta-kun bb1dd31f53 SI: Fix COMERR update 2021-05-23 20:30:07 -07:00
Vicki Pfau e70193195c SI: Generate NOREP on timeout instead of generating Dolphin SDK reply 2021-05-23 20:30:07 -07:00
Filoppi 93e3e691f9 Expose Control Expression variables to mappings UI
-add a way to reset their value (from the mappings UI)
-fix "memory leak" where they would never be cleaned,
one would be created every time you wrote a character after a "$"
-fix ability to create variables with an empty string by just writing "$" (+added error for it)
-Add $ operator to the UI operators list, to expose this functionality even more
2021-05-24 02:38:06 +03:00
JMC47 975f8e2a25
Merge pull request #9700 from Filoppi/simplify_mappings_preview
Simplify the preview of control mappings by removing the device path from controls
2021-05-23 14:44:38 -04:00
Techjar a33593baf7 Qt/GeneralPane: Refresh widget state on config change
This fixes a nasty issue where you can change the Dual Core setting
during emulation, if it has been overridden by GameINI or NetPlay, by
simply changing any of the non-disabled settings. This is because
changing any of the settings will write all of them to the config.

This issue is particularly nasty because managing to disable Dual Core
during emulation, and then stopping it, results in the emulator core
being totally deadlocked. It's impossible to recover from this state,
and Dolphin will remain as a zombie process on the system, consuming
resources and holding locks, until forcibly killed.
2021-05-23 01:39:35 -04:00
Mai M 95aadff0e7
Merge pull request #9737 from Techjar/fix-textureinfo-hasmips
VideoCommon/TextureInfo: Restore old mipmap detection logic
2021-05-22 19:39:52 -04:00
Skyler Saleh 76ed9310f2 Apple M1: RAII Wrapper for JITPageWrite*Execute*()
Added RAII wrapper around the the JITPageWriteEnableExecuteDisable() and
JITPageWriteDisableExecuteEnable() to make it so that it is harder to forget to
pair the calls in all code branches as suggested by leoetlino.
2021-05-22 15:25:18 -07:00
Skyler Saleh f567fd93b9 Apple M1: Removed unavailable CPU core dialog box
Removed the unavailable CPU core dialog box that asked users to change their
selected CPU core to one that is available. Instead, Dolphin now just overrides
the core to the default, and logs that it performed the override.
2021-05-22 15:25:18 -07:00
Skyler Saleh f92ccd5058 Apple M1: Fix bug that could cause crash with MMU
Added a Common::JITPageWriteDisableExecuteEnable() that could be missed when
a memory exception is triggered by the running game.
2021-05-22 15:25:18 -07:00
Skyler Saleh 38861f6782 Apple M1: x86_64 MAP_JIT
- Enabled MAP_JIT on x86_64 after confirming that pthread_jit* calls are only
required for MAP_JIT pages on Apple Silicon
2021-05-22 15:25:18 -07:00
Skyler Saleh 4ff429266a Apple M1: MacOS 11.2 mprotect restrictions
In MacOS 11.2 mprotect can no longer change the access protection settings of
pages that were previously marked as executable to anything but PROT_NONE. This
commit works around this new restriction by bypassing the mprotect based write
protection and instead relying on the write protection provided by MAP_JIT.
2021-05-22 15:25:18 -07:00
Skyler Saleh 8cb86e7ae0 Apple M1: Enable hardened runtime
- Fixed error that was causing the hardened runtime from being enabled
- Refactored BuildMacOSUniversalBinary.py based on code style recommendations
2021-05-22 15:25:18 -07:00
Skyler Saleh 61448a9b2f Apple M1: Refactor ArmCPUDetect.cpp
Merges two nested #ifndefs into a single #if around hw cap includes.
2021-05-22 15:25:17 -07:00
Skyler Saleh 4542038cd0 Apple M1: OS version checking for MAP_JIT
- Added MacOS version checking around MAP_JIT to prepare code for x86 MAP_JIT
2021-05-22 15:25:17 -07:00
Skyler Saleh 948764d37b Apple M1: Build, Analytics, and Memory Management
Analytics:
- Incorporated fix to allow the full set of analytics that was recommended by
  spotlightishere

BuildMacOSUniversalBinary:
- The x86_64 slice for a universal binary is now built for 10.12
- The universal binary build script now can be configured though command line
  options instead of modifying the script itself.
- os.system calls were replaced with equivalent subprocess calls
- Formatting was reworked to be more PEP 8 compliant
- The script was refactored to make it more modular
- The com.apple.security.cs.disable-library-validation entitlement was removed

Memory Management:
- Changed the JITPageWrite*Execute*() functions to incorporate support for
  nesting

Other:
- Fixed several small lint errors
- Fixed doc and formatting mistakes
- Several small refactors to make things clearer
2021-05-22 15:25:17 -07:00
Skyler Saleh 4ecb3084b7 Apple M1 Support for MacOS
This commit adds support for compiling Dolphin for ARM on MacOS so that it can
run natively on the M1 processors without running through Rosseta2 emulation
providing a 30-50% performance speedup and less hitches from Rosseta2.

It consists of several key changes:

- Adding support for W^X allocation(MAP_JIT) for the ARM JIT
- Adding the machine context and config info to identify the M1 processor
- Additions to the build system and docs to support building universal binaries
- Adding code signing entitlements to access the MAP_JIT functionality
- Updating the MoltenVK libvulkan.dylib to a newer version with M1 support
2021-05-22 15:25:17 -07:00
JosJuice f9b0225b69
Merge pull request #9725 from Techjar/netplay-sync-allow-sd-write
NetPlay: Add some missing synced settings
2021-05-22 23:32:12 +02:00
Scott Mansell 610613ee76 Use correct mask for Fake VMem
Shouldn't have any behaviour change for regular usage as both masks are 32MB
by default.
But fixes theoretical buffer overrun when memory size override is used.
2021-05-23 05:54:02 +12:00
Mai M 77e5d79354
Merge pull request #9736 from Techjar/bbox-pixel-quads
VideoCommon: Account for pixel quads in bounding box calculation
2021-05-22 13:14:07 -04:00
JosJuice 68a5fc55d2 Interpreter: Fix fctiwx rounding
The interpreter implementation of fctiwx was treating rounding
mode 0 as "round to nearest, ties towards zero", which is not
an actual IEEE-754 rounding mode. The IBM document mentioned
in a comment at the top of the function, on the other hand,
treats rounding mode 0 as "round to nearest, ties to even",
which makes more sense.

This fixes one of JMC's console-recorded F-Zero GX replays on
JitArm64. (JitArm64 uses an interpreter fallback for fctiwx.)
2021-05-22 17:28:04 +02:00
Techjar be6b000bec VideoCommon: Account for pixel quads in bounding box calculation
The GC/Wii GPU rasterizes in 2x2 pixel groups, so bounding box values
will be rounded to the extents of these groups, rather than the exact
pixel. To account for this, we'll round the top/left down to even and
the bottom/right up to odd. I have verified that the values resulting
from this change exactly match a real Wii.
2021-05-22 05:58:52 -04:00
Techjar 0f17990137 VideoCommon: Split BBox* functions into common and backend implementation variants
This will allow for some aspects of bounding box to be handled in
VideoCommon instead of individual backends.
2021-05-22 01:11:57 -04:00
Techjar 42d1658c50 VideoCommon/TextureInfo: Restore old mipmap detection logic 2021-05-22 00:35:43 -04:00
JosJuice 99dc97c377 DolphinQt: AutoUpdate.cpp should use scm_rev_git_str
27cc0b5 regression.
2021-05-21 17:36:43 +02:00
Mai M 7d8c3ff7d2
Merge pull request #9732 from JosJuice/avoid-including-scmrev
Avoid including scmrev.h except in Version.cpp
2021-05-21 11:25:38 -04:00
JosJuice 27cc0b539a Avoid including scmrev.h except in Version.cpp
Any file which includes scmrev.h must be rebuilt when scmrev.h
is regenerated. By not including scmrev.h from any file other
than Version.cpp, incremental builds become a little faster.
2021-05-21 17:03:01 +02:00
JosJuice 1d3b9fdec2 Fix perf query regression
When trying to do a small optimization in 8a0f5ea, I failed to
take into account that WeakFlush and FlushOne update m_query_count.

Only D3D11 and OGL had this problem, not D3D12 and Vulkan.
2021-05-21 13:39:59 +02:00
Techjar a47fcdcbec NetPlay: Add some missing synced settings 2021-05-20 15:13:41 -04:00
Mai M 9312e45cbe
Merge pull request #9687 from Dentomologist/fix_config_descriptions_grammar
Fix config descriptions grammar
2021-05-20 11:15:25 -04:00
Mai M 1054abc9cc
Merge pull request #9712 from JosJuice/jitarm64-fmul-rounding
JitArm64: Fix fmul rounding issues
2021-05-20 10:25:02 -04:00
Mai M 5949a19fe6
Merge pull request #9714 from JosJuice/jitarm64-convert-fmov
JitArm64: Prefer using FMOV when doing single/double conversion
2021-05-20 10:24:36 -04:00
Mai M 6958df5967
Merge pull request #9695 from JosJuice/jitarm64-fres
JitArm64: Implement fres and frsqrte
2021-05-20 10:23:49 -04:00
Mai M 539c2cb00e
Merge pull request #9667 from Sintendo/jit64divwx2
Jit64: Minor divwx optimizations
2021-05-20 10:22:54 -04:00
Mai M 8b81481920
Merge pull request #9710 from JosJuice/volatile-begone
Remove all remaining volatile qualifiers
2021-05-20 10:20:22 -04:00
Mai M fb43aaf513
Merge pull request #9720 from Techjar/move-netsettings
NetPlay: Move NetSettings initialization to backend
2021-05-20 10:19:03 -04:00
JosJuice 25c4c64ae4 Fixes to translatable strings, take 2
Sorry, the fix I made to the empty string in a29660a was not
actually sufficient, as DolphinQt will call tr on the string
regardless of whether it's marked with _trans. The proper fix
is to use nullptr, which DolphinQt has a special check for.
2021-05-20 15:53:30 +02:00
JosJuice a29660a2c7 Fixes to translatable strings
Sending an empty string to the translation system will not
result in getting an empty string back, but rather a description
of the currently loaded translations file. So empty strings
should not be marked as translatable.

Also adding some i18n comments and rewording a string I thought
was hard to understand.
2021-05-20 11:35:01 +02:00
Filippo Tarpini e6057c5f62 Qt: avoid queuing ConfigChanged() more than once 2021-05-20 00:30:14 +03:00
Filoppi 379ffc268d IMUGyroscope: make GetState update optional (on by default), fix const, clean code
My future PRs will split the UI state from the Emulation State of some of these emulated
controller values and this readies the code for it.
2021-05-19 20:51:35 +03:00
Filoppi a19a0096db InputCommon: improve code that returns a controller attachment index
casting a value to a u32 when it's originally an int, and it's exposed as int to users,
could end up in cases where a negative number would result as a positive one.
This doesn't really affect the value range of the attachment enum,
still I think the code was wrong.

Heavily tested.
2021-05-19 20:51:34 +03:00
Filoppi d43a06ff6a IMUAccelerometer: consistency of BoundCount checks
Similar to the guitar, only control[0] was checked, and that felt random.
2021-05-19 20:51:34 +03:00
Filoppi 7f5b6ed788 Guitar: consistency of BoundCount check
only control[0] was checked, and not one, which seems random.
Either both or none should be checked.
2021-05-19 20:51:34 +03:00
Techjar 171aad50cc NetPlay: Move NetSettings initialization to backend
It doesn't really belong in frontend code, and this change will make it
easier to eventually support NetPlay on other UI frameworks.
2021-05-19 06:34:24 -04:00
JMC47 736de8abf6
Merge pull request #9527 from sepalani/watch-items
WatchWidget: Add new/delete/clear toolbar items
2021-05-18 04:08:58 -04:00
JMC47 93e9d8be86
Merge pull request #8923 from Filoppi/OSD-fixes
fixes for "On Display Messages"
2021-05-18 00:33:15 -04:00
JMC47 678e035126
Merge pull request #9678 from Filoppi/tooltips_style
Make all Qt ToolTips look similar to BalloonTips
2021-05-17 16:40:49 -04:00
JosJuice 1bf6762709 Fix Android controller mappings accidentally being in IsSettingSaveable
Settings.SECTION_INI_ANDROID and Settings.SECTION_BINDINGS
both have the value "Android", but we only want the former
to be marked as being handled by the new config system.

This change fixes a problem where controller settings were
not being properly saved to Dolphin.ini.
2021-05-16 17:08:51 +02:00
Mat M b4ec550782
Merge pull request #9715 from iwubcode/qt-header-warnings
DolphinQt: ignore warnings from qt headers on buildbot
2021-05-15 17:34:57 -04:00
JosJuice 11be2314fe JitArm64: Fix fmul rounding issues
This is a port of 4f18f60 to JitArm64.
2021-05-15 23:27:34 +02:00
JosJuice 66e912a252 PPCAnalyst: Treat frspx output as single 2021-05-15 23:27:33 +02:00
JosJuice 77afb0f4c3 PPCAnalyst: Apply "bitexact" analysis to fprIsSingle
This lets us set fprIsSingle to true in more cases.
2021-05-15 23:27:33 +02:00
Mat M b3bceb2c11
Merge pull request #9713 from JosJuice/ppcanalyst-bitexact-broken
PPCAnalyst: Fix broken bitexact analysis
2021-05-15 17:09:54 -04:00
iwubcode 04a635e884 DolphinQt: fix Visual Studio warning about 'assignment within conditional expression' 2021-05-15 14:39:03 -05:00
iwubcode 05b1566e3f DolphinQt: don't propagate warnings in the header to Dolphin when building with Visual Studio through CMake 2021-05-15 14:39:03 -05:00
JosJuice e5f2dcd891 JitArm64: Implement FPRF updates for fres+frsqrte 2021-05-15 19:21:17 +02:00
JosJuice 4b3fda7906 JitArm64: Implement frsqrte 2021-05-15 19:21:15 +02:00
JosJuice 85226e09f0 JitArm64: Implement fres 2021-05-15 19:16:32 +02:00
JosJuice 8c12068a03 JitArm64: Prefer using FMOV when doing single/double conversion
FMOV is faster than INS and ties UMOV. (On all CPUs I checked,
at least. It certainly shouldn't be slower, though.)
2021-05-15 18:56:40 +02:00
JosJuice b980797a16 PPCAnalyst: Fix broken bitexact analysis
`code` points to the first instruction in the block, not the
current instruction.
2021-05-15 18:19:04 +02:00
JosJuice 8a0f5ea04a Remove all remaining volatile qualifiers 2021-05-15 09:52:04 +02:00
Mat M d74a1068b8
Merge pull request #9540 from Pokechu22/better-fifo-analyzer-part-2
Fifo analyzer quality of life improvements
2021-05-14 15:51:53 -04:00
Mat M 41befc21cd
Merge pull request #9708 from JosJuice/dsp-volatile
DSP: Change external_interrupt_waiting from volatile to atomic
2021-05-14 14:34:09 -04:00
Mat M 964fed77c5
Merge pull request #9707 from JosJuice/remove-atomic-header
Remove Atomic.h
2021-05-14 14:33:24 -04:00
JMC47 16e91172b1
Merge pull request #9668 from leoetlino/windows-cmake-fixes
CMake: minor Windows fixes
2021-05-14 08:22:11 -04:00
Scott Mansell 9f91fb6447
Merge pull request #9688 from Filoppi/input_cleanup
Input cleanup
2021-05-14 20:51:33 +12:00
JosJuice d17341572d DSP: Change external_interrupt_waiting from volatile to atomic
Making this volatile accomplishes... Well, nothing in practice.
Making it atomic, on the other hand, lets us enforce a memory ordering.
2021-05-14 09:28:10 +02:00
JosJuice b93983b50a Remove Atomic.h
The STL has everything we need nowadays.

I have tried to not alter any behavior or semantics with this
change wherever possible. In particular, WriteLow and WriteHigh
in CommandProcessor retain the ability to accidentally undo
another thread's write to the upper half or lower half
respectively. If that should be fixed, it should be done in a
separate commit for clarity. One thing did change: The places
where we were using += on a volatile variable (not an atomic
operation) are now using fetch_add (actually an atomic operation).

Tested with single core and dual core on x86-64 and AArch64.
2021-05-13 18:56:27 +02:00
Mat M 7a72a5b997
Merge pull request #9703 from Filoppi/fix_expression_serialization
Fix serialization of control expressions with line breaks
2021-05-13 06:47:38 -04:00
Mat M d034c830ac
Merge pull request #9681 from iwubcode/texture-info
VideoCommon: move all texture calculations to a "TextureInfo" class
2021-05-13 06:44:08 -04:00
Mat M 0ef88d4ecb
Merge pull request #9705 from Leseratte10/master
Socket: Fix AF_INET6 on non-Windows systems
2021-05-13 06:42:44 -04:00
Mat M 24b9a64c11
Merge pull request #9690 from Sintendo/jit64divwux
Jit64: divwux - Prefer three-operand IMUL
2021-05-13 06:42:14 -04:00
Mat M 725ea3d9c1
Merge pull request #9637 from JosJuice/jitarm64-fprf
JitArm64: Implement FPRF updates
2021-05-13 06:39:28 -04:00
JosJuice bfe8b1068d JitArm64: Implement FPRF updates 2021-05-13 11:51:00 +02:00
JosJuice 749db94dec Arm64Emitter: Implement more variants of FMOV 2021-05-13 10:13:59 +02:00
Jordan Woyak bf16f77402
Merge pull request #9657 from lioncash/wiimote-mode
DataReport: Amend conditional test for data reports in IsValidMode
2021-05-12 17:23:17 -05:00
Dentomologist 5a688b74a7 GeneralWidget: Fix Backend description grammar
Unify Backend description string for Windows and other platforms.
2021-05-12 10:50:10 -07:00