Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
  • 10 commits
  • 7 files changed
  • 0 commit comments
  • 4 contributors
Commits on Sep 08, 2018
Display splash before loading firmware
Removes 3 second delay for booting into Horizon, and mutes the console. Errors unmute.
Merge pull request #52 from neonsea/splash_before
Display splash before loading firmware, shave 3 seconds off boot time
Commits on Sep 09, 2018
Merge pull request #53 from shchmue/master
Fix build on Windows
Commits on Sep 10, 2018
Commits on Sep 11, 2018
Commits on Sep 20, 2018
Commits on Sep 21, 2018
Showing with 43 additions and 22 deletions.
  1. +1 −1 Makefile
  2. +1 −1 NX_Sysmodules
  3. +1 −0 src/error.c
  4. +13 −7 src/firmware.c
  5. +16 −2 src/kippatches/fs.inc
  6. +4 −2 src/package.c
  7. +7 −9 src/package.h
View
@@ -4,7 +4,7 @@ ifeq ($(strip $(DEVKITARM)),)
$(error "Please set DEVKITARM in your environment. export DEVKITARM=<path to>devkitARM")
endif
CC = $(DEVKITARM)/bin/arm-none-eabi-gcc
include $(DEVKITARM)/base_tools
LD = $(DEVKITARM)/bin/arm-none-eabi-ld
OBJCOPY = $(DEVKITARM)/bin/arm-none-eabi-objcopy
View
@@ -30,6 +30,7 @@ void panic() {
}
void error(char *errStr) {
gfx_con.mute = 0;
gfx_con_setcol(&gfx_con, RED, 0, 0);
print("Error: %s", errStr);
gfx_con_setcol(&gfx_con, DEFAULT_TEXT_COL, 0, 0);
View
@@ -25,13 +25,14 @@
static pk11_offs *pk11Offs = NULL;
void drawSplash() {
int drawSplash() {
// Draw splashscreen to framebuffer.
if(fopen("/ReiNX/splash.bin", "rb") != 0) {
fread((void*)0xC0000000, fsize(), 1);
fclose();
usleep(3000000);
return 1;
}
return 0;
}
pk11_offs *pkg11_offsentify(u8 *pkg1) {
@@ -302,14 +303,14 @@ void firmware() {
gfx_con_init(&gfx_con, &gfx_ctxt);
gfx_con_setcol(&gfx_con, DEFAULT_TEXT_COL, 0, 0);
while (!sdMount()) {
if (!sdMount()) {
error("Failed to init SD card!\n");
print("Press POWER to power off, any other key to retry\n");
print("Press POWER to power off, or any other key to continue without SD.\n");
if (btn_wait() & BTN_POWER)
i2c_send_byte(I2C_5, 0x3C, MAX77620_REG_ONOFFCNFG1, MAX77620_ONOFFCNFG1_PWR_OFF);
btn_wait();
}
if(PMC(APBDEV_PMC_SCRATCH49) != 69 && fopen("/ReiNX.bin", "rb")) {
fread((void*)PAYLOAD_ADDR, fsize(), 1);
fclose();
@@ -322,9 +323,14 @@ void firmware() {
}
SYSREG(AHB_AHB_SPARE_REG) = (volatile vu32)0xFFFFFF9F;
PMC(APBDEV_PMC_SCRATCH49) = 0;
if (btn_read() & BTN_VOL_DOWN) {
print("Booting verbosely\n");
} else if (drawSplash()) {
gfx_con.mute = 1;
}
print("Welcome to ReiNX %s!\n", VERSION);
loadFirm();
drawSplash();
launch();
}
View
@@ -252,14 +252,28 @@ static kippatch_t fs_kip_patches_510[] = {
{ NULL, NULL }
};
static kippatch_t fs_kip_patches_600[] = {
static kippatch_t fs_kip_patches_600_40[] = {
{ "nosigchk", fs_diffs_600_nosigchk },
{ "nocmac", fs_diffs_600_nocmac },
{ "nogc", fs_diffs_600_nogc },
{ NULL, NULL }
};
static kippatch_t fs_kip_patches_600_exfat[] = {
static kippatch_t fs_kip_patches_600_40_exfat[] = {
{ "nosigchk", fs_diffs_600_exfat_nosigchk },
{ "nocmac", fs_diffs_600_exfat_nocmac },
{ "nogc", fs_diffs_600_exfat_nogc },
{ NULL, NULL }
};
static kippatch_t fs_kip_patches_600_50[] = {
{ "nosigchk", fs_diffs_600_nosigchk },
{ "nocmac", fs_diffs_600_nocmac },
{ "nogc", fs_diffs_600_nogc },
{ NULL, NULL }
};
static kippatch_t fs_kip_patches_600_50_exfat[] = {
{ "nosigchk", fs_diffs_600_exfat_nosigchk },
{ "nocmac", fs_diffs_600_exfat_nocmac },
{ "nogc", fs_diffs_600_exfat_nogc },
View
@@ -249,8 +249,10 @@ kippatchset_t kip_patches[] = {
{ "FS", "\xce\x3e\xcb\xa2\xf2\xf0\x62\xf5\x75\xf8\xf3\x60\x84\x2b\x32\xb4", fs_kip_patches_500 },
{ "FS", "\x76\xf8\x74\x02\xc9\x38\x7c\x0f\x0a\x2f\xab\x1b\x45\xce\xbb\x93", fs_kip_patches_510 },
{ "FS", "\x10\xb2\xd8\x16\x05\x48\x85\x99\xdf\x22\x42\xcb\x6b\xac\x2d\xf1", fs_kip_patches_510 },
{ "FS", "\x1b\x82\xcb\x22\x18\x67\xcb\x52\xc4\x4a\x86\x9e\xa9\x1a\x1a\xdd", fs_kip_patches_600 },
{ "FS", "\x96\x6a\xdd\x3d\x20\xb6\x27\x13\x2c\x5a\x8d\xa4\x9a\xc9\xd8\xdd", fs_kip_patches_600_exfat },
{ "FS", "\x1b\x82\xcb\x22\x18\x67\xcb\x52\xc4\x4a\x86\x9e\xa9\x1a\x1a\xdd", fs_kip_patches_600_40 },
{ "FS", "\x96\x6a\xdd\x3d\x20\xb6\x27\x13\x2c\x5a\x8d\xa4\x9a\xc9\xd8\xdd", fs_kip_patches_600_40_exfat },
{ "FS", "\x3a\x57\x4d\x43\x61\x86\x19\x1d\x17\x88\xeb\x2c\x0f\x07\x6b\x11", fs_kip_patches_600_50 },
{ "FS", "\x33\x05\x53\xf6\xb5\xfb\x55\xc4\xc2\xd7\xb7\x36\x24\x02\x76\xb3", fs_kip_patches_600_50_exfat },
{ NULL, NULL, NULL },
};
View
@@ -39,7 +39,7 @@
#define ID_SND_OFF_302 0x26080
#define ID_SND_OFF_400 0x2AF64
#define ID_SND_OFF_500 0x2AD34
#define ID_SND_OFF_600 0x2BB88
#define ID_SND_OFF_600 0x2BB8C
#define ID_RCV_OFF_100 0x219F0
#define ID_RCV_OFF_200 0x3D1A8
@@ -232,14 +232,12 @@ static u32 PRC_ID_RCV_500[] =
static u32 PRC_ID_SND_600[] =
{
0x2A1703EA, 0xD37EF54A, 0xF86A6B6A, 0x92FFFFE9, 0x8A090148, 0xD2FFFFE9, 0x8A09014A, 0xD2FFFFC9,
0xEB09015F, 0x54000060, 0xF94043EA, 0xF9415948, 0xF94043EA
0xA9BF2FEA, 0xF94037EB, 0x2A1503EA, 0xD37EF54A, 0xF86A696A, 0x92FFFFE9, 0x8A090148, 0xD2FFFFE9, 0x8A09014A, 0xD2FFFFC9, 0xEB09015F, 0x54000100, 0xA9BF27E8, 0xF9400308, 0xF9401D08, 0xAA1803E0, 0xD63F0100, 0xA8C127E8, 0xAA0003E8, 0xA8C12FEA, 0xAA0803E0
};
#define FREE_CODE_OFF_2ND_600 (FREE_CODE_OFF_1ST_600 + sizeof(PRC_ID_SND_600) + 4)
static u32 PRC_ID_RCV_600[] =
{
0xF9403BED, 0x2A1503EA, 0xD37EF54A, 0xF86A69AA, 0x92FFFFE9, 0x8A090148, 0xD2FFFFE9, 0x8A09014A,
0xD2FFFFC9, 0xEB09015F, 0x54000040, 0xF9415B08, 0xF9406FEA
0xA9BF2FEA, 0xF94043EB, 0x2A1503EA, 0xD37EF54A, 0xF86A696A, 0x92FFFFE9, 0x8A090148, 0xD2FFFFE9, 0x8A09014A, 0xD2FFFFC9, 0xEB09015F, 0x54000100, 0xA9BF27E8, 0xF9400308, 0xF9401D08, 0xAA1803E0, 0xD63F0100, 0xA8C127E8, 0xAA0003E8, 0xA8C12FEA, 0xAA0803E0
};
@@ -332,16 +330,16 @@ static kernel_patch_t kern5[] = {
static kernel_patch_t kern6[] = {
{ SVC_VERIFY_DS, 0x47EA0, _NOP(), NULL }, // Disable SVC verifications
{ DEBUG_MODE_EN, 0x57548, _MOVZX(8, 1, 0), NULL }, // Enable Debug Patch
//{ DEBUG_MODE_EN, 0x57548, _MOVZX(8, 1, 0), NULL }, // Enable Debug Patch
// Atmosphère kernel patches.
/*{ ATM_GEN_PATCH, ID_SND_OFF_600, _B(ID_SND_OFF_600, FREE_CODE_OFF_1ST_600), NULL}, // Send process id branch.
{ ATM_GEN_PATCH, ID_SND_OFF_600, _B(ID_SND_OFF_600, FREE_CODE_OFF_1ST_600), NULL}, // Send process id branch.
{ ATM_ARR_PATCH, FREE_CODE_OFF_1ST_600, sizeof(PRC_ID_SND_600) >> 2, PRC_ID_SND_600}, // Send process id code.
{ ATM_GEN_PATCH, FREE_CODE_OFF_1ST_600 + sizeof(PRC_ID_SND_600), // Branch back and skip 2 instructions.
_B(FREE_CODE_OFF_1ST_600 + sizeof(PRC_ID_SND_600), ID_SND_OFF_600 + 8), NULL},
_B(FREE_CODE_OFF_1ST_600 + sizeof(PRC_ID_SND_600), ID_SND_OFF_600 + 0x10), NULL},
{ ATM_GEN_PATCH, ID_RCV_OFF_600, _B(ID_RCV_OFF_600, FREE_CODE_OFF_2ND_600), NULL}, // Receive process id branch.
{ ATM_ARR_PATCH, FREE_CODE_OFF_2ND_600, sizeof(PRC_ID_RCV_600) >> 2, PRC_ID_RCV_600}, // Receive process id code.
{ ATM_GEN_PATCH, FREE_CODE_OFF_2ND_600 + sizeof(PRC_ID_RCV_600), // Branch back and skip 2 instructions.
_B(FREE_CODE_OFF_2ND_600 + sizeof(PRC_ID_RCV_600), ID_RCV_OFF_600 + 8), NULL},*/
_B(FREE_CODE_OFF_2ND_600 + sizeof(PRC_ID_RCV_600), ID_RCV_OFF_600 + 0x10), NULL},
{0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, (u32*)0xFFFFFFFF}
};

No commit comments for this range