Commit graph

21866 commits

Author SHA1 Message Date
Pierre Bourdon
91d9190e69
Merge pull request #7442 from shuffle2/fix-sram
mx sram: fix checksum calc; use Common::BigEndianValue for rtc field.
2018-10-01 22:08:42 +02:00
Pierre Bourdon
94c70bf884
Merge pull request #7441 from JosJuice/fix-read-title-id
Fix reading title IDs of Wii discs
2018-10-01 22:07:03 +02:00
Shawn Hoffman
2a0f022da3 mx sram: replace union-with-byte-array with operator[] to make gcc happy. 2018-10-01 00:00:20 -07:00
Shawn Hoffman
d300f3bbbc exi ipl: quiet a gcc warning 2018-09-30 18:22:35 -07:00
Shawn Hoffman
2cd96aa5bb mx sram: fix checksum calc; use Common::BigEndianValue for rtc field. 2018-09-30 17:58:37 -07:00
JosJuice
0bcb9923f8 Fix reading title IDs of Wii discs
Partial revert of a1db82a.
Should fix https://bugs.dolphin-emu.org/issues/11404.
2018-09-30 17:46:20 +02:00
Shawn Hoffman
d594d4f12f Fix sram accesses. 2018-09-29 22:52:29 -07:00
Sintendo
d8953dbe57 x64Emitter: nit, use helper method in CMP_or_TEST 2018-09-29 09:52:54 +02:00
Sintendo
ef94fca504 DSPJit: various micro-optimizations 2018-09-29 09:52:30 +02:00
Sintendo
e3b424facd EmuCodeBlock: remove redundant instructions
Their result is overwritten by a subsequent MOV.
2018-09-28 23:58:16 +02:00
MerryMage
89a0b0de32 Jit64AsmCommon: Reduce branches in fast-path and inline most behavior
The only behavior requires a function call is denormal behaviour. We also fix fpscr exception raising.
2018-09-28 18:11:30 +01:00
Mat M
a1db82a72e
Merge pull request #7411 from JosJuice/wii-metadata-unencrypted
Read Wii disc metadata from the unencrypted header
2018-09-28 00:44:25 -04:00
Mat M
a5c74cd6d1
Merge pull request #7382 from stenzek/drop-vk-nv-glsl
Vulkan: Drop usage of VK_NV_glsl extension
2018-09-27 21:56:22 -04:00
Mat M
3cee297c87
Merge pull request #7331 from booto/si_buffer
SI: Add 16bit accessors for SI IO buffer
2018-09-27 21:50:50 -04:00
Mat M
d0b2f04539
Merge pull request #7421 from JosJuice/qt-sd-hotplug
DolphinQt: Allow inserting/ejecting SD cards during emulation
2018-09-27 21:48:16 -04:00
Mat M
62b88f890d
Merge pull request #7422 from JosJuice/scrub-unencrypted
Fix scrubbing unencrypted Wii disc images
2018-09-27 21:47:49 -04:00
Roland Munsil
54bd16e753 Fix typo causing "Remove from Watch" in Cheat Manager to crash Dolphin 2018-09-24 23:01:24 -05:00
Roland Munsil
04969f94b6 Fix some Cheat Manager comparisons being wrong 2018-09-24 21:34:48 -05:00
Markus Wick
85961f996e
Merge pull request #7400 from zackhow/phone-rumble
Android: Add rumble for phone
2018-09-21 17:05:46 +02:00
JosJuice
facaeb615e Fix scrubbing unencrypted Wii disc images
Untested with unencrypted Wii disc images, because I don't have any.
I tested that normal Wii disc images still work, though.
2018-09-20 23:23:10 +02:00
JosJuice
ce3e0fc091 Refactor DiscScrubber::MarkAsUsedE 2018-09-20 23:23:06 +02:00
JosJuice
5db27b8e7e DolphinQt: Allow inserting/ejecting SD cards during emulation
This is possible on real hardware and was possible in DolphinWX.
2018-09-20 18:41:37 +02:00
Sintendo
53a947749a x64Emitter: short MOV for 64bit immediates (2)
Prior to this commit, the emitter would unconditionally emit a 10-byte
instruction known as MOVABS when loading a 64-bit immediate to a
register.

