4dsdev
Views: 1,609,352 Main | Rules/FAQ | Memberlist | Active users | Last posts | Calendar | Stats | Online users | Search 11-21-24 05:29 PM
Guest:

0 users reading How to build homebrew for the 3DS | 1 bot

Main - Getting started - How to build homebrew for the 3DS Hide post layouts | New reply


StapleButter
Posted on 10-29-14 08:55 PM (rev. 3 of 11-21-14 04:48 PM) Link | #4
Now let's get to the fun part!


3DS homebrew is programmed in C or C++. We expect that you already have good knowledge of these languages.


1. Things you will need

• devkitPro
• makerom (for building a Gateway-compatible .3ds file). Windows users can grab a build here.
RSF file for Gateway


2. Setup

Install devkitPro. If it's already installed, update it to the last version. The installer will install ctrulib and set everything up automatically.


3. Making homebrew

You can build from the examples that come with ctrulib. The examples aren't provided in devkitPro, but you can obtain them from the ctrulib repository on Github.

• app_launch: demonstrates how to launch another app (in this case, the EUR Camera app)
• gpu: demonstrates how to render 3D geometry with the GPU
• mic: demonstrates how to read sound from the microphone
• mvd: demonstrates how to use hardware video decoding on the New 3DS
• sdmc: demonstrates how to access files on the SD card

(TODO: documentation of the API!)


4. Building homebrew for distribution

To build your homebrew, it works the same way as for building ctrulib. Open a terminal, browse to your homebrew's folder and run make.

This will build a .elf file and a .3dsx file. The .3dsx file is meant for oncoming homebrew launchers.

To build a Gateway-compatible .3ds file, an extra step is needed. You need to strip the .elf file and use makerom on it (with the provided RSF file).

Here are commands to do it:
arm-none-eabi-strip [ELF file]
makerom -f cci -o [.3ds file] -rsf [RSF file] -target d -exefslogo -elf [ELF file] -icon [icon file] -banner [banner file]



Have fun!

____________________
blargSNES -- SNES emu for 3DS
More cool stuff

ILOVEPIE
Posted on 11-19-14 05:27 PM (rev. 2 of 11-19-14 05:28 PM) Link | #27
Also just a note, if you want to include files like images or sounds for use with your homebrew you can append them in a zip file to the end of the 3dsx executable, that way it won't clutter up the SD card. Just good etiquette.

you can do this by doing
copy /B program.3dsx + files.zip programwithzip.3dsx

filfat
Posted on 12-05-14 07:45 AM Link | #54
Posted by ILOVEPIE
Also just a note, if you want to include files like images or sounds for use with your homebrew you can append them in a zip file to the end of the 3dsx executable, that way it won't clutter up the SD card. Just good etiquette.

you can do this by doing
copy /B program.3dsx + files.zip programwithzip.3dsx

Wow, thanks didn't know about that :)

____________________
CEO @ filfat Studios AB
https://www.filfatstudios.com

Tcm0
Posted on 12-29-14 01:14 AM Link | #76
Thank you. This helped me building "Guess the Number" for the Gateway.

Korin
Posted on 01-12-15 08:24 AM (rev. 2 of 01-12-15 08:24 AM) Link | #79
I'm liking this simple guide, it was helpful for getting up to speed with the homebrew scene. I was having difficulty working out what I needed for makerom to function properly.

Tjessx
Posted on 02-08-15 08:34 PM Link | #82
Just created an account to compliment this guide, this was very helpfull

WhoAmI?
Posted on 05-25-15 12:29 AM Link | #156
Thank you!

phase
Posted on 09-10-15 04:32 AM Link | #401
Doing
make
just stalls my console forever. It doesn't look like it's running any commands or anything.

[image]
Each time I do make it just stalls. If I quit it and try a different file, it does the same thing. Make works on my other projects, and DevkitPro is installed, so I don't know what the problem could be.

____________________

Caton
Posted on 11-15-15 05:56 AM (rev. 2 of 11-15-15 06:00 AM) Link | #722
can you load\build files from 3ds rom filesystem?
I plan to load files from the 3ds rom filesystem.

gudenau
Posted on 11-27-15 02:36 AM Link | #781
You should add stuff for CIA builds, the rxTools/Pasta/Cake/reiNAND/etc users need love to!

gudenau
Posted on 11-27-15 02:37 AM (rev. 2 of 11-27-15 02:41 AM) Link | #782
Posted by phase
Doing
make
just stalls my console forever. It doesn't look like it's running any commands or anything.

[image]
Each time I do make it just stalls. If I quit it and try a different file, it does the same thing. Make works on my other projects, and DevkitPro is installed, so I don't know what the problem could be.

Just use Command Prompt.

anonymous
Posted on 12-16-15 10:55 PM Link | #834
What do I use to type the command 'make'?

Garcia98
Posted on 12-17-15 02:49 PM Link | #836
Posted by anonymous
What do I use to type the command 'make'?


Uh, the keyboard?


Main - Getting started - How to build homebrew for the 3DS Hide post layouts | New reply

Page rendered in 0.017 seconds. (2048KB of memory used)
MySQL - queries: 26, rows: 87/87, time: 0.006 seconds.
[powered by Acmlm] Acmlmboard 2.064 (2018-07-20)
© 2005-2008 Acmlm, Xkeeper, blackhole89 et al.