Homebrew [Release] Homebrew Emergency Launcher

m45t3r

Well-Known Member
Member
Joined
Jul 17, 2007
Messages
243
Trophies
0
Website
Visit site
XP
422
Country
Brazil
Small contribution, the attached Makefile should make things easier to compile.

What I changed? In line 52 (LIBS) there was tons of defined libraries (freetype, libpng, etc) that wasn't used at all. Removed all of them, only left libctru.
 

Attachments

  • Makefile.zip
    1.8 KB · Views: 203
  • Like
Reactions: VegaRoXas

mashers

Stubborn ape
OP
Member
Joined
Jun 10, 2015
Messages
3,837
Trophies
0
Age
40
Location
Kongo Jungle
XP
5,074
Country
Small contribution, the attached Makefile should make things easier to compile.

What I changed? In line 52 (LIBS) there was tons of defined libraries (freetype, libpng, etc) that wasn't used at all. Removed all of them, only left libctru.
Thanks buddy! I'll merge it into the original archive. I forgot to adjust the makefile when I adapted this from the grid launcher.
 

m45t3r

Well-Known Member
Member
Joined
Jul 17, 2007
Messages
243
Trophies
0
Website
Visit site
XP
422
Country
Brazil
Well, being a developer myself (not of 3DS, more of general systems) I didn't resist the desire to clean up the code. So I removed tons of unnecessary code (mainly comming from HBL itself, like the tinyxml2 and scanner.c files) that reduced the resulting binary by a good margin (from ~330KB to ~110KB).

There are still some things that maybe can be removed too, however I didn't bother much because the main causes of the big binary size is tinyxml2 and scanner.c files. This leaves some stub files (like scanner.h) because I didn't try to substitute them. Anyway, it seems to work.

