Homebrew Official [Release] GodMode9 - All Access File Browser for the 3DS

  • Thread starter d0k3
  • Start date
  • Views 308,960
  • Replies 1,143
  • Likes 105

d0k3

3DS Homebrew Legend
OP
Member
Joined
Dec 3, 2004
Messages
2,786
Trophies
1
XP
3,896
Country
Germany
@Kazuma77 - a request. Do you want to do the sample script for conditional handling? I initially thought about adding that stuff to HelloScript.gm9, but that's starting to get too convoluted, so a HelloConditional.gm9 may be better. You are also the one person (apart from @windows_server_2003) who is most familiar with that stuff by now.

That sample script would still be pretty simple by now, as it'd only have to cover if, else, end, goto and labels. Maybe also mention that you can jump out of conditional blocks, but not inside. .Would need some simple descriptions in the comments, too and must not do anything critical to the system ofc. Dunno if you got a GitHub account by now, but if you got one you could do a pull request
 

Steffenfield

Well-Known Member
Newcomer
Joined
Sep 14, 2009
Messages
97
Trophies
1
XP
546
Country
United States
I was able to successfully back up 5 out of my 6 cartridges, along with their save files, to the 2DS memory card.

For some reason, I had difficulty doing this with Super Mario Maker though.

Anyway, I'm more than happy and thank you so very kindly for such a wonderful application. :)
 

d0k3

3DS Homebrew Legend
OP
Member
Joined
Dec 3, 2004
Messages
2,786
Trophies
1
XP
3,896
Country
Germany
I was able to successfully back up 5 out of my 6 cartridges, along with their save files, to the 2DS memory card.

For some reason, I had difficulty doing this with Super Mario Maker though.

Anyway, I'm more than happy and thank you so very kindly for such a wonderful application. :)
Glad it's helpful :).

Anyways, you're using JKSM for saves, right? GM9 is not designed to handle carts from saves. What error do you get with Super Mario Maker?
 
  • Like
Reactions: Steffenfield

Steffenfield

Well-Known Member
Newcomer
Joined
Sep 14, 2009
Messages
97
Trophies
1
XP
546
Country
United States
Glad it's helpful :).

Anyways, you're using JKSM for saves, right? GM9 is not designed to handle carts from saves. What error do you get with Super Mario Maker?

Yeah, I'm using JKSM.

The error I received was in game, stating that the save file was from another system and that I needed to delete this save to continue.

So for now, I'm just keeping Super Mario Maker in the DS slot.

I did end up losing my design courses I made but thankfully it didn't erase any of my medals which I thought were all gone.
 

Taffy

jdfiehgvrhfvhfjkvgrjhfejvgrjkbjvr
Member
Joined
Mar 3, 2017
Messages
621
Trophies
0
Age
21
Location
Student
XP
1,130
Country
United States
There's a CIA for this on titledb... should that be there? It makes my notification LED bug out and then it crashes...

And I didn't see anything about a CIA in the release notes or anywhere else for that matter. You may want to look into that...
 

d0k3

3DS Homebrew Legend
OP
Member
Joined
Dec 3, 2004
Messages
2,786
Trophies
1
XP
3,896
Country
Germany
Yeah, I'm using JKSM.

The error I received was in game, stating that the save file was from another system and that I needed to delete this save to continue.

So for now, I'm just keeping Super Mario Maker in the DS slot.

I did end up losing my design courses I made but thankfully it didn't erase any of my medals which I thought were all gone.
Try to use the normal font size. There should be a solution to the Super Mario Maker problem. I think for that one you need some special tool. Maybe ask in the JKSM thread?

There's a CIA for this on titledb... should that be there? It makes my notification LED bug out and then it crashes...

And I didn't see anything about a CIA in the release notes or anywhere else for that matter. You may want to look into that...
The problem with this is, it does work fine, but it has certain requirements (requires a special chainloader, f.e.). Shouldn't be on titleDB without additional instructions, but same as that, TWLoader shouldn't either. @Ordim3n is the dev behind that, btw.
 
  • Like
Reactions: Steffenfield

Kazuma77

Well-Known Member
Member
Joined
May 11, 2008
Messages
1,035
Trophies
1
XP
915
Country
United States
@SirNapkin1334 - nope, that's not caused by the bootloader. Otherwise you couldn't update your SysNAND either. You won't have more luck with b9s.

@Kazuma77 - labelsel will be first. I'll be thinking about allowing multiple wildcard patterns, but apparently that doesn't solve the problem. Can you think about other ways to do it? As for for recursion - that's pretty hard to do, near impossible without wasting a lot of memory. I'll think about it.

@windows_server_2003 - just to make this clear, your code is good. I just want to reduce the number of global vars first to make stuff easier to follow and less error prone. You can help me by following my commits and pointing out stuff you note!

