From 738258c6c4085b043acab7d2329b8c9eb2658ffe Mon Sep 17 00:00:00 2001 From: Dan Ware Date: Sat, 30 May 2020 16:24:47 +0100 Subject: [PATCH] Fixed implementation for Hekate updates and fixed makefile for multiple definitions --- Makefile | 2 +- source/gfx/gfx.c | 16 ++++++++++++++++ source/gfx/gfx.h | 1 + source/gfx/tui.c | 5 +++-- source/incognito/incognito.c | 1 + source/main.c | 3 ++- 6 files changed, 24 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index efac8f1..0646011 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ CUSTOMDEFINES += -DLP_VER_MJ=$(LPVERSION_MAJOR) -DLP_VER_MN=$(LPVERSION_MINOR) - ARCH := -march=armv4t -mtune=arm7tdmi -mthumb -mthumb-interwork CFLAGS = $(ARCH) -O2 -nostdlib -ffunction-sections -fno-inline -fdata-sections -fomit-frame-pointer -std=gnu11 -Wall $(CUSTOMDEFINES) -LDFLAGS = $(ARCH) -nostartfiles -lgcc -Wl,--nmagic,--gc-sections -Xlinker --defsym=IPL_LOAD_ADDR=$(IPL_LOAD_ADDR) +LDFLAGS = $(ARCH) -nostartfiles -lgcc -Wl,--allow-multiple-definition,--nmagic,--gc-sections -Xlinker --defsym=IPL_LOAD_ADDR=$(IPL_LOAD_ADDR) ################################################################################ diff --git a/source/gfx/gfx.c b/source/gfx/gfx.c index e4abe4e..067b13d 100644 --- a/source/gfx/gfx.c +++ b/source/gfx/gfx.c @@ -404,6 +404,22 @@ void gfx_printf(const char *fmt, ...) va_end(ap); } +void gfx_print_header() +{ + u8 prevFontSize = gfx_con.fntsz; + gfx_con.fntsz = 15; + gfx_printf("%k ____ _ __ ____ ________ ___\n", colors[4]); + gfx_printf("%k / _/___ _________ ____ _____ (_) /_____ / __ \\/ ____/ |/ /\n", COLOR_GREEN); + gfx_printf("%k / // __ \\/ ___/ __ \\/ __ `/ __ \\/ / __/ __ \\ / /_/ / / / /|_/ / \n", COLOR_GREEN); + gfx_printf("%k _/ // / / / /__/ /_/ / /_/ / / / / / /_/ /_/ / / _, _/ /___/ / / / \n", COLOR_GREEN); + gfx_printf("%k/___/_/ /_/\\___/\\____/\\__, /_/ /_/_/\\__/\\____/____/_/ |_|\\____/_/ /_/ \n", colors[4]); + gfx_printf("%k /____/ /_____/ \n", colors[4]); + gfx_con.fntsz = 14; + gfx_printf("%kv%d.%d.%d - by jimzrt%k\n\n\n\n", + colors[4], LP_VER_MJ, LP_VER_MN, LP_VER_BF, 0xFFCCCCCC); + gfx_con.fntsz = prevFontSize; +} + void gfx_hexdump(u32 base, const u8 *buf, u32 len) { if (gfx_con.mute) diff --git a/source/gfx/gfx.h b/source/gfx/gfx.h index 0871820..f78fdd1 100644 --- a/source/gfx/gfx.h +++ b/source/gfx/gfx.h @@ -37,6 +37,7 @@ void gfx_con_setpos(u32 x, u32 y); void gfx_putc(char c); void gfx_puts(const char *s); void gfx_printf(const char *fmt, ...); +void gfx_print_header(); void gfx_hexdump(u32 base, const u8 *buf, u32 len); void gfx_set_pixel(u32 x, u32 y, u32 color); diff --git a/source/gfx/tui.c b/source/gfx/tui.c index 3b59569..24ac693 100644 --- a/source/gfx/tui.c +++ b/source/gfx/tui.c @@ -112,8 +112,9 @@ void *tui_do_menu(menu_t *menu) { gfx_con_setcol(0xFFCCCCCC, 1, 0xFF1B1B1B); gfx_con_setpos(menu->x, menu->y); - gfx_printf("[%kLo%kck%kpi%kck%k_R%kCM%k v%d.%d.%d%k]\n\n", - colors[0], colors[1], colors[2], colors[3], colors[4], colors[5], 0xFFFF00FF, LP_VER_MJ, LP_VER_MN, LP_VER_BF, 0xFFCCCCCC); + gfx_print_header(); + //gfx_printf("[%kLo%kck%kpi%kck%k_R%kCM%k v%d.%d.%d%k]\n\n", + // colors[0], colors[1], colors[2], colors[3], colors[4], colors[5], 0xFFFF00FF, LP_VER_MJ, LP_VER_MN, LP_VER_BF, 0xFFCCCCCC); // Skip caption or seperator lines selection. while (menu->ents[idx].type == MENT_CAPTION || diff --git a/source/incognito/incognito.c b/source/incognito/incognito.c index 922f712..0a2b1da 100644 --- a/source/incognito/incognito.c +++ b/source/incognito/incognito.c @@ -20,6 +20,7 @@ #include "../gfx/di.h" #include "../gfx/gfx.h" #include "../gfx/tui.h" +#include "../hos/hos.h" #include "../hos/pkg1.h" #include "../hos/pkg2.h" #include "../hos/sept.h" diff --git a/source/main.c b/source/main.c index cd17850..763b5f0 100644 --- a/source/main.c +++ b/source/main.c @@ -34,6 +34,7 @@ #include "storage/emummc.h" #include "storage/nx_emmc.h" #include "storage/sdmmc.h" +#include "storage/sdmmc_driver.h" #include "utils/btn.h" #include "utils/dirlist.h" #include "utils/sprintf.h" @@ -56,7 +57,7 @@ bool sd_mount() if (sd_mounted) return true; - if (!sdmmc_storage_init_sd(&sd_storage, &sd_sdmmc, SDMMC_1, SDMMC_BUS_WIDTH_4, 11)) + if (!sdmmc_storage_init_sd(&sd_storage, &sd_sdmmc, SDMMC_BUS_WIDTH_4, SDHCI_TIMING_UHS_SDR104)) { EPRINTF("Failed to init SD card.\nMake sure that it is inserted.\nOr that SD reader is properly seated!"); }