WIP ReverseNX - Flag your console as handheld or docked

Discussion in 'Switch - Emulation, Homebrew & Software Projects' started by masagrator, Jul 16, 2019.

Loading...

    34,201

    319
    Front-page WIP
    ReverseNX_logo_transparent_v4.
    ReverseNX

    SaltyNX plugin that replaces games checks if you are using docked or handheld mode. They are mostly used to determine graphics settings and unlocking some options that are available only in docked/handheld mode.
    For now in experimental phase, because SaltyNX has many bugs that need to be patched.
    Tests were done on FW 7.0.1-8.1.0, Atmosphere 0.9.1-0.9.2
    It should work with ReinX too.
    SX OS is not supported (if they will add support for sysmodules, then we can talk).
    Clean Kosmos crashes SaltyNX because of too much sysmodules. You need to delete some (f.e. emuiibo, because it crashes SaltyNX on it's own).



    _____________

    Plugin can work globally or per titleid.
    To activate loading per titleid, put empty file titleid.flag to saltysd/flags/ReverseNX/
    For easier management of both modes you can use ReverseNX-Tool which can be downloaded at the end of this post.

    Flags:
    create in folder saltysd/plugins/ReverseNX/ (globally) or saltysd/plugins/(titleid)/ReverseNX/ (per titleid) empty file:
    • docked.flag for docked mode
    or
    • handheld.flag for handheld mode
    ReverseNX by default is set to work globally with docked flag.

    When both flags are there or none of them, plugin will ignore loading.

    For docked flag is recommended to use OC settings exactly as used in docked mode:
    Code:
    handheld_charging_gpu=768
    handheld_charging_mem=1600
    ______________

    Known issues:
    • SaltyNX is still under development, so it may cause issues on it's own:
      • Instability with some homebrews
      • EmuMMC freezes in newer FW version using Hekate Launch menu (from tests it works with 4.1.0/6.1.0/6.2.0), confirmed that enabling emummc and using fusee-primary (with Hekate Payload menu too) works with 7.0.1/8.1.0.
      • 32 bit games are unsupported,
      • Sometimes have issues with Hekate when it's not loading cfw from Payload menu.
      • 0.3X Release crashes OS if something is blocking access to svcGetDebugEventInfo when game is booting (f.e. Atmosphere cheats if it's enabled and files are in cheats folder of booting game)
      • For EmuMMC (and maybe sysnand too): if you use freebird, then OS can crash if you try to open hbmenu while running game (don't know if this was an issue with older releases).
    Confirmed games working or not (this list contains only examples so you can check if it's working correctly. Doesn't mean other games won't work).

    ______________
    Thanks to zakaria and @crow132 for testing.
    To @RattletraPM for logo.

    github repo: https://github.com/masagrator/ReverseNX
    Releases: https://github.com/masagrator/ReverseNX/releases

    ______________

    ReverseNX-Tool

    github repo: https://github.com/masagrator/ReverseNX-Tool
    Releases: https://github.com/masagrator/ReverseNX-Tool/releases
     
    Zkajavier, halin3a, g.a.u and 41 others like this.
    Discussion (319 replies)
  1. SENSENuii

    SENSENuii Member

    Newcomer
    2
    Jan 30, 2019
    Japan
    This is just what I was looking for, thanks
     
  2. hippy dave

    hippy dave BBMB

    Member
    15
    Apr 30, 2012
    United Kingdom
    Oh fun, wondered when this might happen. Great work.
     
    NoNAND likes this.
  3. DrNeroCF

    DrNeroCF Advanced Member

    Newcomer
    3
    Oct 12, 2016
    United States
    This thread is awfully quiet for something everyone has been asking for since the Switch was announced...

    How's this look on Xenoblade? Anything sub 720p in handheld? Does this make much of a difference for Zelda's VR mode?
     
  4. hippy dave

    hippy dave BBMB

    Member
    15
    Apr 30, 2012
    United Kingdom
    So, curious about how it works. Looking at the code, this uses SaltyNX to replace the functions a game calls to check docked state, the replacement functions are part of ReverseNX. Is it done this way rather than patching/mitm'ing Horizon because the replaced functions are part of the sdk code that comes with a game, rather than being part of the base firmware on NAND? Or was it just an easier/preferred way for other reasons?

    I'm aware of SaltyNX but don't know that much about it, is there much documentation around besides looking at the code?

    It's only been up a few hours, maybe it's just a quiet time.
     
  5. cucholix

    cucholix Banners guy

    Member
    9
    Jan 17, 2017
    Chile
    It’s pretty cool, still prefer doing it by game basis, hope you keep doing dock mode patches in handheld mode for games like GE3, Xenoblade :)
     
  6. MUDD_BR

    MUDD_BR GBAtemp Advanced Fan

    Member
    5
    Nov 17, 2008
    Brazil
    Anyone tested it with fw 8?
     
  7. SENSENuii

    SENSENuii Member

    Newcomer
    2
    Jan 30, 2019
    Japan
    works for me on 8.1
     
    MUDD_BR and masagrator like this.
  8. masagrator
    OP

    masagrator File digger

    Member
    8
    Oct 14, 2018
    Poland
    Those functions are part of SDK, that's why they always look the same atm. Another way of doing it would be making APM & AM mitm sysmodules, but this is much more complicated.

    Would be great if more people can confirm that it works at 8.0.0+ or get help from someone more experienced to bring flags per titleid (I'm not a programmer, just sitting too long at disassembled codes gave me an idea how to do it, and zakaria helped me finding template from code-mod-framework).

    SaltyNX always for me had much potential, but I was too scared at first to touch it because of no documentation and plugin example that was not clear to me without comments. I don't know why it's used only in Smash.
     
    Last edited by masagrator, Jul 17, 2019
    hippy dave likes this.
  9. Lyzing

    Lyzing Member

    Newcomer
    1
    May 13, 2018
    Germany
    Yes works on 8.1.0 as well, man this is what I've been waiting for since day 1 of homebrew on switch, I even found my old thread about it https://gbatemp.net/threads/simulate-docked-mode-while-in-portable-mode.503716/

    If I add both flags to the folder it will doing applying any modifications right? (if I understood the source correctly)

    so does that mean that I need to dock -> undock the switch to make it back to handheld again? or is there some other way to disable it on the fly with NXShell
     
    Last edited by Lyzing, Jul 17, 2019
  10. masagrator
    OP

    masagrator File digger

    Member
    8
    Oct 14, 2018
    Poland
    If you will put both flags or delete them all, then Switch will work the same as without ReverseNX plugin.

    This doesn't work on the fly, only when booting game. I can't avoid it.
     
    Last edited by masagrator, Jul 17, 2019
    Lyzing likes this.
  11. Lyzing

    Lyzing Member

    Newcomer
    1
    May 13, 2018
    Germany
    Perfect, that's fine for me.

    BTW Xenoblade Chronicles 2 is working as well you can add it to your list :)

    I just bought a portable screen few days ago just so I could have docked performance on the go and now you release this :D
     
  12. masagrator
    OP

    masagrator File digger

    Member
    8
    Oct 14, 2018
    Poland
    I need exact version of game to add to list. 2.0.2?

    And deleted info about 8.0.0. Nice it works.
     
  13. Lyzing

    Lyzing Member

    Newcomer
    1
    May 13, 2018
    Germany
    Yes game version is 2.0.2
     
    masagrator likes this.
  14. masagrator
    OP

    masagrator File digger

    Member
    8
    Oct 14, 2018
    Poland
    According to tests made by ventus SaltyNX from my package is crashing in EmuMMC with atm 0.9.2.

    If someone has EmuMMC and atmosphere 0.9.1 (this package for some reason is breaking with 0.9.2 without emummc too), you can test this package. Remember to delete files from release.

    Edit: according to tests - doesn't work. So stay tuned for resolving issue. When? I don't know.
     

    Attached Files:

    Last edited by masagrator, Jul 17, 2019
    hippy dave likes this.
  15. pcwizard7

    pcwizard7 GBAtemp Fan

    Member
    3
    Aug 2, 2013
    Australia
    isn't 768 too high for gpu and should go no higher than 480? for safety reasons of course
     
  16. masagrator
    OP

    masagrator File digger

    Member
    8
    Oct 14, 2018
    Poland
    768 is only enabled with charger plugged.
    If you mean heat, then no - then docked mode would be destroying our Switches.

    Some games could still be working with 460 MHz even in docked mode (for example SMM2 according to one person), but it's not common.
     
    Last edited by masagrator, Jul 17, 2019
  17. Lyzing

    Lyzing Member

    Newcomer
    1
    May 13, 2018
    Germany
    Xenoblade looks amazing now, BOTW looks amazing as well now I just have one last wish for the homebrew scene and that's customizing the handheld screen contrast, so we get BOTW to look closer to the Clarity shader pack for CEMU
     
  18. zeldaism

    zeldaism GBAtemp Advanced Fan

    Member
    6
    Apr 19, 2016
    United States
    Just tested Dragon Quest Heroes 1 & 2 and it works very well.
     
  19. Hekel_UK

    Hekel_UK Member

    Newcomer
    1
    Jul 12, 2019
    United Kingdom
    Does it mean that now games that run at 1080/900p when docked will run at that resolution in handheld mode?

    If so, this is amazing !
     
Loading...