Hacking [Release][v.1.5.1] Sky Army Knife - a Sky3DS Template Tool

Foxi4

Endless Trash
OP
Global Moderator
Joined
Sep 13, 2009
Messages
30,824
Trophies
3
Location
Gaming Grotto
XP
29,819
Country
Poland
SkyArmyKnifeLogo.png

Q: What is this?
A: Sky Army Knife is a multitool for Sky3DS users I'm currently coding in C++ with a dash of .Net. In its current state (version 1.5.1) the tool is capable of generating relatively accurate Template Files for .3DS ROM files, displaying ROM infos of header.bin and *.3DZ files and trimming *.3ds ROM files.

Q: Fair enough, how do I use this?
A: It's really simple and self-explanatory:

Sky Army Knife 1.3.png
Sky Army Knife window

  1. Browse for the original Sky3DS template file
  2. Browse for a .3ds ROM
  3. Type in or copy-paste a UniqueID. This text box only accepts characters from 0-9, from a-f/A-F, each pair of characters should be separated by a space. If the game you're creating a template for is Offline, you can also skip this step by checking the Zero-Fill checkbox.
  4. Select the EEPROM constituents from the drop-down boxes. If you don't know what EEPROM type the game you're generating the template for uses, consult the look-up box. If you do not select any EEPROM type, the generator will Zero-Fill that portion of the template instead. If you cannot find a suitable option, the fields are free-form, so you can type in any Byte values you'd like.
  5. Select the CartID constituents from the drop-down boxes. If you don't know what CartID type the game you're generating for uses, consult the look-up box. If you do not select one or more CartID elements, the generator will Zero-Fill the blank portions of the template instead. If you cannot find a suitable option, the fields are free-form, so you can type in any Byte values you'd like.
  6. Type in an UnknownID. This text box only accepts characters from 0-9, from a-f/A-F, each pair of characters should be separated by a space. Currently nobody really knows what this ID reflects as it is not used directly by DiskWriter, so it has to be auto-detected from the original template using the checkbox on the right.
  7. Click "Generate Template" to generate your Template contents. You can generate several templates at a time.
Once you are done, you can use the Clear button to clear the window, Copy to Clipboard to copy the window's contents or Save to .*txt to save the contents as a new text file.

Q: How do I "consult the look-up box"?
A: It's very simple, provided you know what you're looking for. Here's an example:

Template Guide.png
A Sky3DS template analyzed

Most of those values are detected or calculated for you, those that aren't (Cart ID and EEPROM ID) can be easily looked up in the Base Template look-up box.

Q: Cool! What if your tool doesn't work though?

A: I've taken great care to make sure that the application doesn't misbehave or explode in the user's face for no reason, but if it does, please post in this thread and I'll do my best to fix the problem.

Q: All this is great, but the application is missing XYZ.
A: We're all human! If you have any suggestions, be sure to post them here. ;)

Q: Can I have the source code?
A: As I said before, this tool is released in a state of urgency, the source code isn't exactly tidy just yet, merely operational. I will clean it up in the few passing days and then I can provided it to any interested parties.

Q: Where can I get it?
A: Right here, on GBATemp.net, specifically on FileTrip:



Changelog:
  • v.1.0 Initial release
  • v.1.1 Quickfix: EEPROM values for Macronix chips now generate correctly
  • v.1.2 Non-public, testing new GUI elements, code clean-up
  • v.1.3 EEPROM settings divided into two boxes, Unknown ID auto-detection added, look-up Base Template box added
  • v.1.4 New tool: Infos Extractor compatible with GW ROM and Header dumps, EEPROM Size and Manufacturer fields now further subdivided for increased customizability, Unique ID Zero-Fill replaced with a Randomize option (are you feelining lucky?), misc. code optimization, form can now be resized to access scroll bars
  • v.1.4.1 Quick Fix: Base Template string shortened to trim white signs
  • v.1.4.2 Searches now performed on the basis of SHA1 values rather than product codes, EEPROM and Cart ID fields are now free-form, drop-down options of "0x80" and "0x88" for the Mystery Byte added, KTR (New 3DS) compatibility, Template Magic Check fixed, volatile exception when entries were not found in the Base Template is now handled
  • v.1.4.2 Quick Fix Fixed the drop-downs that I accidentally broke. :P
  • v.1.5 Added ROM Trimming function, Unknown ID detection bug fixed, improved Random Number Generator
  • v.1.5.0 Quick Fix Fixed bug in ROM trimmer, 4GB ROMs now trim correctly
  • v.1.5.1 Trimmer now working in a Background Worker class in a separate thread leading to no more GUI freezes, several optimizations
