From bfc5103044295d613c042cb4e7c078669f6acbc5 Mon Sep 17 00:00:00 2001 From: yellows8 Date: Sun, 14 Feb 2016 18:45:39 -0500 Subject: [PATCH] Updated for latest ctrulib. Switched to using the 'Homebrew' logo included with makerom(same final logo-data which was previously used by this app). Inverted the handling for the Y button, saving the payload to SD is now the default. Updated the version. Updated the README for gfx credits, etc. --- Makefile | 4 ++-- README.md | 5 +++-- Resources/hblauncher_loader.rsf | 2 +- source/hblauncher_loader.c | 12 ++++++------ 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index c21a78d..3219dbe 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ SOURCES := source DATA := data INCLUDES := include -VERSION := v1.0 +VERSION := v1.1 APP_TITLE := hblauncher_loader $(VERSION) APP_DESCRIPTION := This boots the hblauncher-payload. @@ -161,7 +161,7 @@ $(OUTPUT).elf : $(OFILES) @bannertool makebanner -i "$<" -ca ../Resources/hblauncher_loader.cwav -o "$@" $(OUTPUT).cia : $(OUTPUT).elf ../Resources/hblauncher_loader.icn ../Resources/hblauncher_loader.bnr - @makerom -f cia -o "$@" -elf $(OUTPUT).elf -rsf ../Resources/hblauncher_loader.rsf -icon ../Resources/hblauncher_loader.icn -banner ../Resources/hblauncher_loader.bnr -exefslogo -logo ../Resources/hblauncher_loader_logo-padded.lz11 + @makerom -f cia -o "$@" -elf $(OUTPUT).elf -rsf ../Resources/hblauncher_loader.rsf -icon ../Resources/hblauncher_loader.icn -banner ../Resources/hblauncher_loader.bnr -exefslogo @echo "built ... hblauncher_loader.cia" #--------------------------------------------------------------------------------- diff --git a/README.md b/README.md index fed5636..84d456a 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,13 @@ This is a 3DS homebrew application intended for running under a NCCH(which can b This app was mostly finished in October 2015, this was finally released on November 25, 2015, due to the custom logo being finished. -This will first attempt to load the payload from SD, if that isn't successful it will then automatically download the payload for your system with HTTP. SD payload loading can be skipped if you hold down the X button. If you hold down the Y button, this will write the downloaded payload from HTTP to SD, if it actually downloaded it via HTTP. +This will first attempt to load the payload from SD, if that isn't successful it will then automatically download the payload for your system with HTTP. SD payload loading can be skipped if you hold down the X button. If you don't hold down the Y button, this will write the downloaded payload from HTTP to SD, if it actually downloaded it via HTTP. The exact filepath used for the SD payload depends on your system. Since this app can handle writing the payload here itself, writing the payload here manually isn't really needed. Example SD filepath with New3DS 10.1.0-27U: "/hblauncherloader_otherapp_payload_NEW-10-1-0-27-USA.bin". The Old3DS filepath for the same system-version and region as that example is the same, except that "OLD" is used instead of "NEW". -If you want to manually build this, you'll need a "Resources/hblauncher_loader_logo-padded.lz11" file, which should be the "prebuilt_homebrew_logo-padded.lz11" file from here: https://github.com/yellows8/ctr-logobuilder You'll also need this: https://github.com/Steveice10/bannertool +If you want to manually build this, you'll need this: https://github.com/Steveice10/bannertool Credits: * 3DSGuy for originally converting the CWAV used by this app's banner, years ago(which seems to be originally from the Wii HBC banner audio?). +* @Substance12 For the icon/banner(#4). diff --git a/Resources/hblauncher_loader.rsf b/Resources/hblauncher_loader.rsf index 9aeb11b..1e1184a 100644 --- a/Resources/hblauncher_loader.rsf +++ b/Resources/hblauncher_loader.rsf @@ -1,7 +1,7 @@ BasicInfo: Title : hbl-ldr ProductCode : HBL-LDR - Logo : Nintendo # Nintendo / Licensed / Distributed / iQue / iQueForSystem + Logo : Homebrew RomFs: # Specifies the root path of the read only file system to include in the ROM. diff --git a/source/hblauncher_loader.c b/source/hblauncher_loader.c index b846abd..03a536b 100644 --- a/source/hblauncher_loader.c +++ b/source/hblauncher_loader.c @@ -39,7 +39,7 @@ Result http_getactual_payloadurl(char *requrl, char *outurl, u32 outurl_maxsize) Result ret=0; httpcContext context; - ret = httpcOpenContext(&context, requrl, 1); + ret = httpcOpenContext(&context, HTTPC_METHOD_GET, requrl, 1); if(ret!=0)return ret; ret = httpcAddRequestHeaderField(&context, "User-Agent", "hblauncher_loader/"VERSION); @@ -70,7 +70,7 @@ Result http_download_payload(char *url, u32 *payloadsize) u32 contentsize=0; httpcContext context; - ret = httpcOpenContext(&context, url, 1); + ret = httpcOpenContext(&context, HTTPC_METHOD_GET, url, 1); if(ret!=0)return ret; ret = httpcAddRequestHeaderField(&context, "User-Agent", "hblauncher_loader/"VERSION); @@ -307,9 +307,9 @@ Result load_hblauncher() { hidScanInput(); - if(hidKeysHeld() & KEY_Y) + if(!(hidKeysHeld() & KEY_Y)) { - printf("Saving the downloaded payload to SD since the Y button is pressed...\n"); + printf("Saving the downloaded payload to SD since the Y button isn't pressed...\n"); ret = savesd_payload(payload_sdpath, payloadsize); if(ret!=0) @@ -323,7 +323,7 @@ Result load_hblauncher() } else { - printf("Skipping saving the downloaded payload to SD since the Y button isn't pressed.\n"); + printf("Skipping saving the downloaded payload to SD since the Y button is pressed.\n"); } } @@ -394,7 +394,7 @@ int main(int argc, char **argv) } } - ret = httpcInit(); + ret = httpcInit(0); if(ret!=0) { printf("Failed to initialize HTTPC: 0x%08x.\n", (unsigned int)ret);