Hacking Official [Source Release] ReiNand CFW

Ripper00420

Well-Known Member
Member
Joined
Nov 5, 2013
Messages
740
Trophies
0
Age
41
XP
453
Country
United States
Anyone have a clue why ReiNand can detect my EmuNand and boots from CTR Bootmanager every time, yet I can't find ANY... HB/PC app that can back it up at all. I'm losing grip on this issue people for real..lol! Any help is greatly Appreciated

I've tried replacing the header of the physical drive with the bytes from my SysNand backup to the appropriate locations, and nothing.
TOOLS I'VE TRIED:
PC
MultiNand Creator(latest)
EmuNand Tool(latest)
HB
EVERYTHING...lol

EDIT:
I'm probably going to just reformat my SD card and start all over anyway... lol
 
Last edited by Ripper00420,

Selver

13,5,1,14,9,14,7,12,5,19,19
Member
Joined
Dec 22, 2015
Messages
219
Trophies
0
XP
426
Country
In fairness I did say others I had spoken to had no complaints, perhaps I was just unlucky or my expectations were too high

No. When I added the 1 byte config file (really, one byte!) to AuRei, people complained about slow booting. "Latency" or "random access time" is the time the card needs to access a random sector. Now, I'm not sure if all large (64/128 GB) cards have bad latency (which is not read/write speeds, those are very fast), but everyone who had the slowdown had large cards. It's not "a myth", I saw it happen.

There's more than one thing at play here. Reading a 1 byte file is actually many operations. For example:
0. Start with root directory
1. Read the first sector of the directory
2. Scan for the target file/directory (processing in memory... can "optimize" media by copying boot files onto the media before any other files)
3. If directory found, read the FAT table to find full allocation for that directory and goto #1
4. If end of sector, and directory continues, read the next sector for this directory and goto #2
5. Once file is found, read the FAT table to find full allocation for that file (which is probably not optimized out on single-sector files)
5. Read the actual sector(s) of the file

Thus, this is at least three sectors read (root, FAT, and actual file), as I've not seen any caching or other optimizations in the file system code. Add at least two more reads for a subdirectory (directory entry + FAT need to be read). Reading of a single-byte file is essentially as quick as reading a single-cluster sized file.

Most likely, the users experiencing slowdowns had *lots* of files on the media.

A quick improvement (data isn't copied, just directories modified):
* make a directory in the root, called "TMP"
* move all files and folders into TMP, so it's the only thing in root directory.
* move boot-time critical files back into root directory
* move everything else back into the root directory

Why? This makes the boot-time critical files take up the first few directory entries, and thus ensures single-sector read of the root directory will find that file/directory.


A better improvement:
* Use robocopy for the below (built-in to Windows)
* robocopy everything off the SD card to temp hard drive space
* format the SD card
* robocopy boot-critical files and directories back onto the SD card
* robocopy all the other files, using /CREATE option to only create file/directory entries

Why? makes all the allocations sequential, and /CREATE ensures directory entries are also all at the start of the media....

CFW improvements:

There's a few things to tweak that can help.
1. Cache the directory entries, if you're booting and know there are no writes to the media
2. Don't look at FAT if file size is less than one cluster... just need the first cluster
 
  • Like
Reactions: Sno0t

peteruk

Well-Known Member
Member
Joined
Jun 26, 2015
Messages
3,003
Trophies
2
XP
7,344
Country
United Kingdom
ReiNand was my first love, and it will be my last. Firmware for the future, and it boots really fast! To boot without my ReiNand would be impossible to do. In this world of bloatware, my ReiNand pulls me through.

Thanks.

I wonder how many others will know the song you were doing a parody of, the average user age seems quite low, that said agree with your words, nice post :)
 
  • Like
Reactions: Rohul1997

Sno0t

Well-Known Member
Member
Joined
Aug 20, 2015
Messages
223
Trophies
0
XP
1,217
Country
Gambia, The
We are both sooooo way off topic but that was good, fair play :D
You're right, better get back to topic right now ;)
There's more than one thing at play here. Reading a 1 byte file is actually many operations. For example:
[...]
That post was actually really informative. Guess I will try and see if this can increase my boot time by any means.
However, as I have an almost full 128GB card I will wait, as I dont have the time to spend right now :)
Thank you for this though :), its really appreciated.
 
