i've got the unity install and license from archive.org, Nintendo removed the support for Unity a while ago. For the SDK i just downloaded it from the Nintendo Developer Website, the registration process is fearly easy but they are only letting developer download only the wii u and 3ds sdk. If you want the switch sdk you must follow a registration form where you present your game and if they accept you then you can download it. Anyway thanks for sharing the process, also i think this can be trimmed a bit and i've noticed that you can remove the -skipXMLParsing -encryptionKey and -tID like V10lator said, NUSPacker crashes because the app.xml is broken, you need to replace this lineShort tutorial but it can work.
First, I use Unity 2017.1.2p3 with the WIi U Build Support (I use this version, because I didn't get any results with other versions)
In therms of tools I have CDecrypt with the tik_sys.bin of the dev kit (located in your cafe_sdk\system\bin\tool\mastering\resources\makemaster\tik_sys.bin), NUSPacker from rabisco and Kii U Generator with my title ID
Build the game & decrypt it
I build the game with Master [No Network] / Download Image / NAND.
After, I use CDecrypt to decrypt the dev files from your Unity Project/copyToSd/ with the DEV KEY (tik_sys.bin). Use the GUI version and select the tik_sys.bin (copy it to the CDecrypt GUI folder it better) and the title.tik from the in folder.
If you don't have a TitleID
The Wii U Title ID is different in one point : the UniqueID (normaly give by Nintendo, I think...).
Each Wii U TilteID is composed like that : 0x000500001 + UniqueID + VARIATION (don't know it's from Wii U App Config Tool)
So I just put random numbers to make my own UniqueID (note : it must be a HEX value) and check on This website if the TitleID was already used.
Generate the Title Key from TitleID with Kii U Generator
Start Kii U Generator.bat from my archive enter the WiiU Common Key (google it's somthing like D7B..........................656) enter your Title ID and generate. You will have 2 keys : Unencrypted title key and encrypted title key. We will use the unencrypted with NUSPacker.
Repack the game files
Place the code/meta/content folders from CDecrypte in /in/ in the NUSPacker. You will need to edit the file pack.bat. This file must contain the Title ID, Unencrypted Title Key & Wii U Common Key as arguments
Edit the file like that
java -jar NUSPacker.jar -in "in" -out "out" -skipXMLParsing -encryptWith "wiiucommonkey" -encryptionKey "your_unencrypted_titilekey" -tID your_title_id_here
After check if the encrypted title key shown by NUSPacker is the same as Kii U Generator, if yes, your game is ready to install to your WIi U. If not try a different Title ID in Kii U Generator and a different password (generally mypass or nintendo)
That the steps I used to install my own game on my Wii U.
I attach an archive with the tools CDecrypt and NUSPacker.
After launching on your Wii U be patient, sometimes I need to wait 30s-1minute on the startup screen before my game loads.
Just one question : Where do you get your Unity Install + licence and the Cafe SDK ?
Note : It has been one week I try that, and I managed to run my game this morning, I don't know the entire SDK, I just search for hours and hours.... If you need help, I am here.
<os_mask type="hexBinary" length="32">0</os_mask>
with
<os_mask type="hexBinary" length="32">0000000000000000000000000000000000000000000000000000000000000000</os_mask>
then it parses the file normally
i've also noticed the null pointer which means that actually the game booted. Before trying the blank project (i can confirm it's a vaild test, unity has it's own skeleton and a blank project can be built and run with no problem on windows, it just shows a skybox and nothing else) i also tried my own project and it gave the same error, maybe this version of unity want a manually placed file somewere...That shouldn't be needed as CDEcrypt contains the dev key: https://github.com/VitaSmith/cdecrypt/blob/master/cdecrypt.c#L43-L44
This is completely overkill. Just use whatever key you want (or NUSPackers default). The Wii U won't calculate the key but just read it from the title.tik file.
NUSPacker should be able to read the title ID from the unencrypted files (when you don't use-skipXMLParsing
). For the title key I would just leave it blank so NUSPacker uses its default. Will make it way more simple.
So correct, hassle free NUSpacker command:
Code:java -jar NUSPacker.jar -in "in" -out "out" -encryptWith "wiiucommonkey"
//EDIT: Even when off-topic as unneeded:
Here's the full password list. Then again you won't need this as NUSPackers default title key or any hex value you can imagine will work just fine: "mypass", "nintendo", "test", "1234567890", "Lucy131211", "fbf10", "5678", "1234", ""
//EDIT²: Also the current issue is not a wrongly packed title but something wrong witht the codes. Just look at the logs:
Code:invalid access of 0x00000000
So fread does a Null pointer access. My guess is that this is causeCode:00;25;49;770: 0x12e927d8: 0x12e927f8 0x1005e060 coreinit.rpl|.bss+0xb1e0 00;25;49;770: 0x12e927f8: 0x12e92818 0x038ea2d8 unity-master|fread+0xd0 00;25;49;801: 0x12e92818: 0x12e92850 0x020fd434 unity-master|InitFromFile__Q2_10BootConfig4DataFPPCcUiPCc+0x114 00;25;49;811: 0x12e92850: 0x12e92900 0x020fca70 unity-master|InitFromFileFormatted__10BootConfigFPPCcUiPCce+0x114 00;25;49;821: 0x12e92900: 0x12e92938 0x020041b8 unity-master|PreInit__5unityFiPPc+0x64 00;25;49;830: 0x12e92938: 0x12e92960 0x020000d8 unity-master|main+0x98 00;25;49;840: 0x12e92960: 0x12e92978 0x02000424 unity-master|_start+0xac 00;25;49;849: 0x12e92978: 0x00000000 0x0101c570 coreinit.rpl|$TEXT+0x170
InitFromFile
tries to open a file which isn't there (and unity is missing correct error handling). In case a empty project should really work (which I still doubt, can someone confirm this?) your best bet would be to open the .rpx in Ghidra and look atunity-master|PreInit__5unityFiPPc+0x64
andunity-master|InitFromFileFormatted__10BootConfigFPPCcUiPCce+0x114
to see what file it tries to open.
Last edited by DomyGX,