mirror of
https://github.com/rvtr/TDT.git
synced 2025-10-31 13:51:07 -04:00
Add files via upload
This commit is contained in:
parent
7319fc2e9c
commit
b7bf149dc7
15
Makefile
15
Makefile
@ -20,11 +20,15 @@ BUILD := build
|
||||
SOURCES := src
|
||||
DATA := data
|
||||
INCLUDES := include
|
||||
#GAME_ICON := $(CURDIR)/icon.bmp
|
||||
|
||||
GAME_TITLE := TMFH
|
||||
GAME_SUBTITLE1 := Title Manager for HiyaCFW
|
||||
GAME_SUBTITLE2 := JeffRuLz
|
||||
|
||||
GAME_CODE := TMFH
|
||||
GAME_LABEL := TITLEMANFH
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# options for code generation
|
||||
#---------------------------------------------------------------------------------
|
||||
@ -111,8 +115,9 @@ endif
|
||||
#---------------------------------------------------------------------------------
|
||||
$(BUILD):
|
||||
@[ -d $@ ] || mkdir -p $@
|
||||
@$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile
|
||||
|
||||
@$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile
|
||||
@echo built ... $(notdir $@)
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
clean:
|
||||
@echo clean ...
|
||||
@ -126,6 +131,12 @@ else
|
||||
#---------------------------------------------------------------------------------
|
||||
$(OUTPUT).nds : $(OUTPUT).elf
|
||||
$(OUTPUT).elf : $(OFILES)
|
||||
|
||||
$(OUTPUT).nds: $(OUTPUT).elf
|
||||
@ndstool -u "00030004" \
|
||||
-g "$(GAME_CODE)" "00" "$(GAME_LABEL)" \
|
||||
-c $(OUTPUT).nds -9 $(OUTPUT).elf \
|
||||
-b $(GAME_ICON) "$(GAME_TITLE);$(GAME_SUBTITLE1);$(GAME_SUBTITLE2)"
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
%.bin.o : %.bin
|
||||
|
||||
@ -393,7 +393,7 @@ void install(char* fpath)
|
||||
|
||||
if (!f)
|
||||
{
|
||||
iprintf("Error: could not open file.\nPress B to exit.\n");
|
||||
iprintf("Error: could not open file.\n\nPress B to exit.\n");
|
||||
keyWait(KEY_A | KEY_B);
|
||||
}
|
||||
else
|
||||
@ -408,6 +408,22 @@ void install(char* fpath)
|
||||
fseek(f, header.ndshdr.bannerOffset, SEEK_SET);
|
||||
fread(&banner, sizeof(tNDSBanner), 1, f);
|
||||
}
|
||||
/*
|
||||
//Check header size
|
||||
if (header.ndshdr.headerSize != 0x4000)
|
||||
{
|
||||
iprintf("Error: no DSi header.");
|
||||
goto error;
|
||||
}
|
||||
*/
|
||||
//Check high title id
|
||||
if (header.tid_high != 0x00030004 &&
|
||||
header.tid_high != 0x00030005 &&
|
||||
header.tid_high != 0x00030015)
|
||||
{
|
||||
iprintf("This file cannot be installed.\nInvalid title ID.");
|
||||
goto error;
|
||||
}
|
||||
|
||||
//Print file size
|
||||
int fileSize = -1;
|
||||
@ -635,7 +651,7 @@ complete:
|
||||
error:
|
||||
fclose(f);
|
||||
|
||||
iprintf("\nInstallation failed.\nPress B to exit.\n");
|
||||
iprintf("\nInstallation failed.\n\nPress B to exit.\n");
|
||||
keyWait(KEY_A | KEY_B);
|
||||
|
||||
return;
|
||||
|
||||
@ -7,7 +7,6 @@ void testMenu()
|
||||
consoleClear();
|
||||
|
||||
iprintf("Storage Check Test\n\n");
|
||||
iprintf("Verify these are accurate and\nreport if they're not.\n");
|
||||
|
||||
consoleSelect(&bottomScreen);
|
||||
consoleClear();
|
||||
|
||||
@ -435,28 +435,38 @@ void subMenu()
|
||||
|
||||
else
|
||||
{
|
||||
tNDSHeader header;
|
||||
tNDSBanner banner;
|
||||
int fsize = getFileSize(f);
|
||||
|
||||
fread(&header, sizeof(tNDSHeader), 1, f);
|
||||
fseek(f, header.bannerOffset, SEEK_SET);
|
||||
fread(&banner, sizeof(tNDSBanner), 1, f);
|
||||
fclose(f);
|
||||
if (fsize > getSDCardFree())
|
||||
messageBox("Not enough free space on SD card.\n");
|
||||
|
||||
char outpath[256];
|
||||
sprintf(outpath, "%s%.12s - %.4s.nds", ROM_PATH, header.gameTitle, header.gameCode);
|
||||
|
||||
char msg[512];
|
||||
sprintf(msg, "Dump title to\n%s\n", outpath);
|
||||
|
||||
if (choiceBox(msg) == YES)
|
||||
else
|
||||
{
|
||||
if (copyFile(fpath, outpath) == 1)
|
||||
messageBox("Title saved.\n");
|
||||
else
|
||||
messageBox("Title dump failed.\n");
|
||||
tNDSHeader header;
|
||||
tNDSBanner banner;
|
||||
|
||||
fread(&header, sizeof(tNDSHeader), 1, f);
|
||||
fseek(f, header.bannerOffset, SEEK_SET);
|
||||
fread(&banner, sizeof(tNDSBanner), 1, f);
|
||||
fclose(f);
|
||||
|
||||
char outpath[256];
|
||||
sprintf(outpath, "%s%.12s - %.4s.nds", ROM_PATH, header.gameTitle, header.gameCode);
|
||||
|
||||
char msg[512];
|
||||
sprintf(msg, "Dump title to\n%s\n", outpath);
|
||||
|
||||
if (choiceBox(msg) == YES)
|
||||
{
|
||||
if (copyFile(fpath, outpath) == 1)
|
||||
messageBox("Title saved.\n");
|
||||
else
|
||||
messageBox("Title dump failed.\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fclose(f);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user