Commit graph

21 commits

Author SHA1 Message Date
Emmanuel Gil Peyrot 691a42fe98 VideoCore: Run include-what-you-use and fix most includes. 2016-04-30 17:02:41 +01:00
MerryMage 2929b67c5f DSP_DSP: Add return IPC headers 2016-04-27 06:35:08 +01:00
purpasmart96 abe5c6efec GSP: Return proper error codes for register writes 2016-03-30 18:31:49 -07:00
Subv d26c6b3212 HLE/FS: Implemented GetFormatInfo
Format information is currently only implemented for the ExtSaveData, SharedExtSaveData and SaveData archives, the information is stored in a file alongside the root folder of the archive.
2016-03-20 14:30:01 -05:00
Subv 96f0e32f83 HLE/FS: Return the proper error codes on file Read/Write operations.
These operations are limited by the open flags specified while opening the file.
2016-03-20 14:28:17 -05:00
Subv b350f192bb HLE/FS: Corrected the error codes for CreateFile 2016-03-20 14:28:10 -05:00
Yuri Kunde Schlesner 6dd05e610a core: Use unrestricted union to hold storage of ResultVal value 2016-03-05 00:13:20 -08:00
MerryMage 6c71858c5c BitField: Make trivially copyable and remove assignment operator 2016-02-12 19:51:16 +00:00
Subv d90d5a0ee6 HLE/SVC: Implement UnmapMemoryBlock.
This implementation will need to be (almost completely) changed when we implement multiprocess support.
2016-01-14 11:29:19 -05:00
Emmanuel Gil Peyrot 596b7c4f63 Common: Cleanup key_map includes. 2015-06-28 00:36:54 +01:00
Yuri Kunde Schlesner e1fbac3ca1 Common: Remove common.h 2015-05-07 15:45:22 -03:00
Lioncash 99ff8bbb0c result: Make comparison operators take references
It's unnecessary to make copies for simple comparisons like this.
2015-02-27 21:16:21 -05:00
archshift 3c48697ea3 Convert a few C stdlib asserts to Citra's own asserts 2015-02-18 21:52:36 -08:00
archshift ef24e72b26 Asserts: break/crash program, fit to style guide; log.h->assert.h
Involves making asserts use printf instead of the log functions (log functions are asynchronous and, as such, the log won't be printed in time)
As such, the log type argument was removed (printf obviously can't use it, and it's made obsolete by the file and line printing)

Also removed some GEKKO cruft.
2015-02-10 18:30:31 -08:00
Subv ca1a87ef7d ResultVal: Fixed compilation when reassigning a ResultVal. 2015-02-10 13:43:44 -02:00
Yuri Kunde Schlesner 09ae6e1fa3 Remove result.h InvalidHandle
It was only being used in two places, where it was replaced by a local
constant.
2015-01-30 11:49:45 -02:00
Yuri Kunde Schlesner afc416c607 Additions to ResultVal to make it more convenient to use. 2015-01-30 11:47:02 -02:00
archshift 228843c43e Logging: Log all called service functions (under trace). Compile out all trace logs under release for performance. 2015-01-10 14:32:10 -08:00
purpasmart96 ebfd831ccb License change 2014-12-20 21:20:24 -08:00
Subv ea9ce0fba7 Filesystem/Archives: Implemented the SaveData archive
The savedata for each game is stored in /savedata/<ProgramID> for NCCH files. ELF files and 3DSX files use the folder 0 because they have no ID information

Got rid of the code duplication in File and Directory

Files that deal with the host machine's file system now live in DiskFile, similarly for directories and DiskDirectory and archives with DiskArchive.

FS_U: Use the correct error code when a file wasn't found
2014-12-17 19:21:38 -05:00
Yuri Kunde Schlesner c2588403c0 HLE: Revamp error handling throrough the HLE code
All service calls in the CTR OS return result codes indicating the
success or failure of the call. Previous to this commit, Citra's HLE
emulation of services and the kernel universally either ignored errors
or returned dummy -1 error codes.

This commit makes an initial effort to provide an infrastructure for
error reporting and propagation which can be use going forward to make
HLE calls accurately return errors as the original system. A few parts
of the code have been updated to use the new system where applicable.

One part of this effort is the definition of the `ResultCode` type,
which provides facilities for constructing and parsing error codes in
the structured format used by the CTR.

The `ResultVal` type builds on `ResultCode` by providing a container for
values returned by function that can report errors. It enforces that
correct error checking will be done on function returns by preventing
the use of the return value if the function returned an error code.

Currently this change is mostly internal since errors are still
suppressed on the ARM<->HLE border, as a temporary compatibility hack.
As functionality is implemented and tested this hack can be eventually
removed.
2014-11-24 17:08:36 -02:00