RealWnD v0.11 -- A Real 1:1 Wii NAND Dumper, designed by pcfree.
Based on Redbird's YaWnd 0.3

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

Special Thanks to:
Homebrew Channel, DevkitPPC and libOGC developing crew.
Redbird's YaWnd source code.
Waninkoko's Wad Manager FAT management source code.



== Introduction ==
This program is a 1:1 Wii NAND Dumper based on YaWnD 0.3 with several improvements.  All currently
available Wii NAND Dumpers misunderstand the IOS_Read() returned error code -12 and cause dumped
image file to be different from extracted image of external hardware programmer for de-soldered
NAND chip.

After analyzing, the -12 code seems very likely to be ECC error but not simply to be bad block.
And most pages with -12 return code might be unmanaged free block (ECC error due to erased
but not programmed yet).  Zeroing these pages is a bit dangerous.  If it happens it's the very
first time the ECC error occurred for a good page while dumping, zeros it might cause the dumped
image useless.

Besides the -12 code, some people encounters -11 code and stop their dumping.  I guess the -11
code might be NAND read timeout and NAND status error.  Stopping dumping is not a good idea but
zeroing it would be safe.  I also provide extra Page Debug Dump for these -11 code for user
to analyze it.

For whose NAND dump without -11 code, the RealWnD can help them make 100% 1:1 dump which is exact
the same with hardware programmer dump.

== Improvement ==
* Real 1:1 dump of NAND Flash by processing error code -11 and -12
* Greatly reduce dump time by opening files once instead of appending repeatedly
* Add log file for all error pages
* Change to new style FAT management code for easily compiling
* Add Debug Dump for -11 code or others for future analysis

== How To Use ==
Most operations are the same as YaWnd.  You can use button 1 to toggle SD and USB, button 2 to
toggle +ECC and normal dump, and button A to start dump.  In addition, you can use button B to
toggle on/off for Debug Dump.  A log file WiiFlash.log will log all page error return code.
If DebugDump turs on, several image files WFD_<page#>_<error code>.img will be created for
future analysis.

== Changelog ==
* v0.1 (08 May 2009) Initial release.
* v0.11 (08 May 2009) bugfix: error code -12 mis-typed as 12 cause error code -12 unnecessarily
  retry once.
