Homebrew Homebrew Development

YugamiSekai

Mr. Picross
Member
Joined
Dec 24, 2014
Messages
2,015
Trophies
1
Age
22
XP
2,285
Country
United States
Probably not the number 1 but the cursor arrow (use SDL_ShowCursor(false); to hide it

For the image not showing, did you used the makefile and the code in my zip?
Sorry, I forgot to use that one and was excited to use my own code :P but it was a number 1 before I used yours

--------------------- MERGED ---------------------------

Probably not the number 1 but the cursor arrow (use SDL_ShowCursor(false); to hide it

For the image not showing, did you used the makefile and the code in my zip?
Sorry for the double post, but did you set it to use SMDH by default? Because I tried using NO_SMDH after I got an error that said "Could not load PNG: C:devkitProlibctru/default_icon.png" (Which I think is an error on my side since you were able to compile) and it I got "Cannot open SMDH file!" after setting it.
 

nop90

Well-Known Member
Member
Joined
Jan 11, 2014
Messages
1,556
Trophies
0
Location
Rome
XP
3,136
Country
Italy
Sorry for the double post, but did you set it to use SMDH by default? Because I tried using NO_SMDH after I got an error that said "Could not load PNG: C:devkitProlibctru/default_icon.png" (Which I think is an error on my side since you were able to compile) and it I got "Cannot open SMDH file!" after setting it.

With NO_SMDH i was having an error, so I enabled it. Don't know if it's something related to using romfs or something I cjanged by mistake
 

YugamiSekai

Mr. Picross
Member
Joined
Dec 24, 2014
Messages
2,015
Trophies
1
Age
22
XP
2,285
Country
United States
With NO_SMDH i was having an error, so I enabled it. Don't know if it's something related to using romfs or something I cjanged by mistake
Thanks but I have to ask why did you edit these functions?

Code:
SDL_Surface* tempImage = NULL;
tempImage = IMG_Load("romfs:/ssgss.jpeg");
image = SDL_DisplayFormat (tempImage);
SDL_FreeSurface (tempImage);
 

nop90

Well-Known Member
Member
Joined
Jan 11, 2014
Messages
1,556
Trophies
0
Location
Rome
XP
3,136
Country
Italy
you created a 32bit screen, but the loaded image could have another format.

If you blit ( i.e copy pixels) from an imange to a screen with a different format, the result will be fuzzed color. With this code the loaded image is converted in another one with the same format of the sceen.

It's a common coding path with SDL. You can avoid it only if you know that image and screen have the same format.
 

YugamiSekai

Mr. Picross
Member
Joined
Dec 24, 2014
Messages
2,015
Trophies
1
Age
22
XP
2,285
Country
United States
you created a 32bit screen, but the loaded image could have another format.

If you blit ( i.e copy pixels) from an imange to a screen with a different format, the result will be fuzzed color. With this code the loaded image is converted in another one with the same format of the sceen.

It's a common coding path with SDL. You can avoid it only if you know that image and screen have the same format.
I tried compiling your fixed version of the homebrew, and my version, but the both give me a red bottom screen with some glitched pixels at the bottom left of the top screen, any idea what this is about?
 

nop90

Well-Known Member
Member
Joined
Jan 11, 2014
Messages
1,556
Trophies
0
Location
Rome
XP
3,136
Country
Italy
I tried compiling your fixed version of the homebrew, and my version, but the both give me a red bottom screen with some glitched pixels at the bottom left of the top screen, any idea what this is about?
It should be a problem of the HB Launcher with 11.4 FW. The red screen should be a visual alerto of the launcher for a payload problem, not something related to your code.

Try the code with the Citra Emulator or build a CIA package and install it with FBI.
 

YugamiSekai

Mr. Picross
Member
Joined
Dec 24, 2014
Messages
2,015
Trophies
1
Age
22
XP
2,285
Country
United States
It should be a problem of the HB Launcher with 11.4 FW. The red screen should be a visual alerto of the launcher for a payload problem, not something related to your code.

Try the code with the Citra Emulator or build a CIA package and install it with FBI.
I'll just wait for a fix, since I can't do either of those

EDIT: Using 11.3 payloads work
 
Last edited by YugamiSekai,
D

Deleted User

Guest
Is anyone familiar with response codes for FSUSER_Open Archive and FSUSER_OpenDirectory?

I'm trying to get the code below to work:

Code:
Result createPath(const char* path, PATH_TYPE type, Path *p, u32 flag) {
    Result ret;

    p->path    = fsMakePath(PATH_ASCII, path);
    p->archive = (FS_Archive){ARCHIVE_SDMC, (FS_Path){PATH_EMPTY, 1, (u8*)""}};
    p->type    = type;

    ret = FSUSER_OpenArchive(&p->archive, ARCHIVE_SDMC, p->path);
    printf("OpenArchive: %d\n", ret);

    if (p->type == F_FILE) {
        ret = FSUSER_OpenFile(&p->handle, p->archive, p->path, flag, FS_ATTRIBUTE_ARCHIVE);
        printf("OpenFile: %d\n");
    } else {
        ret = FSUSER_OpenDirectory(&p->handle, p->archive, p->path);
        printf("OpenDirectory: %d\n");
    }

    return ret;
}

and this is the following result:

Code:
OpenArchive: -522172738
OpenDirectory: 2
Could not open the Archive for whatever reason.
Press any button to exit.

3DBrew has no documentation on the Response Codes AFAIK, last time I checked.

Am I going about this correctly? Any help would be appreciated.
 
Last edited by ,

daxtsu

Well-Known Member
Member
Joined
Jun 9, 2007
Messages
5,627
Trophies
2
XP
5,194
Country
Antarctica
Code:
OpenArchive: -522172738
OpenDirectory: 2
Could not open the Archive for whatever reason.
Press any button to exit.

You need to look at the error code as an unsigned hexadecimal number, not as a signed decimal/integer value.

3DBrew has no documentation on the Response Codes AFAIK, last time I checked.

https://www.3dbrew.org/wiki/Error_codes

This particular error translates into:

0xE0E046BE
Module: FS (17)
Description: Invalid path? (fs) (702)
Summary: Invalid argument (7)
Level: Usage (28)

As for the solution, I don't have one right now, but hopefully that provides some insight as to what might be wrong.
 
Last edited by daxtsu,
  • Like
Reactions: Deleted User
D

Deleted User

Guest
You need to look at the error code as an unsigned hexadecimal number, not as a signed decimal/integer value.



https://www.3dbrew.org/wiki/Error_codes

This particular error translates into:

0xE0E046BE
Module: FS (17)
Description: Invalid path? (fs) (702)
Summary: Invalid argument (7)
Level: Usage (28)

As for the solution, I don't have one right now, but hopefully that provides some insight as to what might be wrong.

Is there a script or anything that translates these error codes, or would I have to go about this myself?

AFAIK the bot on the Homebrew Discord has a function like this, but I was wondering if there was a tool I could use locally.
 

daxtsu

Well-Known Member
Member
Joined
Jun 9, 2007
Messages
5,627
Trophies
2
XP
5,194
Country
Antarctica
Is there a script or anything that translates these error codes, or would I have to go about this myself?

AFAIK the bot on the Homebrew Discord has a function like this, but I was wondering if there was a tool I could use locally.

https://gist.github.com/ihaveamac/e68022bac625ff9bdd4487c8bd5d1368

This is old though, so you might need to fill in missing descriptions and such from the Error Codes page.

(Or steal them from Kurisu's source: https://github.com/916253/Kurisu/blob/master/addons/err.py )
 
  • Like
Reactions: Deleted User

erman1337

Well-Known Member
Member
Joined
Sep 27, 2015
Messages
1,211
Trophies
0
Location
Brussels
XP
983
Country
Belgium
Has anyone got a ZIP library to work on the 3DS? I've tried plenty, and only miniz compiled, but it has trouble extracting one specific file :(

I could use LPP-3DS' ZIP code but it's GPL licensed...


EDIT: I got minizip working!!! :toot::toot::toot:
 
Last edited by erman1337,

erman1337

Well-Known Member
Member
Joined
Sep 27, 2015
Messages
1,211
Trophies
0
Location
Brussels
XP
983
Country
Belgium
I removed sftdlib from TWLoader, and replaced it with citro3D for rendering text in the system font.
With citro, the text shows up just fine, but after a second, the text disappears.
Am I missing something?
I have the exact same problem, how'd you fix this?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: @salazarcosplay, gta v is down since november 2021