Commit graph

20103 commits

Author SHA1 Message Date
Léo Lam
95aa48d086 IOS/ES: Implement AddTMD 2017-02-27 21:26:29 +01:00
Léo Lam
6327a29847 IOS/ES: Implement ES_Export* ioctlvs
This should allow channels to be copied to the SD properly.
2017-02-27 21:26:28 +01:00
Léo Lam
345d252ef3 IOS/ES: Deduplicate fields for opened content entries
Now that we have a proper Content structure for contents,
let's just use it instead of duplicating the fields.
2017-02-27 21:25:47 +01:00
Léo Lam
4e462d44f9 ESFormats: Fix GetRawTicketView
The vector was not constructed with the proper size, which results in a
buffer overflow as we were using memcpy.

This commit fixes that mistake and also uses a safer way of copying the
ticket view data (std::vector::insert instead of memcpy).
2017-02-27 21:19:05 +01:00
Anthony
c4137c2880 Merge pull request #4965 from leoetlino/delete-everything
IOS/ES: Implement DeleteTitle
2017-02-27 12:18:47 -08:00
Anthony
7ac95c2673 Merge pull request #4906 from leoetlino/es-launch
IOS: Handle ES_Launch more accurately
2017-02-27 11:51:43 -08:00
Léo Lam
fff4634a1c IOS: Handle ES_Launch more accurately
This commit fixes ES_Launch to work mostly the same as the real IOS
(except temporary, internal files such as /sys/launch.sys and title
handling; the latter will be handled in a future PR).

First of all, this adds two IOS functions, which correspond to two
IOS syscalls: 0x41 (boot_ppc) and 0x42 (boot_ios).

boot_ios() writes the new version to 0x3140, loads the new kernel,
which then proceeds to reinit IPC and load modules as part of its
boot process. Note that this doesn't include writing to any of the
other constants in the 0x3100 region.
In Dolphin, this is implemented by changing the active IOS
version variable, writing to 0x3140 and resetting all devices. This
has exactly the same effect as the real syscall.

