hos: Disallow Auto NOGC for stock

If you still want to use it, you must use `kip1patch=nogc` in your boot entry to force it.
This commit is contained in:
CTCaer 2020-04-30 16:15:49 +03:00
parent d2d3597c29
commit f9b0ff70f7

View file

@ -642,12 +642,16 @@ int hos_launch(ini_sec_t *cfg)
// Check if fuses lower than 4.0.0 or 9.0.0 and if yes apply NO Gamecard patch. // 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. // Additionally check if running emuMMC and disable GC if v3 fuses are burnt and HOS is <= 8.1.0.
if ((h_cfg.autonogc && if (!ctxt.stock)
((!(fuse_read_odm(7) & ~0xF) && (ctxt.pkg1_id->kb >= KB_FIRMWARE_VERSION_400)) || // LAFW v2. {
(!(fuse_read_odm(7) & ~0x3FF) && (ctxt.pkg1_id->kb >= KB_FIRMWARE_VERSION_900)))) // LAFW v3. u32 fuses = fuse_read_odm(7);
|| ((emu_cfg.enabled && !h_cfg.emummc_force_disable) && if ((h_cfg.autonogc &&
((fuse_read_odm(7) & 0x400) && (ctxt.pkg1_id->kb <= KB_FIRMWARE_VERSION_810)))) ((!(fuses & ~0xF) && (ctxt.pkg1_id->kb >= KB_FIRMWARE_VERSION_400)) || // LAFW v2.
config_kip1patch(&ctxt, "nogc"); (!(fuses & ~0x3FF) && (ctxt.pkg1_id->kb >= KB_FIRMWARE_VERSION_900)))) // LAFW v3.
|| ((emu_cfg.enabled && !h_cfg.emummc_force_disable) &&
((fuses & 0x400) && (ctxt.pkg1_id->kb <= KB_FIRMWARE_VERSION_810))))
config_kip1patch(&ctxt, "nogc");
}
gfx_printf("Loaded config, pkg1 and keyblob\n"); gfx_printf("Loaded config, pkg1 and keyblob\n");