Commit Graph

24866 Commits

Author SHA1 Message Date
OatmealDome 5c1693587f DolphinQt: Ignore "-psn" command line option on macOS 2020-08-04 15:55:51 -04:00
JosJuice b0f9bb9f13 Port some settings to the new config system
Other than the controller settings and JIT debug settings,
these are the only settings which were defined in Java code
but not defined in the new config system in C++. (There are
still a lot of settings that are defined in the new config
system but not yet saveable in the new config system, though.)
2020-08-03 15:07:53 +02:00
OatmealDome fae8f8d68b MainWindow: Attach quit emulation sheet to RenderWidget on macOS 2020-08-03 05:48:57 -04:00
Ryan Meredith 6020133f5b LogManager: Add missing include 2020-08-02 19:52:10 -04:00
JosJuice 5cad82137d Allow translations and custom names in GameFile::GetNetPlayName
There is no longer any major reason for why this function would
need to return the same result for all players.
2020-08-02 22:46:53 +02:00
JosJuice a41166bb37 Make netplay's "same game" check more robust
Instead of comparing the game ID, revision, disc number and name,
we can compare a hash of important parts of the disc including
all the aforementioned data but also additional data such as the
FST. The primary reason why I'm making this change is to let us
catch more desyncs before they happen, but this should also fix
https://bugs.dolphin-emu.org/issues/12115. As a bonus, the UI can
now distinguish the case where a client doesn't have the game at
all from the case where a client has the wrong version of the game.
2020-08-02 22:46:53 +02:00
Admiral H. Curtiss cdf2a29b5e Qt/IOWindow: Add a handful of math functions to the function dropdown. 2020-08-02 22:09:09 +02:00
Admiral H. Curtiss 2281cde28b InputCommon: Add a handful of math functions to the expression parser. 2020-08-02 22:09:09 +02:00
JosJuice 234eaa0ff9
Merge pull request #7252 from Ebola16/Log
Android: Add Log Configuration to UI
2020-08-02 22:00:48 +02:00
Sintendo 08bdeefe05 Jit64AsmCommon: Use AVX in ConvertDoubleToSingle
Using AVX we can eliminate another MOVAPS instruction here.

Before:
0F 28 C8                movaps      xmm1,xmm0
66 0F DB 0D CF 2C 00 00 pand        xmm1,xmmword ptr [1F8D283B220h]

After:
C5 F9 DB 0D D2 2C 00 00 vpand       xmm1,xmm0,xmmword ptr [271835FB220h]
2020-08-02 18:07:47 +02:00
Felk f775e9b99d OnScreenDisplay: fix names rgba -> argb 2020-08-02 01:37:20 +02:00
Tilka dbacffd75d
Merge pull request #8731 from Pokechu22/dsp-lle-cpu-int-crash
Fix crash when using DSP LLE with CPU interpreter (or fastmem off)
2020-08-01 15:26:27 +01:00
JosJuice 13f20ecd34 DolphinQt: Don't capture local pointer by reference
This may be the cause of a crash that has been reported on the
forums, but I'm not sure since I can't reproduce it myself.
2020-07-31 11:33:48 +02:00
LC 0aaddf8b19
Merge pull request #8990 from JosJuice/wia-conversion-warning
DiscIO: Fix conversion warning
2020-07-30 21:45:24 -04:00
Pokechu22 9183c0c482 Bump state version 2020-07-29 16:57:37 -07:00
Pokechu22 e5e23c6b27 Mark several DVDInterface functions as static 2020-07-29 16:57:36 -07:00
Pokechu22 4415df463f Remove DVDInterface::Reset
It only resets the registers, which isn't something that needs to be done except for in DVDInterface::Init
2020-07-29 16:57:36 -07:00
Pokechu22 0fa96df818 Remove DriveState::DiscChangeDetected hack
Since both GameCube and Wii resets now work correctly, this hack is not needed anymore.
2020-07-29 16:57:36 -07:00
Pokechu22 a73eaf5712 Fix DVDLowReset spinup flag being read incorrectly 2020-07-29 16:57:35 -07:00
Pokechu22 9a8d426645 Implement PI_RESET_CODE resetting DI 2020-07-29 16:57:35 -07:00
Pokechu22 b8715b42d2 Only reset drive chip state (not DI registers) when changing discs
Resetting the DI registers disables interrupts, which means any errors reported (for instance) are just not sent though.
2020-07-29 16:57:35 -07:00
Pokechu22 537e40afb5 Only update DIMAR and DILENGTH if transfer completed without error
Turns out, Gamecube games actually do check DILENGTH, and if DILENGTH is at 0, they'll think the transfer completed successfully even if DEINT is used, since after all, surely that means everything was sent.  That caused all sorts of issues, from audio looping when a disc is removed since it's re-using the same buffer to just flat-out crashing instead of showing the disc removed screen.
2020-07-29 16:57:35 -07:00
Pokechu22 fba51b2956 Split drive state and drive error into 2 fields, and fix some inaccuracies
In particular:
- Trying to play audio in a non-ready state returns the state-specific error, not an audio buf error
- Audio status cannot be requested in non-ready states
- The audio buffer cannot be configured in states other than ReadyNoReadsMade
- Using the stop motor command while the motor is already stopped doesn't change states

Additionally, the internal state IDs are used (which distinguish ReadyNoReadsMade and Ready), instead of the state IDs exposed in request error.  This makes some of the weird behavior a bit more obvious.

State and error behavior of the seek command was not implemented in this commit.
2020-07-29 16:57:34 -07:00
JosJuice 2e8c5b4521 DolphinQt: Show a warning when launching an NKit disc image
It is my opinion that nobody should use NKit disc images without
being aware of the drawbacks of them. Since it seems like almost
nobody who is using NKit disc images knows what NKit is (hmm, now
how could that have happened...?), I am adding a warning to Dolphin
so that you can't run NKit disc images without finding out about the
drawbacks. In case someone really does want to use NKit disc images,
the warning has a "Don't show this again" option. Unfortunately, I
can't retroactively add the warning where it's most needed:
in Dolphin 5.0, which does not support Wii NKit disc images.
2020-07-29 21:05:57 +02:00
Sintendo 31755bc13a Jit64: fselx - Optimize SSE4.1 packed
Pretty much the same optimization we did for AVX, although slightly more
constrained because we're stuck with the two-operand instruction where
destination and source have to match.

We could also specialize the case where registers b, c, and d are all
distinct, but I decided against it since I couldn't find any game that
does this.

Before:
66 0F 57 C0          xorpd       xmm0,xmm0
66 41 0F C2 C1 06    cmpnlepd    xmm0,xmm9
41 0F 28 CE          movaps      xmm1,xmm14
66 41 0F 38 15 CC    blendvpd    xmm1,xmm12,xmm0
44 0F 28 F1          movaps      xmm14,xmm1

After:
66 0F 57 C0          xorpd       xmm0,xmm0
66 41 0F C2 C1 06    cmpnlepd    xmm0,xmm9
66 45 0F 38 15 F4    blendvpd    xmm14,xmm12,xmm0
2020-07-29 17:28:48 +02:00
Sintendo afb86a12ab Jit64: fselx - Optimize AVX packed
For the packed variant, we can skip the final MOVAPS and write the
result directly into the destination register.

Before:
66 0F 57 C0          xorpd       xmm0,xmm0
66 41 0F C2 C1 06    cmpnlepd    xmm0,xmm9
C4 C3 09 4B CC 00    vblendvpd   xmm1,xmm14,xmm12,xmm0
44 0F 28 F1          movaps      xmm14,xmm1

After:
66 0F 57 C0          xorpd       xmm0,xmm0
66 41 0F C2 C1 06    cmpnlepd    xmm0,xmm9
C4 43 09 4B F4 00    vblendvpd   xmm14,xmm14,xmm12,xmm0
2020-07-29 17:06:52 +02:00
JosJuice a05b1f9ab9 DiscIO: Fix conversion warning
Should fix https://bugs.dolphin-emu.org/issues/12208.
2020-07-29 10:55:02 +02:00
LC b354e343a7
Merge pull request #8988 from JosJuice/no-refresh-rate-round
VideoCommon: Don't round the refresh rate
2020-07-28 17:17:34 -04:00
Sintendo a52774ca63 Jit64: fselx - Add AVX path
AVX has a four-operand VBLENDVPD instruction, which allows for the first
input and the destination to be different. By taking advantage of this,
we no longer need to copy one of the inputs around and we can just
reference it directly, provided it's already in a register (I have yet
to see this not be the case).

Before:
66 0F 57 C0          xorpd       xmm0,xmm0
F2 41 0F C2 C6 06    cmpnlesd    xmm0,xmm14
41 0F 28 CE          movaps      xmm1,xmm14
66 41 0F 38 15 CA    blendvpd    xmm1,xmm10,xmm0
F2 44 0F 10 F1       movsd       xmm14,xmm1

