Commit Graph

28336 Commits

Author SHA1 Message Date
Mat M 1825e231a3
Merge pull request #7013 from degasus/double2single
Jit64: Fix MORE_ACCURATE_DOUBLETOSINGLE.
2018-05-29 21:01:47 -04:00
Mat M 7f6ae322ea
Merge pull request #7018 from spycrab/qt_confirm_dialog
Qt/GeneralWidget: Add icon and title to the backend switch confirm di…
2018-05-29 19:27:07 -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
Lioncash 397b27e665 MemoryPatches: In-class initialize is_enabled state for MemoryPatch instances
Given this is what occurs in both constructors (as one just passes
through to another), we can just initialize the member directly.

While we're at it, amend the struct to follow the general ordering
convention of:

<new types>
<functions>
<variables>
2018-05-29 18:04:06 -04:00
Lioncash 4c33bb8dda MemoryPatches: std::move std::vector in the constructor
We can avoid copying the vector contents in this instance.
2018-05-29 18:01:16 -04:00
Lioncash 97c5a840db PcapFile: Namespace code under the Common namespace
Brings more common code under the Common namespace.
2018-05-29 17:56:15 -04:00
Lioncash a7de492696 DSPEmulator: Make the IsLLE() member function const-qualified
This function only queries state and doesn't modify it, so this can be
made a const member function
2018-05-29 17:45:07 -04:00
degasus bde65d8b42 Jit64: Fix MORE_ACCURATE_DOUBLETOSINGLE.
This is broken since 3d12849967.
2018-05-29 23:25:30 +02:00
spycrab 2beb135bdf
Merge pull request #7012 from spycrab/qt_always_connected
Qt/Mapping: Include "Always connected" option
2018-05-29 21:12:48 +02:00
spycrab a1f15050a1 Qt/Mapping: Include "Always connected" option 2018-05-29 19:34:35 +02:00
spycrab d98affbf47 Qt/MenuBar: Fix JIT Menu options not being applied instantly 2018-05-29 16:40:05 +02:00
Léo Lam a4ec3ddef1 Don't switch to blank NAND in the middle of emulation
Switching to blank NAND when emulation is running is an extremely bad
idea. It's akin to opening up a Wii and replacing the NAND chip while
you're playing a game on it.

Except we're not even replacing it with a NAND that has the same
contents. The blank NAND has nothing in it except the save file for
the current game, which is likely to result in the emulated software
getting inconsistent results and possibly even crashing depending on
how it caches title information.

An example of games that check the saves for other games is
Mario Kart Wii -- it checks the filesystem for Super Mario Galaxy saves
to decide whether to unlock characters. With this 'switch NAND
while emulation is active' misfeature, this will likely break.
And that's the main problem: it encourages sloppy emulation and no one
really knows how many things it can break.

Just don't let the user do horrible things like that during emulation.
If they want to use a blank NAND, they can do so by starting input
recording before launching a game. It's likely they will want to do
this if they plan to share their DTM anyway.
2018-05-29 15:41:11 +02:00
Léo Lam 60c38d7781
Merge pull request #7007 from spycrab/qt_gecko_sort
Qt/GeckoCodeWidget: Autosort list and fix accessing the wrong element
2018-05-29 14:48:32 +02:00
Léo Lam 00d91db2ec
Merge pull request #7008 from spycrab/ddos_sux
Fix "Download Codes" hitting DDOS protection
2018-05-29 14:42:24 +02:00
Léo Lam 86bbf540cf
Merge pull request #7009 from lioncash/dsp
DSPEmulator: Default destructor in the cpp file
2018-05-29 14:16:50 +02:00
Lioncash c33228e466 DSPEmulator: Default destructor in the cpp file
This gets rid of a -Wweak-vtables warning
2018-05-29 07:54:39 -04:00
spycrab c086f894b1 Core/GeckoCodeConfig: Circumvent DDOS protection 2018-05-29 03:56:28 +02:00
spycrab 44784cf363 Common/HttpRequest: Add option to set cookies 2018-05-29 03:56:28 +02:00
spycrab a00250bfe6 Qt/GeckoCodeWidget: Autosort list and fix accessing the wrong element 2018-05-29 03:36:35 +02:00
spycrab 62adfaa01c
Merge pull request #7006 from spycrab/qt_profile_fix
Qt: Multiple profile fixes
2018-05-29 01:34:49 +02:00
spycrab e6273b177f Qt/MappingWindow: Fix profile saving not working when the index is not null 2018-05-29 01:32:07 +02:00
spycrab 5829ad21b7 Qt/MappingWidget: Fix profiles not loading properly 2018-05-29 01:21:42 +02:00
spycrab 75e87a8a0d
Merge pull request #6945 from spycrab/qt_sighandler
Qt/Unix: Implement signal handler
2018-05-28 22:05:52 +02:00
Lioncash 7bfeffe32f Interpreter_FPUtils: Unset FPSCR.FI and FPSCR.FR when FPSCR.ZX is set in NI_div()
Another bit of behavior that we weren't performing correctly is the
unsetting of FPSCR.FI and FPSCR.FR when FPSCR.ZX is supposed to be set.
This is supported in PEM's section 3.3.6.1 where the following is
stated:

"
When a zero divide condition occurs, the following actions are taken:

- Zero divide exception condition bit is set FPSCR[ZX] = 1.
- FPSCR[FR, FI] are cleared.
"

And so, this fixes that behavior.
2018-05-28 16:03:59 -04:00
Lioncash 3deadd1fff Interpreter_FPUtils: Correct setting the FPSCR's zero divide exception flag in the 0/0 case
FPSCR[ZX] is the bit defined to represent the zero divide exception
condition bit, and is defined as (according to PowerPC Microprocessor
Family: The Programming Environments Manual for 32 and 64-bit
Microprocessors, which will be referred to as "PEM" for the rest of this
commit message) at section 3.3.6.1:

"
A zero divide exception condition occurs when a divide instructions is
executed with a zero divisor value and a finite, nonzero dividend value
or when a floating reciprocal estimate single (fres) or a floating
reciprocal square root estimate (frsqrte) instruction is executed with a
zero operand value.
"

Note that it states the divisor must be zero and the dividend must be
nonzero in order for ZX to be set. This means that the interpreter was
performing the wrong behavior for the case where 0/0 (with any sign on
the zeros) is performed. We would incorrectly set the ZX bit when only
the VXZDZ bit should be set.

It's also worth pointing out that N/0 (where N is any finite nonzero
value) and 0/0 are not within the same exception class. N/0 is a zero
divide exception case, while 0/0 is considered an invalid operation
exception case, which is also indicated in the PEM section 3.3.6.1 as
well where it lists the criteria for invalid operation exceptions.

