Homebrew [Re-release] BootCtr - A simple boot manager for 3DS

Aurora Wright

Well-Known Member
Member
Joined
Aug 13, 2006
Messages
1,550
Trophies
3
XP
4,520
Country
Italy
Works on my n3ds EUR 9.2.0 (first boot to boot.3dsx, any return from homebrew to boot1.3dsx)
Make sure you are editing the correct menuhax payload, I first made the mistake to use the highest version I had on sdcard and realized it was the 10.3 payload.
Do you mean the payload in the root of the SD? In my case it's "ropbinpayload_menuhax_EUR12288_new3ds.bin", the only one I have (12288 is the 9.2 system menu according to 3dbrew). If I edit the first "boot.3dsx" string, it loads a different file (I have it set to load "boom.3dsx"; however, it also makes homebrew return to this file). Which system menu and menuhax version are you using? Also, are you using the official HBL or a fork?
 
Last edited by Aurora Wright,

suloku

Well-Known Member
Member
Joined
Apr 28, 2008
Messages
883
Trophies
1
XP
877
Country
Do you mean the payload in the root of the SD? In my case it's "ropbinpayload_menuhax_EUR12288_new3ds.bin", the only one I have (12288 is the 9.2 system menu according to 3dbrew). If I edit the first "boot.3dsx" string, it loads a different file (I have it set to load "boom.3dsx"; however, it also makes homebrew return to this file). Which system menu and menuhax version are you using? Also, are you using the official HBL or a fork?
I'm using the very same payload. I'm sending you
Also, I'm using official hbl, but works regardless.
 

Aurora Wright

Well-Known Member
Member
Joined
Aug 13, 2006
Messages
1,550
Trophies
3
XP
4,520
Country
Italy
@m45t3r Weirdly enough it doesn't work even with suloku's payload, but I've found out that if you press L+R+DOWN+B on CTRbootmanager it loads the HBL in the right way (return from HBs works).
 

m45t3r

Well-Known Member
OP
Member
Joined
Jul 17, 2007
Messages
243
Trophies
0
Website
Visit site
XP
422
Country
Brazil
@m45t3r Weirdly enough it doesn't work even with suloku's payload, but I've found out that if you press L+R+DOWN+B on CTRbootmanager it loads the HBL in the right way (return from HBs works).
Well, I don't know. Does it work with BootCtr v1.2.1 (if you want to compile yourself, just do a "$ git checkout v1.2.1", it already use the new ctrulib)? There are only two things that seems different the way CtrBootManager and BootCtr does things:
  1. The recent simplification of boot.c. If this is the case maybe going back to v1.2.1 will fix it. Maybe not (even in v1.2.1 I don't do that much black magic to run homebrews). One alternative that I am thinking is to simple drop my custom modified Homebrew Launcher code and start using upstream as a submodule (I don't really like th CtrBootManager approach of using an embedded fork).
  2. Remember the fix that you said from v1.2 (that resulted in v1.2.1)? Well, CtrBootManager calls the same function, and seems to work for you. It initialize services in __appInit and __appExit too, I tried this approach yesterday (seemed the logical thing to do), however it did not work. I may try to investigate this further.
However, I don't really thing that any of the above are the problem, and it seems to work for other people too so I don't know.
 

Aurora Wright

Well-Known Member
Member
Joined
Aug 13, 2006
Messages
1,550
Trophies
3
XP
4,520
Country
Italy
Well, I don't know. Does it work with BootCtr v1.2.1 (if you want to compile yourself, just do a "$ git checkout v1.2.1", it already use the new ctrulib)? There are only two things that seems different the way CtrBootManager and BootCtr does things:
  1. The recent simplification of boot.c. If this is the case maybe going back to v1.2.1 will fix it. Maybe not (even in v1.2.1 I don't do that much black magic to run homebrews). One alternative that I am thinking is to simple drop my custom modified Homebrew Launcher code and start using upstream as a submodule (I don't really like th CtrBootManager approach of using an embedded fork).
  2. Remember the fix that you said from v1.2 (that resulted in v1.2.1)? Well, CtrBootManager calls the same function, and seems to work for you. It initialize services in __appInit and __appExit too, I tried this approach yesterday (seemed the logical thing to do), however it did not work. I may try to investigate this further.