Last edited by Sno0t,
  • Like
Reactions: peteruk

Selver

13,5,1,14,9,14,7,12,5,19,19
Member
Joined
Dec 22, 2015
Messages
219
Trophies
0
XP
426
Country
You're right, better get back to topic right now ;)

That post was actually really informative. Guess I will try and see if this can increase my boot time by any means.
However, as I have an almost full 128GB card I will wait, as I dont have the time to spend right now :)
Thank you for this though :), its really appreciated.

Hi Sno0t,

Glad that you found it informative. Please do respond if you try any (or both) simple methods out, and report your before/after boot times?
 

Ripper00420

Well-Known Member
Member
Joined
Nov 5, 2013
Messages
740
Trophies
0
Age
41
XP
453
Country
United States
Ok, iv'e figured something out....
The only thing that reads my EmuNand is ReiNand 3.3-3.4 anything after is no go and NO Homebrew or PC app will even detect it.
any clues...?
 

frosty5689

Well-Known Member
Member
Joined
Jan 30, 2016
Messages
146
Trophies
0
Age
70
XP
170
Country
Ok, iv'e figured something out....
The only thing that reads my EmuNand is ReiNand 3.3-3.4 anything after is no go and NO Homebrew or PC app will even detect it.
any clues...?
Have you tried using EmuNAND9 or Decrypt9 to backup your EmuNAND? If you can succesfully backup you can do the following to hopefully fix it.

1. Backup EmuNAND using above mentioned tool
2. Copy all content of SD card to PC (including the backed up emunand.bin)
3. Do a complete setup of RedNAND using EmuNAND9
4. Copy all content to SD card (keep original copy on PC still), including emunand.bin
5. Restore RedNAND from EmuNAND.bin
6. Profit
 

Ripper00420

Well-Known Member
Member
Joined
Nov 5, 2013
Messages
740
Trophies
0
Age
41
XP
453
Country
United States
Have you tried using EmuNAND9 or Decrypt9 to backup your EmuNAND? If you can succesfully backup you can do the following to hopefully fix it.

1. Backup EmuNAND using above mentioned tool
2. Copy all content of SD card to PC (including the backed up emunand.bin)
3. Do a complete setup of RedNAND using EmuNAND9
4. Copy all content to SD card (keep original copy on PC still), including emunand.bin
5. Restore RedNAND from EmuNAND.bin
6. Profit
No tool at all detects it, just ReiNand 3.3-3.4...
 

Ripper00420

Well-Known Member
Member
Joined
Nov 5, 2013
Messages
740
Trophies
0
Age
41
XP
453
Country
United States
There are guides made for moving EmuNAND to another SD card using tools on the PC. Maybe try that and see if you can get a backup before trying to re-setup your EmuNAND on your SDCARD?

What did you use to setup your EmuNAND originally?
MultiNand Creator, but when I said no tools I mean NONE..lol

PC or Homebrew, I've tried them all.
 

peteruk

Well-Known Member
Member
Joined
Jun 26, 2015
Messages
3,003
Trophies
2
XP
7,344
Country
United Kingdom
Speaking of sigs, what's "Prelude CFW" anyway?
OT: Another great release, but a quick question, what happened with the Old 3DS release? :P
Prelude was a project that started but the dev stopped it for his own reasons, but i keep it on a spare card to play with

there is only 1 ReiNand :)
 

matpower

Messenger from Zero
Member
Joined
May 5, 2012
Messages
1,103
Trophies
2
Age
24
Location
Best state in Brazil
XP
2,597
Country
Brazil
Prelude was a project that started but the dev stopped it for his own reasons, but i keep it on a spare card to play with

there is only 1 ReiNand :)
Well, last time I checked out, there was a "ReiNAND_O3DS.zip" and a "ReiNAND_N3DS.zip", now there is only a N3DS zip, unless it got merged with the normal/N3DS version. :P
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    SylverReZ @ SylverReZ: https://www.youtube.com/watch?v=kaQqCfuxKoE