Question What is required to write hello world on Switch console?

Discussion in 'Switch - Hacking & Homebrew' started by edepot, Nov 12, 2017.

  1. Randall Stevens

    Randall Stevens Member

    Newcomer
    22
    8
    Oct 5, 2003
    Hong Kong
    Assholes on this thread really, REALLY need to resist posting.

    I'm looking directly at you.
     
  2. CreeperMario

    CreeperMario GBAtemp Advanced Fan

    Member
    633
    372
    Jun 18, 2016
    Australia
    Adelaide, South Australia
    You will need:
    * devkitA64 (includes the properly-configured versions of gcc and stuff that build code for the Switch's processor, available on Windows, macOS and Linux)
    * libnx (builds using devkitA64, and so can be used on all three platforms)
    * A publicly released userspace exploit
     
    CuriousTommy likes this.
  3. sarkwalvein

    sarkwalvein More coffee, please!

    Member
    GBAtemp Patron
    sarkwalvein is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    5,425
    5,846
    Jun 29, 2007
    Germany
    Niedersachsen
    What? But I tried and it worked!

    PS: Everyday that passes I get more disappointed of people, it is not their lack of skill at language what disappoints me, it is that on the one hand they have complete lack of sense of humor, and on the other hand they don't know what is an asshole and get hurt by a simple joke. Fucking snowflakes, the world will eat your guts.
     
    Last edited by sarkwalvein, Nov 12, 2017
  4. Cyan

    Cyan GBATemp's lurking knight

    Global Moderator
    18,726
    9,022
    Oct 27, 2002
    France
    Engine room, learning
    less insults and sarcasm please, and more real answers like machinoman or CreeperMario.
    thank you.

    the question is legit, please provide a proper answer or don't post if you don't know.
    Why is it so complicate?
     
    Last edited by Cyan, Nov 12, 2017
    Selver, FunThomas and CuriousTommy like this.
  5. UnsureSherlock

    UnsureSherlock Member

    Newcomer
    48
    82
    Aug 20, 2015
    United States
    This combined with the previous explanations on how to set up NodeJS and run the loadNRO script is all you need. Hello world is as easy printing out a string after that. In terms of homebrew not much can be done yet unless your really like ASCII art/text adventures, as much more work needs to be done before HID/GPU/Sound is useable.
     
  6. PeterMcCain

    PeterMcCain Member

    Newcomer
    10
    12
    Sep 18, 2017
    Korea, North
    What does op mean? Cant you change your profile name to Hello World
     
  7. Cyan

    Cyan GBATemp's lurking knight

    Global Moderator
    18,726
    9,022
    Oct 27, 2002
    France
    Engine room, learning
    Opening/Original Post, or Poster.
    it's referencing to either the first message of this thread, or the user who wrote it.
    there is a "OP" logo displayed on the avatar of that user to easilly identify who started the thread or asked a questions. it's useful when multiple people are helping him, we can see who helps and who asked it without reloading the first page to check the username.
     
    Last edited by Cyan, Nov 13, 2017
    CuriousTommy and peteruk like this.
  8. PeterMcCain

    PeterMcCain Member

    Newcomer
    10
    12
    Sep 18, 2017
    Korea, North
    I know what op means I meant what does he mean when he wants to write Hello world
     
  9. edepot
    OP

    edepot Member

    Newcomer
    21
    1
    Oct 12, 2017
    United States
    Is this a serious question about writing "hello world" in homebrew? The first stage is getting a pointer to the screen buffer memory address so that any value written there will output directly a dot you see on screen. The second stage is to set aside a graphics buffer with pixel pictures of A-Z 0-9 and all the ASCII characters. So instead of writing the characters manually yourself, you can just call a function with the text. If the SDK can support a screenprintf("hello world"), then that means you got graphics and text output to the switch already.

    It would be nice if a pointer to the sound buffer and a way to get controller input are also provided in the SDK.

    I don't know if they can expose the graphics API provided by the firmware, but the first "Hello World" should offer direct access to the frame buffer?

    I think someone mentioned that you can set linux style carriage return on Windows Subsystem for Linux (WSL). How do you do that? And someone mentioned the NRO not running under WSL, how do you get it to work? Why isn't anyone trying to do the whole thing from beginning to end on the Windows 10's provided Linux mode? Why complicate the whole process with VirtualBox? I think someone mentioned you also need to virtualize the network devices if you use VirtualBox (so many steps, not everyone has a full guide). I think a guide for Windows 10 WSL should be done.