Special Acknowledgements and Great Thanks:
  • Falo for the original Template Maker and providing its source code, it proved to be a great code base for Sky Army Knife. :grog:
  • Lukas2511 for his Python-based tools and detailed information about the Sky3DS available on his GitHub. :grog:
  • smealum, Neimod, @yellows8, profi200, WinterMute, elisherer, 3DSGuy and other 3DS Scene Developers who continue to research the platform - you make our homebrew dreams a reality, keep it up! :yaynds:
 

Foxi4

Endless Trash
OP
Global Moderator
Joined
Sep 13, 2009
Messages
30,824
Trophies
3
Location
Gaming Grotto
XP
29,819
Country
Poland
Hehe, glad to help out - if it saves one system from getting banned, it was well worth it. Keep in mind that this is the first release so it might be buggy and the templates may or may not work due to the unknown value (I searched high and low, including on Chinese forums, and all I gathered was that it's some kind of cryptographic hash), but during testing with all the fields correctly filled in it generated templates identical to those provided by Sky, so I'm optimistic. :P
 

gamesquest1

Nabnut
Former Staff
Joined
Sep 23, 2013
Messages
15,153
Trophies
2
XP
12,247
ok, i think maybe it could do with auto filling out the derivable parts, cart size, save type etc

and does this properly generate the unknown value that prevents people using new games without sky releasing an update or do people need to provide that value,
and finally, if you could just read the original template file so then you can just copy all their default values and only need to provide a header then
 

s-arash

Well-Known Member
Member
Joined
Sep 3, 2013
Messages
185
Trophies
0
Age
32
XP
364
Country
United States
so do we still need sky3ds team to release template for new games? or we dont need them anymore?
 

gamesquest1

Nabnut
Former Staff
Joined
Sep 23, 2013
Messages
15,153
Trophies
2
XP
12,247
so do we still need sky3ds team to release template for new games? or we dont need them anymore?
nope, looks like you have to manually input everything.....and its the unknown value that sky3ds uses that means they are the only ones who can provide updated template files
 

Foxi4

Endless Trash
OP
Global Moderator
Joined
Sep 13, 2009
Messages
30,824
Trophies
3
Location
Gaming Grotto
XP
29,819
Country
Poland
ok, i think maybe it could do with auto filling out the derivable parts, cart size, save type etc
You'd have to read those values from somewhere first - I'm not seeing all of them in NCCH or NCSD, so I opted for manual selection for now. I might pull the Maker Code from NCCH later on, for now this works as-is. :P
and does this properly generate the unknown value that prevents people using new games without sky releasing an update or do people need to provide that value,
and finally, if you could just read the original template file so then you can just copy all their default values and only need to provide a header then
It does not generate the UnknownID, it has to be copy-pasted from a Sky template. The reason why this exists is that it's comparatively simpler than changing several values in a template and having to re-calculate CRC16 of the entry (last two bits of the template).

so do we still need sky3ds team to release template for new games? or we dont need them anymore?
Unfortunately no, you still need the UnknownID value. Once someone works that bit out, I'll update SAK to generate it.
 

gamesquest1

Nabnut
Former Staff
Joined
Sep 23, 2013
Messages
15,153
Trophies
2
XP
12,247
You'd have to read those values from somewhere first - I'm not seeing all of them in NCCH or NCSD, so I opted for manual selection for now. I might pull the Maker Code from NCCH later on, for now this works as-is. :P
It does not generate the UnknownID, it has to be copy-pasted from a Sky template. The reason why this exists is that it's comparatively simpler than changing several values in a template and having to re-calculate CRC16 of the entry (last two bits of the template).

Unfortunately no, you still need the UnknownID value. Once someone works that bit out, I'll update SAK to generate it.
well seeing as people need the sky3ds template anyway to get the unknown value, you could just load up the template file automatically if SAK is in the same directory, then when the user loads up the game they want to edit have it auto load the games template from the template.txt file and just edit the header then fix the crc on saving

sorry if i sound all douchy, i just mean that would reduce a lot of the steps involved with copying and pasting stuff manually :)
 
  • Like
