Homebrew Homebrew Development

renhei

Well-Known Member
Newcomer
Joined
Jun 21, 2016
Messages
64
Trophies
0
XP
282
Country
United States
@erman1337 It is very likely that I'm doing something wrong then. Would you be able to look at my code and see what's wrong? Or show me code of yours where it works so I can learn from it? :)
 

nop90

Well-Known Member
Member
Joined
Jan 11, 2014
Messages
1,556
Trophies
0
Location
Rome
XP
3,136
Country
Italy
@renhei use sf2dlib o top screen and the console on bottomscreen and it will work. Or swap the two if you prefer.

What you can't do is printing with the console on the screen where you want to use the graphics. If you need text and gfx on the same screen, use sftdlib instead of the console
 

renhei

Well-Known Member
Newcomer
Joined
Jun 21, 2016
Messages
64
Trophies
0
XP
282
Country
United States
@nop90 Thank you. I'll check out sftdlib too. :) With some trial and error I figured out how to do it. Turns out that gfxInit() and sf2d_init() conflict because the latter includes gfxInitDefault() already.
 

nop90

Well-Known Member
Member
Joined
Jan 11, 2014
Messages
1,556
Trophies
0
Location
Rome
XP
3,136
Country
Italy
@nop90 Turns out that gfxInit() and sf2d_init() conflict because the latter includes gfxInitDefault() already.

Correct. Sf2dlib uses the ctrulib gpu calls but making it simpler; you can mix the two but only well knowing what you're doing. Better using only sf2dlib if you're not experienced.

If you want to use low level calls, study citro3d. It's only a little higher level than ctrulib gpu functions but it's easier. Sf2dlib is a great library but it's no more maintained afaik.
 
Last edited by nop90,
  • Like
Reactions: Joel16

renhei

Well-Known Member
Newcomer
Joined
Jun 21, 2016
Messages
64
Trophies
0
XP
282
Country
United States
I took your advice and starting learning citro3d. I learned the simple_tri and system_font examples and the accompanying shaders. Thank you!

Now I'm trying to add text to my program like before, but again I can't seem to draw and do text on the same screen...

For text I need the Y origin at the bottom:
Mtx_OrthoTilt(&projection, 0.0, 400.0, 240.0, 0.0, 0.0, 1.0, true);​

But for drawing triangles I need the Y origin at the top:
Mtx_OrthoTilt(&projection, 0.0, 400.0, 0.0, 240.0, 0.0, 1.0, true);​

If I change the origin for either, it doesn't work. How can I draw triangles with the Y origin at the bottom?
 
Last edited by renhei,

renhei

Well-Known Member
Newcomer
Joined
Jun 21, 2016
Messages
64
Trophies
0
XP
282
Country
United States
Is there any decent library for text?? SFTD is too buggy, I gave up on trying to use citro3d because, like the text console, I still couldn't have anything but text on one screen. The only other thing I've found is STB, but I haven't made any progress on figuring out how to use it from examples because I'm so exhausted from trying and failing so much to just draw text... If it sounds like I'm exasperated, I am. ><
 
  • Like
Reactions: Joel16

Gizametalman

Banned!
Banned
Joined
Dec 18, 2015
Messages
974
Trophies
0
Age
30
Location
D.F. - Zona Cero.
XP
730
Country
Mexico
Hallo, I want to ask something:

Is this going to help me to develop many stuff?
I'm interested in homebrew games, and one or two personal use homebrew apps. The first one being a digital painting app, and the other... I dunno... I'll see later.
 

nop90

Well-Known Member
Member
Joined
Jan 11, 2014
Messages
1,556
Trophies
0
Location
Rome
XP
3,136
Country
Italy
Is there any decent library for text?? SFTD is too buggy, I gave up on trying to use citro3d because, like the text console, I still couldn't have anything but text on one screen. The only other thing I've found is STB, but I haven't made any progress on figuring out how to use it from examples because I'm so exhausted from trying and failing so much to just draw text... If it sounds like I'm exasperated, I am. ><

SDL and SDL_TTF are now stable and they are easy to use.
 

YugamiSekai

Mr. Picross
Member
Joined
Dec 24, 2014
Messages
2,015
Trophies
1
Age
22
XP
2,386
Country
United States
Code:
c:/(path)/citro3d-master/source/base.c: In function 'C3Di_FinalizeFrame':
c:/(path)/citro3d-master/source/base.c:275:2: error: 'GPUCMD_Finalize' is deprecated [-Werror=deprecated-declarations]
  GPUCMD_Finalize();
  ^~~~~~~~~~~~~~~
