[WIP] [Windows] 3DS CIA Manager - Concept

Discussion in '3DS - ROM Hacking, Translations and Utilities' started by leerz, Jan 17, 2015.

  1. leerz
    OP

    leerz GBAtemp Advanced Fan

    Member
    512
    127
    Jan 11, 2015
    Makati
    Hi, This thread aim to create a project that governs CIA's, esp if you have alot of them.

    it is well known that you install the .cia via devmenu, and you can select them with the NAME of the cia you will install.

    however, if you plan to delete them via devmenu, you will have to note of the unique ID of that specific cia, (if you have not done this, it will be trivial *i/e checking for similar filesizes is unreliable).

    a way would be to put back your cia file, and from the sdmc menu, you can get the uniqueid and then browse it in the program tab, again this would be time consuming if you have removed the cia from your sd, and or trivial if you have deleted that .cia make.

    The Concept

    more like a Windows explorer addon or a cia Manager for windows


    where you browse to a folder and find all your cias there.

    from there, the program will parse the cia info (banner/icon/ maybe) but most importantly the uniqueid

    that will let you identify your game from the devmenu program list.

    Features

    Possible Features would be:
    CIA Manager
    Parsing of common .cia info
    Upload via ctrclient to 3DS
    Indicate if the game version is latest, or which fw it requires
    see if what patches are enabled (regionfree/cfw/versionspoof) checked based on other parameters.
    parsing of 3ds/3dz/3dsx to manage and fwd to the automated 3ds to cia script just released a while back * or my own if possibe

    Progress
    Not much has been done regarding the Project aside from this documentation
    But i'm confident that this project will materialize.

    I've worked mostly on W32 apps and few web projects and some minor re stuff on w32 and android.

    I plan to build this using vb and or Java, the next venture would be where to start?

    I need a booster in terms of getting the ff intel:
    1. cia needs decrypt?
    2. what offset is the titleid? http://3dbrew.org/wiki/Title_list
    3. other intel that may be applicable
    4. other features
    5. ???


    Thanks

    Lrz
     
    Xenon Hacks likes this.


  2. cearp

    cearp the ticket master

    Member
    7,406
    4,658
    May 26, 2008
    Tuvalu
    If you just want the CIAs to be linked up to the title ids, i can make a simple tool that will output a text file, each line in the text file could be like this:
    MyMarioCIA.cia 000400000007C700
    zeldalinktobetweenworlds.cia 00040000000EC300
     
    eco95, TUWieZ, leerz and 1 other person like this.
  3. Vappy

    Vappy GBAtemp Advanced Maniac

    Member
    1,507
    1,154
    May 23, 2012
    From the title I was hoping this was going to be aimed at creating an open source version of something like DevMenu - pretty sure the appropriate services were added to ctrulib a few months ago by idunoe.
     
    leerz, Hashtastrophe and cearp like this.
  4. leerz
    OP

    leerz GBAtemp Advanced Fan

    Member
    512
    127
    Jan 11, 2015
    Makati
    Hi, that would be awesome, will you make it opensource?
    atm I can't catch up on reading abt how extracting those info atm.

    with that in place, this will make the project finish sooner :P
     
    TUWieZ likes this.
  5. cearp

    cearp the ticket master

    Member
    7,406
    4,658
    May 26, 2008
    Tuvalu
    i'll would it in python (so you will be able to see the code), i mean, it won't do any of the other things you want, they would be a real chore.
     
  6. leerz
    OP

    leerz GBAtemp Advanced Fan

    Member
    512
    127
    Jan 11, 2015
    Makati
    Yes, just the core title id extract/parse would suffice, I think I can take it from there, being to see the code an all.

    Thank you.

    Leerz
     
  7. cearp

    cearp the ticket master

    Member
    7,406
    4,658
    May 26, 2008
    Tuvalu
    not anything incredible, it just takes in a cia, or a folder that will be searched in all sub folders recursively for ANYTHING ending in cia (case insensitive), and prints out the title id on screen with the filename.
    and, it writes the output to a text file too. (output_titleid.txt)
    took me just a few minutes, but i'm not interested in doing the other stuff :)
     

    Attached Files:

    leerz likes this.
  8. leerz
    OP

    leerz GBAtemp Advanced Fan

    Member
    512
    127
    Jan 11, 2015
    Makati
    Thanks, I'll check it in bit when I get on my laptop :)
     
  9. frogboy

    frogboy lacking both style and grace

    Member
    2,367
    1,404
    Dec 6, 2011
    United States
    Gives me [Errno 13] Permission denied: 'output_titleid.txt'
     
  10. cearp

    cearp the ticket master

    Member
    7,406
    4,658
    May 26, 2008
    Tuvalu
    are you running it in a folder that you don't have write permission to? i'm not an expert on all of that stuff, but, yeah, it is not allowed to create a text file... weird
     
  11. frogboy

    frogboy lacking both style and grace

    Member
    2,367
    1,404
    Dec 6, 2011
    United States
    Just copied the files to two different folders--one on each of my hard drives--and got the same result.

    I just drag the .cia onto the .py file, right? right?
     
  12. cearp

    cearp the ticket master

    Member
    7,406
    4,658
    May 26, 2008
    Tuvalu
    uh that might work, i'm not sure if dragged things are taken in as an argument (i didn't add anything like that on purpose) - i just type 'python cia_to_ticketid.py ciafile/folder'
     
  13. Jojse

    Jojse GBAtemp Regular

    Member
    172
    31
    Jan 28, 2006
    I tried this nice little handy tool, but I can't get it to write id, it only writes the name of cia-file, my output_titleid.txt came out like this.....

    3dspony1.cia -
    BigBlueMenu.cia -
    blargSnes.cia -
    flashcardtimewarp.cia -
    ftbrony.cia -
    PlayCoinSetter.cia -
    savedatafiler.cia -
    YouTube (v1.1) (E).cia -

    I tried to get the id of all my cia apps.... Why do you think it's not output id?
    I would be very happy if this will work, because i have many VC injected cia with homemade id so I can't check for example http://3ds.essh.co/ for id.....
     
  14. leerz
    OP

    leerz GBAtemp Advanced Fan

    Member
    512
    127
    Jan 11, 2015
    Makati
    try this, should append the productid also, most of your cias are homebrew cia not game converted cias, i think
     

    Attached Files:

  15. frogboy

    frogboy lacking both style and grace

    Member
    2,367
    1,404
    Dec 6, 2011
    United States
    And where does one type that?

    Sorry, I'm completely python illiterate.
     
  16. Jojse

    Jojse GBAtemp Regular

    Member
    172
    31
    Jan 28, 2006
    That doesn't work at all, I get error....

    File "cia_to_ticketid.productid.py", line 29
    writeInLog(os.path.basename(fpath) + ' - ' + binascii.hexlify(cia[0x2C1C:0x2
    C24]) + binascii.hexlify(cia[0x3A50:0x3A5F])
    ^
    SyntaxError: invalid syntax

    I have tired all kinds of cia files, homebrews, VC, converted roms..... I don't think I use it wrong, Lets say I have all my cia-files in " J:\3DSgames\CIA\ ".
    What is the right command I use?

    The best way would be just to copy cia_to_ticketid.py to my CIA-folder and then just double-click on the py-file and out come "output_titleid.txt" , that would be so great...
     
  17. leerz
    OP

    leerz GBAtemp Advanced Fan

    Member
    512
    127
    Jan 11, 2015
    Makati
    fixed it now
     
  18. Jojse

    Jojse GBAtemp Regular

    Member
    172
    31
    Jan 28, 2006
    Sorry, it's not fixed. I have tried everything I can think of but I still get this error :

    File "cia_to_ticketid.productid.py", line 29
    writeInLog(os.path.basename(fpath) + ' - ' + binascii.hexlify(cia[0x2C1C:0x2
    C24]) + binascii.hexlify(cia[0x3A50:0x3A5F]))
    ^
    SyntaxError: invalid syntax
     
  19. cearp

    cearp the ticket master

    Member
    7,406
    4,658
    May 26, 2008
    Tuvalu
    i'm not sure why mine does not work for some people... but if you are getting invalid syntax, surely you would have known if you tested it yourself?
    unless you are using a different version of python? i'm using 2.7

    leerz - ok, i fixed your code, honestly, did you test it?
    you should have added a spacer between the titleid and whatever else you are trying to output afterwards.
    by product code, what do you mean? the code like this? CTR-JZNP?
    i am pretty sure you cannot get that from the cia. or the tmd, or the ticket.
    only the application cxi. - right?
    if i am wrong please tell me. - i don't really understand what you are trying to output.

    here is your fixed code, but yes it seems it still won't output the titleid for people i guess.
    so, i fixed your code but i don't believe it does what you want it to.
    did you just write it 'blind', without running it?
     

    Attached Files:

  20. Jojse

    Jojse GBAtemp Regular

    Member
    172
    31
    Jan 28, 2006
    cearp... I'm also using Python 2.7, yours "cia_to_ticketid.py" works but it only list names of the cia-files and not the id... Like I replayed earlier. I tried all kinds of cia files... homebrew, themes, roms converted to cia... Same thing, only listing names and not id...
     
    cearp likes this.