Commit graph

546 commits

Author SHA1 Message Date
Lioncash
1cd301f2c0 file-sys: convert a StringFromFormat call into fmt::format in GetFullPath()
Lessens the amount to read and gets rid of the PRIX64 macro, allowing us to use a single string
for the whole path, making it easier to read.
2018-04-25 12:35:37 -04:00
Lioncash
a1dc050bbf file-sys: Move logging macros over to the new fmt-capable ones 2018-04-25 12:35:33 -04:00
mailwl
8fffc0962c Service/FS: implement IFileSystem::RenameFile 2018-04-24 10:56:05 +03:00
Lioncash
5b8891df28 disk_filesystem: Remove unused total_entries_in_directory member from Disk_Directory 2018-04-19 21:28:56 -04:00
Lioncash
eb2bb5500e disk_filesystem: Remove redundant initializer in Disk_Directory's constructor 2018-04-19 21:28:07 -04:00
Lioncash
19fe9a92ec disk_filesystem: Make constructors explicit where applicable 2018-04-19 21:27:43 -04:00
shinyquagsire23
5634f49b60 file_sys: Use NGLOG 2018-04-17 09:55:29 -06:00
shinyquagsire23
13ab489cb7 file_sys: tweaks 2018-04-16 06:51:59 -06:00
shinyquagsire23
bba0a351e7 file_sys: Add HFS/PFS helper component 2018-04-16 04:36:25 -06:00
bunnei
dc852fda3b fsp_srv: Implement DeleteFile.
- Used by Binding of Isaac.
2018-04-15 13:15:18 -04:00
bunnei
db8fc2ea57 fsp_srv: Implement GetSize and SetSize. 2018-03-31 16:06:45 -04:00
Subv
6610bee69e FS: Move the file open mode calculation to a separate function. 2018-03-23 14:27:07 -05:00
Subv
43295efd0e FS: Implemented IFileSystem::CreateDirectory. 2018-03-21 09:55:59 -05:00
Subv
bf1c4bf16c FS: Implement DiskFileSystem's OpenDirectory interface. 2018-03-19 23:00:37 -05:00
Subv
7de15c22f3 FS: Implement DiskFileSystem::GetEntryType for existing files/directories. 2018-03-19 22:59:38 -05:00
Subv
e4b4b765b6 FS: Updated the Directory Entry structure to match the Switch. 2018-03-19 22:58:55 -05:00
Subv
8144364cc2 FS: Support the file Append open mode. 2018-03-19 22:57:34 -05:00
Subv
a079723254 FS: Added an SDMC archive factory and registered it to the SDMC archive on startup. 2018-03-19 21:17:15 -05:00
bunnei
f16763ed52 core: Move process creation out of global state. 2018-03-14 18:42:19 -04:00
Subv
cb738dedb2 FS: Use the correct error code when trying to open files that don't exist. 2018-03-04 14:34:48 -05:00
Subv
9702f6c2ed FS: Make EnsureSaveData create the savedata folder when called for the first time. 2018-03-04 14:30:07 -05:00
Subv
b874d4f2b0 SaveData: Use the current titleid when opening the savedata archive. 2018-03-01 19:03:54 -05:00
Subv
dfdc72efa7 Filesystem: Added a SaveData Factory and associated Disk_FileSystem. 2018-03-01 19:03:52 -05:00
shinyquagsire23
b48d598627 file_sys: Style tweaks
Asdf
2018-02-25 16:34:29 -07:00
shinyquagsire23
e3c753a14c file_sys: Add support for parsing NPDM files 2018-02-25 07:02:39 -07:00
bunnei
a2c082be79 file_sys: Clang format fixes. 2018-01-21 15:51:45 -05:00
bunnei
0446482361 file_sys: Cleanup to better match Switch file system constructs.
file_sys: Add factory class for RomFS file system.
2018-01-21 15:39:26 -05:00
bunnei
f3cfe5caac file_sys: Remove disk_archive, savedata_archive, and title_metadata. 2018-01-21 15:39:23 -05:00
bunnei
9d9038a32f archive_backend: Minor changes to match Switch IFileSystem. 2018-01-21 15:39:20 -05:00
bunnei
bc4d08fe34 file_sys: Repurpose 3DS IVFC code for Switch ROMFS. 2018-01-21 15:39:18 -05:00
James Rowe
ea88c44eb8 Format: Run the new clang format on everything 2018-01-20 16:45:11 -07:00
N00byKing
a244896e75 Update title_metadata.h 2018-01-17 18:20:52 +01:00
bunnei
2817ec4da4 core: Gut out cryptop, since it doesn't compile with C++17. 2018-01-12 19:36:41 -05:00
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