Commit Graph

57 Commits

Author SHA1 Message Date
fb124c2eb0 Use nested namespaces for IOS HLE
Pretty much all of the source files contain the following:

    namespace IOS
    {
    namespace HLE
    {
    namespace <name>
    {
    // actual code here
    }  // namespace <name>
    }  // namespace HLE
    }  // namespace IOS

which is really verbose boilerplate, because most of the files inside
of Core/IOS are for IOS HLE.

This commit replaces that with a more concise `namespace IOS::HLE`
or `namespace IOS::HLE::(name)`.
2018-05-30 11:40:05 +02:00
40bb9974f2 Reformat all the things! 2018-04-12 21:28:39 +02:00
346ca009f9 Remove NANDContentManager 2017-10-24 11:41:54 +02:00
689ed2a0ce [Cleanup] Move FindSignedTicket to IOS/ES
For consistency and because NANDContentManager is going to be removed.
2017-10-24 11:41:54 +02:00
ef888ef168 WFS: Fix logging types. 2017-08-22 23:41:38 +02:00
344228ec10 WFSI: Implement noop ioctl 0x8f. 2017-08-22 23:41:38 +02:00
70cb0cb126 WFSI: Implement GET_VERSION.
This ioctl writes a constant value to the output buffer.
2017-08-22 23:41:38 +02:00
8a5d24ab4b WFSI: Implement IOCTL_WFSI_IMPORT_TITLE_CANCEL.
It gets called for cleaning up whenever something goes wrong, and
also when cancelling an update.
2017-08-22 23:41:38 +02:00
5cc18bf116 WFSI: Add missing functionality to ImportTitleInit. 2017-08-22 23:41:38 +02:00
f0aeeeaef6 WFSI: Implement internal Cancel{Title,Patch}Import. 2017-08-22 23:41:38 +02:00
c1817b2c6d WFSI: Rename 2 ioctls to better reflect their purposes.
* IOCTL_WFSI_PREPARE_DEVICE -> IOCTL_WFSI_IMPORT_TITLE_INIT
  (equivalent of ES_ImportTitleInit, also the official name)

* IOCTL_WFSI_IMPORT_TITLE -> IOCTL_WFSI_IMPORT_TITLE_CANCEL
  (equivalent of ES_ImportTitleCancel)
