WIP NX Game Info for macOS and Windows

Discussion in 'Switch - Emulation, Homebrew & Software Projects' started by Garou, Jan 9, 2019.

  1. Garou
    OP

    Garou GBAtemp Maniac

    Member
    6
    Jan 13, 2015
    v0.3.2-alpha has been released

    Changelog
    • Debug Log
    • Lots of fixes
    for those who'd like raise some issues, please enable Debug Log before reporting and send me the debug.log file (warning the file can be very big, so don't leave this option on for too long)

    @ReikaRin
    please try this one and see if the directory scan works. although I still couldn't find the root cause so some files will be skipped
    it would be very helpful if you can submit the files that are skipped so I can test them myself

    @Cyan
    I've looked the logic at my code and even tried it myself (no title.keys, improperly formatted title.keys even an exe file renamed as title.keys to check if there's file handling error) but I couldn't seem to reproduce this issue
    the old one is using whichever title.keys file it can find (either in app directory or in C:\Users\yourname\.switch), so do you have title.keys on C:\Users\yourname\.switch?
    but the latest one will use title.keys file in the same directory as prod.keys, so if you have prod.keys in your app directory, even if you title.keys file in C:\Users\yourname\.switch it will be ignored
     
    Last edited by Garou, Jan 13, 2019
    hippy dave likes this.
  2. ReikaRin

    ReikaRin GBAtemp Regular

    Member
    3
    Mar 21, 2018
    Indonesia
    ok, now its fix my problem :)
    edit : skip two nsp files
     
    Last edited by ReikaRin, Jan 13, 2019
  3. Garou
    OP

    Garou GBAtemp Maniac

    Member
    6
    Jan 13, 2015
    can you post what those 2 files are?
     
  4. ReikaRin

    ReikaRin GBAtemp Regular

    Member
    3
    Mar 21, 2018
    Indonesia
    namco museum and ace of seafood.
    these two file are nsp that i converted to xci with nscb and converted back to nsp with 4nxci
     
  5. Garou
    OP

    Garou GBAtemp Maniac

    Member
    6
    Jan 13, 2015
    wait what? how do I gonna test it then :lol:
     
  6. ReikaRin

    ReikaRin GBAtemp Regular

    Member
    3
    Mar 21, 2018
    Indonesia
    i think these files are nca files only, but it can read normally with switch backup manager.
    in switch backup manager the files structur are nca and after doing those steps the files structure change to converted xci


    Processing file E:\Game Switch\Ace of Seafood [0100ff1004d56000][v0].nsp
    Processing NSP E:\Game Switch\Ace of Seafood [0100ff1004d56000][v0].nsp
    Processing CNMT XML
    at NX_Game_Info.Process.processCnmtXml(IStorage cnmtXml, Title& title)
    at NX_Game_Info.Process.processNsp(String filename)
    at NX_Game_Info.Process.processFile(String filename)
    File E:\Game Switch\Ace of Seafood [0100ff1004d56000][v0].nsp has failed to process
     
    Last edited by ReikaRin, Jan 13, 2019
  7. Cyan

    Cyan GBATemp's lurking knight

    Global Moderator
    22
    Oct 27, 2002
    France
    Engine room, learning
    I tested again with 0.3.1:
    - I don't have username/.switch/ folder. I place prod.keys in the same folder than the program.
    - without console.keys AND title.keys : crash
    - with at least one missing keys file : crash
    - with both files, it launches.

    I did my test with empty files.
    it doesn't crash if hac_versionlist.json is missing. only if it's missing at least one from console.keys or title.keys.


    Tested 0.3.2
    It works fine with just prod.keys, no more issues with missing files.


    I made a script to update the version list with wget:
    Warning: Spoilers inside!

    I know this is alpha, but here some suggestions:
    - allow multiple folders to be loaded at the same time. something like Wiibackupmanager, or ShowMiiWads.
    - setting to Auto-load specific paths at launch
     
    Last edited by Cyan, Jan 13, 2019
  8. Garou
    OP

    Garou GBAtemp Maniac

    Member
    6
    Jan 13, 2015
    switch backup manager marked a game as NCA when it couldn't find cnmt.xml, that means 4nxci was the one re-adding this file when converting to nsp
    the information on the xml should be available on other files so I'm gonna skip it if it detects an invalid xml and read the information elsewhere
    thank you

    lol still not sure what causing the error on 0.3.1 but glad it's sorted out :lol:

    you mean like selecting multiple directories? should be trivial to add, let me check on that
    the app already saved the latest opened directory but opted not to auto load it because people might not want to do the same action all the time (they wouldn't want the app to scan a directory at launch when they only want to scan a single file). the best approach might be cached the added file like what switch backup manager did, but we'll see about that

    and thanks for script :)
     
  9. Cyan

    Cyan GBATemp's lurking knight

    Global Moderator
    22
    Oct 27, 2002
    France
    Engine room, learning
    Ah, it already saves the latest dir? you are right, I just tested it and it's nice :)


    I think it's best to not auto-load at boot by default. for example if the path is not reachable (external device, disconnected nas, etc.)
    Maybe add a menu where the user can add its own "auto load paths". don't re-load previous path automatically if not part of this menu, and check if the path exists and is responding first to prevent locking the program's launch until drive is available (nas takes few second to init). Maybe a refresh list button ? once nas is available, reload folder's content. or refresh if you add a new game without closing the program or selecting the same folder.
    It's only ideas, don't feel obliged to do any of it. do what you like for your tool.


    The update script is a quick thing I did, and works for french locale only. but thought it might be useful to others.
    There's a way to make it local independent, but needs regedit access, I wanted to keep it as simple as possible.
    it's making a backup of current file with the current day's date, and download a new one. it doesn't update if it's the same day.


    Oh, happy 4th year on gbatemp ! just saw the cake icon.
     
    Last edited by Cyan, Jan 13, 2019
  10. Garou
    OP

    Garou GBAtemp Maniac

    Member
    6
    Jan 13, 2015
    no, please share if you have more ideas
    it's just I'm trying to limit the number of features for this app, because as I said before I'm planning to merge this to switch backup manager eventually, so everything that's already in that app might not take priority. but we'll see :)

    thanks haha
     
  11. Cyan

    Cyan GBATemp's lurking knight

    Global Moderator
    22
    Oct 27, 2002
    France
    Engine room, learning
    I see you updated it today.
    thanks for your work.

    do you plan adding support for compressed xci/nsp?
    https://gbatemp.net/threads/nszip-nsp-compressor-decompressor-to-reduce-storage.530313/

    or maybe rared files?
    the advantage of nszip is that it retain its nca checksum and could be used directly by installers. I didn't test, so maybe if it keeps its checksum it's already supported by NXGameInfo?
    it's still a work in progress, so maybe add it later when it's complete.
     
    Last edited by Cyan, Mar 9, 2019
  12. Garou
    OP

    Garou GBAtemp Maniac

    Member
    6
    Jan 13, 2015
    @Cyan
    I know about nsZip but do people really use that? I do find it interesting, but since I rarely find any discussion for it so I just assume it's not widely used yet. are the existing installers support it already?
    but that'll surely go to my todo list once I see people start using it

    by the way, here's the changelog since the last one I posted (v0.3.2)
    • NRO support, not very useful but maybe someone just interested to find out what version of NRO they have
    • Installed titles without Meta NCA are ignored in the past, now it's been fixed
    • title.keys are no longer necessary to get Permission info. it can now read the titlekey directly from .tik file in XCI and NSP if it exists
    • Export list to text file
    • some bug fixes and improvement
     
    hippy dave likes this.
  13. Cyan

    Cyan GBATemp's lurking knight

    Global Moderator
    22
    Oct 27, 2002
    France
    Engine room, learning
    I didn't see any installer using it yet.
    it can be useful for now only for storage purpose, or maybe site sharing (if it's smaller than rar). but I don't think it's used a lot yet, it's probably not well known nor advertised.
     
  14. Garou
    OP

    Garou GBAtemp Maniac

    Member
    6
    Jan 13, 2015
    alright, I'll give it a shot
     
  15. Garou
    OP

    Garou GBAtemp Maniac

    Member
    6
    Jan 13, 2015
    @Cyan
    done that and not sure if I'll add it to the main branch. it's just too slow even if I did decompression and NCA reencryption directly in RAM, not to mention it's too costly on the RAM for big games

    for reference, I was using VOEZ update which was 726 MB compressed to 309 MB
    nspz.PNG

    if you want to try it yourself, I've put the binary here https://mega.nz/#!BZ1HXIxb!t1oeTbqO7xDb0Q3wT9oevkXsxvNRH9jKdtKnUlQsJGU
    note that support is very minimal now, NSPZ without .cnmt.xml.nsz is not supported. .tca.nsz file also not supported
     
  16. Cyan

    Cyan GBATemp's lurking knight

    Global Moderator
    22
    Oct 27, 2002
    France
    Engine room, learning
    thank you for looking at it.
    too bad that it's too slow, I thought the decompression algorithm was fast enough to be even used to play in real time (by emulators).
    Well, for now there's not a lot of users with this format so I suppose it's not very useful, but even if it's slow maybe it's up to the user to choose whether he wants to use it or not? (if he has enough RAM too)
    you can always add it on a future version, if there is a high demand.
    Too bad, the compression looks good, half the size for Voez.

    thanks for the test binary.
    I don't have any nspz yet, but I can convert some to test.
     
    Last edited by Cyan, Mar 9, 2019
  17. Calahan

    Calahan Member

    Newcomer
    2
    Oct 30, 2016
    Gambia, The
    Hello Garou,
    thank you for the tool.
    Would it be possible to add a content verify, to see if the nsp or xci file is corrupt?
    At the moment I'm using NSPVerify by caitsith2 (https://gbatemp.net/download/nspverify.35153/)
    As the checking is time consuming, you maybe could offer a checkbox, to verify the contents of the files too.
    Thanks for considering :)
    All the best,
    Calahan
     
    Last edited by Calahan, Mar 11, 2019
  18. Garou
    OP

    Garou GBAtemp Maniac

    Member
    6
    Jan 13, 2015
    yeah sure, I've looked at NSPverify code and it seems it's just checking the NCA hash. that should be easy
    but I'm not really clear on your checkbox suggestion
     
    SaffronXL likes this.
  19. Calahan

    Calahan Member

    Newcomer
    2
    Oct 30, 2016
    Gambia, The
    I think checking the NCA hashes slows the process of reading the files down significantly.
    NSPVerify needed 8 minutes to read a directory of 50 files with a size of about 50 GB.
    NX Game Info read the same directory and filled the table in about 5 seconds.
    So I thought it would be a good idea to add a checkbox in the "Open"-Dialogs or maybe even better an extra checkbox setting in the menu, wether the hashes should be checked too.
    So the user can decide if he wants a fast check or if the NCA hashes should be checked too, to find corrupt files.
     
    Garou likes this.
  20. Dust2dust

    Dust2dust GBAtemp Maniac

    Member
    7
    Jun 17, 2010
    Canada
    Great tool, Garou! I use it regularly. Another suggestion, if I may ask, would be to somehow highlight in the table all titles where the latest version update was not found. It would make it easy to find immediately what games need new updates. Or maybe an option to export in a text file all titles that need a new update. Thanks again for all your efforts.
     
    SaffronXL and Garou like this.
Loading...