Homebrew Homebrew Development

  • Thread starter Thread starter aliak11
  • Start date Start date
  • Views Views 1,475,505
  • Replies Replies 6,048
  • Likes Likes 54
smh not using Linux

3341f4be2e074135affd6b3ad0e0bd70.png

-v doesn't work due to compiling issues that I was too lazy to fix; rest should work fine.

Edit: does Windows really think it's a virus <.<
Thanks! I finally got this homebrew to compile.
 
One more thing, how was an obj converted for use in Citro3D homebrew. Like this one in the loop_subdivision example:

Code:
static const vertex vertex_list[] =
{
	/*0*/ FACE(0.500000, 0.000000, -0.500000, 1.000000, 0.000000, 7),
	/*1*/ FACE(0.500000, 1.000000, 0.500000, 0.000000, 1.000000, 6),
	/*2*/ FACE(0.500000, 0.000000, 0.500000, 0.000000, 0.000000, 3),
	/*3*/ FACE(0.500000, 1.000000, 0.000000, 0.500000, 1.000000, 7),
	/*4*/ FACE(0.500000, 1.000000, -0.500000, 1.000000, 1.000000, 4),
	/*5*/ FACE(0.500000, 0.000000, -0.500000, 0.000000, 0.000000, 7),
	/*6*/ FACE(-0.500000, 1.000000, -0.500000, 1.000000, 1.000000, 5),
	/*7*/ FACE(0.500000, 1.000000, -0.500000, 0.000000, 1.000000, 4),
	/*8*/ FACE(-0.500000, 0.000000, -0.500000, 1.000000, 0.000000, 4),
	/*9*/ FACE(0.500000, 0.000000, -0.500000, 0.000000, 0.000000, 7),
	/*10*/ FACE(-0.500000, 0.000000, 0.500000, 1.000000, 1.000000, 6),
	/*11*/ FACE(-0.500000, 0.000000, -0.500000, 0.000000, 1.000000, 4),
	/*12*/ FACE(0.500000, 0.000000, 0.500000, 1.000000, 0.000000, 3),
	/*13*/ FACE(0.500000, 1.000000, 0.500000, 1.000000, 1.000000, 6),
	/*14*/ FACE(-0.500000, 0.000000, 0.500000, 0.000000, 0.000000, 6),
	/*15*/ FACE(0.500000, 0.000000, 0.500000, 1.000000, 0.000000, 3),
	/*16*/ FACE(-0.500000, 1.000000, 0.500000, 0.000000, 1.000000, 4),
	/*17*/ FACE(0.000000, 1.000000, 0.500000, 0.500000, 1.000000, 5),
	/*18*/ FACE(0.500000, 1.000000, 0.000000, -0.500000, -1.000000, 7),
	/*19*/ FACE(0.000000, 1.000000, 0.500000, -1.000000, -0.500000, 5),
	/*20*/ FACE(0.500000, 1.000000, 0.500000, -1.000000, -1.000000, 6),
	/*21*/ FACE(0.500000, 1.000000, 0.000000, -0.292893, 1.000000, 7),
	/*22*/ FACE(0.250000, 2.000000, 0.250000, -0.646447, 2.000000, 6),
	/*23*/ FACE(0.000000, 1.000000, 0.500000, -1.000000, 1.000000, 5),
	/*24*/ FACE(0.500000, 2.000000, -0.500000, 1.168140, 2.007650, 5),
	/*25*/ FACE(0.250000, 2.000000, 0.250000, 0.377571, 2.007650, 6),
	/*26*/ FACE(0.500000, 1.000000, 0.000000, 0.693799, 0.995223, 7),
	/*27*/ FACE(0.500000, 3.000000, -0.500000, 0.790569, 3.000000, 3),
	/*28*/ FACE(0.250000, 2.000000, 0.250000, 0.000000, 2.000000, 6),
	/*29*/ FACE(0.500000, 2.000000, -0.500000, 0.790569, 2.000000, 5),
	/*30*/ FACE(0.500000, 3.000000, -0.500000, -0.646447, 2.224740, 3),
	/*31*/ FACE(-0.250000, 2.000000, -0.250000, -1.000000, 1.000000, 5),
	/*32*/ FACE(0.250000, 2.000000, 0.250000, -0.292893, 1.000000, 6),
	/*33*/ FACE(0.500000, 3.000000, -0.500000, -1.790570, 3.000000, 3),
	/*34*/ FACE(0.500000, 2.000000, -0.500000, -1.790570, 2.000000, 5),
	/*35*/ FACE(-0.250000, 2.000000, -0.250000, -1.000000, 2.000000, 5),
	/*36*/ FACE(0.500000, 2.000000, -0.500000, -0.746753, 2.015790, 5),
	/*37*/ FACE(0.000000, 1.000000, -0.500000, -0.272411, 1.003370, 6),
	/*38*/ FACE(-0.250000, 2.000000, -0.250000, 0.043816, 2.015790, 5),
	/*39*/ FACE(0.000000, 1.000000, -0.500000, 0.707107, 1.000000, 6),
	/*40*/ FACE(0.500000, 2.000000, -0.500000, 0.353553, 2.060660, 5),
	/*41*/ FACE(0.500000, 1.000000, 0.000000, 0.000000, 1.000000, 7),
	/*42*/ FACE(0.500000, 1.000000, 0.000000, 0.500000, -1.000000, 7),
	/*43*/ FACE(0.500000, 1.000000, -0.500000, 1.000000, -1.000000, 4),
	/*44*/ FACE(0.000000, 1.000000, -0.500000, 1.000000, -0.500000, 6),
	/*45*/ FACE(0.000000, 1.000000, -0.500000, 0.500000, 1.000000, 6),
	/*46*/ FACE(0.000000, 1.000000, -0.500000, 1.000000, 0.500000, 6),
	/*47*/ FACE(-0.500000, 1.000000, 0.000000, 0.500000, 1.000000, 8),
	/*48*/ FACE(-0.500000, 0.000000, -0.500000, 0.000000, 0.000000, 4),
	/*49*/ FACE(-0.500000, 1.000000, -0.500000, 0.000000, 1.000000, 5),
	/*50*/ FACE(-0.500000, 0.000000, 0.500000, 1.000000, 0.000000, 6),
	/*51*/ FACE(-0.500000, 1.000000, 0.500000, 1.000000, 1.000000, 4),
	/*52*/ FACE(0.000000, 1.000000, 0.500000, -1.000000, 0.500000, 5),
	/*53*/ FACE(-0.500000, 1.000000, 0.000000, -0.500000, 1.000000, 8),
	/*54*/ FACE(-0.500000, 1.000000, 0.500000, -1.000000, 1.000000, 4),
	/*55*/ FACE(0.250000, 2.000000, 0.250000, 0.353553, 1.885620, 6),
	/*56*/ FACE(-0.500000, 1.000000, 0.000000, -0.353553, 0.824958, 8),
	/*57*/ FACE(0.000000, 1.000000, 0.500000, 0.353553, 0.824958, 5),
	/*58*/ FACE(-0.250000, 2.000000, -0.250000, -0.353553, 1.885620, 5),
	/*59*/ FACE(0.000000, 1.000000, -0.500000, -1.707110, 1.000000, 6),
	/*60*/ FACE(-0.500000, 1.000000, 0.000000, -1.000000, 1.000000, 8),
	/*61*/ FACE(-0.250000, 2.000000, -0.250000, -1.353550, 2.000000, 5),
};

