archshift / Decrypt9

Multipurpose content dumper and decrypter for the Nintendo 3DS (SUPERSEDED)
GNU General Public License v2.0
103 stars 83 forks source link

Add compatibility with ncchinfo.bin generated by Riku's 3DS Simple CIA Converter #41

Closed zeruel85 closed 8 years ago

zeruel85 commented 9 years ago

Like the title says... I have a N3DS with your very useful tool, Decrypt9, but if I generate the ncchinfo.bin from 3DS Simple CIA Converter by Riku (IMHO the best, easy and quick converter actually available), it does not work. Riku's ncchinfo.bin works flawlessly with rxTools and its Xorpads generator tool. May I ask if you can add the compatibility too? Thank you in advance and congrats for this precious tool. :)

Syphurith commented 9 years ago

@zeruel85 Even i'm not from the team please let me answer you a bit. Note: For some devs this issue looks noob, and for some other it looks related too much to piracy and the else is just too busy. Hope question is not too noob so they wouldn't get tired to see your issue. The incompatibility is caused by string encoding. Decrypt9 itself generates UTF-16 one (in its scripts/ncchinfo_gen.py). Most CIA convertors uses UTF-8, and is the same for rxTools, or even more. For characters in UTF-16 every char takes 2 bytes, 0 would stands for 00 30 in binary. on the other hand, UTF-8 is an encoding with variable length. it may takes you only 1 byte for ASCII but not the same for CJK or chars from other region. This makes UTF-16 eaiser to be dealt than UTF-8. Now you have several choices to do your deed.

Hope your issue get well and easily solved. Best wishes to the devs and you.

zeruel85 commented 9 years ago

Ok, thank you for your hints. I'll try to find out the smartest way to do what you've written at point 1 of 3. :)

d0k3 commented 8 years ago

Already fixed in this commit: https://github.com/archshift/Decrypt9/commit/cb196a78a85e11ab4c6eda33f582671cb44cd63f Decrypt9 will now also process ncchinfo.bin generated by Rikus converter.

This can be closed!

Syphurith commented 8 years ago

Thanks. That's good news to hear, @d0k3. Eh, readed this commit log, i wonder if there is really something must be decrypted on new 3ds.. Is that not sufficient even he has some leaked keys? BTW, i had a crazy idea. I doubt if part of the decrypted NAND image could be solid content, could the xorpad generation be reversed to cover a part of it to a full xorpad?