In memory of Ben “bushing” Byer, who passed away on Monday, February 8th, 2016.

Difference between revisions of "/tmp/nandTest.dat"

From WiiBrew
Jump to navigation Jump to search
(Linked the download in case anyone is interested)
m (Navbox)
Line 16: Line 16:
 
  }
 
  }
  
[[Category:Wii Filesystem]]
+
{{Navbox filebrowser}}

Revision as of 03:57, 2 August 2021

/tmp/nandTest.dat is a 25.6MB file created during the factory process to test reading and writing the NAND. It contains a specific pseudorandom pattern. The contents can be downloaded here.

Like other contents of /tmp, it is erased on every boot and IOS reload.

Algorithm

The following code is used to generate this file:

s32 seed = 1;
s16 rand(void) {
    seed *= 0x41C64E6D;
    seed += 12345;
    return (s16) seed >> 16;
}

u8 getRandomChar(void) {
   return rand() >> 8;
}