After:
66 0F 57 C0          xorpd       xmm0,xmm0
F2 41 0F C2 C6 06    cmpnlesd    xmm0,xmm14
C4 C3 09 4B CA 00    vblendvpd   xmm1,xmm14,xmm10,xmm0
F2 44 0F 10 F1       movsd       xmm14,xmm1
2020-07-28 23:17:18 +02:00
JosJuice f72b756778 VideoCommon: Don't round the refresh rate
We now provide a double to the FPS counter and exact values
to FIFO recording and frame dumping.
2020-07-28 21:01:38 +02:00
Jordan Woyak bdfb320b3d WiimoteEmu: Don't check extension button press for wii remote reconnection. A real remote doesn't. We won't either. 2020-07-26 11:20:23 -05:00
Pokechu22 1ca3710bd2 DSPLLE: Use Memory functions isntead of directly using Memory::physical_base
Fixes bug 11980
2020-07-24 15:06:39 -07:00
Pokechu22 59dc7cfe7d Use size_t in some DSP code code 2020-07-24 15:06:39 -07:00
Lioncash f9b856aeda WiimoteEmu: Mark several getters as const
These don't modify internal class state, so they can be made const.
2020-07-24 15:48:27 -04:00
Ryan Meredith fdcc6a436b Android: Add Log Configuration to UI 2020-07-24 13:59:13 -04:00
Lioncash 4b21bc7508 LightingShaderGen: Transition over to fmt 2020-07-24 13:50:09 -04:00
Lioncash 7f7db6d3e7 VertexShaderGen: Transition over to using fmt 2020-07-24 13:34:47 -04:00
Tillmann Karras 062dd5ab0a DolphinQt: fix -Wunused-variable warning 2020-07-24 17:44:32 +01:00
Tillmann Karras 5bd2b2699c DolphinQt: fix -Wsign-compare warning 2020-07-24 17:44:32 +01:00
Tillmann Karras 750cb1f830 DolphinQt: fix -Wunused-but-set-variable warning 2020-07-24 17:41:37 +01:00
Tillmann Karras bf5b1092b2 DiscIO: fix -Wreorder warning 2020-07-24 17:41:37 +01:00
Tillmann Karras 04b31e7eee IOS: work around incorrect -Wunused-but-set-variable warning
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96311
2020-07-24 16:38:54 +01:00
Tillmann Karras fbd34f72ad EXI: fix -Wunused-variable warning 2020-07-24 15:35:35 +01:00
Tillmann Karras 7b2e93eea8 EXI: fix -Wreorder warning 2020-07-24 15:35:24 +01:00
JMC47 781662c6ad
Merge pull request #8793 from iwubcode/dump-texture-options
DolphinQt / VideoCommon: Add additional texture dumping options
2020-07-24 01:38:10 -04:00
JosJuice 213c1841f7
Merge pull request #8903 from AdmiralCurtiss/gcmemcard-file-identity-check
GCMemcard: Change behavior of TitlePresent() to more closely resemble how saves are actually identified.
2020-07-23 17:44:16 +02:00
iwubcode 9c8338ec4c DolphinQt / VideoCommon: Add additional texture dumping options. Specifically, this enables users to choose whether to dump mip maps, base level textures, or both. 2020-07-22 19:30:27 -05:00
LC d7a91316da
Merge pull request #8974 from Filoppi/patch-4
Fix disc image conversion button not being clear #3
2020-07-22 17:24:23 -04:00
Filippo Tarpini f6ba54b74e
Fix disc image conversion button not being clear #3
It wasn't clear whether the conversion would create a new file or replace the old one

Recreated #8952 directly from github
2020-07-22 23:00:20 +03:00
JosJuice 26536832c3 Config: Simplify IsSettingSaveable
Should make it both easier to edit and faster to run.
2020-07-22 11:46:47 +02:00
LC ae2348023b
Merge pull request #8964 from JosJuice/list-wad-file-type
DolphinQt: Show WAD as "WAD" instead of "" in file format column
2020-07-19 17:35:34 -04:00
JosJuice fe5e92f706 DolphinQt: Show WAD as "WAD" instead of "" in file format column
https://bugs.dolphin-emu.org/issues/12190
2020-07-19 21:30:48 +02:00
Jordan Woyak ae44f17667 HW/GCPadEmu: Adjust gate radius values to more closely match the real hardware. 2020-07-19 09:45:33 -05:00
LC 487cd7abd9
Merge pull request #8905 from JosJuice/jni-encoding
Android: Use correct encoding when converting strings
2020-07-18 22:13:14 -04:00
Filip Gawin 0ede5d1537 Use range loop (if possible) 2020-07-18 18:29:16 -05:00
iwubcode 97c9cf3e21 DolphinQt / InputCommon - add DSU string validator to avoid crashes, limited backwards compatibility support 2020-07-17 14:53:39 -05:00
iwubcode 58aa0150e1 DolphinQt / InputCommon: Support multiple DSU servers 2020-07-17 14:53:39 -05:00
JosJuice aa4896fb3f DolphinQt: Add i18n comment for "Surround" 2020-07-17 19:10:31 +02:00
Jordan Woyak 8b3e9e6a81 DolphinQt: Replace unusual Qt::InitialSortOrderRole usage with a custom role. 2020-07-16 20:27:07 -05:00
LC a7e475e57b
Merge pull request #8958 from jordan-woyak/sort-fix
DolphinQt: Fix default sort direction of game list.
2020-07-16 21:20:43 -04:00
Jordan Woyak ecf016e80a DolphinQt: Fix default sort direction of game list. 2020-07-16 19:21:14 -05:00
Techjar 037aa2192f NetPlay: Limit nickname length
Ridiculously long nicknames cause UI silliness, so 30 characters seems
like a reasonable limit, as it's the same as the forum.
2020-07-16 19:03:54 -04:00
Techjar 92812d0b0b QtUtils: Add UTF8CodePointCountValidator 2020-07-16 19:03:46 -04:00
LC c59648337a
Merge pull request #8955 from JosJuice/android-no-ashmem
Android: Don't access /dev/ashmem on newer Android versions
2020-07-16 14:23:51 -04:00
JosJuice 00cde7cbbd Android: Don't access /dev/ashmem on newer Android versions
Fixes a critical regression where 95945a0 made us unable to
start emulation on Android 10 and newer. Android is restricting
direct access to /dev/ashmem starting with the new SDK version,
but we can use the new (and simpler) ASharedMemory API instead.
We have to keep using the /dev/ashmem approach on old versions
of Android, though.
2020-07-16 20:06:58 +02:00
JosJuice f2cc3a2948 Add Android check for strerror_r variant
I don't know why Android does it like this, but at least
it's easy to fix. (We are currently at __ANDROID_API__ == 21.)
2020-07-16 18:51:58 +02:00
nyanpasu64 1a2b6ca2d6 Fix Windows CMake builds with shared zlib
On Linux, if shared zlib is present, zlib.h is always available and -lz
links to zlib, even if you don't run find_package(ZLIB).

For some reason I have zlib installed on Windows (possibly from vcpkg),
so find_package(ZLIB) succeeds and ZLIB_FOUND is true.
When Dolphin uses shared zlib on Windows, the problem is that zlib.h
is not in the default include path, and the CMake target is called
ZLIB::ZLIB and there's neither a target nor a library called z.

However, both find_package(ZLIB) and add_subdirectory(Externals/zlib)
create a target called ZLIB::ZLIB, so I'll switch to that instead.
Hopefully this change doesn't break anyone's build.
2020-07-15 23:25:18 -07:00
Admiral H. Curtiss 556e93f357 GCMemcard: Change behavior of TitlePresent() to more closely resemble how saves are actually identified.
This modifies GCMemcard::TitlePresent() to match my findings of how the GC BIOS and various games behave when you alter the fields in the directory entry.

It looks like for a save to be recognized by a game, the following have to be true:
- Game code and maker code must exactly match what the game expects.
- Filename is only checked up to the first null byte. All bytes afterwards can be whatever.

The BIOS itself does a full compare of the filename when checking for whether it should allow copying a file from one card to another, but behaves oddly in some cases when there's non-null bytes after the first null. See the big comment in `HasSameIdentity()` for details.
2020-07-15 19:17:22 +02:00
Tilka 695a96498a
Merge pull request #8922 from Filoppi/timer-fixes
Timer fixes
2020-07-13 00:16:45 +01:00
JMC47 3c70fb7277
Merge pull request #8950 from jordan-woyak/double-time-fix
Common/Timer: Fix integer underflow in Timer::GetDoubleTime for dates before ~2008.
2020-07-12 15:52:15 -04:00
Jordan Woyak eab07866a3 Common/Timer: Fix integer underflow in Timer::GetDoubleTime for dates before ~2008. 2020-07-12 12:55:02 -05:00
LC 4d36f6a5b0
Merge pull request #8936 from jordan-woyak/wiimote-extension-calibration-fix
ControllerInterface/Wiimote: Provide fallback values for extensions with bad calibration.
2020-07-12 12:46:15 -04:00
Jordan Woyak d9e7d0514c WiimoteEmu: Allow writes of the i2c bus to play speaker data. 2020-07-11 21:19:16 -05:00
Jordan Woyak 5299e902aa ControllerInterface/Wiimote: Provide fallback values for extensions with bad calibration data. 2020-07-11 19:55:14 -05:00
Rena Kunisaki a553f22385 Add Break On Hit and Log On Hit for instruction breakpoints 2020-07-11 13:38:58 -04:00
LC ed32a2a1fe
Merge pull request #8946 from jordan-woyak/unbreak-mayflash
InputCommon/GCAdapter: Unbreak Mayflash GCAdapters by allowing libusb_control_transfer call to fail.
2020-07-11 11:56:30 -04:00
JosJuice f7c32bc04e RVZ: Fix split seed reads
This could cause read errors if chunks were laid out a certain
way in the file and the whole chunk wasn't being read at once.
Should fix https://bugs.dolphin-emu.org/issues/12184.
2020-07-11 17:45:16 +02:00
Jordan Woyak b350d3cca3 InputCommon/GCAdapter: Unbreak Mayflash GCAdapters by allowing libusb_control_transfer call to fail. 2020-07-09 17:17:44 -05:00
JosJuice 9c7704c0ac DolphinQt: Attempt to fix ParallelProgressDialog constantly reopening
I believe the value returned by value() resets when we call
setValue() with the maximum (due to auto-reset). I have been
unable to test this because I can't reproduce the issue, which is
described at https://bugs.dolphin-emu.org/issues/12158#note-9.
2020-07-09 15:45:29 +02:00
JosJuice aeeb85aa3a DolphinQt: Replace QTBUG-10561 workaround with better workaround
This workaround is not timing sensitive, unlike the old one.

