From 3fd46035537ca5872bc86e46459c2b20defcb1f4 Mon Sep 17 00:00:00 2001 From: Aurora Date: Sat, 23 Apr 2016 01:43:11 +0200 Subject: [PATCH] Welcome Luma3DS --- Makefile | 4 ++-- README.md | 8 ++++---- injector/source/patcher.c | 8 ++++---- loader/source/main.c | 8 ++++---- loader/source/types.h | 6 ------ patches/reboot.s | 2 +- pathchanger/pathchanger.c | 4 ++-- source/buttons.h | 2 -- source/config.c | 2 -- source/config.h | 2 -- source/crypto.c | 4 +--- source/crypto.h | 4 +--- source/draw.c | 8 +++----- source/draw.h | 4 +--- source/emunand.c | 2 -- source/emunand.h | 2 -- source/firm.c | 6 ++---- source/firm.h | 2 -- source/fs.c | 4 +--- source/fs.h | 2 -- source/loader.c | 2 -- source/loader.h | 2 -- source/memory.c | 2 -- source/memory.h | 2 -- source/patches.c | 2 -- source/patches.h | 2 -- source/screeninit.c | 4 +--- source/screeninit.h | 4 +--- source/types.h | 2 -- source/utils.c | 2 -- source/utils.h | 2 -- 31 files changed, 28 insertions(+), 82 deletions(-) diff --git a/Makefile b/Makefile index d056f82..10e2e31 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ AS := arm-none-eabi-as LD := arm-none-eabi-ld OC := arm-none-eabi-objcopy -name := AuReiNand +name := Luma version := $(shell git describe --abbrev=0 --tags) dir_source := source @@ -60,7 +60,7 @@ clean: @rm -rf $(dir_out) $(dir_build) $(dir_out): - @mkdir -p "$(dir_out)/aurei/payloads" + @mkdir -p "$(dir_out)/luma/payloads" $(dir_out)/$(name).dat: $(dir_build)/main.bin $(dir_out) @$(MAKE) $(FLAGS) -C $(dir_mset) launcher diff --git a/README.md b/README.md index d7973a1..6ada5cc 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# AuReiNand -*A modification of the ReiNand custom firmware* +# Luma3DS +*Noob-proof (N)3DS "Custom Firmware"* **Compiling:** @@ -9,8 +9,8 @@ You can find the compiled files in the 'out' folder. **Setup / Usage / Features:** -See https://github.com/AuroraWright/AuReiNand/wiki +See https://github.com/AuroraWright/Luma3DS/wiki **Credits:** -See https://github.com/AuroraWright/AuReiNand/wiki/Credits \ No newline at end of file +See https://github.com/AuroraWright/Luma3DS/wiki/Credits \ No newline at end of file diff --git a/injector/source/patcher.c b/injector/source/patcher.c index cfa1c67..95d5fe4 100644 --- a/injector/source/patcher.c +++ b/injector/source/patcher.c @@ -123,7 +123,7 @@ static u32 loadConfig(void) if(!config) { IFile file; - if(R_SUCCEEDED(fileOpen(&file, ARCHIVE_SDMC, "/aurei/config.bin", FS_OPEN_READ))) + if(R_SUCCEEDED(fileOpen(&file, ARCHIVE_SDMC, "/luma/config.bin", FS_OPEN_READ))) { u64 total; if(R_SUCCEEDED(IFile_Read(&file, &total, &config, 4))) config |= 1 << 4; @@ -136,12 +136,12 @@ static u32 loadConfig(void) static int loadTitleLocaleConfig(u64 progId, u8 *regionId, u8 *languageId) { - /* Here we look for "/aurei/locales/[u64 titleID in hex, uppercase].txt" + /* Here we look for "/luma/locales/[u64 titleID in hex, uppercase].txt" If it exists it should contain, for example, "EUR IT" */ - char path[] = "/aurei/locales/0000000000000000.txt"; + char path[] = "/luma/locales/0000000000000000.txt"; - u32 i = 30; + u32 i = 29; while(progId > 0) { diff --git a/loader/source/main.c b/loader/source/main.c index 07023fc..8daa78a 100644 --- a/loader/source/main.c +++ b/loader/source/main.c @@ -7,7 +7,7 @@ static u32 loadPayload(const char *pattern) { - char path[30] = "/aurei/payloads"; + char path[30] = "/luma/payloads"; DIR dir; FILINFO info; @@ -19,11 +19,11 @@ static u32 loadPayload(const char *pattern) if(result != FR_OK || !info.fname[0]) return 0; - path[15] = '/'; + path[14] = '/'; u32 i; for(i = 0; info.fname[i]; i++) - path[16 + i] = info.fname[i]; - path[16 + i] = '\0'; + path[15 + i] = info.fname[i]; + path[15 + i] = '\0'; FIL payload; unsigned int br; diff --git a/loader/source/types.h b/loader/source/types.h index 56d82bb..8ac964b 100644 --- a/loader/source/types.h +++ b/loader/source/types.h @@ -1,9 +1,3 @@ -/* -* types.h -* by Reisyukaku -* Copyright (c) 2015 All Rights Reserved -*/ - #pragma once #include diff --git a/patches/reboot.s b/patches/reboot.s index 9d1e162..d9a84e3 100644 --- a/patches/reboot.s +++ b/patches/reboot.s @@ -80,7 +80,7 @@ fopen: .ascii "OPEN" .pool bin_fname: .dcw "sdmc:/arm9loaderhax.bin" .word 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -dat_fname: .dcw "sdmc:/AuReiNand.dat" +dat_fname: .dcw "sdmc:/Luma3DS.dat" .word 0 .align 4 diff --git a/pathchanger/pathchanger.c b/pathchanger/pathchanger.c index 264f267..c76e416 100644 --- a/pathchanger/pathchanger.c +++ b/pathchanger/pathchanger.c @@ -43,7 +43,7 @@ static int fsize(FILE *fp) static void error(FILE *payload, const char *message) { fclose(payload); - printf("%s, are you sure you're using an AuReiNand payload?\n", message); + printf("%s, are you sure you're using a Luma3DS payload?\n", message); exit(0); } @@ -51,7 +51,7 @@ int main(int argc, char **argv) { if(argc == 1) { - printf("Usage: %s \n", argv[0]); + printf("Usage: %s \n", argv[0]); exit(0); } diff --git a/source/buttons.h b/source/buttons.h index bf31c33..9a65de4 100644 --- a/source/buttons.h +++ b/source/buttons.h @@ -1,7 +1,5 @@ /* * buttons.h -* by Aurora Wright -* Copyright (c) 2016 All Rights Reserved */ #pragma once diff --git a/source/config.c b/source/config.c index af1211e..014f7fa 100644 --- a/source/config.c +++ b/source/config.c @@ -1,7 +1,5 @@ /* * config.c -* by Aurora Wright -* Copyright (c) 2016 All Rights Reserved */ #include "config.h" diff --git a/source/config.h b/source/config.h index 7444e00..deadb95 100644 --- a/source/config.h +++ b/source/config.h @@ -1,7 +1,5 @@ /* * config.h -* by Aurora Wright -* Copyright (c) 2016 All Rights Reserved */ #pragma once diff --git a/source/crypto.c b/source/crypto.c index b0262c6..b6a1980 100755 --- a/source/crypto.c +++ b/source/crypto.c @@ -1,9 +1,7 @@ /* * crypto.c -* by Reisyukaku / Aurora Wright -* Crypto libs from http://github.com/b1l1s/ctr * -* Copyright (c) 2016 All Rights Reserved +* Crypto libs from http://github.com/b1l1s/ctr */ #include "crypto.h" diff --git a/source/crypto.h b/source/crypto.h index 1110406..f5fc441 100755 --- a/source/crypto.h +++ b/source/crypto.h @@ -1,9 +1,7 @@ /* * crypto.h -* by Reisyukaku / Aurora Wright -* Crypto libs from http://github.com/b1l1s/ctr * -* Copyright (c) 2016 All Rights Reserved +* Crypto libs from http://github.com/b1l1s/ctr */ #pragma once diff --git a/source/draw.c b/source/draw.c index 65238c5..546a3ad 100644 --- a/source/draw.c +++ b/source/draw.c @@ -1,9 +1,7 @@ /* * draw.c -* by Reisyukaku / Aurora Wright -* Code to print to the screen by mid-kid @CakesFW * -* Copyright (c) 2016 All Rights Reserved +* Code to print to the screen by mid-kid @CakesFW */ #include "draw.h" @@ -41,8 +39,8 @@ void loadSplash(void) initScreens(); //Don't delay boot if no splash image is on the SD - if(fileRead(fb->top_left, "/aurei/splash.bin", 0x46500) + - fileRead(fb->bottom, "/aurei/splashbottom.bin", 0x38400)) + if(fileRead(fb->top_left, "/luma/splash.bin", 0x46500) + + fileRead(fb->bottom, "/luma/splashbottom.bin", 0x38400)) { u64 i = 0x1400000; while(--i) __asm("mov r0, r0"); //Less Ghetto sleep func diff --git a/source/draw.h b/source/draw.h index 9b084c3..53522a6 100644 --- a/source/draw.h +++ b/source/draw.h @@ -1,9 +1,7 @@ /* * draw.h -* by Reisyukaku / Aurora Wright -* Code to print to the screen by mid-kid @CakesFW * -* Copyright (c) 2016 All Rights Reserved +* Code to print to the screen by mid-kid @CakesFW */ #pragma once diff --git a/source/emunand.c b/source/emunand.c index 2059dcd..6139389 100644 --- a/source/emunand.c +++ b/source/emunand.c @@ -1,7 +1,5 @@ /* * emunand.c -* by Reisyukaku / Aurora Wright -* Copyright (c) 2016 All Rights Reserved */ #include "emunand.h" diff --git a/source/emunand.h b/source/emunand.h index 459cadb..1cf0751 100644 --- a/source/emunand.h +++ b/source/emunand.h @@ -1,7 +1,5 @@ /* * emunand.h -* by Reisyukaku / Aurora Wright -* Copyright (c) 2016 All Rights Reserved */ #pragma once diff --git a/source/firm.c b/source/firm.c index dc16bc5..5a4ebfa 100755 --- a/source/firm.c +++ b/source/firm.c @@ -1,7 +1,5 @@ /* * firm.c -* by Reisyukaku / Aurora Wright -* Copyright (c) 2016 All Rights Reserved */ #include "firm.h" @@ -44,7 +42,7 @@ void main(void) mountFs(); //Attempt to read the configuration file - const char configPath[] = "/aurei/config.bin"; + const char configPath[] = "/luma/config.bin"; if(fileRead(&config, configPath, 4)) needConfig = 1; else { @@ -196,7 +194,7 @@ static inline void loadFirm(u32 firmType, u32 externalFirm) /* If the conditions to load the external FIRM aren't met, or reading fails, or the FIRM doesn't match the console, load it from CTRNAND */ - if(!externalFirm || !fileRead(firm, "/aurei/firmware.bin", 0) || + if(!externalFirm || !fileRead(firm, "/luma/firmware.bin", 0) || (((u32)section[2].address >> 8) & 0xFF) != (console ? 0x60 : 0x68)) { const char *firmFolders[3][2] = {{ "00000002", "20000002" }, diff --git a/source/firm.h b/source/firm.h index be56203..9d8b7b9 100644 --- a/source/firm.h +++ b/source/firm.h @@ -1,7 +1,5 @@ /* * firm.h -* by Reisyukaku / Aurora Wright -* Copyright (c) 2016 All Rights Reserved */ #pragma once diff --git a/source/fs.c b/source/fs.c index 4645315..eb60c64 100644 --- a/source/fs.c +++ b/source/fs.c @@ -1,7 +1,5 @@ /* * fs.c -* by Reisyukaku / Aurora Wright -* Copyright (c) 2016 All Rights Reserved */ #include "fs.h" @@ -56,7 +54,7 @@ u32 defPayloadExists(void) DIR dir; FILINFO info; - FRESULT result = f_findfirst(&dir, &info, "/aurei/payloads", "def_*.bin"); + FRESULT result = f_findfirst(&dir, &info, "/luma/payloads", "def_*.bin"); f_closedir(&dir); diff --git a/source/fs.h b/source/fs.h index 2183ed8..4620204 100644 --- a/source/fs.h +++ b/source/fs.h @@ -1,7 +1,5 @@ /* * fs.h -* by Reisyukaku / Aurora Wright -* Copyright (c) 2016 All Rights Reserved */ #pragma once diff --git a/source/loader.c b/source/loader.c index 19c0de5..d226031 100644 --- a/source/loader.c +++ b/source/loader.c @@ -1,7 +1,5 @@ /* * loader.c -* by Aurora Wright -* Copyright (c) 2016 All Rights Reserved */ #include "loader.h" diff --git a/source/loader.h b/source/loader.h index b9d3b1e..300de99 100644 --- a/source/loader.h +++ b/source/loader.h @@ -1,7 +1,5 @@ /* * loader.h -* by Aurora Wright -* Copyright (c) 2016 All Rights Reserved */ #pragma once diff --git a/source/memory.c b/source/memory.c index dfcf8a6..b5027bd 100644 --- a/source/memory.c +++ b/source/memory.c @@ -1,7 +1,5 @@ /* * memory.c -* by Reisyukaku / Aurora Wright -* Copyright (c) 2016 All Rights Reserved * * Quick Search algorithm adapted from http://igm.univ-mlv.fr/~lecroq/string/node19.html#SECTION00190 */ diff --git a/source/memory.h b/source/memory.h index 95da9b9..2982a0f 100644 --- a/source/memory.h +++ b/source/memory.h @@ -1,7 +1,5 @@ /* * memory.h -* by Reisyukaku / Aurora Wright -* Copyright (c) 2016 All Rights Reserved * * Quick Search algorithm adapted from http://igm.univ-mlv.fr/~lecroq/string/node19.html#SECTION00190 */ diff --git a/source/patches.c b/source/patches.c index 2a73a11..60ac20a 100644 --- a/source/patches.c +++ b/source/patches.c @@ -1,7 +1,5 @@ /* * patches.c -* by Reisyukaku / Aurora Wright -* Copyright (c) 2016 All Rights Reserved */ #include "patches.h" diff --git a/source/patches.h b/source/patches.h index 7b2a44e..78879c2 100644 --- a/source/patches.h +++ b/source/patches.h @@ -1,7 +1,5 @@ /* * patches.h -* by Reisyukaku / Aurora Wright -* Copyright (c) 2016 All Rights Reserved */ #pragma once diff --git a/source/screeninit.c b/source/screeninit.c index df090ad..a8eb012 100644 --- a/source/screeninit.c +++ b/source/screeninit.c @@ -1,10 +1,8 @@ /* * screeninit.c -* by Aurora Wright +* * Screen init code by dark_samus, bil1s, Normmatt, delebile and others. * Screen deinit code by tiniVi. -* -* Copyright (c) 2016 All Rights Reserved */ #include "screeninit.h" diff --git a/source/screeninit.h b/source/screeninit.h index 3bf4c1e..f0aa323 100644 --- a/source/screeninit.h +++ b/source/screeninit.h @@ -1,10 +1,8 @@ /* * screeninit.h -* by Aurora Wright +* * Screen init code by dark_samus, bil1s, Normmatt, delebile and others. * Screen deinit code by tiniVi. -* -* Copyright (c) 2016 All Rights Reserved */ #pragma once diff --git a/source/types.h b/source/types.h index 56d82bb..7caf623 100644 --- a/source/types.h +++ b/source/types.h @@ -1,7 +1,5 @@ /* * types.h -* by Reisyukaku -* Copyright (c) 2015 All Rights Reserved */ #pragma once diff --git a/source/utils.c b/source/utils.c index 73e796d..48aa308 100644 --- a/source/utils.c +++ b/source/utils.c @@ -1,7 +1,5 @@ /* * utils.c -* by Aurora Wright -* Copyright (c) 2016 All Rights Reserved */ #include "utils.h" diff --git a/source/utils.h b/source/utils.h index e97f0c4..f5691d7 100644 --- a/source/utils.h +++ b/source/utils.h @@ -1,7 +1,5 @@ /* * utils.h -* by Aurora Wright -* Copyright (c) 2016 All Rights Reserved */ #pragma once