Commit graph

613 commits

Author SHA1 Message Date
bunnei
714dd3da6d hle: Use Switch formatted result codes. 2017-10-31 19:26:11 -04:00
bunnei
5e11c12766 core: Refactor MakeMagic usage and remove dead code. 2017-10-15 00:11:38 -04:00
bunnei
5993f6f6de Remove lots more 3DS-specific code. 2017-10-12 21:21:49 -04:00
bunnei
775cf60729 Merge remote-tracking branch 'upstream/master' into nx
# Conflicts:
#	src/core/CMakeLists.txt
#	src/core/arm/dynarmic/arm_dynarmic.cpp
#	src/core/arm/dyncom/arm_dyncom.cpp
#	src/core/hle/kernel/process.cpp
#	src/core/hle/kernel/thread.cpp
#	src/core/hle/kernel/thread.h
#	src/core/hle/kernel/vm_manager.cpp
#	src/core/loader/3dsx.cpp
#	src/core/loader/elf.cpp
#	src/core/loader/ncch.cpp
#	src/core/memory.cpp
#	src/core/memory.h
#	src/core/memory_setup.h
2017-10-09 23:56:20 -04:00
shinyquagsire23
9c8cdede44 file_sys, loader: add support for reading TMDs to determine app paths 2017-10-01 10:54:02 -06:00
shinyquagsire23
f6564f232e file_sys: add class for Title Metadata (TMD) 2017-10-01 10:53:45 -06:00
shinyquagsire23
a151c0edec file_sys/ncch_container: add RomFS, ExeFS override to allow for backward compatibility with existing .romfs system archive dumps 2017-10-01 10:53:18 -06:00
shinyquagsire23
2f8af214f8 file_sys/archive_ncch: use NCCHContainer instead of loading .romfs files 2017-10-01 10:53:04 -06:00
bunnei
6d3b6e0041 nso: Refactor and allocate .bss section. 2017-09-30 14:33:58 -04:00
Subv
f2b635a73d HLE/Archives: Allow multiple loaded applications to access their SelfNCCH archive independently.
The loaders now register each loaded ROM with the SelfNCCH factory, which keeps the data around for the duration of the emulation session.

When opening the SelfNCCH archive, the factory queries the current program's programid and uses that as a key to the map that contains the NCCHData structure (RomFS, Icon, Banner, etc).