static const s16 index_list[] =
{
	22, /**/ 0, 1, 2, /**/ 17,3,4,1,2,6,8,10, /**/ 0,10,16,0,2,3,17, /**/ 8,10,1,0,
	26, /**/ 1, 0, 3, /**/ 10,2,10,0,3,16,17, /**/ 37,4,6,1,2,3,8,10, /**/ 16,17,22,0,1,4,24,37,
	24, /**/ 3, 0, 4, /**/ 2,1,17,0,4,22,24,37, /**/ 37,6,8,1,2,3,4,10, /**/ 24,37,6,0,3,
	22, /**/ 5, 6, 7, /**/ 47,8,10,1,2,3,4,6, /**/ 3,37,47,0,4,8, /**/ 1,3,37,0,6,
	22, /**/ 6, 5, 8, /**/ 3,4,37,0,8,47, /**/ 47,10,2,1,3,4,6,8, /**/ 37,47,10,0,6,
	23, /**/ 9, 10, 11, /**/ 1,2,1,3,4,6,8,10, /**/ 6,47,16,0,1,2,8, /**/ 4,6,47,0,10,
	22, /**/ 10, 9, 12, /**/ 6,8,47,0,1,2,16, /**/ 10,1,3,2,4,6,8,10, /**/ 16,1,0,10,
	21, /**/ 13, 14, 15, /**/ 47,16,17,0,2,3,10, /**/ 1,0,8,1,2,16,47, /**/ 3,0,10,1,
	22, /**/ 14, 13, 16, /**/ 0,2,0,1,8,16,47, /**/ 47,17,3,0,2,10,16, /**/ 8,47,17,1,10,
	21, /**/ 16, 13, 17, /**/ 2,10,47,1,17, /**/ 22,3,0,2,10,16,17, /**/ 10,47,22,1,3,16,
	24, /**/ 18, 19, 20, /**/ 47,22,24,0,1,4,17,37, /**/ 10,16,47,1,3,22, /**/ 4,0,2,3,10,16,17,
	24, /**/ 21, 22, 23, /**/ 27,24,37,0,1,4,17,22, /**/ 16,47,31,3,17,24,27, /**/ 0,1,16,3,22,47,
	24, /**/ 24, 25, 26, /**/ 31,27,31,3,22,37, /**/ 1,17,47,3,24,27,31, /**/ 31,37,4,0,1,17,22,24,
	20, /**/ 27, 28, 29, /**/ 47,31,24,22, /**/ 37,3,17,24,27,31,47, /**/ 22,31,37,3,22,27,
	20, /**/ 30, 31, 32, /**/ 37,24,22,31, /**/ 17,47,37,22,24,27, /**/ 31,24,3,17,27,31,47,
	19, /**/ 33, 34, 35, /**/ 3,22,31,24, /**/ 47,37,3,22,27,31, /**/ 24,22,47,24,27,37,
	22, /**/ 36, 37, 38, /**/ 4,3,22,27,31,37, /**/ 22,47,6,3,4,24,31, /**/ 22,27,22,24,37,47,
	24, /**/ 39, 40, 41, /**/ 27,31,47,3,4,6,24, /**/ 17,22,27,3,31,37, /**/ 6,4,0,1,17,22,24,37,
	23, /**/ 42, 43, 44, /**/ 6,0,1,4,17,22,24,37, /**/ 47,6,0,3,37, /**/ 22,24,31,3,4,6,47,
	21, /**/ 7, 6, 45, /**/ 8,0,3,6,37, /**/ 31,47,8,0,4,37, /**/ 0,3,24,4,6,31,47,
	25, /**/ 46, 6, 47, /**/ 0,4,3,6,24,31,47, /**/ 10,8,0,4,37,47, /**/ 24,31,22,6,8,10,16,17,37,
	23, /**/ 48, 47, 49, /**/ 16,10,0,6,47, /**/ 4,37,31,6,8,10,16,17,22, /**/ 10,0,4,8,37,47,
	24, /**/ 50, 47, 48, /**/ 17,16,1,0,2,8,47, /**/ 0,6,37,8,10,16,17,22,31, /**/ 2,0,6,10,47,
	24, /**/ 47, 50, 51, /**/ 0,8,6,10,16,17,22,31,37, /**/ 17,1,2,0,8,16,47, /**/ 22,17,1,10,47,
	23, /**/ 52, 53, 54, /**/ 31,22,3,1,16,47, /**/ 1,10,8,6,16,17,22,31,37, /**/ 3,1,10,17,47,
	25, /**/ 55, 56, 57, /**/ 37,31,27,3,17,24,47, /**/ 1,16,10,6,8,17,22,31,37, /**/ 24,3,1,16,22,47,
	25, /**/ 56, 55, 58, /**/ 3,17,16,6,8,10,22,31,37, /**/ 24,27,24,3,17,31,47, /**/ 6,37,24,22,27,47,
	25, /**/ 59, 60, 61, /**/ 8,6,4,3,24,31,47, /**/ 27,22,17,6,8,10,16,31,37, /**/ 3,24,27,22,37,47,
};

