diff --git a/arm9/data/config_template.ini b/arm9/data/config_template.ini index 4b93e22f..c1bd041f 100644 Binary files a/arm9/data/config_template.ini and b/arm9/data/config_template.ini differ diff --git a/arm9/source/config.c b/arm9/source/config.c index 3ad0f0f9..18c0353f 100644 --- a/arm9/source/config.c +++ b/arm9/source/config.c @@ -65,12 +65,11 @@ static const char *singleOptionIniNamesBoot[] = { "app_syscore_threads_on_core_2", "show_system_settings_string", "show_gba_boot_screen", - "enable_dsi_external_filter", - "allow_updown_leftright_dsi", }; static const char *singleOptionIniNamesMisc[] = { "use_dev_unitinfo", + "enable_dsi_external_filter", "disable_arm11_exception_handlers", "enable_safe_firm_rosalina", }; @@ -484,7 +483,7 @@ static int configIniHandler(void* user, const char* section, const char* name, c return 1; } else if (strcmp(name, "screen_filters_top_gamma") == 0) { s64 opt; - CHECK_PARSE_OPTION(parseDecFloatOption(&opt, value, 0, 1411 * FLOAT_CONV_MULT)); + CHECK_PARSE_OPTION(parseDecFloatOption(&opt, value, 0, 8 * FLOAT_CONV_MULT)); cfg->topScreenFilter.gammaEnc = opt; return 1; } else if (strcmp(name, "screen_filters_top_contrast") == 0) { @@ -509,7 +508,7 @@ static int configIniHandler(void* user, const char* section, const char* name, c return 1; } else if (strcmp(name, "screen_filters_bot_gamma") == 0) { s64 opt; - CHECK_PARSE_OPTION(parseDecFloatOption(&opt, value, 0, 1411 * FLOAT_CONV_MULT)); + CHECK_PARSE_OPTION(parseDecFloatOption(&opt, value, 0, 8 * FLOAT_CONV_MULT)); cfg->bottomScreenFilter.gammaEnc = opt; return 1; } else if (strcmp(name, "screen_filters_bot_contrast") == 0) { @@ -657,7 +656,6 @@ static size_t saveLumaIniConfigToStr(char *out) (int)CONFIG(AUTOBOOTEMU), (int)CONFIG(LOADEXTFIRMSANDMODULES), (int)CONFIG(PATCHGAMES), (int)CONFIG(REDIRECTAPPTHREADS), (int)CONFIG(PATCHVERSTRING), (int)CONFIG(SHOWGBABOOT), - (int)CONFIG(ENABLEDSIEXTFILTER), (int)CONFIG(ALLOWUPDOWNLEFTRIGHTDSI), 1 + (int)MULTICONFIG(DEFAULTEMU), 4 - (int)MULTICONFIG(BRIGHTNESS), splashPosStr, (unsigned int)cfg->splashDurationMsec, @@ -678,8 +676,8 @@ static size_t saveLumaIniConfigToStr(char *out) forceAudioOutputStr, cfg->volumeSliderOverride, - (int)CONFIG(PATCHUNITINFO), (int)CONFIG(DISABLEARM11EXCHANDLERS), - (int)CONFIG(ENABLESAFEFIRMROSALINA) + (int)CONFIG(PATCHUNITINFO), (int)CONFIG(ENABLEDSIEXTFILTER), + (int)CONFIG(DISABLEARM11EXCHANDLERS), (int)CONFIG(ENABLESAFEFIRMROSALINA) ); return n < 0 ? 0 : (size_t)n; @@ -839,8 +837,6 @@ void configMenu(bool oldPinStatus, u32 oldPinMode) "( ) Redirect app. syscore threads to core2", "( ) Show NAND or user string in System Settings", "( ) Show GBA boot screen in patched AGB_FIRM", - "( ) Enable custom upscaling filters for DSi", - "( ) Allow Left+Right / Up+Down combos for DSi", // Should always be the last 2 entries "\nBoot chainloader", @@ -930,19 +926,6 @@ void configMenu(bool oldPinStatus, u32 oldPinMode) "Enable showing the GBA boot screen\n" "when booting GBA games.", - "Enable replacing the default upscaling\n" - "filter used for DS(i) software by the\n" - "contents of:\n\n" - "/luma/twl_upscaling_filter.bin\n\n" - "Refer to the wiki for further details.", - - "Allow Left+Right and Up+Down button\n" - "combos (using DPAD and CPAD\n" - "simultaneously) in DS(i) software.\n\n" - "Commercial software filter these\n" - "combos on their own too, though.", - - // Should always be the last 2 entries "Boot to the Luma3DS chainloader menu.", @@ -988,8 +971,6 @@ void configMenu(bool oldPinStatus, u32 oldPinMode) { .visible = true }, { .visible = true }, { .visible = true }, - { .visible = true }, - { .visible = true }, }; //Calculate the amount of the various kinds of options and pre-select the first single one @@ -1060,13 +1041,13 @@ void configMenu(bool oldPinStatus, u32 oldPinMode) } drawString(false, 10, 10, COLOR_WHITE, optionsDescription[selectedOption]); - + bool startPressed = false; //Boring configuration menu while(true) { u32 pressed = 0; - if (!startPressed) + if (!startPressed) do { pressed = waitInput(true) & MENU_BUTTONS; @@ -1074,7 +1055,7 @@ void configMenu(bool oldPinStatus, u32 oldPinMode) while(!pressed); // Force the selection of "save and exit" and trigger it. - if(pressed & BUTTON_START) + if(pressed & BUTTON_START) { startPressed = true; // This moves the cursor to the last entry diff --git a/arm9/source/config.h b/arm9/source/config.h index 3d8cfc80..acbd20f1 100644 --- a/arm9/source/config.h +++ b/arm9/source/config.h @@ -36,7 +36,7 @@ #define CONFIG_FILE "config.ini" #define CONFIG_VERSIONMAJOR 3 -#define CONFIG_VERSIONMINOR 11 +#define CONFIG_VERSIONMINOR 12 #define BOOTCFG_NAND BOOTCONFIG(0, 1) #define BOOTCFG_EMUINDEX BOOTCONFIG(1, 3) @@ -62,9 +62,8 @@ enum singleOptions REDIRECTAPPTHREADS, PATCHVERSTRING, SHOWGBABOOT, - ENABLEDSIEXTFILTER, - ALLOWUPDOWNLEFTRIGHTDSI, PATCHUNITINFO, + ENABLEDSIEXTFILTER, DISABLEARM11EXCHANDLERS, ENABLESAFEFIRMROSALINA, diff --git a/arm9/source/patches.c b/arm9/source/patches.c index f1d7589f..6a2152cc 100644 --- a/arm9/source/patches.c +++ b/arm9/source/patches.c @@ -797,19 +797,6 @@ void patchTwlBg(u8 *pos, u32 size) // else error("Failed to apply enable_dsi_external_filter."); } } - - if (CONFIG(ALLOWUPDOWNLEFTRIGHTDSI)) - { - u16 *off2; - for (off2 = (u16 *)pos; (u8 *)off2 < pos + size && (off2[0] != 0x2040 || off2[1] != 0x4020); off2++); - - if ((u8 *)off2 < pos + size) - { - // else error("Failed to apply allow_updown_leftright_dsi."); - for (u32 i = 0; i < 8; i++) - off2[i] = 0x46C0; - } - } } u32 patchLgyK11(u8 *section1, u32 section1Size, u8 *section2, u32 section2Size) diff --git a/k11_extension/include/config.h b/k11_extension/include/config.h index b890fcff..4c3f80ec 100644 --- a/k11_extension/include/config.h +++ b/k11_extension/include/config.h @@ -33,9 +33,8 @@ enum singleOptions REDIRECTAPPTHREADS, PATCHVERSTRING, SHOWGBABOOT, - ENABLEDSIEXTFILTER, - ALLOWUPDOWNLEFTRIGHTDSI, PATCHUNITINFO, + ENABLEDSIEXTFILTER, DISABLEARM11EXCHANDLERS, ENABLESAFEFIRMROSALINA, }; diff --git a/sysmodules/loader/source/patcher.h b/sysmodules/loader/source/patcher.h index 35bd17de..62539ff0 100644 --- a/sysmodules/loader/source/patcher.h +++ b/sysmodules/loader/source/patcher.h @@ -36,9 +36,8 @@ enum singleOptions REDIRECTAPPTHREADS, PATCHVERSTRING, SHOWGBABOOT, - ENABLEDSIEXTFILTER, - ALLOWUPDOWNLEFTRIGHTDSI, PATCHUNITINFO, + ENABLEDSIEXTFILTER, DISABLEARM11EXCHANDLERS, ENABLESAFEFIRMROSALINA, }; diff --git a/sysmodules/pm/source/luma.h b/sysmodules/pm/source/luma.h index 27df022c..fdd67d03 100644 --- a/sysmodules/pm/source/luma.h +++ b/sysmodules/pm/source/luma.h @@ -30,9 +30,8 @@ enum singleOptions REDIRECTAPPTHREADS, PATCHVERSTRING, SHOWGBABOOT, - ENABLEDSIEXTFILTER, - ALLOWUPDOWNLEFTRIGHTDSI, PATCHUNITINFO, + ENABLEDSIEXTFILTER, DISABLEARM11EXCHANDLERS, ENABLESAFEFIRMROSALINA, }; diff --git a/sysmodules/rosalina/data/config_template.ini b/sysmodules/rosalina/data/config_template.ini index 4b93e22f..c1bd041f 100644 Binary files a/sysmodules/rosalina/data/config_template.ini and b/sysmodules/rosalina/data/config_template.ini differ diff --git a/sysmodules/rosalina/include/luma_config.h b/sysmodules/rosalina/include/luma_config.h index 61bbff36..f1ed8aed 100644 --- a/sysmodules/rosalina/include/luma_config.h +++ b/sysmodules/rosalina/include/luma_config.h @@ -38,9 +38,8 @@ enum singleOptions REDIRECTAPPTHREADS, PATCHVERSTRING, SHOWGBABOOT, - ENABLEDSIEXTFILTER, - ALLOWUPDOWNLEFTRIGHTDSI, PATCHUNITINFO, + ENABLEDSIEXTFILTER, DISABLEARM11EXCHANDLERS, ENABLESAFEFIRMROSALINA, }; diff --git a/sysmodules/rosalina/source/luma_config.c b/sysmodules/rosalina/source/luma_config.c index fb4197f4..d4e6a3a9 100644 --- a/sysmodules/rosalina/source/luma_config.c +++ b/sysmodules/rosalina/source/luma_config.c @@ -170,7 +170,6 @@ static size_t LumaConfig_SaveLumaIniConfigToStr(char *out, const CfgData *cfg) (int)CONFIG(AUTOBOOTEMU), (int)CONFIG(LOADEXTFIRMSANDMODULES), (int)CONFIG(PATCHGAMES), (int)CONFIG(REDIRECTAPPTHREADS), (int)CONFIG(PATCHVERSTRING), (int)CONFIG(SHOWGBABOOT), - (int)CONFIG(ENABLEDSIEXTFILTER), (int)CONFIG(ALLOWUPDOWNLEFTRIGHTDSI), 1 + (int)MULTICONFIG(DEFAULTEMU), 4 - (int)MULTICONFIG(BRIGHTNESS), splashPosStr, (unsigned int)cfg->splashDurationMsec, @@ -191,8 +190,8 @@ static size_t LumaConfig_SaveLumaIniConfigToStr(char *out, const CfgData *cfg) forceAudioOutputStr, cfg->volumeSliderOverride, - (int)CONFIG(PATCHUNITINFO), (int)CONFIG(DISABLEARM11EXCHANDLERS), - (int)CONFIG(ENABLESAFEFIRMROSALINA) + (int)CONFIG(PATCHUNITINFO), (int)CONFIG(ENABLEDSIEXTFILTER), + (int)CONFIG(DISABLEARM11EXCHANDLERS), (int)CONFIG(ENABLESAFEFIRMROSALINA) ); return n < 0 ? 0 : (size_t)n; diff --git a/sysmodules/rosalina/source/menus/screen_filters.c b/sysmodules/rosalina/source/menus/screen_filters.c index f3e0648a..53f9c620 100644 --- a/sysmodules/rosalina/source/menus/screen_filters.c +++ b/sysmodules/rosalina/source/menus/screen_filters.c @@ -198,7 +198,7 @@ void ScreenFiltersMenu_LoadConfig(void) svcGetSystemInfo(&out, 0x10000, 0x104); topScreenFilter.gamma = (float)(out / FLOAT_CONV_MULT); - if (topScreenFilter.gamma < 0.0f || topScreenFilter.gamma > 1411.0f) + if (topScreenFilter.gamma < 0.0f || topScreenFilter.gamma > 8.0f) topScreenFilter.gamma = 1.0f; svcGetSystemInfo(&out, 0x10000, 0x105); @@ -221,7 +221,7 @@ void ScreenFiltersMenu_LoadConfig(void) svcGetSystemInfo(&out, 0x10000, 0x109); bottomScreenFilter.gamma = (float)(out / FLOAT_CONV_MULT); - if (bottomScreenFilter.gamma < 0.0f || bottomScreenFilter.gamma > 1411.0f) + if (bottomScreenFilter.gamma < 0.0f || bottomScreenFilter.gamma > 8.0f) bottomScreenFilter.gamma = 1.0f; svcGetSystemInfo(&out, 0x10000, 0x10A); @@ -253,7 +253,7 @@ DEF_CCT_SETTER(1200, Ember) static void ScreenFiltersMenu_ClampFilter(ScreenFilter *filter) { filter->cct = CLAMP(filter->cct, 1000, 25100); - filter->gamma = CLAMP(filter->gamma, 0.0f, 1411.0f); // ln(255) / ln(254/255): (254/255)^1411 <= 1/255 + filter->gamma = CLAMP(filter->gamma, 0.0f, 8.0f); filter->contrast = CLAMP(filter->contrast, 0.0f, 255.0f); filter->brightness = CLAMP(filter->brightness, -1.0f, 1.0f); }