Homebrew Homebrew Development

daxtsu

Well-Known Member
Member
Joined
Jun 9, 2007
Messages
5,627
Trophies
2
XP
5,194
Country
Antarctica
Oh.
I updated the payload (I mean, launched from hbl cia, so it got a new one) and it worked.

Though shouldn't it work in a CIA too?
What do I have to do to extract the ndsp binary?

CIAs don't have a DSP firmware by default, no. The user has to provide their own by either:
  1. Using Braindump to dump some Nintendo app like 3DS Sound and then dumping it from code.bin using RetroArch, or using a hex editor
  2. Using Rinnegatamante's DSP dumper (much easier, and I'd recommend it over #1)

Then it gets stuck in /3ds on the SD card as "dspfirm.cdc". ctrulib will handle loading it automatically afterwards.
 
Last edited by daxtsu,
  • Like
Reactions: Spaqin

Spaqin

Well-Known Member
Member
Joined
Feb 17, 2015
Messages
123
Trophies
0
Age
29
XP
199
Country
Poland
CIAs don't have a DSP firmware by default, no. The user has to provide their own by either:
  1. Using Braindump to dump some Nintendo app like 3DS Sound and then dumping it from code.bin using RetroArch, or using a hex editor
  2. Using Rinnegatamante's DSP dumper (much easier, and I'd recommend it over #1)

Then it gets stuck in /3ds on the SD card as "dspfirm.cdc". ctrulib will handle loading it automatically afterwards.

I guess I can't include that, every user has to do it by themselves?

Well, it works now :^) I should implement mp3/ogg support though, music WAVs will be too big.
 

Rinnegatamante

Well-Known Member
Member
Joined
Nov 24, 2014
Messages
3,162
Trophies
2
Age
29
Location
Bologna
Website
rinnegatamante.it
XP
4,857
Country
Italy
I guess I can't include that, every user has to do it by themselves?

Well, it works now :^) I should implement mp3/ogg support though, music WAVs will be too big.

You can use csnd that doesn't require dsp firmware (but csnd service is a bit more "complicated" to use cause it doesn't have a lot of useful things dsp have like native stereo sound support).
 

Rinnegatamante

Well-Known Member
Member
Joined
Nov 24, 2014
Messages
3,162
Trophies
2
Age
29
Location
Bologna
Website
rinnegatamante.it
XP
4,857
Country
Italy
I'm trying to make an obj loader for citro3D usage but the code seems to crash the system. I've also tried to compile it (with some modifications) under Windows for debugging it and it doesn't print nothing on screen (not even "Opening cube.obj" also using fflush(stdout) after printf call and compiler doesn't say anything (errors/warnings)). Where i'm wrong?

Here the codes for both 3DS and PC:

3DS:
Code:
typedef struct{
   float x;
   float y;
   float z;
   float t1;
   float t2;
   float n1;
   float n2;
   float n3;
} vertex;

typedef struct{
   u32 magic;
   u8* vbo_data;
   u32 vertex_count;
   C3D_Tex* texture;
   C3D_Mtx* material;
} model;

struct vertexList{
   vertex* vert;
   vertexList* next;
};