Hopefully fixes https://bugs.dolphin-emu.org/issues/12158
and https://bugs.dolphin-emu.org/issues/12180.
2020-07-08 20:29:26 +02:00
JosJuice f5da6e07d7 Android: Use correct encoding when converting strings
The functions with "UTF" in the name use "modified UTF-8" rather
than the standard UTF-8 which Dolphin uses, at least according
to Oracle's documentation, so it is incorrect for us to use them.
This change fixes the problem by converting between UTF-8 and
UTF-16 manually instead of letting JNI do it for us.
2020-07-08 14:52:05 +02:00
JosJuice 38791eec18 Common: Never convert from UCS-2 in WStringToUTF8
Probably not something we would run into in practice since
Windows uses a separate implementation, but let's do it
for the sake of correctness.
2020-07-08 14:51:35 +02:00
JosJuice 15d9fab0bb Common: Rename UTF16ToUTF8
This function does *not* always convert from UTF-16. It converts
from UTF-16 on Windows and UTF-32 on other operating systems.

Also renaming UTF8ToUTF16 for consistency, even though it
technically doesn't have the same problem since it only was
implemented on Windows.
2020-07-08 14:51:35 +02:00
LC 87287181dd
Merge pull request #8907 from JosJuice/android-overlay-stick-gate
Android: Use octagonal stick gate in overlay
2020-07-08 08:50:47 -04:00
LC 4c50eadf34
Merge pull request #8908 from jordan-woyak/wiimote-battery-hax
WiimoteCommon: Tweak battery level math.
2020-07-08 08:46:58 -04:00
LC b9ae7c350e
Merge pull request #8926 from JosJuice/sysconf-sound
DolphinQt: Expose SYSCONF sound setting
2020-07-08 08:41:23 -04:00
LC 0bff77d9e4
Merge pull request #8925 from JosJuice/tas-turbo-interval
DolphinQt: Allow customizing TAS input turbo interval
2020-07-08 08:40:46 -04:00
LC a1195fbf91
Merge pull request #8933 from jordan-woyak/gcadapter-nyko
InputCommon/GCAdapter: Fix offbrand "GCAdapters".
2020-07-08 08:38:52 -04:00
JosJuice 6f298378a1 Reword "Please avoid forcing Dolphin to use MSAA by the driver" message
Some users who get this error don't seem to gain much understanding
of how to resolve the problem from reading the error message.
2020-07-08 11:34:36 +02:00
Jordan Woyak f2fd5c7f90 InputCommon/GCAdapter: Fix offbrand "GCAdapters" with a libusb_control_transfer call. 2020-07-07 14:45:19 -05:00
JosJuice 327b985718 DVDInterface: Increase the latency for read commands
Hardware tested using cached reads.

Fixes Ed, Edd n Eddy. https://bugs.dolphin-emu.org/issues/10373
2020-07-05 18:57:39 +02:00
JosJuice 7a45ca0334 DolphinQt: Mark Zstandard as recommended for RVZ 2020-07-05 12:52:59 +02:00
JosJuice 74f74ac928 DiscIO: Use Volume::IsDatelDisc in VolumeVerifier
I forgot to do this in the PR where I added Volume::IsDatelDisc.
2020-07-04 20:24:26 +02:00
Tilka 4f98653ec6
Merge pull request #8930 from JosJuice/datel-scrub-ignored
DolphinQt: Fix scrubbing not being disabled for Datel discs
2020-07-04 14:49:34 +01:00
Tilka c5a3882617
Merge pull request #8929 from JosJuice/datel-covers
DiscIO: Fix downloading covers for non-GNHE5d Datel discs
2020-07-04 14:07:46 +01:00
JosJuice 5360ec80c8 DolphinQt: Fix scrubbing not being disabled for Datel discs
The code for disabling scrubbing for RVZ was overriding the code
for disabling scrubbing for Datel discs.
2020-07-04 15:06:05 +02:00
JosJuice fb922781e7 RedumpVerifier: Treat Datel game IDs as empty
Replacement for the reverted commit
f9705fd117.
2020-07-04 15:00:02 +02:00
JosJuice f24566bf39 DiscIO: Add Volume::IsDatelDisc 2020-07-04 14:51:13 +02:00
JosJuice f9aaf8b971 Revert "Return nothing from VolumeWii::GetGameTDBID if Datel"
This reverts commit f9705fd117.
GameTDB.com has covers for non-GNHE5d Datel discs.
2020-07-04 14:45:15 +02:00
Connor McLaughlin 9c12a843f8
Merge pull request #8884 from iwubcode/freelook_performance_fix
VertexShaderManager: Only look for freelook config changes if we're using freelook
2020-07-04 14:19:59 +10:00
JosJuice e1e57fc359 DolphinQt: Expose SYSCONF sound setting 2020-07-02 22:25:41 +02:00
iwubcode 0441d6aa5e VertexShaderManager: Avoid accessing freelook control type configuration each call which caused a performance hit, move check to RenderBase where it is checked when config changes 2020-07-02 12:55:08 -05:00
JosJuice 1c4088e203 DolphinQt: Allow customizing TAS input turbo interval
As a side effect of 9c5c3c0, Dolphin's frame counter was changed
to run at 60/50 Hz even if the game is running at a lower framerate
such as 30 fps. Since the TAS input turbo button functionality
toggled the state of a button every other frame as reported by
the frame counter, this change made the turbo button functionality
not work with 30/25 fps games.

