Homebrew Official [Release] EmuNAND9 - Open Source EmuNAND Formatter & Manager

  • Thread starter d0k3
  • Start date
  • Views 228,997
  • Replies 961
  • Likes 87

tivu100

Well-Known Member
Member
Joined
Jun 6, 2015
Messages
2,260
Trophies
0
Age
34
XP
1,136
Country
United States
To be honest, that limit is (not fully!) arbitrary. There's a lot more memory, but you need to keep in mind that the starter pack is not everything that has to be kept inside of it. Plus ZIP3DSFX (that's the base software behind the self extracting archive) is untested with large archives.

Why would you want more?
I am lazy so I try to put many homebrew apps, Rxtools set up files into starter.bin, so I don't have to take out SD/ using Wifi transfer (painfully slow). That easily reaches 16MB cap.

So far, I can set up rxTools (includes EMUNAND and update EMUNAND) while connecting SD to PC only 2 times. If ZIP3DSFX can really use with big archive (~150MB) then I think it's possible to do all this with only 1 time SD to PC connection.

Can you add a "delete EMUNAND partition and restore full SD capacity to normal use" feature? Reason: I am testing on 4GB stock micro SD on N3DS. Accidentally install a wrong NAND into EMUNAND. Now I can only clone SYSNAND to EMUNAND because there is not enough space to copy the correct NAND.bin onto stock micro SD.
 
Last edited by tivu100,

d0k3

3DS Homebrew Legend
OP
Member
Joined
Dec 3, 2004
Messages
2,786
Trophies
1
XP
3,896
Country
Germany
I am lazy so I try to put many homebrew apps, Rxtools set up files into starter.bin, so I don't have to take out SD/ using Wifi transfer (painfully slow). That easily reaches 16MB cap.
Just leave the FBI injection stuff out of it and it will be fine, without any side effects. In fact, you can leave a lot more stuff out of it.
 

tivu100

Well-Known Member
Member
Joined
Jun 6, 2015
Messages
2,260
Trophies
0
Age
34
XP
1,136
Country
United States
Just leave the FBI injection stuff out of it and it will be fine, without any side effects. In fact, you can leave a lot more stuff out of it.
I did leave out a lot of stuff. Just that the stuff I want really take up much space of the 16 MB zip.

