Homebrew Homebrew Development

  • Thread starter Thread starter aliak11
  • Start date Start date
  • Views Views 1,475,692
  • Replies Replies 6,048
  • Likes Likes 54
So I'm trying to get my app to play nicely with the system, had a look at blargsnes's main() & I've built my main loop around

Code:
APP_STATUS status;
while((blah) && (status = aptGetStatus()) != APP_EXITING)
{

    if (status == APP_RUNNING) {

        (blah)

    } else if (status == APP_SUSPENDING) {

        (blah)

        aptReturnToMenu();

    } else if (status == APP_PREPARE_SLEEPMODE) {

        (blah)

        aptSignalReadyForSleep();
        aptWaitStatusEvent();

    }

}

..and now sleep mode works nicely (console sleeps when closed, my app resumes when opened), but suspending still doesn't work - when I press the home button everything locks up immediately, it doesn't get as far as making the noise and zooming out to the home menu. Any suggestions? Thanks.
FWIW, pressing the power button works (app closes normally), as does the app exiting of its own accord.


Did you ever get this situation sorted out? I'm having the same trouble right now.
 
hey guys, is there any hax for the latest upgrade of the 3ds to put custom theme? don't want to downgrade my 3ds.
 
Can someone explain to me why my .bin files created at http://xem.github.io/3DShomebrew/tools/image-to-bin.html are just displaying garbage as the texture whenever I use them in my Citro3D project?

And by garbage, I mean this:

h.png
 
I am still very confused. :unsure:
so that updated code in lpp-3ds that you showed me automatically tiles the output .bin file when you load the program?

lpp-3ds doesn't use bin files but PNG/BMP/JPG files. Anyway, texures in lpp-3ds are loaded, flipped, adapted (24bpp -> 32 bpp), tiled and then binded.
 
How would I go around compiling libogg and libvorbis for the 3DS? I guess it's not as simple as
Code:
./configure CC=/opt/devkitpro/devkitARM/bin/arm-none-eabi-gcc prefix=/opt/devkitpro/devkitARM LDFLAGS=/opt/devkitpro/devkitARM/lib
because if it were, it would have been working already.
 
How would I go around compiling libogg and libvorbis for the 3DS? I guess it's not as simple as
Code:
./configure CC=/opt/devkitpro/devkitARM/bin/arm-none-eabi-gcc prefix=/opt/devkitpro/devkitARM LDFLAGS=/opt/devkitpro/devkitARM/lib
because if it were, it would have been working already.

You can find a fully working libogg + vorbisfile repository here in my lpp-3ds_libraries repository but take in mind that you need to use software-type floating points or you'll get distorted sounds (mfloat-abi=softfp): https://github.com/Rinnegatamante/lpp-3ds_libraries

To compile them just rename source_libogg to source and launch make.
 
  • Like
Reactions: Spaqin
Sorry to bother you, but...
I put the compiled libogg.a to /source/lib of my own project, and set my makefile to include that folder in the libs search, and -logg to the LIBS flags, but the linker still won't find it. What could be wrong?

edit:
and even copied it to ctrulib's lib folder, but it still is invisible to the linker. Huh.

edit2:
I managed to get it working (makefile ignored my addition?)
Now I'm getting
Code:
/opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/5.3.0/../../../../arm-none-eabi/bin/ld: cannot find 3dsx_crt0.o:
eeeh.
 
Last edited by Spaqin,
Sorry to bother you, but...
I put the compiled libogg.a to /source/lib of my own project, and set my makefile to include that folder in the libs search, and -logg to the LIBS flags, but the linker still won't find it. What could be wrong?

edit:
and even copied it to ctrulib's lib folder, but it still is invisible to the linker. Huh.

edit2:
I managed to get it working (makefile ignored my addition?)
Now I'm getting
Code:
/opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/5.3.0/../../../../arm-none-eabi/bin/ld: cannot find 3dsx_crt0.o:
eeeh.

Go to \devkitPro\devkitARM\arm-none-eabi\lib and do a make CRT=3dsx.
 
Oh, and I see I need to recompile all my libs to use softfp?

Maybe I should sit and try to port the integer-only version of libvorbis to avoid these shenanigans.
 
So I ported libtremor using your files as a base. I could make a github repo for that if you don't mind me releasing it along with your work (credited of course).
And it works. Though it looks like it's quite CPU intensive - music crackles when buffers are set to be 2048 samples long, but it works fine with 4096 samples buffers. I haven't tested it with the normal, fp version, so I can't really tell if it's faster or not (probably no if I could use hw floats, but maybe yes for sw emulation?).
 
So I ported libtremor using your files as a base. I could make a github repo for that if you don't mind me releasing it along with your work (credited of course).
And it works. Though it looks like it's quite CPU intensive - music crackles when buffers are set to be 2048 samples long, but it works fine with 4096 samples buffers. I haven't tested it with the normal, fp version, so I can't really tell if it's faster or not (probably no if I could use hw floats, but maybe yes for sw emulation?).

Are you using ndsp or csnd? I noticed some similar problems with ndsp so i managed it to create the audio thread on APPCORE and not on main core. ( https://github.com/Rinnegatamante/lpp-3ds_libraries/blob/master/libctru/source/ndsp/ndsp.c#L485 ).
Anyway, feel free to take the makefile/libctru and use it also without crediting. It's not soo much edited from the original one :P (Just some little edits like the ndsp thread ones).
 

Site & Scene News

Popular threads in this forum