I believe it would be hard to change the frame counter back to
how it used to work without undermining the point of 9c5c3c0,
and I'm not sure if doing so would be desireable or not anyway,
so what I'm doing instead is letting the user determine how long
turbo button presses should last. This lets users avoid the 30/25
fps game problem while also granting additional flexibility.
Perhaps there is some game where it is useful to mash at a speed
which is slower than frame perfect.
2020-07-02 16:58:29 +02:00
Filoppi 4b5ca9923c Fixes the timer returning 1 when it should return 0. The case mentioned by the comment does not exist anymore.
Also added a IsRunning function as it was impossible to know whether it had been started or not (I will use it in later PRs but it should be there anyway)
2020-07-01 22:29:30 +03:00
MerryMage a10447eae2 JitArm64_Paired: Fix ps_msub when d == b 2020-07-01 20:11:54 +01:00
Tillmann Karras a04ac23794 JitArm64: no intermediate rounding for paired FMA 2020-07-01 00:24:08 +01:00
Tillmann Karras 2a46c1f86f JitArm64: annotate intentional fallthrough 2020-07-01 00:10:15 +01:00
LC 4ff560a6e4
Merge pull request #8913 from JosJuice/msvc-preprocessor
Support the new MSVC preprocessor
2020-06-30 04:34:10 -04:00
Markus Wick 5792881eeb
Merge pull request #8912 from JosJuice/fix-profiler
VideoCommon: Show profiler output again
2020-06-29 14:01:57 +02:00
JosJuice 293745afce Support the new MSVC preprocessor
Intends to fix https://bugs.dolphin-emu.org/issues/12170.
2020-06-29 13:50:59 +02:00
JosJuice 81d399a4f2 VideoCommon: Show profiler output again
This profiler was added in 94d9d13, but must've broken at some point.
2020-06-29 11:59:47 +02:00
Markus Wick 4095fb6c20
Merge pull request #8911 from OatmealDome/arm64-fastmem-off
JitArm64: Don't assume fastmem arena is available
2020-06-29 09:20:19 +02:00
OatmealDome 089ffb9ef4 JitArm64: Don't assume fastmem arena is available 2020-06-29 00:42:56 -04:00
OatmealDome 0a22df3a9d Analytics: Remove deprecated usage of Gestalt to get macOS version 2020-06-29 00:37:50 -04:00
Jordan Woyak d382c6bab9 WiimoteCommon: Tweak battery level math. 2020-06-28 19:40:26 -05:00
JosJuice db75509ec5 Android: Enfore correct stick gate in overlay
Currently, the touch controller overlay uses a square gate for
sticks. This commit changes that so that it instead uses the
stick gate configured in the INI, which ensures that the values
sent to the core are appropriately scaled regardless of what
is configured in the INI and makes the overlay look nicer
if the INI is set to a stick gate that matches the graphics.
2020-06-29 01:20:02 +02:00
JMC47 961f937010
Merge pull request #8853 from CrunchBite/feature-xlink-kai-bba
Feature XLink Kai BBA
2020-06-27 23:32:49 -04:00
Admiral H. Curtiss 27e49c00b3 FreeLookCamera: Fix savestate branch inconsistency.
Fixes https://bugs.dolphin-emu.org/issues/12168
2020-06-28 02:31:37 +02:00
Tilka 2e8d1dd1db
Merge pull request #8889 from JosJuice/movie-frame-update-frequency
Core: Call Movie::FrameUpdate per field, not per line
2020-06-27 18:10:08 +01:00
Tilka b36ab8360e
Merge pull request #8820 from iwubcode/freelook_field_of_view
Core / VideoCommon / DolphinQt - allow tweaking freelook camera's field of view
2020-06-27 18:00:48 +01:00
CrunchBite 067667fda5 Add XLink Kai UDP BBA 2020-06-26 14:52:30 -04:00
JMC47 1ab37990b1
Merge pull request #8808 from sepalani/net-widgets-block
NetworkWidget: Add Blocking column
2020-06-26 07:38:52 -04:00
iwubcode bb6582783b Core: update save state version 2020-06-25 13:35:47 -05:00
iwubcode 69bd6bbdef DolphinQt: change freelook fov by the step size 2020-06-25 13:34:42 -05:00
iwubcode 8ccb684711 VideoCommon: change freelook camera fov step size and expose it 2020-06-25 13:34:42 -05:00
iwubcode dc4b938526 DolphinQt: use hotkeys for field of view to modify freelook camera 2020-06-25 13:34:42 -05:00
iwubcode 7aa153d57e HotkeyManager: Add hotkeys for freelook field-of-view x and y 2020-06-25 13:34:42 -05:00
iwubcode 3d7d4dfc8a VideoCommon: Use freelook field of view to change the perspective of the camera 2020-06-25 13:34:42 -05:00
Tilka 98de22a1e6
Merge pull request #8900 from JosJuice/disc-deduplicate
DiscIO: Deduplicate some VolumeGC/VolumeWii code
2020-06-25 16:10:04 +01:00
JosJuice a2c51e027f DolphinQt: Fix a -Wshadow warning in ConvertDialog 2020-06-25 16:44:02 +02:00
JosJuice d17b801518 DiscIO: Deduplicate some VolumeGC/VolumeWii code 2020-06-25 16:37:21 +02:00
JosJuice 94fd583147 DolphinQt: Fix a -Wswitch warning in ConvertDialog 2020-06-25 16:34:43 +02:00
Tilka 6468978dd0
Merge pull request #8897 from JosJuice/qt-file-format-columns
DolphinQt: Add columns with file format details
2020-06-25 15:21:44 +01:00
Tilka 4eb4b1d2b7
Merge pull request #8898 from JosJuice/windows-cmake-new-lambda-processor
Replace Windows CMake lambda constexpr capture workaround
2020-06-25 15:19:09 +01:00
JMC47 502ab789d9
Merge pull request #8813 from nbouteme/master
Make SO_POLL complete asynchronously in IOS_NET SO
2020-06-25 08:20:56 -04:00
JosJuice c9edfa0eaa Replace Windows CMake lambda constexpr capture workaround
While manually capturing constexpr variables used in lambda
expressions does work, it's really easy to forget doing so since
we don't have a Windows CMake builder and the workaround isn't
necessary anywhere else. Fortunately, MSVC has a flag that fixes
the constexpr capture behavior, so let's use that instead.
2020-06-25 13:11:29 +02:00
JosJuice 265e0d00d6 DolphinQt: Add columns with file format details 2020-06-25 12:49:36 +02:00
Tilka 26ed3b318c
Merge pull request #8891 from JosJuice/file-details
Show file format details in game properties
2020-06-25 11:00:49 +01:00
Sepalani 7f3c4b19b9 GCMemcard: Rename unknown field to m_dtv_status 2020-06-24 23:39:59 +04:00
nbouteme b68ab560dc Make SO_POLL complete asynchronously 2020-06-24 12:59:41 +02:00
Techjar 0eb9ac7777 Include SRAM in savestates
This fixes an issue with saving after loading a savestate in Pokemon Colosseum.
2020-06-24 02:42:50 -04:00
Pierre Bourdon cf36877608
Merge pull request #8879 from AdmiralCurtiss/gci-folder-savestates
Keep memory card header and use it to reinitialize GCI folders on mismatch. (Fix savestate with GCI folders)
2020-06-24 08:36:58 +02:00
JosJuice 8c205ef8f3 DolphinQt: Show version number for WIA/RVZ introduction 2020-06-21 21:16:10 +02:00
JosJuice d494e0230c Show file format details in game properties 2020-06-21 20:47:23 +02:00
Tilka 9982251899
Merge pull request #8538 from JosJuice/wia
Add support for the WIA and RVZ disc image formats
2020-06-21 11:40:58 +01:00
JosJuice 660d81a10b RVZ: Bump version number to 1.0 2020-06-21 12:38:03 +02:00
JosJuice 9eb36afeb0 Core: Call Movie::FrameUpdate per field, not per line
Fixes https://bugs.dolphin-emu.org/issues/12066.

I must've only tested the frame counter with an earlier version
of the PR that broke this, not the final version...
2020-06-20 19:32:08 +02:00
Pierre Bourdon 03e0d2c820
Merge pull request #8885 from delroth/spr-thrm
PowerPC: partially implement thermal related SPRs
2020-06-19 03:48:30 +02:00
Sepalani dc2733ce24 Socket: Fix ENOTCONN error code 2020-06-18 22:23:57 +04:00
JosJuice 364ef76ba1 PatchEngine: Attempt to fix crash in IsStackSane
HostIsInstructionRAMAddress uses XCheckTLBFlag::OpcodeNoException,
so we should also use XCheckTLBFlag::OpcodeNoException when reading,
to ensure that we use the IBAT (as opposed to the DBAT) for both.
2020-06-18 11:57:00 +02:00
Pierre Bourdon dd1fc711c7
PowerPC: partially implement thermal related SPRs
Doesn't support triggering interrupts when the thermal threshold is
exceeded, but allows polling for temperature information.

The THRM[123] registers are documented in most PPC datasheets, see e.g.
this PPC750CX one: http://datasheets.chipdb.org/IBM/PowerPC/750/750cx_um3-17-05.pdf
2020-06-18 07:37:44 +02:00
iwubcode a65ef35f1a VideoCommon: Clean freelook camera dirty state when getting the new view 2020-06-17 12:07:40 -05:00
JosJuice 224c6e799d RVZ: Extend GroupEntry 2020-06-17 13:48:45 +02:00
JosJuice f2c38c0e67 RVZ: Make m_rvz a template parameter
Needed for the next commit.
2020-06-17 13:48:45 +02:00
JosJuice ca4e4a6207 WIA/RVZ: Move (de)compression to a different file 2020-06-17 13:48:45 +02:00
JosJuice 2ec608f059 DolphinQt: Set block size to 128 KiB by default 2020-06-17 13:48:45 +02:00
JosJuice 3f753fc87d RVZ: Detect junk data in the same block as a file 2020-06-17 13:48:44 +02:00
JosJuice 4b74993374 RVZ: Store pseudorandom junk data efficiently 2020-06-17 13:48:42 +02:00
JosJuice 1e92b54bf5 WIA/RVZ: Skip some memory allocations when reusing chunks 2020-06-17 13:48:16 +02:00
JosJuice f5ef70fc76 RVZ: Don't store redundant exceptions when chunk size is < 2 MiB 2020-06-17 13:48:16 +02:00
JosJuice b06c50ed2e RVZ: Support chunk sizes between 32 KiB and 2 MiB
WIA doesn't support smaller than 2 MiB.
2020-06-17 13:48:15 +02:00
JosJuice 0d433baeb5 RVZ: Remove PURGE support
PURGE isn't especially useful, while requiring some annoying
special handling in the file format. If you want no compression,
use NONE. If you want fast compression, use Zstandard.
2020-06-17 13:48:15 +02:00
JosJuice 1f7c0b636f RVZ: Add Zstandard as a compression method 2020-06-17 13:48:12 +02:00
JosJuice e2ae2b3b0b Add new file format RVZ based on WIA 2020-06-17 13:47:34 +02:00
JosJuice f21a254042 WIA: Implement multithreaded compression 2020-06-17 13:47:34 +02:00
JosJuice 9dea8169e0 WIA: Write all headers at the start of the file
Gets rid of the need to seek to the end of the file
when opening a file.

The downside of this is that we waste a little space,
since we can't know in advance exactly how much
space the compressed parts of the headers will need.
2020-06-17 13:47:34 +02:00
JosJuice e5b9e1ba1f WIA: Reuse groups when writing
This is useful for the way Dolphin scrubs Wii discs.
The encrypted data is what gets zeroed out, but this
zeroed out data then gets decrypted before being stored,
and the resulting data does not compress well.
However, each block of decrypted scrubbed data is
identical given the same encryption key, and there's
nothing stopping us from making multiple group entries
point to the same offset in the file, so we only have
to store one copy of this data per partition.

For reference, wit zeroes out the decrypted data,
but Dolphin's WIA writer can't do this because it currently
doesn't know which parts of the disc are scrubbed.

