Commit Graph

31850 Commits

Author SHA1 Message Date
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
a8ae5fa21a Expose setting DVDInterface errors and split setting into two parts 2020-01-04 11:43:30 -08:00
3110599559 Increase DIMAR by DILENGTH after a command 2020-01-04 11:43:30 -08:00
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
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
84f099cf62 Tidy and eliminate some of the DI register unions 2020-01-04 11:43:26 -08:00
11bd132650 Implement RTC flag, which is counter-intuitively disc drive related 2020-01-04 11:43:26 -08:00
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
a695b05b21 Add support for std::optional to PointerWrap 2020-01-04 11:43:26 -08:00
04e9279f3d Merge pull request #8536 from leoetlino/warnings
Fix several warnings
2020-01-04 21:24:27 +10:00
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
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
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
2a9a04a1ec HW: Add ticks to default mappings that are valid numeric literals. 2020-01-03 22:08:49 -06:00
b505004d61 Core/GeckoCode: Fix DownloadCodes function assuming HTTP data is null terminated. 2020-01-03 20:14:10 -06:00
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
b1a6cbc3b4 MacOS: Dispatch GL calls to main thread to prevent crashes on Catalina 2020-01-01 23:06:19 -05:00
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
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
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
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
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
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
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
1d7f128693 GetSysMenuVersionString(): Use a char instead of std::string for the region letter.
Append the region letter after determining the version number.
2019-12-29 23:45:02 -05:00
9f3b9acad9 PowerPC.cpp: No need to explicitly initialize ppcState.
"ppcState{}" is stored in the .data segment, which means the full ~4 MB
is stored in the executable.

"ppcState" is stored in the .bss segment, which means it only stores a
note that tells it to allocate and zero ~4 MB at runtime.
2019-12-29 23:45:02 -05:00
afe2e7de0f VolumeVerifier.cpp: Verify that the string arrays are sorted before using std::binary_sort().
Debug builds only, since this is wrapped in assert().
2019-12-29 23:42:55 -05:00
d660aba20f VolumeVerifier.cpp: Use arrays of string_view objects instead of strings.
string_view is a thin wrapper around C strings, so it's more efficient
for constant strings than C++ strings.

The unordered_set<> also adds extra runtime overhead. For small arrays,
a simple linear search works. For larger arrays, std::binary_search()
works better than linear but without the unordered_set<> overhead.

ShouldBeDualLayer(): Removed a duplicate "SK8X52" entry.
2019-12-29 23:42:55 -05:00
084344aa5d Merge pull request #8495 from stenzek/windows-arm64
Platform support for Windows-on-ARM64
2019-12-28 19:27:47 +10:00
d744c5a148 Compile fixes for Windows-on-ARM64 2019-12-28 19:20:41 +10:00
6fcb1c6c46 Add an ARM64 target to Visual Studio projects 2019-12-28 19:20:41 +10:00
5a65031611 Add a Win32 NoGUI platform and project 2019-12-28 08:56:27 +10:00
0755f92979 Merge pull request #8534 from JosJuice/netplay-index-empty-strings
Properly check for missing netplay session name/region
2019-12-25 21:52:22 -08:00
0341288af2 Merge pull request #8525 from Techjar/axwii-ub
HW/DSPHLE: Fix struct aliasing undefined behavior in AX ucode
2019-12-24 08:35:28 +01:00
0c12dbe860 DolphinQt: Properly save netplay session settings when changed 2019-12-23 23:14:13 +01:00
8e278b8053 Check presence of name and region in NetPlayServer 2019-12-23 23:14:13 +01:00
2fa4ef729f DolphinQt: Check presence of region in NetPlaySetupDialog 2019-12-23 23:14:13 +01:00
02680ef7bb Merge pull request #8533 from delroth/notice-logs
DualShockUDPClient: downgrade spurious NOTICE_LOGs
2019-12-23 18:50:03 +01:00
5c996dec89 DualShockUDPClient: downgrade spurious NOTICE_LOGs 2019-12-23 18:36:18 +01:00
eae959238e HW/DSPHLE: Fix struct aliasing undefined behavior in AX ucode
This fixes Old AX Wii games having no audio when compiled under VS2019.
This also includes some minor code cleanup and moving a function to
avoid duplication.
2019-12-22 14:48:47 -05:00
79092cdda0 Common/BitUtils: Implement BitCast(To|From)Array 2019-12-22 14:48:47 -05:00
8a50d9c540 Merge pull request #8522 from stenzek/fifoci-ffmpeg
FrameDump: Set first_frame if movie frame number <= 1
2019-12-22 12:11:03 +10:00
6a0067fd26 FrameDump: Set first_frame if movie frame number <= 1
The frame number is incremented before the first frame is swapped out.

Fixes ffmpeg creating invalid video files on output if the emulator only
runs for a single frame, e.g. FifoCI.
2019-12-22 11:54:34 +10:00
10e98d0985 Translation resources sync with Transifex 2019-12-21 12:13:24 +01:00
eea4e4385e Merge pull request #8528 from CaseyCarter/includes
Include <memory> for std::unique_ptr in DXContext.h
2019-12-19 17:29:43 -05:00
222bc6a443 Include <memory> for std::unique_ptr in DXContext.h 2019-12-19 14:25:12 -08:00
74dedc57fd Merge pull request #8519 from JosJuice/setupwiimemory-region-override
Boot: Optionally allow preserving region settings in setting.txt
2019-12-19 20:47:56 +10:00
6f5d770bdd Merge pull request #8524 from shuffle2/update-externals
Update externals
2019-12-19 20:41:49 +10:00
90223de536 Merge pull request #8526 from shuffle2/remove-x86
remove x86 targets from sln
2019-12-19 20:07:43 +10:00
d9c4bf499f remove x86 targets from sln 2019-12-19 00:43:48 -08:00