Indeed, the multiple wildcards suggestion is not a direct fix. However, instead of the zero byte file going straight into the menu folder, it could become a token file. The script could "find" it, then add a wildcard matching the additional label to the variable being used for the "lpattern" parameter. It would be like temporarily expanding the "path" environment in Windows via the old "set PATH %PATH%;<newpath>" trick. Don't worry about recursion with "for" if it's too much trouble. It would be great for deleting garbage files. But I'm sure it will still have uses either way.

@Kazuma77 - a request. Do you want to do the sample script for conditional handling? I initially thought about adding that stuff to HelloScript.gm9, but that's starting to get too convoluted, so a HelloConditional.gm9 may be better. You are also the one person (apart from @windows_server_2003) who is most familiar with that stuff by now.

That sample script would still be pretty simple by now, as it'd only have to cover if, else, end, goto and labels. Maybe also mention that you can jump out of conditional blocks, but not inside. .Would need some simple descriptions in the comments, too and must not do anything critical to the system ofc. Dunno if you got a GitHub account by now, but if you got one you could do a pull request

So you would rather these be handled by a separate file. OK. I guess that makes sense. I'll see if I can come up with something that will work.
 

windows_server_2003

Well-Known Member
Newcomer
Joined
Jul 13, 2017
Messages
84
Trophies
0
Age
44
XP
379
Country
Japan
@d0k3
At the latest commit(5F5A05A1) of my if-else, L977 - 980. How should we handle this error ?
We are handling it only if skipping conditional block, so it's incomplete now.
In ExecuteGM9Script(), we can handle it even not skipping, or we should not handle in both cases(skipping and not skipping cond..) ?

And I added "ssplit" command in my if-else. Searching and separating the string by string(not a char) is not allowed now. It is not necessary now and can be added later if needed.

Example :
Code:
set PATH "0:/path1/path2/file.ext"

ssplit VAR $[PATH] "/"
echo $[VAR] # file.ext

ssplit -f VAR $[PATH] "/"
echo $[VAR] # path1/path2/file.ext

ssplit -b VAR $[PATH] "/"
echo $[VAR] # 0:/path1/path2

ssplit -b -f VAR $[PATH] "/"
echo $[VAR] # 0:

ssplit -o VAR $[PATH] "b" # fail
ssplit -o VAR $[PATH] "something" # fail


Edit:
@SirNapkin1334 - nope, that's not caused by the bootloader. Otherwise you couldn't update your SysNAND either. You won't have more luck with b9s.

@Kazuma77 - labelsel will be first. I'll be thinking about allowing multiple wildcard patterns, but apparently that doesn't solve the problem. Can you think about other ways to do it? As for for recursion - that's pretty hard to do, near impossible without wasting a lot of memory. I'll think about it.