This is also useful for things such as storing Datel discs
full of 0x55 blocks (repesenting unreadable blocks)
without compression enabled.
2020-06-17 13:47:34 +02:00
JosJuice 40e46aee57 WIA: Store all-zero data efficiently 2020-06-17 13:47:34 +02:00
JosJuice e8b019ac29 WIA: Implement compression 2020-06-17 13:47:30 +02:00
JosJuice e936c4acd8 WIA: Write hash exceptions 2020-06-17 13:43:54 +02:00
JosJuice 3b8c44fd0e WIA: Decrypt Wii data when writing 2020-06-17 13:43:54 +02:00
JosJuice 115edea34e WIA: Add early support for WIA writing 2020-06-17 13:43:54 +02:00
JosJuice 791e363c9a WIA: Make use of the exception lists 2020-06-17 13:43:54 +02:00
JosJuice 47067f661a WIA: Properly check for overlapping data 2020-06-17 13:43:53 +02:00
JosJuice 04089f24f9 WIA: Implement re-encryption of Wii partition data 2020-06-17 13:43:53 +02:00
JosJuice e3d291a529 WIA: Check the internal WIA hashes 2020-06-17 13:43:53 +02:00
JosJuice 827437c036 WIA: Fix the handling of chunk sizes larger than 2 MiB 2020-06-17 13:43:53 +02:00
JosJuice 0b407228b7 WIA: Add documentation 2020-06-17 13:43:53 +02:00
JosJuice 01a77ae8a1 WIA: Implement caching and partial decompression 2020-06-17 13:43:53 +02:00
JosJuice b59ef81a7e WIA: Implement bzip2, LZMA, and LZMA2 decompression 2020-06-17 13:43:52 +02:00
JosJuice 1579e061a3 WIA: Correctly handle data with size not divisible by chunk size 2020-06-17 13:43:52 +02:00
JosJuice 3c373c8aa8 WIA: Treat groups with size 0 as containing only zeroes 2020-06-17 13:43:52 +02:00
JosJuice 36991e2dde WIA: Implement PURGE decompression 2020-06-17 13:43:52 +02:00
JosJuice 3672bd79f3 WIA: Implement ReadWiiDecrypted 2020-06-17 13:43:52 +02:00
JosJuice 2a5fcc9c25 WIA: Add reading raw data 2020-06-17 13:43:51 +02:00
JosJuice 8da5d0c4fe Add an early version of WIABlobReader
It can currently only read the first 0x80 bytes of a disc image,
which is enough for identifying it but not for doing anything else.
2020-06-17 13:43:51 +02:00
JosJuice b45f2c2ad3 DolphinQt: Disable convert dialog dropdowns when they have one option 2020-06-17 13:23:58 +02:00
JosJuice ec3ea6c1df DolphinQt: Allow converting to same format
Mainly useful for WIA and RVZ, but also has some use for GCZ.
2020-06-17 12:44:16 +02:00
JosJuice 864dcd40b5 Revert "DolphinQt: Disable converting from TGC"
This reverts commit d006a8b52f.
2020-06-17 12:32:40 +02:00
JosJuice 31ecc6c214 Revert "DolphinQt: Actually disable converting from TGC"
This reverts commit c236d89f64.
2020-06-17 12:32:39 +02:00
JosJuice 75d032161f DiscIO: Rework the implementation of TGC reading
Fixes https://bugs.dolphin-emu.org/issues/10654.

To quote the documenation file included with the program tgctogcm:

"TGC's are miniaturized .gcm images with a 32kB header.
The embedded gcm contains some bogus data, namely:
-FST Location (0x424 in gcm)
-DOL Location (0x420 in gcm)
-FST File offsets (all files are offset/spoofed by a certain amount)"

Dolphin has been handling the values at 0x420 and 0x424 by simply
overwriting them with a working value (just like tgctogcm does),
but it has used a different approach for the file offsets in the FST.
Instead of changing the offsets that are stored in the FST, Dolphin
changed where the files actually are placed on the virtual disc.
My hope was that this would make the loading times more accurate to
how they are when running a TGC file as part of a larger disc.
However, there are TGC files where we would need to move files
backwards on the disc in order to do this (this is what issue
10654 is about), so the approach we have been using is flawed.

