If you need to use an EmuNAND, you'll want to enable `EmuNAND` in options. If
you've been using multiple EmuNANDs you can also select the index while you're
there with A to increase and X to decrease. This supports both Gateway-style
-(first sector at back) and standard copied NAND (RedNAND)
+(first sector at back) and standard copied NANDs (RedNAND)
While you're there, you can enable `Autoboot` if you'd like, including
`silent mode` if you're using something like BootAnim9.
+If you plan to use TWL/AGB patches or have an O3DS, you should enable
+`Reboot Hook` in options.
+
You'll also want to go into `Patches` and enable the usual bits, which includes:
* Signature Fix
* Region free HOME
* RO signature fix
+If you're using the reboot hook, you might want these:
+
+ * AGB Patches
+ * TWL Patches
+
If you're on 11.0, you also want these:
* Title Downgrade Fix (Only enable with 11.0 firmware - others will fail)
for (u32 i = 0; i < 7; i++) {
if (memcmp(buf, regions[i], 3) == 0) {
*regionId = (u8)i;
+ logstr(" localeemu region - ");
+ logstr(regions[i]);
+ logstr("\n");
break;
}
}
for (u32 i = 0; i < 12; i++) {
if (memcmp(buf + 4, languages[i], 2) == 0) {
*languageId = (u8)i;
+ logstr(" localeemu lang - ");
+ logstr(languages[i]);
+ logstr("\n");
break;
}
}
- logstr(" langemu cfg applied\n ");
+ logstr(" localeemu read for ");
logstr(path);
logstr("\n");
}
*((u32 *)instr + 1) = 0xE3B00000; // (1 or 2 instructions) => movs
// r0, 0 (result code)
- logstr(" patched language\n");
+ logstr(" patched cfggetlanguage\n");
// We're done
return;
}
}
- logstr(" patched region\n");
+ logstr(" patched cfggetregion\n");
}
static void
}
}
}
+
+ logstr(" patched cpu\n");
}
void
--- /dev/null
+# $name AGB Bootscreen
+# $desc Force usage of GBA bios in AGB_FIRM.
+# $ver 01
+# $uuid 35
+
+# TODO - Make dynamic.
+# This is also terribly inconvienent without labels.
+
+# Note - The bootscreen patch literally boots the GBA BIOS,
+# so games have to pass the Nintendo logo check. If
+# they don't, they'll fail like on a real GBA.
+
+rel agb
+
+# #############################
+
+# Bootscreen (1)
+seek 000D8B8A
+test 01
+jmpne 6
+set 26
+
+jmp 8
+
+#########################
+
+# OLD3ds bootscreen (6)
+seek 000D7A12
+set 26
+
+# #######################
+
+# End (8)
-# $name AGB Patches
-# $desc Patches signatures and bootscreen in AGB firm
+# $name AGB Siganture fix
+# $desc Patches signatures in AGB_FIRM
# $ver 01
-# $uuid 35
+# $uuid 39
# TODO - Make dynamic.
# This is also terribly inconvienent without labels.
# New3DS Sigs (1)
seek 0009DF64
test C117491C31D0
-jmpne 8
+jmpne 6
set 00204EB070BD
-# Bootscreen (5)
-seek 000D8B8A
-set 26
-jmp 12
+jmp 8
#########################
-# OLD3DS Sigs (8)
+# OLD3DS Sigs (6)
seek 0009D2A8
set 00204EB070BD
-# OLD3ds bootscreen (10)
-seek 000D7A12
-set 26
-
# #######################
-# End (12)
+# End (8)
--- /dev/null
+# $name TWL Patches
+# $desc
+# $ver 01
+# $uuid 34
+
+# TODO - Make dynamic. Not that hard, but some
+# fixes need more context bytes than on Steveice10's
+# pastebin
+
+# Relative to twl_firm (0)
+rel twl
+
+###########################################
+# New3ds
+
+# Disable main signature checks (1)
+seek 00165D64
+test C117491C31D0
+jmpne 20
+set 00204EB070BD
+
+# Patch RSA function to not report invalid signatures (5)
+seek 0017474A
+set 0120
+
+# Disable header Nintendo logo check (not generally needed) (7)
+seek 0017553E
+set 00200000
+
+# Disable whitelist check (9)
+seek 001756A0
+set 00200000
+
+# Disable cartridge blacklist check (mostly, if not entirely, demo carts) (11)
+seek 00175A8E
+set 01200000
+
+# Disable save type check (13)
+seek 00175A9A
+set 01200000
+
+# Disable DSi cartridge save exploit check (15)
+seek 00175AA6
+set 01200000
+
+# Stub function commonly used to compare SHA hashes to always succeed (17)
+seek 00175B92
+set 01207047
+
+jmp 36
+
+###########################################
+# Old3ds
+
+# Disable main signature checks (20)
+seek 001650C0
+set 00204EB070BD
+
+# Patch RSA function to not report invalid signatures (22)
+seek 00173A0E
+set 0120
+
+# Disable header Nintendo logo check (not generally needed) (24)
+seek 00174802
+set 00200000
+
+# Disable whitelist check (26)
+seek 00174964
+set 00200000
+
+# Disable cartridge blacklist check (mostly, if not entirely, demo carts) (28)
+seek 00174D52
+set 01200000
+
+# Disable save type check (30)
+seek 00174D5E
+set 01200000
+
+# Disable DSi cartridge save exploit check (32)
+seek 00174D6A
+set 01200000
+
+# Stub function commonly used to compare SHA hashes to always succeed (34)
+seek 00174E56
+set 01207047
+
+# end (36)
+
+++ /dev/null
-# $name TWL_FIRM patches (New3DS)
-# $desc
-# $ver 01
-# $uuid 34
-
-# TODO - Make dynamic
-
-# Relative to twl_firm
-rel twl
-
-# Disable main signature checks
-seek 00165D64
-set 00204EB070BD
-
-# Patch RSA function to not report invalid signatures
-seek 0017474A
-set 0120
-
-# Disable header Nintendo logo check (not generally needed)
-seek 0017553E
-set 00200000
-
-# Disable whitelist check
-seek 001756A0
-set 00200000
-
-# Disable cartridge blacklist check (mostly, if not entirely, demo carts)
-seek 00175A8E
-set 01200000
-
-# Disable save type check
-seek 00175A9A
-set 01200000
-
-# Disable DSi cartridge save exploit check
-seek 00175AA6
-set 01200000
-
-# Stub function commonly used to compare SHA hashes to always succeed
-seek 00175B92
-set 01207047
-
+++ /dev/null
-# $name TWL_FIRM patches (Old3DS)
-# $desc
-# $ver 01
-# $uuid 36
-
-# TODO - Make dynamic
-
-# Relative to agb_firm
-rel twl
-
-# Disable main signature checks
-seek 001650C0
-set 00204EB070BD
-
-# Patch RSA function to not report invalid signatures
-seek 00173A0E
-set 0120
-
-# Disable header Nintendo logo check (not generally needed)
-seek 00174802
-set 00200000
-
-# Disable whitelist check
-seek 00174964
-set 00200000
-
-# Disable cartridge blacklist check (mostly, if not entirely, demo carts)
-seek 00174D52
-set 01200000
-
-# Disable save type check
-seek 00174D5E
-set 01200000
-
-# Disable DSi cartridge save exploit check
-seek 00174D6A
-set 01200000
-
-# Stub function commonly used to compare SHA hashes to always succeed
-seek 00174E56
-set 01207047
-
-# end
int doing_autoboot = 0;
void shut_up();
-#define CONFIG_PLATFORM_REG ((volatile uint32_t*)0x10140FFC)
-
int
main()
{
- if (*CONFIG_PLATFORM_REG == 7)
- is_n3ds = 1;
+ if (PDN_MPCORE_CFG == 7)
+ is_n3ds = 1; // Enable n3ds specific options.
int c = fmount();
screen_init();
load_config(); // Load configuration.
+ if (CFG_BOOTENV == 7) {
+ fprintf(stderr, "Rebooted from AGB, disabling EmuNAND\n");
+ config.options[OPTION_EMUNAND] = 0;
+ }
+
// Autoboot. Non-standard code path.
if (config.options[OPTION_AUTOBOOT] && !(HID_PAD & BUTTON_R)) {
if (config.options[OPTION_SILENCE])