diff options
| author | Aetias <aetias@outlook.com> | 2023-10-21 10:36:14 +0200 |
|---|---|---|
| committer | Aetias <aetias@outlook.com> | 2023-10-21 10:36:14 +0200 |
| commit | d2f26367743c4393d469809633fa2f3074679e0c (patch) | |
| tree | f24e6d1d6d9cf41dcc55abb8cd2d4f99b89059d4 /INSTALL.md | |
| parent | add71a74821021e20eeeffc00ec1030224526378 (diff) | |
Match secure area CRC
Diffstat (limited to 'INSTALL.md')
| -rw-r--r-- | INSTALL.md | 28 |
1 files changed, 25 insertions, 3 deletions
@@ -4,6 +4,7 @@ Contents: - [Prerequisites](#prerequisites) - [Build the ROM](#build-the-rom) + - [Matching the base ROM](#matching-the-base-rom) ## Prerequisites @@ -19,9 +20,8 @@ python tools/setup.py ## Build the ROM -This repository does not include any of the game's assets. You will need an original decrypted ROM for the version(s) you want -to build. -Put the original ROM in the root directory of this repository. Please verify that your dumped ROM matches one of the versions +This repository does not include any of the game's assets, and you will need an original decrypted base ROM. +Put the base ROM in the root directory of this repository. Please verify that your dumped ROM matches one of the versions below: | Version | File name | SHA1 | @@ -31,3 +31,25 @@ below: Run `make extract` to extract from the base ROM. You only need to do this once. Once you have extracted the base ROM, simply run `make` to rebuild it. + +### Matching the base ROM + +**This is optional!** You only need to follow these steps if you want a matching ROM. + +> [!NOTE] +> For interested readers: +> Retail games are usually "encrypted," which means that the first 0x800 bytes of the secure area is encrypted using a +4168-byte key found in the ARM7 BIOS. The secure area is 0x4000 bytes long and lives at the start of the ARM9 program at +address 0x2000000. +> This encryption is optional, and games will run just fine without it. In fact, this project doesn't even produce an +encrypted ROM. However, the ROM header includes a checksum of the secure area **after** encryption, so we must calculate it +somehow. + +First, [extract the ARM7 BIOS from your DS device](https://wiki.ds-homebrew.com/ds-index/ds-bios-firmware-dump). Put the +ARM7 BIOS in the root directory of this repository, and verify that your dumped BIOS matches the one below: + +| File name | SHA1 | +| --------------- | ------------------------------------------ | +| `arm7_bios.bin` | `6ee830c7f552c5bf194c20a2c13d5bb44bdb5c03` | + +Now, `make` should automatically detect the ARM7 BIOS and will build a matching ROM (soon™). |