The other syscall, boot_ppc(), writes code to the EXI boot buffer,
pokes all constants to memory before bootstrapping the PPC with a
binary from the NAND.
We skip the low level stuff and just load the DOL to memory (and set
the PPC's PC to 0x3400), which is essentially what IOS does.

The other change is mostly related to how ES_Launch is handled.

With a real IOS, if the launched title type is 00000001 (system) and
the title is not 1-2 (System Menu), ES calls boot_ios().

Otherwise, ES handles the launch as a PPC title. It reads the TMD
to determine the required IOS version. If it is the same, boot_ppc()
is called directly. If not, ES saves the title to launch to the NAND
before launching the new IOS. After the new IOS has finished booting,
it will notice the flag and then launch the requested title.

What this commit does is really just implement this logic into IOS HLE.
The result is a fix for a regression introduced by SetupMemory,
where reloading an IOS would have overwritten some OS constants.
This fixes booting games from the disc channel.
2017-02-27 20:44:30 +01:00
Anthony
ed6a46a193 Merge pull request #4958 from RisingFog/avidump_bitrate
Add configurable video dump bitrate to INI
2017-02-27 10:15:19 -08:00
Anthony
63c5230d9b Merge pull request #4959 from lioncash/ini
IniFile: Handle s64/u64 values
2017-02-27 10:02:53 -08:00
Anthony
0cac00a39c Merge pull request #4977 from ligfx/fixwxmainmenubar
DolphinWX: don't refresh MainMenuBar on construction
2017-02-27 09:42:01 -08:00
Anthony
b16cebc297 Merge pull request #4978 from ligfx/avidumpclosefiles
AVIDump[regression]: close avio handles
2017-02-27 09:39:40 -08:00
Jules Blok
f5d14e3691 Merge pull request #4933 from Armada651/disable-cache
VideoBackends: Add a developer option to disable the shader cache.
2017-02-27 17:35:01 +01:00
Léo Lam
ac43836714 IOS/ES: Implement DeleteTitle
No idea why this wasn't implemented whereas ES_DeleteTicket and
ES_DeleteTitleContent were.

This probably fixes title deletion in old System Menus, and maybe
the new ones as well in some cases; I've seen 4.3 use this ioctlv.
2017-02-27 15:32:31 +01:00
Michael Maltese
621472336c AVIDump[regression]: close avio handles 2017-02-26 23:26:31 -08:00
Matthew Parlane
d666363ac4 Merge pull request #4966 from RisingFog/remove_traversal_server_debug_mode
Turn Off Debug Mode for Traversal Server
2017-02-27 16:18:13 +13:00
Matthew Parlane
ca9504d0fa Merge pull request #4969 from leoetlino/clear-tmp
IOS: Clear the /tmp directory on IOS boot
2017-02-27 16:17:49 +13:00
Matthew Parlane
48aeb5bf4b Merge pull request #4896 from leoetlino/esformats
Use ESFormats for tickets, TMDs and views
2017-02-27 16:15:05 +13:00
Michael Maltese
720f0ab93f DolphinWX: don't refresh MainMenuBar on construction
On startup, wxWidgets pops up an assertion error:

> ./src/osx/menu_osx.cpp(648): assert ""IsAttached()"" failed in
> Refresh(): can't refresh unatteched menubar
2017-02-26 17:50:36 -08:00
Michael Maltese
a3e3986906 DolphinWX: provide empty OnCmdLineParsed
Starting in #4916, upon startup wxWidgets pops up an assertion error:

> ./src/common/cmdline.cpp(527): assert ""Assert failure"" failed in
> FindOptionByAnyName(): Unknown option verbose

Fix this by overriding wxApp::OnCmdLineParsed to disable the default
handling (since we also disable the default options in
DolphinApp::OnInitCmdLine).
2017-02-26 17:38:18 -08:00
Anthony
7bcff99d89 Merge pull request #4963 from leoetlino/sysconf
SysConf: Use vectors instead of raw pointers
2017-02-26 16:09:17 -08:00
Anthony
832e0501db Merge pull request #4960 from lioncash/type
ControlGroup: Convert group type enum into an enum class
2017-02-26 15:56:34 -08:00
Anthony
0dde642b7d Merge pull request #4917 from leoetlino/config
New configuration namespace
2017-02-26 15:54:25 -08:00
Anthony
06428c3f14 Merge pull request #4916 from leoetlino/cpp-optparse
Use cpp-optparse for command line parsing
2017-02-26 15:51:35 -08:00
Anthony
722ff4c020 Merge pull request #4915 from leoetlino/ini-changes
Expose some ways to manage an INI file
2017-02-26 15:48:53 -08:00
gamemasterplc
4c4a96bfc5 Widescreen Hack improvement
Fixes Projection alignment in some N64 VC games. The original code forgot to multiply rawProjection[1] and rawProjection[3].
2017-02-26 12:55:57 -06:00
Léo Lam
44a3db21e4 ES: Make sure the TMD and ticket are valid before use 2017-02-26 19:46:30 +01:00
Léo Lam
5104caf6a6 Move AES code to Common/Crypto 2017-02-26 19:46:30 +01:00
Léo Lam
c1a139e8ac Use ESFormats for TMDs
We already have a TMDReader, so let's actually use it.

And move ESFormats to IOS::ES, since it's definitely part of IOS.
This adds a DiscIO dependency on Core which will be fixed in a
follow-up PR.
2017-02-26 19:46:29 +01:00
Léo Lam
bf1f70db0a Move the ticket code to ESFormats
This moves some parsing code for tickets and ticket views to ESFormats
instead of duplicating it over DiscIO and Core.
2017-02-26 19:46:28 +01:00
JosJuice
a62711de55 Merge pull request #4968 from lioncash/const-parser
ExpressionParser: Const-correctness changes
2017-02-26 19:24:21 +01:00
JosJuice
6c869f7891 Merge pull request #4955 from leoetlino/wat
Fix the build on non-Windows platforms when not using WX from Externals
2017-02-26 19:19:06 +01:00
Léo Lam
31ebe9b080 IOS: Clear the /tmp directory on IOS boot
The /tmp directory is cleared every time IOS boots up (when the FS
driver is initialized), *not* when /dev/fs is opened.

Although this should have no effect, it fixes the case where files
could be left in /tmp and seen before opening /dev/fs.
2017-02-26 12:19:57 +01:00
Jules Blok
a15555fe03 VideoBackends: Use vertex shader depth range if ztexture is used. 2017-02-26 11:34:48 +01:00
Lioncash
f0203157d4 ExpressionParser: Const-correctness changes 2017-02-26 02:09:34 -05:00
Chris Burgener
bfb17d5a9e Add configurable video dump bitrate to INI 2017-02-25 23:58:21 -05:00
Chris Burgener
4669b50e0b Turn Off Debug Mode for Traversal Server 2017-02-25 23:41:12 -05:00
Léo Lam
a1e16c47db SysConf: Use vectors instead of raw pointers 2017-02-26 00:39:50 +01:00
Lioncash
26f17a1723 ControlGroup: Convert group type enum into an enum class
Gets some constants out of the ControllerEmu namespace, and modifies
ControlGroup so that it uses the enum type itself to represent the
underlying type, rather than a u32 value.
2017-02-25 01:15:04 -05:00
Lioncash
beec40f178 IniFile: Handle s64/u64 values 2017-02-25 00:03:20 -05:00
Markus Wick
51136681df Merge pull request #4953 from lioncash/fwd
CachedInterpreter: Forward declare instruction struct
2017-02-24 23:36:11 +01:00
Léo Lam
6702e547cb Fix the build on Linux when not using WX from Externals
No idea why we were including a Windows specific header *without* a
ifdef.
2017-02-24 18:48:26 +01:00
Jules Blok
bde8126913 VideoBackends: Remove depth range clamping hacks.
Oversized depth ranges are handled correctly now, we don't need to hack around them with clamps anymore.
2017-02-24 14:54:20 +01:00
Jules Blok
94522d4cf3 OGL: Add support for glDepthRangedNV to handle oversized depth ranges. 2017-02-24 14:54:16 +01:00
Markus Wick
1f04bab967 Merge pull request #4952 from ligfx/fix_10110
PatchEngine: check instruction at link addr is non-zero
2017-02-24 11:08:15 +01:00
Markus Wick
25fc7ed8c1 Merge pull request #4954 from lioncash/jitbase
JitBase: Put constructor and destructor in the cpp file
2017-02-24 11:05:57 +01:00
Lioncash
0783476464 CachedInterpreter: Forward declare instruction struct
Allows changes to be made to the instruction struct without recompiling
other source files.
2017-02-23 18:08:20 -05:00
Anthony
4e93002adb Merge pull request #4800 from JosJuice/movie-dual-core-determinism
Remove special condition for auto dual core determinism
2017-02-23 13:19:39 -08:00
Anthony
ba5f1c6f59 Merge pull request #4864 from JosJuice/idws-on-temp-nand-only
WiiRoot: Only call InitializeDeterministicWiiSaves on temporary NAND
2017-02-23 13:18:23 -08:00
Anthony
27a5e33b92 Merge pull request #4877 from ligfx/forward_declare_xlib
Remove include X11/Xlib.h from X11Utils.h
2017-02-23 13:17:37 -08:00
Anthony
ecb7d01347 Merge pull request #4889 from ligfx/netwindow
NetWindow: explicitly tell wxWidgets to clean up Windows macros
2017-02-23 13:16:59 -08:00
Anthony
e9850382e3 Merge pull request #4930 from JosJuice/sideways-wiimote-name
Change INI keys containing "Wii Remote" back to "Wiimote"
2017-02-23 13:13:43 -08:00
Anthony
fb8369d0e0 Merge pull request #4950 from leoetlino/set-remotes-before-booting
Netplay: Change Wiimote sources before booting
2017-02-23 13:13:13 -08:00
Lioncash
359528b805 JitBase: Put constructor and destructor in the cpp file
As this is a base class with virtuals, there needs to be an out-of-line
function definition to prevent the vtable of the class being placed within
every translation unit it's used in (i.e. every JIT implementation).
2017-02-23 13:50:47 -05:00
Léo Lam
88a21dd2b9 Fix things mentioned during code review
Ref: https://github.com/dolphin-emu/dolphin/pull/4917
2017-02-23 18:15:12 +01:00
Léo Lam
abe6f8766a Config: Add a few helper functions for repetitive tasks
Getting and setting configuration from the base config layer are common
and repetitive tasks. This commit adds some simpler to use functions to
make the new system easier to work with.

Config::Get and Config::Set are intended to make switching from
SConfig a bit less painful. They always operate on the main system.

Example usage:

    // before
    auto base_layer = Config::GetLayer(Config::LayerType::Base);
    auto core = base_layer->GetOrCreateSection(Config::System::Main, "Core");
    u8 language;
    core->Get("Language", &language, 0);
    SetData("IPL.LNG", language);

    // now
    auto base_layer = Config::GetLayer(Config::LayerType::Base);
    auto core = base_layer->GetOrCreateSection(Config::System::Main, "Core");
    SetData("IPL.LNG", core->Get<u8>("Language", 0));

    // or simply
    SetData("IPL.LNG", Config::Get<u8>("Core", "Language", 0));
2017-02-23 18:15:12 +01:00
Léo Lam
7bd34ac0b5 Config: Trigger callbacks on layer save
And remove an extraneous callback trigger in Config::Load.
2017-02-23 18:15:12 +01:00
Léo Lam
9c3265f1ef Config: Keep track of deleted keys
This allows deleted keys to be deleted from INIs properly.
2017-02-23 18:15:12 +01:00
Léo Lam
b51c6023ba Config: Only save settings if they have been changed 2017-02-23 18:15:12 +01:00
Ryan Houdek
8360e358ee New configuration namespace 2017-02-23 18:15:11 +01:00
Anthony
f7a09c41a1 Merge pull request #4941 from JosJuice/no-compressed-color
DolphinWX: Don't use a special color for compressed games
2017-02-23 07:17:48 -08:00
Markus Wick
0a3a2fe155 Merge pull request #4922 from sepalani/more_format
HLE: More printf floating point types handled
2017-02-23 11:03:32 +01:00
Markus Wick
1fc2edae51 Merge pull request #4928 from lioncash/const
PPCAnalyst: Make SetInstructionStats' opinfo parameter a const pointer
2017-02-23 10:55:58 +01:00
Markus Wick
25a569e6e9 Merge pull request #4929 from lioncash/symboldb
SymbolDB: Simplify GetSymbolsFromHash
2017-02-23 10:55:28 +01:00
Markus Wick
ae8010caff Merge pull request #4943 from lioncash/const-table
JIT: Make initialization instruction tables const
2017-02-23 10:27:21 +01:00
Markus Wick
51b654ed00 Merge pull request #4945 from lioncash/jit-global
DolphinWX: Eliminate direct usage of the JIT global
2017-02-23 10:24:55 +01:00
Markus Wick
d4453db2ea Merge pull request #4946 from lioncash/naming
JitInterface: Amend ExceptionType enum value names
2017-02-23 10:23:37 +01:00
Michael Maltese
da35abbbe2 PatchEngine: check instruction at link addr is non-zero
Regression introduced in #4738. Fixes
https://bugs.dolphin-emu.org/issues/10110.
2017-02-22 21:14:57 -08:00
Léo Lam
fb46520c74 Netplay: Change Wiimote sources before booting
It is kind of silly to connect all of the configured Wii remotes (from
the user config; NOT netplay assigned remotes), then connect/disconnect
additional Wii remotes *after* the core has booted.

(The bWii check has been removed, because it's actually unneeded;
m_wiimote_map is always usable regardless of bWii. And we can't get
info about the currently running game without booting the core with our
current config system…)

This should fix Netplay trying to connect all configured Wii remotes.
2017-02-22 22:52:13 +01:00
JosJuice
9b0ce31906 Merge pull request #4948 from leoetlino/file
IOS/FFSP: Fix the "past EOF" check
2017-02-22 22:43:40 +01:00
Markus Wick
fa9b89fdf9 Merge pull request #4911 from degasus/ABI
JitArm64: Extract block exit link area generation.
2017-02-22 22:26:08 +01:00
Mat M
c81cf111ef Merge pull request #4921 from waddlesplash/netmap
IOS/Network/Net: Use a conversion function instead of a static array for SOCKOPT mapping
2017-02-22 16:11:53 -05:00
Léo Lam
b0a132875a IOS/FFSP: Fix the "past EOF" check
Fixes a logic bug I introduced as part of #4942. We were not
handling the "read past EOF" case correctly, which caused
requested_read_length to underflow in some cases.

Also fixes a comparison (though this is unlikely to change anything).
2017-02-22 20:54:02 +01:00
Augustin Cavalier
806bb2a4d0 IOS/Network/Net: Use a mapper function instead of a static array for SOCKOPT mapping.
Some platforms (e.g. Haiku) define SOL_SOCKET to be -1, which obviously
does not work with static arrays. Plus, this is cleaner.
2017-02-22 10:55:38 -05:00
Lioncash
70d336d2a9 DolphinWX: Eliminate direct usage of the JIT global
Instead, the JitInterface namespace functions should be used instead. This
gets rid of all usages of the JIT global from the wxWidgets UI code.

The null check isn't needed as the JIT core would already need to be
initialized in order to be within a paused state. The null check is just a
remnant from 2011 that existed before the check for a paused state was
added.
2017-02-21 16:15:47 -05:00
JMC47
d320a2a067 Force Wallace and Gromit to use smaller memcard. 2017-02-21 16:09:49 -05:00
Lioncash
ff0f60c9f9 JitInterface: Amend ExceptionType enum value names
Since ExceptionType is an enum class, its name already acts like the
common prefix.
2017-02-21 15:40:00 -05:00
Mat M
95b2b033b0 Merge pull request #4925 from RisingFog/remove_readonly_check
Remove IsReadOnly check when stop recording
2017-02-21 10:53:24 -05:00
Lioncash
f65c34d63d JitArm64_Tables: Make initialization instruction tables constexpr 2017-02-21 10:23:39 -05:00
Lioncash
4b342fbbfc JitIL_Tables: Make initialization instruction tables const 2017-02-21 09:55:08 -05:00
Lioncash
092d21253d Jit64_Tables: Make initialization instruction tables const 2017-02-21 09:54:51 -05:00
Pierre Bourdon
8e3e1e7750 Merge pull request #4942 from leoetlino/ios-ffsp-read
IOS/FFSP: Fix the read handler logic
2017-02-21 11:46:30 +01:00
Jules Blok
28e6e259ed VideoBackends: Set the maximum range when the depth range is oversized.
The depth values generated by the vertex shader need to be clamped correctly.
2017-02-21 02:57:23 +01:00
Léo Lam
a6649da088 IOS/FFSP: Fix the read handler logic
This changes the read request handler to work just like IOS:

* To make things clearer, we now return early from error conditions,
  instead of having nested ifs.

* IOS does an additional check on the requested read length, and
  substracts the current seek position from it, if the read would
  cause IOS to read past the EOF (not sure what the purpose of this
  check is, but IOS does it, so we should too).

* The most significant one: IOS does *not* return the requested read
  length, or update the file seek position with it. Instead, it uses
  the *actual* read length.

As a result of simply doing what IOS does, this fixes _Mushroom Men_.
The game creates a save file, reads 2560 bytes from it, then
immediately writes 16384 bytes to it. With IOS, the first read does not
change the seek position at all, so the save data is written at
offset 0, not 2560. With Dolphin, the read erroneously set the
seek position to 2560, which caused the data to be written at
the wrong location.

Behavior confirmed by comparing IPC replies with IOS LLE and by looking
at the FS module in IOS.
2017-02-20 23:13:15 +01:00
Mat M
6fbb23e365 Merge pull request #4938 from sjnewbury/GCC7-build-fix
Add missing "functional" include for GCC7
2017-02-20 10:51:10 -05:00
JosJuice
a7e11db4bf DolphinWX: Remove usage of IsCompressed() in compression code
What we actually care about is whether it's a GCZ file,
not whether it's compressed. (This commit doesn't change
the behavior, since the beginning of CompressSelection
discards items that aren't BlobType::GCZ or BlobType::PLAIN.)
2017-02-20 16:08:07 +01:00
JosJuice
b1589a6337 DolphinWX: Don't use a special color for compressed games
- There's no clear definition of what it means for a GC/Wii game
  to be compressed. GC games in GCZ are obviously compressed,
  but what about formats like WBFS and CISO that just discard data?
- Hardcoded colors might have bad contrast with the used theme.
- It feels Windows XP to me.
2017-02-20 16:02:30 +01:00
Steven Newbury
02681bc352 Add missing "functional" include
Building fails on GCC7 without an explicit
2017-02-20 14:25:55 +00:00
Pierre Bourdon
f07a6944d1 Merge pull request #4934 from leoetlino/es-cfd
IOS/ES: Fix the initial content FD value
2017-02-20 12:40:00 +01:00
Léo Lam
696e493acc IOS/ES: Fix the initial content FD value
YYCJ is one of the last titles to be completely broken in Dolphin.
It would hang right after the Wii remote screen. Looking at the
game's debug messages reveals that it was failing to find some of
its files.

IOS LLE booted the game just fine, which confirmed that it was an issue
with IOS HLE.

By comparing the ioctlv requests and responses with IOS, it turns out
that one of the very first ES replies was different between IOS HLE and
IOS: there was a mismatch for the content fd returned by ES.

Changing the initial content FD to what IOS returns fixes the issue.

IOS
000000: 00 00 00 08 00 00 00 00 00 00 00 07 00 00 00 09  ................
000010: 00 00 00 01 00 00 00 00 01 38 66 f0 00 00 00 20  .........8f....
000020: 00 00 00 00 00 00 00 00 00 00 00 00 81 36 d3 18  .............6..
000030: 81 36 d3 18 00 00 ff ff ff ff ff ff ff ff ff ff  .6..............

Dolphin
000000: 00 00 00 08 06 00 00 00 00 00 00 07 00 00 00 09  ................
000010: 00 00 00 01 00 00 00 00 01 38 66 f0 00 00 00 20  .........8f....
000020: 00 00 00 00 00 00 00 00 00 00 00 00 81 36 d3 18  .............6..
000030: 81 36 d3 18 00 00 ff ff ff ff ff ff ff ff ff ff  .6..............

So where did 0x6000000 come from?
2017-02-19 15:46:51 +01:00
Jules Blok
21967b1f6e VideoBackends: Add a developer option to disable the shader cache.
Makes it easier to disable the cache while working on the shaders.
2017-02-19 12:05:44 +01:00
JosJuice
298e81881f Forward declare IBlobReader in Volume headers
We have to do this (or include Blob.h) since the
constructors take unique_ptr<IBlobReader> parameters.
2017-02-19 08:40:30 +01:00
JosJuice
f5c82adc59 Change INI keys containing "Wii Remote" back to "Wiimote"
4bd5674 changed "Wiimote" to "Wii Remote" in the GUI
(intentionally) but also did the same change for two INI
keys (seemingly unintentional, breaks backwards compatibility,
and is inconsistent with the INI's filename). This commit
reverts the INI keys but not the GUI strings.

This commit uses the same approach as cbd539e used for GameCube
sticks (but I made sure to avoid the bug that 56531a0 fixed).
2017-02-18 12:59:36 +01:00
Stenzek
b8eb1080ce Merge pull request #4924 from stenzek/vulkan-list-restart
Vulkan: Fix GPU hangs on AMD Polaris
2017-02-18 21:58:30 +10:00
Markus Wick
6acad27919 Merge pull request #4927 from lioncash/unique-ptr
VertexManagerBase: Make CreateNativeVertexFormat return a unique_ptr
2017-02-18 12:40:00 +01:00
Lioncash
2f2aab963d SymbolDB: Simplify GetSymbolsFromHash
Given a std::map can't have duplicate keys, iterating over the map
explicitly isn't necessary, and find() can just be used instead.

Also, instead of manually calling push_back() for every entry to
be added, the range constructor of std::vector can be used instead to add
the whole range all at once.
2017-02-18 06:30:20 -05:00
Lioncash
aaa6430db6 PPCAnalyst: Make SetInstructionStats' opinfo parameter a const pointer
trivial const-correctness stuff
2017-02-18 04:14:26 -05:00
Lioncash
1fa81f24d3 VertexManagerBase: Make CreateNativeVertexFormat return a unique_ptr
Much safer as opposed to just returning raw allocated memory.
2017-02-18 03:16:24 -05:00
Matthew Parlane
5814d23fd9 Merge pull request #4926 from lioncash/net
IOS Network: Split ncd/manage code and wd/command code into their own source files
2017-02-18 21:13:24 +13:00
Matthew Parlane
4da7164f66 Merge pull request #4596 from ligfx/updateffmpeg
AVIDump: Updates to avoid deprecation warnings
2017-02-18 21:12:37 +13:00
Lioncash
a8eb2e2a8f IOS Network: Split wd/command code into its own source files 2017-02-18 02:35:53 -05:00
Stenzek
e2ddb3853e DriverDetails: Set BUG_PRIMITIVE_RESTART for AMD drivers 2017-02-18 15:07:35 +10:00
Stenzek
50fa135594 Vulkan: Handle BUG_PRIMITIVE_RESTART 2017-02-18 15:07:34 +10:00
Stenzek
4094268009 Vulkan: Use TRIANGLE_LIST when primitive restart is not supported 2017-02-18 15:07:33 +10:00
Stenzek
6965dc0481 Vulkan: Don't enable primitive restart on list topologies 2017-02-18 15:07:32 +10:00
Lioncash
ec298d9ea9 IOS Network: Split ncd/manage code into its own source files 2017-02-17 23:55:33 -05:00
Chris Burgener
8bfe2671b2 Remove IsReadOnly check when stop recording 2017-02-17 23:23:42 -05:00
Mat M
82734fffaa Merge pull request #4910 from lioncash/netsplit
IOS Network: Move net/ip/top code into its own source files
2017-02-17 22:42:28 -05:00
degasus
674e7430d0 JitArm64: Extract block exit link area generation.
Always use 3 instructions on linking.
2017-02-17 23:07:28 +01:00
Sepalani
5f7002da5c HLE: More printf floating point types handled 2017-02-17 10:51:10 +00:00
Léo Lam
aa9ed91bc8 IOS: Add constants for IOS40
This adds memory constants for IOS40.

We should now support every system menu, courtesy of Bent82:
https://github.com/dolphin-emu/dolphin/pull/4907#issuecomment-280433023
2017-02-16 20:50:02 +01:00
ntruhan
3d8ab184ac Android: Sort configuration ini files 2017-02-16 13:08:00 -05:00
Ryan Houdek
c2d5fe3ec9 Move DolphinWX over to command command line parsing. 2017-02-16 17:24:59 +01:00
Ryan Houdek
36a9479c17 Change NoGUI over to using common command line parsing 2017-02-16 17:24:58 +01:00
Ryan Houdek
f61363a791 Add command line parsing to UICommon. 2017-02-16 17:24:58 +01:00
Ryan Houdek
77c7fa836f Add the cpp-optparse project to Externals.
From https://github.com/weisslj/cpp-argparse
2017-02-16 14:09:13 +01:00
Ryan Houdek
85c3e677da Expose some ways to manage an INI file.
This is required for our later INI file loaders and savers
2017-02-16 09:34:25 +01:00
Ryan Houdek
a2f5c3dbe0 Add some missing INI files to FileUtil 2017-02-16 09:33:50 +01:00
Phil Christensen
34b0b1b9d6 wxWidgets expects non-const
revert my previous change to these files and instead create a named temporary.
2017-02-15 21:20:29 -08:00
Phil Christensen
2ed61b0ee1 C++ conformance fixes (MSVC /permissive-)
We (the Microsoft C++ team) use the dolphin project as part of our "Real world code" tests.
I noticed a few issues in windows specific code when building dolphin with the MSVC compiler
in its conformance mode (/permissive-).  For more information on /permissive- see our blog
https://blogs.msdn.microsoft.com/vcblog/2016/11/16/permissive-switch/.

These changes are to address 3 different types of issues:

1) Use of qualified names in member declarations

    struct A {
        void A::f() { } // error C4596: illegal qualified name in member declaration
                        // remove redundant 'A::' to fix
    };

2) Binding a non-const reference to a temporary

    struct S{};
  
    // If arg is in 'in' parameter, then it should be made const.
    void func(S& arg){}
  
    int main() {
      //error C2664: 'void func(S &)': cannot convert argument 1 from 'S' to 'S &'
      //note: A non-const reference may only be bound to an lvalue
      func( S() );
   
      //Work around this by creating a local, and using it to call the function
      S s;
      func( s );
    }

