1. SwitchMods

    OP SwitchMods Member
    Newcomer

    Joined:
    Aug 27, 2018
    Messages:
    37
    Country:
    Netherlands
    Okay so let's assume that we have 3 executable files (NSO) in the exeFS called: main.nso, main2.nso and main3.nso
    Is there any sdk exec function that I can call fom main.nso to boot (on the fly) main2.nso or main3.nso?

    This is not a difficult function to implement, but require a lot of knowlege of Horizon and its executable loader. Basically it should load the executable, find its OEP and then call it (but idk if there are any software dependances that need to be loaded too)...

    am I the first one trying to achieve this?
     
  2. hippy dave

    hippy dave BBMB
    Member

    Joined:
    Apr 30, 2012
    Messages:
    7,007
    Country:
    United Kingdom
    I have no idea about the libnx functions, but you could have a look at the homebrew menu source to see how it goes about loading & running nros. This looks like it: https://github.com/switchbrew/nx-hbmenu
     
  3. m4xw

    m4xw Ancient Deity
    Developer

    Joined:
    May 25, 2018
    Messages:
    2,426
    Country:
    Germany
    Last edited by m4xw, Oct 21, 2018
    8BitWonder and hippy dave like this.
  4. hippy dave

    hippy dave BBMB
    Member

    Joined:
    Apr 30, 2012
    Messages:
    7,007
    Country:
    United Kingdom
    Cool, does it run when the current nro exits as normal?
     
  5. m4xw

    m4xw Ancient Deity
    Developer

    Joined:
    May 25, 2018
    Messages:
    2,426
    Country:
    Germany
    Yes.
    Thats how I do salamander too
     
    Last edited by m4xw, Oct 21, 2018
    hippy dave likes this.
  6. SwitchMods

    OP SwitchMods Member
    Newcomer

    Joined:
    Aug 27, 2018
    Messages:
    37
    Country:
    Netherlands
    Thank you both (@hippy dave and @m4xw ) for your anwers, I'll give it a look.

    I think that technically should be possible to edit envSetNextLoad to support NSO, by adding a parser of this executable format (atm I don't have this knownledge, but this is a documented format so it shouldn't be a problem).

    We will see... any addition to this topic is welcome ;)
     
  7. m4xw

    m4xw Ancient Deity
    Developer

    Joined:
    May 25, 2018
    Messages:
    2,426
    Country:
    Germany
Draft saved Draft deleted
Loading...

Hide similar threads Similar threads with keywords - function, exec(), others