WIP gcdumptool - Yet another Nintendo Switch Game Card Dump Tool

Discussion in 'Switch - Emulation, Homebrew & Software Projects' started by DarkMatterCore, Jun 21, 2018.

  1. DarkMatterCore
    OP

    DarkMatterCore I like turtles.

    Member
    5
    May 30, 2009
    Venezuela
    Mallorca, Balearic Islands, Spain.
    Disclaimer:
    • Doesn't work under 1.0.0, and probably never will. The application needs some IPC calls that are only available from 2.0.0 onwards.
    • Doesn't work under FW > 1.0.0 and < 4.0.0 if the application is launched using PegaSwitch. This is because PegaSwitch doesn't give full access permissions to the application. This is a known bug that's being looked into.
    • Works under SX OS v1.2 and later, but only is your Switch is on FW > 1.0.0.
    • Type 0x02 gamecard ("cart2") XCI dumping works according to recent tests, but only if your Switch in on FW >= 4.0.0. Additional features need more testing (raw partition dumping, partition file dumping, partition filebrowser). Any help on this matter will be greatly appreciated.
    _____________________________

    gcdumptool

    Nintendo Switch Game Card Dump Tool

    Download: https://gbatemp.net/attachments/gcdumptool-rar.136912/

    Main features
    • Generates XCI cartridge dumps (with optional certificate removal and optional trimming).
    • CRC32 checksum calculation for XCI dumps.
    • Full XCI dump verification using XML database from nswdb.com (NSWreleases.xml).
    • XML database update via libcurl.
    • Precise HFS0 raw partition dumping (using the root HFS0 header from the game card).
    • Partition filesystem data dumping.
    • Partition filesystem browser (with manual file dump support).
    • Manual game card certificate dump.
    • Free SD card space checks in place.
    • File splitting support for all operations, using 2 GiB parts.
    • Game card Title ID and Control.nacp retrieval support using NCM and NS services.
    • Dump speed and ETA calculation.
    Thanks to
    • MCMrARM, for creating the original application.
    • RSDuck, for their vba-next-switch port. It's UI menu code was taken as a basis for this application.
    • Foen, for giving me some pretty good hints about how to use the NCM service.
    • Yellows8, for helping me fix a silly bug in my implementation of some NCM service IPC calls.
    • Björn Samuelsson, for his public domain CRC32 checksum calculation code for C (crc32_fast.c).
    • AnalogMan, for his constant support and ideas.
    • The folks from ReSwitched, for working towards the creation of a good homebrew ecosystem.
    Changelog
    Warning: Spoilers inside!

    Screenshots
    Warning: Spoilers inside!
    _____________________________

    You can use XCI-Cutter to trim your own XCI dumps and recover some precious storage space. You can also use it to re-insert padding to an already trimmed XCI dump. The application itself also offers an option to generate trimmed dumps.

    Please note that type 0x02 gamecards are still not working properly (although they can be detected by the application). Sorry, I only have Super Mario Odyssey and I don't really have the money to buy one of those gamecards.

    Type 0x02 gamecard testers and/or pull requests are welcome.

    P.S.: If you go back to Horizon and get an error when trying to launch the inserted gamecard, just pull it out and re-insert it. No reboot needed.
    _____________________________

    How to merge parts under Windows:
    Code:
    copy /b game.xci.00+game.xci.01 game.xci

    How to merge parts under Linux:
    Code:
    cat game.xci.00 game.xci.01 > game.xci
    Make sure to replace the "game" prefix with the actual filename.
     
    Last edited by DarkMatterCore, Aug 15, 2018
    Nightflash, MYFW, Slattz and 27 others like this.
  2. jakkal

    jakkal GBAtemp Addict

    Member
    11
    Apr 27, 2018
    United States
    nice thanks for this
     
  3. DogParty

    DogParty GBAtemp Regular

    Member
    5
    Sep 15, 2015
    United States
    These are great features not found elsewhere! Thanks for the work!
     
    CuriousTommy, hippy dave and thaikhoa like this.
  4. huma_dawii

    huma_dawii GBAtemp Addict

    Member
    8
    Apr 3, 2014
    United States
    Planet Earth

    Thanks a lot, I haven't tried your version yet.. but if im dumping games, do they get renamed to the actual game ID or its just game.xci? cause Im tired of renaming them manually :/
     
  5. DarkMatterCore
    OP

    DarkMatterCore I like turtles.

    Member
    5
    May 30, 2009
    Venezuela
    Mallorca, Balearic Islands, Spain.
    The current naming scheme for XCI dumps is:

    sdmc:/[TitleID]_[timestamp].xci.[PartNumber]

    The part number is not appended to the name if you choose exFAT mode.
     
    hippy dave, huma_dawii and thaikhoa like this.
  6. SAKyle

    SAKyle Newbie

    Newcomer
    1
    Jan 5, 2018
    United States
    On 3.0.0 I get unable to get root hfs0 header then it crashes with 2011-0301.
     
  7. DarkMatterCore
    OP

    DarkMatterCore I like turtles.

    Member
    5
    May 30, 2009
    Venezuela
    Mallorca, Balearic Islands, Spain.
    I developed the application under 5.0.2. I'll check that when I get home.
     
  8. huma_dawii

    huma_dawii GBAtemp Addict

    Member
    8
    Apr 3, 2014
    United States
    Planet Earth
    Thanks a lot! Seems im moving to other GameCard dumper ;)

    EDIT:

    Does it have the options to Dump the game without CERT? (or to patch the cert something like that)

    EDIT2:

    Main features
    • Generates full XCI cartridge dumps (with optional certificate removal). All dumps are padded with 0xFF up to the actual game card size.
    • Precise HFS0 raw partition dumping (using the root HFS0 header from the game card).
    • Partition filesystem data dumping.
    • Partition filesystem browser (with manual file dump support).
    • Manual game card certificate dump.
    • Free SD card space checks in place.
    • File splitting support for all operations, using 2 GiB parts.
    • Game card Title ID and Control.nacp retrieval support using NCM and NS services.


      EDIT3:

      My only suggestion... the font is WAY to small, my eyes hurt! But it works awesome!!! :D Thanks a lot. Dumping my first cartridge now!
     
    Last edited by huma_dawii, Jun 21, 2018
    Assasin1990 and willhack like this.
  9. thaikhoa

    thaikhoa GBAtemp Advanced Maniac

    Member
    7
    Sep 16, 2008
    It won't work on SX OS (WAINDumpCartNX works). Failed to initialize the NCM service.
     
  10. DarkMatterCore
    OP

    DarkMatterCore I like turtles.

    Member
    5
    May 30, 2009
    Venezuela
    Mallorca, Balearic Islands, Spain.
    Access to the NCM service is necessary to retrieve the Title ID. I suppose I may end up adding a mode in which the Title ID is not used in the output filename.
     
    Assasin1990 and thaikhoa like this.
  11. thaikhoa

    thaikhoa GBAtemp Advanced Maniac

    Member
    7
    Sep 16, 2008
    Works good on Hekate. Awesome!
     
    DarkMatterCore likes this.
  12. MonMonz

    MonMonz GBAtemp Fan

    Member
    4
    Nov 7, 2014
    Egypt
    I can test it for 2.x if that will help
    Right now it just crash
     
    DarkMatterCore likes this.
  13. huma_dawii

    huma_dawii GBAtemp Addict

    Member
    8
    Apr 3, 2014
    United States
    Planet Earth
    Tried dumping DOOM and I get a crash when its at 89% trying again, (5.1.0)
     
  14. DarkMatterCore
    OP

    DarkMatterCore I like turtles.

    Member
    5
    May 30, 2009
    Venezuela
    Mallorca, Balearic Islands, Spain.
    Could you please share the error code?
     
  15. huma_dawii

    huma_dawii GBAtemp Addict

    Member
    8
    Apr 3, 2014
    United States
    Planet Earth
    Let me see if I can reproduce the error! I'm retrying right now :)
     
    DarkMatterCore likes this.
  16. TheRedRacon79

    TheRedRacon79 Member

    Newcomer
    1
    Apr 11, 2018
    United States
    how do i fuse the split parts together?
     
  17. DarkMatterCore
    OP

    DarkMatterCore I like turtles.

    Member
    5
    May 30, 2009
    Venezuela
    Mallorca, Balearic Islands, Spain.
    Thanks. I'll be waiting.

    If you use Windows:
    Code:
    copy /b game.xci.00+game.xci.01 game.xci

    If you use Linux:
    Code:
    cat game.xci.00 game.xci.01 > game.xci

    Make sure to replace the "game" prefix with the actual filename. I'm gonna add this to the first post.
     
    Last edited by DarkMatterCore, Jun 21, 2018
  18. huma_dawii

    huma_dawii GBAtemp Addict

    Member
    8
    Apr 3, 2014
    United States
    Planet Earth

    Nothing happened this time around, maybe it was because the system was docked? This time around I tried on handheld mode.
     
  19. TheRedRacon79

    TheRedRacon79 Member

    Newcomer
    1
    Apr 11, 2018
    United States
    i tried this nothing worked


    If you use Windows:
    Code:
    copy /b game.xci.00+game.xci.01 game.xci

    If you use Linux:
    Code:
    cat game.xci.00 game.xci.01 > game.xci

    Make sure to replace the "game" prefix with the actual filename. I'm gonna add this to the first post.[/QUOTE]
     
    Last edited by TheRedRacon79, Jun 21, 2018
  20. DarkMatterCore
    OP

    DarkMatterCore I like turtles.

    Member
    5
    May 30, 2009
    Venezuela
    Mallorca, Balearic Islands, Spain.
    Hmm, I don't really know. I never use the dock, I don't have a HD TV.

    You're supposed to run the command use cmd/powershell under Windows or bash/shell under Linux.
     
    Last edited by DarkMatterCore, Jun 21, 2018
    Assasin1990 likes this.
Loading...