* robbed homebrewboot stuff from wiixplorer

This commit is contained in:
giantpune 2010-09-16 11:54:18 +00:00
parent 5bc9cee195
commit 95745a23cb
4 changed files with 18 additions and 15 deletions

View File

@ -2,8 +2,8 @@
<app version="1">
<name> USB Loader GX</name>
<coder>USB Loader GX Team</coder>
<version>1.0 r941</version>
<release_date>201009160837</release_date>
<version>1.0 r942</version>
<release_date>201009161115</release_date>
<short_description>Loads games from USB-devices</short_description>
<long_description>USB Loader GX is a libwiigui based USB iso loader with a wii-like GUI. You can install games to your HDDs and boot them with shorter loading times.
The interactive GUI is completely controllable with WiiMote, Classic Controller or GC Controller.

View File

@ -96,6 +96,7 @@ TTFFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.ttf)))
PNGFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.png)))
OGGFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.ogg)))
PCMFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.pcm)))
DOLFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.dol)))
MP3FILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.mp3)))
#---------------------------------------------------------------------------------
@ -110,7 +111,7 @@ endif
export OFILES := $(addsuffix .o,$(BINFILES)) \
$(CPPFILES:.cpp=.o) $(CFILES:.c=.o) \
$(sFILES:.s=.o) $(SFILES:.S=.o) \
$(TTFFILES:.ttf=.ttf.o) $(PNGFILES:.png=.png.o) \
$(TTFFILES:.ttf=.ttf.o) $(PNGFILES:.png=.png.o) $(addsuffix .o,$(DOLFILES))\
$(OGGFILES:.ogg=.ogg.o) $(PCMFILES:.pcm=.pcm.o) $(MP3FILES:.mp3=.mp3.o) \
$(addsuffix .o,$(ELFFILES))
@ -198,6 +199,10 @@ language: $(wildcard $(PROJECTDIR)/Languages/*.lang)
@echo $(notdir $<)
$(bin2o)
%.dol.o : %.dol
@echo $(notdir $<)
@bin2s -a 32 $< | $(AS) -o $(@)
%.ttf.o : %.ttf
@echo $(notdir $<)
$(bin2o)

View File

@ -1,18 +1,13 @@
#ifndef _BOOTHOMEBREW_H_
#define _BOOTHOMEBREW_H_
#ifdef __cplusplus
extern "C" {
#endif
int BootHomebrew(char * path);
int BootHomebrewFromMem();
void CopyHomebrewMemory(u32 read, u8 *temp, u32 len);
int AllocHomebrewMemory(u32 filesize);
void FreeHomebrewBuffer();
#ifdef __cplusplus
}
#endif
int BootHomebrew(char * path);
int BootHomebrewFromMem();
void CopyHomebrewMemory(u32 read, u8 *temp, u32 len);
int AllocHomebrewMemory(u32 filesize);
void FreeHomebrewBuffer();
void AddBootArgument(const char * argv);
extern u32 homebrewsize;
#endif

View File

@ -879,6 +879,7 @@ int MenuHomebrewBrowse() {
uLongf f = uncfilesize;
error = uncompress(unc, &f, temp, infilesize) != Z_OK;
uncfilesize = f;
homebrewsize = uncfilesize;
free(temp);
temp = unc;
@ -887,6 +888,7 @@ int MenuHomebrewBrowse() {
if (!error && strstr(filename,".zip") == NULL) {
innetbuffer = temp;
}
}
@ -899,6 +901,7 @@ int MenuHomebrewBrowse() {
if (strstr(filename,".dol") || strstr(filename,".DOL")
|| strstr(filename,".elf") || strstr(filename,".ELF")) {
boothomebrew = 2;
AddBootArgument( filename );
menu = MENU_EXIT;
CloseConnection();
break;