Commit graph

32101 commits

Author SHA1 Message Date
Scott Mansell
21528c3e72
Document the evdev "interesting" heuristic
Was checking over this old code, and saw a comment calling me out for a lack of documentation.

It might be half a decade late, but better late then never.
2020-01-07 12:46:24 +13:00
Tilka
99c0c8d4e8
Merge pull request #8527 from shuffle2/patch-1
Update Readme.md
2020-01-06 14:13:24 +01:00
Tilka
98f645daac
Merge pull request #8158 from Sintendo/jitopts
x64 micro-optimizations
2020-01-06 14:09:43 +01:00
Tilka
f17f03ea3c
Merge pull request #8551 from Sintendo/jit64addx
Jit64: addx optimizations
2020-01-06 13:15:17 +01:00
Tilka
6e18dfb600
Merge pull request #8133 from Sintendo/mov64imm32
x64Emitter: Emit shorter MOVs for 32-bit immediates
2020-01-06 13:12:56 +01:00
Sintendo
12fcbac2a3 Jit64: addx - Emit LEA for register + immediate
Prefer LEA over MOV + ADD when dealing with immediates.

Before:
44 8B EE             mov         r13d,esi
41 83 C5 20          add         r13d,20h

After:
44 8D 6E 20          lea         r13d,[rsi+20h]
2020-01-05 23:39:13 +01:00
Sintendo
8e7b6f4178 Jit64: addx - Prefer ADD over LEA when possible
The old logic would always emit LEA when both sources are in a register
and OE is disabled. However, ADD is still preferable when one of the
sources matches the destination.

Before:
45 8D 6C 35 00       lea         r13d,[r13+rsi]

After:
44 03 EE             add         r13d,esi
2020-01-05 23:23:56 +01:00
Pierre Bourdon
fca5ab5ad3
Merge pull request #8550 from leoetlino/wiiu-transfer-tool
IOS/ES: Add SetUid exception for the Wii U Transfer Tool
2020-01-05 18:33:03 +01:00
Léo Lam
c1f9bfce30 IOS/ES: Add SetUid exception for the Wii U Transfer Tool
The ES sysmodule in IOS62 (v6430) has an exception for the
Wii U Transfer Tool in the SetUid function.

If the active title is the Wii U Transfer Tool, then calling SetUid
is always allowed. (The UID is still checked first, though.)

Fixes https://bugs.dolphin-emu.org/issues/10985
2020-01-05 18:16:54 +01:00
Jordan Woyak
956339df4e Core/WiimoteReal: Make wiimote source type an enum class and add Get/SetWiimoteSource functions. Add connected real Wii Remotes to a pool when a slot is not available. 2020-01-05 10:15:22 -06:00
Léo Lam
f35f4f2bf0
Merge pull request #8541 from jordan-woyak/float-parse-fix
StringUtil: Make TryParse of floats handle comma and dot decimal separators.
2020-01-05 12:12:09 +01:00
Pokechu22
3b5d20e12c Bump state version 2020-01-04 11:43:33 -08:00
Pokechu22
51f8a3606e Return error code to game when using unimplemented commands 2020-01-04 11:43:32 -08:00
Pokechu22
af5f0b20bb Report use of various unimplemented DI commands as game quirks 2020-01-04 11:43:32 -08:00
Pokechu22
f1dc908883 Clarify emulated behavior for ReadBCA 2020-01-04 11:43:32 -08:00
Pokechu22
6c0399103f Handle partitions in /dev/di, not DVDInterface
Partitions are Wii-exclusive, and don't happen at the DVDInterface level in
IOS.  This isn't quite the cleanest fix, but it gets rid of the assumption that
a partition is open on starting the game at least.
2020-01-04 11:43:32 -08:00
Pokechu22
71e8fb278f Return more errors from DTK 2020-01-04 11:43:31 -08:00
Pokechu22
55a88ba2ed Track drive state better, reporting errors if the state is wrong
Also, fix DVDLowStopMotor logging (which was based on the ioctl parameters)
2020-01-04 11:43:31 -08:00
Pokechu22
7d6b9bcb40 Check for error 001 out of bounds reads in DVDThread
All out of bounds reads should return the appropriate DI error, but it also
makes sense to have the error 001 read happen there.
2020-01-04 11:43:30 -08:00
Pokechu22
ef2fc5a49b Split /dev/di commands from DVDInterface
The various ioctls sometimes have different arguments than the DI command
registers, though they generally overlap.  There are also a bunch of ioctls
that don't even normally go into DVDInterface, just returning various data.
Some of the implemented ioctls are new to Dolphin.
2020-01-04 11:43:30 -08:00
Pokechu22
a8ae5fa21a Expose setting DVDInterface errors and split setting into two parts 2020-01-04 11:43:30 -08:00
Pokechu22
3110599559 Increase DIMAR by DILENGTH after a command 2020-01-04 11:43:30 -08:00
Pokechu22
d3aad1d6d5 DIMAR only ignores bits 0-4, not the upper bits
Based on a hardware test on a Wii.  The alignment code was originally added in 743641965a.
2020-01-04 11:43:29 -08:00
Pokechu22
c564d64104 Remove unused drive debug command constants
The corresponding code that used these was removed in 2009 with 93b83f8d65.  Now their only purpose is to generate warnings on osx.

