Homebrew Homebrew Development

delsky

New Member
Newbie
Joined
Jan 15, 2016
Messages
4
Trophies
0
XP
57
Country
France
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

YugamiSekai

Mr. Picross
Member
Joined
Dec 24, 2014
Messages
2,015
Trophies
1
Age
22
XP
2,286
Country
United States
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?
 

MasterFeizz

Well-Known Member
Member
Joined
Oct 15, 2015
Messages
1,098
Trophies
1
Age
29
XP
3,710
Country
United States
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

MRJPGames

Pretty great guy
Member
Joined
Aug 17, 2013
Messages
1,199
Trophies
1
Location
The Netherlands
Website
fizazy.com
XP
1,676
Country
Netherlands
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!
 

Tjessx

Well-Known Member
Member
Joined
Dec 3, 2014
Messages
1,160
Trophies
0
Age
27
XP
952
Country
Belgium
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
 

Tjessx

Well-Known Member
Member
Joined
Dec 3, 2014
Messages
1,160
Trophies
0
Age
27
XP
952
Country
Belgium
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.
 

Joel16

Ils ne passeront pas
Member
Joined
May 8, 2011
Messages
933
Trophies
2
Age
27
Location
Doesn't concern you.
XP
5,293
Country
United States
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,

Tjessx

Well-Known Member
Member
Joined
Dec 3, 2014
Messages
1,160
Trophies
0
Age
27
XP
952
Country
Belgium
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

General chit-chat
Help Users
  • SylverReZ @ SylverReZ:
    @Sonic Angel Knight, Is that SAK I see. :ninja:
  • BigOnYa @ BigOnYa:
    What a weird game
  • K3Nv2 @ K3Nv2:
    Yeah I wanted to see shards of the titanic
  • BigOnYa @ BigOnYa:
    I kept thinking jaws was gonna come up and attack
  • K3Nv2 @ K3Nv2:
    Jaws is on a diet
  • K3Nv2 @ K3Nv2:
    Damn power went out
  • BigOnYa @ BigOnYa:
    Ok xdqwerty, your little bro prob tripped On the cord and unplugged you
  • K3Nv2 @ K3Nv2:
    Ya I'm afraid of the dark hug me
  • BigOnYa @ BigOnYa:
    Grab and hold close your AncientBoi doll.
  • K3Nv2 @ K3Nv2:
    Damn didn't charge my external battery either
  • BigOnYa @ BigOnYa:
    Take the batteries out of your SuperStabber3000... Or is it gas powered?
  • K3Nv2 @ K3Nv2:
    I stole batteries from your black mamba
    +1
  • K3Nv2 @ K3Nv2:
    My frozen food better hold up for an hour I know that
  • BigOnYa @ BigOnYa:
    Or else gonna be a big lunch and dinner tomorrow.
  • BigOnYa @ BigOnYa:
    Did you pay your power bill? Or give all yo money to my wife, again.
  • K3Nv2 @ K3Nv2:
    Oh good the estimated time is the same exact time they just said
    +1
  • BigOnYa @ BigOnYa:
    Load up your pc and monitor, and head to a McDonalds dining room, they have free WiFi
  • K3Nv2 @ K3Nv2:
    Sir please watch your porn in the bathroom
    +1
  • BigOnYa @ BigOnYa:
    No sir we can not sell you anymore apple pies, after what you did with the last one.
  • K3Nv2 @ K3Nv2:
    We ran out
  • HiradeGirl @ HiradeGirl:
    for your life
    +1
  • K3Nv2 @ K3Nv2:
    My life has no value my fat ass is staying right here
    K3Nv2 @ K3Nv2: My life has no value my fat ass is staying right here