3) Add missing #include <intrin.h>

Because of the workaround you are using in the code you will need to include
this.  This is because of changes in the libraries and not /permissive-
2017-02-15 20:37:04 -08:00
Michael Maltese
88f7056a41 Remove include Xlib.h from X11Utils.h 2017-02-15 16:49:21 -08:00
JosJuice
f80f7b6f9c Merge pull request #4883 from JosJuice/dvd-timing-address-translation-2
DVDInterface: Translate Wii partition offsets for timing purposes
2017-02-15 21:12:42 +01:00
JosJuice
339f6e353d Merge pull request #4907 from leoetlino/ios-constants
IOS: Add constants for some missing IOSes
2017-02-15 21:09:42 +01:00
Lioncash
92e17d2eb8 IOS: Move net/ip/top code to its own source files 2017-02-15 14:42:43 -05:00
Lioncash
245de3fa4f IOS: Move network MAC utilities to their own source files
All three implementations within Net.cpp currently rely on these
functions.
2017-02-15 13:38:52 -05:00
Lioncash
0da963c32c NetKDRequest: Make lookup maps const 2017-02-15 11:50:37 -05:00
Mat M
6f272b3a4c Merge pull request #4862 from lioncash/compile
CPU Backends: Make instruction table initialization private
2017-02-15 11:44:37 -05:00
Mat M
8fd16db80d Merge pull request #4778 from leoetlino/update-mbedtls
Externals: Update mbedtls to 2.4.1
2017-02-15 11:30:18 -05:00
Mat M
5a53763c1a Merge pull request #4892 from lioncash/control
Control: Convert raw pointer parameter into unique_ptr
2017-02-15 11:26:53 -05:00
Mat M
3d1f00e98d Merge pull request #4874 from ligfx/movie_magic_number
Movie: replace magic number 8 with sizeof(ControllerState)
2017-02-15 11:25:26 -05:00
Mat M
28a6575244 Merge pull request #4900 from lioncash/netkd
IOS: Separate net/kd code out from Net.cpp
2017-02-15 11:21:01 -05:00
Mat M
30ee4dfcdf Merge pull request #4908 from leoetlino/apostrophe
Remove C++14 optional digit separator
2017-02-14 11:06:08 -05:00
Markus Wick
032b6252a0 Merge pull request #4875 from degasus/ABI
JitArm64: Optimize GPR register push/pop and fix the FPR one.
2017-02-14 17:02:17 +01:00
Léo Lam
089f45212e IOS: Add constants for some missing IOSes
This adds memory values for IOS11, 20, 30, 50, 51, 52, 60 and 70.