Minimalistic documentation on these commands can be found at http://hitmen.c02.at/files/yagcd/yagcd/chap5.html#sec5.7.2 and https://web.archive.org/web/20070328200323/http://tmb.elitedvb.net/dvd-game/index.php/CMDFE.  Those constants only relate to the 0x11 subcommand, which is one of many.  Most can't be properly emulated unless we LLE the drive firmware (in which case, they don't need to be reimplemented).
2020-01-04 11:43:29 -08:00
Pokechu22
84f099cf62 Tidy and eliminate some of the DI register unions 2020-01-04 11:43:26 -08:00
Pokechu22
11bd132650 Implement RTC flag, which is counter-intuitively disc drive related 2020-01-04 11:43:26 -08:00
Pokechu22
77189e74cd Implement Broadway GPIOs
SLOT_LED and the AVE ones are not implemented yet, but the other Broadway ones are.
2020-01-04 11:43:26 -08:00
Pokechu22
a695b05b21 Add support for std::optional to PointerWrap 2020-01-04 11:43:26 -08:00
Jordan Woyak
0e8d4cb6ac StringUtil: Make TryParse of floats handle comma and dot decimal separators. 2020-01-04 07:19:15 -06:00
Connor McLaughlin
04e9279f3d
Merge pull request #8536 from leoetlino/warnings
Fix several warnings
2020-01-04 21:24:27 +10:00
Léo Lam
ad75215bb0 Fix several warnings
A small, nonexhaustive set of warning fixes. The DiscIO Volume change
is a workaround for a GCC bug [1] that causes returning an unengaged
std::optional to emit annoying -Wmaybe-uninitialized warnings.
This last change alone fixes pages upon pages of warnings since
Volume.h is included from several files.

-Wstringop-truncation is another irrelevant warning for us, but
unfortunately there seems to be no way to disable it without
adding ugly pragmas wherever the warning appears.
2020-01-04 12:11:39 +01:00
Léo Lam
94c5460693
Merge pull request #8546 from jordan-woyak/default-num-mappings
HW: Add ticks to default mappings that are valid numeric literals.
2020-01-04 10:41:45 +01:00
Léo Lam
671defd8b9
Merge pull request #8543 from jordan-woyak/gcode-download-minor-fix
Core/GeckoCode: Fix DownloadCodes function assuming HTTP data is null terminated.
2020-01-04 10:18:44 +01:00
Jordan Woyak
2a9a04a1ec HW: Add ticks to default mappings that are valid numeric literals. 2020-01-03 22:08:49 -06:00
Jordan Woyak
b505004d61 Core/GeckoCode: Fix DownloadCodes function assuming HTTP data is null terminated. 2020-01-03 20:14:10 -06:00
Jordan Woyak
723115b7b6 WiimoteEmu: Allow Recenter button to adjust the pitch. 2020-01-03 18:08:45 -06:00
Jordan Woyak
72c2be52ed WiimoteEmu: Clean up ComplementaryFilter math. 2020-01-03 16:16:26 -06:00
Jordan Woyak
120c6dc850 DolphinQt: Fix accelerometer indicator math. 2020-01-03 12:34:11 -06:00
Jordan Woyak
540a3ce665 DolphinQt: Use FromQuaternion for a more accurate gyro indicator. 2020-01-02 15:46:18 -06:00
Jordan Woyak
8ab3694f51 Common: Add Matrix33::FromQuaternion. 2020-01-02 15:16:37 -06:00
Connor McLaughlin
a04d4982b1
Merge pull request #8544 from gtalusan/master
MacOS: Dispatch GL calls to main thread to prevent crashes on Catalina
2020-01-02 14:43:21 +10:00
George Talusan
b1a6cbc3b4 MacOS: Dispatch GL calls to main thread to prevent crashes on Catalina 2020-01-01 23:06:19 -05:00
Léo Lam
8c3d8e0811 DSPSpy: Remove unused stubs
The whole thing was commented out, and nothing is actually using it
2019-12-30 13:33:43 +01:00
Pierre Bourdon
7a6a4510f6
Merge pull request #8362 from GerbilSoft/feature/string-optimizations.2019-09-11
Various string and other optimizations
2019-12-30 10:59:14 +01:00
David Korth
11339d77c6 IsSettingSaveable.cpp: Significant code size reduction.
- Refactor the Config::System::Main check so we check system once,
  then we check for the section.

- Use an std::array<> instead of std::vector<>.

- Use an array of pointers instead of an array of ConfigLocation.
  The latter contains two std::string objects, whereas pointers
  are only 8 bytes (on 64-bit).

Code size comparison: (64-bit Linux, gcc-9.2.0, release build)

   text    data     bss     dec     hex filename
  16136       0      40   16176    3f30 IsSettingSaveable.cpp.o [before]
   3933     720       0    4653    122d IsSettingSaveable.cpp.o [after]
 -12203    +720     -40  -11523   -2d03 Difference
2019-12-29 23:45:02 -05:00
David Korth
f5fe692842 Use pre-increment for iterators instead of post-increment.
Pre-increment is more efficient, since it doesn't have to return the
old iterator.
2019-12-29 23:45:02 -05:00
David Korth
c2dd2e8a2e Use std::istringstream or std::ostringstream instead of std::stringstream where possible.
This removes std::iostream from the inheritance chain, which reduces
overhead slightly.
2019-12-29 23:45:02 -05:00
David Korth
6e549bb668 InputConfig::LoadConfig(): Convert num[] to an array of std::string_view.
NOTE: The explicit std::string() conversions later are needed. Otherwise,
gcc-9.2.0 throws all sorts of errors because it can't find a matching
operator+() function.
2019-12-29 23:45:02 -05:00
David Korth
a23b3d26f4 GLExtensions.cpp: Use arrays of const char *const instead of std::string.
The strings end up being copied, so we might as well initialize the
std::string in the unordered_map directly.
2019-12-29 23:45:02 -05:00
David Korth
05101b251c OGL/Render.cpp, InitDriverInfo(): Use std::string_view to eliminate string copies.
Consolidate the NVIDIA Tegra and non-Tegra checks into one branch.
2019-12-29 23:45:02 -05:00