Line 1:
Line 1:
{{lowercase title}}
{{lowercase title}}
−
{{Stub}}
'''cafe2wii''' is the process used to transition to [[WiiMode]].
'''cafe2wii''' is the process used to transition to [[WiiMode]].
−
It lowers the [[Hardware/Espresso|Espresso]]'s clock speed, disables [[Hardware/Starbuck|Starbuck]] access to Wii U-exclusive hardware, then launches the loaded IOS.
+
+
== Booting into Wii mode ==
+
After being launched, cafe2wii will parse a boot info structure located at 0x00001000. It will copy all the boot info binaries to several memory locations.<br>
+
The c2w.img from OSv1 version additionally verifies the header of the "hai params" located at 0x00402000 and copies them to 0xfffff000. <br>
+
It then lowers the [[Hardware/Espresso|Espresso]]'s clock speed, disables [[Hardware/Starbuck|Starbuck]] access to Wii U-exclusive hardware, then directly jumps to the loaded IOS (?).
+
+
=== C2WBin ===
+
{| class="wikitable"
+
|-
+
! Start
+
! Length
+
! Description
+
|-
+
| 0x00
+
| 4
+
| size
+
|-
+
| 0x04
+
| 4
+
| paddr
+
|}
+
+
=== C2WBootInfo ===
+
{| class="wikitable"
+
|-
+
! Start
+
! Length
+
! Description
+
|-
+
| 0x00
+
| 4
+
| iosVer (lowest 2 bytes of the title id and title version)
+
|-
+
| 0x04
+
| 8 (C2WBin)
+
| eeprom
+
|-
+
| 0x0C
+
| 8 (C2WBin)
+
| romfont
+
|-
+
| 0x14
+
| 8 (C2WBin)
+
| ios
+
|-
+
| 0x1C
+
| 8 (C2WBin)
+
| boot
+
|-
+
| 0x24
+
| 8 (C2WBin)
+
| app
+
|}
== Launching cafe2wii ==
== Launching cafe2wii ==
Line 9:
Line 60:
MCP-CMPT will load multiple binaries from OSv0/v1 into MEM1.
MCP-CMPT will load multiple binaries from OSv0/v1 into MEM1.
It then launches the c2w.img, which prepares those binaries in memory.<br>
It then launches the c2w.img, which prepares those binaries in memory.<br>
−
There are 3 different launch modes for booting into vWii: "NORMAL", "SIMPLE_DOL" and "HAI". All launch modes load the OSv0/v1 c2w.img and foot.bin and read the Wii EEPROM using the "/dev/crpyto" ioctl 0x1e.
+
There are 3 different launch modes for booting into vWii: "NORMAL", "SIMPLE_DOL" and "HAI". All launch modes load the OSv0/v1 c2w.img and font.bin and read the Wii EEPROM using the "/dev/crpyto" ioctl 0x1e.
=== NORMAL (0) ===
=== NORMAL (0) ===