In file included from C:\devkitPro\libctru/include/3ds.h:69:0,
                 from c:/(Path)/citro3d-master/include/c3d/types.h:3,
                 from c:/(Path)/citro3d-master/include/c3d/attribs.h:2,
                 from c:/(Path)/citro3d-master/source/internal.h:2,
                 from c:/(Path)/citro3d-master/source/base.c:1:
C:\devkitPro\libctru/include/3ds/gpu/gpu.h:81:17: note: declared here
 DEPRECATED void GPUCMD_Finalize(void);
                 ^~~~~~~~~~~~~~~
cc1.exe: all warnings being treated as errors
make[1]: *** [base.o] Error 1
make: *** [build] Error 2
Should I remove -Werror?
 

nop90

Well-Known Member
Member
Joined
Jan 11, 2014
Messages
1,556
Trophies
0
Location
Rome
XP
3,136
Country
Italy
Code:
c:/(path)/citro3d-master/source/base.c: In function 'C3Di_FinalizeFrame':
c:/(path)/citro3d-master/source/base.c:275:2: error: 'GPUCMD_Finalize' is deprecated [-Werror=deprecated-declarations]
  GPUCMD_Finalize();
  ^~~~~~~~~~~~~~~
In file included from C:\devkitPro\libctru/include/3ds.h:69:0,
                 from c:/(Path)/citro3d-master/include/c3d/types.h:3,
                 from c:/(Path)/citro3d-master/include/c3d/attribs.h:2,
                 from c:/(Path)/citro3d-master/source/internal.h:2,
                 from c:/(Path)/citro3d-master/source/base.c:1:
C:\devkitPro\libctru/include/3ds/gpu/gpu.h:81:17: note: declared here
 DEPRECATED void GPUCMD_Finalize(void);
                 ^~~~~~~~~~~~~~~
cc1.exe: all warnings being treated as errors
make[1]: *** [base.o] Error 1
make: *** [build] Error 2
Should I remove -Werror?

update ctrulib and citro3d
 

elhobbs

Well-Known Member
Member
Joined
Jul 28, 2008
Messages
1,044
Trophies
1
XP
3,035
Country
United States
update ctrulib and citro3d
citro3d still uses the finalize cal
update ctrulib and citro3d
citro3d still uses the finalize call - so either fix the warning or remove the warnings as error flag.
There are some notes in ctrulib for the commit that added the deprecated attribute.
- Deprecated GPUCMD_Finalize/Run/FlushAndRun:
- Use GPUCMD_Split + GX_ProcessCommandList instead
 
  • Like
Reactions: Joel16

nop90

Well-Known Member
Member
Joined
Jan 11, 2014
Messages
1,556
Trophies
0
Location
Rome
XP
3,136
Country
Italy
Strange, I updated everthing this week and had no problems

--------------------- MERGED ---------------------------

Oh yes, I remember. I used the Next branch, not the master, of citro 3d

You could try with it, it'a a developement version bur seems to be stable
 

NO_ob

Well-Known Member
Member
Joined
Apr 16, 2017
Messages
155
Trophies
0
Age
25
XP
306
Country
Which programming languages should I learn to start out with 3ds development?? Some point down the line I want to try and build a custom firmware I imagine it will be a huge task but where would be a good place to start
 

nop90

Well-Known Member
Member
Joined
Jan 11, 2014
Messages
1,556
Trophies
0
Location
Rome
XP
3,136
Country
Italy
Which programming languages should I learn to start out with 3ds development?? Some point down the line I want to try and build a custom firmware I imagine it will be a huge task but where would be a good place to start

definively start with C.

But if you already don't know coding, CFW or 3ds coding is not for for you. Try first a simple hello world program on windows (or linux.)
 

catlover007

Developer
Developer
Joined
Oct 23, 2015
Messages
722
Trophies
1
XP
3,974
Country
Germany
As a C# developper i wonder if developping using mono on 3ds will be possible one day
It's possible if you manage to obtain a copy of Unity for 3DS from some shady source. But in this case you may not publish your game on this site(or on most most sites). This method isn't recommended. Porting Mono by yourself would be a huge undertakement. There exist some tools which convert C# to C++(Unity has it's own and uses it for it's mobile platforms including the 3DS) but I doubt those are suitable for 3DS development.
Which programming languages should I learn to start out with 3ds development?? Some point down the line I want to try and build a custom firmware I imagine it will be a huge task but where would be a good place to start
There are two major programming languages in the 3DS dev scene: C and C++. Besides these two it's also possible to program in Lua but this is limited to normal applications. And really, writing a custom firmware doesn't only need a good programming skills but also great knowledge about the 3DS architecture. If your'e just starting, writing a CFW in near future is an unrealistc goal.
But if you're still interested in homebrew programming I recommend you to simply start by learning Lua for the PC.