However, I don't really thing that any of the above are the problem, and it seems to work for other people too so I don't know.
It seems I was off-track, as the button combination is in the ROP "bootloader" that runs in the background: https://github.com/smealum/ninjhax2.x/commit/9fe957212f80b7bdfcd50477d816acb3aa7ac49f . So it seems (from what I remember from the talk in december) that *hax copies two bootloaders somewhere in memory, one that gets executed with that button combo, and one that is used for normal boot (and for returns, on my setup... it seems that on suloku's console, the other bootloader gets used for returns instead). I don't think there's a way to explicitly use it from an homebrew. The regular bootloader can get called with
Code:
void (*app_runmenu)() = (void*)(0x00100000 + 4);
        app_runmenu();
(taken from https://github.com/smealum/ninjhax2.x/blob/master/app_code/source/main.c )
I've replaced the BootApp function with this to test, and it reloads BootCtr.

Well, I guess I can use this reboot feature of *hax to properly exit homebrew, for those times I need it.
 
Last edited by Aurora Wright,
  • Like
Reactions: kiwiis and peteruk

m45t3r

Well-Known Member
OP
Member
Joined
Jul 17, 2007
Messages
243
Trophies
0
Website
Visit site
XP
422
Country
Brazil
New release: v1.4

This brings two new options: cfw_fix and debug. cfw_fix turns on/off the fix for boot rate in rxTools. The default is on, and I recommend using it unless you're having issues while booting, since I discover that cfw_fix fix other things too (like the garbage screen that you get while booting HBL with BootCtr).

debug just print the entry to your 3DS screen, waiting until the user press Start button. Useful for debugging, not practical to use everyday.
 

Michierusama

Well-Known Member
Member
Joined
May 13, 2014
Messages
583
Trophies
0
Location
GBAtemp
XP
361
Country
United States
Way to go! I replaced CtrBootManager with this program and the 1.4version you released. Excellent job. No more pressing A anymore[emoji14]also I tried to autoboot 15 times and they were all successful boots in my testing.
 
Last edited by Michierusama,

ronildo66

Well-Known Member
Newcomer
Joined
Dec 9, 2014
Messages
53
Trophies
0
Age
29
XP
138
Country
Brazil
New release: v1.4

This brings two new options: cfw_fix and debug. cfw_fix turns on/off the fix for boot rate in rxTools. The default is on, and I recommend using it unless you're having issues while booting, since I discover that cfw_fix fix other things too (like the garbage screen that you get while booting HBL with BootCtr).

debug just print the entry to your 3DS screen, waiting until the user press Start button. Useful for debugging, not practical to use everyday.

I think his example in config.ini boot is wrong! These are the recommended settings for the rxTools?

; [KEY_START]
; path = /rxTools/sys/code.bin
; payload = 1
; offset = 0x12000
; cfw_fix = 0
; debug = 1
 

m45t3r

Well-Known Member
OP
Member
Joined
Jul 17, 2007
Messages
243
Trophies
0
Website
Visit site
XP
422
Country
Brazil
I think his example in config.ini boot is wrong! These are the recommended settings for the rxTools?

; [KEY_START]
; path = /rxTools/sys/code.bin
; payload = 1
; offset = 0x12000
; cfw_fix = 0
; debug = 1

I never said this is an example config. Is just an example.

The example configuration is above, and it is completely simple. Just set path.
 
  • Like
Reactions: ronildo66

ronildo66

Well-Known Member
Newcomer
Joined
Dec 9, 2014
Messages
53
Trophies
0
Age
29
XP
138
Country
Brazil
or this recommend for rxTools?

;[DEFAULT]
;path = /boot_default.3dsx
;delay = 1500
;offset = 0x12000
;payload = -1
;cfw_fix = 1
;debug = 0
 

m45t3r

Well-Known Member
OP
Member
Joined
Jul 17, 2007
Messages
243
Trophies
0
Website
Visit site
XP
422
Country
Brazil
Since there is so much confusion between which option to set, I rewrote (again) the boot_config.ini file: https://raw.githubusercontent.com/m45t3r/BootCtr/master/boot_config.ini

Need some user(s) to read it and see if it is easier to understand now. In the general case, you should only set path. This should be clear now.

I appreciate any feedback to make everything clear to everyone.
 
Joined
Feb 15, 2015
Messages
1,464
Trophies
0
XP
1,099
Country
United States
It's understandable.

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

By the way, on the DPAD thing, here's my boot_config.ini:

;Comments starts with ";" or "#", so you need to remove it first to the
;line actually do something.

;[DEFAULT] is the option that is used if you don't press anything.
;This section is actually special, since what is defined in here will be
;the default for any other section (except for "payload" option, that is
;only valid per section).
;The options below are the defaults used internally in the application
;if you don't override them first. So even if you don't set those options
;(or if you forget to include this file in the root of your SD card), the
;options below are used.
;[DEFAULT]
;path = /boot_default.3dsx
;delay = 1500
;offset = 0x12000
;payload = -1
;cfw_fix = 1
;debug = 0

;Each key can be defined using a section, like the example below. Section
;names may have arbitrary caps. Valid keys (both O3DS and N3DS):
;KEY_A, KEY_B, KEY_SELECT, KEY_START, KEY_UP, KEY_DOWN, KEY_LEFT, KEY_RIGHT,
;KEY_R, KEY_L.
;Valid keys (N3DS only):
;KEY_ZL, KEY_ZR, KEY_CSTICK_RIGHT, KEY_CSTICK_LEFT, KEY_CSTICK_UP,
;KEY_CSTICK_DOWN.
;Directional keys (like KEY_UP) counts to both D-pad and circle pad.
;[key_L]
;path = /boot_something.3dsx

;The only option you need to set in the majority of the cases is 'path'.
;You may pass a .3dsx file or a .dat/.bin payload, the file type is detect
;automatically based on extension. Double check the path, since it must be
;correct (including caps).
;All the other ones are COMPLETELY OPTIONAL, since BootCtr uses SANE defaults
;when the option is not provided. So unless you know what you're doing, use
;the model below for the rest of the entries and ignore the rest of this
;file.
;[KEY_R]
;path = /boot_1.3dsx

;Now I will start explaining the advanced options, starting with delay. Delay
;is a number of microseconds to delay the application boot.
;Why this is important? It may improve the booting of some homebrews and CFWs.
;For example, O3DS autobooting with themehax, using either rxTools or
;CakesFW with Brahma2 loaders will have increased boot rate chance with 100
;ms of delay. For Homebrew Launcher (and other homebrews) the delay may be
;set to 0, unless your homebrew needs network connection during boot (such as
;FTBrony 1.x). In this case you may increase the delay (for example to 5000,
;or 5 seconds) to makes sure that you have a valid network connection.
;By default delay is set to 1500 (1.5s). This is a value that seems to work
;well with CFWs, without delaying the boot of homebrews by too much. You
;should not set a delay, unless you're having difficult to boot something
;(i.e. FTBrony 1.x).
;[KEY_A]
;path = /boot_hbl.3dsx
;delay = 0
;[KEY_B]
;path = /3ds/ftbrony/ftbrony.3dsx
;delay = 5000

;Instead of loading .3dsx files, you can use ARM9 payloads like rxTools'
;code.bin or CakesFW's Cakes.dat. By default it will try to detect if the
;file is a payload by checking the extension (.bin or .dat), however you can
;force by passing "payload = 1" (passing "payload = 0" forces homebrew mode,
;while "payload = -1" forces autodetect).
;You may need to change the default payload offset depending of the binary
;you're loading. Offset of 0x12000 is the default for RxTools/CakesFW.
;Don't worry about setting offset option in .3dsx files, it is ignored.
;Another option for CFW users is "cfw_fix". It is on by default, since this
;helps boot rate of rxTools (and maybe other CFWs) and fixes garbage screen
;when booting HBL. However it may affect boot rate of other CFWs, and may be
;disabled passing "cfw_fix = 0".
;The last option is "debug". This will print the current entry in your 3DS
;screen before booting. Not really useful, however this may help you
;investigate what is happening in case of issues.
;[KEY_START]
;path = /rxTools/sys/code.bin
;payload = 1
;offset = 0x12000
;cfw_fix = 0
;debug = 1

[DEFAULT]
path = /rxTools/sys/code.bin
delay = 100
payload = 1
offset = 0x12000
cfw_fix = 0
debug = 1

[KEY_SELECT]
path = /cbmt.3dsx
payload = -1
delay = 0
cfw_fix = 0
debug = 1

[KEY_R]
path = /Cakes.dat
delay = 100
payload = 1
offset = 0x12000
cfw_fix = 0
debug = 1

[KEY_X]
path = /ctrbootmanager/boot_grid.3dsx
delay = 0
payload = 0
cfw_fix = 0
debug = 1

[KEY_B]
path = /ctrbootmanager/boot_hb.3dsx
delay = 0
payload = 0
cfw_fix = 0
debug = 1

[KEY_Y]
path = /gridlauncher/folders/CFW/miniPasta/miniPasta.3dsx
delay = 100
cfw_fix = 0
debug = 1

[KEY_A]
path = /gridlauncher/folders/CFW/ahpcfw/ahpcfw.3dsx
delay = 0
cfw_fix = 0
debug = 1

[KEY_UP]
path = /gridlauncher/folders/CFW/Decrypt9WIP/Decrypt9WIP.3dsx
delay = 0
cfw_fix = 0
debug = 1

[KEY_DOWN]
path = /gridlauncher/folders/CFW/EmuNAND9/EmuNAND9.3dsx
delay = 0
cfw_fix = 0
debug = 1

[KEY_LEFT]
path = /gridlauncher/folders/CFW/ReiNand/ReiNand.3dsx
delay = 0
cfw_fix = 0
debug = 1

[KEY_RIGHT]
path = /gridlauncher/folders/Tools/CTRXplorer/CTRXplorer.3dsx
delay = 0
cfw_fix = 0
debug = 1
 

noctis90210

Well-Known Member
Member
Joined
Dec 24, 2013
Messages
969
Trophies
0
Age
37
XP
1,635
Country
just want to clarify something about payload, is these correct?
payload = 1 (bypass/ignore checking payload)
payload = 0 (forces homebrew mode)
payload = -1 (forces autodetect)
 

ronildo66

Well-Known Member
Newcomer
Joined
Dec 9, 2014
Messages
53
Trophies
0
Age
29
XP
138
Country
Brazil
Since there is so much confusion between which option to set, I rewrote (again) the boot_config.ini file: https://raw.githubusercontent.com/m45t3r/BootCtr/master/boot_config.ini

Need some user(s) to read it and see if it is easier to understand now. In the general case, you should only set path. This should be clear now.

I appreciate any feedback to make everything clear to everyone.

For me it was perfect!

So is this, if I only put the path, the settings will be automatically set to the best setting without the need to configure the delay, offset, payload, cfw_fix and debug?

For example, this is my setup:

[DEFAULT]
path = /rxTools/sys/code.bin

[KEY_L]
path = /bootHBL.3dsx

(Type 2; KEY_R defined in Homebrew Launcher for boot in Sysnand)
 

m45t3r

Well-Known Member
OP
Member
Joined
Jul 17, 2007
Messages
243
Trophies
0
Website
Visit site
XP
422
Country
Brazil
just want to clarify something about payload, is these correct?
payload = 1 (bypass/ignore checking payload)
payload = 0 (forces homebrew mode)
payload = -1 (forces autodetect)
payload = 1 forces payload boot, the rest is correct.

For me it was perfect!

So is this, if I only put the path, the settings will be automatically set to the best setting without the need to configure the delay, offset, payload, cfw_fix and debug?

For example, this is my setup:

[DEFAULT]
path = /rxTools/sys/code.bin

[KEY_L]
path = /bootHBL.3dsx

(Type 2; KEY_R defined in Homebrew Launcher for boot in Sysnand)
Yeah, exactly.

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

DPAD detection seems to be broken..

Fix in the attachment. You will have to change KEY_UP to KEY_DUP, etc, since I changed the internal mappings.

You can set separate sections to Circle Pad now too.
 

Attachments

  • BootCtr-v1.4-4-gebe7dab.zip
    160.2 KB · Views: 92
Joined
Feb 15, 2015
Messages
1,464
Trophies
0
XP
1,099
Country
United States
payload = 1 forces payload boot, the rest is correct.


Yeah, exactly.

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



Fix in the attachment. You will have to change KEY_UP to KEY_DUP, etc, since I changed the internal mappings.

You can set separate sections to Circle Pad now too.
I tested already. It's still broken.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: https://youtube.com/shorts/FdYTKAVSsXY?si=9E-2AU0JN-4hRZi3