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,285
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,033
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
721
Trophies
1
XP
3,925
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.
    BakerMan @ BakerMan: @salazarcosplay yeah cod's still up