diff --git a/bootloader/hos/hos.c b/bootloader/hos/hos.c index 922a6ea..e615b96 100644 --- a/bootloader/hos/hos.c +++ b/bootloader/hos/hos.c @@ -509,6 +509,11 @@ int hos_launch(ini_sec_t *cfg) ctxt.atmosphere = true; // Set atmosphere patching in case of Stock emuMMC and no fss0. config_kip1patch(&ctxt, "emummc"); } + else if (!emu_cfg.enabled && ctxt.emummc_forced) + { + _hos_crit_error("emuMMC is forced but not enabled!"); + return 0; + } // Check if fuses lower than 4.0.0 or 9.0.0 and if yes apply NO Gamecard patch. // Additionally check if running emuMMC and disable GC if v3 fuses are burnt and HOS is <= 8.1.0. diff --git a/bootloader/hos/hos_config.c b/bootloader/hos/hos_config.c index e22fbaa..9a111c0 100644 --- a/bootloader/hos/hos_config.c +++ b/bootloader/hos/hos_config.c @@ -181,6 +181,16 @@ static int _config_stock(launch_ctxt_t *ctxt, const char *value) return 1; } +static int _config_emummc_forced(launch_ctxt_t *ctxt, const char *value) +{ + if (*value == '1') + { + DPRINTF("Forced emuMMC\n"); + ctxt->emummc_forced = true; + } + return 1; +} + static int _config_atmosphere(launch_ctxt_t *ctxt, const char *value) { if (*value == '1') @@ -241,9 +251,10 @@ static const cfg_handler_t _config_handlers[] = { { "debugmode", _config_debugmode }, { "stock", _config_stock }, { "atmosphere", _config_atmosphere }, + { "fss0", _config_fss }, + { "emummcforce", _config_emummc_forced }, { "nouserexceptions", _config_dis_exo_user_exceptions }, { "userpmu", _config_exo_user_pmu_access }, - { "fss0", _config_fss }, { NULL, NULL }, };