Commit graph

87 commits

Author SHA1 Message Date
Yuri Kunde Schlesner 7ada357b2d Memmap: Re-organize memory function in two files
memory.cpp/h contains definitions related to acessing memory and
configuring the address space
mem_map.cpp/h contains higher-level definitions related to configuring
the address space accoording to the kernel and allocating memory.
2015-05-15 00:04:38 -03:00
Yuri Kunde Schlesner a5eba2f984 Kernel: Remove g_program_id
This has been obsoleted by the field in Process.
2015-05-08 22:11:03 -03:00
Yuri Kunde Schlesner e1fbac3ca1 Common: Remove common.h 2015-05-07 15:45:22 -03:00
Yuri Kunde Schlesner c0eaa662d4 Clean-up includes 2015-05-06 23:45:06 -03:00
Yuri Kunde Schlesner b89f644cfe FileSys: De-inline Path members 2015-05-06 23:45:06 -03:00
Yuri Kunde Schlesner 6f89d25f90 FileSys: Clean-up includes, de-inline destructors 2015-05-06 23:45:06 -03:00
Emmanuel Gil Peyrot bdcf28e3bc Headers: Add some forgotten overrides, thanks clang! 2015-04-14 21:18:25 +02:00
Subv 1d61cd4460 Services/FS: Implemented DeleteExtSaveData, CreateSystemSaveData and DeleteSystemSaveData
Also fixed a bug with CreateExtSaveData that made it unable to create ExtSaveData archives in the SDMC directory.
2015-03-14 12:00:01 -05:00
Subv 9db5c9b6dc Archives: Properly implemented the SystemSaveData archive.
Ported to the new factory pattern we have for archives.
2015-02-25 19:37:10 -05:00
Yuri Kunde Schlesner 3f1a3952d7 FS: Allow multiple instances of the same archive type to be open at once 2015-02-10 13:43:44 -02:00
Subv c2e9990149 Services: Stubbed more services.
Implemented FSUser::CreateExtSaveData
2015-01-24 15:44:40 -05:00
bunnei 088863c921 Merge pull request #376 from Subv/arc_reorder
Archives: Change the folder layout of some archives.
2015-01-06 20:13:56 -05:00
Subv 8fbe5d2dca Archives/Exdata: Don't set concrete_mount_point in the ctor 2015-01-06 16:12:25 -05:00
Subv 5244ac0e9c Archives: Addressed some comments 2015-01-06 15:02:30 -05:00
Subv 123a76c9c8 SaveDataCheck: Fixed a typo 2015-01-05 16:40:36 -05:00
Subv 90dffe3fc1 Archives: Make SYSTEM_ID and SDCARD_ID strings 2015-01-04 09:10:27 -05:00
Subv 71a063f45c Archives: Changed the way paths are built for the archives.
Each archive now takes a mount point of either NAND or SDMC, and builds its own directory structure there, trying to simulate an HLE-friendly hardware layout
2015-01-03 20:46:05 -05:00
Subv cfd7b219f6 SaveDataCheck: Move the files to nand/title
under /nand/title/high/low/content/00000000.app.romfs
2015-01-03 19:01:46 -05:00
Yuri Kunde Schlesner 930e13cb2c FileSys: Fix crash bug in DiskFile exposed by #400 2015-01-03 18:28:37 -02:00
Yuri Kunde Schlesner 19b2e739c5 FileSys: Fix a few memory leaks 2015-01-03 17:16:16 -02:00
Subv 3bc9f5509b Archives: Change the folder layout of some archives.
This is to better represent the hardware layout, they are still aren't quite accurate, but this better and will help a bit when implementing the other archives like NAND-RO and NAND-RW
2015-01-02 21:55:13 -05:00
Subv 22cfa55302 IVFCArchive: Use a critical log to notify of invalid operations. 2015-01-02 21:39:31 -05:00
Subv 0d03fdec71 SaveDataCheck: Remove unneeded constructor from a class 2015-01-02 21:28:46 -05:00
Subv 2f9a2d410d Archives: Added some documentation to IVFCArchive 2015-01-02 21:13:55 -05:00
Subv aade417b14 Archives: Reduced duplicate code in RomFS and SaveCheck.
Fixed a few warnings and cleaned up the code
2015-01-02 21:13:54 -05:00
Subv 13efbdc201 SaveDataCheck: Preliminary work in this archive.
This allows Steel Diver to boot further, some files are needed.