EDIT: ah, I was ninjaed. C is also an option, but if you're a total beginner, I would definitely recommend Lua over C
 
Last edited by catlover007,

NO_ob

Well-Known Member
Member
Joined
Apr 16, 2017
Messages
155
Trophies
0
Age
25
XP
306
Country
It's possible if you manage to obtain a copy of Unity for 3DS from some shady source. But in this case you may not publish your game on this site(or on most most sites). This method isn't recommended. Porting Mono by yourself would be a huge undertakement. There exist some tools which convert C# to C++(Unity has it's own and uses it for it's mobile platforms including the 3DS) but I doubt those are suitable for 3DS development.

There are two major programming languages in the 3DS dev scene: C and C++. Besides these two it's also possible to program in Lua but this is limited to normal applications. And really, writing a custom firmware doesn't only need a good programming skills but also great knowledge about the 3DS architecture. If your'e just starting, writing a CFW in near future is an unrealistc goal.
But if you're still interested in homebrew programming I recommend you to simply start by learning Lua for the PC.

EDIT: ah, I was ninjaed. C is also an option, but if you're a total beginner, I would definitely recommend Lua over C

I have some experience with programming i did computing for 2 years at school and my first year of college and i am a quick learner do you know what would be some good places so start learning c and c++ is it worth buying textbooks??
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • Jayro @ Jayro:
    The phat model had amazingly loud speakers tho.
    +1
  • SylverReZ @ SylverReZ:
    @Jayro, I don't see whats so special about the DS ML, its just a DS lite in a phat shell. At least the phat model had louder speakers, whereas the lite has a much better screen.
    +1
  • SylverReZ @ SylverReZ:
    They probably said "Hey, why not we combine the two together and make a 'new' DS to sell".
  • Veho @ Veho:
    It's a DS Lite in a slightly bigger DS Lite shell.
    +1
  • Veho @ Veho:
    It's not a Nintendo / iQue official product, it's a 3rd party custom.
    +1
  • Veho @ Veho:
    Nothing special about it other than it's more comfortable than the Lite
    for people with beefy hands.
    +1
  • Jayro @ Jayro:
    I have yaoi anime hands, very lorge but slender.
  • Jayro @ Jayro:
    I'm Slenderman.
  • Veho @ Veho:
    I have hands.
  • BakerMan @ BakerMan:
    imagine not having hands, cringe
    +1
  • AncientBoi @ AncientBoi:
    ESPECIALLY for things I do to myself :sad:.. :tpi::rofl2: Or others :shy::blush::evil:
    +1
  • The Real Jdbye @ The Real Jdbye:
    @SylverReZ if you could find a v5 DS ML you would have the best of both worlds since the v5 units had the same backlight brightness levels as the DS Lite unlockable with flashme
  • The Real Jdbye @ The Real Jdbye:
    but that's a long shot
  • The Real Jdbye @ The Real Jdbye:
    i think only the red mario kart edition phat was v5
  • BigOnYa @ BigOnYa:
    A woman with no arms and no legs was sitting on a beach. A man comes along and the woman says, "I've never been hugged before." So the man feels bad and hugs her. She says "Well i've also never been kissed before." So he gives her a kiss on the cheek. She says "Well I've also never been fucked before." So the man picks her up, and throws her in the ocean and says "Now you're fucked."
    +2
  • BakerMan @ BakerMan:
    lmao
  • BakerMan @ BakerMan:
    anyways, we need to re-normalize physical media

    if i didn't want my games to be permanent, then i'd rent them
    +1
  • BigOnYa @ BigOnYa:
    Agreed, that why I try to buy all my games on disc, Xbox anyways. Switch games (which I pirate tbh) don't matter much, I stay offline 24/7 anyways.
  • AncientBoi @ AncientBoi:
    I don't pirate them, I Use Them :mellow:. Like I do @BigOnYa 's couch :tpi::evil::rofl2:
    +1
  • cearp @ cearp:
    @BakerMan - you can still "own" digital media, arguably easier and better than physical since you can make copies and backups, as much as you like.

    The issue is DRM
  • cearp @ cearp:
    You can buy drm free games / music / ebooks, and if you keep backups of your data (like documents and family photos etc), then you shouldn't lose the game. but with a disk, your toddler could put it in the toaster and there goes your $60

    :rofl2:
  • cearp @ cearp:
    still, I agree physical media is nice to have. just pointing out the issue is drm
  • rqkaiju2 @ rqkaiju2:
    i like physical media because it actually feels like you own it. thats why i plan on burning music to cds
    rqkaiju2 @ rqkaiju2: i like physical media because it actually feels like you own it. thats why i plan on burning...