In short, what I am doing using your app and the 16MB feature so far is about out of box N3DS rxTools set up with stock 4GB micro SD connecting to PC 2 time only before opening the back plate and upgrading to bigger micro SD card (it' much easy and faster to transfer EMUNAND to bigger card that way using this method https://gbatemp.net/threads/how-to-transfer-emunand-to-another-sd-card-working-on-new3ds.383684/ )
 

d0k3

3DS Homebrew Legend
OP
Member
Joined
Dec 3, 2004
Messages
2,786
Trophies
1
XP
3,896
Country
Germany
I did leave out a lot of stuff. Just that the stuff I want really take up much space of the 16 MB zip.

In short, what I am doing using your app and the 16MB feature so far is about out of box N3DS rxTools set up with stock 4GB micro SD connecting to PC 2 time only before opening the back plate and upgrading to bigger micro SD card (it' much easy and faster to transfer EMUNAND to bigger card that way using this method https://gbatemp.net/threads/how-to-transfer-emunand-to-another-sd-card-working-on-new3ds.383684/ )
I might think about expanding that limit further. Guess the real upper limit would be around 64MB. Not completely sure, but if we go beyound that real limit there should be at least a proper error message.

Edit: and, about that EmuNAND removal feature, that is already in there. Your SD will be wiped in the process, though. It's in the SD Format options.

As much as I'd like just resizing the partition (like some PC partitioning tools do), doing that is actually very error prone (an error meaning data loss).

And... You can find out the size limit yourself, with experimention. Just create a big starter.bin, rename it to 3DSX and run it from anywhere. Keep in mind stuff will get overwritten.
 
Last edited by d0k3,
  • Like
Reactions: tivu100

tivu100

Well-Known Member
Member
Joined
Jun 6, 2015
Messages
2,260
Trophies
0
Age
34
XP
1,136
Country
United States
I might think about expanding that limit further. Guess the real upper limit would be around 64MB. Not completely sure, but if we go beyound that real limit there should be at least a proper error message.

Edit: and, about that EmuNAND removal feature, that is already in there. Your SD will be wiped in the process, though. It's in the SD Format options.

As much as I'd like just resizing the partition (like some PC partitioning tools do), doing that is actually very error prone (an error meaning data loss).

And... You can find out the size limit yourself, with experimention. Just create a big starter.bin, rename it to 3DSX and run it from anywhere. Keep in mind stuff will get overwritten.
""Note: Tested only on N3DS XL Hyrule edition"

Just tested extracting ZIP3DSFX.3dsx. I think the limit I think is 64MB. A 63.8MB ZIP3DSFX.3dsx is extracted just fine. A little over 64MB and the extracting process freezes at ** ZIP3DSFX v.06 by d0k3 ** line but doesn't give error code. Much more bigger than 64MB (Tried 72+MB) and there is an error code and the app asked to reboot.

Can you add "copying Nintendo 3DS folder" along with starter.bin to memory (which is later copied back to EmuNAND9 folder on the root of SD) uisng the "Complete EMUNAND" option? I mean the Nintendo 3DS folder is less than $20 for those new ones without preinstalled app/game. This would save much hassle connecting SD to PC to just back up the Nintendo 3DS folder (after installing CIA install to SYSNAND, thus enable CIA installing on EMUNAND) and then restore the Nintendo 3DS folder after format EMUNAND.

Is there a bat file that do the "Hard mode" for ZIP3DSFX? I don't know how to code or make bat file, running command line...

" SFX Hard Mode: This mode hardcodes the archive.zip into the ZIP3DSFX.3dsx executable. To use this, rename your ZIP archive to 'archive.zip', put it into the data directory and compile with 'make sfx_hard'.
  • This will use the smallest amount of memory and will work anywhere.
  • The archives content can not be changed without compiling anew."
I saw that it uses less memory, maybe that may improve the limit of sizee of the ZIP3DSFX.3dsx/starter.bin

Side note: The extractor app only cares about the size of zip/ZIP3DSFX.3dsx/starter.bin. It doesn't care about the actually size of the compressed files inside. I put 100+ MB of files inside the compressed 63.8MB ZIP3DSFX.3dsx and it's extracted just fine.
 
Last edited by tivu100,

waffletower

Active Member
Newcomer
Joined
Jun 20, 2013
Messages
40
Trophies
0
Age
35
XP
127
Country
United States
So I just extract everything to root, or put everything in the 3DS folder, or...?

Okay, wait, no, I get it. After like 500 times reading the How to Use paragraph.
Why did i start this at 2AM?
 
Last edited by waffletower,
  • Like
Reactions: d0k3

tivu100

Well-Known Member
Member
Joined
Jun 6, 2015
Messages
2,260
Trophies
0
Age
34
XP
1,136
Country
United States
So I just extract everything to root, or put everything in the 3DS folder, or...?

Okay, wait, no, I get it. After like 500 times reading the How to Use paragraph.
Why did i start this at 2AM?
The emuNAND9tool zip structure is also the same structure for the root SD card.

For most part, you only need 1 way to boot EMUNAND9tool. There are many launching way included in the zip. I personally use the one through Homebrew launcher so I only need 3DS folder and EMUNAND9 folder, while starerGen folder is only used to generate the starter.bin
 
Last edited by tivu100,

waffletower

Active Member
Newcomer
Joined
Jun 20, 2013
Messages
40
Trophies
0
Age
35
XP
127
Country
United States
The emuNAND9tool zip structure is also the same structure for the root SD card.

For most part, you only need 1 way to boot EMUNAND9tool. There are many launching way included in the zip. I personally use the one through Homebrew launcher so I only need 3DS folder and EMUNAND9 folder, while starerGen folder is only used to generate the starter.bin
So wait. If I use the EmuNAND9 folder that's already in the 3DS folder in the .zip, that's all I need, right?
 

Syphurith

Beginner
Member
Joined
Mar 8, 2013
Messages
641
Trophies
0
Location
Xi'an, Shaanxi Province
XP
364
Country
Switzerland
@d0k3 I suggest a "copy to memory" feature for those files related to entrypoint when formating.
As you know the menuhax installation would produce some .bin files as the payload.
So it may earse some files - or users have to back up the content at root directory of SD first.
Setting up minimal HBL environment is quite a good one now.
Whatever your emunand9 frees us from relying on Brickway's - thanks for that.
 

Shadowtrance

Well-Known Member
Member
Joined
May 9, 2014
Messages
2,493
Trophies
0
Location
Hervey Bay, Queensland
XP
1,807
Country
Emunand9UI! :D

@d0k3 Ran into a few issues with this in regards to doing a UI version...
Pretty sure we've encountered similar issues before with D9 (i think).

Basically if i select Complete emunand setup, press B to cancel it,
1. It complains it can't find failed.bin (all images do exist)
2. It doesn't reload the menu (progress image is stuck on bottom screen, debug_bg + previous text is on top screen, if i press B again the "Emunand and SD Storage" strings show up, Work dir string doesn't. SD Storage "space" is totally messed up, for example: 17592186044415MB / 28124MB.

That's the only issues I've encountered so far as i don't have any spare sd cards to test everything fully.

4I9LXmD.png
 

MelonGx

Well-Known Member
Member
Joined
Jan 8, 2009
Messages
1,653
Trophies
1
XP
915
Country
China
@mooglazer and @MelonGx , you two first brought up this issue, so I hope you'll help me decide what to do with it. I already contacted @n1ghty via PM and I hope he will be doing an update or release the source code.

If I have to fix EmuNAND9 for compatibility, I have these options...
  1. Use the biggest possible size for EmuNAND (meaning: 1GB for O3DS, 2GB for N3DS), hoping that this will fix it. Big downside: this won't help anyone who already set up his EmuNAND with EmuNAND9.
  2. Do the above, but let the user decide which size to use. Downside: This will be confusing for noobs. Also, won't help anyone who already set it up.
  3. (in addition to the above): Automatically trim / pad NAND backups when injecting. Downside: Less safety, cause the size is an additional factor to check the validity of a NAND backup.
Any ideas? As I said, the problem right now lies in how EmuNAND tool dumps and injects NAND backups (uses the biggest possible size).
I vote No.2 - enable several formatting choices for different size patterns (e.g. (1) actual NAND size (2) forced 1GB/2GB (3) manually deciding creating a 943MB/954MB/1.21GB/1.84GB partition).
If making one default and all the others optional for skilled users, I think it will not be confusing for noobs.

* For I know, O3DS has 943MB (988,807,168 bytes) and 954MB (1,000,341,504 bytes).
2DS has 943MB, 954MB and 1.21GB.
N3DS has 1.21GB and 1.84GB (1,979,711,488 bytes).
All the above should be enough for current machines, I think.
Nintendo may increase other types of NAND size in the future though.

Anyway many thanks to your work for more possibility and convenience.
 
Last edited by MelonGx,

Fenderfix

Member
Newcomer
Joined
Jan 6, 2016
Messages
18
Trophies
0
Age
26
Location
Turin
XP
85
Country
Italy
You can switch the SD card, you don't have to. You don't have to remove it and put it back in either. That's an option, not a must. Be aware that the SD card set up for EmuNAND will be completely wiped, but I guess you know!
Now the problem is that I can't install Rxtools (My browser won't load rxtool.dat, same was for Launcher.dat), how can I install a CFW? (I've BrowserHax and MenuHax if need to use something)
 

d0k3

3DS Homebrew Legend
OP
Member
Joined
Dec 3, 2004
Messages
2,786
Trophies
1
XP
3,896
Country
Germany
Alright, you got to start somewhere... :)

""Note: Tested only on N3DS XL Hyrule edition"

Just tested extracting ZIP3DSFX.3dsx. I think the limit I think is 64MB. A 63.8MB ZIP3DSFX.3dsx is extracted just fine. A little over 64MB and the extracting process freezes at ** ZIP3DSFX v.06 by d0k3 ** line but doesn't give error code. Much more bigger than 64MB (Tried 72+MB) and there is an error code and the app asked to reboot.
Okay, thanks for testing! Well, you tested on a N3DS, which has more memory than the O3DS. Plus, that limit might depend on your current *hax version (the *hax handles the loading of 3DSX). So, it's unlikely that I will lift that limit. Maybe I'll add in some super secret way of completely disabling it (meaning, at the users responsibility).

Can you add "copying Nintendo 3DS folder" along with starter.bin to memory (which is later copied back to EmuNAND9 folder on the root of SD) uisng the "Complete EMUNAND" option? I mean the Nintendo 3DS folder is less than $20 for those new ones without preinstalled app/game. This would save much hassle connecting SD to PC to just back up the Nintendo 3DS folder (after installing CIA install to SYSNAND, thus enable CIA installing on EMUNAND) and then restore the Nintendo 3DS folder after format EMUNAND.
Well, $20 is not much for a folder, you're correct :P. Jokes aside, that would only be expected to work properly in certain cases (if your Nintendo 3DS folder is still small enough), plus it would be pretty complicated to code, would require more memory than one may think (in essence, I'd have to set up a RAMdisk to store the whole folder structure + data), would be error prone (an error means data loss) and would be a testers nightmare. You can still move the Nintendo 3DS folder inside your starter.bin.