static int lua_loadobj(lua_State *L){
   int argc = lua_gettop(L);
  #ifndef SKIP_ERROR_HANDLING
     if (argc != 6) return luaL_error(L, "wrong number of arguments");
   #endif
   const char *file_tbo = luaL_checkstring(L, 1); //Filename
   gpu_text* tex = (gpu_text*)luaL_checkinteger(L, 2);
   color* ambient = (color*)luaL_checkinteger(L, 3);
   color* diffuse = (color*)luaL_checkinteger(L, 4);
   color* specular = (color*)luaL_checkinteger(L, 5);
   float emission = luaL_checknumber(L, 6);
 
   // Opening file
   fileStream fileHandle;
   if (strncmp("romfs:/",file_tbo,7) == 0){
     fileHandle.isRomfs = true;
     FILE* handle = fopen(file_tbo,"r");
     #ifndef SKIP_ERROR_HANDLING
       if (handle == NULL) return luaL_error(L, "file doesn't exist.");
     #endif
     fileHandle.handle = (u32)handle;
   }else{
     FS_Archive sdmcArchive=(FS_Archive){ARCHIVE_SDMC, (FS_Path){PATH_EMPTY, 1, (u8*)""}};
     FS_Path filePath=fsMakePath(PATH_ASCII, file_tbo);
     Result ret=FSUSER_OpenFileDirectly(&fileHandle.handle, sdmcArchive, filePath, FS_OPEN_READ, 0x00000000);
     #ifndef SKIP_ERROR_HANDLING
       if(ret) return luaL_error(L, "error opening file");
     #endif
   }
 
   // Loading file on RAM
   u64 size;
   u32 bytesRead;
   FS_GetSize(&fileHandle, &size);
   char* content = (char*)malloc(size+1);
   FS_Read(&fileHandle, &bytesRead, 0, content, size);
   content[size] = 0;
 
   // Closing file
   FS_Close(&fileHandle);
 
   // Creating temp vertexList
   vertexList* vl = (vertexList*)malloc(sizeof(vertexList));
   vertexList* init = vl;
 
   // Parsing vertices
   char* str = content;
   char* ptr = strstr(str,"v ");
   int idx;
   char float_val[16];
   char magics[3][3] = {"v ","vt","vn"};
   int magics_idx = 0;
   vertex* res;
   int v_idx = 0;
 
   // Vertices extraction
   for(;;){
   
     // Check if a magic change is needed
     if (ptr == NULL){
       if (magics_idx < 2){
         res = NULL;
         magics_idx++;
         ptr = strstr(str,magics[magics_idx]);
       }else break;
     }
   
     // Extract vertex
     if (magics_idx == 0) idx = 0;
     else if (magics_idx == 1) idx = 3;
     else idx = 5;
     char* init_val = ptr + 2;
     char* end_vert = strstr(init_val,"\n");
     if (magics_idx == 0) res = (vertex*)malloc(sizeof(vertex));
     else if (res == NULL){
       res = init->vert;
       vl = init;
     }
     char* end_val = strstr(init_val," ");
     float* vert_args = (float*)res; // Hacky way to iterate in vertex struct   
     while (init_val < end_vert){
       if (end_val > end_vert) end_val = end_vert;
       strncpy(float_val, init_val, end_val - init_val);
       float_val[end_val - init_val] = 0;
       vert_args[idx] = atof(float_val);
       idx++;
       init_val = end_val + 1;
       end_val = strstr(init_val," ");
     }
   
     // Put vertex in vertexList struct
     if (magics_idx == 0){
       vl->vert = res;
       vl->next = (vertexList*)malloc(sizeof(vertexList));
     }
     vl = vl->next;
     if (magics_idx == 0) vl->next = NULL;
     else res = vl->vert;
   
     // Searching for next vertex
     str = ptr + 1;
     ptr = strstr(str,magics[magics_idx]);
   
   }
 
   // Creating real vertexList
   ptr = strstr(str, "f");
   vertexList* faces = (vertexList*)malloc(sizeof(vertexList));
   vertexList* initFaces = faces;
   faces->vert = NULL;
   faces->next = NULL;
   int len = 0;
   char val[8];
 
   // Faces extraction
   while (ptr != NULL){
   
     // Skipping padding
     ptr+=2;   
   
     // Extracting face info
     int f_idx = 0;
     while (f_idx < 3){
   
       // Allocating new vertex
       faces->vert = (vertex*)malloc(sizeof(vertex));
   
       // Extracting x,y,z
       char* ptr2 = strstr(ptr,"/");
       strncpy(val,ptr,ptr2-ptr);
       val[ptr2-ptr] = 0;
       int v_idx = atoi(val);
       int t_idx = 1;
       vertexList* tmp = init;
       while (t_idx < v_idx){
         tmp = tmp->next;
         t_idx++;
       }
       faces->vert->x = tmp->vert->x;
       faces->vert->y = tmp->vert->y;
       faces->vert->z = tmp->vert->z;
   
       // Extracting texture info
       ptr = ptr2+1;
       ptr2 = strstr(ptr,"/");
       strncpy(val,ptr,ptr2-ptr);
       val[ptr2-ptr] = 0;
       v_idx = atoi(val);
       t_idx = 1;
       tmp = init;
       while (t_idx < v_idx){
         tmp = tmp->next;
         t_idx++;
       }
       faces->vert->t1 = tmp->vert->t1;
       faces->vert->t2 = tmp->vert->t2;
   
       // Extracting normals info
       ptr = ptr2+1;
       if (f_idx < 2) ptr2 = strstr(ptr," ");
       else ptr2 = strstr(ptr,"\n");
       strncpy(val,ptr,ptr2-ptr);
       val[ptr2-ptr] = 0;
       v_idx = atoi(val);
       t_idx = 1;
       tmp = init;
       while (t_idx < v_idx){
         tmp = tmp->next;
         t_idx++;
       }
       faces->vert->n1 = tmp->vert->n1;
       faces->vert->n2 = tmp->vert->n2;
       faces->vert->n3 = tmp->vert->n3;
     
       // Setting values for next vertex
       ptr = ptr2;
       faces->next = (vertexList*)malloc(sizeof(vertexList));
       faces = faces->next;
       faces->next = NULL;
       faces->vert = NULL;
       len++;
     
     }
   
     ptr = strstr(ptr,"f");
   
   }
 
   // Freeing temp vertexList
   vertexList* tmp_init;
   while (init != NULL){
     tmp_init = init;
     free(init->vert);
     init = init->next;
     free(tmp_init);
   }
 
   // Create the VBO (vertex buffer object)
   u32 vertex_size = len*8*sizeof(float);
   u8* vbo_data = (u8*)linearAlloc(vertex_size);
   for(int i = 0; i < len; i++) {
     tmp_init = initFaces;
     memcpy(&vbo_data[i*sizeof(vertex)], initFaces->vert, sizeof(vertex));
     initFaces = initFaces->next;
     free(tmp_init->vert);
     free(tmp_init);
   }
 
   // Load the texture
   C3D_Tex* texture = (C3D_Tex*)linearAlloc(sizeof(C3D_Tex));
   C3D_TexInit(texture , tex->tex->pow2_w, tex->tex->pow2_h, GPU_RGBA8);
   C3D_TexUpload(texture, tex->tex->data);
   C3D_TexSetFilter(texture, GPU_LINEAR, GPU_NEAREST);
 
   // Set object material attributes
   C3D_Mtx* material = (C3D_Mtx*)linearAlloc(sizeof(C3D_Mtx));
   *material = {
     {
     { { 0.0f, ambient->r, ambient->g, ambient->b } }, // Ambient
     { { 0.0f, diffuse->r, diffuse->g, diffuse->b } }, // Diffuse
     { { 0.0f, specular->r, specular->g, specular->b } }, // Specular
     { { emission, 0.0f, 0.0f, 0.0f } }, // Emission
     }
   };
 
   // Create a model object and push it into Lua stack
   model* res_m = (model*)malloc(sizeof(model));
   res_m->vertex_count = len;
   res_m->vbo_data = vbo_data;
   res_m->magic = 0xC00FFEEE;
   res_m->texture = texture;
   res_m->material = material;
   lua_pushinteger(L, (u32)res_m);
   return 1;
}