You can download the new binary from GitHub (https://github.com/m45t3r/HBL-Emergency/releases/tag/v0.1) and the source code from there too (https://github.com/m45t3r/HBL-Emergency).
 
Last edited by m45t3r,
  • Like
Reactions: klear and fmkid

mashers

Stubborn ape
OP
Member
Joined
Jun 10, 2015
Messages
3,837
Trophies
0
Age
40
Location
Kongo Jungle
XP
5,074
Country
Well, being a developer myself (not of 3DS, more of general systems) I didn't resist the desire to clean up the code. So I removed tons of unnecessary code (mainly comming from HBL itself, like the tinyxml2 and scanner.c files) that reduced the resulting binary by a good margin (from ~330KB to ~110KB).

There are still some things that maybe can be removed too, however I didn't bother much because the main causes of the big binary size is tinyxml2 and scanner.c files. This leaves some stub files (like scanner.h) because I didn't try to substitute them. Anyway, it seems to work.

You can download the new binary from GitHub (https://github.com/m45t3r/HBL-Emergency/releases/tag/v0.1) and the source code from there too (https://github.com/m45t3r/HBL-Emergency).
Wow, thanks! I left tinyxml in because it seemed to be used for extracting some information from the binary for booting it, so I'm impressed you managed to remove it!

I'll edit the original post to point to your update instead. Thanks for crediting me on the github page by the way :)
 

fmkid

Just another GBATemp's random guy
Member
Joined
Apr 23, 2015
Messages
1,911
Trophies
0
XP
1,424
Country
Colombia
@mashers or @m45t3r: What about now if you add an external file on SD that allows personal configuration of this emergency HBL? (like CTRBootManager)

Edit: Options may include personalize buttons to some specific HBL and/or allow other paths for HBL files (in change of root)...
 
Last edited by fmkid,

m45t3r

Well-Known Member
Member
Joined
Jul 17, 2007
Messages
243
Trophies
0
Website
Visit site
XP
422
Country
Brazil
Wow, thanks! I left tinyxml in because it seemed to be used for extracting some information from the binary for booting it, so I'm impressed you managed to remove it!

I'll edit the original post to point to your update instead. Thanks for crediting me on the github page by the way :)

Well, the only thing the tinyxml2 was used seems to be to get some information to show in the HomeBrew Launcher menu (that of course this homebrew does not have).

@mashers or @m45t3r: What about now if you add an external file on SD that allows personal configuration of this emergency HBL? (like CTRBootManager)

Edit: Options may include personalize buttons to some specific HBL and/or allow other paths for HBL files (in change of root)...

Shouldn't be difficult, however now that CTRBootManager have a new release (v0.6) that finally seems to be reliable to boot CFW I kinda lost interest in this project.

Anyway, if you setup the devkitPro (it isn't difficult) you can change the code and compile it easily.
 

m45t3r

Well-Known Member
Member
Joined
Jul 17, 2007
Messages
243
Trophies
0
Website
Visit site
XP
422
Country
Brazil
Well, made a second release: https://github.com/m45t3r/HBL-Emergency/releases/tag/v0.2

However, unless you're a developer this shouldn't be very much exciting. I reduced only 600 Bytes in binary size in this release. However, the source code is much better, I removed almost all useless headers and code, so it should be much better to understand what is happening now.

Like I said before, kinda lost of interest in this homebrew since CTRBootManager is working much better in the lastest release (v0.6). So I am not interested in including a config file. But, if someone wants to do it, it shouldn't be difficult. Anyone with some experience in C can do it in one afternoon.
 
Last edited by m45t3r,

m45t3r

Well-Known Member
Member
Joined
Jul 17, 2007
Messages
243
Trophies
0
Website
Visit site
XP
422
Country
Brazil
So CTRBootManager is not as stable as it seemed first, and it still has problems with homebrews that use internet access for example. Since HBL-emergency is based on HBL itself, it seems to works much better in both this cases.

I may implement the configuration files that @fmkid requested, I am still thinking what would be the best way to do it. Looked at the source code of jsmn (the tinniest json parser for C), still seemed to be too big for the purposes of this homebrew. Creating my own parser would probably be very simple (and very shit and buggy, because I would only implement the minimum possible to make it work), so I am still looking for something ready to use and small. Maybe INIH?

For now, I removed some initialization code that didn't seem necessary, boring stuff. But, one change may be exciting for some people (at least for me): boot delays! Yaaay....yyy?

Ok, why the hell would I like a delay during boot? Because with HomeMenuHax this makes booting emuNAND's CFW much more reliable. Using my own compile of lastest CakeBrah and rxTools, I now get 100% boot rate instead of 50% that I had before.

Sure, this is a ugly hack and I think this probably should be moved to CakeBrah itself, since I think this is a timming problem with something. However, this works. So if you have problems when booting CFW, you may try to use this homebrew even if you don't need the emergency boot feature. It may help you somewhat.

Since I want to implement configuration files before doing a new release, I will leave the new build here. If you don't have any issues while booting CFW, I recommend you to use the older version: it will be faster. When I implement configuration files this delay will probably be configurable too, nowadays it is just a fixed value, so for homebrew and stuff that does not seem to be affect by coldbooting you may just set the delay 0 as well.

Attached is my own build of CakeBrah's Loader for rxTools. You can use it with Homebrew Launcher or directly as boot.3dsx or boot_1.3dsx/boot_2.3dsx. Like I said above, this seems much more reliable if you use HBL-emergency to boot it, thanks to the new boot delay.
 

Attachments

  • HBL-Emergency.3dsx.zip
    46.3 KB · Views: 200
  • rxTools.zip
    137.9 KB · Views: 194
  • Like
Reactions: klear and fmkid

Xenosaiga

Time to switch it up
Member
Joined
Oct 9, 2015
Messages
1,501
Trophies
0
Age
33
Location
The Shadows
XP
1,070
Country
United States
How about using this to dual boot home brew launchers?

By that I mean use it for if you like two different launchers for different things.

Normal launch is your regular Homebrew launcher and the 'emergency' launcher is your secondary use launcher.

This seems like it could be used in a prank even. Have it setup to boot fake brick for a quick prank.

Could this be used by themehax too? Use left shoulder to launch one thing and the right shoulder to launch something else?
 

m45t3r

Well-Known Member
Member
Joined
Jul 17, 2007
Messages
243
Trophies
0
Website
Visit site
XP
422
Country
Brazil
Preview release, now with support for config files as requested by @fmkid.

I have to say, I am impressed with inih. Including them on my source and it only added ~20KB to the final binary.

See the example boot_config.ini for how to configure this homebrew. I changed the filenames again, so now it is something like this by default:

boot_1.3dsx -> boot_default.3dsx
boot_2.3dsx -> boot_1.3dsx

It can even works without the boot_config.ini file, for those who only want the CFW delay feature. In this case, it only supports the boot_default.3dsx file, though.

Please test it and report anything, so I can make a release later sure that I didn't add no new bugs to it. I would like reports of people trying to run CFWs in coldboot (using themehax) and having problems with booting too. This would be a valuable feedback.

How about using this to dual boot home brew launchers?

By that I mean use it for if you like two different launchers for different things.

Normal launch is your regular Homebrew launcher and the 'emergency' launcher is your secondary use launcher.

This seems like it could be used in a prank even. Have it setup to boot fake brick for a quick prank.

Could this be used by themehax too? Use left shoulder to launch one thing and the right shoulder to launch something else?

I use it to launch rxTools's emuNAND by default with themehax, and configure it to launch Homebrew Launcher when I press R.

In this new version this is basically a stripped down, and very fast version of Homebrew Launcher. It can launch pretty much anything that runs with Ninjhax 2.x (it should works with 1.x too, however I didn't test it).

Edit: new version, changed delay to microseconds instead of nanoseconds (ns is too fast to be useful), fixed the calculation and set a new default to 100 ms (at least on my O3DS 9.2 it is working 100%, want reports specially from N3DS users).
 

Attachments

  • HBL-Emergency.zip
    52.8 KB · Views: 234
Last edited by m45t3r,
  • Like
Reactions: fmkid

night_hawk

Well-Known Member
Member
Joined
Dec 3, 2014
Messages
573
Trophies
0
XP
1,586
Country
Italy
Can we use the names and the paths we wish? For example:
[Default]
path: /3ds/ReiNand/ReiNand.3dsx

[KEY_SELECT]
path: /smea.3dsx

[KEY_R]
path: /3ds/Decrypt9/Decrypt9.3dsx

Or we need to strictly use boot_default, boot_1 and so and place them all in the root?
Thank you for your work
 
Last edited by night_hawk,
  • Like
Reactions: fmkid

m45t3r

Well-Known Member
Member
Joined
Jul 17, 2007
Messages
243
Trophies
0
Website
Visit site
XP
422
Country
Brazil
Can we use the names and the paths we wish? For example:
[Default]
path: /3ds/ReiNand/ReiNand.3dsx

[KEY_SELECT]
path: /smea.3dsx

[KEY_R]
path: /3ds/Decrypt9/Decrypt9.3dsx

Or we need to strictly use boot_default, boot_1 and so and place them all in the root?
Thank you for your work

Not tested, however I don't see why it shouldn't work.

And I think you really need to use "DEFAULT" in all caps, since this is how I did in the source code (however, changing this wouldn't be difficult, if this is a problem).

Edit: confirmed that arbitrary paths works. And you don't need to use all caps, it should be thanks to inih.
 
Last edited by m45t3r,

Agent Moose

Well-Known Member
Member
Joined
Dec 6, 2014
Messages
407
Trophies
0
Age
33
XP
552
Country
United States
So I know this really isn't a problem with this homebrew, but every time I try to load rxTools sysnand, it is in a boot loop, so to say because I have the themehax with no buttons.

So essentially:
1. Turn on 3DS to load theme hax
2. Loads rxTools sysnand
3.Due to loading sysnand, loads theme hax with no holding buttons, once again.

endless loop. Anyone know of anyway to fix this?
 

m45t3r

Well-Known Member
Member
Joined
Jul 17, 2007
Messages
243
Trophies
0
Website
Visit site
XP
422
Country
Brazil
So I know this really isn't a problem with this homebrew, but every time I try to load rxTools sysnand, it is in a boot loop, so to say because I have the themehax with no buttons.

So essentially:
1. Turn on 3DS to load theme hax
2. Loads rxTools sysnand
3.Due to loading sysnand, loads theme hax with no holding buttons, once again.

endless loop. Anyone know of anyway to fix this?
Before you select sysnand on rxTools, press and hold the button that cancels the loading of themehax (by default it is L) until sysNAND finishes to load.

What is happening is since you installed the autoboot version of themehax, it will load again when the sysNAND finishes to load. However, due to the patches that rxTools apply to sysNAND in rxMode, this mess up the themehax and you enter in a bootloop.

If you use sysNAND with frequency, it is probably more simple to use the non-autoboot version of themehax.
 
Last edited by m45t3r,

Xenosaiga

Time to switch it up
Member
Joined
Oct 9, 2015
Messages
1,501
Trophies
0
Age
33
Location
The Shadows
XP
1,070
Country
United States
Preview release, now with support for config files as requested by @fmkid.

I have to say, I am impressed with inih. Including them on my source and it only added ~20KB to the final binary.

See the example boot_config.ini for how to configure this homebrew. I changed the filenames again, so now it is something like this by default:

boot_1.3dsx -> boot_default.3dsx
boot_2.3dsx -> boot_1.3dsx

It can even works without the boot_config.ini file, for those who only want the CFW delay feature. In this case, it only supports the boot_default.3dsx file, though.

Please test it and report anything, so I can make a release later sure that I didn't add no new bugs to it. I would like reports of people trying to run CFWs in coldboot (using themehax) and having problems with booting too. This would be a valuable feedback.



I use it to launch rxTools's emuNAND by default with themehax, and configure it to launch Homebrew Launcher when I press R.

In this new version this is basically a stripped down, and very fast version of Homebrew Launcher. It can launch pretty much anything that runs with Ninjhax 2.x (it should works with 1.x too, however I didn't test it).

Edit: new version, changed delay to microseconds instead of nanoseconds (ns is too fast to be useful), fixed the calculation and set a new default to 100 ms (at least on my O3DS 9.2 it is working 100%, want reports specially from N3DS users).
The readme file is broken. At least it was for me.

It was called README.rd

I changed the file to .txt in order to read it
 

BlueOnClues

GBAtemp's Burgerpants
Banned
Joined
Sep 15, 2015
Messages
189
Trophies
0
Age
24
Location
MIG Restaurant
XP
42
Country
guys help vins is stalking me serious time with his alt its serious

--------------------- MERGED ---------------------------

is it a virus ? , how can you stop this virus :^(
 
  • Like
Reactions: Margen67

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    I @ idonthave: :)