Is there a bat file that do the "Hard mode" for ZIP3DSFX? I don't know how to code or make bat file, running command line...

" SFX Hard Mode: This mode hardcodes the archive.zip into the ZIP3DSFX.3dsx executable. To use this, rename your ZIP archive to 'archive.zip', put it into the data directory and compile with 'make sfx_hard'.
  • This will use the smallest amount of memory and will work anywhere.
  • The archives content can not be changed without compiling anew."
I saw that it uses less memory, maybe that may improve the limit of sizee of the ZIP3DSFX.3dsx/starter.bin
Nope, that's the whole point of the SFX hard mode. You get the written advantages, but you need to compile fresh for each archive. No way to do this with a BAT file only, that needs a compiler.

Side note: The extractor app only cares about the size of zip/ZIP3DSFX.3dsx/starter.bin. It doesn't care about the actually size of the compressed files inside. I put 100+ MB of files inside the compressed 63.8MB ZIP3DSFX.3dsx and it's extracted just fine.
Yup, that was expected.

@d0k3 I suggest a "copy to memory" feature for those files related to entrypoint when formating.
As you know the menuhax installation would produce some .bin files as the payload.
So it may earse some files - or users have to back up the content at root directory of SD first.
Setting up minimal HBL environment is quite a good one now.
Whatever your emunand9 frees us from relying on Brickway's - thanks for that.
Would be pretty nice in fact, but menuhax for example requires more than just that .bin file. Some of it is in the extdata, and that is where it gets pretty complicated and error prone (see above). You are free to edit your starter.bin to include the required files, though. Maybe there's even a somewhat universal solution to include the entry point into the starter.bin.

