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

Discussion in '3DS - Flashcards & Custom Firmwares' started by Foxi4, Feb 20, 2015.

  1. Foxi4
    OP

    Foxi4 On the hunt...

    pip Reporter
    23,528
    21,456
    Sep 13, 2009
    Poland
    Gaming Grotto
    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:
     


  2. SomecallmeBerto

    SomecallmeBerto The Anti-Hero

    Member
    1,097
    655
    Dec 17, 2014
    United States
    USA
    Awesome thank you Foxi4. Going to test this out once I get home :)
     
    Foxi4 likes this.
  3. MrJason005

    MrJason005 √2

    Member
    1,957
    1,087
    Nov 26, 2014
    Greece
    Κάπου
    nicely done
     
    Foxi4 likes this.
  4. Foxi4
    OP

    Foxi4 On the hunt...

    pip Reporter
    23,528
    21,456
    Sep 13, 2009
    Poland
    Gaming Grotto
    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
     
    tjexp and MrJason005 like this.
  5. gamesquest1

    gamesquest1 Nabnut

    Member
    14,078
    9,415
    Sep 23, 2013
    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
     
  6. s-arash

    s-arash GBAtemp Regular

    Member
    160
    82
    Sep 3, 2013
    United States
    so do we still need sky3ds team to release template for new games? or we dont need them anymore?
     
  7. gamesquest1

    gamesquest1 Nabnut

    Member
    14,078
    9,415
    Sep 23, 2013
    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
     
  8. Foxi4
    OP

    Foxi4 On the hunt...

    pip Reporter
    23,528
    21,456
    Sep 13, 2009
    Poland
    Gaming Grotto
    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.
     
  9. gamesquest1

    gamesquest1 Nabnut

    Member
    14,078
    9,415
    Sep 23, 2013
    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 :)
     
    Foxi4 likes this.
  10. Foxi4
    OP

    Foxi4 On the hunt...

    pip Reporter
    23,528
    21,456
    Sep 13, 2009
    Poland
    Gaming Grotto
    I was thinking of using that solution myself, might implement this in a future update! :grog:
     
  11. TehLexinator

    TehLexinator GBAtemp Regular

    Member
    101
    55
    Jun 1, 2009
    United States
    Just wanted to say thanks.

    Keep up the good work Foxi4.
     
    Foxi4 likes this.
  12. LurkerA

    LurkerA ㊣New3DS

    Member
    291
    68
    Apr 8, 2010
    United States
    It's great! Thank you so much Foxi4!
     
    Foxi4 likes this.
  13. Henning B

    Henning B Advanced Member

    Newcomer
    93
    28
    Aug 18, 2014
    Norway
    Multiplat?
     
  14. Foxi4
    OP

    Foxi4 On the hunt...

    pip Reporter
    23,528
    21,456
    Sep 13, 2009
    Poland
    Gaming Grotto
    Once the code is cleaned up anyone can port it, I personally only develop for Windows (barely) and the DS. ;)

    Sky3DS Python Tools might be a good alternative for you.
     
  15. Henning B

    Henning B Advanced Member

    Newcomer
    93
    28
    Aug 18, 2014
    Norway
    Sounds great :)
     
  16. thorasgar

    thorasgar Checkout my evil Soon-in-ator™

    Member
    3,405
    1,844
    Jul 3, 2010
    United States
    Sounds cool Foxi, if Sony doesn't deliver by August 14th I just may go this route. :)
     
    sparrowreal likes this.
  17. itsamario2015

    itsamario2015 Member

    Newcomer
    37
    45
    Feb 4, 2015
    United States

    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:
     
  18. mary1517

    mary1517 GBAtemp Regular

    Member
    108
    65
    Sep 14, 2009
    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.
     
    Foxi4 likes this.
  19. SomecallmeBerto

    SomecallmeBerto The Anti-Hero

    Member
    1,097
    655
    Dec 17, 2014
    United States
    USA

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

    mary1517 GBAtemp Regular

    Member
    108
    65
    Sep 14, 2009
    Poland
    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?