Homebrew Homebrew Development

  • Thread starter Thread starter aliak11
  • Start date Start date
  • Views Views 1,474,934
  • Replies Replies 6,048
  • Likes Likes 54
it depends what you mean by manager.
copy/delete/rename?

There are homebrew to mount SD and browse the files and folders.
But no renamer yet I think.
It could be useful to be able to rename files. (for different Launcher.dat probably).

Look at SDbrowser, by lectem.
http://wiki.gbatemp.net/wiki/List_of_3DS_homebrew_applications
Thanks! I just downloaded the SDBrowser source from github. There is no compiled version online at the moment, right?
 
A lot of homebrew are currently not officially released or announced and doesn't provide compiled executable.
They use git to keep and track changelogs.

it's very easy to compile it yourself.
install devkitpro with libctru option checked, then make a copy of the git repository, browse to it with a command line and type "make".
 
  • Like
Reactions: Blueie
So I feel really dumb right now, but granted, I literally just started learning C/C++ two days ago. I am just trying just as simple as writing text to both screens and I am getting an error of:
Code:
main.o: In function `drawFrameTop':
/Users/AgentMoose/3DS/template/source/main.c:13: undefined reference to `gfxDrawText'
main.o: In function `drawFrameBottom':
/Users/AgentMoose/3DS/template/source/main.c:22: undefined reference to `gfxDrawText'

As I said, I literally just started coding. I looked through this thread a couple times just browsing to see how text could be drawn (I decided to just copy and paste part of someones code into the main template just to see if it would work). In the code below I have a comment block for a text code that did work, but I couldn't choose which screen to put it on.

If someone could help me with my simple problem...that would be great! :o
Code:
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <3ds.h>

#include "font.h"

int drawFrameTop(){   
    u8* fb = gfxGetFramebuffer(GFX_TOP, GFX_LEFT, NULL, NULL);
        memset(fb, 0, 240*400*3);
       
        //display text
    gfxDrawText(GFX_TOP, GFX_LEFT, NULL, "top screen text", 120, 100);
    return 0;
}
   
int drawFrameBottom(){
    u8* fb2 = gfxGetFramebuffer(GFX_BOTTOM, GFX_LEFT, NULL, NULL);
        memset(fb2, 0, 240*320*3);
   
    //display text
    gfxDrawText(GFX_BOTTOM, GFX_LEFT, NULL, "bottom screen text", 120, 100);
    return 0;
}    

int main()
{
  // Initializations
  srvInit();        // services
  aptInit();        // applets
  hidInit(NULL);    // input
  gfxInit();        // graphics
  gfxSet3D(false);  // stereoscopy (true: enabled / false: disabled)
  u32 kDown;        // keys down
  u32 kHeld;        // keys pressed
  u32 kUp;          // keys up

  // Main loop
  while (aptMainLoop())
  {

    // Wait for next frame
    gspWaitForVBlank();

    // Read which buttons are currently pressed or not
    hidScanInput();
    kDown = hidKeysDown();
    kHeld = hidKeysHeld();
    kUp = hidKeysUp();

    // If START button is pressed, break loop and quit
    if (kDown & KEY_START){
      break;
    }


    /** Your code goes here **/

clearScreen();
/*drawString(10, 10, "Hello World");*/

    // Flush and swap framebuffers
    gfxFlushBuffers();
    gfxSwapBuffers();
  }

  // Exit
  gfxExit();
  hidExit();
  aptExit();
  srvExit();

  // Return to hbmenu
  return 0;
}
 
So I feel really dumb right now, but granted, I literally just started learning C/C++ two days ago. I am just trying just as simple as writing text to both screens and I am getting an error of:
Code:
main.o: In function `drawFrameTop':
/Users/AgentMoose/3DS/template/source/main.c:13: undefined reference to `gfxDrawText'
main.o: In function `drawFrameBottom':
/Users/AgentMoose/3DS/template/source/main.c:22: undefined reference to `gfxDrawText'

You need to define the function gfxDrawText and include the code for drawing the text

Code:
void gfxDrawText(gfxScreen_t screen, gfx3dSide_t side, const char  *str, u16 x, u16 y)
{
  if(!str)
    return;

  u16 fbWidth, fbHeight;
  u8  *fbAdr = gfxGetFramebuffer(screen, side, &fbWidth, &fbHeight);

  drawString(fbAdr, str, y, x-CHAR_SIZE_Y, fbHeight, fbWidth);
}
 
Is there some sort of limit on 3dsx file sizes? I can't get a 1.5MB 3dsx file to load, it just crashes the homebrew menu before the screen even goes black.
 
Is there some sort of limit on 3dsx file sizes? I can't get a 1.5MB 3dsx file to load, it just crashes the homebrew menu before the screen even goes black.

I'm not sure exactly what the limit is, but I believe on #3dsdev they mentioned it was both a limit of the size of the .3dsx and the size of the .bss section (variable changed and stored in RAM). It's scheduled to be fixed with a ninjhax update some time in the next few weeks, so I'd suggest figuring out what's taking up so much space and slimming it down (somehow). If you have graphics or large data you should be able to load them as a file and use linearAlloc + some arrays to store them temporarily. argv points to the directory the .3dsx is in if you need that.
 
