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

  • Thread starter xem
  • Start date
  • Views 30,696
  • Replies 90
  • Likes 14

xem

Well-Known Member
OP
Member
Joined
Nov 22, 2014
Messages
142
Trophies
0
Age
36
Location
Valbonne
XP
333
Country
France
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
 

yodamerlin

Bok bok.
Member
Joined
Apr 1, 2014
Messages
322
Trophies
0
XP
1,050
Country
United Kingdom
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?
 

xem

Well-Known Member
OP
Member
Joined
Nov 22, 2014
Messages
142
Trophies
0
Age
36
Location
Valbonne
XP
333
Country
France
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?
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.
 

yodamerlin

Bok bok.
Member
Joined
Apr 1, 2014
Messages
322
Trophies
0
XP
1,050
Country
United Kingdom
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.
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!
 

yodamerlin

Bok bok.
Member
Joined
Apr 1, 2014
Messages
322
Trophies
0
XP
1,050
Country
United Kingdom
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.
 

williamcesar2

Well-Known Member
Member
Joined
Jun 21, 2013
Messages
669
Trophies
0
Age
36
Location
New York City
XP
459
Country
United States
'' 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
 

xem

Well-Known Member
OP
Member
Joined
Nov 22, 2014
Messages
142
Trophies
0
Age
36
Location
Valbonne
XP
333
Country
France
Looking forward to see how this develops

Going to try a basic hello world later so for me baby steps are very welcome

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.
 
  • Like
Reactions: Sparks43

xem

Well-Known Member
OP
Member
Joined
Nov 22, 2014
Messages
142
Trophies
0
Age
36
Location
Valbonne
XP
333
Country
France
'' 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

in fact, the legal paragraph is just to answer to the haters on reddit ^^
cf. A complete 3DS homebrew tutorial : 3DS > at the bottom.
 
  • Like
Reactions: Fpsrussia117

Sparks43

Well-Known Member
Newcomer
Joined
Jan 1, 2014
Messages
77
Trophies
0
XP
150
Country
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.


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
 

xem

Well-Known Member
OP
Member
Joined
Nov 22, 2014
Messages
142
Trophies
0
Age
36
Location
Valbonne
XP
333
Country
France
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

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
 
  • Like
Reactions: Sparks43

Sparks43

Well-Known Member
Newcomer
Joined
Jan 1, 2014
Messages
77
Trophies
0
XP
150
Country
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
 
  • Like
Reactions: SLiV3R

xem

Well-Known Member
OP
Member
Joined
Nov 22, 2014
Messages
142
Trophies
0
Age
36
Location
Valbonne
XP
333
Country
France
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.
 

yodamerlin

Bok bok.
Member
Joined
Apr 1, 2014
Messages
322
Trophies
0
XP
1,050
Country
United Kingdom
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.
 

loco365

Well-Known Member
Member
Joined
Sep 1, 2010
Messages
5,457
Trophies
0
XP
2,927
I'm presuming the "start=Exit to launcher" will become standard?

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.
 

Lowren

New Member
Newbie
Joined
Nov 23, 2014
Messages
2
Trophies
0
Age
33
XP
87
Country
France
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.
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! :)
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    SylverReZ @ SylverReZ: https://www.youtube.com/watch?v=uLN9qrJ8ESs