Emunand9UI! :D

@d0k3 Ran into a few issues with this in regards to doing a UI version...
Pretty sure we've encountered similar issues before with D9 (i think).

Basically if i select Complete emunand setup, press B to cancel it,
1. It complains it can't find failed.bin (all images do exist)
2. It doesn't reload the menu (progress image is stuck on bottom screen, debug_bg + previous text is on top screen, if i press B again the "Emunand and SD Storage" strings show up, Work dir string doesn't. SD Storage "space" is totally messed up, for example: 17592186044415MB / 28124MB.

That's the only issues I've encountered so far as i don't have any spare sd cards to test everything fully.

4I9LXmD.png
Looking good! As for the issues you brought up - I need to look into it. I have no idea yet, but I'm pretty sure it won't take too long.

I vote No.2 - enable several formatting choices for different size patterns (e.g. (1) actual NAND size (2) forced 1GB/2GB (3) manually deciding creating a 943MB/954MB/1.21GB/1.84GB partition).
If making one default and all the others optional for skilled users, I think it will not be confusing for noobs.

* For I know, O3DS has 943MB (988,807,168 bytes) and 954MB (1,000,341,504 bytes).
2DS has 943MB, 954MB and 1.21GB.
N3DS has 1.21GB and 1.84GB (1,979,711,488 bytes).
All the above should be enough for current machines, I think.
Nintendo may increase other types of NAND size in the future though.

