Homebrew Homebrew Development

  • Thread starter Thread starter aliak11
  • Start date Start date
  • Views Views 1,475,407
  • Replies Replies 6,048
  • Likes Likes 54
When compiling freetype,

configure: error: cannot find native C compiler
make[1]: *** [setup] Error 1
make[1]: Leaving directory '/c/devkitPro/3ds_portlibs/freetype-2.5.4'
make: *** [freetype] Error 2

Fix?

You may try to use MSys but you have to move your files at least to \devkitpro\msys\ (\devkitpro\msys\home\<username>\ is better to keep your folder clean).
 
  • Like
Reactions: YugamiSekai
Also, after compiling the portlibs,
I have a problem when compiling homebrew used by the 3DS Portlibs (Cyanogen3DS, sftdlib, sfillib):

.../arm-none-eabi/bin/ld.exe error:

*.elf uses VFP register arguments, (freetype lib, png lib, libz).o does not

ld.exe: Failed to merge target specific data of file (libfreetype, libpng, libz).o

It does this for every (or most) .o files used in freetype, libpng, and whatever libz is. Also, I think it does it with libjpeg-turbo but most likely not.

I'm on Windows 8.1 using make.

Any fix on this?
 
Also, after compiling the portlibs,
I have a problem when compiling homebrew used by the 3DS Portlibs (Cyanogen3DS, sftdlib, sfillib):

.../arm-none-eabi/bin/ld.exe error:

*.elf uses VFP register arguments, (freetype lib, png lib, libz).o does not

ld.exe: Failed to merge target specific data of file (libfreetype, libpng, libz).o

It does this for every (or most) .o files used in freetype, libpng, and whatever libz is. Also, I think it does it with libjpeg-turbo but most likely not.

I'm on Windows 8.1 using make.

Any fix on this?

Thats being caused by a floating-point ABI mismatch, you have to use the same one for the libraries and the main application. If you are using the example makefile, make sure you are passing this flag when compiling your libraries: -mfloat-abi=hard
 
  • Like
Reactions: YugamiSekai
Does anyone know how to extract the romfs from a .3dsx homebrew? I recently lost a lot of my files due to a HDD failure, including some stuff for my homebrew. Though the code will have to be remade I would love it if I could extract the assets from the 3dsx that is still on my 3ds!
 
Hello, can anyone tell me how to make a very simple file manager (or at least redirect me to an existing homebrew)? thanks!
 
Not sure if this thread is OK for arm9 development, please let me know if doesn't belong here.

I have a function to clear the top screen in an a9lh bin, just uses a memset to clear it directly:

Code:
void clear_main_lcd(void)
{
     memset(fb->top_left, 0, 0x46500);
}

It works, but you can see it progress from left to right, not so clean. Anybody have code to use double buffering in an a9lh bin, so I can zero the memory in a buffer and then flip it to what the LCD uses in a fast way so it looks clean?
i'm not 100% sure about this, but you could create a new u8 array (u8 screenBuffer[screenwidth * screen height * 3];) and use that to write your changes to, then just change the pointer from your current screen buffer to this one? or something like that
 
Is there a simple file reading and writing example in c++?
I've been looking online for a working 3ds example,
I can get the file size, but the buffer stays empty.
 
Could you post an example? for some reason it doesn't work.
(at least not in citra)

File Reading:
Code:
void readFromFile(char * filePath, char data[])
{
    FILE * temp = fopen(filePath, "r");
    fscanf(temp, "%s", data);
    fclose(temp);
}


File Writing:
Code:
void writeToFile(char * filePath)
{
    FILE * temp = fopen(filePath, "w");// file path should be something like "/file.txt" - which would a file called 'file.txt' on the root of your memory stick
    fprintf(temp , "random file writing sample");
    fclose(temp );
}

so you'd have something like:

Code:
char str[256];
writeToFile("/file.txt");
readFromFile("/file.txt", str);

Then you can print the contents of str using printf, or whatever.

Edit: This should definitely work on a 3DS, don't know about Citra though.
 
Last edited by Joel16,
What is the correct method to check the time? i've tried to use osGetTime(), but it doesn't return a correct value (3 times slower)
EDIT: only on citra
 
Last edited by Tjessx,

Site & Scene News

Popular threads in this forum