diff --git a/include/arm11/menu/menu_fb3ds.h b/include/arm11/menu/menu_fb3ds.h index 8b6b37f..144f4e4 100644 --- a/include/arm11/menu/menu_fb3ds.h +++ b/include/arm11/menu/menu_fb3ds.h @@ -117,23 +117,24 @@ { // 7 "NAND Tools", 4, NULL, 0, { - { "Backup NAND", DESC_NAND_BACKUP, &menuDummyFunc, 3 }, - { "Restore NAND", DESC_NAND_RESTORE, &menuDummyFunc, 4 }, - { "Restore NAND (forced)", DESC_NAND_RESTORE_F, &menuDummyFunc, 4 }, - { "Flash firmware", DESC_FIRM_FLASH, &menuDummyFunc, 2 } + { "Backup NAND", DESC_NAND_BACKUP, &menuDummyFunc, 3 }, + { "Restore NAND", DESC_NAND_RESTORE, &menuDummyFunc, 4 }, + { "Restore NAND (forced)", DESC_NAND_RESTORE_F, &menuDummyFunc, 4 }, + { "Flash firmware", DESC_FIRM_FLASH, &menuDummyFunc, 2 } } }, { // 8 "Miscellaneous", 2, NULL, 0, { - { "Update fastboot3DS", DESC_UPDATE, &menuDummyFunc, 1 }, + { "Update fastboot3DS", DESC_UPDATE, &menuDummyFunc, 1 }, { "Credits", DESC_CREDITS, &menuShowCredits, 0 } } }, { // 9 - "Debug", 1, NULL, 0, // this will not show in the release version + "Debug", 2, NULL, 0, // this will not show in the release version { - { "View current settings", LOREM, &SetView, 0 } + { "View current settings", LOREM, &debugSettingsView, 0 }, + { "Escape sequence test", LOREM, &debugEscapeTest, 0 } } } }; diff --git a/include/arm11/menu/menu_func.h b/include/arm11/menu/menu_func.h index a2e4005..5e462d0 100644 --- a/include/arm11/menu/menu_func.h +++ b/include/arm11/menu/menu_func.h @@ -31,4 +31,5 @@ u32 menuContinueBoot(PrintConsole* con, u32 param); u32 menuDummyFunc(PrintConsole* con, u32 param); -u32 SetView(PrintConsole* con, u32 param); +u32 debugSettingsView(PrintConsole* con, u32 param); +u32 debugEscapeTest(PrintConsole* con, u32 param); diff --git a/source/arm11/menu/menu_func.c b/source/arm11/menu/menu_func.c index b2bfa06..d34f599 100644 --- a/source/arm11/menu/menu_func.c +++ b/source/arm11/menu/menu_func.c @@ -245,7 +245,41 @@ return 0; } -u32 SetView(PrintConsole* con, u32 param) +u32 menuShowCredits(PrintConsole* con, u32 param) +{ + (void) param; + + // clear console + consoleSelect(con); + consoleClear(); + + // credits + con->cursorY = 4; + ee_printf_line_center("Fastboot3DS Credits"); + ee_printf_line_center("==================="); + ee_printf_line_center(""); + ee_printf_line_center("Main developers:"); + ee_printf_line_center("derrek"); + ee_printf_line_center("profi200"); + ee_printf_line_center(""); + ee_printf_line_center("Thanks to:"); + ee_printf_line_center("yellows8"); + ee_printf_line_center("plutoo"); + ee_printf_line_center("smea"); + ee_printf_line_center("Normmatt (for sdmmc code)"); + ee_printf_line_center("WinterMute (for console code)"); + ee_printf_line_center("d0k3 (for menu code)"); + ee_printf_line_center(""); + ee_printf_line_center("... everyone who contributed to 3dbrew.org"); + updateScreens(); + + // wait for user + outputEndWait(); + + return 0; +} + +u32 debugSettingsView(PrintConsole* con, u32 param) { (void) param; @@ -285,7 +319,7 @@ return 0; } -u32 menuShowCredits(PrintConsole* con, u32 param) +u32 debugEscapeTest(PrintConsole* con, u32 param) { (void) param; @@ -293,28 +327,34 @@ consoleSelect(con); consoleClear(); - // credits - con->cursorY = 4; - ee_printf_line_center("Fastboot3DS Credits"); - ee_printf_line_center("==================="); - ee_printf_line_center(""); - ee_printf_line_center("Main developers:"); - ee_printf_line_center("derrek"); - ee_printf_line_center("profi200"); - ee_printf_line_center(""); - ee_printf_line_center("Thanks to:"); - ee_printf_line_center("yellows8"); - ee_printf_line_center("plutoo"); - ee_printf_line_center("smea"); - ee_printf_line_center("Normmatt (for sdmmc code)"); - ee_printf_line_center("WinterMute (for console code)"); - ee_printf_line_center("d0k3 (for menu code)"); - ee_printf_line_center(""); - ee_printf_line_center("... everyone who contributed to 3dbrew.org"); - updateScreens(); - - // wait for user - outputEndWait(); + ee_printf("\x1b[1mbold\n\x1b[0m"); + ee_printf("\x1b[2mfaint\n\x1b[0m"); + ee_printf("\x1b[3mitalic\n\x1b[0m"); + ee_printf("\x1b[4munderline\n\x1b[0m"); + ee_printf("\x1b[5mblink slow\n\x1b[0m"); + ee_printf("\x1b[6mblink fast\n\x1b[0m"); + ee_printf("\x1b[7mreverse\n\x1b[0m"); + ee_printf("\x1b[8mconceal\n\x1b[0m"); + ee_printf("\x1b[9mcrossed-out\n\x1b[0m"); + ee_printf("\n"); + + for (u32 i = 0; i < 8; i++) + { + char c[8]; + ee_snprintf(c, 8, "\x1b[%lu", 30 + i); + ee_printf("color #%lu: %smnormal\x1b[0m %s;2mfaint\x1b[0m %s;4munderline\x1b[0m %s;7mreverse\x1b[0m %s;9mcrossed-out\x1b[0m\n", i, c, c, c, c, c); + } + + // wait for B / HOME button + do + { + updateScreens(); + if(hidGetPowerButton(false)) // handle power button + return 0; + + hidScanInput(); + } + while (!(hidKeysDown() & (KEY_B|KEY_HOME))); return 0; }