Homebrew [Release] Sunshell - A powerfull shell for 3DS

  • Thread starter Thread starter Rinnegatamante
  • Start date Start date
  • Views Views 258,304
  • Replies Replies 1,054
  • Likes Likes 77
Well,I finally think up a module which will be useful, a txt book reader with UTF-8 support

LUA doesn't support UTF8 natively and the font i'm using contains only ASCII characters. It's not really easy to add :/

P.S. Added Digital Pad app selection in Main Menu as asked some posts ago:
Sunshell_6.jpg
 
  • Like
Reactions: Idaho and filfat
Does someone know how to use vorbisfile? ( http://xiph.org/vorbis/doc/vorbisfile/index.html ).
I just finished to port libogg and libvorbis to 3DS but i'm having troubles using them. With this test which ipotetically have to play first 1 MB from decoded PCM buffer, i get black screen and console freeze:
Code:
static int lua_playogg(lua_State *L)
{   
    char* pcmout = (char*)linearAlloc(524288*2);
    const char *file_tbo = luaL_checkstring(L, 1);
    char myFile[512];
    strcpy(myFile,"sdmc:");
    strcat(myFile,file_tbo);
    sdmcInit();
    int eof=0;
    static OggVorbis_File vf;
    static int current_section;
    FILE* fp = fopen(myFile,"rb");
    if(ov_open_callbacks(fp, &vf, NULL, 0, OV_CALLBACKS_NOCLOSE) < 0)
    {
        fclose(fp);
        return luaL_error(L, "corrupt OGG file.");
    }
    vorbis_info* pInfo = ov_info(&vf, -1);
    long ret=ov_read(&vf,pcmout,524288*2,0,2,1,&current_section);
    My_CSND_playsound(0x08, CSND_LOOP_DISABLE, CSND_ENCODING_PCM16, pInfo->rate, (u32*)pcmout, (u32*)pcmout, 524288*2, 0xFFFF, 0xFFFF);
    CSND_setchannel_playbackstate(0x08, 1);
    CSND_sharedmemtype0_cmdupdatestate(0);
    sdmcExit();
    return 0;
}
 
Finally got libvorbis working (it seems tremor trunk i used with standard lpp (psp/psvita) doesn't work on 3DS so i had to use normal version of vorbisfile.
Now i have to write a proper streaming function (cause decoding is very slow, 144 seconds for a 1:30 mono file so streaming feature is mandatory).

If someone wants to help, i'm publishing my results on lpp-3ds repository. ( https://github.com/Rinnegatamante/lpp-3ds )
 
EDIT: SOLVED!
Finally added OGG support to lpp-3ds :D (a 7 MB WAV will have only 1 MB size as OGG).

Very very nice. Lossy audio is so damn convenient, isn't it?
You know what would be awesome? An IRC client! Not sure if there is already a homebrew for that but I would love to see it happen.
 
It would be cool if we could boot directly into FTP mode. Like, hold L while starting Sunshell and it automatically starts the FTP server.
 
It would be cool if we could boot directly into FTP mode. Like, hold L while starting Sunshell and it automatically starts the FTP server.

Don't know if it can be very usefull, i mean, starting FTP server takes few seconds...

Very very nice. Lossy audio is so damn convenient, isn't it?
You know what would be awesome? An IRC client! Not sure if there is already a homebrew for that but I would love to see it happen.

https://gbatemp.net/threads/mapleirc-homebrew.376649/
Maybe it can be ported to Sunshell but it's in a early stage so don't know if it can be usefull.

For lossy audio, now i'm working on OGG streaming to fully add OGG support to Sunshell. (With this, Sunshell could be used seriously as an audioplayer cause Vorbis codec is better then MPEG-I [MP3 audiocodec])
After this, i'm planning to add also FLAC support (which is lossless) cause libflac was made from the same team which created libogg and vorbisfile (what i currently use for OGG support).
 
  • Like
Reactions: Margen67
I got black screen with your homebrows ( sunshell + ORGANIZ3D ) cia
how can i fix that ? thanks
 
Another little thing added to Sunshell for music reproduction: headset triggering.

Like smartphone, now if you insert an headset, music module auto-start in background or resume a paused song and removing an headset will auto-pause song.

Don't know if you knew this but closing 3DS with headset inserted will not pause your music (maybe this thing could be studied to improve alarm clock system).
 
/bug if you press up while on the first picture in the pic list, the app crashes (some string problem if i remember well)
3dsx build.

Also, can't get anything internet-related to work.
 
  • Like
Reactions: Rinnegatamante
/bug if you press up while on the first picture in the pic list, the app crashes (some string problem if i remember well)
3dsx build.

Also, can't get anything internet-related to work.

Are you using a N3DS or an old 3DS?

Anyway to convert videos to BMVP o JPGV? I cant find any program to do it.

Here for JPGV: https://github.com/Rinnegatamante/lpp-3ds/tree/master/JPGV
Here for BMPV: https://github.com/Rinnegatamante/lpp-3ds/tree/master/BMPV
 
Great program, even though it's still very young.

Here are the bugs I encountered in v.0.1 ALPHA2 (3ds and cia builds):
  • Closing the lid and opening the lid on New3DS or O3DS causes the program to black screen. Cannot press home menu to escape; must restart.
  • Top screen graphics are wonky in main menu and most other places on New3DS or O3DS, diagonal tear. Not present in the image viewer, but there, the bottom screen flashes. 3D slider is not a factor.
  • Pressing up or down too fast on O3DS image viewer causes "Error: [string "?"]:99 bad argument #3 to 'drawImage' (number expected, got nil)". It's a nice crash, because I can just hit B to exit.
    • I don't get the bug where if you press up while on the first picture, it crashes. That seems fine on O3DS and New3DS
  • cia manager doesn't utilize title dictionary (not really a bug, I know it's in progress)
  • ftp works, but is unreliable. I can usually connect to get file listings if I'm patient, and but sometimes it won't accept files. restarting the server fixes it.
    • Once, "something happened" after I transferred a file, and the New3DS cia build became unresponsive. Screen stopped flickering, ftp server stopped responding, had to restart New3DS
  • "Chronometer" is spelled wrong, but I would just call it a stopwatch anyway.
  • While alarm is going off, top screen flashes wildly. Not sure if this is intended behavior, it seems cool.
  • IP address under Console Info doesn't seem to correspond to Local IP or WAN IP. It finds Local IP just fine under FTP.
  • It would probably be useful to display more information on the Applications top screen. Similar to "3ds shell", you could include Region, Release date, Rating, Publisher, ProgramId, Size.
  • Once, hitting start from Applications halted the program on O3DS cia, but did not kick me out to system menu. Hard reboot needed. Couldn't reproduce though.
 
  • Like
Reactions: Rinnegatamante
Great program, even though it's still very young.

Here are the bugs I encountered in v.0.1 ALPHA2 (3ds and cia builds):
  • Closing the lid and opening the lid on New3DS or O3DS causes the program to black screen. Cannot press home menu to escape; must restart.
  • Top screen graphics are wonky in main menu and most other places on New3DS or O3DS, diagonal tear. Not present in the image viewer, but there, the bottom screen flashes. 3D slider is not a factor.
  • Pressing up or down too fast on O3DS image viewer causes "Error: [string "?"]:99 bad argument #3 to 'drawImage' (number expected, got nil)". It's a nice crash, because I can just hit B to exit.
    • I don't get the bug where if you press up while on the first picture, it crashes. That seems fine on O3DS and New3DS
  • cia manager doesn't utilize title dictionary (not really a bug, I know it's in progress)
  • ftp works, but is unreliable. I can usually connect to get file listings if I'm patient, and but sometimes it won't accept files. restarting the server fixes it.
    • Once, "something happened" after I transferred a file, and the New3DS cia build became unresponsive. Screen stopped flickering, ftp server stopped responding, had to restart New3DS
  • "Chronometer" is spelled wrong, but I would just call it a stopwatch anyway.
  • While alarm is going off, top screen flashes wildly. Not sure if this is intended behavior, it seems cool.
  • IP address under Console Info doesn't seem to correspond to Local IP or WAN IP. It finds Local IP just fine under FTP.
  • It would probably be useful to display more information on the Applications top screen. Similar to "3ds shell", you could include Region, Release date, Rating, Publisher, ProgramId, Size.
  • Once, hitting start from Applications halted the program on O3DS cia, but did not kick me out to system menu. Hard reboot needed. Couldn't reproduce though.

Thanks for your accurate report, i'll check all your warnings one by one and try to fix them.

Little progress for OGG support, added to lpp-3ds OGG stereo support. Now i only need to add streaming feature for stereo files and Sunshell will have full OGG support.
 
Finally finished streaming feature for stereo OGG files and added OGG support to Sunshell!
ogg.jpg


Is still in BETA (streaming is not done with a secondary thread so it causes laggy during streambuffers refreshing but it works correctly) so maybe it can be buggy with some particular OGG files.
 

Site & Scene News

Popular threads in this forum