mirror of
https://github.com/rvtr/TwlNandTool.git
synced 2025-10-31 06:01:08 -04:00
Added TWL EVA sound effects
This commit is contained in:
parent
da2ae15e7c
commit
1c88010927
@ -37,7 +37,7 @@ ASFLAGS := -g $(ARCH)
|
|||||||
LDFLAGS = -specs=ds_arm7.specs -g $(ARCH) -Wl,--nmagic -Wl,-Map,$(notdir $*).map
|
LDFLAGS = -specs=ds_arm7.specs -g $(ARCH) -Wl,--nmagic -Wl,-Map,$(notdir $*).map
|
||||||
|
|
||||||
#LIBS := -ldswifi7 -lmm7 -lnds7
|
#LIBS := -ldswifi7 -lmm7 -lnds7
|
||||||
LIBS := -lnds7
|
LIBS := -lmm7 -lnds7
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# list of directories containing libraries, this must be the top level containing
|
# list of directories containing libraries, this must be the top level containing
|
||||||
|
|||||||
@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
---------------------------------------------------------------------------------*/
|
---------------------------------------------------------------------------------*/
|
||||||
#include "my_sdmmc.h"
|
#include "my_sdmmc.h"
|
||||||
|
#include <maxmod7.h>
|
||||||
#include <nds.h>
|
#include <nds.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
@ -117,6 +117,12 @@ int main()
|
|||||||
fifoInit();
|
fifoInit();
|
||||||
touchInit();
|
touchInit();
|
||||||
|
|
||||||
|
mmInstall(FIFO_MAXMOD);
|
||||||
|
SetYtrigger(202);
|
||||||
|
|
||||||
|
installSoundFIFO();
|
||||||
|
installSystemFIFO();
|
||||||
|
|
||||||
if (isDSiMode() /*|| ((REG_SCFG_EXT & BIT(17)) && (REG_SCFG_EXT & BIT(18)))*/)
|
if (isDSiMode() /*|| ((REG_SCFG_EXT & BIT(17)) && (REG_SCFG_EXT & BIT(18)))*/)
|
||||||
{
|
{
|
||||||
u8 *out=(u8*)0x02300000;
|
u8 *out=(u8*)0x02300000;
|
||||||
@ -164,10 +170,6 @@ int main()
|
|||||||
|
|
||||||
SetYtrigger(80);
|
SetYtrigger(80);
|
||||||
|
|
||||||
installSoundFIFO();
|
|
||||||
|
|
||||||
installSystemFIFO();
|
|
||||||
|
|
||||||
irqSet(IRQ_VCOUNT, VcountHandler);
|
irqSet(IRQ_VCOUNT, VcountHandler);
|
||||||
|
|
||||||
irqEnable( IRQ_VBLANK | IRQ_VCOUNT | IRQ_NETWORK);
|
irqEnable( IRQ_VBLANK | IRQ_VCOUNT | IRQ_NETWORK);
|
||||||
|
|||||||
@ -43,6 +43,7 @@ SOURCES := src src/nand src/nand/polarssl src/nand/twltool src/lib/libfat/sourc
|
|||||||
INCLUDES := include src/nand src/lib/libfat/include
|
INCLUDES := include src/nand src/lib/libfat/include
|
||||||
DATA := ../data
|
DATA := ../data
|
||||||
GRAPHICS := fonts
|
GRAPHICS := fonts
|
||||||
|
MUSIC := ../sounds
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# options for code generation
|
# options for code generation
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
@ -63,7 +64,7 @@ LDFLAGS = -specs=ds_arm9.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map)
|
|||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# any extra libraries we wish to link with the project
|
# any extra libraries we wish to link with the project
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
LIBS := -lfilesystem -lnds9
|
LIBS := -lmm9 -lfilesystem -lnds9
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# list of directories containing libraries, this must be the top level containing
|
# list of directories containing libraries, this must be the top level containing
|
||||||
# include and lib
|
# include and lib
|
||||||
@ -89,8 +90,9 @@ CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
|
|||||||
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
|
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
|
||||||
BMPFILES := $(foreach dir,$(GRAPHICS),$(notdir $(wildcard $(dir)/*.bmp)))
|
BMPFILES := $(foreach dir,$(GRAPHICS),$(notdir $(wildcard $(dir)/*.bmp)))
|
||||||
PNGFILES := $(foreach dir,$(GRAPHICS),$(notdir $(wildcard $(dir)/*.png)))
|
PNGFILES := $(foreach dir,$(GRAPHICS),$(notdir $(wildcard $(dir)/*.png)))
|
||||||
BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*)))
|
BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*))) soundbank.bin
|
||||||
|
|
||||||
|
export AUDIOFILES := $(foreach dir,$(notdir $(wildcard $(MUSIC)/*.*)),$(CURDIR)/$(MUSIC)/$(dir))
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# use CXX for linking C++ projects, CC for standard C
|
# use CXX for linking C++ projects, CC for standard C
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
@ -140,6 +142,12 @@ else
|
|||||||
$(ARM9ELF) : $(OFILES)
|
$(ARM9ELF) : $(OFILES)
|
||||||
@echo linking $(notdir $@)
|
@echo linking $(notdir $@)
|
||||||
@$(LD) $(LDFLAGS) $(OFILES) $(LIBPATHS) $(LIBS) -o $@
|
@$(LD) $(LDFLAGS) $(OFILES) $(LIBPATHS) $(LIBS) -o $@
|
||||||
|
#---------------------------------------------------------------------------------
|
||||||
|
# rule to build soundbank from music files
|
||||||
|
#---------------------------------------------------------------------------------
|
||||||
|
soundbank.bin soundbank.h : $(AUDIOFILES)
|
||||||
|
#---------------------------------------------------------------------------------
|
||||||
|
@mmutil $^ -d -osoundbank.bin -hsoundbank.h
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# you need a rule like this for each extension you use as binary data
|
# you need a rule like this for each extension you use as binary data
|
||||||
|
|||||||
79
arm9/src/audio.c
Normal file
79
arm9/src/audio.c
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
#include <nds.h>
|
||||||
|
#include <maxmod9.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include "audio.h"
|
||||||
|
#include "soundbank.h"
|
||||||
|
#include "soundbank_bin.h"
|
||||||
|
|
||||||
|
mm_sound_effect STARTUP = {
|
||||||
|
{ SFX_STARTUP } , // id
|
||||||
|
(int)(1.0f * (1<<10)), // rate
|
||||||
|
0, // handle
|
||||||
|
255, // volume
|
||||||
|
127, // panning
|
||||||
|
};
|
||||||
|
mm_sound_effect SELECT = {
|
||||||
|
{ SFX_SELECT } , // id
|
||||||
|
(int)(1.0f * (1<<10)), // rate
|
||||||
|
0, // handle
|
||||||
|
255, // volume
|
||||||
|
127, // panning
|
||||||
|
};
|
||||||
|
mm_sound_effect BACK = {
|
||||||
|
{ SFX_BACK } , // id
|
||||||
|
(int)(1.0f * (1<<10)), // rate
|
||||||
|
0, // handle
|
||||||
|
255, // volume
|
||||||
|
127, // panning
|
||||||
|
};
|
||||||
|
mm_sound_effect OK = {
|
||||||
|
{ SFX_OK } , // id
|
||||||
|
(int)(1.0f * (1<<10)), // rate
|
||||||
|
0, // handle
|
||||||
|
255, // volume
|
||||||
|
127, // panning
|
||||||
|
};
|
||||||
|
mm_sound_effect NG = {
|
||||||
|
{ SFX_NG } , // id
|
||||||
|
(int)(1.0f * (1<<10)), // rate
|
||||||
|
0, // handle
|
||||||
|
255, // volume
|
||||||
|
127, // panning
|
||||||
|
};
|
||||||
|
mm_sound_effect CHIME = {
|
||||||
|
{ SFX_CHIME } , // id
|
||||||
|
(int)(1.0f * (1<<10)), // rate
|
||||||
|
0, // handle
|
||||||
|
255, // volume
|
||||||
|
127, // panning
|
||||||
|
};
|
||||||
|
|
||||||
|
void soundInit() {
|
||||||
|
|
||||||
|
mmInitDefaultMem((mm_addr)soundbank_bin);
|
||||||
|
mmLoadEffect( SFX_STARTUP );
|
||||||
|
mmLoadEffect( SFX_SELECT );
|
||||||
|
mmLoadEffect( SFX_BACK );
|
||||||
|
mmLoadEffect( SFX_OK );
|
||||||
|
mmLoadEffect( SFX_NG );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void soundPlayStartup() {
|
||||||
|
mmEffectEx(&STARTUP);
|
||||||
|
}
|
||||||
|
void soundPlaySelect() {
|
||||||
|
mmEffectEx(&SELECT);
|
||||||
|
}
|
||||||
|
void soundPlayBack() {
|
||||||
|
mmEffectEx(&BACK);
|
||||||
|
}
|
||||||
|
void soundPlayPass() {
|
||||||
|
mmEffectEx(&OK);
|
||||||
|
}
|
||||||
|
void soundPlayFail() {
|
||||||
|
mmEffectEx(&NG);
|
||||||
|
}
|
||||||
|
void soundPlayChime() {
|
||||||
|
mmEffectEx(&CHIME);
|
||||||
|
}
|
||||||
13
arm9/src/audio.h
Normal file
13
arm9/src/audio.h
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
#include <nds.h>
|
||||||
|
#include <maxmod9.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include "soundbank.h"
|
||||||
|
#include "soundbank_bin.h"
|
||||||
|
|
||||||
|
void soundInit();
|
||||||
|
void soundPlayStartup();
|
||||||
|
void soundPlaySelect();
|
||||||
|
void soundPlayBack();
|
||||||
|
void soundPlayPass();
|
||||||
|
void soundPlayFail();
|
||||||
|
void soundPlayChime();
|
||||||
@ -12,6 +12,7 @@
|
|||||||
#include "nand/sysfile.h"
|
#include "nand/sysfile.h"
|
||||||
#include "nand/hwinfo.h"
|
#include "nand/hwinfo.h"
|
||||||
#include "video.h"
|
#include "video.h"
|
||||||
|
#include "audio.h"
|
||||||
#include "nitrofs.h"
|
#include "nitrofs.h"
|
||||||
#include "font.h"
|
#include "font.h"
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@ -21,14 +22,12 @@
|
|||||||
|
|
||||||
TODO:
|
TODO:
|
||||||
- LESS NAND WRITES!!!!!
|
- LESS NAND WRITES!!!!!
|
||||||
- Write good NAND read routine
|
|
||||||
- Detect debugger vs dev (less important currently)
|
- Detect debugger vs dev (less important currently)
|
||||||
- Recover HWInfo byte by byte
|
|
||||||
- HWInfo verify
|
- HWInfo verify
|
||||||
- HWInfo sign (can wait for a very long time)
|
- HWInfo sign (can wait for a very long time)
|
||||||
- Why doesn't unmounting NAND get reflected in the file test?
|
- Why doesn't unmounting NAND get reflected in the file test?
|
||||||
- NandFirm hash checking <-- very very very important!
|
- NandFirm hash checking <-- very very very important!
|
||||||
- Wipe TWLCFG, launcher saves, etc
|
- Make dummy TWLCFG, launcher saves, etc
|
||||||
- product.log reading and writing
|
- product.log reading and writing
|
||||||
- TAD stuff
|
- TAD stuff
|
||||||
- Title verification (exception for HNAG)
|
- Title verification (exception for HNAG)
|
||||||
@ -165,6 +164,7 @@ int main(int argc, char **argv)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
videoInit();
|
videoInit();
|
||||||
|
soundInit();
|
||||||
|
|
||||||
srand(time(0));
|
srand(time(0));
|
||||||
keysSetRepeat(25, 5);
|
keysSetRepeat(25, 5);
|
||||||
@ -205,12 +205,16 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
if (keysDown() & KEY_START || keysDown() & KEY_SELECT) {
|
if (keysDown() & KEY_START || keysDown() & KEY_SELECT) {
|
||||||
} else {
|
} else {
|
||||||
recoverHWInfoDeep();
|
//recoverHWInfoDeep();
|
||||||
|
//debug3();
|
||||||
}
|
}
|
||||||
|
|
||||||
clearScreen(cSUB);
|
clearScreen(cSUB);
|
||||||
clearScreen(cMAIN);
|
clearScreen(cMAIN);
|
||||||
|
|
||||||
|
soundPlayStartup();
|
||||||
|
wait(10);
|
||||||
|
|
||||||
int cursor = 0;
|
int cursor = 0;
|
||||||
|
|
||||||
while (!programEnd)
|
while (!programEnd)
|
||||||
@ -221,47 +225,55 @@ int main(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
|
|
||||||
case STARTMENU_FS_MENU:
|
case STARTMENU_FS_MENU:
|
||||||
|
soundPlaySelect();
|
||||||
fsMain();
|
fsMain();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STARTMENU_NF_MENU:
|
case STARTMENU_NF_MENU:
|
||||||
|
soundPlaySelect();
|
||||||
nfMain();
|
nfMain();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STARTMENU_SYSFILE_MENU:
|
case STARTMENU_SYSFILE_MENU:
|
||||||
|
soundPlaySelect();
|
||||||
sysfileMain();
|
sysfileMain();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STARTMENU_CHIP_MENU:
|
case STARTMENU_CHIP_MENU:
|
||||||
|
soundPlaySelect();
|
||||||
chipMain();
|
chipMain();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STARTMENU_NULL:
|
case STARTMENU_NULL:
|
||||||
|
soundPlaySelect();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STARTMENU_TEST:
|
case STARTMENU_TEST:
|
||||||
|
soundPlaySelect();
|
||||||
debug1();
|
debug1();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STARTMENU_TEST2:
|
case STARTMENU_TEST2:
|
||||||
|
soundPlaySelect();
|
||||||
debug2();
|
debug2();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STARTMENU_TEST3:
|
case STARTMENU_TEST3:
|
||||||
|
soundPlaySelect();
|
||||||
debug3();
|
debug3();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STARTMENU_EXIT:
|
case STARTMENU_EXIT:
|
||||||
|
soundPlaySelect();
|
||||||
programEnd = true;
|
programEnd = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
clearScreen(cSUB);
|
clearScreen(cSUB);
|
||||||
printf("Unmounting NAND...\n");
|
agingMode = true;
|
||||||
if(nandMounted) {
|
unmountNAND(false);
|
||||||
fatUnmount("nand");
|
unmountNAND(true);
|
||||||
}
|
|
||||||
// I think this was some safety thing but it wants to re-write the entire NAND...
|
// I think this was some safety thing but it wants to re-write the entire NAND...
|
||||||
// I'm the one person always saying "NANDs aren't that weak", so you know it's excessive when I comment it out.
|
// I'm the one person always saying "NANDs aren't that weak", so you know it's excessive when I comment it out.
|
||||||
|
|
||||||
@ -316,82 +328,58 @@ int debug2(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int debug3(void) {
|
int debug3(void) {
|
||||||
success = true;
|
bool agingSuccess = false;
|
||||||
agingMode = true;
|
agingMode = true;
|
||||||
clearScreen(cSUB);
|
clearScreen(cSUB);
|
||||||
|
|
||||||
iprintf("\n>> NAND AGING tester ");
|
iprintf("\n>> NAND AGING tester ");
|
||||||
iprintf("\n--------------------------------");
|
iprintf("\n--------------------------------");
|
||||||
|
|
||||||
if (success == true && !cpuPrintInfo()) {
|
if (cpuPrintInfo()) {
|
||||||
success = false;
|
if (nandPrintInfo()) {
|
||||||
}
|
if (importNandFirm(1)) {
|
||||||
if (success == true && !nandPrintInfo()) {
|
if (readNandFirm()) {
|
||||||
success = false;
|
if (repairMbr(true)) {
|
||||||
}
|
if (readMbr()) {
|
||||||
if (success == true && !importNandFirm(true)) {
|
if (mountNAND(false) || (formatMain() && mountNAND(false))) {
|
||||||
success = false;
|
if (mountNAND(true) || (formatPhoto() && mountNAND(true))) {
|
||||||
}
|
if (recoverHWInfo(false) || recoverHWInfoDeep()) {
|
||||||
if (success == true && !readNandFirm()) {
|
if (filetestNAND(false)) {
|
||||||
success = false;
|
if (filetestNAND(true)) {
|
||||||
}
|
if (makeSystemFolders()) {
|
||||||
if (success == true && !repairMbr(true)) {
|
if (makeCertChain()) {
|
||||||
success = false;
|
if (makeFontTable()) {
|
||||||
}
|
if (unmountNAND(false)) {
|
||||||
if (success == true && !readMbr()) {
|
if (unmountNAND(true)) {
|
||||||
success = false;
|
if (filetestNitro()) {
|
||||||
}
|
agingSuccess = true;
|
||||||
if (success == true && !mountNAND(false)) {
|
}
|
||||||
if (!formatMain() && !mountNAND(false)) {
|
}
|
||||||
success = false;
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (success == true && !mountNAND(true)) {
|
|
||||||
if (!formatPhoto() && !mountNAND(true)) {
|
|
||||||
success = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (success == true && !recoverHWInfo(false)) {
|
|
||||||
if (success == true && !recoverHWInfoDeep()) {
|
|
||||||
success = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (success == true && !filetestNAND(false)) {
|
|
||||||
success = false;
|
|
||||||
}
|
}
|
||||||
if (success == true && !filetestNAND(true)) {
|
|
||||||
success = false;
|
|
||||||
}
|
}
|
||||||
if (success == true && !makeSystemFolders()) {
|
|
||||||
success = false;
|
|
||||||
}
|
}
|
||||||
if (success == true && !makeCertChain()) {
|
|
||||||
success = false;
|
|
||||||
}
|
}
|
||||||
if (success == true && !makeFontTable()) {
|
|
||||||
success = false;
|
|
||||||
}
|
}
|
||||||
if (success == true && !unmountNAND(false)) {
|
|
||||||
success = false;
|
|
||||||
}
|
}
|
||||||
if (success == true && !unmountNAND(true)) {
|
|
||||||
success = false;
|
|
||||||
}
|
}
|
||||||
if (success == true && !filetestNitro()) {
|
|
||||||
success = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
agingMode = false;
|
agingMode = false;
|
||||||
clearScreen(cSUB);
|
clearScreen(cSUB);
|
||||||
iprintf("\n>> NAND AGING tester result ");
|
iprintf("\n>> NAND AGING tester result ");
|
||||||
iprintf("\n--------------------------------");
|
iprintf("\n--------------------------------");
|
||||||
|
success = agingSuccess;
|
||||||
if (success == true) {
|
if (success == true) {
|
||||||
iprintf("\nAll tests passed okay.");
|
iprintf("\nAll tests passed okay.");
|
||||||
setBackdropColorSub(0x1FE0);
|
|
||||||
} else {
|
} else {
|
||||||
iprintf("\nTests failed!");
|
iprintf("\nTests failed!");
|
||||||
setBackdropColorSub(0x00FF);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
exitFunction();
|
exitFunction();
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
#include "menu.h"
|
#include "menu.h"
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "video.h"
|
#include "video.h"
|
||||||
|
#include "audio.h"
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
#include "nand/nandio.h"
|
#include "nand/nandio.h"
|
||||||
|
|
||||||
@ -343,20 +344,24 @@ bool moveCursor(Menu* m)
|
|||||||
|
|
||||||
u32 down = keysDownRepeat();
|
u32 down = keysDownRepeat();
|
||||||
|
|
||||||
if (down & KEY_DOWN)
|
if (down & KEY_DOWN) {
|
||||||
|
soundPlaySelect();
|
||||||
_moveCursor(m, 1);
|
_moveCursor(m, 1);
|
||||||
|
} else if (down & KEY_UP) {
|
||||||
else if (down & KEY_UP)
|
soundPlaySelect();
|
||||||
_moveCursor(m, -1);
|
_moveCursor(m, -1);
|
||||||
|
}
|
||||||
|
|
||||||
if (down & KEY_RIGHT)
|
if (down & KEY_RIGHT)
|
||||||
{
|
{
|
||||||
|
soundPlaySelect();
|
||||||
repeat(10)
|
repeat(10)
|
||||||
_moveCursor(m, 1);
|
_moveCursor(m, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (down & KEY_LEFT)
|
else if (down & KEY_LEFT)
|
||||||
{
|
{
|
||||||
|
soundPlaySelect();
|
||||||
repeat(10)
|
repeat(10)
|
||||||
_moveCursor(m, -1);
|
_moveCursor(m, -1);
|
||||||
}
|
}
|
||||||
@ -382,15 +387,25 @@ char downloadPlayLoading(int number) {
|
|||||||
|
|
||||||
void exitFunction() {
|
void exitFunction() {
|
||||||
if (agingMode == false) {
|
if (agingMode == false) {
|
||||||
|
wait(25);
|
||||||
|
if (success == true) {
|
||||||
|
setBackdropColorSub(0x1FE0);
|
||||||
|
soundPlayPass();
|
||||||
|
} else {
|
||||||
|
setBackdropColorSub(0x00FF);
|
||||||
|
soundPlayFail();
|
||||||
|
}
|
||||||
iprintf("\n\n Please Push Select To Return ");
|
iprintf("\n\n Please Push Select To Return ");
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
swiWaitForVBlank();
|
swiWaitForVBlank();
|
||||||
scanKeys();
|
scanKeys();
|
||||||
|
|
||||||
if (keysDown() & KEY_SELECT )
|
if (keysDown() & KEY_SELECT ) {
|
||||||
|
soundPlayBack();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
wait(50);
|
wait(50);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,6 +13,7 @@
|
|||||||
#include "../message.h"
|
#include "../message.h"
|
||||||
#include "../main.h"
|
#include "../main.h"
|
||||||
#include "../video.h"
|
#include "../video.h"
|
||||||
|
#include "../audio.h"
|
||||||
|
|
||||||
static size_t i;
|
static size_t i;
|
||||||
|
|
||||||
@ -47,9 +48,11 @@ static int _chipMenu(int cursor)
|
|||||||
if (keysDown() & KEY_A)
|
if (keysDown() & KEY_A)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (keysDown() & KEY_B)
|
if (keysDown() & KEY_B) {
|
||||||
|
soundPlayBack();
|
||||||
programEnd = true;
|
programEnd = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int result = m->cursor;
|
int result = m->cursor;
|
||||||
freeMenu(m);
|
freeMenu(m);
|
||||||
@ -71,10 +74,12 @@ int chipMain(void)
|
|||||||
{
|
{
|
||||||
|
|
||||||
case CHIPMENU_NAND_INFO:
|
case CHIPMENU_NAND_INFO:
|
||||||
|
soundPlaySelect();
|
||||||
nandPrintInfo();
|
nandPrintInfo();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CHIPMENU_CPU_INFO:
|
case CHIPMENU_CPU_INFO:
|
||||||
|
soundPlaySelect();
|
||||||
cpuPrintInfo();
|
cpuPrintInfo();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,6 +16,7 @@
|
|||||||
#include "../main.h"
|
#include "../main.h"
|
||||||
#include "../video.h"
|
#include "../video.h"
|
||||||
#include "../menu.h"
|
#include "../menu.h"
|
||||||
|
#include "../audio.h"
|
||||||
#include "../lib/libfat/include/fat.h"
|
#include "../lib/libfat/include/fat.h"
|
||||||
|
|
||||||
extern bool nand_Startup();
|
extern bool nand_Startup();
|
||||||
@ -111,9 +112,11 @@ static int _fsMenu(int cursor)
|
|||||||
if (keysDown() & KEY_A)
|
if (keysDown() & KEY_A)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (keysDown() & KEY_B)
|
if (keysDown() & KEY_B) {
|
||||||
|
soundPlayBack();
|
||||||
programEnd = true;
|
programEnd = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int result = m->cursor;
|
int result = m->cursor;
|
||||||
freeMenu(m);
|
freeMenu(m);
|
||||||
@ -135,56 +138,70 @@ int fsMain(void)
|
|||||||
{
|
{
|
||||||
|
|
||||||
case FSMENU_READ_MBR:
|
case FSMENU_READ_MBR:
|
||||||
|
soundPlaySelect();
|
||||||
readMbr();
|
readMbr();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FSMENU_REPAIR_MBR:
|
case FSMENU_REPAIR_MBR:
|
||||||
|
soundPlaySelect();
|
||||||
repairMbr(false);
|
repairMbr(false);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FSMENU_FORMAT_MAIN:
|
case FSMENU_FORMAT_MAIN:
|
||||||
|
soundPlaySelect();
|
||||||
formatMain();
|
formatMain();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FSMENU_FORMAT_PHOTO:
|
case FSMENU_FORMAT_PHOTO:
|
||||||
|
soundPlaySelect();
|
||||||
formatPhoto();
|
formatPhoto();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FSMENU_NULL:
|
case FSMENU_NULL:
|
||||||
|
soundPlaySelect();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FSMENU_MOUNT_MAIN:
|
case FSMENU_MOUNT_MAIN:
|
||||||
|
soundPlaySelect();
|
||||||
mountNAND(false);
|
mountNAND(false);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FSMENU_UNMOUNT_MAIN:
|
case FSMENU_UNMOUNT_MAIN:
|
||||||
|
soundPlaySelect();
|
||||||
unmountNAND(false);
|
unmountNAND(false);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FSMENU_MOUNT_PHOTO:
|
case FSMENU_MOUNT_PHOTO:
|
||||||
|
soundPlaySelect();
|
||||||
mountNAND(true);
|
mountNAND(true);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FSMENU_UNMOUNT_PHOTO:
|
case FSMENU_UNMOUNT_PHOTO:
|
||||||
|
soundPlaySelect();
|
||||||
unmountNAND(true);
|
unmountNAND(true);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FSMENU_MOUNT_NITRO:
|
case FSMENU_MOUNT_NITRO:
|
||||||
|
soundPlaySelect();
|
||||||
mountNitroFS();
|
mountNitroFS();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FSMENU_NULL2:
|
case FSMENU_NULL2:
|
||||||
|
soundPlaySelect();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FSMENU_FILETEST_MAIN:
|
case FSMENU_FILETEST_MAIN:
|
||||||
|
soundPlaySelect();
|
||||||
filetestNAND(false);
|
filetestNAND(false);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FSMENU_FILETEST_PHOTO:
|
case FSMENU_FILETEST_PHOTO:
|
||||||
|
soundPlaySelect();
|
||||||
filetestNAND(true);
|
filetestNAND(true);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FSMENU_FILETEST_NITRO:
|
case FSMENU_FILETEST_NITRO:
|
||||||
|
soundPlaySelect();
|
||||||
filetestNitro();
|
filetestNitro();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -485,7 +502,7 @@ bool filetestNAND(bool isPhoto) {
|
|||||||
char partition_path[10];
|
char partition_path[10];
|
||||||
snprintf(partition_path, 10, isPhoto ? "photo" : "nand");
|
snprintf(partition_path, 10, isPhoto ? "photo" : "nand");
|
||||||
|
|
||||||
iprintf("\n>> Read %s file", partition_name);
|
iprintf("\n>> Read %s file\n", partition_name);
|
||||||
iprintf("\n--------------------------------");
|
iprintf("\n--------------------------------");
|
||||||
|
|
||||||
if (isPhoto ? nandPhotoMounted : nandMounted) {
|
if (isPhoto ? nandPhotoMounted : nandMounted) {
|
||||||
|
|||||||
@ -27,16 +27,19 @@ bool clearHWInfoStruct() {
|
|||||||
}
|
}
|
||||||
hwsData.HWS_HEADER = 0x01000000;
|
hwsData.HWS_HEADER = 0x01000000;
|
||||||
hwsData.HWS_SIZE = 0x1C000000;
|
hwsData.HWS_SIZE = 0x1C000000;
|
||||||
hwsData.HWS_LANG = 0x01000000;
|
hwsData.HWS_LANG = (LANG_BITMAP_JAPAN << 24);
|
||||||
|
hwsData.HWS_LANG &= 0xFF000000;
|
||||||
|
//hwsData.HWS_LANG = 0x01000000;
|
||||||
hwsData.HWS_PAD = 0x00000000;
|
hwsData.HWS_PAD = 0x00000000;
|
||||||
hwsData.HWS_REGION = 0x00;
|
hwsData.HWS_REGION = LANG_JAPANESE;
|
||||||
strcpy(hwsData.HWS_SERIAL, "AAAMP1234567"); // You're a real one if you understand this serial.
|
strcpy(hwsData.HWS_SERIAL, "AAAMP1234567"); // You're a real one if you understand this serial.
|
||||||
hwsData.HWS_TID = 0x50414E48;
|
hwsData.HWS_TID = 0x4A414E48;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool loadHWInfoStruct() {
|
bool loadHWInfoStruct(u8 *hwinfo_buf) {
|
||||||
return true;
|
// 0xA4 is the HWInfo size (trimmed)
|
||||||
|
memcpy(&hwsData, hwinfo_buf, 0xA4);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool recoverHWInfo(bool simple) {
|
bool recoverHWInfo(bool simple) {
|
||||||
@ -67,6 +70,7 @@ bool recoverHWInfo(bool simple) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (simple == false) {
|
if (simple == false) {
|
||||||
|
if (!agingMode) {
|
||||||
agingMode = true;
|
agingMode = true;
|
||||||
if (recoverHWInfoOffset(HWS_OFFSET_OTHER)) {
|
if (recoverHWInfoOffset(HWS_OFFSET_OTHER)) {
|
||||||
hwinfofound = true;
|
hwinfofound = true;
|
||||||
@ -76,6 +80,15 @@ bool recoverHWInfo(bool simple) {
|
|||||||
hwinfofound = true;
|
hwinfofound = true;
|
||||||
}
|
}
|
||||||
agingMode = false;
|
agingMode = false;
|
||||||
|
} else {
|
||||||
|
if (recoverHWInfoOffset(HWS_OFFSET_OTHER)) {
|
||||||
|
hwinfofound = true;
|
||||||
|
} else if (recoverHWInfoOffset(HWS_OFFSET_BOX)) {
|
||||||
|
hwinfofound = true;
|
||||||
|
} else if (recoverHWInfoOffset(HWS_OFFSET_HANDHELD)) {
|
||||||
|
hwinfofound = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
clearScreen(cSUB);
|
clearScreen(cSUB);
|
||||||
@ -179,7 +192,9 @@ bool recoverHWInfoOffset(int address) {
|
|||||||
memset(sector_buf, 0, 0xA4);
|
memset(sector_buf, 0, 0xA4);
|
||||||
iprintf("\nLoading HWInfo...");
|
iprintf("\nLoading HWInfo...");
|
||||||
good_nandio_read(address, 0xA4, file_buf, true);
|
good_nandio_read(address, 0xA4, file_buf, true);
|
||||||
memcpy(&hwsData, file_buf, 0xA4);
|
|
||||||
|
loadHWInfoStruct(file_buf);
|
||||||
|
|
||||||
success = saveHWInfoSDMC();
|
success = saveHWInfoSDMC();
|
||||||
|
|
||||||
clearScreen(cSUB);
|
clearScreen(cSUB);
|
||||||
@ -232,9 +247,10 @@ bool recoverHWInfoDeep(void) {
|
|||||||
}
|
}
|
||||||
iprintf("\nDone.");
|
iprintf("\nDone.");
|
||||||
if (success == true) { // also if (verify)
|
if (success == true) { // also if (verify)
|
||||||
memset(sector_buf, 0, SECTOR_SIZE);
|
memset(file_buf, 0, SECTOR_SIZE);
|
||||||
good_nandio_read(0x10EE00 + (i * SECTOR_SIZE), SECTOR_SIZE, sector_buf, true);
|
good_nandio_read(0x10EE00 + (i * SECTOR_SIZE), SECTOR_SIZE, file_buf, true);
|
||||||
printf("\n%02X%02X%02X", sector_buf[0 + 0xA1], sector_buf[1 + 0xA1], sector_buf[2 + 0xA1]);
|
printf("\n%02X%02X%02X", file_buf[0 + 0xA1], file_buf[1 + 0xA1], file_buf[2 + 0xA1]);
|
||||||
|
loadHWInfoStruct(file_buf);
|
||||||
if (!agingMode) {
|
if (!agingMode) {
|
||||||
agingMode = true;
|
agingMode = true;
|
||||||
success = saveHWInfoSDMC();
|
success = saveHWInfoSDMC();
|
||||||
@ -266,7 +282,13 @@ bool saveHWInfoSDMC(void) {
|
|||||||
iprintf("\n>> Save HWInfo Secure to SDMC ");
|
iprintf("\n>> Save HWInfo Secure to SDMC ");
|
||||||
iprintf("\n--------------------------------");
|
iprintf("\n--------------------------------");
|
||||||
|
|
||||||
|
printf("\nClearing HWInfo buffer...");
|
||||||
|
memset(file_buf, 0, 0x4000);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// I need to do region checking (world/korea/china)
|
// I need to do region checking (world/korea/china)
|
||||||
|
// ^^^^ huh??? What for? Regions shouldn't be needed HWInfo R/W.
|
||||||
printf("\nRemoving old HWInfo...");
|
printf("\nRemoving old HWInfo...");
|
||||||
remove(HWS_PATH_SD);
|
remove(HWS_PATH_SD);
|
||||||
printf("\nWriting HWInfo...");
|
printf("\nWriting HWInfo...");
|
||||||
|
|||||||
@ -14,12 +14,14 @@
|
|||||||
#include "../message.h"
|
#include "../message.h"
|
||||||
#include "../main.h"
|
#include "../main.h"
|
||||||
#include "../video.h"
|
#include "../video.h"
|
||||||
|
#include "../audio.h"
|
||||||
|
|
||||||
static size_t i;
|
static size_t i;
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
NFMENU_CHECK_VER,
|
NFMENU_CHECK_VER,
|
||||||
NFMENU_IMPORT,
|
NFMENU_IMPORT,
|
||||||
|
NFMENU_IMPORT_OLD,
|
||||||
NFMENU_IMPORT_SDMC
|
NFMENU_IMPORT_SDMC
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -31,7 +33,8 @@ static int _nfMenu(int cursor)
|
|||||||
setListHeader(m, "NandFirm");
|
setListHeader(m, "NandFirm");
|
||||||
|
|
||||||
addMenuItem(m, "Check NandFirm", NULL, 0, "Check the stage2 (bootloader)\n version and type.");
|
addMenuItem(m, "Check NandFirm", NULL, 0, "Check the stage2 (bootloader)\n version and type.");
|
||||||
addMenuItem(m, "Import NandFirm", NULL, 0, "Install the standard stage2\n (bootloader).\n\n This stage2 works normally,\n but it is an updated version:\n - v2265-9336 (prod)\n - v2725-9336 (dev)");
|
addMenuItem(m, "Import NandFirm", NULL, 0, "Install the standard stage2\n (bootloader).\n\n This stage2 works normally,\n but it is an updated version:\n\n - v2265-9336 (prod)\n - v2725-9336 (dev)");
|
||||||
|
addMenuItem(m, "Import NandFirm (old)", NULL, 0, "Install the standard stage2\n (bootloader).\n\n This is the release version,\n but it is not the latest ver:\n\n - v2435-8325 (dev/prod)\n\n The updated NandFirm should\n be used instead.");
|
||||||
addMenuItem(m, "Import NandFirm (SDMC)", NULL, 0, "Install the SDMC Launcher\n stage2 (bootloader).\n\n SDMC will remove access to\n the firmware and SHOULD NOT\n BE USED unless otherwise\n told to do so.");
|
addMenuItem(m, "Import NandFirm (SDMC)", NULL, 0, "Install the SDMC Launcher\n stage2 (bootloader).\n\n SDMC will remove access to\n the firmware and SHOULD NOT\n BE USED unless otherwise\n told to do so.");
|
||||||
|
|
||||||
m->cursor = cursor;
|
m->cursor = cursor;
|
||||||
@ -50,9 +53,11 @@ static int _nfMenu(int cursor)
|
|||||||
if (keysDown() & KEY_A)
|
if (keysDown() & KEY_A)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (keysDown() & KEY_B)
|
if (keysDown() & KEY_B) {
|
||||||
|
soundPlayBack();
|
||||||
programEnd = true;
|
programEnd = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int result = m->cursor;
|
int result = m->cursor;
|
||||||
freeMenu(m);
|
freeMenu(m);
|
||||||
@ -74,15 +79,23 @@ int nfMain(void)
|
|||||||
{
|
{
|
||||||
|
|
||||||
case NFMENU_CHECK_VER:
|
case NFMENU_CHECK_VER:
|
||||||
|
soundPlaySelect();
|
||||||
readNandFirm();
|
readNandFirm();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NFMENU_IMPORT:
|
case NFMENU_IMPORT:
|
||||||
importNandFirm(false);
|
soundPlaySelect();
|
||||||
|
importNandFirm(0);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case NFMENU_IMPORT_OLD:
|
||||||
|
soundPlaySelect();
|
||||||
|
importNandFirm(2);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NFMENU_IMPORT_SDMC:
|
case NFMENU_IMPORT_SDMC:
|
||||||
importNandFirm(true);
|
soundPlaySelect();
|
||||||
|
importNandFirm(1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -105,7 +118,7 @@ bool readNandFirm(void) {
|
|||||||
printf("\n Ver: ");
|
printf("\n Ver: ");
|
||||||
for (i = 0; i < 10; i++) {
|
for (i = 0; i < 10; i++) {
|
||||||
|
|
||||||
if (sector_buf[i] == 0x0A) {
|
if (sector_buf[i] == 0x0A && i < 8) {
|
||||||
printf("-");
|
printf("-");
|
||||||
} else if (sector_buf[i] == 0x0D) {
|
} else if (sector_buf[i] == 0x0D) {
|
||||||
// Print nothing
|
// Print nothing
|
||||||
@ -119,17 +132,34 @@ bool readNandFirm(void) {
|
|||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool importNandFirm(bool sdmc) {
|
bool importNandFirm(int firmtype) {
|
||||||
success = true;
|
success = true;
|
||||||
clearScreen(cSUB);
|
clearScreen(cSUB);
|
||||||
|
|
||||||
iprintf("\n>> Import NandFirm (%s) ", sdmc ? "sdmc" : "menu");
|
if (firmtype > 2 || firmtype < 0) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
char firmname[10];
|
||||||
|
switch (firmtype) {
|
||||||
|
case 0:
|
||||||
|
snprintf(firmname, 10, "menu");
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
snprintf(firmname, 10, "sdmc");
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
snprintf(firmname, 10, "old");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
iprintf("\n>> Import NandFirm (%s)\n", firmname);
|
||||||
iprintf("\n--------------------------------");
|
iprintf("\n--------------------------------");
|
||||||
|
|
||||||
printf("\nOpening NandFirm...\n");
|
printf("\nOpening NandFirm...\n");
|
||||||
|
|
||||||
char file_path[100];
|
char file_path[100];
|
||||||
snprintf(file_path, 100, "nitro:/import/%s/%s-launcher.nand", consoleSignName, sdmc ? "sdmc" : "menu");
|
snprintf(file_path, 100, "nitro:/import/%s/%s-launcher.nand", consoleSignName, firmname);
|
||||||
FILE *file = fopen(file_path, "r");
|
FILE *file = fopen(file_path, "r");
|
||||||
|
|
||||||
printf("\n%s\n\n", file_path);
|
printf("\n%s\n\n", file_path);
|
||||||
|
|||||||
@ -18,4 +18,4 @@ void wait(int ticks);
|
|||||||
int nfMain(void);
|
int nfMain(void);
|
||||||
|
|
||||||
bool readNandFirm(void);
|
bool readNandFirm(void);
|
||||||
bool importNandFirm(bool sdmc);
|
bool importNandFirm(int firmtype);
|
||||||
@ -97,8 +97,7 @@ int parse_mbr(const uint8_t sector0[SECTOR_SIZE], const int is3DS)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
ref_ptable = is3DS?ptable_3DS:ptable_DSi;
|
ref_ptable = is3DS?ptable_3DS:ptable_DSi;
|
||||||
// only test the 1st partition now, we've seen variations on the 3rd partition
|
|
||||||
// and after all we only care about the 1st partition
|
|
||||||
if (memcmp(&ref_ptable[0], &m->partitions[0], sizeof(mbr_partition_t)))
|
if (memcmp(&ref_ptable[0], &m->partitions[0], sizeof(mbr_partition_t)))
|
||||||
{
|
{
|
||||||
return -2;
|
return -2;
|
||||||
@ -109,37 +108,3 @@ int parse_mbr(const uint8_t sector0[SECTOR_SIZE], const int is3DS)
|
|||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
// return 0 for valid MBR
|
|
||||||
int parse_mbr(const uint8_t sector0[SECTOR_SIZE], int is3DS, int verbose) {
|
|
||||||
const mbr_t *m = (mbr_t*)sector0;
|
|
||||||
const mbr_partition_t *ref_ptable; // reference partition table
|
|
||||||
int ret = 0;
|
|
||||||
if (m->boot_signature_0 != 0x55 || m->boot_signature_1 != 0xaa) {
|
|
||||||
//printf("invalid boot signature(0x55, 0xaa)\n");
|
|
||||||
ret = -1;
|
|
||||||
}
|
|
||||||
if (!is3DS) {
|
|
||||||
for (unsigned i = 0; i < sizeof(m->bootstrap); ++i) {
|
|
||||||
if (m->bootstrap[i]) {
|
|
||||||
//printf("bootstrap on DSi should be all zero\n");
|
|
||||||
ret = 0;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ref_ptable = ptable_DSi;
|
|
||||||
} else {
|
|
||||||
ref_ptable = ptable_3DS;
|
|
||||||
}
|
|
||||||
// Only check the first two as those are the only ones we mount
|
|
||||||
// There's some variation in the 3rd
|
|
||||||
for(int i = 0; i < 2; i++) {
|
|
||||||
if (memcmp(&ref_ptable[i], &m->partitions[i], sizeof(mbr_partition_t))) {
|
|
||||||
//printf("invalid partition table\n");
|
|
||||||
ret = -2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
@ -16,6 +16,7 @@
|
|||||||
#include "../main.h"
|
#include "../main.h"
|
||||||
#include "../video.h"
|
#include "../video.h"
|
||||||
#include "../storage.h"
|
#include "../storage.h"
|
||||||
|
#include "../audio.h"
|
||||||
|
|
||||||
//static size_t i;
|
//static size_t i;
|
||||||
|
|
||||||
@ -62,9 +63,11 @@ static int _sysfileMenu(int cursor)
|
|||||||
if (keysDown() & KEY_A)
|
if (keysDown() & KEY_A)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (keysDown() & KEY_B)
|
if (keysDown() & KEY_B) {
|
||||||
|
soundPlayBack();
|
||||||
programEnd = true;
|
programEnd = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int result = m->cursor;
|
int result = m->cursor;
|
||||||
freeMenu(m);
|
freeMenu(m);
|
||||||
@ -86,31 +89,39 @@ int sysfileMain(void)
|
|||||||
{
|
{
|
||||||
|
|
||||||
case SYSFILEMENU_RECOVER:
|
case SYSFILEMENU_RECOVER:
|
||||||
|
soundPlaySelect();
|
||||||
recoverHWInfo(false);
|
recoverHWInfo(false);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SYSFILEMENU_RECOVER2:
|
case SYSFILEMENU_RECOVER2:
|
||||||
|
soundPlaySelect();
|
||||||
recoverHWInfoDeep();
|
recoverHWInfoDeep();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SYSFILEMENU_NULL:
|
case SYSFILEMENU_NULL:
|
||||||
|
soundPlaySelect();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SYSFILEMENU_INIT_FOLDER:
|
case SYSFILEMENU_INIT_FOLDER:
|
||||||
|
soundPlaySelect();
|
||||||
makeSystemFolders();
|
makeSystemFolders();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SYSFILEMENU_INIT_S:
|
case SYSFILEMENU_INIT_S:
|
||||||
|
soundPlaySelect();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SYSFILEMENU_INIT_N:
|
case SYSFILEMENU_INIT_N:
|
||||||
|
soundPlaySelect();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SYSFILEMENU_INIT_CERT:
|
case SYSFILEMENU_INIT_CERT:
|
||||||
|
soundPlaySelect();
|
||||||
makeCertChain();
|
makeCertChain();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SYSFILEMENU_INIT_FONT:
|
case SYSFILEMENU_INIT_FONT:
|
||||||
|
soundPlaySelect();
|
||||||
makeFontTable();
|
makeFontTable();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
sounds/BACK.wav
Normal file
BIN
sounds/BACK.wav
Normal file
Binary file not shown.
BIN
sounds/CHIME.wav
Normal file
BIN
sounds/CHIME.wav
Normal file
Binary file not shown.
BIN
sounds/NG.wav
Normal file
BIN
sounds/NG.wav
Normal file
Binary file not shown.
BIN
sounds/OK.wav
Normal file
BIN
sounds/OK.wav
Normal file
Binary file not shown.
BIN
sounds/SELECT.wav
Normal file
BIN
sounds/SELECT.wav
Normal file
Binary file not shown.
BIN
sounds/STARTUP.wav
Normal file
BIN
sounds/STARTUP.wav
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user