2017-08-22 23:41:38 +02:00
7423563386 WFSI: Fix the TMD size check. 2017-08-22 23:41:37 +02:00
a641609857 WFSI: Implement patch install finalization. 2017-08-22 23:41:37 +02:00
76bbfbb511 WFSI: Adapt FINALIZE_TITLE_INSTALL for patch support. 2017-08-22 23:14:00 +02:00
db24c94c6e WFSI: More work to support patching: split off current_tid/gid and import_tid/gid 2017-08-22 23:14:00 +02:00
aa445806a5 WFSI: Rename a few ioctl handlers. 2017-08-22 23:14:00 +02:00
5ed3a3f12d WFSI: Get the patch info from PREPARE_DEVICE. 2017-08-22 23:14:00 +02:00
e004709b69 WFSI: Implement CHECK_HAS_SPACE. 2017-08-22 23:13:59 +02:00
15f25783a8 WFS: Implement RENAME. 2017-08-22 23:13:58 +02:00
2a8d9a53b7 WFS: Share error codes with WFSI. 2017-08-22 23:13:14 +02:00
e6e00f6c8d WFSI: Implement install finalization. 2017-08-22 23:13:14 +02:00
88580b8d5f WFSI: Fix install directories creation. 2017-08-22 23:13:14 +02:00
e79392cb8e WFS: Implement WRITE and WRITE_ABSOLUTE. 2017-08-22 23:13:14 +02:00
dca70844a6 WFS: Implement CREATE_OPEN along with OPEN. 2017-08-22 23:13:14 +02:00
ef3232cd74 WFSI: Create meta/work/save dirs when applying title profile. 2017-08-22 23:13:14 +02:00
c0b3a68441 WFS: Implement MKDIR. 2017-08-22 23:13:13 +02:00
e45bb77512 WFS: Add a basic GET_ATTRIBUTES implementation. 2017-08-22 23:13:13 +02:00
56aa3cc558 WFSI: Implement both GET_TMD ioctls. 2017-08-22 23:13:13 +02:00
c81636d9a8 WFSI: Stub out SET_FST_BUFFER. 2017-08-22 23:13:13 +02:00
92387cb052 WFS: Implement CLOSE_2 as a clone of CLOSE. 2017-08-22 23:13:13 +02:00
4b4e488189 WFS: Use a separate log type for WFS related logs
Makes it easier to turn off general IOS messages that can be
distracting (e.g. /dev/net/ssl being opened hundreds of time...)
without losing the ability to view WFS messages.
2017-08-16 22:27:29 +02:00
40c70469e5 WFS: Implement GET_HOMEDIR. 2017-08-15 22:35:45 +02:00
1e75455ef5 WFS: Return a proper ENOENT code on failed OPEN. 2017-08-15 22:35:45 +02:00
397f5e54e0 WFS: Implement READ_ABSOLUTE (merged with READ implementation). 2017-08-15 22:35:45 +02:00
49a4712f33 WFS: Implemented the GET_SIZE ioctl. 2017-08-15 22:35:45 +02:00
2f5ddf12a9 WFS: Normalize paths before opening. 2017-08-15 22:35:45 +02:00
f810f1edb2 WFS/NAND: Better handle GID. 2017-08-15 22:29:10 +02:00
f8e5f4296f WFS: Document WFSSRV ioctl 0x0c as being mkdir. 2017-08-15 22:29:10 +02:00
c14ab0dd53 WFS: Implement current/home path expansion. 2017-08-15 22:29:10 +02:00
5a4900bc96 WFS: Stub WFSSRV's flush command. 2017-08-12 15:17:34 +02:00
f3224dc726 WFS: Stub out unimplemented ioctl 0x08. 2017-08-12 15:17:34 +02:00
f0ba0f617f WFS: Fix shutdown behavior with long hanging requests. 2017-08-12 15:17:34 +02:00
58624ef409 ES: Fix wrong log message. 2017-08-12 15:17:34 +02:00
9f08534a47 IOS: Reuse IOSC instance when possible
Changes ESFormats to take an IOSC instance instead of creating its own
temporary instance unnecessarily.
2017-06-27 00:01:20 +02:00
f09ceaa735 Move IOFile to a separate file
Reduces the number of files that need to be recompiled
when making changes to FileUtil.h.
2017-06-15 21:33:50 +02:00
983f70c9ea ios: treat return values as s32 2017-06-07 19:52:07 -07:00
12801fd722 IOS: Allow instances that are not tied to emulation
This enables constructing an IOS instance that is not tied to emulation
and that can be simply used for internal purposes (ES, FS).

NAND root initialisation was moved to IOS since we cannot rely on HW
doing that for us anymore, and technically the NAND is entirely managed
by IOS anyway.
2017-05-13 00:34:58 +02:00
2fc5047d26 IOS: Convert the IOS kernel HLE code to a class
This changes the main IOS code (roughly the equivalent of the kernel)
to a class instead of being a set of free functions + tons of static
variables.

The reason for this change is that keeping tons of static variables
like that prevents us from making an IOS instance and reusing IOS
code easily.

Converting the IOS code to a class also allows us to mostly decouple
IOS from the PPC emulation.

The more interesting changes are in Core/IOS/IOS. Everything else is
mostly just boring stuff required by this change...

* Because the devices themselves call back to the main IOS code
  for various things (getting the current version, replying to a
  request, and other syscall-like functions), just like processes in
  IOS call kernel syscalls, we have to pass a reference to the kernel
  to anything that uses IOS syscalls.

* Change DoState to save device names instead of device IDs to simplify
  AddDevice() and get rid of an ugly static count.

* Change ES_Launch's ack to be sent at IOS boot, now that we can do
  this properly.
2017-04-30 17:18:53 +02:00
cf0492468d IOS/WFS: Fix logging message 2017-04-04 17:37:08 +02:00
f106ba70d4 Move DVD code to a new directory 2017-03-31 17:27:23 +02:00