Therefore we should only be setting the VXZDZ bit in the 0/0 case, not
VXZDZ and ZX. This was also verified via hardware tests to ensure that
this behavior indeed holds.
2018-05-28 16:00:23 -04:00
spycrab 112a174ae1 Qt/Unix: Implement signal handler 2018-05-28 21:47:46 +02:00
JosJuice b2d8d2a398
Merge pull request #7004 from lioncash/bp
BPMemory: Silence a -Wmissing-braces warning
2018-05-28 21:16:28 +02:00
Léo Lam f05eb10026
Merge pull request #7003 from lioncash/host
Common: Move host communication enum to Host.h
2018-05-28 20:57:34 +02:00
Lioncash 72feeb4d18 BPMemory: Silence a -Wmissing-braces warning
Fairly trivial to resolve, we just initialize the std::array with two
sets of braces (one set to create the array, the other to start and end the
aggregate data that we'll end up returning)
2018-05-28 14:52:59 -04:00
Lioncash 4288bfe0f9 Common: Move host communication enum to Host.h
Given this is actually a part of the Host interface, this should be
placed with it.

While we're at it, turn it into an enum class so that we don't dump its
contained values into the surrounding scope. We can also make
Host_Message take the enum type itself directly instead of taking a
general int value.

After this, it'll be trivial to divide out the rest of Common.h and
remove the header from the repository entirely
2018-05-28 14:34:59 -04:00
Lioncash 78a934bb12 Interpreter_FloatingPoint: Handle cases when FPSCR.VE is set and exceptions occur in fctiw and fctiwz
If invalid operation exceptions are enabled and an invalid operation
occurs, then the destination value remains untouched. This fixes issues
that may arise when using these two instructions where the destination
gets steamrolled by an infinity or NaN value.
2018-05-28 14:05:12 -04:00
Lioncash 8c4aa133ca Interpreter_FloatingPoint: Handle NaN flag setting within fctiw and fctiwz
If a NaN of any type is passed as the operand to either of these
instructions, we shouldn't go down the regular code path, as we end up
potentially setting the wrong flags. For example, we wouldn't set the
FPSCR.VXCVI bit properly. We'd also set FPSCR.FI, when in actuality it
should be unset.

If an SNaN is passed as an operand, we also need to set the FPSCR.VXSNAN
bit as well.

The flag setting behavior for these can be found in Appendix C.4.2 in
PowerPC Microprocessor Family: The Programming Environments Manual for
32 and 64-bit Microprocessors.
2018-05-28 14:05:08 -04:00
Lioncash 0125d9b099 Interpreter_FloatingPoint: Factor out common code from fctiw and fctiwz
fctiwz functions in the same manner as fctiw, with the difference being
that fctiwz always assumes the rounding mode being towards zero. Because
of this, we can implement fctiwz in terms of fctiw's code, but modify it
to accept a rounding mode, allowing us to preserve proper behavior for
both instructions.

We also move Helper_UpdateCR1 to a temporary home in
Interpreter_FPUtils.h for the time being. It would be more desirable to
move it to a new common header for all the helpers, so that even JITs
can use them if they so wish, however, this and the following changes
are intended to only touch the interpreter to keep changes minimal for
fixing instruction behavior.

JitCommon already duplicates the Helper_Mask function within
JitBase.cpp/.h, and the ARM JIT includes the Interpreter header in order
to call Helper_Carry. So a follow up is best suited here, as this
touches two other CPU backends.
2018-05-28 13:28:44 -04:00
Léo Lam a9f022a067
Merge pull request #6993 from lioncash/nan
Interpreter_FPUtils: Set VXSNAN if any input operands are a signaling NaN in remaining NI_* functions
2018-05-28 18:49:13 +02:00
spycrab 6865921286
Merge pull request #7002 from spycrab/qt_rtc_seconds
Qt/AdvancedPane: Show seconds in custom RTC
2018-05-28 14:26:42 +02:00
spycrab 42bd1a91a6 Qt/AdvancedPane: Show seconds in custom RTC 2018-05-28 13:37:46 +02:00
Léo Lam bda668925a
Merge pull request #6989 from lcsondes/fix-vector-assert
UICommon: fix m_cached_files pruning.
2018-05-28 12:41:22 +02:00
Léo Lam 0cba9bb218
Merge pull request #7000 from lioncash/wii-extension
WiimoteEmu: Get rid of pointer casting in extension GetState() functions
2018-05-28 12:39:01 +02:00
JosJuice ed8e400c35 Translation resources sync with Transifex 2018-05-28 11:36:34 +02:00
Markus Wick cddc2d52c2
Merge pull request #6965 from stenzek/d3d-feature-level-10
D3D: Don't emit uint outputs when logic op is unsupported
2018-05-28 09:52:07 +02:00
Markus Wick 9e102e1584
Merge pull request #6943 from lioncash/overflow
Interpreter/Jit64/JitArm64: Correct negative overflow handling for divw
2018-05-28 09:49:19 +02:00
Markus Wick a4d25537a1
Merge pull request #6990 from leoetlino/save
Config: Fix path settings not being saved
2018-05-28 09:46:27 +02:00
Markus Wick 40d3163b12
Merge pull request #6998 from lioncash/log
Common: Remove unnecessary ~9 year old LOGGING preprocessor define
2018-05-28 09:33:21 +02:00
JosJuice 212d415c4b
Merge pull request #6996 from lioncash/color
ColorUtil: Namespace code under the Common namespace
2018-05-28 07:26:29 +02:00
spycrab d3f97debee
Merge pull request #6999 from spycrab/qt_includes
Qt: Sort includes properly
2018-05-28 04:51:15 +02:00
Lioncash 6ad6781bd3 WiimoteEmu: Get rid of pointer casting in extension GetState() functions
We can just memcpy the data instead of pointer-casting data, which is
alignment-safe and doesn't run afoul of aliasing rules.

Previously it also made it seem as if data itself pointed to valid
usable data, but it doesn't, it simply functions as an out parameter
where we push data built up from the GetState() functions into it.
2018-05-27 22:33:26 -04:00
spycrab 6268c7b3d5 Qt: Sort includes properly 2018-05-28 04:31:38 +02:00
Lioncash ee434d4f01 Common: Remove unnecessary ~9 year old LOGGING preprocessor define
This was added in 4bdb4aa0d1 back in
2009-02-27. The only usage spot of this macro involves the same checks
that were used to define that preprocessor macro, so we can simply
remove the macro
2018-05-27 21:33:25 -04:00