Commit graph

198 commits

Author SHA1 Message Date
Alex Barney
e140419323 Handle more possible dir save extra data states 2022-02-05 16:12:29 -07:00
Alex Barney
1597f05b27 Actually assign _entryCount field in BucketTree 2022-02-03 18:38:27 -07:00
Alex Barney
49759d3d10 Add GameCardService 2022-02-01 00:11:02 -07:00
Alex Barney
0ba0a9ad9c Fixup ApplicationSaveDataManagement and update to 13.1.0 2022-01-24 15:02:32 -07:00
Alex Barney
dea3b3a8b0 Add some save data transfer client classes
- Fs.ISaveDataChunkIterator
- Fs.ISaveDataChunkExporter
- Fs.ISaveDataChunkImporter
- Fs.ISaveDataDivisionExporter
- Fs.ISaveDataDivisionImporter
- Fs.SaveDataTransferManagerVersion2
- Fs.SaveDataTransferProhibiterForCloudBackUp
- Fs.Impl.SaveDataChunkIterator
- Fs.Impl.SaveDataChunkExporter
- Fs.Impl.SaveDataChunkImporter
- Fs.Impl.SaveDataExporterVersion2
- Fs.Impl.SaveDataImporterVersion2
- Fs.Shim.SaveDataTransferVersion2Shim
2022-01-24 13:39:39 -07:00
Alex Barney
ed6a34d857 Add DebugConfigurationService 2022-01-19 13:17:10 -07:00
Alex Barney
74ed435dee Ensure all of Shim.SaveDataManagement is updated for 13.1.0 2022-01-18 20:45:48 -07:00
Alex Barney
0b9af17dfd Ensure shim classes are updated to 13.1.0
- Fs.Impl.DirectoryServiceObjectAdapter
- Fs.Impl.FileServiceObjectAdapter
- Fs.Impl.FileSystemServiceObjectAdapter
- Fs.Impl.StorageServiceObjectAdapter

- Fs.Shim.Application
- Fs.Shim.BcatSaveData
- Fs.Shim.Bis
- Fs.Shim.Code
- Fs.Shim.Content
- Fs.Shim.ContentStorage
- Fs.Shim.CustomStorage
- Fs.Shim.LoaderApi
2022-01-16 18:43:12 -07:00
Alex Barney
814ae34642 Fixup ProgramIndexMapInfoManager 2022-01-12 16:29:42 -07:00
Alex Barney
9803634284 Fixup AccessControl and update for 13.1.0 2022-01-12 15:42:42 -07:00
Alex Barney
61b29e57a3 Update PathFormatter and PathNormalizer for 13.1.0 2022-01-04 22:17:35 -07:00
Alex Barney
e1fd31c1ff Update layout of Loader and Kvdb structs 2022-01-02 22:58:11 -07:00
Alex Barney
b0e679d000 Update struct layout of Ns structs 2022-01-02 16:52:57 -07:00
Alex Barney
b7e8ea8249 Update struct layout of most remaining Fs structs 2022-01-02 14:14:37 -07:00
Alex Barney
ec38f80066 Update layout of Boot and some Fs structs
Boot:
- EncryptedKeyBlob
- KeyBlob
- Package1MarikoOemHeader
- Package1MetaData
- Package1Stage1Footer
- Package1Pk11Header
- Package2Header
- Package2Meta