PC:
Code:
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <malloc.h>
#include <unistd.h>
#include <fcntl.h>

#define u32 uint32_t
#define u8 uint8_t

typedef struct{
   float x;
   float y;
   float z;
   float t1;
   float t2;
   float n1;
   float n2;
   float n3;
} vertex;

struct vertexList{
   vertex* vert;
   vertexList* next;
};

int main(int argc,char** argv){
 
   // Opening file
   printf("Opening cube.obj\n");
   FILE* input = fopen("cube.obj","r");
   fseek(input, 0, SEEK_END);
   int size = ftell(input);
   fseek(input, 0, SEEK_SET);
 
   // Loading file on RAM
   printf("Loading file on RAM\n");
   char* content = (char*)malloc(size+1);
   fread(content, size, 1, input);
   content[size] = 0;
   fclose(input);
 
   // Creating temp vertexList
   vertexList* vl = (vertexList*)malloc(sizeof(vertexList));
   vertexList* init = vl;
 
   // Parsing vertices
   printf("Parsing vertices\n");
   char* str = content;
   char* ptr = strstr(str,"v ");
   int idx;
   char float_val[16];
   char magics[3][3] = {"v ","vt","vn"};
   int magics_idx = 0;
   vertex* res;
   int v_idx = 0;
 
   // Vertices extraction
   for(;;){
   
     // Check if a magic change is needed
     if (ptr == NULL){
       if (magics_idx < 2){
         res = NULL;
         magics_idx++;
         printf("Swapping to magic_idx=%i\n",magics_idx);
         ptr = strstr(str,magics[magics_idx]);
       }else break;
     }
   
     // Extract vertex
     if (magics_idx == 0) idx = 0;
     else if (magics_idx == 1) idx = 3;
     else idx = 5;
     char* init_val = ptr + 2;
     char* end_vert = strstr(init_val,"\n");
     if (magics_idx == 0) res = (vertex*)malloc(sizeof(vertex));
     else if (res == NULL){
       res = init->vert;
       vl = init;
     }
     char* end_val = strstr(init_val," ");
     float* vert_args = (float*)res; // Hacky way to iterate in vertex struct   
     while (init_val < end_vert){
       if (end_val > end_vert) end_val = end_vert;
       strncpy(float_val, init_val, end_val - init_val);
       float_val[end_val - init_val] = 0;
       printf("vert_val: %s",float_val);
       vert_args[idx] = atof(float_val);
       idx++;
       init_val = end_val + 1;
       end_val = strstr(init_val," ");
     }
   
     // Put vertex in vertexList struct
     if (magics_idx == 0){
       printf("putting values in vertexList..\n");
       vl->vert = res;
       vl->next = (vertexList*)malloc(sizeof(vertexList));
     }
     vl = vl->next;
     if (magics_idx == 0) vl->next = NULL;
     else res = vl->vert;
   
     // Searching for next vertex
     str = ptr + 1;
     ptr = strstr(str,magics[magics_idx]);
   
   }
 
   // Creating real vertexList
   printf("real vertexList creation...\n",float_val);
   ptr = strstr(str, "f");
   vertexList* faces = (vertexList*)malloc(sizeof(vertexList));
   vertexList* initFaces = faces;
   faces->vert = NULL;
   faces->next = NULL;
   int len = 0;
   char val[8];
 
   // Faces extraction
   while (ptr != NULL){
   
     // Skipping padding
     ptr+=2;   
   
     // Extracting face info
     int f_idx = 0;
     while (f_idx < 3){
   
       // Allocating new vertex
       faces->vert = (vertex*)malloc(sizeof(vertex));
   
       // Extracting x,y,z
       char* ptr2 = strstr(ptr,"/");
       strncpy(val,ptr,ptr2-ptr);
       val[ptr2-ptr] = 0;
       int v_idx = atoi(val);
       int t_idx = 1;
       vertexList* tmp = init;
       while (t_idx < v_idx){
         tmp = tmp->next;
         t_idx++;
       }
       faces->vert->x = tmp->vert->x;
       faces->vert->y = tmp->vert->y;
       faces->vert->z = tmp->vert->z;
   
       // Extracting texture info
       ptr = ptr2+1;
       ptr2 = strstr(ptr,"/");
       strncpy(val,ptr,ptr2-ptr);
       val[ptr2-ptr] = 0;
       v_idx = atoi(val);
       t_idx = 1;
       tmp = init;
       while (t_idx < v_idx){
         tmp = tmp->next;
         t_idx++;
       }
       faces->vert->t1 = tmp->vert->t1;
       faces->vert->t2 = tmp->vert->t2;
   
       // Extracting normals info
       ptr = ptr2+1;
       if (f_idx < 2) ptr2 = strstr(ptr," ");
       else ptr2 = strstr(ptr,"\n");
       strncpy(val,ptr,ptr2-ptr);
       val[ptr2-ptr] = 0;
       v_idx = atoi(val);
       t_idx = 1;
       tmp = init;
       while (t_idx < v_idx){
         tmp = tmp->next;
         t_idx++;
       }
       faces->vert->n1 = tmp->vert->n1;
       faces->vert->n2 = tmp->vert->n2;
       faces->vert->n3 = tmp->vert->n3;
     
       // Setting values for next vertex
       ptr = ptr2;
       faces->next = (vertexList*)malloc(sizeof(vertexList));
       faces = faces->next;
       faces->next = NULL;
       faces->vert = NULL;
       printf("face #%i: x: %f, y: %f, z: %f, t1: %f, t2: %f, n: %f %f %f\n",len, faces->vert->x, faces->vert->y, faces->vert->z, faces->vert->t1, faces->vert->t2, faces->vert->n1, faces->vert->n2, faces->vert->n3);
       len++;
     
     }
   
     ptr = strstr(ptr,"f");
   
   }
 
   // Freeing temp vertexList
   printf("freeing temp vertexList...\n");
   vertexList* tmp_init;
   while (init != NULL){
     tmp_init = init;
     free(init->vert);
     init = init->next;
     free(tmp_init);
   }
 
   // Create the VBO (vertex buffer object)
   printf("creating VBO...\n");
   u32 vertex_size = len*8*sizeof(float);
   u8* vbo_data = (u8*)malloc(vertex_size);
   for(int i = 0; i < len; i++) {
     tmp_init = initFaces;
     memcpy(&vbo_data[i*sizeof(vertex)], initFaces->vert, sizeof(vertex));
     initFaces = initFaces->next;
     free(tmp_init->vert);
     free(tmp_init);
   }
 
   printf("Done!\n");
   return 1;
}

