mirror of
https://github.com/AuroraWright/SafeA9LHInstaller.git
synced 2025-06-26 05:32:45 +00:00
Added automatic version number printing, success messages are now green
This commit is contained in:
parent
0ede524c31
commit
7144e593f4
2
Makefile
2
Makefile
@ -6,6 +6,7 @@ LD := arm-none-eabi-ld
|
||||
OC := arm-none-eabi-objcopy
|
||||
|
||||
name := SafeA9LHInstaller
|
||||
version := $(shell git describe --abbrev=0 --tags)
|
||||
|
||||
dir_source := source
|
||||
dir_mset := CakeHax
|
||||
@ -15,6 +16,7 @@ dir_out := out
|
||||
|
||||
ASFLAGS := -mlittle-endian -mcpu=arm946e-s -march=armv5te
|
||||
CFLAGS := -Wall -Wextra -MMD -MP -marm $(ASFLAGS) -fno-builtin -fshort-wchar -std=c11 -Wno-main -O2 -ffast-math
|
||||
CFLAGS += -DTITLE="\"$(name) $(version)\""
|
||||
FLAGS := name=$(name).dat dir_out=$(abspath $(dir_out)) ICON=$(abspath icon.png) APP_DESCRIPTION="Noob-proof ARM9LoaderHax installer/updater." APP_AUTHOR="Aurora Wright" --no-print-directory
|
||||
|
||||
objects= $(patsubst $(dir_source)/%.s, $(dir_build)/%.o, \
|
||||
|
@ -39,7 +39,7 @@ void installer(void){
|
||||
//Detect the console being used
|
||||
u32 console = (PDN_MPCORE_CFG == 1) ? 0 : 1;
|
||||
|
||||
drawString("Safe A9LH Installer v1.5.1", 10, 10, COLOR_TITLE);
|
||||
drawString(TITLE, 10, 10, COLOR_TITLE);
|
||||
pos_y = drawString("Thanks to delebile, #cakey and StandardBus", 10, 40, COLOR_WHITE);
|
||||
pos_y = drawString(a9lhBoot ? "Press SELECT to update A9LH" : "Press SELECT for a full install", 10, pos_y + SPACING_VERT, COLOR_WHITE);
|
||||
pos_y = drawString("Press any other button to shutdown", 10, pos_y, COLOR_WHITE);
|
||||
@ -131,5 +131,5 @@ void installer(void){
|
||||
sdmmc_nand_writesectors(0x96, 1, (vu8 *)SECTOR_OFFSET); }
|
||||
writeFirm((u8 *)FIRM0_OFFSET, 0, FIRM_SIZE);
|
||||
|
||||
shutdown(1, a9lhBoot ? "Update: success!" : "Full install: success!");
|
||||
shutdown(2, a9lhBoot ? "Update: success!" : "Full install: success!");
|
||||
}
|
@ -3,7 +3,7 @@
|
||||
#include "i2c.h"
|
||||
|
||||
void initScreens(void){
|
||||
vu32 *const arm11 = (vu32 *)0x1FFFFFF8;
|
||||
vu32 *const arm11 = (u32 *)0x1FFFFFF8;
|
||||
|
||||
void __attribute__((naked)) ARM11(void){
|
||||
__asm(".word 0xF10C01C0");
|
||||
|
@ -3,7 +3,7 @@
|
||||
#include "i2c.h"
|
||||
|
||||
u16 waitInput(void){
|
||||
u32 pressedkey = 0;
|
||||
u32 pressedKey = 0;
|
||||
u16 key;
|
||||
|
||||
//Wait for no keys to be pressed
|
||||
@ -16,18 +16,17 @@ u16 waitInput(void){
|
||||
|
||||
//Make sure it's pressed
|
||||
for(u32 i = 0x13000; i; i--){
|
||||
if (key != HID_PAD)
|
||||
break;
|
||||
if(i == 1) pressedkey = 1;
|
||||
if(key != HID_PAD) break;
|
||||
if(i == 1) pressedKey = 1;
|
||||
}
|
||||
} while(!pressedkey);
|
||||
} while(!pressedKey);
|
||||
|
||||
return key;
|
||||
}
|
||||
|
||||
void shutdown(u32 mode, const char *message){
|
||||
if(mode){
|
||||
pos_y = drawString(message, 10, pos_y + SPACING_VERT, COLOR_RED);
|
||||
pos_y = drawString(message, 10, pos_y + SPACING_VERT, mode == 1 ? COLOR_RED : COLOR_GREEN);
|
||||
drawString("Press any button to shutdown", 10, pos_y, COLOR_WHITE);
|
||||
waitInput();
|
||||
}
|
||||
|
@ -8,8 +8,9 @@
|
||||
#define COLOR_TITLE 0xFF9900
|
||||
#define COLOR_WHITE 0xFFFFFF
|
||||
#define COLOR_RED 0x0000FF
|
||||
#define COLOR_GREEN 0x00FF00
|
||||
|
||||
extern int pos_y;
|
||||
int pos_y;
|
||||
|
||||
u16 waitInput(void);
|
||||
void shutdown(u32 mode, const char *message);
|
Loading…
x
Reference in New Issue
Block a user