Fs:
- ApplicationInfo
- CodeVerificationData
- DirectoryEntry
- EncryptionSeed
- FileSystemProxyErrorInfo
- StorageErrorInfo
- FileTimeStamp
- FileTimeStampRaw
- ProgramIndexMapInfo
- QueryRangeInfo
- RightsId
2021-12-30 17:12:29 -07:00
Alex Barney
57750b896d Update layout of Arp, Bcat, and some Fs structs
Stop using LayoutKind.Explicit and the Size parameter of StructLayout
2021-12-29 15:47:20 -07:00
Alex Barney
5380902376 Rename some save enum/struct fields 2021-12-29 10:13:42 -07:00
Alex Barney
5013e7d2ec Use fixed array structs instead of Data* structs 2021-12-29 10:06:02 -07:00
Alex Barney
3940ca9d76 Ensure UserFileSystemForDebug/Private are updated to 13.1.0 2021-12-25 01:26:52 -07:00
Alex Barney
52d502a793 Update UserFile functions for 13.1.0 2021-12-24 13:29:35 -07:00
Alex Barney
feef0ff63f Fixup ConcatenationFileSystem
- Experiment with using Catch/Handle/Rethrow for logging Results
- Try adding a new Ret function for logging results
- Misc tweaks
2021-12-21 17:45:27 -07:00
Alex Barney
d2d73827ba Fixup BufferedStorage 2021-12-21 12:26:42 -07:00
Alex Barney
f1105da2cc Update FileSystemBufferManager for 13.1.0 2021-12-21 12:45:09 -07:00
Alex Barney
a17605b292 Fixup FileSystemBufferManager 2021-12-20 15:12:34 -07:00
Alex Barney
14fcdc9d67 Move Npdm, LayeredFileSystem 2022-01-07 00:33:47 -07:00
Alex Barney
a289059ecf Move InMemoryFileSystem, PathParser, PathTools 2022-01-07 00:33:47 -07:00
Alex Barney
5acff2acab Move CachedStorage, SectorStorage and derivatives 2022-01-07 00:33:47 -07:00
Alex Barney
0846b86249 Move AesXtsFileSystem 2022-01-07 00:33:47 -07:00
Alex Barney
2bd1c05ed5 Move some files to LibHac.Common 2022-01-07 00:33:47 -07:00
Alex Barney
34faf2b468 Move RomFs 2022-01-07 00:33:47 -07:00
Alex Barney
2d86d63fc6 Move FsSystem/Save 2022-01-07 00:33:47 -07:00
Alex Barney
3e17692a25 Update version to v0.15.0 and .NET 6.0 2021-12-18 17:53:51 -07:00
Alex Barney
40925034e1 Update IndirectStorage and SparseStorage for 13.0 2021-12-04 15:49:31 -07:00
Alex Barney
f180bfeef9 Update BucketTree for 13.0 2021-12-04 15:49:31 -07:00
Alex Barney
280fe14b5f Consolidate the 2 separate Buffer types 2021-12-04 15:49:31 -07:00
Alex Barney
edfa3de6cb Update build script and tests to run on .NET 6.0
LibHac and hactoolnet still target .NET 5.0.
We need to build the library with a .NET 6.0 SDK in order to use C# 10 features.
2021-11-14 18:36:53 -07:00
Alex Barney
34dda02c38 Use file-scoped namespaces 2021-11-14 18:36:53 -07:00
Alex Barney
f9f31056ef Use "in" instead of "ref" where appropriate in SharedRef<T> 2021-11-03 23:08:50 -07:00
Alex Barney
a23d01e934 Move code to use SharedRef instead of ReferenceCountedDisposable 2021-11-03 23:08:50 -07:00
Alex Barney
01ca9e0412 Introduce UniqueRef<T> and use it in IFileSystem 2021-11-03 23:08:50 -07:00
Alex Barney
5f85c0b8e2 Use using statements to dispose Fs.Path variables 2021-11-03 23:08:50 -07:00
Alex Barney
689549fed7 Remove old path code 2021-08-05 12:59:57 -07:00
Alex Barney
aad87ec845 Update the FsSystem namespace to use Fs.Path 2021-08-05 11:59:05 -07:00
Alex Barney
2f58e2fd5a Update ConcatenationFileSystem 2021-07-26 10:20:00 -07:00
Alex Barney
b86b57a4d3 Update SubdirectoryFileSystem and InMemoryFileSystem 2021-07-26 10:19:59 -07:00
Alex Barney
77aef9166f Update tests to use the updated fsa interfaces 2021-07-26 10:19:59 -07:00
Alex Barney
ba0c7405fa Reduce the number of crypto tests
Runs each crypto test vector in a single test instead of each having its own test.
The tests to run each test vector individually are still available if desired.
2021-07-14 00:08:33 -07:00
Alex Barney
8a5ecb18f8 Move new path code to the proper namespace 2021-07-13 19:44:14 -07:00
Alex Barney
79a4c62b2e Add version 12 implementations of path utility classes 2021-07-13 19:44:14 -07:00
Alex Barney
ec6eff156c Add missing "Unexpected" FS results 2021-07-13 19:44:14 -07:00
Alex Barney
8406bea563 Implement CharacterEncoding 2021-07-13 19:44:14 -07:00
Alex Barney
20dcbf8664 Fix a permissions bug when creating system save data 2021-06-29 19:27:49 -07:00
Alex Barney
22df2808fa Add a SaveDataIterator test when using a filter 2021-06-01 11:18:51 -07:00
Alex Barney
b346280bc9 Make SaveDataManagement functions public and add tests 2021-06-01 10:38:17 -07:00
Alex Barney
3056c5c296 Implement extra data functions in SaveDataFileSystemService 2021-06-01 10:38:17 -07:00
Alex Barney
7294206116 Update ISaveDataFileSystemCreator.Create
Update method parameters and rewrite the method to use SaveDataSharedFileStorage.