EDIT: Fixed! https://twitter.com/Rinnegatamante/status/702956049196851200
 
Last edited by Rinnegatamante,
  • Like
Reactions: Coto

TheCruel

Developer
Banned
Joined
Dec 6, 2013
Messages
1,350
Trophies
2
XP
3,131
Country
United States
Okay, what is up with cia builds? There are multiple issues I have with my project that don't appear in the 3dsx version.

For example, if you suspend and unsuspend the input freezes up (either it's a hid issue or something related to the gpu). And if I try to quit by breaking out of the apt mainloop, it also freezes. Has anyone done cia builds (especially ones that use the GPU) comment on my issues? Things like FBI don't experience these problems.
You need to hook the apt resume event to reset the gpu.

Here's an example of how it's done:

https://github.com/xerpi/sf2dlib/blob/master/libsf2d/source/sf2d.c#L79
https://github.com/xerpi/sf2dlib/blob/master/libsf2d/source/sf2d.c#L292
 
  • Like
Reactions: thatbooisaspy

TheCruel

Developer
Banned
Joined
Dec 6, 2013
Messages
1,350
Trophies
2
XP
3,131
Country
United States
Is there a way to increase default stack size? Looks like i'm currently getting some problems of stack overflow when loading "big" 3D models.
Should probably add some malloc/free to get stuff off the stack, but you can increase the size by just defining a single symbol:

Code:
u32 __stacksize__ = 32 * 1024;

32kb is the default, so just increase that.
 
  • Like
Reactions: Rinnegatamante

Sonansune

Well-Known Member
Member
Joined
Jul 2, 2015
Messages
3,734
Trophies
1
XP
2,142
Country
Canada
can't "make" freetype...
C:\devkitPro\portlibs>make freetype
make[1]: Entering directory `/c/devkitPro/portlibs/freetype-2.5.5'

FreeType build system -- automatic system detection

The following settings are used:

platform unix
compiler cc
configuration directory ./builds/unix
configuration rules ./builds/unix/unix.mk

If this does not correspond to your system or settings please remove the file
`config.mk' from this directory then read the INSTALL file for help.

Otherwise, simply type `make' again to build the library,
or `make refdoc' to build the API reference (this needs python >= 2.6).

Generating modules list in ./objs/ftmodule.h...
* module: truetype (Windows/Mac font files with extension *.ttf or *.ttc)
* module: type1 (Postscript font files with extension *.pfa or *.pfb)
* module: cff (OpenType fonts with extension *.otf)
* module: cid (Postscript CID-keyed fonts, no known extension)
* module: pfr (PFR/TrueDoc font files with extension *.pfr)
* module: type42 (Type 42 font files with no known extension)
* module: winfnt (Windows bitmap fonts with extension *.fnt or *.fon)
* module: pcf (pcf bitmap fonts)
* module: bdf (bdf bitmap fonts)
* module: sfnt (helper module for TrueType & OpenType formats)
* module: autofit (automatic hinting module)
* module: pshinter (Postscript hinter module)
* module: raster (monochrome bitmap renderer)
* module: smooth (anti-aliased bitmap renderer)
* module: smooth (anti-aliased bitmap renderer for LCDs)
* module: smooth (anti-aliased bitmap renderer for vertical LCDs)
* module: psaux (Postscript Type 1 & Type 2 helper module)
* module: psnames (Postscript & Unicode Glyph name handling)
done.
cd builds/unix; /bin/sh ./configure '--prefix=/C/devkitPro/portlibs/armv6k' '--host=arm-none-eabi' '--disable-shared' '--enable-static' '--without-harfbuzz'
checking build system type... i686-pc-mingw32
checking host system type... arm-none-eabi
checking for arm-none-eabi-gcc... arm-none-eabi-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether arm-none-eabi-gcc accepts -g... yes
checking for arm-none-eabi-gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... arm-none-eabi-gcc -E
checking for arm-none-eabi-pkg-config... no
checking for pkg-config... /usr/bin/pkg-config
configure: WARNING: using cross tools not prefixed with host triplet
checking pkg-config is at least version 0.24... yes
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by arm-none-eabi-gcc... c:/devkitpro/devkitarm/arm-none-eabi/bin/ld.exe
checking if the linker (c:/devkitpro/devkitarm/arm-none-eabi/bin/ld.exe) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /C/devkitPro/devkitARM/bin/arm-none-eabi-nm
checking the name lister (/C/devkitPro/devkitARM/bin/arm-none-eabi-nm) interface... BSD nm
checking whether ln -s works... no, using cp -pR
checking the maximum length of command line arguments... 8192
checking how to convert i686-pc-mingw32 file names to arm-none-eabi format... func_convert_file_noop
checking how to convert i686-pc-mingw32 file names to toolchain format... func_convert_file_noop
checking for c:/devkitpro/devkitarm/arm-none-eabi/bin/ld.exe option to reload object files... -r
checking for arm-none-eabi-objdump... arm-none-eabi-objdump
checking how to recognize dependent libraries... unknown
checking for arm-none-eabi-dlltool... no
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for arm-none-eabi-ar... arm-none-eabi-ar
checking for archiver @FILE support... @
checking for arm-none-eabi-strip... arm-none-eabi-strip
checking for arm-none-eabi-ranlib... arm-none-eabi-ranlib
checking for gawk... gawk
checking command to parse /C/devkitPro/devkitARM/bin/arm-none-eabi-nm output from arm-none-eabi-gcc object... ok
checking for sysroot... no
checking for arm-none-eabi-mt... no
checking for mt... no
checking if : is a manifest tool... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... no
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... no
checking for objdir... .libs
checking if arm-none-eabi-gcc supports -fno-rtti -fno-exceptions... no
checking for arm-none-eabi-gcc option to produce PIC... -fPIC -DPIC
checking if arm-none-eabi-gcc PIC flag -fPIC -DPIC works... yes
checking if arm-none-eabi-gcc static flag -static works... yes
checking if arm-none-eabi-gcc supports -c -o file.o... yes
checking if arm-none-eabi-gcc supports -c -o file.o... (cached) yes
checking whether the arm-none-eabi-gcc linker (c:/devkitpro/devkitarm/arm-none-eabi/bin/ld.exe) supports shared libraries... yes
checking dynamic linker characteristics... no
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... no
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking for i686-pc-mingw32-gcc... no
checking for gcc... no
checking for cc... no
configure: error: cannot find native C compiler
make[1]: *** [setup] Error 1
make[1]: Leaving directory `/c/devkitPro/portlibs/freetype-2.5.5'
make: *** [freetype] Error 2
 

Rinnegatamante

Well-Known Member
Member
Joined
Nov 24, 2014
Messages
3,162
Trophies
2
Age
29
Location
Bologna
Website
rinnegatamante.it
XP
4,857
Country
Italy
Yeah, I'm saying you should probably use the heap more than filling the stack.

Technically, the function which causes such problem uses stack only for temp values so it's a bit strange. I noticed that this function crashes (Reading from an unmapped memory region with Citra3DS) when loading a model with like 3000 vertices: https://github.com/Rinnegatamante/lpp-3ds/blob/master/source/luaRender.cpp#L105-L365
Don't know if it's a stack or a heap size problem. Linear Heap at the end should receive something like sizeof(float)*8*3000 allocated bytes which should be 768000 bytes so shouldn't be a problem.

Also i found this function to get some Reading/Writinf from/to an unmapped memory region with Citra3DS (on real hw it just crashes) when trying to draw on screen different models (according with their complexity, for example 2 cubes are fine, 3 cubes cause the crash): https://github.com/Rinnegatamante/lpp-3ds/blob/master/source/luaRender.cpp#L539-L584
 
Last edited by Rinnegatamante,
D

Deleted User

Guest
Does anyone know how I can convert images into .bin format so I can use them as textures in my Citro3D projects?
 

TheCruel

Developer
Banned
Joined
Dec 6, 2013
Messages
1,350
Trophies
2
XP
3,131
Country
United States
  • Like
Reactions: Deleted User

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • SylverReZ @ SylverReZ:
    @mthrnite, Cheetah Girls, the sequel to Action 52's Cheetah Men.
    +2
  • Psionic Roshambo @ Psionic Roshambo:
    Pokemon Black I played that one a lot
  • K3Nv2 @ K3Nv2:
    Honestly never messed with Pokémon on ds much
  • mthrnite @ mthrnite:
    I played pokemon once, was bored, never tried again
  • Psionic Roshambo @ Psionic Roshambo:
    Oh Dragon Quest IX
  • K3Nv2 @ K3Nv2:
    Spent like 5 hours on switch one never touched it again
  • Psionic Roshambo @ Psionic Roshambo:
    Sentinel of the stary skies
  • K3Nv2 @ K3Nv2:
    Ds is 20 years old this year
  • Psionic Roshambo @ Psionic Roshambo:
    So MJ no longer wants to play with it?
  • K3Nv2 @ K3Nv2:
    He put it down when the 3ds came out
  • SylverReZ @ SylverReZ:
    @K3Nv2, RIP Felix does great videos on the PS3 yellow-light-of-death.
  • Jayro @ Jayro:
    Eventhough the New 3DS XL is more powerful, I still feel like the DS Lite was a more polished system. It's a real shame that it never got an XL variant keeping the GBA slot. You'd have to go on AliExpress and buy an ML shell to give a DS phat the unofficial "DS Lite" treatment, and that's the best we'll ever get I'm afraid.
    +1
  • 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.
    Veho @ Veho: +1