Unfortunately, IOS40 (in its working version) is not present on NUS, so
constants for that one are still missing.
2017-02-14 12:18:58 +01:00
Anthony
f966354044 Merge pull request #4898 from RisingFog/stop_recording_dtm
Add Stop Play/Recording Input Menu
2017-02-13 14:10:23 -08:00
Mat M
f68955502a Merge pull request #4905 from JosJuice/rename-copy-wii-save
Rename "Copy Wii Save" to "Load Wii Save"
2017-02-13 09:55:54 -05:00
Léo Lam
1aae7fb9c8 Remove C++14 optional digit separator
It confuses GitHub and localization tools. And some people as well.
2017-02-13 14:25:14 +01:00
Matthew Parlane
d1ade5de22 Merge pull request #4904 from JosJuice/oh0-usb-state-warning
Don't show savestate USB warning when not using USB passthrough
2017-02-13 14:36:26 +13:00
JosJuice
fc798ca410 Rename "Copy Wii Save" to "Load Wii Save"
That netplay uses a separate NAND isn't obvious,
so what "copy" means might not be clear.
2017-02-12 18:40:54 +01:00
JosJuice
8a6b8f7b53 Don't show savestate USB warning when not using USB passthrough 2017-02-12 18:16:26 +01:00
Pierre Bourdon
047394c099 Merge pull request #4903 from leoetlino/usb-kbd-stub
IOS/USB_KBD: Re-add the Write stub handler
2017-02-12 16:33:02 +01:00
Léo Lam
5add8c23ee IOS/USB_KBD: Re-add the Write stub handler
This is something I removed by mistake. It didn't break anything in
most titles, but the Mii Channel *requires* write requests to
/dev/usb/kbd to succeed before exiting, so this commit readds the stub.
2017-02-12 16:00:50 +01:00
Mat M
da5683cf27 Merge pull request #4880 from ligfx/windowsmanifest
Use .manifest file for apps on Windows
2017-02-12 08:44:38 -05:00
JosJuice
5e799fd469 Merge pull request #4902 from lioncash/unused
Boot: Remove unused game ID string
2017-02-12 14:20:05 +01:00
Lioncash
921ab22cb7 Boot: Remove unused game ID string 2017-02-12 07:55:49 -05:00
Léo Lam
b8dd3e690f Externals: Update mbedtls to 2.4.1
The latest version has tons of security fixes (which is expected for a
library such as mbedtls).

