Commit Graph

19351 Commits

Author SHA1 Message Date
Léo Lam 24199293d3 IOS: Reorganise the source files and IPC_HLE→IOS
IPC_HLE is actually IOS HLE. The actual IPC emulation is not in
IPC_HLE, but in HW/WII_IPC.cpp. So calling IPC_HLE IOS is more
accurate. (If IOS LLE gets ever implemented, it'll likely be at
a lower level -- Starlet LLE.)

This also totally gets rid of the IPC_HLE prefix in file names, and
moves some source files to their own subdirectories to make the file
hierarchy cleaner.

We're going to get ~14 additional source files with the USB PR,
and this is really needed to keep things from becoming a total pain.
2017-01-18 20:43:10 +01:00
Matthew Parlane 01b322d45f Merge pull request #4679 from lioncash/ipc
IPC_HLE: Namespace IPC HLE
2017-01-18 17:33:08 +13:00
Matthew Parlane 41f7995916 Merge pull request #4680 from lioncash/ir
IR: Minor changes
2017-01-18 17:31:40 +13:00
Lioncash e4ea9f7ace Interpreter: Use std::array for instruction tables 2017-01-17 22:06:52 -05:00
Lioncash f0abdbdeb5 Interpreter: Correct member variable casing 2017-01-17 21:50:01 -05:00
Lioncash e9b506638f Interpreter: Make m_EndBlock private 2017-01-17 21:16:14 -05:00
Lioncash 722162b54a IPC_HLE: Namespace IOS HLE
Gets all of the IOS HLE code out of the global scope.
2017-01-17 20:46:58 -05:00
Lioncash f1542c8e5a Common: Namespace Network.h/.cpp
Necessary to avoid namespace clashes with IOS HLE's namespace name.
2017-01-17 20:46:48 -05:00
Lioncash bb49012445 IR: Deduplicate code in Reset and FoldFallbackToInterpreter 2017-01-17 20:35:02 -05:00
Lioncash 89473d5996 IR: Clean up getNumberOfOperands
- Use std::array
- Make arrays constexpr where their contents aren't modified.
2017-01-17 20:22:38 -05:00
Lioncash d3aed03563 IR: Make trivial helper functions constexpr 2017-01-17 19:42:36 -05:00
Lioncash d1f39185dd IR: Convert typedefs to using aliases 2017-01-17 19:40:56 -05:00
Matthew Parlane f785d7f869 Merge pull request #4675 from lioncash/jitil
JitILBase: Make the IRBuilder protected
2017-01-18 13:10:31 +13:00
Florent Castelli 875563787f cmake: include(Find…)->find_package(…) 2017-01-17 21:50:44 +01:00
Lioncash 1516c22a22 JitILBase: Make the IRBuilder instance protected
There's no need to make it public.
2017-01-17 14:55:45 -05:00
Lioncash e924814d62 JitILBase: Move protected members below public 2017-01-17 14:45:40 -05:00
Matthew Parlane 63011f1402 Merge pull request #4661 from leoetlino/ios-request
IOS HLE: Deduplicate the request parsing code
2017-01-18 08:38:37 +13:00
Sarkie 8c5c7f8d2a Updated gradle to latest version 2017-01-17 10:19:39 +00:00
Matthew Parlane 753455b379 Merge pull request #4671 from endrift/fix-libusb
InputCommon: Fix FreeBSD 11 libusb incompatibilities
2017-01-17 21:43:08 +13:00
Jeffrey Pfau c5b3b52d55 InputCommon: Fix FreeBSD 11 libusb incompatibilities 2017-01-17 00:30:08 -08:00
Lioncash 8346f86ee4 IR: Remove unnecessary semicolon on namespace brace 2017-01-16 19:54:42 -05:00
Lioncash 67fc73e82c IR: Make getNumInsts return type size_t
There's no need to cast here.
2017-01-16 19:38:30 -05:00
Lioncash 459a6e73c3 IR: Remove unused function 2017-01-16 19:32:13 -05:00
Lioncash cd12b2c55f IR: Make IRBuilder uncopyable
Hiding and not implementing the copy constructor is a pre-C++11 thing.
It should also be noted that a copy constructor, as defined by the
language, contains a const qualifier on its parameter, so this wouldn't
have prevented copies from being performed.
2017-01-16 18:59:17 -05:00
Lioncash a8b2dd7fc3 IR: Use std::array instead of raw C arrays 2017-01-16 18:54:30 -05:00
Lioncash ef3e6de875 IR: Move implementation of the constructor and Reset into the cpp file
Neither of these are intended to be called extremely frequently to warrant
this.
2017-01-16 18:36:11 -05:00
Léo Lam 25f89ccae8 IOS HLE: Specify the return code when replying
This makes more sense than setting the return code on the request
struct first before replying.

