mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-26 13:52:21 +00:00
fusee: change ncm from opt-in to opt-out
This commit is contained in:
parent
fa0df994ba
commit
1930880270
5 changed files with 16 additions and 16 deletions
|
@ -9,4 +9,4 @@ stage2_entrypoint = 0xF0000000
|
||||||
; To force-enable nogc, add nogc = 1
|
; To force-enable nogc, add nogc = 1
|
||||||
; To force-disable nogc, add nogc = 0
|
; To force-disable nogc, add nogc = 0
|
||||||
|
|
||||||
; To opt in to using Atmosphere's NCM reimplementation, add enable_ncm = 1
|
; To opt out of using Atmosphere's NCM reimplementation, add disable_ncm = 1
|
||||||
|
|
|
@ -209,11 +209,11 @@ static int stratosphere_ini_handler(void *user, const char *section, const char
|
||||||
strat_cfg->has_nogc_config = true;
|
strat_cfg->has_nogc_config = true;
|
||||||
sscanf(value, "%d", &tmp);
|
sscanf(value, "%d", &tmp);
|
||||||
strat_cfg->enable_nogc = tmp != 0;
|
strat_cfg->enable_nogc = tmp != 0;
|
||||||
} else if (strcmp(name, STRATOSPHERE_ENABLE_NCM_KEY) == 0) {
|
} else if (strcmp(name, STRATOSPHERE_DISABLE_NCM_KEY) == 0) {
|
||||||
sscanf(value, "%d", &tmp);
|
sscanf(value, "%d", &tmp);
|
||||||
strat_cfg->ncm_enabled = tmp != 0;
|
strat_cfg->ncm_disabled = tmp != 0;
|
||||||
if (strat_cfg->ncm_enabled) {
|
if (strat_cfg->ncm_disabled) {
|
||||||
stratosphere_enable_ncm();
|
stratosphere_disable_ncm();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -249,7 +249,7 @@ _content_headers:
|
||||||
.word __ncm_kip_start__
|
.word __ncm_kip_start__
|
||||||
.word __ncm_kip_size__
|
.word __ncm_kip_size__
|
||||||
.byte CONTENT_TYPE_KIP
|
.byte CONTENT_TYPE_KIP
|
||||||
.byte CONTENT_FLAG0_EXPERIMENTAL
|
.byte CONTENT_FLAG_NONE
|
||||||
.byte CONTENT_FLAG_NONE
|
.byte CONTENT_FLAG_NONE
|
||||||
.byte CONTENT_FLAG_NONE
|
.byte CONTENT_FLAG_NONE
|
||||||
.word 0xCCCCCCCC
|
.word 0xCCCCCCCC
|
||||||
|
|
|
@ -48,7 +48,7 @@ static bool g_stratosphere_pm_enabled = true;
|
||||||
static bool g_stratosphere_ams_mitm_enabled = true;
|
static bool g_stratosphere_ams_mitm_enabled = true;
|
||||||
static bool g_stratosphere_spl_enabled = true;
|
static bool g_stratosphere_spl_enabled = true;
|
||||||
static bool g_stratosphere_boot_enabled = true;
|
static bool g_stratosphere_boot_enabled = true;
|
||||||
static bool g_stratosphere_ncm_enabled = false;
|
static bool g_stratosphere_ncm_enabled = true;
|
||||||
|
|
||||||
extern const uint8_t loader_kip[], pm_kip[], sm_kip[], spl_kip[], boot_kip[], ncm_kip[], ams_mitm_kip[];
|
extern const uint8_t loader_kip[], pm_kip[], sm_kip[], spl_kip[], boot_kip[], ncm_kip[], ams_mitm_kip[];
|
||||||
|
|
||||||
|
@ -58,17 +58,17 @@ emummc_fs_ver_t stratosphere_get_fs_version(void) {
|
||||||
return g_fs_ver;
|
return g_fs_ver;
|
||||||
}
|
}
|
||||||
|
|
||||||
void stratosphere_enable_ncm(void) {
|
void stratosphere_disable_ncm(void) {
|
||||||
/* The Atmosphere team believes our implementation of NCM to be extremely accurate, */
|
/* The Atmosphere team believes our implementation of NCM to be extremely accurate, */
|
||||||
/* and does not think it likely there is any possibility of undesirable behavior */
|
/* and does not think it likely there is any possibility of undesirable behavior */
|
||||||
/* when using the NCM reimplementation. However, because NCM manages critical save games */
|
/* when using the NCM reimplementation. However, because NCM manages critical save games */
|
||||||
/* the implementation will default to off for some time, until the code has been thoroughly */
|
/* the implementation may be optionally disabled for those not comfortable using it. */
|
||||||
/* tested in practice. */
|
|
||||||
|
|
||||||
/* PLEASE NOTE: The default behavior will be NCM on in a future atmosphere release, */
|
|
||||||
/* and this opt-in functionality will be removed at that time. */
|
|
||||||
|
|
||||||
g_stratosphere_ncm_enabled = true;
|
/* PLEASE NOTE: The NCM reimplementation has been well-tested, and correspondingly opt-out */
|
||||||
|
/* functionality will be removed in Atmosphere 1.0.0. */
|
||||||
|
|
||||||
|
g_stratosphere_ncm_enabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* GCC doesn't consider the size as const... we have to write it ourselves. */
|
/* GCC doesn't consider the size as const... we have to write it ourselves. */
|
||||||
|
|
|
@ -30,7 +30,7 @@ ini1_header_t *stratosphere_get_ini1(uint32_t target_firmware);
|
||||||
ini1_header_t *stratosphere_get_sd_files_ini1(void);
|
ini1_header_t *stratosphere_get_sd_files_ini1(void);
|
||||||
void stratosphere_free_ini1(void);
|
void stratosphere_free_ini1(void);
|
||||||
|
|
||||||
void stratosphere_enable_ncm(void);
|
void stratosphere_disable_ncm(void);
|
||||||
|
|
||||||
emummc_fs_ver_t stratosphere_get_fs_version(void);
|
emummc_fs_ver_t stratosphere_get_fs_version(void);
|
||||||
|
|
||||||
|
@ -39,10 +39,10 @@ ini1_header_t *stratosphere_merge_inis(ini1_header_t **inis, unsigned int num_in
|
||||||
typedef struct {
|
typedef struct {
|
||||||
bool has_nogc_config;
|
bool has_nogc_config;
|
||||||
bool enable_nogc;
|
bool enable_nogc;
|
||||||
bool ncm_enabled;
|
bool ncm_disabled;
|
||||||
} stratosphere_cfg_t;
|
} stratosphere_cfg_t;
|
||||||
|
|
||||||
#define STRATOSPHERE_NOGC_KEY "nogc"
|
#define STRATOSPHERE_NOGC_KEY "nogc"
|
||||||
#define STRATOSPHERE_ENABLE_NCM_KEY "enable_ncm"
|
#define STRATOSPHERE_DISABLE_NCM_KEY "disable_ncm"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue