Homebrew Homebrew Development

spinal_cord

Knows his stuff
Member
Joined
Jul 21, 2007
Messages
3,227
Trophies
1
Age
43
Location
somewhere
Website
spinalcode.co.uk
XP
3,416
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.
  • SylverReZ @ SylverReZ:
    They probably said "Hey, why not we combine the two together and make a 'new' DS to sell".
  • Veho @ Veho:
    It's a DS Lite in a slightly bigger DS Lite shell.
    +1
  • Veho @ Veho:
    It's not a Nintendo / iQue official product, it's a 3rd party custom.
    +1
  • Veho @ Veho:
    Nothing special about it other than it's more comfortable than the Lite
    for people with beefy hands.
    +1
  • Jayro @ Jayro:
    I have yaoi anime hands, very lorge but slender.
  • Jayro @ Jayro:
    I'm Slenderman.
  • Veho @ Veho:
    I have hands.
  • BakerMan @ BakerMan:
    imagine not having hands, cringe
    +1
  • AncientBoi @ AncientBoi:
    ESPECIALLY for things I do to myself :sad:.. :tpi::rofl2: Or others :shy::blush::evil:
    +1
  • The Real Jdbye @ The Real Jdbye:
    @SylverReZ if you could find a v5 DS ML you would have the best of both worlds since the v5 units had the same backlight brightness levels as the DS Lite unlockable with flashme
  • The Real Jdbye @ The Real Jdbye:
    but that's a long shot
  • The Real Jdbye @ The Real Jdbye:
    i think only the red mario kart edition phat was v5
  • BigOnYa @ BigOnYa:
    A woman with no arms and no legs was sitting on a beach. A man comes along and the woman says, "I've never been hugged before." So the man feels bad and hugs her. She says "Well i've also never been kissed before." So he gives her a kiss on the cheek. She says "Well I've also never been fucked before." So the man picks her up, and throws her in the ocean and says "Now you're fucked."
    +2
  • BakerMan @ BakerMan:
    lmao
  • BakerMan @ BakerMan:
    anyways, we need to re-normalize physical media

    if i didn't want my games to be permanent, then i'd rent them
    +1
  • BigOnYa @ BigOnYa:
    Agreed, that why I try to buy all my games on disc, Xbox anyways. Switch games (which I pirate tbh) don't matter much, I stay offline 24/7 anyways.
  • AncientBoi @ AncientBoi:
    I don't pirate them, I Use Them :mellow:. Like I do @BigOnYa 's couch :tpi::evil::rofl2:
    +1
  • cearp @ cearp:
    @BakerMan - you can still "own" digital media, arguably easier and better than physical since you can make copies and backups, as much as you like.

    The issue is DRM
  • cearp @ cearp:
    You can buy drm free games / music / ebooks, and if you keep backups of your data (like documents and family photos etc), then you shouldn't lose the game. but with a disk, your toddler could put it in the toaster and there goes your $60

    :rofl2:
  • cearp @ cearp:
    still, I agree physical media is nice to have. just pointing out the issue is drm
  • rqkaiju2 @ rqkaiju2:
    i like physical media because it actually feels like you own it. thats why i plan on burning music to cds
  • cearp @ cearp:
    It's nice to not have to have a lot of physical things though, saves space
    +1
  • AncientBoi @ AncientBoi:
    Nor clothes 🤮 . Saves on time, soap, water and money having to wash them. :D
    AncientBoi @ AncientBoi: Nor clothes 🤮 . Saves on time, soap, water and money having to wash them. :D