Commit graph

37672 commits

Author SHA1 Message Date
JosJuice
c5d9514cd9 Interpreter: Fix rounding edge case in frsp
Fixes the Dolphin bug mentioned in
https://github.com/dolphin-emu/hwtests/issues/45.

Because this doesn't fix any observed behavior in games (no, 1080°
Avalanche isn't affected), I haven't implemented this in the JITs,
so as to not cause unnecessary performance degradations.
2022-08-06 18:54:19 +02:00
JosJuice
7b2b559743 Translation resources sync with Transifex 2022-08-06 15:50:00 +02:00
InvoxiPlayGames
f9e39cf200 Add Discord presence ioctlv to /dev/dolphin 2022-08-06 07:32:29 +01:00
Admiral H. Curtiss
92ed0e33a8
Merge pull request #10954 from shuffle2/ios-hdr-overflow
WiiSave: protect against a stack buffer overflow
2022-08-06 03:06:10 +02:00
Shawn Hoffman
3ca673a675 WiiSave: protect against a stack buffer overflow 2022-08-05 17:24:03 -07:00
Tilka
3595c8b295
Merge pull request #10952 from JosJuice/bitutils-remove-unused
Common: Remove unused stuff from BitUtils.h
2022-08-05 21:08:02 +01:00
JosJuice
52661dcc76 Arm64Emitter: Fix encoding of size for ADD (vector)
This was causing a bug in the rounding of paired single multiplication
operands. If Force25BitPrecision was called for quad registers, the
element size of its ADD instruction would get treated as if it was 16
instead of the intended 64, which would cause the result of the
calculation to be incorrect if the carry had to pass a 16-bit boundary.

Fixes one of the two bugs reported in
https://bugs.dolphin-emu.org/issues/12998.
2022-08-05 21:49:28 +02:00
JosJuice
c00008e3cd Common: Remove unused stuff from BitUtils.h 2022-08-05 17:54:51 +02:00
Tilka
d48d317cfb
Merge pull request #10951 from Tilka/ax_cleanup
AX: fix comments and variable names (NFC)
2022-08-05 15:27:07 +01:00
Tillmann Karras
b8e64b1f43 AX: fix comments and variable names (NFC)
This command does not upload the MAIN buffers to CPU memory. This was
functionally fixed in f11a40f858 without
updating the comments and variable names.
2022-08-05 15:00:17 +01:00
Scott Mansell
04beb23877
Merge pull request #10943 from Pokechu22/gormiti-gameini
GameSettings: Use Safe Texture Cache and add patch for black screens for Gormiti: The Lords of Nature!
2022-08-05 22:56:28 +12:00
Scott Mansell
ebf95370ef
Merge pull request #10946 from Pokechu22/remove-iLog
VideoCommon: Remove old iLog field
2022-08-05 22:42:09 +12:00
JosJuice
939fa1ed1c
Merge pull request #10941 from shuffle2/crypto-cleanup
Crypto cleanup
2022-08-05 12:12:34 +02:00
Tilka
e638bb658f
Merge pull request #10945 from Pokechu22/vulkan-source-file-name
Vulkan: Call setSourceFile in addition to addSourceText
2022-08-05 00:03:25 +01:00
Pokechu22
354530cf61 VideoCommon: Remove old iLog field
Prior to 7854bd7109, this was used by the debugger for the OpenGL and D3D9 plugins to control logging (via PRIM_LOG and INFO_LOG/DEBUG_LOG in VideoCommon code; PRIM_LOG was changed in 77215fd27c), and also framedumping (removed in 64927a2f81 and 2d8515c0cf), shader dumping (removed in 2d8515c0cf and this commit), and texture dumping (removed in 54aeec7a8f). Apart from shader dumping, all of these features have modern alternatives, and shader source code can be seen in RenderDoc if "Enable API Validation Layers" is checked (which also enables source attachment), so there's no point in keeping this around.
2022-08-04 15:49:39 -07:00
Pokechu22
20a2a2174d Vulkan: Call setSourceFile in addition to addSourceText 2022-08-04 15:09:12 -07:00
Admiral H. Curtiss
5508c52a95
Merge pull request #10932 from JosJuice/nfs
DiscIO: Add support for the NFS format
2022-08-04 22:20:08 +02:00
JosJuice
6fc3bbbdd9 DiscIO/VolumeVerifier: Add a note about NFS bad dumps 2022-08-04 22:01:00 +02:00
JosJuice
02e3125f23 DiscIO/VolumeVerifier: Small logic cleanup
Just for ease of reading. No behavioral difference.
2022-08-04 22:00:59 +02:00
JosJuice
40a4eb3893 DiscIO: Adjust GetDataSizeType logic for NFS 2022-08-04 22:00:59 +02:00
JosJuice
a87dffe52d DiscIO: Replace IsDataSizeAccurate with GetDataSizeType
Previously, we had WBFS and CISO which both returned an upper bound
of the size, and other formats which returned an accurate size. But
now we also have NFS, which returns a lower bound of the size. To
allow VolumeVerifier to make better informed decisions for NFS, let's
use an enum instead of a bool for the type of data size a blob has.
2022-08-04 22:00:59 +02:00
JosJuice
3a6df63e9b DiscIO: Add support for the NFS format
For a few years now, I've been thinking it would be nice to make Dolphin
support reading Wii games in the format they come in when you download
them from the Wii U eShop. The Wii U eShop has some good deals on Wii
games (Metroid Prime Trilogy especially is rather expensive if you try
to buy it physically!), and it's the only place right now where you can
buy Wii games digitally.