@windows_server_2003 - just to make this clear, your code is good. I just want to reduce the number of global vars first to make stuff easier to follow and less error prone. You can help me by following my commits and pointing out stuff you note!
For removing garbage files, I hope someone to make a program(firm) to do it. There are no reasons to do it with GM9 script.
But,,, does the recursion waste so much ? We can just search similarly to manually searching function(R+A at the root) and processing each files in Z:.(correct me if I'm wrong)

Edit2 : Fix bad English
 
Last edited by windows_server_2003,

d0k3

3DS Homebrew Legend
OP
Member
Joined
Dec 3, 2004
Messages
2,786
Trophies
1
XP
3,896
Country
Germany
Indeed, the multiple wildcards suggestion is not a direct fix. However, instead of the zero byte file going straight into the menu folder, it could become a token file. The script could "find" it, then add a wildcard matching the additional label to the variable being used for the "lpattern" parameter. It would be like temporarily expanding the "path" environment in Windows via the old "set PATH %PATH%;<newpath>" trick.

Can you elaborate on that? I'm unsure if I got that right.

@d0k3
At the latest commit(5F5A05A1) of my if-else, L977 - 980. How should we handle this error ?
We are handling it only if skipping conditional block, so it's incomplete now.
In ExecuteGM9Script(), we can handle it even not skipping, or we should not handle in both cases(skipping and not skipping cond..) ?

Unsure about that yet, I'll have to look into it deeper.


And I added "ssplit" command in my if-else. Searching and separating the string by string(not a char) is not allowed now. It is not necessary now and can be added later if needed.

Example :
Code:
set PATH "0:/path1/path2/file.ext"

ssplit VAR $[PATH] "/"
echo $[VAR] # file.ext

ssplit -f VAR $[PATH] "/"
echo $[VAR] # path1/path2/file.ext

ssplit -b VAR $[PATH] "/"
echo $[VAR] # 0:/path1/path2

ssplit -b -f VAR $[PATH] "/"
echo $[VAR] # 0:

ssplit -o VAR $[PATH] "b" # fail
ssplit -o VAR $[PATH] "something" # fail

I'm currently changing the way how goto works - we need a more contained find_label() function to pave the way for labelsel, so we may get a merge conflict. It's a fairly big commit on my side. Luckily, it isn't too bad, as ssplit luckily is a regular command and the code for it thus rather contained.
 
Last edited by d0k3,

d0k3

3DS Homebrew Legend
OP
Member
Joined
Dec 3, 2004
Messages
2,786
Trophies
1
XP
3,896
Country
Germany
Alright, @windows_server_2003, you should take a look at the latest commit and the changed handling for the goto command. This is what I meant by "paving the way" for labelsel. There is still some stuff to do, but it's almost ready to get merged into master now.

EDIT: There are more changes coming, so try to keep your commits contained.
 
Last edited by d0k3,

Kazuma77

Well-Known Member
Member
Joined
May 11, 2008
Messages
1,035
Trophies
1
XP
915
Country
United States
Can you elaborate on that? I'm unsure if I got that right.

Basically, if someone wanted to enable something optional, like the Uninstall Exploit option (unless you're testing an install script and have NTRBootHax, not something you're likely to want), what happens when they copy the extra files over is a zero byte file goes straight to the folder used for the menu. Instead of listing it directly, I could place the zero byte file as a token, have the script "find" it, then add the label to the set of label wildcards to be included.

BTW, your current commit seems to have a bug (both master and if-else). It gives repeated "file changed as we read it" errors for folders containing zero byte files when adding them to the vram0.tar archive, and refuses to continue after creating it, so, I can't even rebuild my SSRs with it now.

EDIT: adding a space to them so they weren't zero byte files anymore didn't fix the problem. Normal GM9 builds with the key file work, so, it's almost as if it has a problem with folders inside the "data" folder or something.

EDIT2: Now, after several retries, it just started working again. Not sure WTF to make of what just happened.
 
Last edited by Kazuma77,

d0k3

3DS Homebrew Legend
OP
Member
Joined
Dec 3, 2004
Messages
2,786
Trophies
1
XP
3,896
Country
Germany
Basically, if someone wanted to enable something optional, like the Uninstall Exploit option (unless you're testing an install script and have NTRBootHax, not something you're likely to want), what happens when they copy the extra files over is a zero byte file goes straight to the folder used for the menu. Instead of listing it directly, I could place the zero byte file as a token, have the script "find" it, then add the label to the set of label wildcards to be included.

BTW, your current commit seems to have a bug (both master and if-else). It gives repeated "file changed as we read it" errors for folders containing zero byte files when adding them to the vram0.tar archive, and refuses to continue after creating it, so, I can't even rebuild my SSRs with it now.

EDIT: adding a space to them so they weren't zero byte files anymore didn't fix the problem. Normal GM9 builds with the key file work, so, it's almost as if it has a problem with folders inside the "data" folder or something.

EDIT2: Now, after several retries, it just started working again. Not sure WTF to make of what just happened.
That's not a GM9 bug, and I changed nothing that could cause this. You could try replacing your installed tar with gnu-tar. Or, just hope it won't happen again.
 

Kazuma77

Well-Known Member
Member
Joined
May 11, 2008
Messages
1,035
Trophies
1
XP
915
Country
United States
That's not a GM9 bug, and I changed nothing that could cause this. You could try replacing your installed tar with gnu-tar. Or, just hope it won't happen again.

I'd rather not install more software if I can avoid it. The registry is probably full of enough crap as it is (though I'm smart enough to run Office from a VM at least). I'm thinking the next time I redo windows I should just use Thinapp on EVERYTHING ;) .

So, I'll just wait and see for now. Besides, I'll probably switch to a Linux disto forked from Ubuntu/Debian soon as my primary OS. I just need to look into which KDE distro integrates LXQt the best.
 

SirNapkin1334

Renound Aritst
Member
Joined
Aug 20, 2017
Messages
1,665
Trophies
1
XP
975
Country
United States
That's not a GM9 bug, and I changed nothing that could cause this. You could try replacing your installed tar with gnu-tar. Or, just hope it won't happen again.
I thought that bug was only on Mac? Also, is the process to compile the same on windows? I just got a PC an ice never used it before.
 

kennylogans

New Member
Newbie
Joined
Dec 16, 2017
Messages
2
Trophies
0
Age
22
XP
52
Country
United States
H!
I’m trying to install(?) CFW on my New 3DS XL, but I’m struggling with GodMode9. I’m on step 4 of section VI in “Finalizing Setup” on 3ds.guide. However, the home button on my system doesn’t work, including in GM9. Is there another way to access the Action Menu? Can I change what button opens said menu?
Sorry if this is the wrong place to ask, but I figured this is where I’d get the best answer. :-)
 

