Toolbox and tutorial: How to use Ninjhax and make your own homebrews

Discussion in '3DS - Homebrew Development and Emulators' started by xem, Nov 23, 2014.

  1. xem
    OP

    xem GBAtemp Regular

    Member
    125
    85
    Nov 22, 2014
    France
    Valbonne
    Hello everyone,

    Please let me introduce the 3DShomebrew project:

    http://xem.github.io/3DShomebrew/

    The tutorial is still under active development.

    Please tell us (in this thread, or with an issue or a pull request):

    - if you have remarks, ideas, suggestions or want to add missing information

    - If you want to help us to:

    - document the basics of C/C++, the 3DS registers and memory areas.
    - Detail the ctrulib's API.
    - Develop tools to ease homebrew development.
    - Make a game-oriented library based on Ctrulib.

    All ideas, comments, help will be useful!

    Thanks!

    xem
     
    delicator, Wanyal, Kelton2 and 11 others like this.
  2. yodamerlin

    yodamerlin Bok bok.

    Member
    309
    162
    Apr 1, 2014
    I am learning/trying to learn C so this will come in handy when I move to 3DS. Can't wait to see what it turns into! But quick question, who is this aimed at?
     
  3. xem
    OP

    xem GBAtemp Regular

    Member
    125
    85
    Nov 22, 2014
    France
    Valbonne
    Well, I want to make it accessible to everybody having a basic knowledge in programmation (functions, loops, conditions, etc).
    So Java / JS / etc... coders will understand what's happening.
     
  4. yodamerlin

    yodamerlin Bok bok.

    Member
    309
    162
    Apr 1, 2014
    Good! I do have a bit of programming knowledge. But there is one thing I hate about some tutorials and that is baby steps, or "holding hands" it feels so boring it a subject that is very interesting!
     
  5. Sparks43

    Sparks43 Advanced Member

    Newcomer
    77
    18
    Jan 1, 2014
    Looking forward to see how this develops

    Going to try a basic hello world later so for me baby steps are very welcome
     
    Fpsrussia117 likes this.
  6. Ante0

    Ante0 GBAtemp Regular

    Member
    205
    63
    Jan 20, 2014
    Thanks, I just downloaded the devkit and was looking for some basic starter info!
     
  7. yodamerlin

    yodamerlin Bok bok.

    Member
    309
    162
    Apr 1, 2014
    Cubic Ninja is still on its way... Why is it taking so long!
    Anyway, I have some code that tracks all of the bits in my port of my own game. Now all it needs is to be able to draw this to the screen.
     
  8. williamcesar2

    williamcesar2 GBAtemp Advanced Fan

    Member
    673
    328
    Jun 21, 2013
    United States
    New York City
    '' This project doesn't encourage you to pirate 3DS games (which is impossible using NINJHAX), or use it to emulate older consoles like NES or SNES (unless you have a copy of the games you emulate). ''

    this is utopianism
     
  9. xem
    OP

    xem GBAtemp Regular

    Member
    125
    85
    Nov 22, 2014
    France
    Valbonne
    The simplest task would be to draw pixels on the screen (you can take a look at ctrulib/template/source/main.c: it displays one white pixel on the upper screen)

    A hello world would be more complicated, because AFAIK there's no native text output. you have to compile all the letters A-Z, a-z, etc. in an image and use parts of this image for each letter.
     
    Sparks43 likes this.
  10. xem
    OP

    xem GBAtemp Regular

    Member
    125
    85
    Nov 22, 2014
    France
    Valbonne
    in fact, the legal paragraph is just to answer to the haters on reddit ^^
    cf. A complete 3DS homebrew tutorial : 3DS > at the bottom.
     
    Fpsrussia117 likes this.
  11. Sparks43

    Sparks43 Advanced Member

    Newcomer
    77
    18
    Jan 1, 2014

    Compiled that as a test and it worked for me on first try

    2 thing i would like to do though

    1 change the hbl icon to another that i have created ]

    and 2 change the unspecified author to something else

    Enjoying this though good bit of fun
     
  12. xem
    OP

    xem GBAtemp Regular

    Member
    125
    85
    Nov 22, 2014
    France
    Valbonne
    Open the template makefile file with notepad and read the comments :)
    1) add a 48x48px (projectname).png or icon.png file at the root of the project. Normally, this logo is used instead of the default one if it's present.
    2) add "APP_AUTHOR := (your name) under the line 33.

    Please tell us if it works for you
     
    Sparks43 likes this.
  13. Sparks43

    Sparks43 Advanced Member

    Newcomer
    77
    18
    Jan 1, 2014
    Very very nice

    Worked a charm thank you very much

    Time for a pint then i am going to see how far i can go with this

    Port of Boulder dash would be my aim but thats miles away
     
    SLiV3R likes this.
  14. yodamerlin

    yodamerlin Bok bok.

    Member
    309
    162
    Apr 1, 2014
    I'm presuming the "start=Exit to launcher" will become standard?
     
  15. xem
    OP

    xem GBAtemp Regular

    Member
    125
    85
    Nov 22, 2014
    France
    Valbonne
    sparks43: I hope my tutorial will help making a game like that, at least :)
    yodamerlin: it's not so bad I guess. I wonder if / how we could change that though, if wemake a homebrew that needs "start" for a pause menu.
     
  16. yodamerlin

    yodamerlin Bok bok.

    Member
    309
    162
    Apr 1, 2014
    Regularity between apps/games is a good thing. And since it has been defined in the example, I guess we follow that.
    I think I will be following that anyway.
     
  17. loco365

    loco365 GBAtemp Guru

    Member
    5,458
    2,674
    Sep 1, 2010
    That can be modified. There's an X you can tap on blargSNES to exit to the launcher, and gameyob has a menu option to return to the launcher. It really seems to be up to the developer how they want to implement it.
     
  18. yodamerlin

    yodamerlin Bok bok.

    Member
    309
    162
    Apr 1, 2014
    I can't wait to see some really cool homebrew apps! 3DS linux though... Then the 3DS is complete.
     
  19. Lowren

    Lowren Newbie

    Newcomer
    2
    1
    Nov 23, 2014
    France
    I know next to nothing about programming but I assume you can change it in the main.c code, here:

    Code:
            u32 kDown = hidKeysDown();
            if (kDown & KEY_START)
                break; // break in order to return to hbmenu
    Line 20 in the ctrulib template.

    Anyway, it's a great tutorial project, I'm looking forward for the prog part! :)
     
  20. williamcesar2

    williamcesar2 GBAtemp Advanced Fan

    Member
    673
    328
    Jun 21, 2013
    United States
    New York City