10157 Commits

Author SHA1 Message Date
Léo Lam
b63b6111b3 IOS: Implement USB_VEN (/dev/usb/ven) 2017-02-05 11:36:49 +01:00
Léo Lam
c9f4889437 IOS: Re-implement USB_HIDv4 (/dev/usb/hid)
This reimplements the USB HID v4 IOS device using the new common
USB code (to reuse more code and allow emulated HIDs to be added
more easily in the future).

The main difference is that HIDs now have to be whitelisted, like
every other USB device for OH0 and VEN.
2017-02-05 11:36:49 +01:00
Léo Lam
ee188a1d5a IOS: Implement OH0 (/dev/usb/oh0) 2017-02-05 11:36:48 +01:00
Léo Lam
c8a6dc6c23 Use a single libusb context
libusb on Windows is limited to only a single context. Trying to open
more than one can cause device enumerations to fail randomly.

libusb is thread-safe and we don't use the manual polling support (with
`poll()`) so this should be safe.
2017-02-05 11:36:48 +01:00
Léo Lam
73e55ccf44 IOS: Add base Host and USB::Device classes
The Host class will be used by the OH0, VEN and HID implementations
as the base class for the IOS HLE device. It handles scanning devices,
detecting device changes and everything that will be needed for OH0,
VEN and HID to be implemented, while mostly abstracting libusb away.

The Device class is for actual USB devices. This commit adds a
LibusbDevice which interacts with a real USB device and enables
USB passthrough.
2017-02-05 11:36:47 +01:00
Léo Lam
b8c651eac4 IOS: Store the active IOS title ID
This allows us to get back the current active IOS version and expose
only devices which exist/can be used in that version.
2017-02-05 11:36:47 +01:00
Léo Lam
e246afb049 IOS: Add UpdateWantDeterminism to devices
This will be useful for the USB devices to disconnect and hide any real
devices when Core::g_want_determinism is true.
2017-02-05 11:36:47 +01:00
Léo Lam
69a13a12e2 Add USB passthrough setting and USBUtils
This adds a USB passthrough setting to ConfigManager and everything
needed for the UI to show and manage the whitelist properly.
2017-02-05 11:36:46 +01:00
JosJuice
e4d20647d4 Merge pull request #4824 from lioncash/coremode
PowerPC: Convert CoreMode enum into an enum class
2017-02-05 08:25:12 +01:00
Florent Castelli
9ebfaa9324 AudioCommon: Move logic for default sound backend there from ConfigManager
This way, we don't have to leak the HAVE_ALSA define there.
2017-02-05 02:55:04 +01:00
Lioncash
f7b9db9846 PowerPC: Convert CoreMode enum into an enum class
Prevents constants from polluting the namespace.
2017-02-04 19:34:56 -05:00
Lioncash
4b091f5872 MMU: Use references to TLBEntry instances instead of pointers
Same behavior, less verbosity.
2017-02-04 19:03:22 -05:00
Lioncash
52b45a3933 PowerPC: Rename tlb_entry struct to TLBEntry
Makes it consistent with our naming style.
2017-02-04 18:58:45 -05:00
Markus Wick
3be364073d Merge pull request #4713 from JosJuice/core-init-gameini
Don't load game INIs in Core::Init
2017-02-04 08:32:03 +01:00
Markus Wick
2ad62bf5df Merge pull request #4777 from lioncash/dspstack
DSPCore: Convert DSP stack register enum into an enum class
2017-02-04 08:27:11 +01:00
Sepalani
e280f5615a Handle another case with HLE_GeneralDebugPrint 2017-02-03 23:30:37 +00:00
Matthew Parlane
e2b0197ff6 Merge pull request #4807 from leoetlino/ios-version-for-wads
Remove unneeded write to 0x3140/0x3188 for WADs
2017-02-04 10:08:29 +13:00
JosJuice
edcf6819e2 Don't load game INIs in Core::Init
The game INIs are already loaded in BootManager::BootCore,
which is executed right before. Let's put the g_aspect_wide
code there instead.
2017-02-03 21:56:45 +01:00
JosJuice
c847a5258f BootManager: Use local SConfig reference when possible 2017-02-03 21:55:02 +01:00
JosJuice
e572fb102f Move ES_DIVerify's Movie-related code to a more logical place 2017-02-03 19:53:35 +01:00
JosJuice
6aa41ebc55 Movie: Put Wii s_bClearSave handling in a more logical place 2017-02-03 19:53:23 +01:00
JosJuice
88e0a5e418 Don't call Movie::SetTitleId from ES
Movie basically just wants to get the title ID of
the initally booted game, so let's set the title ID in
ConfigManager at boot like we do with the regular game ID.

Aside from being cleaner, this should make the approach to
title IDs compatible with booting non-disc software (WADs).
2017-02-03 19:52:25 +01:00
Lioncash
c67d095787 PowerPC: Move page #define constants to MMU.cpp
These are only ever used here.