SirNapkin1334

Renound Aritst
Member
Joined
Aug 20, 2017
Messages
1,665
Trophies
1
XP
975
Country
United States
H!
I’m trying to install(?) CFW on my New 3DS XL, but I’m struggling with GodMode9. I’m on step 4 of section VI in “Finalizing Setup” on 3ds.guide. However, the home button on my system doesn’t work, including in GM9. Is there another way to access the Action Menu? Can I change what button opens said menu?
Sorry if this is the wrong place to ask, but I figured this is where I’d get the best answer. :-)
Yes. Press, not hold, the power button.
 

d0k3

3DS Homebrew Legend
OP
Member
Joined
Dec 3, 2004
Messages
2,786
Trophies
1
XP
3,896
Country
Germany
I thought that bug was only on Mac? Also, is the process to compile the same on windows? I just got a PC an ice never used it before.
Normally, yes. But we can't be sure what version of tar $PATH points to. Even gnu-tar is wonky enough as is.

@Kazuma77 - I need your help again. With the last commit of my if-else branch, the if-else-goto handling should be ready to be merged into master. The code is also written in a way that will allow me to add 'for' and 'labelsel' to the existing system. Can you test it? It will go into master once you say it's ready, not anytime sooner.

Maybe that helps... here's a small testing script I did when reviewing the code:
Code:
# if-else-end-goto testing

@hello
echo "Hello World"

if ask "Do this again?"
    goto hello
else
    @forbidden
    echo "Canceled"
    if ask "Last chance, want to go back?"
        @more_forbidden
        goto hello
        @moremoreforbidden
    else
        if ask "Okay, want to shutdown then?"
            poweroff
        end
    end
    @moremoremore
end

@outside
goto -o forbidden
goto -o more_forbidden
goto -o moremoreforbidden
goto -o moremoremore

if ask "Goto outside?"
    goto outside
end

if ask "Skip bugs?"
    goto skipbugs
end

if lalala
    echo "We shouldn't be able to reach here"
else
    echo "Neither here"
end

echo "...and not here!"

@skipbugs
echo "End reached"

EDIT: I just now noticed how nicely .gm9 scripts are formatted by GBAtemp. As if it was made for it ^_^.
 
Last edited by d0k3,
  • Like
Reactions: gnmmarechal

SirNapkin1334

Renound Aritst
Member
Joined
Aug 20, 2017
Messages
1,665
Trophies
1
XP
975
Country
United States
I'm trying to decrypt game contents I got from NUS, but I select the file I want decrypted and it doesn't show the option to decrypt it. What do I do?

Are you sure you've selected the right kind of file? Do you have correct support files? You may need a seedb.bin, and/or enc/decTitleKeys.bin to decypt stuff. Grab an aeskeydb.bin for good measure, too.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • BigOnYa @ BigOnYa:
    Nope that for tomorrow, cinco de mayo, today is bbq chicken on the grill.
  • K3Nv2 @ K3Nv2:
    Juan's new years I forgot
    +2
  • AncientBoi @ AncientBoi:
    :hrth::toot::grog::grog::grog::bow: HAPPY BIRTHDAY to me :bow::grog::grog::toot::hrth:
  • K3Nv2 @ K3Nv2:
    One day away from Juan's birthday
  • K3Nv2 @ K3Nv2:
    Only if you send him feet
    +1
  • BigOnYa @ BigOnYa:
    Happy birthday!
    +1
  • AncientBoi @ AncientBoi:
    Thank You :D
  • realtimesave @ realtimesave:
    heh I got a guy who created an account just yesterday asking me where to find mig switch roms
  • realtimesave @ realtimesave:
    too much FBI watching this website to answer that kind of question lol
  • K3Nv2 @ K3Nv2:
    Has the mig switch found loopholes without requiring game keys?
  • Xdqwerty @ Xdqwerty:
    @AncientBoi, happy birthday
  • Xdqwerty @ Xdqwerty:
    Yawn
  • Xdqwerty @ Xdqwerty:
    Lonely here
  • Xdqwerty @ Xdqwerty:
    Anybody?
  • Psionic Roshambo @ Psionic Roshambo:
    I want my money back... Drug test? No drugs to test but they want me to pee in a cup! Lol
  • K3Nv2 @ K3Nv2:
    Better call Pedro you're up in smoke
    +2
  • C @ Clayton44333:
    hey any1 know if there is a new version of the ps4 homebrew store ?
  • Xdqwerty @ Xdqwerty:
    Finally there are people here
  • K3Nv2 @ K3Nv2:
    We're figments of your imagination
    +1
  • Xdqwerty @ Xdqwerty:
    @K3Nv2, prove it
  • K3Nv2 @ K3Nv2:
    May the 4th be with you
    K3Nv2 @ K3Nv2: May the 4th be with you