Updating also allows getting rid of a few deprecation warnings.
2017-02-12 10:29:02 +01:00
JosJuice
49ec22bc42 DVDInterface: Translate Wii partition offsets for timing purposes
Until now, Dolphin has been using the wrong values
for calculating DVD timing for decrypted Wii reads
(which Wii games essentially always use).
2017-02-12 09:37:39 +01:00
Lioncash
40cea773bc IOS: Separate net/kd code out from Net.cpp
Net.cpp is just a huge glob of network related things, this separates the
KD portion out to make things a little more manageable.
2017-02-11 23:09:08 -05:00
Lioncash
1a99e70ed7 Force: Use std::array for m_swing 2017-02-11 20:22:50 -05:00
Lioncash
df3a4580ea Tilt: Use std::array for m_tilt 2017-02-11 20:22:42 -05:00
Mat M
0e961776e6 Merge pull request #4879 from orbea/llvm
CMake: Fix LLVM error
2017-02-11 20:07:34 -05:00
Mat M
3e016ecc1d Merge pull request #4888 from leoetlino/good-bye-singleton
Get rid of a singleton for NAND shared contents
2017-02-11 20:02:52 -05:00
Mat M
9cdb07b2ef Merge pull request #4886 from leoetlino/no-prefix
FileIO: Minor cleanup
2017-02-11 20:00:58 -05:00
Mat M
295600c86e Merge pull request #4884 from leoetlino/wii-connect-on-boot
Fix connecting Wii remotes on boot
2017-02-11 19:59:50 -05:00
Chris Burgener
28c9f2a44d Add Stop Play/Recording Input Menu 2017-02-11 19:59:19 -05:00
Mat M
daed1189d9 Merge pull request #4891 from ligfx/cmakewarnings
CMake: use _SCL_SECURE_NO_WARNINGS instead of _SECURE_SCL=0
2017-02-11 19:55:37 -05:00
Anthony
bb82586a3d Merge pull request #4897 from JosJuice/correct-es-comment
Correct the comment about the number of ES devices
2017-02-11 10:27:35 -08:00
JosJuice
aaa8ad330a Correct the comment about the number of ES devices 2017-02-11 17:13:42 +01:00
JosJuice
c96bcace2f VolumeWiiCrypted: Use constant naming style for constants 2017-02-11 12:56:48 +01:00
JosJuice
d19aabb55b Merge pull request #4895 from lioncash/const
ControllerEmu: Add const to UpdateReferences() first reference parameter
2017-02-11 09:27:37 +01:00
JosJuice
e568d57022 Merge pull request #4894 from lioncash/private
Cursor: Make m_z private
2017-02-11 09:26:30 +01:00
Léo Lam
81b1425b52 Remove useless Wiimote reconnect code on ES_Launch
Turns out it is completely unneeded and it actually works better
*without* it.

