mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-25 17:00:15 +00:00
Adding much more detail to information about extracting the Config Savegame
parent
e4af71165f
commit
1936ddc393
@ -41,37 +41,75 @@ The Config Savegame is required to play some specific games in Citra. If you don
|
||||
|
||||
Service.CFG <Error> core/hle/service/cfg/cfg.cpp:GetConfigInfoBlock:197: Config block 0xB0001 with flags 2 and size 2048 was not found
|
||||
|
||||
For now, this procedure to dump the Config Savegame is Linux-only. It assumes you are familiar with the procedure of dumping a game as explained in the wiki page [[Dumping Game Cartridges]].
|
||||
|
||||
|
||||
#### Tools required:
|
||||
|
||||
- [Gateway Launcher](http://www.gateway-3ds.com/downloads)
|
||||
For now, this procedure to dump the Config Savegame requires a Linux computer, as there are steps that cannot be performed on a Windows machine. You will also require your 3DS to be able to run Decrypt9 and either the Gateway Launcher or FBI. Instructions on modding a 3DS can be found here: https://github.com/Plailect/Guide/wiki. You are also going to need space on your SD card to contain a dump of your 3DS's NAND and its decryption keys (~2 GB)
|
||||
|
||||
Before you get started, make sure you have the following...
|
||||
|
||||
_On a Linux PC:_
|
||||
- [3DSFAT16tool](https://github.com/d0k3/3DSFAT16tool) - extract this somewhere on your machine, preferably in its own folder.
|
||||
- [3dsfuse](https://github.com/3dshax/3ds) - There is no precompiled version of this tool. Instructions for compiling 3dsfuse are below, in step 5.
|
||||
|
||||
_On your 3DS:_
|
||||
- [Decrypt9](https://github.com/archshift/Decrypt9)
|
||||
- [3DSFAT16tool](https://github.com/d0k3/3DSFAT16tool)
|
||||
- [3dsfuse](https://github.com/3dshax/3ds)
|
||||
- A 3DS with a firmware of 9.2 or lower
|
||||
- A SD Card to contain the dumped NAND (> 1GB)
|
||||
- (Optional) [Gateway launcher](http://www.gateway-3ds.com/downloads)
|
||||
- (Optional) [FBI](https://github.com/Steveice10/FBI)
|
||||
|
||||
#### Step 1 – **Dumping NAND**
|
||||
Boot the [gateway launcher](http://www.gateway-3ds.com/downloads) using the Launcher.dat file placed at the root of the SD Card and accessing 'http://go.gateway-3ds.com'.
|
||||
Select the option `Backup System NAND` and press `START` to dump your NAND to your SD card. The SD card should then contain a file `NAND.bin`.
|
||||
First you will have to dump your system NAND. This can be done several ways, a few of which are detailed below:
|
||||
|
||||
1) Boot the [Gateway launcher](http://www.gateway-3ds.com/downloads) using the Launcher.dat file placed at the root of the SD Card and accessing 'http://go.gateway-3ds.com'. Select the option Backup System NAND and press START to dump your NAND to your SD card. The SD card should then contain a file `NAND.bin`.
|
||||
|
||||
2) Open the [FBI](https://github.com/Steveice10/FBI) homebrew app. From the main menu, select Dump NAND. Follow the prompts to dump your NAND. When finished, the SD card will contain the dump inside the folder `/fbi/nand`.
|
||||
|
||||
3) Open [Decrypt9](https://github.com/archshift/Decrypt9) and select `SysNAND / EmuNAND Options`->`SysNAND Backup & Restore...`->`NAND Backup`. When finished, the SD card will contain a file `NAND.bin`.
|
||||
|
||||
#### Step 2 – **Generating NAND Xorpad**
|
||||
The NAND.bin file dumped in the previous step is encrypted. To decrypt it, we need to generate xorpads. Overwrite the Launcher.dat on your SD card with the one included in the [Decrypt9](https://github.com/archshift/Decrypt9) package. Boot the latter using the browser exploit as in Step 1.
|
||||
Select the `CTRNAND Padgen` option to generate the NAND xorpad. You will then have a `nand.fat16.xorpad` file.
|
||||
The NAND.bin file dumped in the previous step is encrypted. To decrypt it, we need to generate xorpads using [Decrypt9](https://github.com/archshift/Decrypt9). Within Decrypt9, select `XORpad Generator Options`->`CTRNAND Padgen`. This will generate the NAND xorpad, which is saved to your SD card as `nand.fat16.xorpad`.
|
||||
|
||||
#### Step 3 – **Decrypt and mount NAND**
|
||||
Having both `NAND.bin` and `nand.fat16.xorpad` on your computer, use [3DSFAT16tool](https://github.com/d0k3/3DSFAT16tool) to decrypt and mount your NAND.
|
||||
Place your NAND dump somewhere on your computer and rename it to `NAND.bin` if it's not already named `NAND.bin`. Place the `NAND.fat16.xorpad` file in the same directory that you extracted the [3DSFAT16tool](https://github.com/d0k3/3DSFAT16tool) zip to. Open a terminal window in that folder and execute the following command, which will generate a file called `NAND.fat16.bin`.
|
||||
|
||||
gcc -std=gnu99 3DSFAT16tool.c -o 3DSFAT16tool
|
||||
./3DSFAT16tool -d NAND.BIN NAND.fat16.bin nand.fat16.xorpad
|
||||
sudo mount NAND.fat16.bin <some-mount-point>
|
||||
./3DSFAT16tool -d NAND.bin NAND.fat16.bin nand.fat16.xorpad
|
||||
|
||||
You should now be able to browse the content of your NAND.
|
||||
#### Step 4 - **Mounting the decrypted NAND**
|
||||
|
||||
#### Step 4 – **Extract the Config Savegame**
|
||||
The Config Savegame file is `<some-mount-point>/data/<unique-ID>/sysdata/00010017/00000000` but it's in IVFC format and Citra want the bare file content so we need to extract the latter using [3dsfuse](https://github.com/3dshax/3ds).
|
||||
Some partition information about the `NAND.fat16.bin` file in order to mount it. Execute the following commands on your PC (in order):
|
||||
|
||||
./3dsfuse <some-mount-point>/data/<unique-id>/sysdata/00010017/00000000 --nowear <some-other-mount-point>
|
||||
parted NAND.fat16.bin
|
||||
unit
|
||||
B
|
||||
print
|
||||
q
|
||||
|
||||
The extracted `config` file is `<some-other-mount-point>/part_00/config`.
|
||||
The output from these commands include a table that includes the columns "Number", "Start", "End", etc.
|
||||
Look underneath "Start" and copy that value, excluding the 'B' indicating the number of bytes that number refers to (if the value if 182784B, copy 182784). With this number in hand, you should now be able to mount `NAND.fat16.bin`. Execute the following commands:
|
||||
|
||||
sudo mkdir /mnt/firstmnt
|
||||
sudo mount -t msdos -o loop,offset=<the number you copied> NAND.fat16.bin /mnt/firstmnt
|
||||
|
||||
Now you can use the terminal or the file browser to browse the mounted image. The Config Savegame file is at `/mnt/data/<unique-ID>/sysdata/00010017/00000000` but it's in IVFC format and Citra needs the bare file content, so we have one more step to take, and this one's the hardest step if you're not a relatively experienced Linux user.
|
||||
|
||||
#### Step 5 - **Compiling 3dsfuse**
|
||||
If in the future [3dsfuse](https://github.com/3dshax/3ds) is available precompiled or you are able to obtain it precompiled then this step can be skipped.
|
||||
|
||||
First, download the project files from https://github.com/3dshax/3ds/archive/master.zip and extract the downloaded zip somewhere on your computer. In a terminal window, navigate to the extracted folder and from there into the folder `3dsfuse`.
|
||||
|
||||
From here, you might just have to type 'make' and hit enter to compile it, but you might hit errors relating to pkg-config, openssl, and/or fuse. If you do, follow the below instructions for getting past those errors:
|
||||
- Ensure that openssl is installed by entering the command `/usr/local/openssl/bin/openssl version`. If you don't get a response similar to `OpenSSL <version> <date>`, you need to install openssl. Follow the instructions [here](https://geeksww.com/tutorials/libraries/openssl/installation/installing_openssl_on_ubuntu_linux.php).
|
||||
- Ensure that pkg_config (not pkgconfig) is installed. Run the command `sudo apt-get install pkg_config`.
|
||||
- Ensure that fuse is installed. Run the command `sudo apt-get install libfuse-dev`.
|
||||
- Ensure that devkitpro and devkitarm are set up on your machine. Follow the instructions [here](http://wiki.gbatemp.net/wiki/3DS_Homebrew_Development#Install_devkitPro_w.2F_devkitARM).
|
||||
|
||||
Once compiled, a new file will be generated called `3dsfuse`.
|
||||
|
||||
#### Step 6 – **Extract the Config Savegame**
|
||||
With `NAND.fat16.bin` mounted as described in Step 4, go to the folder containing the compiled [3dsfuse](https://github.com/3dshax/3ds) and run the following commands:
|
||||
|
||||
sudo mkdir /mnt/secondmnt
|
||||
./3dsfuse /mnt/firstmnt/data/<unique-id>/sysdata/00010017/00000000 --nowear /mnt/secondmnt
|
||||
|
||||
The extracted config file is in `/mnt/secondmnt/part_00`. There will be a file called `config`. Copy this file to the computer you will be running Citra on, and paste it into `<Citra location>/user/nand/data/00000000000000000000000000000000/sysdata/00010017/00000000`. If you are asked if you wish to overwrite the file, say yes.
|
Loading…
Reference in New Issue
Block a user