I'm not sure exactly what the limit is, but I believe on #3dsdev they mentioned it was both a limit of the size of the .3dsx and the size of the .bss section (variable changed and stored in RAM). It's scheduled to be fixed with a ninjhax update some time in the next few weeks, so I'd suggest figuring out what's taking up so much space and slimming it down (somehow). If you have graphics or large data you should be able to load them as a file and use linearAlloc + some arrays to store them temporarily. argv points to the directory the .3dsx is in if you need that.


Ahh, okay. I've been trying to decrease the size with little success. It doesn't contain any graphics or data files. Trying to port this Genesis emulator: https://github.com/libretro/Genesis-Plus-GX
 
I finally installed the homebrew launcher.
I had to update my gateway1.2, to install 2.6, to update to 9.2.0-20, because my 4.5.0-5 wasn't supported (ninjhax froze when reading QR with -5E)

I tested few homebrew, some of them froze my console. (3DS Paint for example froze at launch).
Cube 3D looks great.
Pony and Brony can't rename files or folders, or delete folders.
CubicFruitNinja is funny but can't cut fruits yet :p

I'll try to make something too, now that I can test it.
 
  • Like
Reactions: YoshiInAVoid
So the whole writing text thing just doesn't like me. I decided to go at another approach. I pretty much just copied the text.c, text.h, font.c, font.h, font1.c and font.bin from smealum's ftpony git and tried doing the gfxDrawText function and I got this error:
Code:
text.o: In function `gfxDrawText':
/Users/AgentMoose/3DS/template/source/text.c:64: undefined reference to `fontDefault'

Why can't it be as simple as doing document.write or echo >.<
 
So the whole writing text thing just doesn't like me. I decided to go at another approach. I pretty much just copied the text.c, text.h, font.c, font.h, font1.c and font.bin from smealum's ftpony git and tried doing the gfxDrawText function and I got this error:
Code:
text.o: In function `gfxDrawText':
/Users/AgentMoose/3DS/template/source/text.c:64: undefined reference to `fontDefault'

Why can't it be as simple as doing document.write or echo >.<

You might be missing a #include somewhere. Just figure out which file has fontDefault and #include the associated .h file.
 
This is in the font.c:
Code:
#include <3ds.h>
#include "font.h"

font_s fontDefault =
{
    font1Data,
    font1Desc,
    16,
    (u8[]){0xFF,0xFF,0xFF}
};

I added #include "font.h" into the main.c and it sitll vies the same error.
 
Im almost Finished a really Crappy homebrew version of space invaders, If anyone wants to check out the first version of it. I uploaded it below. No source for the moment.

Keys are as follows
R Trigger = Reset level
A Button Fires Bullet
Start Resets
Circle Pad Left Or Right Moves you.

Theres No Game over yet so you cant actually die. Its my first time coding anything in C So I dont think its 2 bad. Uses pixel Collision which is a little bit buggy. Gimme some feed back :D (I am Trying to make it Very configurable but im going to have to double check all my math, and im having trouble with larger sprites (invaders). I coded Mostly From scratch, With the exception of the fonts, which I grabbed from a github somewhere that has the entire unicode system pre converted to a nice and easy "bits" format (each 8x8 sprite only uses 8 char variables) Il get the link later when i upload the source

Left in a really Dumb Bug, Fixed it now though. Gonna figure out why Its lagging so much. Enjoy!...
Edit:OOps didnt actually update the fixed File.. Reupped

Just a heads up Some stuff thats broken with it, The invaders teleport so if your shooting between them you probably wont ever hit them. *its pixel collision based as well so you will notice lag the more bullets you spam out, im going to optomize the pixel collision as best i can* Bullets are only 1 pixel but im going to make them a bit bigger (although im not sure how much bigger)

I do plan on having a small menu and a level editor by the first version, but i have to get my code for loading different "sprites" to work correctly.


Does anyone Have a built version of citra emulator?.. (current github version isnt building?)


Have you .elf file please ?
 
A lot of homebrew are currently not officially released or announced and doesn't provide compiled executable.
They use git to keep and track changelogs.

it's very easy to compile it yourself.
install devkitpro with libctru option checked, then make a copy of the git repository, browse to it with a command line and type "make".
Wow, you weren't kidding about it being very easy. Thanks for your help!

But ugh, SDbrowser is in .3dsx format, and try as I might I cannot get Ninjhax to work. It always hangs on the loading screen :hateit:
Should be easy to make, if noeone else has done it after I have released a simple prototype of DownloadMii so can I do a command line one in a few as a side project :)
Please do so! It would be extremely useful for me, even if it's a basic command line app. Thank you!
 
Some homebrew I tested freeze at launch.
3DS Paint freeze once loaded.
Some homebrew doesn't even load and freeze the console.

I noticed some homebrew still compile with warnings or error if you don't edit it before compiling, it's probably a good idea to fix these first. (like undeclared arguments or functions)
But you'll need a little C/C++ knowledge to do it.
 
  • Like
Reactions: AlbertoSONIC
No, I mean that I cannot get Ninjhax working no matter what. It simply won't even go to the Homebrew Launcher screen, hanging on "running exploit... 070%" :wtf:
 
You never could launch it? or it's random?
If you never launched it, you probably used the wrong QR Code.

be careful when selecting Old or New. (new = "NEW 3DS" model, not a "new one you just bought").
If you install it on emuNAND, select the version matching your emuNAND not your RealNAND version.
 

Site & Scene News

Popular threads in this forum