Homebrew Homebrew Development

MeisterFenster

Well-Known Member
Member
Joined
Nov 18, 2014
Messages
168
Trophies
0
Age
28
XP
165
Country
Gambia, The
Do I need any extensions/programs to build ctrulib using the Windows CMD? Because I am getting an Error 127 and command not found when I run make clean and make. Any Ideas how I can get this working?
 

themperror

Well-Known Member
Member
Joined
Aug 12, 2009
Messages
181
Trophies
0
XP
367
Country
Netherlands
So I have ordered Cubic Ninja today, now to wait until I get it and then patch my 9.2 E 3DS.
Since I know quite some c++ I wanted to make homebrew games. After having a quick read through a few pages..
What do we have to use as in libraries?

Do we need to use raw memory to edit the framebuffer?
Is there a 2D/3D engine to work with?
if there is, Is it nice to work with or complicated?
Can we access networking code? ( for a multiplayer game?)

I saw CTRULib or something like that?
is there a nice overview page for it? (Documentation anything?)
 

Duo8

Well-Known Member
Member
Joined
Jul 16, 2013
Messages
3,613
Trophies
2
XP
3,022
Country
Vietnam
So I have ordered Cubic Ninja today, now to wait until I get it and then patch my 9.2 E 3DS.
Since I know quite some c++ I wanted to make homebrew games. After having a quick read through a few pages..
What do we have to use as in libraries?

Do we need to use raw memory to edit the framebuffer?
Is there a 2D/3D engine to work with?
if there is, Is it nice to work with or complicated?
Can we access networking code? ( for a multiplayer game?)

I saw CTRULib or something like that?
is there a nice overview page for it? (Documentation anything?)

https://github.com/smealum/ctrulib
 
  • Like
Reactions: Margen67

minexew

ayy lmao
Member
Joined
Mar 16, 2013
Messages
228
Trophies
0
XP
284
Country
I convert the string to a char[] that works with sprintf, any less hacky way you know?

c_str() works for getting data out of std::string, but definitely not the other way around. The fact that you had to use const_cast should be a huge hint that something is wrong.
The code should go something like this:
Code:
size_t maxContentLength = 1377; // whatever
char* content = (char*) malloc(maxContentLength + 1);
 
size_t amountReceived = ReceiveData(content, maxContentLength);
content[amountReceived] = 0;
 
std::string s(content);
free(content);

There is probably a simpler way to do this (allocating directly in the std::string), but I'm not that familiar with the STL.
 
  • Like
Reactions: filfat

filfat

CTO @ Nordcom Group Inc.
Member
Joined
Nov 24, 2012
Messages
1,261
Trophies
1
Location
Gothenburg, Sweden
Website
www.sweetsideofsweden.com
XP
1,749
Country
Sweden
c_str() works for getting data out of std::string, but definitely not the other way around. The fact that you had to use const_cast should be a huge hint that something is wrong.
The code should go something like this:
Code:
size_t maxContentLength = 1377; // whatever
char* content = (char*) malloc(maxContentLength + 1);
 
size_t amountReceived = ReceiveData(content, maxContentLength);
content[amountReceived] = 0;
 
std::string s(content);
free(content);

There is probably a simpler way to do this (allocating directly in the std::string), but I'm not that familiar with the STL.
I actually copied the code and totally missed the const part, will look into it now
 

filfat

CTO @ Nordcom Group Inc.
Member
Joined
Nov 24, 2012
Messages
1,261
Trophies
1
Location
Gothenburg, Sweden
Website
www.sweetsideofsweden.com
XP
1,749
Country
Sweden
c_str() works for getting data out of std::string, but definitely not the other way around. The fact that you had to use const_cast should be a huge hint that something is wrong.
The code should go something like this:
Code:
size_t maxContentLength = 1377; // whatever
char* content = (char*) malloc(maxContentLength + 1);
 
size_t amountReceived = ReceiveData(content, maxContentLength);
content[amountReceived] = 0;
 
std::string s(content);
free(content);

There is probably a simpler way to do this (allocating directly in the std::string), but I'm not that familiar with the STL.
you cant convert u8* char* (almost have no idea how char works as I use string for everything string related, I mean who the heck uses char :P)
Right?
 

minexew

ayy lmao
Member
Joined
Mar 16, 2013
Messages
228
Trophies
0
XP
284
Country
you cant convert u8* char* (almost have no idea how char works as I use string for everything string related, I mean who the heck uses char :P)
Right?

For the purpose of storing ASCII strings, those two are technically interchangeable, but you should use char for CHARacter data (e.g. text) and u8 for binary data.
 

filfat

CTO @ Nordcom Group Inc.
Member
Joined
Nov 24, 2012
Messages
1,261
Trophies
1
Location
Gothenburg, Sweden
Website
www.sweetsideofsweden.com
XP
1,749
Country
Sweden
For the purpose of storing ASCII strings, those two are technically interchangeable, but you should use char for CHARacter data (e.g. text) and u8 for binary data.
Yeah but the function wants a u8 so I have no choice. And I'm not going near chars ever again. String is everything I need. FUCK chars.
 

MeisterFenster

Well-Known Member
Member
Joined
Nov 18, 2014
Messages
168
Trophies
0
Age
28
XP
165
Country
Gambia, The
I reinstalled msys and also installed all of the c++ and c components but it is still giving me an error:

make clean:

make: echo: command not found
make: *** [clean] Error 127

make

make: make: Command not found
make: *** [build] Error 127

I searched google, but I cant find a solution, any Idea how I can build this thing to start coding?
 

MeisterFenster

Well-Known Member
Member
Joined
Nov 18, 2014
Messages
168
Trophies
0
Age
28
XP
165
Country
Gambia, The
I tried using the cmd (as said on 3dbrew) and from msys (that batch, that opens a terminal window should be right, I guess?)

Sorry for all my questions but I have never done something like that before, I am used to Visual Studio and clicking a button to compile^^
 

minexew

ayy lmao
Member
Joined
Mar 16, 2013
Messages
228
Trophies
0
XP
284
Country
I tried using the cmd (as said on 3dbrew) and from msys (that batch, that opens a terminal window should be right, I guess?)

Sorry for all my questions but I have never done something like that before, I am used to Visual Studio and clicking a button to compile^^

You should
- run msys.bat
- ensure $PATH contains devkitPro/devkitARM/bin (note that you need to use UNIX shell syntax now because you're not in cmd)
- go to the right directory and run make

If it still doesn't work, post the complete output including all of your previous commands.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: damn wifi