Anyway many thanks to your work for more possibility and convenience.
I'll think about that - giving advanced users that possibility would also allow them to save even more space on their EmuNANDs than was possible before. I'd still need the exact sizes (for O3DS, N3DS and 2DS) that emuNAND Tool accepts. Still, the real problem is in EmuNAND tool (by n1ghty) compatibility - without that issue, nothing would have to be changed. Fixing that issue would be the clean solution for the issue at hand. n1ghty doesn't reply to messages and was last seen aeons ago in the emuNAND Tool thread. It's possible he doesn't want to update or release the source code. You (or other users) experiencing that problem, may also post in n1ghtys thread.

Now the problem is that I can't install Rxtools (My browser won't load rxtool.dat, same was for Launcher.dat), how can I install a CFW? (I've BrowserHax and MenuHax if need to use something)
Well, that's a CFW problem, not a EmuNAND9 problem, so that belongs into the rxTools thread. If you ask me, use ReiNAND (N3DS only) or CakesFW, which are both already included into my starter pack. You just need some additional files to make them work (for ReiNAND, that's only firmware.bin).
 
Last edited by d0k3,

tivu100

Well-Known Member
Member
Joined
Jun 6, 2015
Messages
2,260
Trophies
0
Age
34
XP
1,136
Country
United States
Alright, you got to start somewhere... :)


Okay, thanks for testing! Well, you tested on a N3DS, which has more memory than the O3DS. Plus, that limit might depend on your current *hax version (the *hax handles the loading of 3DSX). So, it's unlikely that I will lift that limit. Maybe I'll add in some super secret way of completely disabling it (meaning, at the users responsibility).


Well, $20 is not much for a folder, you're correct :P. Jokes aside, that would only be expected to work properly in certain cases (if your Nintendo 3DS folder is still small enough), plus it would be pretty complicated to code, would require more memory than one may think (in essence, I'd have to set up a RAMdisk to store the whole folder structure + data), would be error prone (an error means data loss) and would be a testers nightmare. You can still move the Nintendo 3DS folder inside your starter.bin.


Nope, that's the whole point of the SFX hard mode. You get the written advantages, but you need to compile fresh for each archive. No way to do this with a BAT file only, that needs a compiler.


Yup, that was expected.


Would be pretty nice in fact, but menuhax for example requires more than just that .bin file. Some of it is in the extdata, and that is where it gets pretty complicated and error prone (see above). You are free to edit your starter.bin to include the required files, though. Maybe there's even a somewhat universal solution to include the entry point into the starter.bin.


Looking good! As for the issues you brought up - I need to look into it. I have no idea yet, but I'm pretty sure it won't take too long.


I'll think about that - giving advanced users that possibility would also allow them to save even more space on their EmuNANDs than was possible before. I'd still need the exact sizes (for O3DS, N3DS and 2DS) that emuNAND Tool accepts. Still, the real problem is in EmuNAND tool (by n1ghty) compatibility - without that issue, nothing would have to be changed. Fixing that issue would be the clean solution for the issue at hand. n1ghty doesn't reply to messages and was last seen aeons ago in the emuNAND Tool thread. It's possible he doesn't want to update or release the source code. You (or other users) experiencing that problem, may also post in n1ghtys thread.