Just try launching the system menu from the HBC; in current master, it
will disconnect the remote and not connect it automatically again. With
this change, it will.
2017-02-11 09:02:32 +01:00
Léo Lam
c14becd575 Fix connecting Wii remotes on boot
The recent IOS initialization changes caused the Bluetooth device to
no longer exist before "starting" IOS (as it should be…), which meant
that Core could not activate Wii remotes during the boot process
anymore.

But that is actually completely useless, because we can just have the
emulated Bluetooth code itself activate Wii remotes as appropriate,
at the right moment.
2017-02-11 08:58:47 +01:00
Lioncash
98145d2160 ControllerEmu: Add const to UpdateReferences() first reference parameter
None of these parameters are modified.
2017-02-11 00:31:49 -05:00
Lioncash
e4bdc88494 Cursor: Make m_z private
This isn't used directly anywhere (and really shouldn't be public
anyways).
2017-02-10 23:57:50 -05:00
orbea
6913e8c3ac Fix LLVM error 2017-02-10 19:07:30 -08:00
Lioncash
3c071cefa0 Boot_WiiWAD: Simplify state_checksum
Simplifies the interface and gets rid of pointer casts.
2017-02-10 21:14:39 -05:00
Lioncash
fda235b6e3 Buttons: Use a delegating constructor
Basic code deduplication
2017-02-10 19:52:15 -05:00
Lioncash
d07d9f3110 Control: Convert raw pointer parameter into unique_ptr
Raw pointers shouldn't be used as boundaries in scenarios where ownership
is being taken.
2017-02-10 19:35:02 -05:00
Michael Maltese
df0a0c857d CMake: use _SCL_SECURE_NO_WARNINGS instead of _SECURE_SCL=0
_SECURE_SCL is deprecated (and doesn't seem to disable warnings anymore
with Visual Studio 2015).
2017-02-10 16:28:39 -08:00
Michael Maltese
2b65e41d97 NetWindow: explicitly tell wxWidgets to clean up Windows macros
wxWidgets headers don't play well with some of the macros defined in
Windows headers and perform their own magic to fix things, as long as
they're included entirely either before or after any Windows headers.

