arm9loaderhay - my own take on a A9LH file select

Discussion in '3DS - Homebrew Development and Emulators' started by Hayleia, Mar 24, 2016.

  1. Hayleia
    OP

    Hayleia GBAtemp Maniac

    Member
    1,485
    1,135
    Feb 26, 2015
    France
    As you may be able to tell from the title, this started as a fork from arm9select, so credits go to @FIX94 and whoever he credited. This also uses code from Decrypt9 for the password, so credits to @d0k3 and whoever I should credit too, but I have no idea who they are. You can PM me or post in the topic if you want to be credited. This is now a fork from BootCtr9 and here's the repo with releases.

    https://github.com/Hayleia/arm9loaderhay/releases


    Why another boot manager ?

    Current boot managers are really convenient to the user. Some have a menu, others let you configure a key for each payload... But that might actually be too convenient. If you're a parent and want your kid to be able to play games without necessarily having access to GodMode9 for example, maybe you'd want them not to land there by accident just because they were pressing the L button by chance.

    So how is it possible to prevent that ? Well, setting up more than one key for a payload (L+A is less likely to happen by accident than just L) or setting up a password for certain payloads maybe. Well that is possible with arm9loaderhay.
    Please not that the whole purpose of this is to be less convenient than other boot managers, so if you're just looking for a way to manage your payloads, maybe that's not what you're looking for. Or maybe it is exactly what you need.


    Wonderful, how do I use this ?

    Like arm9select, this payload only looks at the contents of a specific folder, which is the "arm9select" folder for arm9select and the "arm9loaderhay" folder for arm9loaderhay.
    Like arm9select, this folder can contain a default.bin payload and a default_bl file if the default payload needs backlight.

    Now, things get different from arm9select.

    In your "arm9loaderhay" folder, you can have subfolders. Each folder represents a payload that will be launched with a certain key combination.
    • The name of the folder is YXLRdulrTEBA where you replace any character with "-" to describe keypresses. The meaning of YXLRBA is obvious. The D-Pad is represented with dulr (in lowercase to avoid conflict with LR) and TE is for START and SELECT (they both start with an S so they are described with their second letter).
      For example, "----------BA" and "--L--u------" are valid names, describing "B+A" and "L+Up".
    • The folder needs an "arm9loaderhax.bin" payload, which will obviously be the payload launched when pressing the keys described by the folder's name
    • The folder can contain a file named "backlight". Its presence tells that the payload here needs backlight when launched. This is basically only useful if your arm9loaderhax supports screen init and turns backlight off (like Fix94's arm9loaderhax, see the link for arm9select at the top of this post)
    • The folder can contain a file named "password" that contains the password for the present payload. Use the same convention as for the folder's name. For example, if your password is Left,Right,L,START, write lrLT.
      Notice that any password longer than 10 characters will be trimmed down to 10.
      Also notice that any unrecognized character will mark the end or your password. "ABXYwatLR" for exemple is equivalent to "AXBY".
      The last thing to notice is that you can't use the same key twice in a row, so ABA is valid but AAB isn't.
    • The folder can contain anything else, like a file named "CtrBootManager" if you want to say that the "arm9loaderhax.bin" payload present in that folder is CtrBootManager's
    So here's an example of what your SD card might look like.
    Code:
    SD
    ├── arm9loaderhax.bin
    └── arm9loaderhay/
        ├── default.bin
        ├── default_bl
        ├── ----------BA/
        │   ├── arm9loaderhax.bin
        │   ├── backlight
        │   └── This_Is_CtrBootManager_On_A_B
        └── ------l--T--/
            ├── arm9loaderhax.bin
            ├── backlight
            ├── password
            └── This_Is_GodMode9_On_LEFT_SELECT
    

    I didn't test everything though, so I am not saying it works perfectly, and I warned you, so I can't be held responsible if your 3DS bricks from using this program (even though it shouldn't happen). For example, I can't test all existing passwords and all key combinations.

    (And if you don't trust me because I never released anything, you can read this. Of course, it doesn't prove my program works (and maybe it doesn't, that's the first thing I compile for a 3DS) but at least I'm not a crook doing stuff that doesn't work on purpose).
     
    Last edited by Hayleia, Jul 3, 2016


  2. Alvoko

    Alvoko Member

    Newcomer
    11
    3
    Feb 27, 2016
    France
    Perfect thanks :).
     
  3. zoogie

    zoogie simple pimp tool

    Member
    6,237
    7,898
    Nov 30, 2014
    United States
    Can I use this hax to feed livestock?

    the arm9 is such an amazingly versatile processor :P
     
  4. Hayleia
    OP

    Hayleia GBAtemp Maniac

    Member
    1,485
    1,135
    Feb 26, 2015
    France
    Updated it.
    It now uses the ugly name in the folder name so you can just update your "arm9loaderhax.bin" payload for CtrBootManager (for example) without renaming it with an ugly name.
    Doesn't need four digits at "1" for no apparent reason anymore, just put them at 0.
    Also supports very limited password input, for more security, to be improved. Put a "password" file in the same folder as your payload (except default.bin) and it will wait for you to input "LEFT-RIGHT-DOWN-UP-A". Needs a way to configure the password to input.
    See first post for more details.

    Old version of first post in spoiler.
    Warning: Spoilers inside!

    Probably, but not with my payload :P
     
  5. SirBeethoven

    SirBeethoven 3.145.... something. E=mc2

    Member
    1,801
    553
    Nov 26, 2015
    United States
    I'm using Aurora Wright's no screen init and tried this out. The backlight file doesnt do anything and the password doesn't work.
     
  6. gunner007

    gunner007 GBAtemp Advanced Maniac

    Member
    1,506
    368
    Dec 31, 2013
    United States
    That would never work anyways. This program doesn't do screen init, and neither would her fork so it would never display anything.
    If you're using A9Select or this fork, it's assumed you're using Fix94's fork which has screen init with backlight at 0.
     
  7. Hayleia
    OP

    Hayleia GBAtemp Maniac

    Member
    1,485
    1,135
    Feb 26, 2015
    France
    And about the password, no idea why it wouldn't work. Just be aware that it is not working the same way as in Decrypt9. In Decrypt9, the goal is just to make sure you didn't land in that menu by chance. Here, the goal is to make sure no one will ever land here by chance, so of course the password isn't displayed, and actually nothing is displayed. That's also why as opposed to Decrypt9, here a mistake makes you have to start the password over. But same as decrypt9 however, don't input it too fast, take your time to release keys before pressing other ones.

    And I just tried it, it does work on my Old 3DS when putting a "password" file next to any "arm9loaderhax.bin" file in their XXXXXXXXXXXXXXXX. It isn't supposed to work with the default.bin payload however. If you want that, maybe don't put a default payload and use a 0000000000000000 folder instead. I didn't try it but I don't see why it wouldn't work.
     
  8. SirBeethoven

    SirBeethoven 3.145.... something. E=mc2

    Member
    1,801
    553
    Nov 26, 2015
    United States
    Could I just compile stage 1 and stage 2 of Fix94's A9LH or can someone compile for me?
     
  9. SirBeethoven

    SirBeethoven 3.145.... something. E=mc2

    Member
    1,801
    553
    Nov 26, 2015
    United States
    Can you make this work with no screen init please? I'd love to use this- also in the next release can you make different passwords possible? Thanks again!
     
  10. Hayleia
    OP

    Hayleia GBAtemp Maniac

    Member
    1,485
    1,135
    Feb 26, 2015
    France
    Different passwords yeah, that's planned.

    But no screen init, I have no idea. That's probably really easy to do when you know what to do (like getting a .c and a .h somewhere then calling "screenInit()"...) but I don't. And guess what, there is a .c and a .h with "void screenInit()" in them in arm9select's github, but do I just have to put that at the beginning of the main ? No idea.
     
  11. SirBeethoven

    SirBeethoven 3.145.... something. E=mc2

    Member
    1,801
    553
    Nov 26, 2015
    United States
    I tested the password option on O3ds and N3ds. The Old 3ds password option works but the N3ds option doesn't. Please update

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

    Check AuReiNand for the screen init if you plan on adding that
     
  12. Hayleia
    OP

    Hayleia GBAtemp Maniac

    Member
    1,485
    1,135
    Feb 26, 2015
    France
    Done (uploaded to first post). The problem was that for some reason, the New 3DS was able to detect the same key twice in a row, which led to it saying "no" to the next key in the password...
    I worked around it in the InputWait in the while (pad == 0) by adding a "&& pad != oldPad" in the condition, and obviously setting oldPad before that.
    As a consequence, when we'll be able to configure passwords, they will not support the same key twice in a row.

    I'll have a look at it, but I don't promise anything, and especially I don't promise anything anytime soon (since I had a 3 days week-end I did things, but now the routine starts over so even if I do something, it will most probably not happen tomorrow if you see what I mean).
     
    SirBeethoven likes this.
  13. SirBeethoven

    SirBeethoven 3.145.... something. E=mc2

    Member
    1,801
    553
    Nov 26, 2015
    United States
    Thanks as always! Yeah I'll be back to the routine too :/
     
  14. Hayleia
    OP

    Hayleia GBAtemp Maniac

    Member
    1,485
    1,135
    Feb 26, 2015
    France
    Updated it with password "configuration". That's a big word considering you just describe it in a file without any configuration menu, but at least it's better than having everyone using a hardcoded password that everyone knows.

    Old first post in spoiler.
    Warning: Spoilers inside!
     
  15. SirBeethoven

    SirBeethoven 3.145.... something. E=mc2

    Member
    1,801
    553
    Nov 26, 2015
    United States
    Nice job! You can take that cup of coffee now :) don't worry about updating it for a few days! This is great! Thanks!
     
  16. SirBeethoven

    SirBeethoven 3.145.... something. E=mc2

    Member
    1,801
    553
    Nov 26, 2015
    United States
    Hey can you make this work with latest version of Decrypt9WIP please? It sends the payload to just a black screen with a red dot on the top right corner. PS: I'm using a password with it
     
  17. Hayleia
    OP

    Hayleia GBAtemp Maniac

    Member
    1,485
    1,135
    Feb 26, 2015
    France
    The 2016/04/02 one here ? https://github.com/d0k3/Decrypt9WIP/releases/tag/20160402
    I didn't try all the features so I can't tell if it works perfectly but I got it to boot fine (using LEFT+SELECT as combination and YXBA as password). I mean that I see the menu and can navigate inside of it.
     
  18. AboveColin

    AboveColin GBAtemp Regular

    Member
    212
    26
    Jan 22, 2016
    Netherlands
    But what does this?
     
  19. jimmyleen

    jimmyleen GBAtemp Maniac

    Member
    1,160
    197
    Feb 28, 2016
    Down side to this? I would have to write down what each button does.
     
  20. SirBeethoven

    SirBeethoven 3.145.... something. E=mc2

    Member
    1,801
    553
    Nov 26, 2015
    United States
    Could it just be a N3DS problem? I'll keep testing this out. Also maybe someday instead of binary folders, you could actually use the same password combinations as folder combinations! So like you could use "YBLd" folder to hold The y, b, X, and down button :)