diff --git a/source/gfx/gfx.c b/source/gfx/gfx.c index f47779d..a05f640 100644 --- a/source/gfx/gfx.c +++ b/source/gfx/gfx.c @@ -20,6 +20,9 @@ #include #include "gfx.h" +gfx_ctxt_t gfx_ctxt; +gfx_con_t gfx_con; + static const u8 _gfx_font[] = { 0x00, 0x0C, 0x12, 0x7E, 0x42, 0x42, 0x7E, 0x00, // Char 030 (folder) 0x00, 0x0E, 0x12, 0x22, 0x22, 0x22, 0x3E, 0x00, // Char 031 (file) diff --git a/source/gfx/gfx.h b/source/gfx/gfx.h index 503ee35..28908a0 100644 --- a/source/gfx/gfx.h +++ b/source/gfx/gfx.h @@ -61,7 +61,7 @@ void gfx_boxGrey(int x0, int y0, int x1, int y1, u8 shade); */ // Global gfx console and context. -gfx_ctxt_t gfx_ctxt; -gfx_con_t gfx_con; +extern gfx_ctxt_t gfx_ctxt; +extern gfx_con_t gfx_con; #endif diff --git a/source/hos/pkg2.c b/source/hos/pkg2.c index bc77d1e..74c59c5 100644 --- a/source/hos/pkg2.c +++ b/source/hos/pkg2.c @@ -31,6 +31,10 @@ #define DEBUG_PRINTING*/ #define DPRINTF(...) +u32 pkg2_newkern_ini1_val; +u32 pkg2_newkern_ini1_start; +u32 pkg2_newkern_ini1_end; + static u32 _pkg2_calc_kip1_size(pkg2_kip1_t *kip1) { u32 size = sizeof(pkg2_kip1_t); diff --git a/source/hos/pkg2.h b/source/hos/pkg2.h index ba6a8a0..5e7c3de 100644 --- a/source/hos/pkg2.h +++ b/source/hos/pkg2.h @@ -28,9 +28,9 @@ #define PKG2_NEWKERN_GET_INI1_HEURISTIC 0xD2800015 // Offset of OP + 12 is the INI1 offset. -u32 pkg2_newkern_ini1_val; -u32 pkg2_newkern_ini1_start; -u32 pkg2_newkern_ini1_end; +extern u32 pkg2_newkern_ini1_val; +extern u32 pkg2_newkern_ini1_start; +extern u32 pkg2_newkern_ini1_end; typedef struct _pkg2_hdr_t { diff --git a/source/main.c b/source/main.c index f3a293b..d495ec6 100644 --- a/source/main.c +++ b/source/main.c @@ -44,10 +44,10 @@ //#include "keys/keys.h" -sdmmc_t sd_sdmmc; -sdmmc_storage_t sd_storage; -__attribute__ ((aligned (16))) FATFS sd_fs; -bool sd_mounted, sd_inited; +//sdmmc_t sd_sdmmc; +//sdmmc_storage_t sd_storage; +//__attribute__ ((aligned (16))) FATFS sd_fs; +//bool sd_mounted, sd_inited; volatile nyx_storage_t *nyx_str = (nyx_storage_t *)NYX_STORAGE_ADDR; hekate_config h_cfg; boot_cfg_t __attribute__((section ("._boot_cfg"))) b_cfg; diff --git a/source/mem/minerva.c b/source/mem/minerva.c index adc87ee..2607c4b 100644 --- a/source/mem/minerva.c +++ b/source/mem/minerva.c @@ -27,6 +27,7 @@ #include "../soc/t210.h" extern volatile nyx_storage_t *nyx_str; +void (*minerva_cfg)(mtc_config_t *mtc_cfg, void *); u32 minerva_init() { diff --git a/source/mem/minerva.h b/source/mem/minerva.h index 00228f4..9be55c9 100644 --- a/source/mem/minerva.h +++ b/source/mem/minerva.h @@ -57,7 +57,7 @@ typedef enum FREQ_1600 = 1600000 } minerva_freq_t; -void (*minerva_cfg)(mtc_config_t *mtc_cfg, void *); +extern void (*minerva_cfg)(mtc_config_t *mtc_cfg, void *); u32 minerva_init(); void minerva_change_freq(minerva_freq_t freq); void minerva_periodic_training(); diff --git a/source/storage/emummc.c b/source/storage/emummc.c index 41168f6..c73aecd 100644 --- a/source/storage/emummc.c +++ b/source/storage/emummc.c @@ -32,6 +32,7 @@ extern sdmmc_storage_t sd_storage; extern FATFS sd_fs; extern hekate_config h_cfg; +emummc_cfg_t emu_cfg; extern bool sd_mount(); extern void sd_unmount(); diff --git a/source/storage/emummc.h b/source/storage/emummc.h index 635332f..796cdec 100644 --- a/source/storage/emummc.h +++ b/source/storage/emummc.h @@ -47,7 +47,7 @@ typedef struct _emummc_cfg_t int fs_ver; } emummc_cfg_t; -emummc_cfg_t emu_cfg; +extern emummc_cfg_t emu_cfg; bool emummc_load_cfg(); int emummc_storage_init_mmc(sdmmc_storage_t *storage, sdmmc_t *sdmmc); diff --git a/source/storage/nx_sd.c b/source/storage/nx_sd.c index afb7c51..362ef4d 100644 --- a/source/storage/nx_sd.c +++ b/source/storage/nx_sd.c @@ -25,6 +25,10 @@ bool sd_mounted = false, sd_inited = false; static u32 sd_mode = SD_UHS_SDR82; +sdmmc_t sd_sdmmc; +sdmmc_storage_t sd_storage; +FATFS sd_fs; + u32 sd_get_mode() { return sd_mode; diff --git a/source/storage/nx_sd.h b/source/storage/nx_sd.h index 2447872..22e5f3b 100644 --- a/source/storage/nx_sd.h +++ b/source/storage/nx_sd.h @@ -30,9 +30,9 @@ enum SD_UHS_SDR82 = 3, }; -sdmmc_t sd_sdmmc; -sdmmc_storage_t sd_storage; -FATFS sd_fs; +extern sdmmc_t sd_sdmmc; +extern sdmmc_storage_t sd_storage; +extern FATFS sd_fs; u32 sd_get_mode(); int sd_init_retry(bool power_cycle); diff --git a/source/storage/sdmmc.h b/source/storage/sdmmc.h index 34f0d99..aacc26a 100644 --- a/source/storage/sdmmc.h +++ b/source/storage/sdmmc.h @@ -21,7 +21,7 @@ #include "../utils/types.h" #include "sdmmc_driver.h" -u32 sd_power_cycle_time_start; +extern u32 sd_power_cycle_time_start; typedef enum _sdmmc_type { diff --git a/source/storage/sdmmc_driver.c b/source/storage/sdmmc_driver.c index bdd4af8..259478f 100644 --- a/source/storage/sdmmc_driver.c +++ b/source/storage/sdmmc_driver.c @@ -32,6 +32,8 @@ #pragma GCC push_options #pragma GCC optimize ("Os") +u32 sd_power_cycle_time_start; + //#define DPRINTF(...) gfx_printf(__VA_ARGS__) #define DPRINTF(...) diff --git a/source/tegraexplorer/gfx/menu.c b/source/tegraexplorer/gfx/menu.c index c5f808c..8f89649 100644 --- a/source/tegraexplorer/gfx/menu.c +++ b/source/tegraexplorer/gfx/menu.c @@ -198,24 +198,6 @@ int menu_make(menu_entry *entries, int amount, const char *toptext){ else { break; } - - /* - if (delay < 300){ - scrolltimer = get_tmr_ms(); - while (input->buttons & (KEY_A | KEY_LDOWN | KEY_LUP | KEY_B | KEY_RUP | KEY_RDOWN)){ - if (scrolltimer + delay <= get_tmr_ms()) - break; - - input = hidRead(); - } - } - - if (delay > 46 && input->buttons & (KEY_A | KEY_LDOWN | KEY_LUP | KEY_B | KEY_RUP | KEY_RDOWN)) - delay -= 45; - - if (input->buttons & (KEY_RUP | KEY_RDOWN)) - delay = 1; - */ } if (delay > 46)