diff --git a/HomebrewFilter.vWii/icon.png b/HomebrewFilter.vWii/icon.png new file mode 100644 index 0000000..7cab780 Binary files /dev/null and b/HomebrewFilter.vWii/icon.png differ diff --git a/HomebrewFilter.vWii/meta.xml b/HomebrewFilter.vWii/meta.xml new file mode 100644 index 0000000..58a86c8 --- /dev/null +++ b/HomebrewFilter.vWii/meta.xml @@ -0,0 +1,38 @@ + + + HomebrewFilter Installer + Nano + rev41 + + HBF Installer + Installs The HomebrewFilter + + Changes in rev41: + +//rev41: +- fixed auto-connecting Internet via WiFi +- fixed video initialization problem at PAL 50Hz +- fixed categorizing apps from SD Gecko +- removed remaining references to HBC +- basic support for WifiGecko + * most messages are shown via WifiGecko. Those that are + sent prior to network initialization will be missing + * option to en/disable WifiGecko (settings->network) + * no option yet to change IP and Port, currently sending + to 192.168.1.4:4405 (you change your PCs IP from Router + configuration interface) +- support for SDCardGecko (not SD Gecko!) + * saves debug messages to SD:/config/HBF/debug.txt + * endless logging, different logs are split with an + "HBF Log (YYYY-MM-DD / HH:MM:SS)" message. HBF never + deletes the logfile on it's own. +Note: ** Gecko priority: + 1. SD Card Gecko + 2. Wifi Gecko + 3. USB Gecko + if SD Card Gecko is enabled, there's no messages + send via Wifi or USB and so on. By default HBF + tries to connect to USB Gecko. + + + diff --git a/Makefile b/Makefile index b306486..fa036d2 100644 --- a/Makefile +++ b/Makefile @@ -1,18 +1,37 @@ -all: compile_installer +all: + @echo either use "make compile_installer" or "make compile_installer_vwii" REV=$(shell grep define svnrev/svnrev.c | gawk '{print $$3}') -dist: compile-installer - @tar cfj HomebrewFilter-rev$(REV).tar.bz HomebrewFilter/ +dist: compile_installer + @tar cfj HomebrewFilter-rev$(REV).tar.bz2 HomebrewFilter/ @tar cfj HomebrewFilter-Standalone-rev$(REV).tar.bz2 HomebrewFilter.Standalone/ +dist_vwii: compile_installer_vwii + @tar cfj HomebrewFilter-vWii-rev$(REV).tar.bz2 HomebrewFilter.vWii/ + clean: @make -C main clean @make -C boot clean @make -C installer clean @make -C nand-loader clean + @make -C libruntimeiospatch clean -compile_hbf: +clean_vwii: + @make -C main clean + @make -C boot clean + @make -C installer clean + +nand_loader: + @make -C nand-loader + +libruntimeiospatch: + @make -C libruntimeiospatch + +compile_hbf: clean + @echo "===========================" + @echo "======= HBF for Wii =======" + @echo "===========================" @make -C main @cp main/hbf.dol boot/source/hbf.dol @@ -25,3 +44,19 @@ compile_installer: compile_boot @tools/WadMii.exe -input "Z:$(PWD)\installer\wad" -output "Z:$(PWD)\installer\data\install.wad" || wine tools/WadMii.exe -input "Z:$(PWD)\installer\wad" -output "Z:$(PWD)\installer\data\install.wad" @make -C installer @cp installer/installer.dol HomebrewFilter/boot.dol + +compile_hbf_vwii: clean_vwii + @echo "============================" + @echo "======= HBF for vWii =======" + @echo "============================" + @make -C main -f Makefile.vWii + @cp main/hbf.dol boot/source/hbf.dol + +compile_boot_vwii: compile_hbf_vwii + @make -C boot + @cp boot/hbf_boot.dol installer/wad.vwii/00000001.app + +compile_installer_vwii: compile_boot_vwii + @tools/WadMii.exe -input "Z:$(PWD)\installer\wad.vwii" -output "Z:$(PWD)\installer\data\install.wad" || wine tools/WadMii.exe -input "Z:$(PWD)\installer\wad.vwii" -output "Z:$(PWD)\installer\data\install.wad" + @make -C installer + @cp installer/installer.dol HomebrewFilter.vWii/boot.dol diff --git a/boot/Makefile b/boot/Makefile index 608544f..7c74944 100644 --- a/boot/Makefile +++ b/boot/Makefile @@ -105,7 +105,7 @@ $(BUILD): clean: @echo clean ... @rm -fr $(BUILD) $(OUTPUT).elf $(OUTPUT).dol - @rm source/hbf.dol + @rm -f source/hbf.dol #--------------------------------------------------------------------------------- run: diff --git a/installer/Makefile b/installer/Makefile index fefaec6..5264875 100644 --- a/installer/Makefile +++ b/installer/Makefile @@ -106,7 +106,7 @@ clean: @echo clean ... @rm -fr $(BUILD) $(OUTPUT).elf $(OUTPUT).dol @rm -f data/install.wad - @rm wad/00000001.app + @rm -f wad/00000001.app wad.vwii/00000001.app #--------------------------------------------------------------------------------- run: diff --git a/installer/source/main.cpp b/installer/source/main.cpp index 9bf9a2b..1e5b353 100644 --- a/installer/source/main.cpp +++ b/installer/source/main.cpp @@ -16,12 +16,14 @@ int main(int argc, char **argv) { VIDEO_Init(); Video_SetMode(); - if(AHBPROT_DISABLED) - IosPatch_RUNTIME(true, false, false, true); - WPAD_Init(); PAD_Init(); + if(AHBPROT_DISABLED) + IosPatch_RUNTIME(true, false, true, true); + else + IOS_ReloadIOS(236); + menu(); signed_blob *p_tmd = NULL; diff --git a/installer/wad/0001000154484246.tmd b/installer/wad/0001000154484246.tmd index 1b859be..88b7601 100644 Binary files a/installer/wad/0001000154484246.tmd and b/installer/wad/0001000154484246.tmd differ diff --git a/main/Makefile b/main/Makefile index feac820..6494cd4 100644 --- a/main/Makefile +++ b/main/Makefile @@ -125,7 +125,8 @@ $(BUILD): clean: @echo clean ... @rm -fr $(BUILD) $(OUTPUT).dol $(OUTPUT).elf - @rm ../HomebrewFilter/boot.dol + @rm -f ../HomebrewFilter/boot.dol + @rm -f ../HomebrewFilter.Standalone/boot.dol #--------------------------------------------------------------------------------- run: diff --git a/main/Makefile.vWii b/main/Makefile.vWii new file mode 100644 index 0000000..da57191 --- /dev/null +++ b/main/Makefile.vWii @@ -0,0 +1,188 @@ +#--------------------------------------------------------------------------------- +# Clear the implicit built in rules +#--------------------------------------------------------------------------------- +.SUFFIXES: +#--------------------------------------------------------------------------------- +ifeq ($(strip $(DEVKITPPC)),) +$(error "Please set DEVKITPPC in your environment. export DEVKITPPC=devkitPPC") +endif + +include $(DEVKITPPC)/wii_rules + +#--------------------------------------------------------------------------------- +# TARGET is the name of the output +# BUILD is the directory where object files & intermediate files will be placed +# SOURCES is a list of directories containing source code +# INCLUDES is a list of directories containing extra header files +#--------------------------------------------------------------------------------- +TARGET := hbf +BUILD := build +SOURCES := source \ + source/BootHomebrew \ + source/DiskOperations \ + source/libwiigui \ + source/Prompts \ + source/Menus \ + source/Network \ + source/Tools \ + source/Neek \ + source/Neek/data \ + source/Neek/xml \ + ../svnrev +INCLUDES := source +DATA := data/fonts \ + data/sounds \ + data/images \ + data/images/design \ + data/binary + +#--------------------------------------------------------------------------------- +# options for code generation +#--------------------------------------------------------------------------------- + +CFLAGS = -g -O2 -Wall $(MACHDEP) $(INCLUDE) -DVWII +CXXFLAGS = -save-temps -Xassembler -aln=$@.lst $(CFLAGS) +LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map -Wl,--section-start,.init=0x81330000 +#LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map + +#--------------------------------------------------------------------------------- +# any extra libraries we wish to link with the project +#--------------------------------------------------------------------------------- +LIBS := -ldi -lpng -lz -lfat -lntfs -lwiiuse -lbte -lasnd -logc -lfreetype -lmxml -lext2fs -lruntimeiospatch +#--------------------------------------------------------------------------------- +# list of directories containing libraries, this must be the top level containing +# include and lib +#--------------------------------------------------------------------------------- +LIBDIRS := $(PORTLIBS) + +#--------------------------------------------------------------------------------- +# no real need to edit anything past this point unless you need to add additional +# rules for different file extensions +#--------------------------------------------------------------------------------- +ifneq ($(BUILD),$(notdir $(CURDIR))) +#--------------------------------------------------------------------------------- + +export OUTPUT := $(CURDIR)/$(TARGETDIR)/$(TARGET) +export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir))\ + $(foreach dir,$(DATA),$(CURDIR)/$(dir)) +export DEPSDIR := $(CURDIR)/$(BUILD) + +#--------------------------------------------------------------------------------- +# automatically build a list of object files for our project +#--------------------------------------------------------------------------------- +CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c))) +CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp))) +sFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s))) +SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.S))) +TTFFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.ttf))) +PNGFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.png))) +OGGFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.ogg))) +PCMFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.pcm))) +WAVFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.wav))) +DOLFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.dol))) +BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.bin))) + +#--------------------------------------------------------------------------------- +# use CXX for linking C++ projects, CC for standard C +#--------------------------------------------------------------------------------- +ifeq ($(strip $(CPPFILES)),) + export LD := $(CC) +else + export LD := $(CXX) +endif + +export OFILES := $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) \ + $(sFILES:.s=.o) $(SFILES:.S=.o) \ + $(TTFFILES:.ttf=.ttf.o) $(PNGFILES:.png=.png.o) \ + $(OGGFILES:.ogg=.ogg.o) $(PCMFILES:.pcm=.pcm.o) \ + $(WAVFILES:.wav=.wav.o) \ + $(addsuffix .o,$(DOLFILES)) \ + $(addsuffix .o,$(BINFILES)) + +#--------------------------------------------------------------------------------- +# build a list of include paths +#--------------------------------------------------------------------------------- +export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \ + $(foreach dir,$(LIBDIRS),-I$(dir)/include) \ + -I$(CURDIR)/$(BUILD) \ + -I$(LIBOGC_INC) -I$(PORTLIBS)/include/freetype2 + +#--------------------------------------------------------------------------------- +# build a list of library paths +#--------------------------------------------------------------------------------- +export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) \ + -L$(LIBOGC_LIB) + +export OUTPUT := $(CURDIR)/$(TARGET) +.PHONY: $(BUILD) clean + +#--------------------------------------------------------------------------------- +$(BUILD): + @[ -d $@ ] || mkdir -p $@ + @make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile + +#--------------------------------------------------------------------------------- +clean: + @echo clean ... + @rm -fr $(BUILD) $(OUTPUT).dol $(OUTPUT).elf + @rm -f ../HomebrewFilter.vwii/boot.dol + +#--------------------------------------------------------------------------------- +run: + wiiload $(OUTPUT).dol + +#--------------------------------------------------------------------------------- +reload: + wiiload -r $(OUTPUT).dol + +#--------------------------------------------------------------------------------- +else + +DEPENDS := $(OFILES:.o=.d) + +#--------------------------------------------------------------------------------- +# main targets +#--------------------------------------------------------------------------------- +$(OUTPUT).dol: $(OUTPUT).elf +$(OUTPUT).elf: $(OFILES) + +#--------------------------------------------------------------------------------- +# This rule links in binary data with .ttf, .png, and .mp3 extensions +#--------------------------------------------------------------------------------- +%.elf.o : %.elf + @echo $(notdir $<) + @bin2s -a 32 $< | $(AS) -o $(@) + +%.dol.o : %.dol + @echo $(notdir $<) + @bin2s -a 32 $< | $(AS) -o $(@) + +%.ttf.o : %.ttf + @echo $(notdir $<) + @bin2s -a 32 $< | $(AS) -o $(@) + +%.png.o : %.png + @echo $(notdir $<) + @bin2s -a 32 $< | $(AS) -o $(@) + +%.ogg.o : %.ogg + @echo $(notdir $<) + @bin2s -a 32 $< | $(AS) -o $(@) + +%.pcm.o : %.pcm + @echo $(notdir $<) + @bin2s -a 32 $< | $(AS) -o $(@) + +%.wav.o : %.wav + @echo $(notdir $<) + @bin2s -a 32 $< | $(AS) -o $(@) + +%.bin.o : %.bin + @echo $(notdir $<) + @bin2s -a 32 $< | $(AS) -o $(@) + +-include $(DEPENDS) + +#--------------------------------------------------------------------------------- +endif +#--------------------------------------------------------------------------------- diff --git a/main/source/Network/update.cpp b/main/source/Network/update.cpp index 8bf91a8..bd34c35 100644 --- a/main/source/Network/update.cpp +++ b/main/source/Network/update.cpp @@ -13,7 +13,11 @@ string CheckNewVersions() { string revs = "error"; char buffer[100]; +#ifdef VWII + sprintf(buffer, "http://www.nanolx.org/hbf/DOL.vwii/revisions.vwii"); +#else sprintf(buffer, "http://www.nanolx.org/hbf/DOL/revisions"); +#endif struct block file = downloadfile(buffer); if (file.data != NULL) @@ -27,7 +31,11 @@ string CheckNewVersions() string NewVersionsText() { string text = "error"; +#ifdef VWII + struct block file = downloadfile("http://www.nanolx.org/hbf/DOL.vwii/updates.vwii"); +#else struct block file = downloadfile("http://www.nanolx.org/hbf/DOL/updates"); +#endif if (file.data != NULL) { text = (char*)file.data; @@ -40,10 +48,17 @@ struct block file; string new_update(string rev, string filename) { char url[100]; +#ifdef VWII + if(rev == "Beta") + sprintf(url, "http://www.nanolx.org/hbf/DOL.vwii/Beta/%s", filename.c_str()); + else + sprintf(url, "http://www.nanolx.org/hbf/DOL.vwii/rev%s/%s", rev.c_str(), filename.c_str()); +#else if(rev == "Beta") sprintf(url, "http://www.nanolx.org/hbf/DOL/Beta/%s", filename.c_str()); else sprintf(url, "http://www.nanolx.org/hbf/DOL/rev%s/%s", rev.c_str(), filename.c_str()); +#endif file = downloadfile(url); if (file.data && file.size > 0) diff --git a/main/source/Prompts/prompt_update.cpp b/main/source/Prompts/prompt_update.cpp index 7a5e414..d729e60 100644 --- a/main/source/Prompts/prompt_update.cpp +++ b/main/source/Prompts/prompt_update.cpp @@ -102,20 +102,43 @@ updatePrompt(string rev) ResumeGui(); char url[100]; +#ifdef VWII + if(rev == "Beta") + sprintf(url, "http://www.nanolx.org/hbf/DOL.vwii/Beta/boot.dol"); + else + sprintf(url, "http://www.nanolx.org/hbf/DOL.vwii/rev%s/boot.dol", rev.c_str()); + + // copy boot.dol to prev.dol + std::ifstream infile((Settings.device_dat + ":/apps/HomebrewFilter.vWii/boot.dol").c_str(), std::ios_base::binary); + std::ofstream outfile((Settings.device_dat + ":/apps/HomebrewFilter.vWii/prev.dol").c_str(), std::ios_base::binary); +#else if(rev == "Beta") sprintf(url, "http://www.nanolx.org/hbf/DOL/Beta/boot.dol"); else sprintf(url, "http://www.nanolx.org/hbf/DOL/rev%s/boot.dol", rev.c_str()); - // copy boot.dol to prev.dol + // copy boot.dol to prev.dol std::ifstream infile((Settings.device_dat + ":/apps/HomebrewFilter/boot.dol").c_str(), std::ios_base::binary); std::ofstream outfile((Settings.device_dat + ":/apps/HomebrewFilter/prev.dol").c_str(), std::ios_base::binary); +#endif outfile << infile.rdbuf(); struct block file = downloadfile(url); if (file.data && file.size > 0) { +#ifdef VWII + // write file + if(opendir(check_path(Settings.device_dat + ":/apps/HomebrewFilter.vWii").c_str()) == NULL) + mkdir((Settings.device_dat + ":/apps/HomebrewFilter.vWii").c_str(), 0777); + + FILE * data = fopen((Settings.device_dat + ":/apps/HomebrewFilter.vWii/boot.dol").c_str(), "wb"); + if(data) + { + fwrite(file.data, 1, file.size, data); + fclose(data); + } +#else // write file if(opendir(check_path(Settings.device_dat + ":/apps/HomebrewFilter").c_str()) == NULL) mkdir((Settings.device_dat + ":/apps/HomebrewFilter").c_str(), 0777); @@ -126,7 +149,7 @@ updatePrompt(string rev) fwrite(file.data, 1, file.size, data); fclose(data); } - +#endif if(file.data) free(file.data); @@ -324,7 +347,7 @@ string checkUpdatePrompt() ResumeGui(); string rev = "NULL"; - // überprüfen, ob netzwerk initialisiert wird + // berprfen, ob netzwerk initialisiert wird Initialize_Network(); if(!IsNetworkInit()) { diff --git a/main/source/main.cpp b/main/source/main.cpp index c15341c..58e4576 100644 --- a/main/source/main.cpp +++ b/main/source/main.cpp @@ -279,7 +279,11 @@ main(int argc, char *argv[]) xprintf("Setting force_reload to NORELOAD\n"); Settings.force_reload = "NORELOAD"; xprintf("Loading boot.dol from online update\n"); +#ifdef VWII + LoadHomebrew ((Settings.device_dat + ":/apps/HomebrewFilter.vWii/boot.dol").c_str()); +#else LoadHomebrew ((Settings.device_dat + ":/apps/HomebrewFilter/boot.dol").c_str()); +#endif BootHomebrew(); } } diff --git a/revisions b/revisions index 4193b68..20b92d8 100644 --- a/revisions +++ b/revisions @@ -1,3 +1,4 @@ +42- 41- 40- 39- diff --git a/revisions.vwii b/revisions.vwii new file mode 100644 index 0000000..854a04f --- /dev/null +++ b/revisions.vwii @@ -0,0 +1 @@ +42- diff --git a/updates b/updates index 3d97b66..0bc07db 100644 --- a/updates +++ b/updates @@ -5,13 +5,17 @@ - added option for choosing whether bootmii boot2 is installed (adds "Load BootMii (Boot2)" in Exit-Prompt - black-listed v65280 of IOS254 (if that version is - installed there's no "Load BootMii (IOS)" anymore - in Exit-Prompt + installed there's no "Load BootMii (IOS)" anymore in Exit-Prompt - ensure 'Launch Priiloader' is only shown if Priiloader is really installed (in some cases it could appear even if Priiloader hasn't been installed) - fixed a bug that caused black-screen then returning into HBF from app loaded with +- build separate vWii-version using FIX94s NAND-Loader (still using + modified Waninkoko NAND-Loader on real Wii) +- build using libruntimeiospatch 1.3 +- vWii version does NOT YET disable functions not applicable von vWii +- installer now falls back to IOS236 if there's no HW_AHBPROT access //rev41: - fixed auto-connecting Internet via WiFi diff --git a/updates.vwii b/updates.vwii new file mode 100644 index 0000000..f7900cd --- /dev/null +++ b/updates.vwii @@ -0,0 +1,17 @@ +//rev42: +- changed default options: + * disable checking for new version automatically + * enable sd-card debug logging +- added option for choosing whether bootmii boot2 is + installed (adds "Load BootMii (Boot2)" in Exit-Prompt +- black-listed v65280 of IOS254 (if that version is + installed there's no "Load BootMii (IOS)" anymore in Exit-Prompt +- ensure 'Launch Priiloader' is only shown if Priiloader + is really installed (in some cases it could appear even + if Priiloader hasn't been installed) +- fixed a bug that caused black-screen then returning into + HBF from app loaded with +- build separate vWii-version using FIX94s NAND-Loader (still using + modified Waninkoko NAND-Loader on real Wii) +- build using libruntimeiospatch 1.3 +- vWii version does NOT YET disable functions not applicable von vWii