3dsx files do not have a programid and will use a default of 0 for this value, thus, only 1 3dsx file with RomFS is loadable at the same time.
2017-09-25 09:45:02 -05:00
Max Thomas
042b389b57 Loader/NCCH: Add support for loading application updates (#2927)
* loader/ncch: split NCCH parsing into its own file

* loader/ncch: add support for loading update NCCHs from the SD card

* loader/ncch: fix formatting

* file_sys/ncch_container: Return a value for OpenFile

* loader/ncch: cleanup, always instantiate overlay_ncch to base_ncch

* file_sys/ncch_container: better encryption checks, allow non-app NCCHs to load properly and for the existence of NCCH structures to be checked

* file_sys/ncch_container: pass filepath as a const reference
2017-09-25 08:17:38 +02:00
Subv
f94bd67a0d Warnings: Add UNREACHABLE macros to switches that contemplate all possible values. 2017-08-21 08:34:28 -05:00
James
9da055f84c Handle invalid filenames when renaming files/directories 2017-07-31 17:11:53 +10:00
TheKoopaKingdom
e0f8f75f43 Addressed Bunnei's review comments, and made some other tweaks:
- Deleted GetStatus() because it wasn't used anywhere outside of Core::System.
 - Fixed design flaw where the message bar status could be set despite the game being stopped.
2017-06-02 18:40:39 -04:00
TheKoopaKingdom
fa11f957f4 Switched to the ERROR_NOT_FOUND constant from errors.h. 2017-06-02 18:40:39 -04:00
TheKoopaKingdom
af0a2f11d9 Moved whitelist checks from FS_User to the Archive_NCCH handler. 2017-06-02 18:40:27 -04:00
TheKoopaKingdom
cee9b78a15 Made some changes from review comments:
- Made LoadKernelSystemMode return a pair consisting of a system mode and a result code (Could use review).
- Deleted ErrorOpenGL error code in favor of just having ErrorVideoCore.
- Made dialog messages more clear.
- Compared archive ID in fs_user.cpp to ArchiveIdCode::NCCH as opposed to hex magic.
- Cleaned up some other stuff.
2017-06-02 18:28:14 -04:00
Yuri Kunde Schlesner
2d147a1c0d FileSys: Move all result description to errors.h 2017-05-24 21:06:00 -07:00
wwylele
2ca691aab8 file_sys: lower log level for setting host path 2017-03-08 17:47:24 +02:00
Mat M
dc1927a9d1 Doxygen: Amend minor issues (#2593)
Corrects a few issues with regards to Doxygen documentation, for example:

- Incorrect parameter referencing.
- Missing @param tags.
- Typos in @param tags.

and a few minor other issues.
2017-02-26 17:58:51 -08:00
wwylele
05a989965a loader: use self NCCH archive 2017-02-13 13:57:38 +02:00
wwylele
2fff7f897b file_sys: add Self NCCH archive 2017-02-13 13:57:38 +02:00
Kloen
e1ee6f6224 core: fix savedata_archive.cpp warnings about unhandled enumeration values on OSX 2017-01-29 21:50:25 +01:00
Kloen
806db8e491 core: fix archive_sdmc.cpp warnings about unhandled enumeration value on OSX 2017-01-29 21:49:36 +01:00
Kloen
c6201827f5 core: fix archive_extsavedata.cpp warning on OSX 2017-01-29 21:48:40 +01:00
bunnei
1fd7cfb69e Address clang-format issues. 2016-12-21 23:48:14 -05:00
bunnei
5d22844f3e core: Remove HLE module, consolidate code & various cleanups. 2016-12-21 23:48:13 -05:00
MerryMage
6e2d70a777 archive_source_sd_savedata: Add static method to get a specific save data path 2016-12-15 09:59:41 +00:00
Lioncash
6ba0395316 file_sys: Make a few single-argument constructors explicit
Prevents implicit conversions.
2016-12-07 17:26:56 -05:00
wwylele
1e4a1598fd FileSys: Implement OtherSaveData 2016-11-29 23:50:00 +02:00
wwylele
37e9404489 FileSys: abstract SD save data archive source 2016-11-29 23:50:00 +02:00
wwylele
01964d37fb FileSys: rename SaveDataCheck archive to NCCH archive
According to the observation from game and 3dbrew "Used for accessing general NCCH data"
2016-11-19 18:55:35 +02:00
wwylele
bfc699293f FileSys: remove unused DiskArchive
All "subclasses" of DiskArchive are splitted out. This class is useless
2016-11-19 18:55:34 +02:00
wwylele
5506268bf6 FileSys: w->rw permission lift only happens in SDMC archive 2016-11-19 18:55:34 +02:00
wwylele
a14bab3b8b FileSys: add SDMCWriteOnlyArchive 2016-11-19 18:55:34 +02:00
wwylele
76c8e607a4 FileSys: add SDMCArchive
Now DiskArchive only serves for SDMC, then it should be just a "SDMCArchive"
2016-11-19 18:24:37 +02:00
wwylele
4a80f45637 FileSys: add ExtSaveDataArchive
ExtSaveData is more similar to SaveData, so let it be a subclass of SaveData
2016-11-19 18:24:37 +02:00
wwylele
420091d0e5 FileSys: add SaveDataArchive
The error checking of SaveDataArchive is completely different from DiskArchive, so it has to be a new class instead of a subclass of DiskArchive.
2016-11-19 17:17:19 +02:00
wwylele
1e33d07b86 FileSys: remove Open from FileBackend
Same as directory, file shouldn't expose Open either.
2016-11-19 17:17:19 +02:00
wwylele
4675116401 FileSys: remove Open from DirectoryBackend
Open should not be an interface exposed by Directory because it is the Archive thats implement the methed to open the directory. The service API of 3DS also implies this - Open is not a function of directory service, but is of FS main service
2016-11-19 17:17:19 +02:00
wwylele
37d6cbc200 FileSys: add PathParser 2016-11-19 17:17:19 +02:00
wwylele
657bb716f7 FileSys: make Archive interfaces return error code
and make the mode parameter a reference since it is a BitField union
2016-11-01 18:30:32 +02:00
wwylele
b2fa64ec75 fs: implement DeleteDirectoryRecursively 2016-10-02 11:29:16 +08:00
Yuri Kunde Schlesner
fa5d9d8266 Use negative priorities to avoid special-casing the self-include 2016-09-21 00:15:56 -07:00
Emmanuel Gil Peyrot
1138ec0d49 Remove empty newlines in #include blocks.
This makes clang-format useful on those.

Also add a bunch of forgotten transitive includes, which otherwise
prevented compilation.
2016-09-21 11:15:47 +09:00
Yuri Kunde Schlesner
1e4a5da9f4 Manually tweak source formatting and then re-run clang-format 2016-09-18 21:14:25 -07:00
Emmanuel Gil Peyrot
628ed4376a Sources: Run clang-format on everything. 2016-09-18 09:38:01 +09:00
MerryMage
4ed7963687 FileSys/Path: Replace Memory::GetPointer with Memory::ReadBlock 2016-05-21 11:14:03 -05:00
Mathew Maidment
3cf5e4d51c Merge pull request #1643 from MerryMage/make_unique
Common: Remove Common::make_unique, use std::make_unique
2016-04-05 20:10:11 -04:00
MerryMage
9f9c987924 Common: Remove Common::make_unique, use std::make_unique 2016-04-05 13:31:17 +01:00