Commit Graph

24744 Commits

Author SHA1 Message Date
Lioncash 0d0f58005b WiimoteDevice: Make channel reference const qualified
This is only used for reading data, not modifying it, so make the type
system enforce that.
2018-06-10 09:08:33 -04:00
Lioncash 5548316d32 WiimoteDevice: Remove unnecessary cast in ExecuteL2capCmd()
pData is already a u8*, so a cast isn't necessary here.
2018-06-10 09:04:42 -04:00
Léo Lam 69f079b371
Merge pull request #7098 from Ebola16/ElfDolMessage
Android: Add AlertDialog for files without Game IDs in Game Settings
2018-06-10 14:36:46 +02:00
Léo Lam fca6d80740
Merge pull request #7101 from lioncash/ios
WiimoteDevice: Minor changes
2018-06-10 14:35:41 +02:00
Léo Lam 8bb08d1ca6 BTReal: Fix unsafe reinterpret_casts
Using reinterpret_cast like that is possibly UB.
Replace them with structs/memcpy calls where applicable.
2018-06-09 23:04:04 +02:00
Lioncash c825eecbc9 ChunkFile: Remove unnecessary includes
ChunkFile doesn't use any of the file utilities, so we can drop these
headers to avoid pulling in unnecessary dependencies. This also
uncovered a few indirect inclusions.
2018-06-09 16:49:59 -04:00
Lioncash 647da59679 WiimoteDevice: Move channel state booleans into a struct
These were essentially duplicated for both channels, when they could be
implemented in terms of a struct, which allows for simplifying the reset
case.
2018-06-09 16:35:32 -04:00
Lioncash 94fd8505d6 WiimoteDevice: Make DoesChannelExist() a const member function
This only queries internal class state, it doesn't modify it.
2018-06-09 16:35:32 -04:00
Lioncash f906785e88 WiimoteDevice: Make EventPagingChanged() a const member function
This only queries internal state, it doesn't modify it. With minor
adjustments to BTEmu, this also allows us to make its usage instance a
constant reference.
2018-06-09 16:35:32 -04:00
Lioncash 38d155f993 WiimoteDevice: Make ConnectionState enum an enum class
Avoids polluting class scope and makes it strongly typed.
2018-06-09 16:35:27 -04:00
Léo Lam f564c28040
Merge pull request #7099 from lioncash/compiler
Common: Add Compiler.h header for compiler-specifics
2018-06-09 20:19:49 +02:00
Lioncash b5d89294f7 WiimoteHIDAttr: Make file-scope packet data arrays immutable
Given these are only ever returned from a function as const u8*, we can
go ahead and make these fully immutable.
2018-06-09 13:46:28 -04:00
Lioncash 7b11ce3dd2 Compiler: Use [[maybe_unused]] in the Windows DOLPHIN_UNUSED macro
The required version of MSVC already supports [[maybe_unused]], so we
can utilize this here. When GCC 7 and clang 3.9 become hard
requirements, we can eliminate this macro entirely and replace it with
[[maybe_unused]].
2018-06-09 12:20:29 -04:00
Lioncash d8f6d60189 Compiler: Rename UNUSED macro to DOLPHIN_UNUSED
UNUSED is quite a generic macro name and has potential to clash with
other libraries, so rename it to DOLPHIN_UNUSED to prevent that, as well
as make its naming consistent with the force inline macro
2018-06-09 12:20:29 -04:00
Lioncash 3f210836ad Compiler: Rename __forceinline define to DOLPHIN_FORCE_INLINE
This is much better as prefixed double underscores are reserved for the
implementation when it comes to identifiers. Another reason its better,
is that, on Windows, where __forceinline is a compiler built-in, with
the previous define, header inclusion software that detects unnecessary
includes will erroneously flag usages of Compiler.h as unnecessary
(despite being necessary on other platforms). So we define a macro
that's used by Windows and other platforms to ensure this doesn't
happen.
2018-06-09 12:20:25 -04:00
Lioncash 03414e8e84 Common: Add header for compiler-specifics
Instead of globbing things under an ambiguous Common.h header, move
compiler-specifics over to Compiler.h. This gives us a dedicated home
for anything related to compilers that we want to make functional across
all compilers that we support.

This moves us a little closer to eliminating Common.h entirely.
2018-06-09 12:10:05 -04:00
Ryan Meredith fb3ae94acb Android: Add AlertDialog for files without Game IDs in Game Settings 2018-06-09 11:30:20 -04:00
Lioncash e18824e3f3 PPCAnalyst: get rid of code buffer size variable
Rather than have a separate independent variable that we need to keep
track of in conjunction with the JIT code buffer size itself, amend the
analyst code to use the code buffer constant in JitBase.