Ref: https://github.com/dolphin-emu/dolphin/pull/4661#discussion_r96273253
2017-01-17 00:28:22 +01:00
Lioncash 47fc72f0a8 IR: Get rid of an unimplemented member function prototype 2017-01-16 18:11:54 -05:00
Lioncash 4f75590fdb IR: Move private details below public details 2017-01-16 18:08:11 -05:00
Léo Lam c6b1cfb222 IOS HLE: Remove old structs and methods
Now that everything has been changed to use the new structs, the old
methods and structs can be removed.

And while I was changing the base device class, I also moved the
"unsupported command" code to a separate function. It was pretty silly
to copy the same 3 lines for ~5 commands.
2017-01-16 23:55:57 +01:00
Léo Lam 8629a1f11c IOS HLE: Deduplicate request code in WFS 2017-01-16 23:55:57 +01:00
Léo Lam 4af67abb55 IOS HLE: Deduplicate request code in ES 2017-01-16 23:55:56 +01:00
Léo Lam 6bf0b487d1 IOS HLE: Deduplicate request code in USB_HID 2017-01-16 23:55:56 +01:00
Léo Lam 0e979ec75f IOS HLE: Deduplicate request code in FileIO and FS 2017-01-16 23:55:56 +01:00
Léo Lam 5a5985f674 IOS HLE: Deduplicate request code in DI 2017-01-16 23:55:55 +01:00
Léo Lam 469a31db32 IOS HLE: Deduplicate request code in sdio_slot0 2017-01-16 23:55:55 +01:00
Léo Lam a04902086a IOS HLE: Deduplicate request code in net/net_ssl 2017-01-16 23:55:55 +01:00
Léo Lam 84c8d0b66d IOS HLE: Deduplicate request code in stub 2017-01-16 23:55:54 +01:00
Léo Lam f9e806fd71 IOS HLE: Deduplicate request code in OH1 2017-01-16 23:55:54 +01:00
Léo Lam d4de87a973 IOS HLE: Deduplicate request code in USB_KBD 2017-01-16 23:55:53 +01:00
Léo Lam d536082e42 IOS HLE: Deduplicate request code in USB_VEN 2017-01-16 23:55:53 +01:00
Léo Lam d7b4e6ead5 IOS HLE: Deduplicate request code in STM 2017-01-16 23:55:52 +01:00
Léo Lam e2d072250f IOS HLE: Deduplicate request code in WII_IPC_HLE 2017-01-16 23:55:52 +01:00
Léo Lam d8b9b3825c IOS HLE: Add resource request structs
This adds well-defined structs that are responsible for parsing
resource requests, instead of duplicating the logic and offsets all
over IOS HLE. Command handler functions are now passed parsed requests
instead of a command address.

This may not seem like a very important change, but it removes the
need to remember all of the struct offsets or copy/paste existing
struct request variables. It also prevents nasty bugs which have
occurred in the past, such as parsing an ioctl as if it were an ioctlv
(that's way too easy to do if you pass command addresses directly);
or writing something to 0x0, which can easily happen by mistake with
a close handler that can be called with invalid command addresses.

Bonus changes:

- The return code is not an obscure Memory::Write_U32 anymore, but an
  explicit, more obvious SetReturnValue() call. (Which correctly takes
  a s32 instead of a u32, since return codes are signed.)

- Open handlers are now only responsible for returning an IOS ret code,
  and Close handlers don't return anything and don't have to worry
  about checking whether the request is a real one anymore.

- DumpAsync was moved to the ioctlv request struct, because it did
  not really make sense to make it part of the IOS device and it only
  works for ioctlvs.
  All current usages have been removed; they will be readded in a
  later commit.

As of this commit, nothing uses the structs yet. Usages will be
migrated progressively.
2017-01-16 23:55:52 +01:00
Matthew Parlane 53bfab057c Merge pull request #4666 from lioncash/jitil-ir
IR_X86: Minor changes to RegInfo
2017-01-17 11:52:44 +13:00
Matthew Parlane 8153772bfe Merge pull request #4662 from lioncash/memview
MemoryView: Separate memory string composition from OnPaint
2017-01-17 11:31:16 +13:00
Lioncash 43910e474b IR_X86: Use member initializers where applicable for RegInfo 2017-01-16 17:29:09 -05:00
Lioncash bc7374a5e1 IR_X86: Use std::array instead of raw C arrays in RegInfo 2017-01-16 17:29:09 -05:00
Lioncash 45f7883ed8 IR_X86: Make RegInfo uncopyable
Hiding and not implementing the copy constructor is a pre-C++11 thing.
It should also be noted that a copy constructor, as defined by the language,
contains a const qualifier on its parameter, so this wouldn't have
prevented copies from being performed.

It also follows that if the copy constructor is deleted, then copy
assignment should also be forbidden.
2017-01-16 17:27:03 -05:00
Matthew Parlane 3415a1ca18 Merge pull request #4614 from jackoalan/gba-hle-cleanup
DSP: Clean up GBA crypto HLE implementation
2017-01-17 11:10:50 +13:00