Homebrew Official [Download] Decrypt9 - Open Source Decryption Tools (WIP)

  • Thread starter d0k3
  • Start date
  • Views 840,315
  • Replies 4,476
  • Likes 71

dark_samus3

Well-Known Member
Member
Joined
May 30, 2015
Messages
2,372
Trophies
0
XP
2,042
Country
United States
@d0k3 can you tell me what I'm doing wrong?

Code:
    //create label files
    printf("\n");
    for (u32 idx_m = 0; menu[idx_m].name != NULL; idx_m++) {
        for (u32 idx_s = 0; idx_s < menu[idx_m].n_entries; idx_s++) {
            for (u32 a = 0; a < 2; a++) {
                printf( "convert -background transparent -font %s -pointsize %i ", entry_font, entry_font_size );
                printf( "-fill %s -stroke %s -strokewidth %s -kerning %s \"label:%s\" $BUILD/label%04i_%i.png\n",
                    (a == 1) ? entry_active_color : entry_inactive_color,
                    (a == 1) ? entry_active_color_stroke : entry_inactive_color_stroke,
                    menu_font_strokewidth, menu_font_kerning,
                    menu[idx_m].entries[idx_s].name, (idx_m * 100) + idx_s, a);
            }
            if (menu[idx_m].entries[idx_s].desc != NULL) {
                printf( "convert -background transparent -font %s -pointsize %i ", desc_font, desc_font_size );
                printf( "-fill %s -stroke '%s' -strokewidth '%s' kerning '%s' -size %ix%i -gravity %s \"caption:%s\" $BUILD/desc%04i.png\n",
                    desc_color, desc_color_stroke, desc_font_strokewidth, desc_font_kerning,
                    desc_dim_x, desc_dim_y, desc_gravity,
                    menu[idx_m].entries[idx_s].desc, (idx_m * 100) + idx_s);
            }
        }
      
        for (u32 a = 0; a < 2; a++) {
            printf( "convert -background transparent -font %s -pointsize %i ", menu_font, menu_font_size );
            printf( "-fill %s -stroke %s -strokewidth %s -kerning %s \"label:%s\" $BUILD/mlabel%02i_%i.png\n",
                (a == 1) ? menu_active_color : menu_inactive_color,
                (a == 1) ? menu_active_color_stroke : menu_inactive_color_stroke,
                menu_font_strokewidth, menu_font_kerning,
                menu[idx_m].name, idx_m, a);
        }
    }

I get this error
Code:
gcc -I. -O3 -Wall -pedantic -std=c11 -funroll-loops -ffast-math -fsched-spec-load -fomit-frame-pointer   -c -o main.o main.c
In file included from main.c:2:0:
d9menu.h:177:18: warning: ISO C forbids empty initializer braces [-Wpedantic]
         NULL, 0, {}, // empty menu to signal end
                  ^
main.c: In function ‘main’:
main.c:68:21: warning: format ‘%s’ expects argument of type ‘char *’, but argument 4 has type ‘int’ [-Wformat=]
                     menu[idx_m].entries[idx_s].name, (idx_m * 100) + idx_s, a);
                     ^
main.c:68:21: warning: format ‘%s’ expects argument of type ‘char *’, but argument 5 has type ‘int’ [-Wformat=]
main.c:75:21: warning: format ‘%s’ expects argument of type ‘char *’, but argument 4 has type ‘int’ [-Wformat=]
                     menu[idx_m].entries[idx_s].desc, (idx_m * 100) + idx_s);
                     ^
main.c:75:21: warning: format ‘%s’ expects argument of type ‘char *’, but argument 5 has type ‘int’ [-Wformat=]
main.c:75:21: warning: format ‘%s’ expects argument of type ‘char *’, but argument 6 has type ‘int’ [-Wformat=]
main.c:75:21: warning: format ‘%s’ expects argument of type ‘char *’, but argument 7 has type ‘int’ [-Wformat=]
main.c:75:21: warning: format ‘%i’ expects argument of type ‘int’, but argument 8 has type ‘char *’ [-Wformat=]
main.c:75:21: warning: too many arguments for format [-Wformat-extra-args]
main.c:85:17: warning: format ‘%s’ expects argument of type ‘char *’, but argument 4 has type ‘int’ [-Wformat=]
                 menu[idx_m].name, idx_m, a);
                 ^
main.c:85:17: warning: format ‘%s’ expects argument of type ‘char *’, but argument 5 has type ‘int’ [-Wformat=]

not sure why it's doing that, I'm pretty sure I'm not giving the %s anything but what it should have...

EDIT: welp I'm dumb, fixed it
 
Last edited by dark_samus3,

dark_samus3

Well-Known Member
Member
Joined
May 30, 2015
Messages
2,372
Trophies
0
XP
2,042
Country
United States
@Shadowtrance have you tried messing around with the latest commit for the theme generator? I'd like to know if everything is coming out correctly... It was for me, but my script has tweaks (only a couple) so it should be the same but I'd like to make sure... Also check the comment I made over there before you mess with it
 
Last edited by dark_samus3,

d0k3

3DS Homebrew Legend
OP
Member
Joined
Dec 3, 2004
Messages
2,786
Trophies
1
XP
3,896
Country
Germany
@Shadowtrance have you tried messing around with the latest commit for the theme generator? I'd like to know if everything is coming out correctly... It was for me, but my script has tweaks (only a couple) so it should be the same but I'd like to make sure... Also check the comment I made over there before you mess with it
I tried it, but somehow it doesn't come out well once stroke is activated, see here:
menu0000.png

Can you show me an example where it looks good and maybe the parameters, too? Also, I don't understand the kerning parameter (I know what kerning is, of course) - is 1 the default?

On another note - did you have a chance to try out the GW downgraded NAND inject feature?
 

dark_samus3

Well-Known Member
Member
Joined
May 30, 2015
Messages
2,372
Trophies
0
XP
2,042
Country
United States
I tried it, but somehow it doesn't come out well once stroke is activated, see here:
View attachment 31168
Can you show me an example where it looks good and maybe the parameters, too? Also, I don't understand the kerning parameter (I know what kerning is, of course) - is 1 the default?

On another note - did you have a chance to try out the GW downgraded NAND inject feature?

Woah, that looks terrible... Can you try messing with the strokewidth? I found that 0.5 looked pretty good in my examples, also yes 1 is the default (if you include the -kerning parameter it has to have a variable ofc)

No I haven't had time to test that feature, let me explain the situation, basically I have to solder my touch screen ribbon into my 3ds, the connector for it is gone. I've almost gotten it working several times just to have something really stupid happen :angry: once I get that fixed then I can test (I was planning on finishing my soldering a few days ago but messing with the theme stuff took more time than I anticipated)

EDIT: here's an example of stroke looking alright, it can certainly be tweaked more, but generally it's the pointsize of the text that makes it difficult, increasing it produces better results (though I haven't done that here) as you can see it has been applied to everything and looks much better on the bigger description text
menu0000.png
 
Last edited by dark_samus3,

d0k3

3DS Homebrew Legend
OP
Member
Joined
Dec 3, 2004
Messages
2,786
Trophies
1
XP
3,896
Country
Germany
Woah, that looks terrible... Can you try messing with the strokewidth? I found that 0.5 looked pretty good in my examples, also yes 1 is the default (if you include the -kerning parameter it has to have a variable ofc)

No I haven't had time to test that feature, let me explain the situation, basically I have to solder my touch screen ribbon into my 3ds, the connector for it is gone. I've almost gotten it working several times just to have something really stupid happen :angry: once I get that fixed then I can test (I was planning on finishing my soldering a few days ago but messing with the theme stuff took more time than I anticipated)
You mean the examples you posted earlier? These don't look too bad, but I think the effect somewhat reduces the sharpness of the Roboto font. Well, let us see what Shadowtrance manages to do with it!
 

Shadowtrance

Well-Known Member
Member
Joined
May 9, 2014
Messages
2,493
Trophies
0
Location
Hervey Bay, Queensland
XP
1,807
Country
Can't say I'm sold on the stroke option to be honest, as you said d0k3 it reduces the sharpness of the font which I've actually come to like. haha
The previous images I posted i think it's looking pretty good as it is.
There's still the problem of the debug_bg not loading (top screen obviously) and the unmount SD as well (bottom screen i assume). And they both exist in my folder but don't load.
 
Last edited by Shadowtrance,

dark_samus3

Well-Known Member
Member
Joined
May 30, 2015
Messages
2,372
Trophies
0
XP
2,042
Country
United States
You mean the examples you posted earlier? These don't look too bad, but I think the effect somewhat reduces the sharpness of the Roboto font. Well, let us see what Shadowtrance manages to do with it!
Yeah... the main reason I added the kerning option was so that bigger pointsizes could be used but fit in similar spaces to smaller pointsizes.... or just in general tweak the appearance as much as possible.... I AM working on making the stroke option look better

Can't say I'm sold on the stroke option to be honest, as you said d0k3 it reduces the sharpness of the font which I've actually come to like. haha
The previous images I posted i think it's looking pretty good as it is.

yeah they do look pretty good, though I see FAR too much roboto font (it's the default one for android which I spend much of my time messing with, and I've been using android for around 4 or 5 years now... Not a bad font but it gets old after that much time spent looking at it)
 

Shadowtrance

Well-Known Member
Member
Joined
May 9, 2014
Messages
2,493
Trophies
0
Location
Hervey Bay, Queensland
XP
1,807
Country
Yeah... the main reason I added the kerning option was so that bigger pointsizes could be used but fit in similar spaces to smaller pointsizes.... or just in general tweak the appearance as much as possible.... I AM working on making the stroke option look better

yeah they do look pretty good, though I see FAR too much roboto font (it's the default one for android which I spend much of my time messing with, and I've been using android for around 4 or 5 years now... Not a bad font but it gets old after that much time spent looking at it)
Yeah true but it was the first "free" option that came to mind and seems to work pretty well. :)
I'm open to other suggestions though :)
 

d0k3

3DS Homebrew Legend
OP
Member
Joined
Dec 3, 2004
Messages
2,786
Trophies
1
XP
3,896
Country
Germany
Just throwing that in, but I'm currently researching the possibility of letting Decrypt9 handle EmuNAND formatting. THAT would be the last nail in the coffin of GWs software for non-GW owners (also, it would possibly handle it better than GW does, I've already seen they waste a lot of space). I'm actually already pretty far, but - you wouldn't believe - I don't have a single SD card left to try this one. I hope someone will be willing to test once this is finished :).
 
Last edited by d0k3,

Shadowtrance

Well-Known Member
Member
Joined
May 9, 2014
Messages
2,493
Trophies
0
Location
Hervey Bay, Queensland
XP
1,807
Country
Just throwing that in, but I'm currently researching the possibility of letting Decrypt9 handle EmuNAND formatting. THAT would be the last nail in the coffin of GWs software for non-GW owners (also, it would possibly handly it better than GW does, I've already seen they waste a lot of space). I'm actually already pretty far, but - you wouldn't believe - I don't have a single SD card left to try this one. I hope someone will be willing to test once this is finished :).
Yeah I've got a few spare cards laying around i can test on. :)
 
  • Like
Reactions: d0k3

dark_samus3

Well-Known Member
Member
Joined
May 30, 2015
Messages
2,372
Trophies
0
XP
2,042
Country
United States
Just throwing that in, but I'm currently researching the possibility of letting Decrypt9 handle EmuNAND formatting. THAT would be the last nail in the coffin of GWs software for non-GW owners (also, it would possibly handle it better than GW does, I've already seen they waste a lot of space). I'm actually already pretty far, but - you wouldn't believe - I don't have a single SD card left to try this one. I hope someone will be willing to test once this is finished :).
YES!! Been waiting for someone to do this! No more relying upon GW for ANYTHING, which is honestly the best way to go, they handle things in some pretty messy ways that just isn't acceptable IMO. You never stop impressing me with Decrypt9 and all of it's features...
 
  • Like
Reactions: d0k3

Shadowtrance

Well-Known Member
Member
Joined
May 9, 2014
Messages
2,493
Trophies
0
Location
Hervey Bay, Queensland
XP
1,807
Country
YES!! Been waiting for someone to do this! No more relying upon GW for ANYTHING, which is honestly the best way to go, they handle things in some pretty messy ways that just isn't acceptable IMO. You never stop impressing me with Decrypt9 and all of it's features...
Yep germany is good for something else other than it's awesome food and beer (and ladies ;) )... D0K3! the decrypt9 wizard! haha :)
 
  • Like
Reactions: klear and d0k3

dark_samus3

Well-Known Member
Member
Joined
May 30, 2015
Messages
2,372
Trophies
0
XP
2,042
Country
United States
@Shadowtrance, I've been messing with the text alignment and I think I have some good changes on the menu labels (the ones across the top), first thing, the right label look like it was a bit too much to the right (it was closer to the R button than the text on the other side was to the L), shifting it over 2 pixels makes it look much better but changing the #define would also have affected the other side, so I added 2 pixels before it's used in the printf only on the right sided one, I also shifted all of the y positions up 1 pixel as it centers it between the divider and top nicely... Here's a preview
menu0000.png


lmk what you think :) if you like it I'll commit all of the changes on github
 

Shadowtrance

Well-Known Member
Member
Joined
May 9, 2014
Messages
2,493
Trophies
0
Location
Hervey Bay, Queensland
XP
1,807
Country
@Shadowtrance, I've been messing with the text alignment and I think I have some good changes on the menu labels (the ones across the top), first thing, the right label look like it was a bit too much to the right (it was closer to the R button than the text on the other side was to the L), shifting it over 2 pixels makes it look much better but changing the #define would also have affected the other side, so I added 2 pixels before it's used in the printf only on the right sided one, I also shifted all of the y positions up 1 pixel as it centers it between the divider and top nicely... Here's a preview
View attachment 31190
lmk what you think :) if you like it I'll commit all of the changes on github
Yeah looks alright. :) The letter spacing looks a bit odd (too spaced?...) but my eyes are tired atm too so i dunno...
But yeah doesn't look too bad. :)
 

dark_samus3

Well-Known Member
Member
Joined
May 30, 2015
Messages
2,372
Trophies
0
XP
2,042
Country
United States
Yeah looks alright. :) The letter spacing looks a bit odd (too spaced?...) but my eyes are tired atm too so i dunno...
But yeah doesn't look too bad. :)
maybe... I think I was messing with the kerning a bit, I'll make sure it doesn't make it into the final script... on a side note I'm working on completely remaking the background image with imagemagick for fun, really there isn't a point but you'd actually be surprised at what you can do with just the command line tools :)
 

d0k3

3DS Homebrew Legend
OP
Member
Joined
Dec 3, 2004
Messages
2,786
Trophies
1
XP
3,896
Country
Germany
Alright, let's see if all that praise was justified :). Check my Github, there is a new commit for a SD formatter feature (included in the experimental submenu). Still needs work, and if it works at once, I'll be as surprised as you (although it should) ;). It can't break your SD card, but it may break the MBR, in which case you'll need to properly format it again (no biggie). It will also delete everything on the SD, obviously, but you can use the SD unmount feature to switch SDs.

Also, this is not one step. You need to format, then restore the EmuNAND, and you need to have a NAND backup on your SD. At a closer look, the requirement of having to have a EmuNAND on your SD card (which is freshly formatted then) will make things complicated and force you to use a PC, nonetheless. I think I'll later add direct setup from SysNAND, but for now I'm mainly interested if it works at all.
 
  • Like
Reactions: dark_samus3

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: https://youtu.be/9kE3Env_2AY?si=Bs6lUZ0ZIlqmYaGT