Of course, Nintendo being Nintendo, next year they're going to shut down
this only place where you can buy Wii games digitally. I kind of wish I
had implemented this feature earlier so that people would've had ample
time to buy the games they want, but... better late than never, right?

I used MIT-licensed code from the NOD library as a reference when
implementing this. None of the code has been directly copied, but
you may notice that the names of the struct members are very similar.
c1635245b8/lib/DiscIONFS.cpp
2022-08-04 22:00:58 +02:00
JosJuice
bb27d4cc95 DiscIO/VolumeWii: Decouple "is encrypted" from "is hashed"
Needed for the next commit. NFS disc images are hashed but not encrypted.

While we're at it, also get rid of SupportsIntegrityCheck.
It does the same thing as old IsEncryptedAndHashed and new HasWiiHashes.
2022-08-04 20:29:22 +02:00
Tilka
ceae42b754
Merge pull request #10477 from Pokechu22/light-dir-double-normalize
Sanitize and use increased precision when normalizing light directions
2022-08-04 18:30:30 +01:00
Pokechu22
8129874d11 Sanitize and use increased precision when normalizing light directions
This normalization was added in 02ac5e95c8, and changed to use floats in 4bf031c064.  The conversion to floats means that sometimes there is insufficient precision for the normalization process, which results in values of NaN or infinity.  Performing the whole process with doubles prevents that, but games also sometimes set the values to NaN or infinity directly (possibly accidentally due to the values not being initialized due to them not being used in the current configuration?).

The version of Mesa currently in use on FifoCI (20.3.5) has issues with NaN.  Although this bug has been fixed (b3f3287eac in 21.2.0), FifoCI is stuck with the older version.

This change may or may not be incorrect, but it should result in the same behavior as already present in Dolphin, while working around the Mesa bug.
2022-08-04 08:52:44 -07:00
Mai
f59f1a2a35
Merge pull request #10740 from Tilka/cxx20
Move to C++20 for non-MSVC compilers
2022-08-04 09:31:31 -04:00
Tilka
3ad6e3abc2
Merge pull request #10768 from Pokechu22/dsp-hle-gba-class
DSPHLE: Eliminate global state in GBA and AX uCode + accuracy improvements
2022-08-04 13:50:30 +01:00
Tilka
8105d0034d
Merge pull request #10821 from Pokechu22/dimar-masking
DVDInterface: Mask upper bits of DIMAR in GC mode
2022-08-04 12:50:49 +01:00
Pokechu22
bf70026728 DSPHLE: Require implementing DoState
CARDUCode, GBAUCode, and INITUCode previously didn't have an implementation of it. In practice it's unlikely that this caused an issue, since these uCodes are only active for a few frames at most, but now that GBAUCode doesn't have global state, we can implement it there. I also implemented it for CARDUCode, although our CARDUCode implementation does not have all states handled yet - this is simply future-proofing so that when the card uCode is properly implemented, the save state version does not need to be bumped. INITUCode does not have any state to save, though.
2022-08-03 17:32:12 -07:00
Pokechu22
f2e833b5c4 DSPHLE: Eliminate global state in AX uCode
This also increases accuracy as to when specific mail is allowed, and correctly handles masking of the 0xCDD1 mails.
2022-08-03 17:32:12 -07:00
Pokechu22
8d66c29f33 DSPHLE: Eliminate global state in GBA uCode + accuracy improvements
The accuracy improvements are:

* The request mail must be 0xabba0000 exactly; both the low and high parts are checked
* The address is masked with 0x0fffffff
* Before, the global state meant that after the GBA uCode had been used once, it would accept 0xcdd1 commands immediately. Now, it only accepts them after execution has finished.
2022-08-03 17:32:12 -07:00
Pokechu22
8b65e84121 DSPHLE: Make all uCode implementations final classes
(Apart from AXUCode, which is inherited by AXWiiUCode.)
2022-08-03 17:32:12 -07:00
Mai
b02653722d
Merge pull request #10856 from JosJuice/android-tv-user-data-2
Android: Add divider to landscape version of User Data activity
2022-08-03 20:24:54 -04:00
Mai
4617ee7d89
Merge pull request #10787 from JosJuice/channel-uri
Android: Add app link intent URI to channels projection
2022-08-03 20:21:45 -04:00
Mai
098fc8cadc
Merge pull request #10790 from JosJuice/android-wii-controller-magic
Android: Refactor reading "wiiController" preference
2022-08-03 20:21:11 -04:00
Pokechu22
8316c7af99 GameSettings: Add patch for black screens in Gormiti: The Lords of Nature!
This patch only targets the US release, and is not enabled by default.
2022-08-03 11:38:22 -07:00
Pokechu22
e353f8ba0d GameSettings: Use Safe Texture Cache for Gormiti: The Lords of Nature! 2022-08-03 11:38:22 -07:00
Mai
27669fc7c8
Merge pull request #10828 from JosJuice/jitarm64-32-bit-exception
JitArm64: Pass 32-bit temp GPR to WriteConditionalExceptionExit
2022-08-03 14:36:19 -04:00
Mai
a8b2174ce6
Merge pull request #10872 from shuffle2/timer
Timer improvements
2022-08-03 14:30:29 -04:00
Mai
173337104f
Merge pull request #10919 from JosJuice/android-wait-on-fab-click
Android: Use AfterDirectoryInitializationRunner on FAB press
2022-08-03 14:22:42 -04:00
Mai
385764ebe0
Merge pull request #10913 from shuffle2/vsnext
msvc: fix issues with vs 17.3
2022-08-03 14:21:53 -04:00
Mai
f3c85cad6e
Merge pull request #10937 from Pokechu22/lego-indiana-jones-missing-color-value
GameSettings: Set MissingColorValue for Lego Indiana Jones 1
2022-08-03 14:18:39 -04:00
Mai
ebb8402a24
Merge pull request #10934 from sepalani/bba-igmp
BBA/BuiltIn: Add minimal IGMP support
2022-08-03 14:17:41 -04:00
Mai
f93b04dc94
Merge pull request #10935 from Pokechu22/icache-dont-save-lookup-table
PPCCache: Stop storing lookup table in savestates
2022-08-03 14:14:39 -04:00
Pokechu22
b2c2076c17
Merge pull request #10942 from Minty-Meeo/vestigial-preprocessor-block
Remove Vestigial Preprocessor Block in Jit64/Jit.cpp
2022-08-03 10:59:09 -07:00
Minty-Meeo
347dd03c3f Remove Vestigial Preprocessor Block in Jit64/Jit.cpp
"Common/GekkoDisassembler.h" became used by Release builds with commit 77e9aa48bc, but this got left in by mistake.
2022-08-03 12:30:20 -05:00
JosJuice
b39d8f1ce4
Merge pull request #10911 from shuffle2/fast-default-verify
VolumeVerifier: enable fast hash functions by default
2022-08-03 16:55:04 +02:00
Shawn Hoffman
bf5076eb01 crypto/sha1: add real workaround for msvc/arm64 bad codegen 2022-08-02 23:05:45 -07:00
Shawn Hoffman
78142e30cc crypto/sha1: simplify enablement of sha insns on non-msvc 2022-08-02 23:05:07 -07:00
Shawn Hoffman
4e6aa28da4 crypto/aes: silence warning on godforsaken android gcc 2022-08-02 23:03:51 -07:00