Permalink
Browse files

Display splash before loading firmware

Removes 3 second delay for booting into Horizon, and mutes the console. Errors unmute.
  • Loading branch information...
neonsea committed Sep 8, 2018
1 parent 1e71069 commit 2cc51b5cfe3d85fbbee3b79ba9f5cf4bc660f40c
Showing with 12 additions and 5 deletions.
  1. +1 −0 src/error.c
  2. +11 −5 src/firmware.c
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) {
@@ -309,7 +310,7 @@ void firmware() {
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();
}

0 comments on commit 2cc51b5

Please sign in to comment.