This file can cause a conflict in other DolphinWX files because NetPlay
headers directly include ENet headers, which leak Windows header macros.
To fix this, explicitly tell wxWidgets here that it needs to re-clean
macros.
2017-02-10 16:14:25 -08:00
degasus
8829af62cb JitArm64: Fix for stack push/pop ABI. 2017-02-11 00:59:12 +01:00
degasus
6aa54a029e JitArm64: Optimize GPR register push/pop. 2017-02-11 00:59:12 +01:00
Michael Maltese
715170759c Use .manifest file for apps on Windows
Works with CMake, and also adds DPI awareness to DolphinQt2 (which
wasn't enabled before).
2017-02-10 14:18:45 -08:00
Léo Lam
850802ea88 Get rid of a singleton for NAND shared contents
This also allows shared contents to be installed to the configured root
when installing a WAD.
2017-02-10 22:46:38 +01:00
Léo Lam
f96d71ce81 FileIO: Simplify Seek()
We can return early from invalid conditions, which allows getting rid
of quite a few levels of indentation.

And let's not duplicate the new_position > file_size check.
2017-02-10 21:06:23 +01:00
Léo Lam
ca4d2969a0 Remove the HLE_IPC prefix from some functions
Those were left over during the namespacing.
2017-02-10 20:58:41 +01:00
Lioncash
68dcb0f195 ControlReference: Add missing virtual destructor
ControllerEmu::Control instances have a unique_ptr<ControlReference>
member, which is passed either an InputReference or OutputReference.

Without this virtual destructor, deleting a derived class through a
pointer to the base class is undefined behavior.
2017-02-10 13:58:44 -05:00
Mat M
f6d364e37b Merge pull request #4873 from lioncash/controller-emu
ControllerEmu: Separate ControlGroup from ControllerEmu
2017-02-10 13:50:33 -05:00
Anthony
8f81051df3 Merge pull request #4882 from leoetlino/elf-fix
Fix booting Wii DOLs
2017-02-10 10:21:08 -08:00
Léo Lam
328359118c Fix booting Wii DOLs
We did not set up any kind of constants in memory for Wii DOLs or even
initialize IOS, so a lot of homebrew would just crash when opening ES.
2017-02-10 19:14:34 +01:00
Léo Lam
7a1f676ef4 Always use configured root when installing WAD
This prevents Dolphin from writing to /sys/uid.sys (on the host; root
partition) when installing a WAD before starting emulation, because
the session root is not initialized at that moment.

Incidentally, this also gets rid of a singleton.
2017-02-10 19:12:08 +01:00
Lioncash
1ce1304d0f CPU Backends: Make each CPU backend responsible for initializing its own
instruction tables

Previously, all of the internals that handled how the instruction tables
are initialized were exposed externally. However, this can all be made
private to each CPU backend.

If each backend has an Init() function, then this is where the instruction
tables should be initialized, it shouldn't be the responsibility of
external code to ensure internal validity.

This allows for getting rid of all the table initialization shenanigans
within JitInterface and PPCTables.
2017-02-10 13:08:14 -05:00
Lioncash
5da7d700ca JIT: Make compilation functions a part of the JIT classes 2017-02-10 13:05:44 -05:00
Anthony
96e83b5d54 Merge pull request #4764 from aldelaro5/crash-fix-inputconfig
InputConfigDialog pass the device_cbox to the wiimote extension dialogs
2017-02-09 21:50:44 -08:00
degasus
4d3883a756 JitArm64: Handle stack faults. 2017-02-10 00:32:21 +01:00
degasus
40b7cc9252 JitArm64: Use a custom stack with proper guard pages. 2017-02-10 00:32:17 +01:00
Lioncash
6a75ea5653 ControllerEmu: Separate ControlGroup from ControllerEmu
ControllerEmu, the class, is essentially acting like a namespace for
ControlGroup. This makes it impossible to forward declare any of the
internals. It also globs a bunch of classes together which is kind of a
pain to manage.

This splits ControlGroup and the classes it contains into their own source
files and situates them all within a namespace, which gets them out of
global scope.

Since this allows forward declarations for the once-internal classes, it
now requires significantly less files to be rebuilt if anything is changed
in the ControllerEmu portion of code.

It does not split out the settings classes yet, however, as it
would be preferable to make a settings base class that all settings derive
from, but this would be a functional change -- this commit only intends to
move around existing code. Extracting the settings class will be done in
another commit.
2017-02-09 18:18:52 -05:00
Michael Maltese
31e3424367 Movie: replace magic number 8 with sizeof(ControllerState)
(Bonus points for rhyming commit message)
2017-02-09 15:07:47 -08:00
JosJuice
657639899f Merge pull request #4872 from lioncash/scan
GameListCtrl: Separate some scanning code into functions
2017-02-09 20:56:29 +01:00
Lioncash
ea6e75d45f GameListCtrl: Separate some scanning code into functions
Several of the things done while performing a scan are logically their own
behavior (e.g. loading a titles file, checking if an entry should be added, etc).
2017-02-09 14:50:20 -05:00
Lioncash
56531a0b7f ControllerEmu: Fix incorrect default radius being set in AnalogStick
The three parameter AnalogStick constructor takes an internal name, a
display name, and a default radius argument. The delegated constructor is
the one that calls the ControlGroup constructor, setting the group type,
so passing the group type here is a logic bug.

The only reason this appeared to work despite this bug is because
GROUP_TYPE_STICK has a value of 1, and the default radius value used for
attachment sticks is 1.0.
2017-02-08 23:08:13 -05:00
Mat M
73382852b7 Merge pull request #4502 from ligfx/extractcontrolreference
InputCommon: Extract ControlReference from ControllerInterface
2017-02-08 20:01:18 -05:00
Pierre Bourdon
17e4b450fb Merge pull request #4784 from leoetlino/mios
IOS: Implement MIOS functionality
2017-02-09 01:57:16 +01:00
JosJuice
01073946b4 Fix default audio backend on Android being "No audio output"
People who already have encountered the problem will need to
manually change the audio backend (or delete the config INI).
2017-02-08 21:29:27 +01:00
Lioncash
90273191da Boot: Add missing includes 2017-02-08 10:57:24 -05:00
Lioncash
3b41d4806c Boot_BS2Emu: Get rid of unnecessary headers 2017-02-08 10:57:16 -05:00
Lioncash
57d543b10a ElfReader: Get rid of unnecessary includes 2017-02-08 10:57:10 -05:00
Lioncash
95a918b9f8 Boot_WiiWAD: Get rid of unnecessary includes 2017-02-08 10:43:50 -05:00
Léo Lam
a085cd431d Adjust event times after a PPC clock change
This likely doesn't change much, but it makes events trigger at the
correct time after a clock change.
2017-02-08 16:22:27 +01:00
Lioncash
e6ffce3ac9 ElfReader: Make constructor explicit
Allowing implicit conversions here is definitely not desirable.
2017-02-08 10:20:06 -05:00