SaveDataFileSystemCreator now requires a FileSystemServer at construction time, so DefaultFsServerObjects must be created after FileSystemServer construction but before FileSystemServer initialization.
2021-06-01 10:38:17 -07:00
Alex Barney
fc731076ef Remove SaveDataInfoFilter layout tests
SaveDataInfoFilter is an internal struct so there's no need to test the struct's size and layout
2021-06-01 10:38:17 -07:00
Alex Barney
649c72e5e6 Add extra data handling to DirectorySaveDataFileSystem 2021-06-01 10:38:17 -07:00
Alex Barney
52c0903f61 Add Ncm.ProgramLocation 2021-04-25 15:42:48 -07:00
Alex Barney
a730c17bc5 Add Loader.MetaLoader 2021-04-16 14:55:30 -07:00
Alex Barney
bb2c870f27 Update DirectorySaveDataFileSystem to 11.0.0 2021-04-15 16:30:12 -07:00
Alex Barney
0c255e0f49 Update common path handling code
- Updates path handling code to system version 11.0.0.
- Changes InMemoryFileSystem to normalize all incoming paths.
2021-03-28 16:03:05 -07:00
Alex Barney
a5d41f5b1f Update build scripts and build dependencies 2021-03-19 16:57:11 -07:00
Alex Barney
6641109d94 Update FS shims for new Horizon and access log code
Makes all current FS shims more accurate, including using rewritten access log and system tick handling code.
2021-03-12 01:34:14 -07:00
Alex Barney
684fcd460f Swap in the new fsa code except for some access log calls 2021-03-12 01:34:14 -07:00
Alex Barney
61654298d2 Implement or skeleton some mounting code 2021-03-12 01:34:14 -07:00
Alex Barney
e50078d939 Move initialization code out of FileSystemServer 2021-02-07 00:26:20 -07:00
Alex Barney
e3c14dfa4f Add FileSystemProxyServiceObject for the FileSystemClient
Moves all the Get*ServiceObject functions to their own file.
Adds InitializeDfcFileSystemProxyServiceObject.
2021-02-06 00:29:47 -07:00
Alex Barney
f2f68958a8 Pull in some results from Atmosphere 2021-01-19 21:30:02 -07:00
Alex Barney
4bf7060ec7
Update ReSharper var style and warnings (#172)
ReSharper 2020.Something modified the var style again so that arrays of built-in types also count as built-in types, meaning the type should always be explicit.
2021-01-19 19:49:58 -07:00
Alex Barney
4efd95f94c Add BufferedStorage with some supporting classes 2021-01-18 23:48:37 -07:00
Alex Barney
e82d3e039b Update build and test packages 2020-11-17 22:41:54 -06:00
Alex Barney
25f8115600 Move to .NET 5.0 2020-11-17 22:41:54 -06:00
Alex Barney
882e6bc937 Separate fssrv save code to SaveDataFileSystemService 2020-11-01 23:54:00 -07:00
Alex Barney
5dc7c57851 Fully implement LR client and LocationResolverSet 2020-10-14 15:11:35 -07:00
Alex Barney
b5dabe78f5 Replace hex string converter and move StringUtils 2020-10-10 20:17:07 -07:00
Alex Barney
770406e9c2 Remove the old Keyset class 2020-10-05 12:25:39 -07:00
Alex Barney
333ef8729f Fix RSA regression from 5f755bc7 and add a test 2020-10-02 01:33:44 -07:00
Alex Barney
f7030aef4f Add a new KeySet class 2020-10-01 18:06:32 -07:00
Alex Barney
49711b12db Tweaks and cleanup for PR #164
- Fully span-ify CalculateCmac and update callers.
- Modify CalculateCmac signature to match Nintendo's.
- Avoid doing stackalloc based on an input length parameter.
- Use ReadOnlySpan instead of Span where appropriate.
- Standardize XML comments to use triple slashes.
- Make use of the entire rented buffer when copying.

Unrelated to the PR
- Slip in a missed enum to string conversion in hactoolnet for CoreRT reflection-free mode.
2020-09-05 21:10:39 -07:00
Xpl0itR
265147b678
Changes to CryptoOld
- Remove AES functions and replace references with functions from the Crypto.Aes class
- Edit and move the AES-CMAC function into the Crypto.Aes class
- Move BigInteger functions to the Utilities class
- Reduce duplication between the RSA functions
- Edit and move the Rsa parameter recovery function into the Crypto.Rsa class
2020-09-02 19:09:27 +01:00
Alex Barney
4552a2d94f Add permission checks to DeleteSaveDataFileSystem 2020-08-26 17:10:12 -07:00
Alex Barney
1f25b87d20 Add RegisterProgramIndexMapInfo shim and tests 2020-08-26 17:10:12 -07:00
Alex Barney
6496a2c1bc Honor permissions in OpenFileSystemWithId. Add basic AC test 2020-08-26 17:10:12 -07:00
Alex Barney
071b608f5f Tweak how the Horizon class and service manager work
- Store IServiceObjects in the service manager that return the usable objects instead of storing the objects directly
- Register FS services in the service manager instead of giving them special treatment
- Give each created HorizonClient its own "process ID"
2020-08-26 17:10:12 -07:00
Alex Barney
a005b40022 Build updates
Use the version in the .csproj if there is no local git repository.
Always use Windows line endings in codegen output.
Update build dependency versions. We're still using GitVersion 5.1.3 because of https://github.com/nuke-build/nuke/issues/509.
2020-08-15 23:34:48 -07:00
Alex Barney
81340027fc Rename FsService to FsSrv 2020-08-07 18:32:01 -07:00
Alex Barney
730167785e Add a few save data management tests 2020-08-07 10:02:50 -07:00
Alex Barney
c1b9eb8903 Change ref to in where possible in SaveDataIndexer and kvdb 2020-08-07 10:02:50 -07:00
Alex Barney
37251968c0 Add FlatMapKeyValueStore with tests 2020-08-07 10:02:50 -07:00
Alex Barney
717e54fe4e Rename TitleId to ProgramId and add other NCM ID types 2020-08-07 10:02:50 -07:00
Alex Barney
ff96c8575b Use "Result" and "Success" asserts in tests 2020-07-06 11:43:48 -07:00
Alex Barney
106c36492b Move IFileSystem etc. into fsa namespace 2020-06-09 22:55:59 -07:00
Alex Barney
ef1481b04c Replace old fsa classes with new ones 2020-06-07 15:23:51 -07:00
Alex Barney
064da36453 Rename old IFile option enums 2020-06-06 14:18:03 -07:00
Alex Barney
cb8b088487
Misc additions and warning fixes (#134)
* Run codegen and fix DeliveryCacheFileMetaEntry layout

* Use KipReader instead of Kip

* Ensure feature parity between U8String structs

* Don't use the obsolete Nacp class

* Add some null checks

* Address ReSharper warnings

* The Result structs should be readonly
2020-05-12 17:06:55 -07:00
Alex Barney
44e4c7a311
Add some fssystem utility functions and use them in DirectorySaveDataFileSystem (#133)
* Accurately implement DirectorySaveDataFileSystem

* DirectorySaveDataFileSystem updates from FS 10.0
2020-05-12 13:17:06 -07:00
Alex Barney
12775895eb Add non-system BCAT mount shim 2020-04-04 14:19:36 -07:00
Alex Barney
7bcb09b714 Add BIS shim functions with tests 2020-04-04 14:16:17 -07:00
Alex Barney
0e26c31a2f Enable OpenHostFileSystem in FileSystemProxy and add XML docs 2020-03-16 15:07:09 -07:00