This also converts them into typed constants.
2017-02-03 11:48:42 -05:00
Léo Lam
767cbcafb1 Remove unneeded write to 0x3140/0x3188 for WADs
This is unnecessary now that IOS::HLE is responsible for writing the
values to memory; removing the writes also prevents the IOS minor
version from being mangled (by the write to 0x3142).
2017-02-02 22:05:36 +01:00
degasus
384efb0cb2 JitArm64: Initial implementation of the BLR optimization. 2017-02-02 09:06:34 +01:00
Markus Wick
f558ae4dd1 Merge pull request #4790 from lioncash/sram
Sram: Make SRAM dumps const
2017-02-01 13:27:03 +01:00
Markus Wick
094a75f3cb Merge pull request #4791 from degasus/temp
DSPLLE: Only enable the DSP JIT on x64.
2017-02-01 13:04:18 +01:00
Mat M
6fd0e96ea3 Merge pull request #4785 from lioncash/ios-fs
IOS FS: Move behavior to separate functions
2017-01-31 22:28:42 -05:00
Mat M
84d81a4b7a Merge pull request #4792 from sepalani/fix_isctype_assert
Fixes std::isprint undefined behavior
2017-01-31 21:53:12 -05:00
Sepalani
44196f6a55 Fixes std::isprint undefined behavior 2017-02-01 02:30:29 +00:00
Mat M
5b782b9f2d Merge pull request #4795 from sepalani/fix_sock
Fixes a crash when closing a socket
2017-01-31 20:30:26 -05:00
Sepalani
3fd08b6cee Fixes a crash when closing a socket 2017-02-01 00:11:19 +00:00
Markus Wick
24951fde2b Merge pull request #4793 from lioncash/asm-disasm
DSPAssembler/DSPDisassembler: Make constructors explicit
2017-01-31 00:25:27 +01:00
Lioncash
a9db9fd217 DSPDisassembler: Make constructor explicit 2017-01-30 18:17:48 -05:00
Lioncash
546cd5d4be DSPAssembler: Make constructor explicit 2017-01-30 18:16:59 -05:00
degasus
2c69e976d0 DSPLLE: Only enable the DSP JIT on x64.
The x64 JIT is hardcoded right now, and it seems unlikely that we'll support another arch here soon.
So let's just disable the DSP JIT.
2017-01-30 23:53:58 +01:00
Lioncash
093b61139b Sram: Make SRAM dumps const
This is only used internally, and isn't written to.
2017-01-30 17:44:03 -05:00
Matthew Parlane
1603191145 Merge pull request #4786 from lioncash/fwd
IOS STM: Get rid of forward declarations in the cpp file
2017-01-30 22:20:58 +13:00
Markus Wick
2020928fd8 Merge pull request #4783 from degasus/temp
JitArm64: Fix immediate versions of cmpl.
2017-01-30 09:22:56 +01:00
booto
9c4621d2b5 Forgot to add to JitArm64.
Also adds DCBZOFF to JitArm64.
2017-01-29 22:05:07 -05:00
Mat M
548e2d6353 Merge pull request #4709 from lioncash/exi-device
EXI_Device: Minor cleanup
2017-01-29 19:50:42 -05:00
Lioncash
1801180a30 IOS STM: Get rid of forward declarations in the cpp file
Forward declaring functions from a completely different header inside a cpp
file can lead to linker errors. Forward declaring also doesn't really
provide any benefit within cpp files unless it's to bring an internally
linked function within the same file into scope.
2017-01-29 19:30:56 -05:00
Lioncash
d2da1897e7 IOS FS: Move behavior to separate functions 2017-01-29 18:32:59 -05:00
degasus
89cefe3103 JitArm64: Fix immediate versions of cmpl. 2017-01-29 18:38:43 +01:00
Matthew Parlane
e823a9d80c Merge pull request #4779 from lioncash/fileio
IOS FileIO: Move GetFileStats code to its own function
2017-01-29 21:53:11 +13:00
Matthew Parlane
a8c51d99f1 Merge pull request #4780 from booto/dcbz_hack
Hack to stop dcbz/dcbi over low MEM1 trashing memory.
2017-01-29 21:51:15 +13:00
Lioncash
5fd41716ae ec_wii: Make default data constexpr
None of these are modified anywhere.
2017-01-28 18:46:15 -05:00
Lioncash
926c9f995a ec_wii: Amend function casing 2017-01-28 18:46:14 -05:00
Lioncash
650071c3e4 ec_wii: Make getter functions const member functions 2017-01-28 18:45:56 -05:00
Lioncash
5b998ee9b0 ec_wii: Move implementation details into cpp file
Gets rid of the need for an include in the header file.
2017-01-28 18:45:04 -05:00