Now if the size ever changes, then the analyst will automatically adjust
to handle it.
2018-06-09 08:17:17 -04:00
Lioncash a3f2941173 JitBase: Centralize location of code buffer
Given the code buffer is something truly common to all JIT
implementations, we can centralize it in the base class and avoid
duplicating it all over the place, while still allowing for differently
sized buffers.
2018-06-09 08:16:53 -04:00
Léo Lam 1d87584d69
Merge pull request #7097 from lioncash/dsp-disas
DSPDisassembler: Remove unnecessary includes
2018-06-09 07:58:39 +02:00
Lioncash 61ff11c266 DSPDisassembler: Remove unnecessary includes
Gets rid of an inclusion dependency with the DSP interpreter, as well as
a header-based dependency on the DSP opcode tables. This also uncovered
an indirect inclusion on the logger within DSPSymbols.cpp
2018-06-08 18:55:57 -04:00
Lioncash d1e278218e Common/CMakeLists: Link in libraries privately for traversal_server
Without this, CMake script errors can occur, as explicit linkage
specifiers and non-explicit specifier commands aren't compatible with
one another.
2018-06-08 17:40:44 -04:00
spycrab 0273cae3a2 Qt: Restore fullscreen resolution when regaining focus 2018-06-08 20:47:15 +02:00
spycrab 6c19b5947b Qt: Fix exclusive fullscreen not being entered on startup 2018-06-08 19:59:41 +02:00
Léo Lam 48b7cfa75c
Merge pull request #7062 from robopilot99/master
Add auto-hide option to Wii IR pointer
2018-06-08 14:04:03 +02:00
JosJuice ca3d68cee5
Merge pull request #7076 from JosJuice/android-gamelist-uicommon
Use UICommon's game list code on Android
2018-06-08 13:59:45 +02:00
Ryan Meredith 569454c961 Update Android Gradle to 3.1.3 2018-06-07 22:15:11 -04:00
Léo Lam d23c3e9524
Merge pull request #7093 from lioncash/log
Interpreter_SystemRegisters: Change PanicAlert to INFO_LOG in mtspr()
2018-06-07 19:01:39 +02:00
Lioncash 5db2137538 Interpreter_SystemRegisters: Change PanicAlert to INFO_LOG in mtspr()
As peculiar as this may be, decrementer exceptions by means of setting
the decrementer's zeroth bit from 0 to 1 is valid behavior by software
(and is defined in Programming Environments for 32-bit Microprocessors
in section 2.3.14.1 -- Decrementer operation). Given it's valid behavior,
it doesn't necessarily make sense to use a panic alert and halt, as this
isn't a condition where everything should be considered in a critical
state.

