Homebrew Homebrew Development

schuko1982

Member
Newcomer
Joined
Nov 4, 2014
Messages
18
Trophies
0
Age
41
Location
Tarragona
XP
112
Country
Hello everyone, here a little tutorial to whom wanna begin with homebrew on 3DS :P

Before anything you will need these files:
DevKitARM : devkitpro.org
DevKitARM Add-on 3ds: http://mtheall.com/~fincs/3dsdkA/
3DSTemplate(with new ctrulib): http://filetrip.net/dl?rqkeqrIIns

After download all files:
1 - open the "dkA-3dsx-patch-12092014.zip" and copy the DevKitARM folder to DevKitPro/DevKitARM folder on your PC.
2 - extract 3dstemplate where you wanna, open the 3dstemplate folder and copy the "libctru" on C:/ or D:/ or where you wanna on your disk.
3 - Go to environment variables and at system variables, create a new with name: CTRULIB , value: D:\libctru (change to your libctru directory !).
4 - on 3dstemplate folder open the build.bat, if you did everything correct, it will generate three new files, ".elf", ".3dsx" and ".3ds", the .3ds is to Gateway users, .elf to alternative homebrew loaders and .3dsx to future Smea Homebrew Loader.

If you wanna edit the code, just go to source and edit the main.c, there is a little example on code, have fun :P



no valid link, someone can give it to me? DevKitARM Add-on 3ds: http://mtheall.com/~fincs/3dsdkA/

Thank!!
 

xem

Well-Known Member
Member
Joined
Nov 22, 2014
Messages
142
Trophies
0
Age
36
Location
Valbonne
XP
333
Country
France
Hello everyone, here a little tutorial to whom wanna begin with homebrew on 3DS :P

Before anything you will need these files:
DevKitARM : devkitpro.org
DevKitARM Add-on 3ds: http://mtheall.com/~fincs/3dsdkA/
3DSTemplate(with new ctrulib): http://filetrip.net/dl?rqkeqrIIns

After download all files:
1 - open the "dkA-3dsx-patch-12092014.zip" and copy the DevKitARM folder to DevKitPro/DevKitARM folder on your PC.
2 - extract 3dstemplate where you wanna, open the 3dstemplate folder and copy the "libctru" on C:/ or D:/ or where you wanna on your disk.
3 - Go to environment variables and at system variables, create a new with name: CTRULIB , value: D:\libctru (change to your libctru directory !).
4 - on 3dstemplate folder open the build.bat, if you did everything correct, it will generate three new files, ".elf", ".3dsx" and ".3ds", the .3ds is to Gateway users, .elf to alternative homebrew loaders and .3dsx to future Smea Homebrew Loader.

If you wanna edit the code, just go to source and edit the main.c, there is a little example on code, have fun :P

Hi st4rk, and other people reading this.
Please note that the setup procedure is much easier now (devkitpro now includes mtheall's add-on and ctrulib natively)
But if you like writing tutorials, please join ours at https://github.com/xem/3DShomebrew :)
 
  • Like
Reactions: st4rk

elhobbs

Well-Known Member
Member
Joined
Jul 28, 2008
Messages
1,044
Trophies
1
XP
3,035
Country
United States
Hey I have a quick question. I'm trying to write homebrew in c++, I was writing it in C but I'm not to comfortable with C, and I'm having trouble with my compiler and the function "u8* gfxGetFramebuffer(gfxScreen_t screen, gfx3dSide_t side, u16* width, u16* height);" . basically I want to draw to the bottom screen so I use screenBottom = gfxGetFramebuffer(GFX_BOTTOM, GFX_BOTTOM, NULL, NULL); and it doesn't work. can anyone point me in the right direction? please?

--edit

I'm sorry. I am a little tired basically what i want to do is clear the frame buffer not draw on the screen. using c++
gfxGetFramebuffer(GFX_BOTTOM, GFX_BOTTOM, NULL, NULL);
sb
gfxGetFramebuffer(GFX_BOTTOM, GFX_LEFT, NULL, NULL);
in 2d generally the left screen is the visible framebuffer. GFX_BOTTOM would effectively be referencing the right(as in GFX_RIGHT) framebuffer.
 

arm113ds

Active Member
Newcomer
Joined
Nov 1, 2014
Messages
31
Trophies
0
XP
204
Country
what are elf files? I never had to deal with them and managed to compile 3dsx files anyway.

when you compile the source using "make", creates three files .elf, .3dsx, and .sdmh. If I have not the source but if I have the file .elf I can use to convert .elf to .3dsx?
 

Helreizer543

Well-Known Member
Newcomer
Joined
Nov 24, 2014
Messages
49
Trophies
0
Age
102
XP
119
Country
United States
gfxGetFramebuffer(GFX_BOTTOM, GFX_BOTTOM, NULL, NULL);
sb
gfxGetFramebuffer(GFX_BOTTOM, GFX_LEFT, NULL, NULL);
in 2d generally the left screen is the visible framebuffer. GFX_BOTTOM would effectively be referencing the right(as in GFX_RIGHT) framebuffer.


I got it. thanks in the function when you specify GFX_BOTTOM it does nothing with the 2nd part (GFX_LEFT). GFX_LEFT and GFX_RIGHT are only used when clear the top screen frame buff (left is 2d, right is 3d).the function works correctly though
 

AlbertoSONIC

Pasta Team Member
Member
Joined
Jun 27, 2014
Messages
927
Trophies
0
Age
52
Website
www.albertosonic.com
XP
1,396
Country
Italy
Could you tell me how this funtions works?
Code:
drawCircleCircum(int cx, int cy, int x, int y, char r, char g, char b, u8* screen)

x and y are the circle's center position? And cx and cy are meant to do what exactly?
 

minexew

ayy lmao
Member
Joined
Mar 16, 2013
Messages
228
Trophies
0
XP
284
Country
After about 5 hours of debugging I figured out that you have to call GPU_FinishDrawing before touching any depth buffer settings. Unless you want the GPU to lock up, that is.
Thanks, Nintendo!
 
  • Like
Reactions: AlbertoSONIC

Helreizer543

Well-Known Member
Newcomer
Joined
Nov 24, 2014
Messages
49
Trophies
0
Age
102
XP
119
Country
United States
Could you tell me how this funtions works?
Code:
drawCircleCircum(int cx, int cy, int x, int y, char r, char g, char b, u8* screen)

x and y are the circle's center position? And cx and cy are meant to do what exactly?

I tried out the funtion. it seems cx and cy are the circles center position. but its not creating a circle outline at all. only 4s point around the specified center. btw what are you using to debug your app?
 

AlbertoSONIC

Pasta Team Member
Member
Joined
Jun 27, 2014
Messages
927
Trophies
0
Age
52
Website
www.albertosonic.com
XP
1,396
Country
Italy
I tried out the funtion. it seems cx and cy are the circles center position. but its not creating a circle outline at all. only 4s point around the specified center. btw what are you using to debug your app?

My 3DS ;) I think i'll have to load a circle from an image instead of generating it...
 

