Skip to content
This repository has been archived by the owner on Dec 15, 2020. It is now read-only.

Commit

Permalink
Updated for latest ctrulib. Switched to using the 'Homebrew' logo inc…
Browse files Browse the repository at this point in the history
…luded 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.
  • Loading branch information
yellows8 committed Feb 14, 2016
1 parent 1718d6e commit bfc5103
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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"

#---------------------------------------------------------------------------------
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

2 changes: 1 addition & 1 deletion Resources/hblauncher_loader.rsf
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
12 changes: 6 additions & 6 deletions source/hblauncher_loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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)
Expand All @@ -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");
}
}

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit bfc5103

Please sign in to comment.