COMPLETED Hello World - a little different one -

Discussion in 'Switch - Hacking & Homebrew' started by adrifcastr, Nov 13, 2017 at 6:53 PM.

  1. SocraticBliss

    SocraticBliss Newbie

    Newcomer
    6
    1
    Jun 3, 2017
    United States
    The ace.NRO is loaded but it crashes instantly after running, you can tell by the debug log that I posted in the issue tracker...

    Check out line 13 of the javascript file, that is the file that is loaded...
    xhr.open('GET', '/nros/ace.nro', false);
     
  2. SocraticBliss

    SocraticBliss Newbie

    Newcomer
    6
    1
    Jun 3, 2017
    United States
    Hey Sean, I noticed that you were able to run node.js via the Linux sub in Windows 10, mine keeps complaining about needing to run it as a root user, so I tried to sudo it, but that complained that node doesn't exist...

    How did you fix this?

    I'd like to be able to run it without needing to output to a log file...
     
  3. UnsureSherlock

    UnsureSherlock Member

    Newcomer
    42
    69
    Aug 20, 2015
    United States
    Did you install via apt? It should install node globally, but in case the windows ubuntu bash shell is doing something funky, just do "apt-get remove nodejs" then "su" type in password then "apt-get install nodejs"

    As a side note, I'd really recommend setting up a Linux VM using VirtualBox to work with the stuff in. It'll remove a lot of the headache that comes with trying to set it all up in windows.
     
    Last edited by UnsureSherlock, Nov 13, 2017 at 11:54 PM
  4. seanp2500

    seanp2500 Advanced Member

    Newcomer
    87
    28
    Jun 2, 2010
    United States
    It took me less than 10mins to setup my linux subsystem following the guide here
     
  5. UnsureSherlock

    UnsureSherlock Member

    Newcomer
    42
    69
    Aug 20, 2015
    United States
    Not about setup time. You just get some goofy stuff with the windows bash still. Line endings can be screwed up if going between the windows filesystem and linux
     
  6. SocraticBliss

    SocraticBliss Newbie

    Newcomer
    6
    1
    Jun 3, 2017
    United States
    I know what you mean, I have just stuck with utilizing notepad++ and having the line endings set to Unix default :)

    That or getting back into utilizing vi, but it's been awhile...
     
  7. V-Temp

    V-Temp GBAtemp Regular

    Member
    240
    333
    Jul 20, 2017
    United States
    LabView nightmares intensifying. :gun:

    :P
     
    ShadowOne333 likes this.
  8. FoxofGrey

    FoxofGrey Member

    Newcomer
    26
    7
    Jul 1, 2016
    United States
    >git pull origin runnro-command

    You're welcome
     
    machinoman likes this.
  9. machinoman

    machinoman Advanced Member

    Newcomer
    85
    61
    Feb 12, 2011
    United States
    thank you, i had weirdly hacked a module to make it work. this is better.
     
    kingraa777 likes this.
  10. Nezztor

    Nezztor Advanced Member

    Newcomer
    87
    30
    Nov 8, 2016
    Mexico
    Maybe someone can test this new hello world, it comes from misson20000
     

    Attached Files:

  11. TeamGameRevolution

    TeamGameRevolution Newbie

    Newcomer
    4
    1
    Aug 27, 2017
    Germany
    Runs on my Switch without crashing, looking into writing a little myself!

    Are there any docs on how to print stuff onto the Switch screen yet?

    EDIT: Can't post the image here (dunno why GBATemp won't let me), but in the Debug log, it says "Hello, World!"
     
    Last edited by TeamGameRevolution, Nov 14, 2017 at 7:23 PM
    Nezztor likes this.
  12. nmkd

    nmkd GBAtemp Regular

    Member
    153
    76
    Oct 25, 2016
    Germany
    No, you need framebuffer support for that, but it's already in the works!
     
  13. xianbaby

    xianbaby Newbie

    Newcomer
    5
    2
    Oct 23, 2017
    United States
    I don't think there is any way to easily do that with the current version of libtransistor. However, I just looked into it for the very first time last night so correct me if I'm wrong (which I have a strong feeling I am) but I think there does exist an API for nv, it, and get started you can look into these resources, in addition to any existing Tegra documentation, (which seems sparse). I can't post links yet but take a look at these:

    1. Look up NV_Services on SwitchBrew for Switch NV services documented.
    2. In libtransistor, there is libtransistor/test/test_nv.c which appears to be a Switch NV services test using libtransitor. It looks like this could be used as a base, HOWEVER, it begins with a 28 hour sleep, so maybe they didn't intend on people running this on a real Switch yet. But honestly, the fact that it starts with a 28 hour sleep (and the fact that I very am new to all of this so my thoughts aren't worth much), I wouldn't run test_nv.c on a real switch, lol

    EDIT: There also exists libnx with devkitPRO, which seems like a competing library and toolchain, that you could look into, too. It has a switch/gfx/gfx.h header whicch I am guessing implements nv on some level
     
    Last edited by xianbaby, Nov 14, 2017 at 8:55 PM
  14. seanp2500

    seanp2500 Advanced Member

    Newcomer
    87
    28
    Jun 2, 2010
    United States
    teamgamerevolution do you just place this nro file in nros? also aqua do i need to input a command to start sdbcore? or just edit config.json with that entry? When i try to load nro i get same error as before on the switch just keep trying?
     
  15. xianbaby

    xianbaby Newbie

    Newcomer
    5
    2
    Oct 23, 2017
    United States
    I had little success with the loadNro.js script... I was possibly using it incorrectly but it kept complaining about my Nro's header. I used the runnro-command branch instead. You can get it by running the git command FoxofGrey posted. Then you can load the NRO using runnro. I think editing the config.json should be enough. It still takes a few tries.
     
  16. adrifcastr
    OP

    adrifcastr GBAtemp Advanced Maniac

    Member
    1,791
    818
    Sep 12, 2016
    Germany
    DONT EDIT THE JSON. This produces erros/bugs, Deaken said to simply run the command "enable sdbcore" that should do the job
     
  17. Edgy_Edge

    Edgy_Edge Advanced Member

    Newcomer
    55
    11
    Apr 2, 2017
    Bahamas, The
    If i write "Hello word" on my switch, can i play Zelda BOTW backup?
     
    DayVeeBoi likes this.
  18. Dodain47

    Dodain47 GBAtemp Advanced Fan

    Member
    802
    223
    Jan 1, 2017
    Austria
    I´m not sure if you are joking or sincere here.
    To play Switch back ups we will need kernel access. This is something which may or may not take a long time.
    Maybe even Years.
     
    Edgy_Edge likes this.
  19. seanp2500

    seanp2500 Advanced Member

    Newcomer
    87
    28
    Jun 2, 2010
    United States
    THANKS SO MUCH EVERYONE THAT WORKED runro command works perfecto also i didn't seem to have issue edit json.cfg
     
  20. Edgy_Edge

    Edgy_Edge Advanced Member

    Newcomer
    55
    11
    Apr 2, 2017
    Bahamas, The
    Thanks for reply! I'm not familiar with hacking... After doing Soundhax on 3DS I could play all games, so I thought this is something similar. Until the proper HBL switch is useless piece of garbage)