From f0fd621ef68e7b621677c6d0f3ce82a1df80dd7e Mon Sep 17 00:00:00 2001 From: Christopher Roy Bratusek Date: Mon, 31 Dec 2012 18:37:27 +0100 Subject: [PATCH] prepare for vWii version (installer atm hangs after applying patches) --- HomebrewFilter.vWii/icon.png | Bin 0 -> 5157 bytes HomebrewFilter.vWii/meta.xml | 38 ++++++ Makefile | 43 +++++- boot/Makefile | 2 +- installer/Makefile | 2 +- installer/source/main.cpp | 8 +- installer/wad/0001000154484246.tmd | Bin 592 -> 592 bytes main/Makefile | 3 +- main/Makefile.vWii | 188 ++++++++++++++++++++++++++ main/source/Network/update.cpp | 15 ++ main/source/Prompts/prompt_update.cpp | 29 +++- main/source/main.cpp | 4 + revisions | 1 + revisions.vwii | 1 + updates | 8 +- updates.vwii | 17 +++ 16 files changed, 344 insertions(+), 15 deletions(-) create mode 100644 HomebrewFilter.vWii/icon.png create mode 100644 HomebrewFilter.vWii/meta.xml create mode 100644 main/Makefile.vWii create mode 100644 revisions.vwii create mode 100644 updates.vwii diff --git a/HomebrewFilter.vWii/icon.png b/HomebrewFilter.vWii/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..7cab780d06249829dc343bcbdfbcdd6ea0477267 GIT binary patch literal 5157 zcmV+=6x!>FP)Px#24YJ`L;wH)0002_L%V+f000SaNLh0L01m_e01m_fl`9S#000wtNkliwgr06-1<2y6NS;?zi4sRp0z^-+ldF_iG3yG@$*RQ|H}R zw_a`EuYUD?UsX5IE1zkhPx}B@%wEC%^Ry+?s8{8MVgbO*-+Gy)B_S+ece$03a;kC0le~Fl3#O z0}Pf0KLZ=x-w6N^K$1YB`^#EW8?cCVjTlOC3#>oI1R>_9s>y6tQzjE0Vmo;UL##73MmMslchRz`2 zjcMF}jH4BER-9Bexa>EfKB2Sx{EopwWn!5R+UnbGxb)FW*KhjardAn}l>pGVwQ<6< zN2hH7fLFfz%8yG2mtN0?)6t#LIa42*`ZNHnoVW76$iT>Vj50_xBwo1erGaeLmmkw~+yn2?f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TA+D*Z z!IJ7~To?)=0s!}(-E+M1z_15`ZpIx&M55E$?i}!@ymwrrECFyt%6;Mdm$p7y+SI<` zxB$Q>S*c0^`G=L=0l-%i5#Zk=>Dw2N_3eu<`G%&ybr1nW2vk<$Jln=nWN$AI8iXYS z24K3BJuZ!re& z*+mG1TU+r;JdXcKr}6X~-=^5180u&X5sfk0+z6mNYvB2pl2?N;cagJb$I)#6gzy5C z>Pq>=wgA80?zRA}k=nl>b((Ml5Z6#x-te&PjG-4&3q9LbGry z0I?X0Gdd_@@8PPmWXE&p%cn<;7UseXORJV + + 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 1b859bedc60550ab9dfacf5216704687427fc3f8..88b760118318167a8c3fc3a0516705f3ace5a6c3 100644 GIT binary patch delta 33 pcmcb>a)D)oIFl$tvV@IdevkitPPC") +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