This change makes Dolphin overwrite offsets in the FST instead, like
tgctogcm does. Other than making Dolphin handle the affected TGC files
correctly, this change also makes it so that unnecessary padding data
isn't written if you use Dolphin to convert a TGC file to an ISO file.
This feature is not actually implemented in Dolphin as of now, but I'm
planning to add it in the near future as part of a larger feature.
2020-06-17 12:32:39 +02:00
Admiral H. Curtiss 476c95900d EXI: When loading a savestate with a mismatching GCI folder memory card, reinizialize it with the header from the savestate to let a game still recognize it as the same card. 2020-06-17 01:44:46 +02:00
Admiral H. Curtiss 8b13e1882a EXI: Store data for regenerating a GCI folder memory card header in EXI_Channel and pass it down to the memory card device. 2020-06-17 01:44:46 +02:00
Admiral H. Curtiss e810d492f2 GCMemcard: Split off HeaderData from Header to have a compact block of data for consistent initialization. 2020-06-17 01:44:46 +02:00
Admiral H. Curtiss cc52558c0e GCMemcard: Assert struct requirements in header. 2020-06-17 01:30:42 +02:00
Admiral H. Curtiss 07bd200596 GCMemcard: Remove dependency on g_SRAM and force the caller to provide the relevant values instead. 2020-06-17 01:30:37 +02:00
Tilka 1f505870a9
Merge pull request #8873 from AdmiralCurtiss/gcmemcard-namespace
GCMemcard: Move into a Memcard namespace.
2020-06-16 19:55:06 +01:00
Tilka de5941d6f8
Merge pull request #8878 from JosJuice/actually-disable-tgc-conversion
DolphinQt: Actually disable converting from TGC
2020-06-16 19:39:40 +01:00
Admiral H. Curtiss 914ebdf0dd GCMemcard: Move from global namespace into a Memcard namespace. 2020-06-16 20:18:39 +02:00
Admiral H. Curtiss 2e1bfe073c GCMemcard: Split out MemoryCardBase into its own header, which is the base class for the raw and folder memory cards and has little to do with the actual memory card data structures. 2020-06-16 20:18:39 +02:00
JosJuice c236d89f64 DolphinQt: Actually disable converting from TGC
When I made PR 8773, I only covered the case where multiple files
are selected, not the more common case where one file is selected.
Oops
2020-06-16 11:21:44 +02:00
Tilka d4418a2b43
Merge pull request #8877 from JosJuice/convert-fail-message
DolphinQt: Make conversion error messages actually show up
2020-06-16 09:59:03 +01:00
JosJuice 20a3119d7a DolphinQt: Make conversion error messages actually show up
I don't know why QErrorMessage doesn't work, but ModalMessageBox
works, so let's use ModalMessageBox.
2020-06-16 10:39:40 +02:00
JosJuice 2b25e1d6b9 DolphinQt: Don't show success message when converting missing file 2020-06-16 10:35:00 +02:00
JosJuice 349cdd5136 DolphinQt: Fix crash on right-clicking multiple games
GetSelectedGames() constructs a new list each time you call it.
2020-06-16 10:33:18 +02:00
Tilka f9f4734237
Merge pull request #8850 from JosJuice/block-size-warning
Show an OSD message when running a disc image with a large block size
2020-06-14 15:03:32 +01:00
Tilka ad85012172
Merge pull request #8843 from Techjar/fastmem-ui
DolphinQt: Add fastmem option to debugger UI
2020-06-14 14:54:32 +01:00
Tilka 9f5e6edc34
Merge pull request #8809 from Ebola16/ABB
Replace some acronyms
2020-06-14 14:30:52 +01:00
Ryan Meredith 2a70d86d55 Replace some acronyms 2020-06-14 08:37:24 -04:00
Tilka cb54fc7543
Merge pull request #8857 from JosJuice/qt-bounding-box-width
DolphinQt: Use QFontMetrics::boundingRect instead of QFontMetrics::width
2020-06-14 12:10:33 +01:00
Tilka 0ef9b998ce
Merge pull request #8658 from orbea/glslang
Externals: Update glslang.
2020-06-13 18:43:53 +01:00
Shawn Hoffman 17498dbb4c DolReader: if data segment goes off end of file, treat it as zero-fill (bss) 2020-06-09 18:00:24 -07:00
JosJuice 87330ae524 DolphinQt: Use QFontMetrics::boundingRect instead of QFontMetrics::width
See https://kdepepo.wordpress.com/2019/08/05/about-deprecation-of-qfontmetricswidth/
2020-06-08 12:32:36 +02:00
CrunchBite 595e1197b6 Rename existing BBA to BBA (TAP) to prepare for new BBA
Based on work by tommy1019
2020-06-07 23:17:28 -04:00
Tillmann Karras d5c00b8909 DSPSymbols: fix off-by-one error 2020-06-08 03:41:45 +01:00
JosJuice 162e3be82b Show an OSD message when running a disc image with a large block size
This is intended to catch WIA files which have been created using
wit's default parameters (40 MiB block size), once the WIA PR is
merged. The check does however also work for GCZ files – not that
I think anyone has a GCZ file with a block size that large.
2020-06-07 14:11:00 +02:00
Tilka 94f317010e
Merge pull request #8847 from Techjar/faster-file-path
Qt/GameListModel: Use absolutePath for file path column
2020-06-06 22:56:38 +01:00
JosJuice d89162c8ad
Merge pull request #8848 from JosJuice/fix-build
Fix build
2020-06-06 15:46:32 +02:00
JosJuice b4584abaa6 Fix build
There was a race condition between two PRs incrementing the
array size. CI didn't catch it because the PR that was merged
last (PR #8824) wasn't rebuilt after the first PR was merged.
2020-06-06 15:09:48 +02:00
JMC47 9f7c72b7eb
Merge pull request #8824 from Techjar/sd-read-only
Add option to disallow SD card writes
2020-06-06 07:02:02 -04:00
Techjar fa208c4acd Qt/GameListModel: Use absolutePath for file path column
canonicalPath is orders of magnitude slower as it has to perform actual
disk I/O to resolve symlinks, which makes sorting by this column
ridiculously slow for large game lists, especially if the games are on
a NAS. We probably don't need that, simply resolving relative paths
should be sufficient.
2020-06-06 05:24:23 -04:00
JosJuice f1ec4fb70a DolphinQt: Enable RTL layout
Fixes https://bugs.dolphin-emu.org/issues/11508
2020-06-02 22:24:49 +02:00
JosJuice 74ae02f979 DolphinQt: Support gettext contexts (Qt disambiguations) 2020-06-02 22:24:49 +02:00
Techjar 5c38727651 DolphinQt: Add fastmem option to debugger UI 2020-06-02 06:18:52 -04:00
Techjar 209308a4d6 Replace usage of std::result_of with std::invoke_result
std::result_of is deprecated in C++17, and removed in C++20. Microsoft
has gone ahead with the removal as of Visual Studio 16.6.0, so before
this change our code is broken there.
2020-06-01 17:33:18 -04:00
Tillmann Karras b0258af530 DSP/Interpreter: fix comments not matching opcode table 2020-05-31 15:21:20 +01:00
Tillmann Karras 198a307db3 DSP/Interpreter: simplify switch 2020-05-31 15:21:20 +01:00
Tillmann Karras 89de40a22e DSP/Interpreter: remove redundant masking 2020-05-31 15:21:19 +01:00
orbea ba2d04b793 Externals: Fix build failures with the newer glslang.
v2: Don't include glslang project wide.
2020-05-30 18:54:21 -07:00
Techjar 52e0294166 Add option to disallow SD card writes 2020-05-28 15:11:37 -04:00
Connor McLaughlin b3c705fa96
Merge pull request #8829 from stenzek/fix-macos-again
Core: Use window instead of surface for ControllerInterface updates
2020-05-28 16:56:13 +10:00
Connor McLaughlin b4e063311e
Merge pull request #8827 from stenzek/adreno-more-like-brokenreno
FramebufferManager: Fix invalid readback of EFB D24S8 depth
2020-05-28 16:55:42 +10:00
Lioncash 86f8768268 VideoCommon/ShaderGenCommon: Make template functions regular functions
These are only ever used with ShaderCode instances and nothing else.
Given that, we can convert these helper functions to expect that type of
object as an argument and remove the need for templates, improving
compiler throughput a marginal amount, as the template instantiation
process doesn't need to be performed.

We can also move the definitions of these functions into the cpp file,
which allows us to remove a few inclusions from the ShaderGenCommon
header. This uncovered a few instances of indirect inclusions being
relied upon in other source files.

One other benefit is this allows changes to be made to the definitions
of the functions without needing to recompile all translation units that
make use of these functions, making change testing a little quicker.

Moving the definitions into the cpp file also allows us to completely
hide DefineOutputMember() from external view, given it's only ever used
inside of GenerateVSOutputMembers().
2020-05-25 21:12:29 -04:00
Lioncash e3506ff4ef VideoCommon/ShaderGenCommon: Convert helper functions over to fmt
A very trivial conversion, this simply converts calls to Write over to
WriteFmt and adjusts the formatting specifiers as necessary.

This also allows the const char* parameters to become std::string_view
instances, allowing for ease of use with other string types.
2020-05-25 21:12:29 -04:00
Markus Wick 68706973d2
Merge pull request #8828 from stenzek/gles-readpixels
FramebufferManager: Copy to color format for depth readbacks on GLES
2020-05-25 08:57:20 +02:00
Tillmann Karras aaa19acbd0 DSP/Interpreter: simplify opcode table by masking 2020-05-24 15:51:52 +01:00
Tillmann Karras e651592ef5 Misc cleanup 2020-05-24 15:51:52 +01:00
Léo Lam a660033e8c
Merge pull request #8792 from leoetlino/video-backend
Migrate video backend setting to the new config system
2020-05-24 15:26:44 +02:00
Léo Lam 1203e626b3
Merge pull request #8800 from sepalani/kd-shutdown
IOS/KD: Implement IOCTL_NWC24_REQUEST_SHUTDOWN
2020-05-24 15:24:51 +02:00
Léo Lam 166633bf27
Merge pull request #8826 from iwubcode/try_parse_any_base
Common / Core: Update StringUtil to allow specifying the base
2020-05-24 15:13:49 +02:00
Léo Lam 7449c7153c
Merge pull request #8830 from JosJuice/delete-empty-rfl-db
CheckNAND: Delete RFL_DB.dat if empty
2020-05-24 15:12:39 +02:00
JosJuice f71ebfe9c1 CheckNAND: Delete RFL_DB.dat if empty 2020-05-24 11:04:23 +02:00
Stenzek ff92357b63 Core: Use window instead of surface for ControllerInterface updates
Fixes crashes with Vulkan on macOS.
2020-05-24 17:39:56 +10:00
Stenzek bf74553878 FramebufferManager: Copy to color format for depth readbacks on GLES
glReadPixels() with depth formats is not supported.

Should fix broken EFB access on GLES.
2020-05-24 16:11:11 +10:00
Stenzek ad373950a2 FramebufferManager: Fix invalid readback of EFB D24S8 depth
Fixes assertion tripping when saving state on Adreno.
2020-05-24 15:36:04 +10:00
iwubcode 85e11cd4ab Common / Core: Update StringUtil to allow specifying the base, default to 0. Fix ActionReplay code to use this instead of prepending '0x' in front 2020-05-23 18:40:10 -05:00
Sepalani 1df1a9abe6 IOS/KD: Implement IOCTL_NWC24_REQUEST_SHUTDOWN 2020-05-22 19:19:36 +04:00
Léo Lam 8df56cb319 Migrate video backend setting to the new config system
Fixes https://bugs.dolphin-emu.org/issues/12087
2020-05-22 16:54:53 +02:00
Léo Lam 393ce529af
Merge pull request #8771 from Leseratte10/master
Add /dev/dolphin interface to allow game to read the REAL product code
2020-05-22 16:49:31 +02:00
JosJuice 6d3b0db041 DolphinQt: Fix freelook description typos
cControls -> controls, axis -> axes, removed leading spaces.
2020-05-20 21:56:04 +02:00
JosJuice cc330afa6b DolphinQt: Fix the panic alert deadlock, Pause on Focus Loss edition
why are there so many ways to trigger this issue
2020-05-18 19:38:56 +02:00
Tilka abe125aea7
Merge pull request #8816 from JosJuice/qfontmetrics-width
DolphinQt: Remove another usage of QFontMetrics::width
2020-05-18 00:19:41 +01:00
JosJuice f87e32840f DolphinQt: Remove another usage of QFontMetrics::width
QFontMetrics::width breaks building with CMake on Windows,
due to a deprecation warning which gets promoted to an error.
2020-05-18 00:39:57 +02:00
Sepalani 10870a0f74 Config: Migrate SSL options to Onion config 2020-05-17 20:37:10 +01:00
JosJuice 2250fbce0e
Merge pull request #8802 from leoetlino/wiiroot-mii-db
WiiRoot: Fix empty files being created when source is missing
2020-05-17 20:11:11 +02:00
Pierre Bourdon 099197b480
Merge pull request #8797 from iwubcode/save-state-CLI
Core: Add support for booting a save state from command line
2020-05-17 17:34:08 +02:00
Pierre Bourdon cea779cc84
Merge pull request #8767 from iwubcode/freelook-camera-type
Expand freelook camera with control options
2020-05-17 17:33:04 +02:00
JosJuice 2137fb7813 Externals: Add zstd
I had to rename Source/Common/Compiler.h because the VS build
confuses it with Externals/zstd/lib/common/compiler.h otherwise.
2020-05-13 20:53:10 +02:00
Sepalani 4bf7c3e051 NetworkWidget: Add Blocking column 2020-05-13 11:53:29 +04:00
Techjar ac9b246809 Core/UICommon: Fix EnableScreenSaver preprocessor directive
The include for X11Utils.h (and by extension Xlib.h) is gated behind
HAVE_XRANDR, as well as the declaration for this function, but its
definition was mistakenly gated behind HAVE_X11. Therefore, if we have
X11 but not Xrandr, the build will fail due to declaration/definition
mismatch and the missing Window type.
2020-05-13 02:11:29 -04:00
Connor McLaughlin 2488e4a587
Merge pull request #8795 from WamWooWam/master
InputCommon: Use the Window handle when initializing DirectInput.
2020-05-10 19:16:15 +10:00
Pierre Bourdon daf1c30a94
GCAdapter: add libusb error logging on reads/writes 2020-05-10 09:26:49 +02:00
Thomas May 76ae1d4070 Apply fixes to all platforms 2020-05-09 22:35:20 +01:00
Léo Lam 47ee5ac284 WiiRoot: Fix empty files being created when source is missing
CopyNandFile must not create empty files on the destination filesystem
if the source file doesn't exist.

Otherwise, this can lead to an empty Mii database being created in the
session Wii root if there's no database in the configured Wii root and
netplay or Movie is used -- that database would then be copied back to
the configured root, which causes games like MKW to complain about
corrupted Mii data even when the player has stopped using netplay.

This commit also simplifies CreateFullPath usage.
There's no need to manually extract the directory from the path,
FS::CreateFullPath does it automatically just like File::CreateFullPath
2020-05-09 16:47:45 +02:00
iwubcode cdf5490d56 Core: Add support for specifying a command line option to boot the game into a save-state 2020-05-06 22:10:30 -05:00
Markus Wick 74b2410d7e
Merge pull request #8760 from JosJuice/multithreaded-compress
DiscIO: Implement multithreaded compression
2020-05-06 15:25:30 +02:00
JosJuice b93bbbf2e5 DiscIO: Implement multithreaded compression 2020-05-06 14:18:51 +02:00
Thomas May 78e8ccea6d Update ControllerInterface.cpp 2020-05-06 01:30:49 +01:00
Jun Su bb75050f68 Jit: fix warning -Winvalid-offsetof
Remove the warning:
warning: offsetof within non-standard-layout type ‘JitBlock’ is conditionally-supported
JitBlock contains non-trival types now. Split the fields with trival
types that needs to be access from JIT code into JitBlockData structure.
2020-05-04 18:26:56 +02:00
Léo Lam 7c0ef725ab
Merge pull request #8744 from cristian64/save_restore_netplay_browser_settings
DolphinQt: Saving and restoring NetPlay Session Browser dialog's settings.
2020-05-04 00:50:26 +02:00
Léo Lam c53ecdd689
Merge pull request #8686 from sepalani/thread-tab
Debugger: Add a Thread widget
2020-05-04 00:50:10 +02:00
Léo Lam 947d6732a8
Merge pull request #8712 from sepalani/console-type
Boot: Add ConsoleType enum class
2020-05-03 23:10:44 +02:00
Mat M 9e2560b825
Merge pull request #8790 from leoetlino/ras-syndrome
Remove redundant "Emulation" from "DSP HLE Emulation"
2020-05-03 16:47:05 -04:00
iwubcode aed7319ef8 DolphinQt: Expose freelook camera control to UI 2020-05-03 13:34:13 -05:00
iwubcode e125c61d47 VideoCommon: remove VertexShaderManager functions instead preferring the direct freelook camera methods 2020-05-03 13:34:13 -05:00
iwubcode 5bd7cc8bac Core: Add freelook camera control type setting 2020-05-03 13:34:13 -05:00
iwubcode 6e7d1e0e71 VideoCommon: Add Free Look camera with separate modes 2020-05-03 13:31:47 -05:00
Sepalani bf12bb3d43 Boot: Add ConsoleType enum class 2020-05-03 20:55:09 +04:00
Sepalani 39d34e133f Debugger: Add a Thread widget
DebugInterface: Add GetThreads

WatchWidget: Update widget on AddWatch
2020-05-03 20:48:30 +04:00
Léo Lam 9ffa72ad1f
Merge pull request #8691 from howard0su/warning_wiimote
WiimoteEmu: Cleanup warnings of -Wparentheses
2020-05-03 18:31:57 +02:00
Léo Lam 297bbceadf Remove redundant "Emulation" from "DSP HLE Emulation"
HLE stands for "high-level emulation", so "DSP HLE Emulation" would
mean "DSP High-Level Emulation Emulation"
2020-05-03 17:54:05 +02:00
Christian Aguilera 16f0864a4f DolphinQt: Saving and restoring NetPlay Session Browser dialog's settings. 2020-05-03 17:45:52 +02:00
Léo Lam 907b1302b0
Merge pull request #8775 from leoetlino/rect
MathUtil: Fix Rectangle::GetWidth/Height for unsigned types
2020-05-03 15:41:38 +02:00
Léo Lam 920cf38889
Merge pull request #8757 from sepalani/so-cleanup
IOS/KD: Cleanup sockets on IOCTL_NWC24_CLEANUP_SOCKET
2020-05-03 15:41:14 +02:00
Léo Lam 1b26929119
Merge pull request #8789 from JosJuice/windows-cmake-errors
Fix Windows CMake build errors
2020-05-03 15:33:58 +02:00
Léo Lam 07ab79db64 MathUtil: Fix Rectangle::GetWidth/Height for unsigned types
`std::abs(x - y)` where x and y are unsigned integers fails to compile
with an "call of overloaded 'abs(unsigned int)' is ambiguous" error
on GCC, and even if it did compile, that expression still wouldn't
give the correct result since `x - y` is unsigned.
2020-05-03 14:41:58 +02:00
Léo Lam 0ab9475f8e
Merge pull request #8786 from JosJuice/user-style-not-path
DolphinQt: Store name of user style, not path
2020-05-03 14:11:55 +02:00
JosJuice bf57abc0d5 Fix Windows CMake build errors
Lambda expressions with uncaptured constants were leading to errors,
and there were also some warnings about deprecated functions
(QFontMetrics::width and inet_ntoa).
2020-05-03 14:10:24 +02:00
Léo Lam 90ba73c6c2
Merge pull request #8787 from leoetlino/config-config
Remove redundant Config prefix from ConfigInfo/ConfigLocation
2020-05-03 14:07:41 +02:00
Florian Bach f27278f7f4 Add /dev/dolphin interface to allow game to read the REAL product code 2020-05-03 09:46:01 +02:00
Léo Lam 19da101164 Remove redundant Config prefix from ConfigInfo/ConfigLocation
Both structs are already in the Config namespace.
2020-05-02 14:40:14 +02:00
JosJuice aab694e6b5 DolphinQt: Store name of user style, not path
This makes user styles not break when for instance
moving a portable.txt install between different folders.
2020-05-02 02:13:01 +02:00
Léo Lam 47d1dec723
Merge pull request #8783 from JosJuice/i18n-comments
DolphinQt: Add some i18n comments for recently added strings
2020-05-02 02:12:27 +02:00
Sepalani 9932a02565 IOS/KD: Cleanup sockets on IOCTL_NWC24_CLEANUP_SOCKET 2020-05-01 16:33:42 +04:00
JosJuice 423241b8a2 DolphinQt: Reword memory override description 2020-05-01 14:11:08 +02:00
JosJuice b7db7ebbc7 Don't assume fixed width for "Emulated memory size mismatch!" message
Panic alerts don't use fixed width fonts, and translators are
unlikely to preserve the exact spacing unless they are given
specific instructions to do so and are willing to fight against
the Transifex interface a bit.
2020-05-01 13:40:34 +02:00
JosJuice 492bb5ccee DolphinQt: Add some i18n comments for recently added strings 2020-05-01 13:22:54 +02:00
Jun Su 312a3ba8c8 WiimoteEmu: Cleanup warnings of -Wparentheses
Add parentheses around operator ^.
2020-04-30 08:07:02 +08:00
degasus 9fd1385733 Externals: Fix OpenAL include directory. 2020-04-29 13:07:51 +02:00
degasus fc0df37d94 Fix windows build system. 2020-04-29 12:56:52 +02:00
degasus 990acbb17d Externals: Fix ed25519 include path. 2020-04-29 12:55:42 +02:00
degasus f8f592c345 Externals: Update minizip search path. 2020-04-29 12:41:36 +02:00
degasus ae2d567f59 Externals: Fix include path for picojson and discord 2020-04-29 11:45:59 +02:00
degasus 239cde8aea Externals: Alter the soundtouch include directory.
We must not provide the /Externals directory as global include directory.
Here, this yield a crash because of external minizip header and system library mismatch.

Soundtouch itself recormends to include it with <SoundTouch.h> and -I/usr/include/soundtouch, so this should fit better.
2020-04-29 11:30:26 +02:00
Pierre Bourdon b7db359081
XFMemory: SETPOSMTXINFO should be SETPOSTMTXINFO
It actually maps to postMtxInfo, not posMtxInfo (which isn't a thing).
This is especially confusing because there *are* position matrices (as
opposed to post-transform matrices).
2020-04-29 05:26:02 +02:00
Mat M 2a7f150561
Merge pull request #8774 from JosJuice/volumeverifier-ios9
VolumeVerifier: Treat IOS9 as always present
2020-04-28 21:24:44 -04:00
Admiral H. Curtiss e921cbe57c GCMemcardManager: Add GUI to create new memory card. 2020-04-28 23:59:15 +02:00
JosJuice 5b722b775a VolumeVerifier: Treat IOS9 as always present
Fixes a false positive for Mario Party 8.
2020-04-28 23:40:01 +02:00
Léo Lam 4b00ddf9aa
Merge pull request #8722 from Minty-Meeo/master
Configurable MEM1 and MEM2 sizes at runtime via Dolphin.ini
2020-04-28 22:11:12 +02:00
Minty-Meeo cc858c63b8 Configurable MEM1 and MEM2 sizes at runtime via Dolphin.ini
Changed several enums from Memmap.h to be static vars and implemented Get functions to query them. This seems to have boosted speed a bit in some titles? The new variables and some previously statically initialized items are now initialized via Memory::Init() and the new AddressSpace::Init(). s_ram_size_real and the new s_exram_size_real in particular are initialized from new OnionConfig values "MAIN_MEM1_SIZE" and "MAIN_MEM2_SIZE", only if "MAIN_RAM_OVERRIDE_ENABLE" is true.

GUI features have been added to Config > Advanced to adjust the new OnionConfig values.

A check has been added to State::doState to ensure savestates with memory configurations different from the current settings aren't loaded. The STATE_VERSION is now 115.

FIFO Files have been updated from version 4 to version 5, now including the MEM1 and MEM2 sizes from the time of DFF creation. FIFO Logs not using the new features (OnionConfig MAIN_RAM_OVERRIDE_ENABLE is false) are still backwards compatible. FIFO Logs that do use the new features have a MIN_LOADER_VERSION of 5. Thanks to the order of function calls, FIFO logs are able to automatically configure the new OnionConfig settings to match what is needed. This is a bit hacky, though, so I also threw in a failsafe for if the conditions that allow this to work ever go away.

I took the liberty of adding a log message to explain why the core fails to initialize if the MIN_LOADER_VERSION is too great.

Some IOS code has had the function "RAMOverrideForIOSMemoryValues" appended to it to recalculate IOS Memory Values from retail IOSes/apploaders to fit the extended memory sizes. Worry not, if MAIN_RAM_OVERRIDE_ENABLE is false, this function does absolutely nothing.

A hotfix in DolphinQt/MenuBar.cpp has been implemented for RAM Override.
2020-04-28 12:10:50 -05:00
JosJuice d006a8b52f DolphinQt: Disable converting from TGC
This should not be exposed to users before the merge of PR #8644.
(PR #8738 was unintentionally merged before PR #8644.)
2020-04-28 18:49:52 +02:00
JMC47 116cef572b
Merge pull request #8738 from JosJuice/convert-dialog
Replace the compress/uncompress actions with a convert dialog
2020-04-28 12:37:17 -04:00
JMC47 165c2e3017
Merge pull request #8772 from JosJuice/create-backup-dir
Core: Call CreateFullPath before using Backup directory
2020-04-28 12:35:05 -04:00
JosJuice 95a0897491 Core: Call CreateFullPath before using Backup directory 2020-04-28 17:53:12 +02:00
Lioncash ee200d09eb Jit64/Jit64_Tables: Construct tables at compile-time
Utilizing constexpr, we can eliminate the need to construct the tables
at runtime and just do all the work at compile-time. Making for less
moving parts overall.

The general structure is more or less the same, however rather than one
single initialization function, each table is built off an immediately
executed lambda function. This is nice, since it narrows the scope of
the table building logic down to the tables that actually need it.
2020-04-28 17:12:24 +02:00
Lioncash 19115c84dd DolphinQt: Use qOverload where applicable
Provides the same behvaior, but in a much more concise manner.
2020-04-28 16:54:19 +02:00
3t13nn3 8288bdce03 Fix Hotkey Controller Profile display with boxes for each Wiimote 2020-04-28 15:55:53 +02:00
Léo Lam 93abbc66aa
Merge pull request #8688 from howard0su/cleanup_strncpy
Remove warning of -Wstringop-truncation
2020-04-28 14:28:30 +02:00
Léo Lam 7390767008
Merge pull request #8668 from sepalani/rso-autodetect
RSO: Auto-detect RSO location in RAM
2020-04-28 14:27:13 +02:00
Léo Lam 0fe4985f8d
Merge pull request #8689 from howard0su/cleanup_sign
Remove warnings of -Wsign-compare
2020-04-28 13:36:21 +02:00
Jun Su f3d7b82f83 Cleanup warnings of -Wswitch
Add default branch to the switch-case.
2020-04-28 13:16:30 +02:00
Léo Lam 586af0a55e
Merge pull request #8695 from howard0su/warning_hw
HW: cleanup warnings of -Wtype-limits
2020-04-28 13:13:22 +02:00
Léo Lam 8f578fd2b9
Merge pull request #8704 from JosJuice/setting-txt-output-null
SettingsHandler: Don't output null bytes
2020-04-28 12:02:39 +02:00
Sepalani 5e33cd48da Debugger: Add a Network widget
Display socket table, SSL context and options
2020-04-27 21:47:00 +04:00
Léo Lam 88ae4c7914
Merge pull request #8729 from JosJuice/android-touch-ir-default
Android: Use touch emulation of IR by default
2020-04-27 17:56:01 +02:00
Léo Lam 5909d13236
Merge pull request #8710 from Ebola16/QTDP
Qt: Display default Paths
2020-04-27 17:49:31 +02:00
Léo Lam e6351e1d4b
Merge pull request #8719 from CookiePLMonster/dolby-pro-logic-quality-fixup-ii
AudioPane: Do not enable DPL II quality slider with HLE audio on init
2020-04-27 17:11:56 +02:00
JosJuice 18a4afb053 Android: Use touch emulation of IR by default
While having motion control emulation of IR enabled by default
makes sense in situations like using a DualShock 4 on a PC,
Android has the additional option of touch emulation of IR
which seems to be better liked, and the default value which
was chosen with PC in mind was carried over to Android
without any particular consideration. This change disables
motion control emulation of IR by default on Android only.
2020-04-27 17:02:53 +02:00
Léo Lam 1ca682e6a1
Merge pull request #8723 from seanyeh/fix-confirm-dialog-enter
Qt/GameList: Use KeyPress instead of KeyRelease
2020-04-27 17:00:58 +02:00
Léo Lam 71f409dac4
Merge pull request #8726 from xperia64/dns_improvements
Respect Core::WantsDeterminism for DNS servers on Linux
2020-04-27 16:43:24 +02:00
Léo Lam 9d44af4c31
Merge pull request #8696 from howard0su/cleanup_shadow
Cleanup warnings of -Wmissing-declarations
2020-04-27 15:33:01 +02:00
Léo Lam bab04155b6
Merge pull request #8745 from AdmiralCurtiss/savestate-load-callback-qt
Qt/Debugger: Refresh on savestate load.
2020-04-27 15:29:55 +02:00
Léo Lam 75e79ece73
Merge pull request #8751 from jordan-woyak/point-fix
WiimoteEmu: Apply "Tilt" and "Point" rotations separately for proper tilted pointing.
2020-04-27 14:55:19 +02:00
JosJuice bacf0d629d VolumeVerifier: Show desync warning for dual layer discs too 2020-04-25 19:47:08 +02:00
JosJuice 99c8ce9d8d DolphinQt: Add info about formats in convert dialog 2020-04-24 15:11:20 +02:00
JosJuice 466b2d7202 DolphinQt: Make block size configurable in convert dialog 2020-04-24 15:11:20 +02:00
JosJuice acd00723ad DolphinQt: Make scrubbing configurable in convert dialog 2020-04-24 15:11:20 +02:00
JosJuice 6ffcbcee70 DiscIO: Move scrubbing code out of ConvertToGCZ
This way, scrubbing can also be performed when converting
to other formats.
2020-04-24 15:11:20 +02:00
JosJuice 04c7892b93 DiscIO: Add GameCube disc scrubbing support
The code was actually already rather well adapted for this.
We more or less just have to skip ParseDisc and run
ParsePartitionData directly. This required the PartitionHeader
struct to be removed (which wasn't that useful anyway).
2020-04-24 15:10:36 +02:00
JosJuice cefc2a7baa DiscIO: Fix edge case where blocks could get scrubbed accidentally
If we start 31 KiB into a 32 KiB block and want to mark 2 KiB
of data as used, we need to mark 2 blocks as used, not just 1.

This problem is avoided when calling MarkAsUsed from
MarkAsUsedE, since MarkAsUsedE aligns to 32 KiB on its own.
Most calls to MarkAsUsed are from MarkAsUsedE, which is why
this hasn't been a noticeable problem in the past.
2020-04-24 15:10:36 +02:00
JosJuice dae2c14f7f DolphinQt: Turn the compress/decompress action into a dialog 2020-04-24 15:10:35 +02:00
JosJuice 42f6913bcc Move DiscIO::ConvertToPlain to FileBlob.cpp
There is no longer anything GCZ specific about it.
2020-04-24 15:10:35 +02:00
JosJuice 8a9597e32e DiscIO: Allow converting from formats other than ISO and GCZ
The constant DESIRED_BUFFER_SIZE was determined by multiplying the
old hardcoded value 32 with the default GCZ block size 16 KiB.
Not sure if it actually is the best value, but it seems fine.
2020-04-24 15:10:35 +02:00
JosJuice 432f342bc8 DiscIO: Use a struct for Wii hashes 2020-04-24 14:44:29 +02:00
JosJuice da9e0fb598 DiscIO: Parallelize the re-encryption code 2020-04-24 14:44:26 +02:00
JosJuice 319c508978 DiscIO: Implement re-encryption of Wii partition data 2020-04-24 14:24:12 +02:00
JosJuice a4c7100bcc DiscIO: Use partition data offset for ReadWiiDecrypted parameter
Instead of the partition offset (which is usually 0x20000 less).
2020-04-24 14:16:55 +02:00
Markus Wick 7e94d6ed37
Merge pull request #8740 from JosJuice/fix-decompress
DiscIO: Fix decompressing writing the wrong number of bytes sometimes
2020-04-24 10:42:46 +02:00
Markus Wick 703f7d4fc0
Merge pull request #8755 from Sintendo/jit64intopts
Jit64: More addx and subfx optimizations
2020-04-24 07:40:07 +02:00
Sintendo 523954e03a Analytics: Report correct quirk for mismatched xf/bp colors
Looks like a copy-paste error. The quirk for mismatched xf/bp texgens
was used twice.
2020-04-24 02:22:51 +02:00