I can look at the obj file made by blender in a text editor, but I don't know which coordinate goes where.

EDIT: I also don't know what the "index_list" array is.
 
Hello! I'm having trouble compiling my program, it says
Code:
make[1]: *** No rule to make target `citra.png.o', needed by `/c/Users/XXX/Documents/3ds/3DSPROJECT/output/3DSPROJECT.elf'.  Stop.
make: *** [all] Error 2
The error happens when I want to compile and have a "data" folder with a file named "citra.png". It is the first error to show up, and doesn't even compile the main.cpp file.
EDIT: I'm using this template
 
Last edited by cheuble,
Can I call the GX_DMA function a number of times in a row without having to call the waitforDMA function each time? Are such GX functions set up in a queue form that is actively processed?

Also, I recall having a problem with the waitfor<x> functions, specifically with DMA, where if there wasn't something already being processed, and I called that function, it would lock up my program.
 
Can I call the GX_DMA function a number of times in a row without having to call the waitforDMA function each time? Are such GX functions set up in a queue form that is actively processed?

https://www.3dbrew.org/wiki/GSP_Shared_Memory#Command_Header
https://github.com/smealum/ctrulib/blob/master/libctru/source/gpu/gx.c and
https://github.com/smealum/ctrulib/blob/master/libctru/source/services/gspgpu.c#L193