Well, that's a CFW problem, not a EmuNAND9 problem, so that belongs into the rxTools thread. If you ask me, use ReiNAND (N3DS only) or CakesFW, which are both already included into my starter pack. You just need some additional files to make them work (for ReiNAND, that's only firmware.bin).
Maybe we should have a separate version for N3DS (no intention to discriminate O3DS)? Developer should ultilise all the power of the hardware, right? It's Nintendo fault for being cheap and make a less powerful 3DS model in the first place.

I understand that. What I meant is that's would help creating an easier method that creating EMUNAND with CIA installer in 1 go for N3DS (no other app & preinstalled game inside the 3DS folder to make > 20MB (screw you, auto correction)) . Many new Tempers just keep forget to back up the Nintendo 3DS folder after installing CIA installer, before creating EMUNAND.Many new Tempers just ask the same questions of how to install CIa installer on N3DS EMUNAND, which at the moment there is no other noob-friendly way is install in SYSNAND and back up NIntendo 3DS folder before creating EMUNAND (I don't trust new Tempters to Inject stuff to NAND).

As of now starter.bin, 16MB limit in EMUNAND9Tool kinda hinder because there is not enough room if I put other nesscesary homebrew apps (which helps installing RxTools CFW, menuhax, ftbony, file explorer, Hans, Pasta CFW... In a sense, 1-go RxTools CFW installation method via EMUANAND9Tool without having to connect to PC again.
 
Last edited by tivu100,

Drak0rex

Well-Known Member
Member
Joined
Oct 12, 2014
Messages
2,196
Trophies
0
XP
2,895
Country
United States
I'm having an issue with the emunand I just created. Here's what I did. I started from a freshly formatted sd card, used emunand9 to format an emunand, and installed menuhax. Then I installed a working build of rxtools, as well as bootctr, but when it tries to mount the emunand, it just loops back to the boot screen image, (this time with messed up 3D) and hangs the second time it tries to mount the emunand. When I try to inject a working emunand into it with emunand tool, it says invalid file size.The emunand partiton is only 1.85 GB instead of 2GB. Why is this?
 
Last edited by Drak0rex,

MelonGx

Well-Known Member
Member
Joined
Jan 8, 2009
Messages
1,653
Trophies
1
XP
915
Country
China
I'm having an issue with the emunand I just created. Here's what I did. I started from a freshly formatted sd card, used emunand9 to format an emunand, and installed menuhax. Then I installed a working build of rxtools, as well as bootctr, but when it tries to mount the emunand, it just loops back to the boot screen image, (this time with messed up 3D) and hangs the second time it tries to mount the emunand. When I try to inject a working emunand into it with emunand tool, it says invalid file size.The emunand partiton is only 1.85 GB instead of 2GB. Why is this?
You need to use EmuNAND9 itself to inject the working emuNAND image.
 

Drak0rex

Well-Known Member
Member
Joined
Oct 12, 2014
Messages
2,196
Trophies
0
XP
2,895
Country
United States
You need to use EmuNAND9 itself to inject the working emuNAND image.
But I'm wondering why it doesn't work in the first place though. I already set up emunand with emunand9 but when I boot RXtools, it doesn't work. If I use the same rxtools setup with a gateway created emunand, it works just fine. So what is going wrong with emunand9?
 

MelonGx

Well-Known Member
Member
Joined
Jan 8, 2009
Messages
1,653
Trophies
1
XP
915
Country
China
But I'm wondering why it doesn't work in the first place though. I already set up emunand with emunand9 but when I boot RXtools, it doesn't work. If I use the same rxtools setup with a gateway created emunand, it works just fine. So what is going wrong with emunand9?
You didn't unlink emuNAND so it carried your SysNAND's coldboot.
That's why you got looped on booting emuNAND.

Since modifying LINKED EMUNAND's Theme setting will also modify SysNAND's Theme setting, which will vanish your coldboot, you MUST unlink emuNAND in order to make the coldboot work properly.
 
Last edited by MelonGx,
  • Like
Reactions: d0k3

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: https://youtube.com/shorts/NGOSybO-5R4?si=SmiQ0UaynHR80xC9