This is still not ready and needs a big cleanup, this will possibly be delayed until the way we handle archives is fixed (with factory classes instead of ahead-of-time creation of archives)
2015-01-02 21:13:53 -05:00
Subv 2c89d4d5cd Archives: Implemented ExtSaveData and SharedExtSaveData
They will be stored in /extsavedata/SDMC and /extsavedata/NAND respectively.
Also redirect some APT_A functions to their APT_U equivalents.
Implemented the gamecoin.dat file in SharedExtSaveData in the PTM module.
Implemented formatting the savegame.
Retake a previous savegame if it exists instead of reporting them as not formatted every time a game is loaded.
2014-12-29 22:29:55 -05:00
Emmanuel Gil Peyrot bbe0bf1332 FileSys: Clean up according to the coding style, and remove redundant namespaced names. 2014-12-24 01:49:48 +00:00
Subv 6115f013a9 CFG: Create a new subfolder cfg inside service to handle cfg
Moved most of the shared CFG code there, implemented a few CFG:I functions
2014-12-21 16:41:06 -05:00
Subv a1b9b80a55 Style: Addressed some comments 2014-12-21 16:39:20 -05:00
Subv 4cd21b43c1 CFG: Refactored how the config file works.
It is now kept in memory as per 3dbrew, all updates happen on memory, then they can be saved using UpdateConfigNANDSavegame.
2014-12-21 16:38:59 -05:00
Subv fa3d72ab3e CFG: Implemented the GetConfigInfoBlk2 function.
Added a "config" file to the CFG process service (CFG:U), and added a few default blocks to it.

Implemented GetSystemModel and GetModelNintendo2DS
2014-12-21 16:38:54 -05:00
bunnei 0de6a08d75 Merge pull request #291 from purpasmart96/license
License change
2014-12-21 16:05:44 -05:00
bunnei 572ce043c2 Merge pull request #271 from archshift/createf
Added CreateFile to the FS_USER service
2014-12-21 01:45:00 -05:00
archshift 0625dd09ea Added CreateFile to the FS_USER service
Tested with hwtests.
2014-12-21 02:21:49 -03:00
purpasmart96 ebfd831ccb License change 2014-12-20 21:20:24 -08:00
bunnei 2b0d7a1d29 Merge pull request #315 from chinhodado/master
Clean up some warnings
2014-12-20 11:59:18 -05:00
Chin e795692614 Clean up some warnings 2014-12-20 10:03:36 -05:00
Yuri Kunde Schlesner 82528ba7df Common: Add a clone of std::make_unique 2014-12-20 03:45:02 -02:00
Subv f9472eda0a SystemSaveData: Added a TODO to move it to the NAND.
Maybe sometime when we actually implement that
2014-12-18 16:58:42 -05:00
Subv bec527fa24 SaveData: Implemented the SystemSaveData archive.
It will be stored in the /syssavedata folder. This archive is user by various Services and possibly games via the FS:U service.
2014-12-17 23:44:32 -05: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 83e6e4ffec FS.Archive: Clean up treatment of archives and their handles
- Refactor FS::Archive internals to make Archive creation and lifetime
  management clearer.
- Remove the "Archive as a File" hack.
- Implement 64-bit Archive handles.
2014-12-16 01:08:44 -02:00
Yuri Kunde Schlesner 0931a42af0 Service.FS: Rename FileSys::File to FileBackend 2014-12-16 01:08:43 -02:00
Yuri Kunde Schlesner d51afab0bc Service.FS: Rename FileSys::Directory to DirectoryBackend 2014-12-16 01:08:43 -02:00
Yuri Kunde Schlesner 82fe821e87 Service.FS: Rename FileSys::Archive to ArchiveBackend 2014-12-16 01:08:42 -02:00
Yuri Kunde Schlesner f6153679b0 Service.FS: Do archive registration using IdCode instead of name 2014-12-16 01:08:42 -02:00
Yuri Kunde Schlesner 0600e2d8b5 Convert old logging calls to new logging macros 2014-12-13 02:08:02 -02:00
bunnei 1f4953e1bb Merge pull request #264 from Subv/files
Kernel/File: Fixed file read/write hwtests
2014-12-08 18:05:03 -05:00
Subv 1d1078fd8b Kernel/File: Fixed file read/write hwtests
The 3DS allows the user to read from files opened with the Write access modifier, even if he did not specify the Read access modifier.

Open the files in binary mode so that we can prevent CR/LF problems in Windows, where a line-end is replaced by these two bytes instead of just 0xA, this was causing problems with the GetSize test
2014-12-08 17:45:17 -05:00