There seem to be 15 slots for GX transfer commands(I didn't know that before I checked the source code), but I didn't test it, so maybe I'm wrong.

Also, I recall having a problem with the waitfor<x> functions, specifically with DMA, where if there wasn't something already being processed, and I called that function, it would lock up my program.

Yes, I know this. If you really have to check when a request has been finished, you can register a callback function(https://github.com/smealum/ctrulib/blob/master/libctru/include/3ds/services/gspgpu.h#L73)
 
Hello! I'm having problems with my project, I assume it's memory leaks. When quitting the CIA, the console crashes. Could someone figure out the problem? My source code is here
 
I would recommend you to change the vector type from char* to const char*. You're adding constant strings to the buffers, but the pointers look like there are in a modifiable memory region. This may lead to very hard to find bugs.

EDIT: Why aren't you using std::string, it's much more safe.
 
Last edited by catlover007,
I would recommend you to change the vector type from char* to const char*. You're adding constant strings to the buffers, but the pointers look like there are in a modifiable memory region. This may lead to very hard to find bugs.

EDIT: Why aren't you using std::string, it's much more safe.
Thank you so much, I'll do that right now
 
I posted about this before and got no replies so I'll probably just get ignored again but I thought I'd try just one last time before giving up completely. Could anyone possibly zip their libctru, libsftd, and libsf2d folders from devkitpro and share it? Assuming you're able to compile stuff. Thanks in advance if anyone would do this.
 
Is there a good dsp audio example program? I heard csnd is deprecated.
https://gbatemp.net/threads/ndsp-minimal-example.405907/ -> https://github.com/CurryGuy/ndsp-example/blob/master/source/main.cpp
(in that example, use that fix:
"The reinterpret_cast in not needed at all (at least with latest ctrulib), this fixes the issue:
waveBuf.data_vaddr = (const void*)data;" )

I posted about this before and got no replies so I'll probably just get ignored again but I thought I'd try just one last time before giving up completely. Could anyone possibly zip their libctru, libsftd, and libsf2d folders from devkitpro and share it? Assuming you're able to compile stuff. Thanks in advance if anyone would do this.
I haven't any libsftd, and libsf2d folders in /devkitpro
 

Attachments

Last edited by RealityNinja,
  • Like
Reactions: cheuble

Site & Scene News

Popular threads in this forum