Reactions: Foxi4

Foxi4

Endless Trash
OP
Global Moderator
Joined
Sep 13, 2009
Messages
30,824
Trophies
3
Location
Gaming Grotto
XP
29,819
Country
Poland
well seeing as people need the sky3ds template anyway to get the unknown value, you could just load up the template file automatically if SAK is in the same directory, then when the user loads up the game they want to edit have it auto load the games template from the template.txt file and just edit the header then fix the crc on saving
I was thinking of using that solution myself, might implement this in a future update! :grog:
 

itsamario2015

Active Member
Newcomer
Joined
Feb 4, 2015
Messages
37
Trophies
0
Age
38
XP
48
Country
United States
You'd have to read those values from somewhere first - I'm not seeing all of them in NCCH or NCSD, so I opted for manual selection for now. I might pull the Maker Code from NCCH later on, for now this works as-is. :P
It does not generate the UnknownID, it has to be copy-pasted from a Sky template. The reason why this exists is that it's comparatively simpler than changing several values in a template and having to re-calculate CRC16 of the entry (last two bits of the template).


Can you not auto populate those values (eeprom ID, cart ID, unknown ID) from an existing official Sky3DS template?

edit: just read the other responses, looks like you may well do this in the future :yaysp:
 

mary1517

Well-Known Member
Member
Joined
Sep 14, 2009
Messages
108
Trophies
0
Age
33
Website
www.behance.net
XP
296
Country
Poland
I have a question...
What technically is the zero-fill? What will happen if I Zero-fill a game that uses online, like Pokemon for example? I would be "safe" from playing on public headers yet won't be able to go online right? Or would it give me an error and require a ID?

But overall, fantastic work Foxi4. Ah ci polacy, taki zdolny naród xD
Now the only thing we sky3ds users meed is a way to somehow dump the IDs from our legit cards.
 
  • Like
Reactions: Foxi4

SomecallmeBerto

The Anti-Hero
Member
Joined
Dec 17, 2014
Messages
1,097
Trophies
0
Age
32
Location
USA
XP
646
Country
United States
I have a question...
What technically is the zero-fill? What will happen if I Zero-fill a game that uses online, like Pokemon for example? I would be "safe" from playing on public headers yet won't be able to go online right? Or would it give me an error and require a ID?

But overall, fantastic work Foxi4. Ah ci polacy, taki zdolny naród xD
Now the only thing we sky3ds users meed is a way to somehow dump the IDs from our legit cards.


You can use the GW menu...you don't need the GW cart to do this :)
 

mary1517

Well-Known Member
Member
Joined
Sep 14, 2009
Messages
108
Trophies
0
Age
33
Website
www.behance.net
XP
296
Country
Poland
You can use the GW menu...you don't need the GW cart to do this :)

Yeah I would love too, but I'm on 9.5 so :(
There was a user on that giant ban thread, I belive it was WulfyStylez, he figured out a way to dump those informations and promised a tutorial after explaining it breafly but should I say... not noob friendly enough xd

Or maybe I'm missing something?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: https://youtu.be/IihvJBjUpNE?si=CsvoEbwzNKFf0GAm cool