Commit graph

16800 commits

Author SHA1 Message Date
Lioncash
921ab22cb7 Boot: Remove unused game ID string 2017-02-12 07:55:49 -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
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
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
fda235b6e3 Buttons: Use a delegating constructor
Basic code deduplication
2017-02-10 19:52:15 -05: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
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
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
Léo Lam
fdfe57a49b IOS: Implement MIOS functionality
This implements MIOS's PPC bootstrapping functionality, which enables
users to start a GameCube game from the Wii System Menu.

Because we aren't doing Starlet LLE (and don't have a boot1), we can
just jump to MIOS when the emulated software does an ES_LAUNCH or uses
ioctlv 0x25 to launch BC.

Note that the process is more complex on a real Wii and goes through
several more steps before getting to MIOS:

* The System Menu detects a GameCube disc and launches BC (1-100)
  instead of the game. [Dolphin does this too.]

* BC, which is reportedly very similar to boot1, lowers the Hollywood
  clock speed to the Flipper's and then launches boot2.

* boot2 sees the lowered clock speed and launches MIOS (1-101) instead
  of the System Menu.

MIOS runs instead of IOS in GC mode and has an embedded GC IPL (which
is the code actually responsible for loading the disc game) and a PPC
bootstrap code. To get things working properly, we simply need to load
both to memory, then jump to the bootstrap code at 0x3400.

Obviously, because of the way this works, a real MIOS is required.
2017-02-08 15:07:34 +01:00
Léo Lam
4662e25cbb DolphinWX: Fix overclock slider clock display 2017-02-08 15:07:34 +01:00
Léo Lam
fd49a1b2d5 Get rid of GetUsbPointer for emulated Bluetooth
It held a raw pointer to a IOS::HLE::Device::BluetoothEmu that is not
guaranteed to exist (and of course, nothing checked that it wasn't
nullptr), but what is more, it's totally unnecessary because we have
IOS::HLE::GetDeviceByName().

Since we cannot always inform the host that Wii remotes are
disconnected from ES, that is now done in BluetoothEmu's destructor.
2017-02-08 15:07:33 +01:00
Léo Lam
5fd5eeb82a IOS/ES: Don't write anything to the request after ES_Launch
Unless IOS failed at ES_Launch, it doesn't appear to write anything
back to the request after a launch, because the request is never
actually replied to in the normal way.

So let's just drop the writes to make things less confusing.
2017-02-08 15:07:33 +01:00
Léo Lam
9e6f5b203e IOS/ES: Implement ioctlv 0x25 (ES_LaunchBC)
This ioctlv is used to launch BC. Not sure if that's useful,
since only the system menu is known to launch BC and it does that
through a regular ES_LAUNCH; but let's implement it anyway.

(Implementation based on IOS59.)
2017-02-08 15:07:32 +01:00
Léo Lam
ab38be1ee2 IOS: Clarify Init, Reinit, Reset, Shutdown
Some minor changes to make things slightly less confusing:

* Reinit doesn't actually init anything. It just adds static devices to
  the map, so let's give it an actually descriptive name. And let's not
  expose it in the header when it should not be.

* Reset's parameter name was changed from "force" -- which totally does
  not describe what it does -- to "clear_devices".

* Add a reload function which handles the reload process properly
  (reset all devices, set up memory values, re-add devices) and
  without publicly exposing implementation details.
2017-02-08 15:07:29 +01:00
Matt Mastracci
961f84b767 DVD read chunking
Splits DVD reads up into smaller chunks so that data is available
before the final interrupt is triggered. This better simulates the DMA
that happens on a real device, which some games will take advantage of -
by either playing back data as it is loading or by using data that is
going to be overwritten shortly by an outstanding read.
2017-02-08 14:18:55 +01:00
JosJuice
99492c22a6 Merge pull request #4839 from leoetlino/better-warnings
Be less annoying when usbdk is not installed
2017-02-08 14:00:12 +01:00
Markus Wick
027719d8e2 Merge pull request #4711 from lioncash/tables
JIT Instruction Tables: Eliminate JIT global usages
2017-02-08 09:39:50 +01:00
Michael Maltese
2d51bf579f ControlReference: put parsed_expression in a unique_ptr 2017-02-07 22:59:29 -08:00
Michael Maltese
492d5b6ac7 ControlReference: hide parse_error behind GetParseStatus() 2017-02-07 22:59:26 -08:00