0:  48 b8 ef be ad de 00    movabs rax,0xdeadbeef
7:  00 00 00

With this change, it will instead rely on the fact that on x64 writes to
32-bit registers are automatically zero extended to 64-bits, allowing
us to emit a 5 or 6-bytes instruction with the same effect for certain
immediates.

0:  b8 ef be ad de          mov    eax,0xdeadbeef
2018-09-16 19:52:03 +02:00
Léo Lam
e90bd035cb
Merge pull request #7262 from lioncash/force
ControlGroup: Return state data via GetState() by value where applicable
2018-09-16 16:04:21 +02:00
Léo Lam
40b7fab235
Merge pull request #7261 from lioncash/static
WiimoteReal: Make functions internally linked where applicable
2018-09-16 15:30:25 +02:00
Léo Lam
3ecc4ed1c4
Merge pull request #7390 from Techjar/qt-save-grid-scale
Qt/GameList: Make grid view scale persistent
2018-09-16 15:21:00 +02:00
Léo Lam
c49eb2d249
Merge pull request #7398 from Techjar/emu-speed-skip-vsync
VideoCommon: Skip vsync if configured emulation speed is not 100%
2018-09-16 15:19:45 +02:00
Léo Lam
80c402e1ad
Merge pull request #7161 from lioncash/disasm
CMake: Only link in Bochs on x86 platforms
2018-09-16 15:16:00 +02:00
Léo Lam
3a16c0d47e
Merge pull request #7401 from JosJuice/translation-fixes
Translation fixes
2018-09-16 15:09:26 +02:00
Pierre Bourdon
e3a52b3361
Merge pull request #7415 from JosJuice/korean-shop-channel-check
Include the Korean Wii Shop Channel when checking default credentials
2018-09-15 17:37:35 +02:00
JosJuice
b5bb445f21 Include the Korean Wii Shop Channel when checking default credentials 2018-09-15 17:28:23 +02:00
Admiral H. Curtiss
f2fa63783b Do not consider XFB copies for invalidating textures when loading a new texture.
This fixes severe image flickering in some cutscenes of Twin Snakes. The game appears to sometimes load a previously made XFB copy as a texture before it is actually rendered to the screen, which we took as an invitation to invalidate the XFB copy.
2018-09-15 13:56:45 +02:00
Sintendo
575f1b309a x64Emitter: short MOV for 64bit immediates (1)
Prior to this commit, the emitter would unconditionally emit a 10-byte
instruction known as MOVABS when loading a 64-bit immediate to a
register.

0:  48 b8 ef be ad de ff    movabs rax,0xffffffffdeadbeef
7:  ff ff ff

With this change, it will instead emit a 7-byte instruction when it is
possible to express the 64-bit immediate using a signed 32-bit value.

0:  48 c7 c0 ef be ad de    mov    rax,0xffffffffdeadbeef
2018-09-14 23:11:26 +02:00
Admiral H. Curtiss
d97bc0d359 Correctly adjust the rendered XFB region at non-native internal resolutions when XFB was loaded from console RAM.
If, for whatever reason, the XFB has to be loaded from console memory, it's possible that the texture is returned at native resolution instead of EFB-scaled resolution. In this case, our xfb_rect.right adjustment must also happen at native resolution instead of scaled resolution.
2018-09-13 19:39:49 +02:00
JosJuice
cec601f1fb Read Wii disc metadata from the unencrypted header
The header of a Wii disc can be read from two places: The
unencrypted area at the beginning of the disc, or the beginning of
the game partition. The two copies are usually identical (except
for 0x60 and 0x61), but there are exceptions. For most of Dolphin's
history, we have been reading from the header inside the game
partition when getting metadata. This was however not the case
starting with 4.0-4901 and ending with 5.0-3762. This commit once
again makes Dolphin read metadata from the unencrypted header,
because of the following reasons that I recently was informed about:

- The "pink fish" disc has the game ID 410E01 in the unencrypted
  header but the placeholder game ID RELSAB in the partition header.