Instead, change it to an info log, so we still make note of it, but
without potentially tearing down state or halting emulation.
2018-06-07 12:14:46 -04:00
Pierre Bourdon de0fe0e210
Merge pull request #6928 from leoetlino/random
Common: Add Random utilities
2018-06-08 00:41:08 +09:00
Léo Lam b51fbaa5b0
Merge pull request #7084 from lioncash/mask
Interpreter_SystemRegisters: Ensure FPSCR modifying instructions don't set bit 20
2018-06-07 16:51:36 +02:00
Léo Lam 34d6a49842
Merge pull request #7088 from Ebola16/TFD
Give "Dump TEV Stages" and "Dump Texture Fetches" descriptions
2018-06-07 16:50:15 +02:00
Léo Lam ca32b4127e
Merge pull request #7089 from spycrab/qt_refresh_hotkey
Qt: Implement "Refresh Game List" hotkey
2018-06-07 16:49:09 +02:00
Léo Lam 18d5ba30d6
Merge pull request #7085 from master0fdisaster/Add-Volume-Hotkeys-OSD-Message
Add OSD message for Volume Hotkeys
2018-06-07 16:46:19 +02:00
Léo Lam dd7c558be3
Merge pull request #7092 from JosJuice/wii-devkit
Set 0x0000002C to NDEV 2.1 when running a debug-signed Wii disc
2018-06-07 15:52:07 +02:00
JosJuice af5d9f693a Set 0x0000002C to NDEV 2.1 when running a debug-signed Wii disc
This fixes the The Last Story prototype that GerbilSoft was testing,
because the apploader is a bit more lenient with the max size of DOL
sections when it detects that you're using a devkit console.
2018-06-07 10:14:32 +02:00
Sleepy Flower Girl 57bd13a0ce Use new config system for Discord Rich Presence option
This doesn't feel like a mirror change to me.
2018-06-07 00:59:31 -04:00
spycrab 23394164de Qt: Implement "Refresh Game List" hotkey 2018-06-06 18:30:46 +02:00
Ryan Meredith 5fcb509702 Give "Dump TEV Stages" and "Dump Texture Fetches" descriptions 2018-06-06 11:59:29 -04:00
JosJuice f0f8ca2172 Android: Don't allow INI editing for DOL/ELF files 2018-06-06 17:34:08 +02:00
JosJuice 1c027bc148 Use UICommon's game list code on Android
Deduplicates code, and gets rid of some problems the old code had
(such as: bad performance when calling native functions, only one
disc showing up for multi-disc games, Wii banners being low-res,
unnecessarily much effort being needed for adding more metadata).
2018-06-06 17:34:07 +02:00
master0fdisaster 7a90ea2752 Add OSD message for Volume Hotkeys
This pr adds an OnScreenDisplay message when you use the Volume hotkeys.
Just to have visual feedback.
2018-06-06 17:11:43 +02:00
Léo Lam c93210155f
Merge pull request #7075 from Ebola16/DumpObjects
Software Renderer "Dump Objects" needs dedicated folder and tooltip
2018-06-06 15:20:14 +02:00
Ryan Meredith 7340935b38 QT: Use brackets for description arrays 2018-06-06 09:05:18 -04:00
Ryan Meredith 45b9b7d211 Give Dump Objects dedicated folder and tooltip 2018-06-06 08:42:41 -04:00
spycrab ee479260d0 Qt: Add option to disable auto-refresh 2018-06-06 13:49:45 +02:00
Markus Wick 3860219899 VideoCommon: Flush the GPU pipeline on async requests. 2018-06-06 09:22:01 +02:00
8times9 70b7e852f8 Qt: Remove Dolphin prefix from NetPlay window titles
This makes the NetPlay window titles consistent with other window titles in Dolphin.
2018-06-05 22:27:07 -05:00
Mat M 0dfd0cfa24
Merge pull request #7083 from leoetlino/consistency
ES: Return ReturnCode in DiVerify for consistency
2018-06-05 17:24:17 -04:00
Lioncash 11a35d47ef Interpreter_SystemRegisters: Ensure FPSCR modifying instructions don't set bit 20
Bit 20 is defined as being reserved and attempts to set it are ignored
by hardware, so we should be doing the same thing.
2018-06-05 16:27:10 -04:00
Léo Lam 85baca386a ES: Return ReturnCode in DiVerify for consistency
No reason to return a s32 instead of an IOS return code (like every
other function in the ES API)
2018-06-05 22:07:59 +02:00
Anthony 36ff2a20d5
Merge pull request #6954 from degasus/coherent
OGL/Streambuffer: Use coherent mapping by default.
2018-06-05 12:06:17 -07:00
spycrab e3e451b34e Qt/InfoWidget: Don't prefix maker id with '0x' 2018-06-05 20:25:15 +02:00
Léo Lam f422b88ed9
Merge pull request #7078 from spycrab/qt_gc_adapter_fix
Qt/GCPadWiiUConfigDialog: Fix settings not being loaded properly
2018-06-05 19:37:56 +02:00
spycrab 08561b4b43
Merge pull request #7079 from spycrab/qt_open_remember
Qt/MainWindow: Remember last directory in "Open" prompt
2018-06-05 19:02:17 +02:00
spycrab 8a24eac0de Qt/GCPadWiiUConfigDialog: Fix settings not being loaded properly 2018-06-05 19:00:51 +02:00
spycrab c6704b1323 Qt/MainWindow: Remember last directory in "Open" prompt 2018-06-05 18:56:21 +02:00
Léo Lam 21d0d6711f
Merge pull request #7073 from leoetlino/fix
WiiSave: Fix the way paths are handled
2018-06-05 18:32:13 +02:00
Léo Lam bfbd890caa
Merge pull request #7080 from spycrab/qt_noprop_elfdol
Qt/GameList: Don't show certain options when a DOL/ELF is selected.
2018-06-05 15:57:11 +02:00
spycrab 07b26f8bca Qt/GameList: Don't show certain options when a DOL/ELF is selected. 2018-06-05 13:28:16 +02:00
spycrab 63460834a5 Qt/CheatCodeEditor: Don't accept rich text 2018-06-05 12:45:08 +02:00
spycrab 8675fa09b8
Merge pull request #7071 from spycrab/qt_gamelist_refresh
Qt: Add Refresh button
2018-06-05 04:29:23 +02:00
robopilot99 ab02499ce7 Add auto-hide option to Wii IR pointer 2018-06-04 17:58:21 -05:00
Léo Lam b7a8deda96
Merge pull request #7074 from lioncash/paired
Interpreter_LoadStorePaired: Simplify type aliases in QuantizeAndStore() and LoadAndDequantize()
2018-06-05 00:08:00 +02:00
Léo Lam 226f88bcb6
Merge pull request #7069 from leoetlino/player-id
PadMappingDialog: Show player ID in player dropdown
2018-06-05 00:02:04 +02:00
Lioncash 25d38c0a23 Interpreter_LoadStorePaired: Simplify type aliases in QuantizeAndStore() and LoadAndDequantize()
These can just use the _t variant of make_unsigned, which eliminates the
need to pull the type from the ::type member type.
2018-06-04 17:57:05 -04:00
Léo Lam d1e2cc7b92
Merge pull request #7070 from spycrab/qt_prop_width
Qt/PropertiesDialog: Fix tabs being cut off due to small window size
2018-06-04 23:49:28 +02:00
spycrab 4415417deb Qt: Add Refresh button 2018-06-04 23:44:53 +02:00
Léo Lam 14d37e0493 WiiSave: Fix the way paths are handled
All paths in SaveFile are relative to the title data directory, not
absolute. Fixes an accidental regression from 5.0-7988 (PR #7059).
2018-06-04 23:31:00 +02:00
Léo Lam 8fe7f8d80d
Merge pull request #7072 from lioncash/emitter
DSPEmitter: Make m_unresolved_jumps private
2018-06-04 22:26:24 +02:00
Léo Lam d797bf2ee7 PadMappingDialog: Show player ID in player dropdown
Makes it easier to differentiate players that have the same name.
2018-06-04 22:24:35 +02:00
JosJuice daee5a4b43 Android: Store folders to scan in SharedPreferences instead of SQLite
Needed in order for the next commit to get rid of the SQLite database.
2018-06-04 22:12:25 +02:00
JosJuice 5e0da225ee
Merge pull request #7068 from lioncash/const
DSPAccelerator: const qualify pointer parameter for Read()
2018-06-04 22:05:26 +02:00
Lioncash bbd2fd080e DSPEmitter: Make m_unresolved_jumps private
By making the jitted function a private static function of DSPEmitter,
we can allow access to data members within the context of the function
without making them public overall.

This finally makes all data members for the x64 DSP emitter private.
2018-06-04 15:46:08 -04:00
spycrab b3c3b58aec Qt/PropertiesDialog: Fix tabs being cut off due to small window size 2018-06-04 21:11:55 +02:00
Léo Lam 5f29e891d3
Merge pull request #7063 from lioncash/fifr
Interpreter: Unset FPSCR.FI and FPSCR.FR for QNaN and infinity input operands
2018-06-04 20:53:58 +02:00
Léo Lam 6ce9c96d91
Merge pull request #7027 from leoetlino/cleanup
Use some C++17 features available since GCC 6
2018-06-04 20:50:50 +02:00
Lioncash 1e3e11d0f5 DSPAccelerator: const qualify pointer parameter for Read()
The data pointed to is only ever read, so make this explicit.
2018-06-04 14:50:42 -04:00
Léo Lam 2a89ad9c39
Merge pull request #7066 from spycrab/qt_fs_exit
Qt: Always return to windowed when confirming exit
2018-06-04 20:48:22 +02:00
spycrab 53ed455d76 Qt: Always return to windowed when confirming exit
If we don't do this the prompt *may* appear behind the fullscreened window
and thus cause confusion. This happens both with exclusive fullscreen and
borderless fullscreen (e.g. for OpenGL).
2018-06-04 20:32:36 +02:00
Léo Lam 9b43180731
Merge pull request #7040 from JMC47/enableadouble2single
[JIT] Enable Accurate Double to Single Conversion
2018-06-04 20:29:15 +02:00
Léo Lam 34511b397e
Merge pull request #7067 from Ebola16/ASU3
Update Android Gradle Plugin
2018-06-04 19:37:33 +02:00
Ryan Meredith dad9c87d8c Update Android Gradle Plugin 2018-06-04 13:22:37 -04:00
spycrab afc2c51e34
Merge pull request #7065 from spycrab/qt_pause_exit
Qt: Fix emulation still not being paused when confirming exit
2018-06-04 19:16:16 +02:00
spycrab b13cf2e16e Qt: Fix emulation still not being paused when confirming exit 2018-06-04 18:13:05 +02:00
Michael M 932ca644aa Add hotplug support to SDL2 controller backend 2018-06-04 17:50:08 +02:00
Michael M 7062967b5b SDLJoystick: store name on creation
Otherwise, Dolphin will crash when the joystick is removed.
2018-06-04 17:49:21 +02:00
Michael M 0eb47e1071 CMake: make SDL a private dep of InputCommon 2018-06-04 17:49:21 +02:00
JMC47 2795376b61 Enable Accurate Double to Single Conversion 2018-06-04 11:49:12 -04:00
Léo Lam 8e0ea92ec3
Merge pull request #7058 from JosJuice/move-titledatabase-usage
Don't store custom names from TitleDatabase in GameFileCache
2018-06-04 14:59:05 +02:00
Léo Lam 8074192a85
Merge pull request #7057 from leoetlino/string
Config/StringUtil/IniFile: Get rid of some duplicated code
2018-06-04 12:44:57 +02:00
JosJuice 85e94cc510 Don't store custom names from TitleDatabase in GameFileCache
This saves us from having to update the GameFileCache when the
TitleDatabase changes (for instance when the user changes language).
2018-06-04 07:45:22 +02:00
Lioncash 9068109b3e Interpreter: Unset FPSCR.FI and FPSCR.FR for QNaN and infinity input operands
This hardware behavior makes sense, as the FI bit is used to signify an
inexact result. An inexact result is a form of value that results during
the rounding phase of denormalization. If any bits of the significand
are lost during said rounding, then the result is considered to be
inexact.

However NaN and infinity are not classed as subnormals and therefore
don't undergo the denormalization step, making loss of precision not
possible (in NaN's case, numerically rounding something that is
literally Not a Number doesn't even make sense).

FR is set to indicate whether or not the last arithmetic or rounding and
conversion instruction that rounded the intermediate result incremented
the fractional portion of the result. Given neither input types would be
affected by this, this should also be unset.

This corrects more of the exceptional case handling for these values to
match hardware.
2018-06-03 18:15:47 -04:00
degasus 7154bfd825 UnitTest: Add StringUtil ToString/TryParse test
Only a single one, but the main one for ini files:
Check if the written values can be parsed again.
2018-06-03 23:12:32 +02:00
Léo Lam 0ecec33567 WiiRoot: Use a namespace alias for FS to reduce noise 2018-06-03 21:37:28 +02:00
Sleepy Flower Girl f25d833dbd Fixed issue Discord RPC library not clearing presence during shutdown 2018-06-03 15:37:27 -04:00
Sleepy Flower Girl e1a9cf3b44 Add option to disable Discord Presence in WX UI 2018-06-03 15:29:28 -04:00
Sleepy Flower Girl ae2337aff6 Add option to disable Discord Presence in Qt UI 2018-06-03 15:29:25 -04:00
Sleepy Flower Girl d9351a5b45 Added INI setting for Discord Rich Presence 2018-06-03 15:29:21 -04:00
Sleepy Flower Girl 678f8da95b Moved Discord RPC library's source code to external 2018-06-03 15:29:01 -04:00
Sleepy Flower Girl d5303ddf0b Add Discord Rich Presence support 2018-06-03 15:27:20 -04:00
Léo Lam c1428b6da0 WiiRoot: Use new filesystem interface
This gets rid of remaining direct accesses to the Wii filesystem
in WiiRoot by using WiiSave to copy saves and the FS interface
2018-06-03 21:21:32 +02:00
Léo Lam 8fce18e4ff
Merge pull request #7059 from leoetlino/fs-wiisave
WiiSave: Use new filesystem interface
2018-06-03 21:05:22 +02:00
Léo Lam 6b9aef7042 FS: Add a struct for modes
As suggested here: https://dolp.in/pr7059#pullrequestreview-125401778

More descriptive than having a std::tuple of FS::Mode, and lets us
give names to known triplets of modes (like in ES). Functions that
only forward mode arguments are slightly less verbose now too.
2018-06-03 20:45:35 +02:00
Lioncash 06056d4f45 Gekko: Make register constructors explicit where applicable
Prevents implicit conversions to types and requires explicitly
specifying them in order to construct instances of them. Given these are
used within emulation code directly, being explicit is always better
than implicit.
2018-06-03 12:37:17 -04:00
Léo Lam d1a8661709 WiiSave: Save and restore files and banner with correct mode 2018-06-03 17:23:40 +02:00
Léo Lam fd3472442d WiiSave: Use new filesystem interface
Converts WiiSave to the new filesystem interface.
2018-06-03 17:01:14 +02:00
Léo Lam c22205cd7e
Merge pull request #7053 from lioncash/frfi
Interpreter_FPUtils/FloatingPoint/Paired: Amend cases where FPSCR.FR and FPSCR.FI should be unset
2018-06-03 15:36:12 +02:00
Léo Lam 83324fe77d StringUtil: Remove ValueToString(std::string)
Doesn't make a lot of sense to have a function that gives the string
representation for a string.
2018-06-03 15:11:59 +02:00
Léo Lam 7e79bf97ab IniFile: Use templates for Get()
Gets rid of duplicated code.
2018-06-03 14:53:56 +02:00
Léo Lam cba32b12e7 IniFile: Use templates for Set() 2018-06-03 14:53:56 +02:00
Lioncash 3e63d71046 Gekko: Add helper function for clearing both FPSCR.FI and FPSCR.FR 2018-06-03 08:27:18 -04:00
Léo Lam fc0193c4b1 Move Config ValueToString to StringUtil
An identical implementation is used by IniFile, so move those functions
to StringUtil. A future commit will modify IniFile to use them.
2018-06-03 14:10:52 +02:00
spycrab 0cc20e95fe Qt/HotkeyWindow: Always show debugging tab 2018-06-03 13:40:57 +02:00
spycrab 9c26a1a458 Qt/Hotkeys: Implement missing "Other State Management" tab 2018-06-03 12:44:02 +02:00
Léo Lam 1e51e263e0
Merge pull request #6988 from leoetlino/wii-save-refactor
WiiSave: Refactor the import/export code
2018-06-03 12:05:43 +02:00
Léo Lam 86368fcd4d
Merge pull request #6499 from Ebola16/SettingsGroup
Android: Initial implementation of Interface submenu
2018-06-03 12:02:56 +02:00
Léo Lam a2b2a31e64
Merge pull request #7054 from JosJuice/android-no-themes
Don't include the Themes directory in Android APKs
2018-06-03 11:55:08 +02:00
JosJuice 2062768bb2 Don't include the Themes directory in Android APKs
We already exclude the Resources folder. Let's do the same with Themes.
2018-06-03 11:11:24 +02:00
Lioncash d6bafbfaaf Interpreter_Paired: Handle signaling NaNs within ps_res and ps_rsqrte
Like regular fres and frsqrte, these also signal whether or not either
of the inputs are signaling NaNs.
2018-06-02 20:47:18 -04:00
Lioncash d05c2ef90d Interpreter_Paired: Unset FPSCR.FI and FR in ps_res and ps_frsqrte in exceptional cases
If invalid operation exceptions or zero divide exceptions occur in
either of these instructions, FI and FR are supposed to be unset.
2018-06-02 20:42:47 -04:00
Lioncash 83774f72ad Interpreter_FloatingPoint: Unset FPSCR.FI and FPSCR.FR if a division by zero exception occurs in fres and frsqrte
Within the programming environments manual, part of the behavior of a
zero divide exception condition is that FI and FR be cleared.
2018-06-02 20:26:20 -04:00
Lioncash 468efb7243 Interpreter_FPUtils: Unset FPSCR.FI and FPSCR.FR if an invalid operation occurs in NI_* functions
If an invalid operation occurs, FI and FR bits are defined to be cleared
to zero for arithmetic operations.
2018-06-02 20:18:51 -04:00
Anthony 0f7370a22c
Merge pull request #7051 from lioncash/frsqrte
Interpreter_FloatingPoint: Don't store to destination in frsqrte if VE or ZE is set and a relevant exception occurs
2018-06-02 13:49:09 -07:00
spycrab ba471c3214
Merge pull request #7048 from spycrab/qt_fs_size
Qt/FilesystemWidget: Add size column
2018-06-02 21:45:02 +02:00
Léo Lam 396810c450
Merge pull request #7050 from lioncash/ptr
WiimoteDevice: Get rid of pointer casting in CBigEndianBuffer
2018-06-02 21:35:43 +02:00
Lioncash 21add26b71 Interpreter_FloatingPoint: Clear FPSCR.FI and FPSCR.FR in invalid operation cases
As explained within 179d73ac0d, the table
within the Programming Environments Manual for PowerPC lists the FI and
FR bits as cleared for invalid operation cases. So, we amend the
relevant cases here in order to be accurate to hardware.
2018-06-02 15:30:56 -04:00
Lioncash b71a9e658f Interpreter_FloatingPoint: Don't store to destination in frsqrte if VE or ZE is set and a relevant exception occurs
As explained within commit a08ad82ace, if
an invalid exception occurs and VE is set, then the destination register
should remain unchanged. Ditto for when ZE is set and a zero divide
exception occurs.
2018-06-02 15:27:14 -04:00
Lioncash f6c4c05d93 WiimoteDevice: Make CBigEndianBuffer's constructor explicit
Prevents implicit construction of buffers.
2018-06-02 15:10:51 -04:00
Lioncash 4601136b08 WiimoteDevice: Get rid of pointer casting in CBigEndianBuffer
Gets rid of more places where we can violate alignment requirements and
aliasing rules.
2018-06-02 15:02:03 -04:00
Lioncash 13e828fd4d WiimoteDevice: Move CBigEndianBuffer to the cpp file
This is only used internally, so we don't need to expose it in the
header. This also allows getting rid of inclusion of the byte swapping
utilities in the header as well.
2018-06-02 14:55:05 -04:00
Anthony 8d1b2f9cae
Merge pull request #7045 from lioncash/fres
Interpreter_FloatingPoint: Don't store to destination in fres if VE or ZE is set and a relevant exception occurs
2018-06-02 11:42:34 -07:00
Lioncash b1c7ce75e4 EXI_DeviceIPL: Replace superfluous virtual with override on destructor 2018-06-02 14:18:49 -04:00
Lioncash 0d89650950 EXI_DeviceIPL: Use std::array where applicable 2018-06-02 14:18:02 -04:00
Lioncash bf4775f95f EXI_DeviceIPL: Normalize variable names
Makes naming consistent with our coding style.
2018-06-02 14:14:08 -04:00
Lioncash b6203c66c2 EXI_DeviceIPL: In-class initialize data members where applicable 2018-06-02 14:08:01 -04:00
spycrab f6865117e4 Qt/FilesystemWidget: Add size column 2018-06-02 18:59:56 +02:00
Léo Lam f09f83c309
Merge pull request #7019 from Ebola16/VSQT
Make DolphinQT2 the default project in dolphin-emu.sln
2018-06-02 14:23:20 +02:00
Léo Lam 62fdef0e6c
Merge pull request #7046 from lioncash/priv
EXI_DeviceMic: Make data members of CEXIMic private
2018-06-02 11:53:07 +02:00
Stenzek bc96557ec4 Externals: Update glslang to upstream commit 32d3ec3 2018-06-02 07:34:31 +00:00
spycrab 0e8db9fd1d Analytics: Report update track 2018-06-02 05:59:03 +02:00
Lioncash 3906859984 EXI_DeviceMic: Remove unimplemented StreamLog function prototype 2018-06-01 20:43:28 -04:00
Lioncash 9e068ad2c4 EXI_DeviceMic: Make data members of CEXIMic private
Given they were only made public so that the callback could access class
state, we can simply make the callback a private static function of
CEXIMic, which allows access to members from the callback function
without making all of said members public.
2018-06-01 20:43:28 -04:00
Lioncash 179d73ac0d Interpreter_FloatingPoint: Clear FPSCR.FI and FPSCR.FR if an SNaN is an input to fres
In the PEM manual, within Table 3-12, which lists what should occur for
invalid operation exceptions, the FPSCR.FI and FPSCR.FR bits are listed
as "Cleared" for when FPSCR.VE is unset and set. So we clear these bits
as well to match hardware behavior.
2018-06-01 20:21:13 -04:00
Lioncash a08ad82ace Interpreter_FloatingPoint: Don't store to destination in fres if VE or ZE is set and a relevant exception occurs
In the PowerPC Microprocessor Family: The Programming Environments
Manual for 32 and 64-bit Microprocessors, in section 3.3.6.1, Table
3-12 lists what should occur if an invalid operation exception occurs in
situations where VE is set and when VE is not set. In the case where VE
is set, it lists the frD as "Unchanged". It also lists the FPRF flags as
"Unchanged".

Further down in Table 3-13, the listings for what should occur when zero
divide exceptions occur is listed, both for when ZE is set, and when it
isn't. When ZE is set, it lists frD as "Unchanged". It also lists the
FPRF flags as "Unchanged" as well.

This also alters the code so that we don't even calculate the result if
we don't need to compute it, making it a little bit less wasteful.
2018-06-01 20:21:09 -04:00
Léo Lam 69abaf3ec4 WiiSave: Merge Header and DataBinHeader to reduce noise
DataBinHeader is not used anywhere in the code other than via Header,
so let's merge them to reduce noise when accessing header fields
(currently we have to do header.hdr which looks silly).
2018-06-01 23:45:58 +02:00
Léo Lam 210377816d WiiSave: Get rid of some magic numbers
It would make sense for 0x80 and 0xf0c0 to be respectively
sizeof(BkHeader) and sizeof(Header) as Nintendo is signing anything
that comes after the header, including the BkHeader.
2018-06-01 23:44:24 +02:00
Léo Lam 8eafd1928e WiiSave: Move user interaction to UI frontends 2018-06-01 20:46:35 +02:00
Léo Lam 4df266f943 WiiSave: Use the correct length for paths
Paths can never exceed 0x40 characters as this is the maximum length
that is allowed by IOS (and probably the common FS library too).
2018-06-01 20:46:35 +02:00
Léo Lam 8af16fdd28 WiiSave: Use an enum class for save file type 2018-06-01 18:58:34 +02:00
Anthony fcae27981a
Merge pull request #7044 from JosJuice/android-refresh-all-fragments
Android: Refresh all fragments, not just the selected one
2018-06-01 09:53:19 -07:00
JosJuice 1b127bdf33 Android: Refresh all fragments, not just the selected one
This fixes the oddity of having to manually refresh after adding a
folder that contains games for a different tab than the one you're on.
2018-06-01 18:17:51 +02:00
Anthony a9684b5c67
Merge pull request #7041 from spycrab/qt_dbg_bselect
Qt/MemoryWidget: Allow operating on columns
2018-06-01 09:05:52 -07:00
Anthony d935f78692
Merge pull request #7043 from JosJuice/gamefile-includes
GameFile: Include necessary DiscIO headers
2018-06-01 09:05:10 -07:00
spycrab 3b59ebb226 Qt: Exit exclusive fullscreen on confirmation prompt 2018-06-01 17:40:07 +02:00
Ryan Meredith 4e010912cd Android: Consistently use description 2018-06-01 09:58:34 -04:00
JosJuice 533a49460a GameFile: Include necessary DiscIO headers 2018-06-01 14:19:16 +02:00
Léo Lam 94953670f2 WiiSave: Move overwrite prompt to Import
WriteHeader should just write the header and not do anything else.
2018-06-01 00:14:48 +02:00
spycrab 5f5b05f3dc Qt/MemoryWidget: Allow operating on columns 2018-05-31 22:07:05 +02:00
Léo Lam a46a8dd378 WiiSave: Refactor import/export code
The current WiiSave code is extremely messy, as it exposes all kinds of
implementation details in the header (including internal struct
definitions and magic numbers that don't have to be).

The read/write code is intermingled, so it's hard to tell which members
are used, or when/where they are set at all.

It also implicitly relies on some functions being called in a specific
order since it doesn't seek manually every time, which makes the code
even more fragile.

The logic is also hardcoded to only support bin->nand or nand->bin,
even though it would be useful to support nand->nand (for the
Movie save copying code, for example).

This commit attempts to solve these problems by getting rid of the
WiiSave class:

* Read/write code is moved to new Storage classes (NandStorage and
  DataBinStorage) with small, clear functions that do one and only
  one thing.

* The import/export logic was refactored into a generic Copy function
  that takes two storages as parameters.

* The existing import and export functions are now just small wrappers
  that call Copy with the appropriate storages.
2018-05-31 20:52:01 +02:00
Léo Lam 60dd2553c6
Merge pull request #7033 from lioncash/jitarm
JitArm64_BackPatch: Correct usage of an invalidated iterator after a std::map erase() call in HandleFastmemFault()
2018-05-31 18:05:47 +02:00
Léo Lam fff1db9730 Common: Add Random utilities
This makes it easier to generate random numbers or fill a buffer with
random data in a cryptographically secure way.

This also replaces existing usages of RNG functions in the codebase:

* <random> is pretty hard to use correctly, and std::random_device does
  not give enough guarantees about its results (it's
  implementation-defined, non cryptographically secure and could be
  deterministic on some platforms).
  Doing things correctly is error prone and verbose.

* rand() is terrible and should not be used especially in crypto code.
2018-05-31 17:54:43 +02:00
Anthony a9a03d1565
Merge pull request #7034 from lioncash/override
JitArm64/Jit_Util: Add missing override specifiers
2018-05-31 08:48:35 -07:00
Mat M dd77ace56a
Merge pull request #7005 from lioncash/div
Interpreter_FPUtils: Correct setting the FPSCR's zero divide exception flag in the 0/0 case in NI_div()
2018-05-31 11:22:45 -04:00
Mat M f1b7259446
Merge pull request #6978 from lioncash/fcti
Interpreter_FloatingPoint: Handle NaN flag setting within fctiw and fctiwz
2018-05-31 11:22:04 -04:00
spycrab 8e5a96fcfc Qt/GeneralWidget: Show tooltip when adapters are not supported by the backend 2018-05-31 03:52:18 +02:00
spycrab d453dc2342 Qt/MemoryWidget: Fix sidebar items being stretched out 2018-05-30 23:23:02 +02:00
spycrab 390fb37a29
Merge pull request #7032 from spycrab/qt_macos_mpbtn_round
Qt/macOS: Fix mapping buttons not being round
2018-05-30 22:45:15 +02:00
spycrab d1db841ada
Merge pull request #7035 from spycrab/qt_macos_info_width
Qt/macOS: Fix InfoWidget fields being too narrow
2018-05-30 19:13:08 +02:00
spycrab 5f9d4d625f Qt/macOS: Fix InfoWidget fields being too narrow 2018-05-30 17:26:37 +02:00
Lioncash bffcaf3218 JitArm64_BackPatch: Correct usage of an invalidated iterator after a std::map erase() call in HandleFastmemFault()
Given the iterator gets invalidated within the erase() call, just keep a
temporary around to store the pointer address.
2018-05-30 11:08:11 -04:00
Lioncash ba6c371746 JitArm64/Jit_Util: Add missing override specifiers 2018-05-30 10:50:11 -04:00
Markus Wick 6c7e9f73da
Merge pull request #7030 from lioncash/emitter
x64Emitter: Amend parameter ordering for WriteModRM()'s prototype
2018-05-30 16:39:26 +02:00
spycrab 102d469f9e Qt/macOS: Fix mapping buttons not being round 2018-05-30 16:39:07 +02:00
Markus Wick f02b2f0cad
Merge pull request #7031 from lioncash/naming
AudioInterface: Minor changes
2018-05-30 16:38:18 +02:00
Lioncash 038bb9b3e1 AudioInterface: Use member initializers where applicable for unions
Migrates more code to the initialization capabilities available since C++11
2018-05-30 09:49:28 -04:00
Lioncash b59cda1435 AudioInterface: Amend variable naming
Normalizes variable names to conform to our coding conventions.
Previously we were signifying some variables as externally linked
globals, which wasn't the case.
2018-05-30 09:47:08 -04:00
Lioncash 81e11b2406 x64Emitter: Amend parameter ordering for WriteModRM()'s prototype
The definition of the function uses the ordering {mod, reg, rm}, which
is correct. Match the prototype to this, so that the parameter list
isn't misleading.
2018-05-30 09:30:24 -04:00
Léo Lam bdfd331355
Merge pull request #7028 from lioncash/obsolete
GeneralPane: Replace usages of obsolete QString member function sprintf
2018-05-30 15:02:41 +02:00
Lioncash f845818cfe VolumeWii: Shorten padding checking code within CheckIntegrity()
We can just use std::any_of here to collapse the checking code down to a
single assignment as opposed to a loop. This also slightly improves on
the existing code, as this won't continue to iterate through the cluster
metadata if an entry that's non-zero is encountered.
2018-05-30 08:42:32 -04:00
Lioncash bd585f7389 GeneralPane: Replace usages of obsolete QString member function sprintf
sprintf is listed as obsolete within the documentation for Qt 5. Instead,
it recommends using the asprintf member function, arg(), or QTextStream.
2018-05-30 06:50:59 -04:00
Léo Lam 4fb2d580d8
Merge pull request #7026 from lioncash/name
JitAsmCommon: Normalize member variable names within CommonAsmRoutinesBase
2018-05-30 12:02:08 +02:00
Léo Lam fb124c2eb0 Use nested namespaces for IOS HLE
Pretty much all of the source files contain the following:

    namespace IOS
    {
    namespace HLE
    {
    namespace <name>
    {
    // actual code here
    }  // namespace <name>
    }  // namespace HLE
    }  // namespace IOS

which is really verbose boilerplate, because most of the files inside
of Core/IOS are for IOS HLE.

This commit replaces that with a more concise `namespace IOS::HLE`
or `namespace IOS::HLE::(name)`.
2018-05-30 11:40:05 +02:00
Léo Lam 5b90aba624 ChunkFile: Replace macro with a variable template
Note that std::is_trivially_copyable_v cannot be used yet (C++17 only).
2018-05-30 11:39:30 +02:00
Lioncash 986d644a01 JitAsmCommon: Make CommonAsmRoutinesBase a struct
This is just used as a means of carting around routines. It's not meant
to directly have functionality embedded within it--this is the job of
the inheriting data structure--so we can just make this a basic struct.

Particularly given all the data members were public to begin with.
2018-05-30 05:22:41 -04:00
Lioncash f5f4c10fd1 JitAsmCommon: Amend member variable names for CommonAsmRoutinesBase 2018-05-30 05:22:36 -04:00
Léo Lam 8a00a9e149 Remove old GCC version checks 2018-05-30 10:59:15 +02:00
Lioncash efabfc0b54 VolumeWii: Use ReadSwapped for retrieving the partition data size in CheckIntegrity()
Also make this a little more robust by handling the failure case for
the read as well.
2018-05-30 04:34:57 -04:00
Lioncash 7bef470136 VolumeGC/VolumeWii: Dehardcode sizes where applicable
We can just use the relevant array to derive these sizes instead of hardcoding
them directly.
2018-05-30 04:14:42 -04:00
Markus Wick 4bebd52850
Merge pull request #7017 from lioncash/arm
Arm64Emitter: Use Common::BitCast where applicable
2018-05-30 09:50:59 +02:00
Lioncash 66122f037e Volume/VolumeGC/VolumeWii: Amend variable naming
Drops prefixed underscores and normalizes names to follow our coding
style.
2018-05-30 03:33:12 -04:00
JosJuice ae4aa0b25c
Merge pull request #7010 from leoetlino/can-of-worms
Don't switch to blank NAND in the middle of emulation
2018-05-30 08:00:15 +02:00
JosJuice 243f353688
Merge pull request #7016 from lioncash/mem
MemoryPatches: Minor changes
2018-05-30 07:45:34 +02:00
JosJuice 6cb81ca851
Merge pull request #7015 from lioncash/pcap
PcapFile: Namespace code under the Common namespace
2018-05-30 07:45:09 +02:00
JosJuice 2f561dafd9
Merge pull request #7014 from lioncash/const
DSPEmulator: Make the IsLLE() member function const-qualified
2018-05-30 07:40:44 +02:00
Mat M 1825e231a3
Merge pull request #7013 from degasus/double2single
Jit64: Fix MORE_ACCURATE_DOUBLETOSINGLE.
2018-05-29 21:01:47 -04:00
Ryan Meredith e9563f0a84 Make DolphinQT2 the default project in dolphin-emu.sln 2018-05-29 20:26:51 -04:00
spycrab c07b89792d Qt/GeneralWidget: Add icon and title to the backend switch confirm dialog 2018-05-30 01:19:31 +02:00
spycrab a729c375f3
Merge pull request #7011 from spycrab/qt_jit_instant
Qt/MenuBar: Fix JIT Menu options not being applied instantly
2018-05-30 00:53:20 +02:00
Lioncash 6fd7a79b93 Arm64Emitter: Use Common::BitCast where applicable
Gets rid of the need to set up memcpy boilerplate to reinterpret between
floating-point and integers.

While we're at it, also do a minor bit of tidying.
2018-05-29 18:19:01 -04:00