Homebrew Homebrew Development

spinal_cord

Knows his stuff
Member
Joined
Jul 21, 2007
Messages
3,225
Trophies
1
Age
43
Location
somewhere
Website
spinalcode.co.uk
XP
3,378
Country
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.
 
D

Deleted User

Guest
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
 

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

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 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.
 

Spaqin

Well-Known Member
Member
Joined
Feb 17, 2015
Messages
123
Trophies
0
Age
29
XP
199
Country
Poland
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.
 

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
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

Spaqin

Well-Known Member
Member
Joined
Feb 17, 2015
Messages
123
Trophies
0
Age
29
XP
199
Country
Poland
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,

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
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.
 

Spaqin

Well-Known Member
Member
Joined
Feb 17, 2015
Messages
123
Trophies
0
Age
29
XP
199
Country
Poland
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.
 

Spaqin

Well-Known Member
Member
Joined
Feb 17, 2015
Messages
123
Trophies
0
Age
29
XP
199
Country
Poland
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?).
 

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
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

General chit-chat
Help Users
  • No one is chatting at the moment.
    Psionic Roshambo @ Psionic Roshambo: 24,000 hmmmm lol