[Release] Easily load payloads in HB Launcher via Brahma 2 mod

Discussion in '3DS - Homebrew Development and Emulators' started by d0k3, Nov 12, 2015.

  1. d0k3
    OP

    d0k3 3DS Homebrew Legend

    Member
    2,670
    2,675
    Dec 3, 2004
    Gambia, The
    While the HB launcher (original and @mashers mod) is a pretty capable tool by now, there is one thing it can't do without additional help: loading ARM9 payloads. ARM9 payloads - for those that don't know - are binary executables designed to run on the ARM9 core of your 3DS console. It is the standard format of CFWs (PastaCFW, ReiNAND, rxTools, CakesFW) and certain software, such as Decrypt9. The HB launcher can't load these payloads, so there are workarounds like my Brahma2Loader. However, it would be much better if users could create their own payload shortcuts and use them directly, same as it is done in CTR Boot Manager and BootCTR now.

    Introducing my Brahma2Loader with XML support, designed to make it easy and even fun for anyone to add his own customized ARM9 payload shortcuts directly to the menu. All you need is a O3DS / N3DS on or below 9.2, plus a little time to read and understand the very short readme below.
    HTML:
    XML loader example for use with Brahma2Loader / *hax 2.5+
    =========================================================
    
    Introduced with *hax 2.5, the HB launcher can now use XML files to
    load .3DSX binaries with start parameters. This folder contains one
    sample XML folder (for autoloading the ReiNAND CFW via Brahma2Loader)
    and another folder containing a Microsoft Windows batch script to
    easily generate SMDH icon/description files yourself.
    
    If you just want to try it :
    - Make sure your *hax is up to date, see here: http://smealum.github.io/3ds/
    - Have BrahmaLoader ("BrahmaLoader.3dsx"/".smdh") installed in /3DS/BrahmaLoader/
    - Copy "reinand.xml" and "reinand.smdh" to /3DS/
    - Also make sure you have the ReiNAND CFW installed ("reiNand.dat" in root)
    - You have a new entry in your HB launcher, use it to boot ReiNAND via Brahma
    
    If you want to make your own:
    - Open reinand.xml in a text editor of your choice
    - In <args>, put "[PAYLOAD_PATH] [OFFSET_HEX] [MAX_SIZE_HEX] [VOODOO]"
      note (1): A maximum size of zero means that max size should not be checked
      note (2): [VOODOO] is a hex value between 00 and 1F that might help increase
      boot success rates, possibly good values are 00, 03, 08, 0B, 0C and 0F
      note (3): [MAX_SIZE_HEX], [OFFSET_HEX] and [VOODOO] are optional, just
      "/Decrypt9.bin" would be valid as well (this would load from offset 0)
    - If you want a custom icon, put the path to your SMDH into <icon>
    - You may put the Brahma2Loader somewhere else, just change <executable>
    - It is highy recommended to rename reinand.xml to something more fitting
    
    Creating SMDHs? It's easy... (Windows only)
    - Check out the folder called "zzz_create_smdh"
    - Here, replace the icon.png with a 48x48 icon of your choice
    - Open the file called "create_smdh.bat" in a text editor of your choice
    - Here, replace the names/descriptions/paths as you see fit, then save
    - Run "create_smdh.bat" via a double click in Windows Explorer
    
    Credits:
    - To smealum for making all this possible
    - To patois who originally created Brahma
    - To SteveIce10 and delebile who ported it to *hax 2.x as Brahma 2
    - To archshift (and originally Normmatt) who provided the project
      infrastructure along with Decrypt9/bootstrap that this project is based on.
    - 3DBrew
    
    
    You may download and participate in the source code on GitHub:
    Just pay me a visit at https://github.com/d0k3/BrahmaLoader

    Why use this when my CFW / other software already comes with a 3DSX loader?
    It goes without saying that more options are always better. The loader your software comes with, are you sure this is up to date? Does it work with *hax 2.5? And how often are there failures? What if the 3DSX loader of your software stops working with a newer *hax version and the original dev has no interest in further developing it? Using this method, you can be sure to have the most recent version of Brahma 2 loading your ARM9 payload. This even includes the autobootfix by @cpasjuste to hopefully further increase the boot rate and reduce failures. Also, keep in mind this gives you freedom. You can add anything, name it anything and use the icons you prefer, all with very little work and no actual programers knowledge involved from your side.

    I won't do any more XML shortcuts myself. The ReiNAND one is fully working, but also only meant as an example. If you should make more XML shortcuts / SMDH files for popular software / CFWs (Decrypt9 / rxTools / CakesFW / ReiNAND / ...), you may post them here and help out the particularily lazy among us, though.
     

    Attached Files:

    Last edited by d0k3, Nov 24, 2015
  2. peteruk

    peteruk GBAtemp Advanced Maniac

    Member
    1,539
    722
    Jun 26, 2015
    Awesome release thank you for sharing this, i will have a play later


    Do you think this type of development could lead (in the future) to loading of HBL via MSET ? I know someone will probably shout at me for asking this but i would really like to know
     
  3. d0k3
    OP

    d0k3 3DS Homebrew Legend

    Member
    2,670
    2,675
    Dec 3, 2004
    Gambia, The
    Who will shout at you? :D Well, this has nothing to do with MSET, and HBL doesn't operate on ARM9 either. To be pretty honest i also have very little idea about what MSET is capable of (other than loading ARM9 payloads).
     
    peteruk likes this.
  4. peteruk

    peteruk GBAtemp Advanced Maniac

    Member
    1,539
    722
    Jun 26, 2015
    thanks for answering @d0k3

    you are always very helpful and i appreciate you answering me, i didn't think you would shout at me, but sometimes some people do if the question is considered off-topic or been asked before

    please keep up the great work with your releases
     
    Sev501 and Ammako like this.
  5. MassExplosion213

    MassExplosion213 .

    Member
    1,438
    960
    Feb 15, 2015
    United States
    Attachment not found?
     
  6. d0k3
    OP

    d0k3 3DS Homebrew Legend

    Member
    2,670
    2,675
    Dec 3, 2004
    Gambia, The
    Just replaced it with a last minute fix :). Just download it again!
     
    peteruk likes this.
  7. DarkRioru

    DarkRioru Dream Beeeeeaaaammmm!!!

    Member
    2,012
    426
    Aug 29, 2015
    United States
    looking up at the stars
    does this work on <9.9

    — Posts automatically merged - Please don't double post! —

    <9.2
     
  8. Dean_

    Dean_ GBAtemp Advanced Fan

    Member
    651
    374
    Sep 11, 2014
    d0k3 likes this.
  9. d0k3
    OP

    d0k3 3DS Homebrew Legend

    Member
    2,670
    2,675
    Dec 3, 2004
    Gambia, The
    it works on anything <= 9.2 which is also capable of running Ninjhax 2.5 (although you can use another access point, no problem). Brahma 2 should even be able to run on older *hax and FWs as low as 4.x, however only newer HB Launchers allow start parameters (which are required for shortcuts).
     
    Last edited by d0k3, Nov 12, 2015
  10. DarkRioru

    DarkRioru Dream Beeeeeaaaammmm!!!

    Member
    2,012
    426
    Aug 29, 2015
    United States
    looking up at the stars
    where do I find the renand.dat file???
     
  11. d0k3
    OP

    d0k3 3DS Homebrew Legend

    Member
    2,670
    2,675
    Dec 3, 2004
    Gambia, The
    If you have ReiNAND CFW installed, you already have it. Otherwise, a simple Google search for @Reisyukaku pastebin is your friend. Only works on N3DS (ReiNAND CFW, that is, Brahma 2 works fine on O3DS). ReiNAND CFW can't be posted here, so I won't say anymore ;).

    EDIT: I'll help you out even more... interested in the correct payloads / offsets for rxTools / CakesFW / PastaCFW? Check out this CTR Boot Manager boot.cfg originally made by @zoogie:
    Code:
    // Boot menu configuration
    boot_config =
    {
        // Default timeout in secondes
        timeout = 3;
    
        // Default boot entry
        default = 0;
    
        // Boot menu entries (16 max)
        entries =
        (
            {
                title  = "rxTools";
                path = "/rxTools/sys/code.bin";
                offset = "0x12000";
            },
            {
                title  = "CakeCFW";
                path = "/Cakes.dat";
                offset = "0x12000";
            },
            {
                title  = "PastaCFW";
                path = "/3ds/PastaCFW/loader.bin";
            },
            {
                title  = "Homebrew Menu";
                path = "/boot_hb.3dsx";
            }
        );
    };
    Size zero, btw, works for each and every one of them. In fact specifying size should never be required.
     
    Last edited by d0k3, Nov 12, 2015
  12. Februarysn0w

    Februarysn0w School Idol Festival

    Member
    1,205
    518
    Oct 31, 2014
    Mino city Osaka
    wow. thank you so useful.
     
  13. cpasjuste

    cpasjuste GBAtemp Fan

    Member
    441
    643
    Aug 27, 2015
    France
    Cool stuff d0k3 ! :)
     
    VegaRoXas likes this.
  14. FONZD

    FONZD GBAtemp Regular

    Member
    219
    276
    Jan 27, 2015
    France
    tried with rxtools and it's working, good job ! THX

    There is just a problem with the rxtools menu showing garbages (bottom screen only)
     
    d0k3 and peteruk like this.
  15. d0k3
    OP

    d0k3 3DS Homebrew Legend

    Member
    2,670
    2,675
    Dec 3, 2004
    Gambia, The
    By garbages you mean the text output at the bottom, correct? Normally it would be rxTools task to clear that. Decrypt9 and reiNAND for example also clear the bottom screen. I can think about adding the clear function to Brahma
     
    peteruk likes this.
  16. FONZD

    FONZD GBAtemp Regular

    Member
    219
    276
    Jan 27, 2015
    France
    by 'garbages' I mean it's unreadable...

    If you could correct it it would be nice !
     
    Last edited by FONZD, Nov 12, 2015
  17. d0k3
    OP

    d0k3 3DS Homebrew Legend

    Member
    2,670
    2,675
    Dec 3, 2004
    Gambia, The
    Maybe the screen mode is set wrong for rxTools. I'll have a look. Does rxTools normally use the bottom screen?
     
  18. FONZD

    FONZD GBAtemp Regular

    Member
    219
    276
    Jan 27, 2015
    France
    It will may be usefull in some case... like decrypt9:

    [​IMG]
     
    Last edited by FONZD, Nov 12, 2015
  19. d0k3
    OP

    d0k3 3DS Homebrew Legend

    Member
    2,670
    2,675
    Dec 3, 2004
    Gambia, The
    Alright, thanks! Expect this fixed by tomorrow, I think I know how to do it.
     
  20. Shadowtrance

    Shadowtrance GBAtemp Addict

    Member
    2,488
    1,517
    May 9, 2014
    Hervey Bay, Queensland
    Yeah the bottom screen mode is messed up in D9UI as well (like that issue we had with brahma a while ago).
    Kinda funny though, screeshots taken with D9UI come out perfectly fine. haha :)
     
    Last edited by Shadowtrance, Nov 12, 2015