Helreizer543

Well-Known Member
Newcomer
Joined
Nov 24, 2014
Messages
49
Trophies
0
Age
102
XP
119
Country
United States
My 3DS ;) I think i'll have to load a circle from an image instead of generating it...

so y is the radius and x is idk I put 3 and it gave me 6 pixels gonna try some other things. you could just drawFillCircle since you cant specify the thickness of the outline with the function you were trying to use.
Edit: Im gonna try and write a better function than this ^.^
 

PewnyPL

Well-Known Member
Member
Joined
Feb 2, 2014
Messages
771
Trophies
1
XP
2,210
Country
Poland
so y is the radius and x is idk I put 3 and it gave me 6 pixels gonna try some other things. you could just drawFillCircle since you cant specify the thickness of the outline with the function you were trying to use.

I think this function may be drawing an ellipsis, so the X and Y would be the two radiuses.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • BigOnYa @ BigOnYa:
    OnlyWizard&WarioFans.com
    +2
  • BakerMan @ BakerMan:
    i just want a wizard to stick his wand (whether literal or figurative is up to interpretation, either way it's either freaky or sus, or both i guess) up my ass
  • BigOnYa @ BigOnYa:
    I'm making Texas sheet cake for first time today, my Nieghbor brought us some few weeks ago and damn that's good, so I got her recipe and gonna try it today.
  • BakerMan @ BakerMan:
    mmm, sounds good
  • BigOnYa @ BigOnYa:
    Its not a brownie, and its not a cake, so what is it- Texas sheet cake.
  • BigOnYa @ BigOnYa:
    I tried making chocolate lava cakes the other day in cupcake pan, what a mess, my lava exploded out of the cakes everywhere while baking, was still ok tho, just no lava inside.
  • BigOnYa @ BigOnYa:
    We had our grandkids over yesterday and I got a small above ground swimming pool I filled for them to play in. Well today I woke to find 3 ducks swimming around in it. Don't mind really but they are annoyingly loud, quack quack. Gotta drain it today. Guess what were having for dinner, lol.
    +1
  • BakerMan @ BakerMan:
    lol
  • AncientBoi @ AncientBoi:
    BBQ'd 🦆
    +1
  • BakerMan @ BakerMan:
    also i'm sorry your molten lava cakes failed
    +2
  • BakerMan @ BakerMan:
    just looked up a pic of texas sheet cake, and it looks delicious
    +1
  • AncientBoi @ AncientBoi:
    🌋 Science Project?
  • BakerMan @ BakerMan:
    i think i might need to try making lava cakes for the 4th of july fr
    +2
  • BigOnYa @ BigOnYa:
    I used butter instead of vegetable oil, and think that's why they squirted out during baking, who knows
  • BakerMan @ BakerMan:
    yeah i think oil is the right call
    +1
  • BakerMan @ BakerMan:
    plus if you're making brownies or lava cakes for people with dairy allergies, you should use oil instead of butter anyway
    +2
  • ZeroT21 @ ZeroT21:
    @BakerMan Make me a space cake plz
  • BigOnYa @ BigOnYa:
    I make rum cake for 4th July every year, I make it a week prior and then soak it in rum in the fridge all week. I flip the cake each day, and add little more rum, it soaks it up everyday, so good.
    +2
  • BakerMan @ BakerMan:
    sorry, idk what you mean by a space cake, and even if i did, i'm not really taking requests right now, because otherwise people will get mad at me for taking a request but not making a birthday cake for @Xdqwerty (i'm sorry for that btw bro)
  • ZeroT21 @ ZeroT21:
    @BakerMan lies, you just want to smoke it

    :rofl2:
    +1
  • ZeroT21 @ ZeroT21:
    Guess all the food in my fridge can knock out a cow or two
  • ZeroT21 @ ZeroT21:
    I should visit Florida again, miss the alligator barbecues
  • BigOnYa @ BigOnYa:
    Me and wifey was deciding on our next vacation, so I hung up a map on the wall, and give her a dart and said, wherever you hit, we will go. She threw the dart and it missed the map completely and fell into a trash can below on floor. So I said "ok Florida it is."
  • BakerMan @ BakerMan:
    @ZeroT21 ohhh a pot cake?
    +1
    BakerMan @ BakerMan: @ZeroT21 ohhh a pot cake? +1