- The revisions of some games differ between the two headers,
  with the unencrypted one making more sense.
  (See https://bugs.dolphin-emu.org/issues/11387)

For better or worse, this also means that sloppily hacked games where
only the game ID in the unencrypted header has been changed now will
use that modified game ID. And unlike with the partition header,
there is no signing or hashing that can tell us whether the
unencrypted header has been modified by someone other than Nintendo.
2018-09-12 13:41:30 +02:00
booto
3825e2e5ff SI: Add 16bit accessors for SI IO buffer
Dolphin has traditionally treated the SI IO buffer (128 bytes) as a set of
32 little endian u32s. This works out fine if you only ever read/write
using aligned 32bit accesses. Different sized accesses or misaligned reads
will mess it up. Byte swapping reads/writes will fix this up, but all the
SI devices that use the SI IO buffer need to be adjusted.
2018-09-11 22:19:13 -04:00
JosJuice
fb6b31bba8 Re-add i18n comments that were lost in the DolphinWX removal 2018-09-08 15:58:15 +02:00
JosJuice
e0cb56edb9 Reword some translatable strings
We've decided to use the term "Usage Statistics Reporting"
instead of "Analytics" in user-facing strings.
2018-09-08 15:19:01 +02:00
JosJuice
5f35edf505 Remove unused function and translatable strings 2018-09-08 15:18:31 +02:00
JosJuice
a4f950ee86 Fix a string not getting translated 2018-09-08 15:16:39 +02:00
zackhow
126ff8dc5f Android: Add rumble for phone
This currently only supports using the internal vibrate on a phone for rumble.
2018-09-07 08:54:03 -04:00
Techjar
e9046f8eec VideoCommon: Skip vsync if configured emulation speed is not 100%
It doesn't make much sense to try to vsync at weird framerates, and
vsync actually causes the speed setting to not work as expected.
2018-09-05 05:40:22 -04:00
Techjar
bb598529be Qt/GameList: Make grid view scale persistent 2018-09-02 18:22:44 -04:00
Pierre Bourdon
95c2a92f26
Revert "ShaderGen: Drop broken fragment shader index workaround for Vulkan" 2018-09-01 05:32:56 +02:00
spycrab
392df8a11d GL/TextureCache: Clean up inline shader code 2018-08-30 16:05:39 +02:00
MerryMage
9753f21cc7 Arm64Emitter: Remove unsequenced expressions
Incrementing `it` twice between sequence points is undefined behavior.
2018-08-30 07:38:37 +01:00
Stenzek
448e19629d Vulkan: Drop usage of VK_NV_glsl extension
It's not providing a large performance improvement anymore, after the
more recent drivers introduced a new shader compiler.
2018-08-29 13:12:19 +10:00
Stenzek
3ad7812b53 ShaderGen: Drop broken fragment shader index workaround for Vulkan
AMD appears to have since fixed this in their driver, and it makes
shadergen ever so slightly less messy.
2018-08-28 23:39:47 +10:00
JosJuice
fbdc239199 Fix reducing log paths when building with MSVC
The LogManager code had trouble detecting the "/Source/Core/" substring
for two reasons, neither of which seemed to happen a few years ago:

1. __FILE__ is in lowercase on MSVC
2. __FILE__ uses backslash as the directory separator on MSVC

Fixes https://bugs.dolphin-emu.org/issues/11366
2018-08-28 11:48:43 +02:00
JosJuice
762747f8c1
Merge pull request #7377 from Techjar/more-frameskip-junk
Core/Core: Remove another leftover part of frameskip
2018-08-28 08:29:43 +02:00
Techjar
c5ae721eca Core/Core: Remove another leftover part of frameskip 2018-08-28 02:22:05 -04:00
Pierre Bourdon
2033d660d2
Merge pull request #7376 from lioncash/sfml
Externals: Update SFML to 2.5.0
2018-08-28 02:53:05 +02:00
Lioncash
d10a0b440f SFMLHelper: Simplify 64-bit packet reading function and remove 64-bit write function
Now that SFML's packet class can properly handle 64-bit values, we don't
need a helper function just to write values to the packets.
2018-08-27 17:38:07 -04:00
Lioncash
e6a4116bf2 Common/SFMLHelper: Remove unused forward declaration
BigEndianValue isn't used in either the header or SFMLHelper.cpp, so it
can be removed.
2018-08-27 16:48:12 -04:00
Pierre Bourdon
4c75331d5d
Merge pull request #7374 from lioncash/iowin
IOWin: Make functions internally linked where applicable
2018-08-27 22:13:24 +02:00
Lioncash
8753321841 IOWin: Use anonymous namespaces where applicable
Several functions (and one variable) were being given external linkage.
Instead, relocate them all to anonymous namespaces to make them
internally linked.
2018-08-27 16:10:07 -04:00
Lioncash
d40022d6d0 JitInterface: Move explanatory comment of ClearSafe() to the function's prototype
Puts the comment in the header where it's more likely to be seen
initially. We can also remove the TODO, given doing nothing or returning
an error is what is generally done for the JIT interface if the JIT
instance isn't valid.
2018-08-27 13:04:05 -04:00
Lioncash
36b24bf7a0 PowerPC: Remove Profiler.cpp
With 7aa305ea35 merged, all that remains
within Profiler.cpp is an unused function that just forwards to the
equivalent function within JitInterface. Given that, we can just remove
the source file.
2018-08-27 12:13:39 -04:00
Lioncash
7aa305ea35 Profiler: Migrate global g_ProfileBlocks boolean to JitOptions
This global belongs in the JitOptions structure, as it's a conditional
setting (A.K.A. option) that changes the behavior of what the JIT does.

Plus it keeps the scope of the variable constrained to the general area
it's intended to be used and nothing further.
2018-08-27 11:30:19 -04:00
Pierre Bourdon
88a91562b5
Merge pull request #7370 from lioncash/constness
JitArm64/Jit: Don't cast away const within DumpCode()
2018-08-27 16:31:15 +02:00
Lioncash
cc2ef5a2c3 JitArm64/Jit: Don't cast away const within DumpCode()
swap32() has a const u8* overload that swaps the data being pointed to as
if it were a 32-bit word. We can just use that instead. It gets rid of
undefined behavior, as we're not type punning a pointer and dereferencing it,
and gets rid of the need to cast entirely.
2018-08-27 10:28:11 -04:00
Lioncash
e81408588f JitCommon/JitCache: Make JitBlock's checkedEntry and normalEntry members non-const pointers
In both cases of the x64 and AArch64 JITs, these would have const casted
away from them, followed by them being placed within an emitter and
having breakpoint instructions written in them.

In this case, we shouldn't be using const period if we're writing to the
emitted data.
2018-08-27 10:23:22 -04:00
Pierre Bourdon
25898cfa55
Merge pull request #7368 from lioncash/const-cast
Arm64Emitter: Make the Align* functions return a non-const data pointer
2018-08-27 15:54:05 +02:00
Lioncash
208be26bb4 Arm64Emitter: Make the Align* functions return a non-const data pointer
Similar in nature to e28d063539 in which
this same change was applied to the x64 emitter.

There's no real requirement to make this const, and this should also
be decided by the calling code, considering we had places that would
simply cast away the const and carry on
2018-08-27 09:44:38 -04:00
Pierre Bourdon
6a22f1b3e0
Merge pull request #7253 from booto/fifo_reg
CP: some bits in some of the HI registers cannot be set
2018-08-27 14:56:12 +02:00
Pierre Bourdon
b2b72bd3ce
Merge pull request #7272 from Techjar/xkb-mouse-button-fix
InputCommon/XInput2: Increase mouse buttons to 32
2018-08-27 14:52:37 +02:00
Techjar
311d0442de InputCommon/XInput2: Increase mouse buttons to 32
Xlib supports many mouse buttons, though there are 9 standard buttons, and they aren't arranged like other mouse APIs. Using only 5 buttons was preventing the use of buttons besides left/right/middle click and the scroll wheel. Here's what all the standard buttons are:
1. left button
2. middle button (pressing the scroll wheel)
3. right button
4. turn scroll wheel up
5. turn scroll wheel down
6. push scroll wheel left
7. push scroll wheel right
8. 4th button (aka browser backward button)
9. 5th button (aka browser forward button)

The remaining button indices are non-standard and device-specific, and technically far more than 32 are supported, but this seems like a reasonable limit to avoid cluttering the list with tons of useless mouse buttons. What mouse has more than 32 buttons anyways?
2018-08-27 08:47:32 -04:00
Techjar
f1bc17ab9e Qt/MD5Dialog: Fix pressing enter on NetPlay window causing dialog to close 2018-08-27 08:39:39 -04:00
Pierre Bourdon
ea26ccbbe1
Merge pull request #7318 from VinDuv/rename-master-log
LogManager: Change Master Log short name to fix log configuration loading
2018-08-27 13:36:04 +02:00
Pierre Bourdon
62928de547
Merge pull request #7357 from Techjar/qt-memcard-manager-select-button
Qt/GCMemcardManager: Make slot and file selection more intuitive
2018-08-27 13:35:38 +02:00
Pierre Bourdon
af2e69dfdc
Merge pull request #7366 from Techjar/discord-pics-popular
DiscordPresence: Add popular games to artwork list
2018-08-27 12:40:57 +02:00
Techjar
80c4e77735 DiscordPresence: Add popular games to artwork list 2018-08-27 06:10:11 -04:00
Pierre Bourdon
f2323331ea
Merge pull request #7240 from lioncash/namespace
Common/DebugInterface: Namespace code under the Common namespace
2018-08-27 04:49:26 +02:00
Pierre Bourdon
0c39590353
Merge pull request #7229 from lioncash/truncate
Interpreter: Remove an unnecessary cast in Trace()
2018-08-27 04:49:06 +02:00
Pierre Bourdon
e096ca20e9
Merge pull request #7358 from Techjar/qt-memcard-manager-deletion-fix
Qt/GCMemcardManager: Fix deletion of multiple files
2018-08-27 04:48:07 +02:00
Pierre Bourdon
dbb7563cce
Merge pull request #7363 from Techjar/netplay-hia-comments
NetPlay: Add additional comments for host input authority mode
2018-08-27 04:45:20 +02:00
Pierre Bourdon
db55c36f09
Merge pull request #7359 from stenzek/intel-d3d-crash
PixelShaderGen: Ensure all components of ocol1 are initialized
2018-08-27 04:42:28 +02:00
Pierre Bourdon
246b1f4459
Merge pull request #7350 from zackhow/android-analytics
Android: Add usage statistics to android
2018-08-27 04:37:17 +02:00
Techjar
1ba834d13c NetPlay: Add additional comments for host input authority mode 2018-08-26 22:28:23 -04:00
Pierre Bourdon
0cc3ae72a5
Merge pull request #7344 from delroth/discord-pics
DiscordPresence: use game-specific artwork if available
2018-08-27 00:11:21 +02:00
Pierre Bourdon
9bcd7bfe1e
Merge pull request #7360 from Techjar/netplay-host-input-authority
NetPlay host input authority mode
2018-08-26 23:15:44 +02:00
Techjar
5519efa66e NetPlay host input authority mode
Currently, each player buffers their own inputs and sends them to the
host. The host then relays those inputs to everyone else. Every player
waits on inputs from all players to be buffered before continuing. What
this means is all clients run in lockstep, and the total latency of
inputs cannot be lower than the sum of the 2 highest client ping times
in the game (in 3+ player sessions with people across the world, the
latency can be very high).

Host input authority mode changes it so players no longer buffer their
own inputs, and only send them to the host. The host stores only the
most recent input received from a player. The host then sends inputs
for all pads at the SI poll interval, similar to the existing code. If
a player sends inputs to slowly, their last received input is simply
sent again. If they send too quickly, inputs are dropped. This means
that the host has full control over what inputs are actually read by
the game, hence the name of the mode. Also, because the rate at which
inputs are received by SI is decoupled from the rate at which players
are sending inputs, clients are no longer dependent on each other. They
only care what the host is doing. This means that they can set their
buffer individually based on their latency to the host, rather than the
highest latency between any 2 players, allowing someone with lower ping
to the host to have less latency than someone else.

This is a catch to this: as a necessity of how the host's input sending
works, the host has 0 latency. There isn't a good way to fix this, as
input delay is now solely dependent on the real latency to the host's
server. Having differing latency between players would be considered
unfair for competitive play, but for casual play we don't really care.
For this reason though, combined with the potential for a few inputs to
be dropped on a bad connection, the old mode will remain and this new
mode is entirely optional.
2018-08-26 17:10:23 -04:00
BhaaL
5f95ed5263 Jit64: get rid of global g_jit accesses 2018-08-25 16:53:49 +02:00
spycrab
476037d1f2
Merge pull request #7345 from spycrab/qt_cover_uniform
Qt/GridProxyModel: Ensure uniform sizes in cover mode
2018-08-25 02:01:14 +02:00
Stenzek
bae1168fe9 PixelShaderGen: Ensure all components of ocol1 are initialized
This was causing a warning in the shader compiler, as the rgb components
were not initialized. Which shouldn't be an issue, as the rgb is not
used in the blend equation, only the alpha. However, the lack of
initialization causes crashes in Intel's D3D shader compiler, so we'll
play nice and initialize all the channels.
2018-08-24 23:53:00 +10:00
Techjar
fd7d51eed6 Qt/GCMemcardManager: Fix deletion of multiple files 2018-08-24 07:58:38 -04:00
Techjar
6ae77623c5 Qt/GCMemcardManager: Make slot and file selection more intuitive 2018-08-24 07:10:48 -04:00
spycrab
248afb9fa7
Merge pull request #7347 from spycrab/qt_fix_visibility
Qt: Fix widgets being visible when they shouldn't be
2018-08-24 01:58:55 +02:00
spycrab
398cce52be
Merge pull request #7352 from Techjar/qt-signal-blocker
Qt: Switch to QSignalBlocker for scoped signal blocking
2018-08-24 01:58:21 +02:00
zackhow
82f82a6b7d Android: Add usage statistics to android.
Added an option in General config to enable/disable usage statistics. Added a popup on first open if
the user would like to engage in reporting. Clicking cancel or out of the box opts out. Only
clicking 'Ok' will enable reporting. Also added a new android specific values to report.
2018-08-23 17:31:17 -04:00
Techjar
1547b185c7 Qt: Switch to QSignalBlocker for scoped signal blocking 2018-08-23 07:11:52 -04:00
Techjar
d72f4ed468 Qt/AdvancedPane: Block signals during Update() 2018-08-23 07:00:20 -04:00
Techjar
5512eadd08 VideoCommon/HiresTextures: Change wildcard to a Windows-compatible character 2018-08-21 15:54:25 -04:00
Pierre Bourdon
d44087128e
Merge pull request #7342 from spycrab/qt_dbg_scroll
Qt/Debugger: Improve scrolling
2018-08-20 21:41:54 +02:00
Pierre Bourdon
183fb9bf6a
Merge pull request #7338 from booto/controller_modes
Fix analog modes that use 4 bits for c-stick data
2018-08-20 13:02:32 +02:00
Markus Wick
3c354d9280
Merge pull request #7333 from weihuoya/gamecover-nomedia
Hide game cover in android gallery
2018-08-20 10:01:50 +02:00
spycrab
77ebd721e3 Qt: Fix widgets being visible when they shouldn't be 2018-08-20 00:39:57 +02:00
spycrab
5b992f138b Qt/Debugger: Improve scrolling
Reduces the scrolling speed for both keyboard and mouse scrolling so
users are able to navigate the code and memory view line by line
2018-08-19 22:36:04 +02:00
JosJuice
be890c56ac Fix critital buffer overflow in LoadPNG 2018-08-19 17:35:15 +02:00
spycrab
2ea6cc66ba Qt/GridProxyModel: Ensure uniform sizes in cover mode 2018-08-19 17:13:29 +02:00