gditools.py, a Python program/library to handle GDI files!

Discussion in 'Sega Dreamcast Development and Research' started by -=FamilyGuy=-, Dec 25, 2014.

  1. -=FamilyGuy=-

    -=FamilyGuy=- Site Supporter 2049

    Joined:
    Mar 3, 2007
    Messages:
    3,097
    Likes Received:
    1,045
    Hi folks,

    Here's a project I've been working on a lot in the last months: an open-source Python program/library to handle (extract, generate sorttxt.txt etc.) GDI files. Python 2.7.x is required, it works on Linux and Windows and should also work on ARM or whatever as long as Python 2.7 runs.

    It has so far been tested to work well under both Windows and Linux, with x86 64-bit version of Python. It should be quite fast, dumping Sonic Adventure in under 2 seconds using an SSD and a i7 CPU (with bin tracks being converted to iso on-the-fly while parsing).

    Here's the project sourceforge page: https://sourceforge.net/projects/dcisotools/

    [EDIT]
    SiZiOUS has released a gui for gditools.py in Pascal/Lazarus. It's open-source and multi-platform. You can find executables for Linux, Windows and OSX, here in the folder that corresponds to your OS: https://sourceforge.net/projects/dcisotools/files/?source=navbar
    [/EDIT]

    It should be quite practical to extract gdi files and retrieve ip.bin and sorttxt.txt files, in fact here's the line that'd do that (on Windows). BTW it preserves the original timestamps of the extracted files:
    python gditools.py -i C:\MyGDI\disc.gdi -s sorttxt.txt -b ip.bin --extract-all

    This would dump the ip.bin and generate the sorttxt file to C:\MyGDI, and extract all the files in the GDI in the C:\MyGDI\data folder.
    Using the --data-folder __volume_label__ argument, the "data" folder would be rename to the volume label of the iso9660 filesystem for both the extraction subfolder and the sorttxt.txt file.
    python gditools.py -i C:\MyGDI\disc.gdi -s sorttxt.txt -b ip.bin --data-folder __volume_label__ --extract-all

    It can also extract a single file from the GDI:
    python gditools.py -i /folder/disc.gdi -e 1st_read.bin

    Someone that's good at making Qt/Tk GUI should find a lot of useful tools to write a simple GUI interface for dumping file, but I'm not so I leave that to others. I'd gladly merge such modification or any other pertinent one in the master branch upon request. See the readme for more examples. Quoting it right now:
    Two tools that use gditools.py as a library are also provided in the Examples folder. One gdifix.py is a modern remake of isofix.exe -> You point it to a gdi file and it spits a BIG iso with all the files in the GDI, parseable with most programs. The other, bin2iso.py is a simple bin2iso converter.

    Constructive comments/suggestions are welcome! Keep in mind I'm a scientist, not a programmer, and my code might not be at a professional-level quality, though I'm trying to make it as clean and readable as possible.

    Cheers! And Merry 16th Christmas to the Dreamcast!

    FG


    P.S. Thanks to SiZiOUS for testing and helping with the sourceforge!
     
    Last edited: Feb 8, 2015
    Woofmute likes this.
  2. petterk

    petterk Spirited Member

    Joined:
    Dec 30, 2011
    Messages:
    137
    Likes Received:
    11
    Wow, finally a solution for *nix users! Thanks alot
     
  3. Blai

    Blai Enthusiastic Member

    Joined:
    Apr 2, 2007
    Messages:
    575
    Likes Received:
    39
    Thanks a ton!!!
     
  4. SiZiOUS

    SiZiOUS Spirited Member

    Joined:
    Mar 27, 2009
    Messages:
    121
    Likes Received:
    169
    Nice work as usual FG ! :)
     
  5. madsheep

    madsheep Peppy Member

    Joined:
    Jul 19, 2013
    Messages:
    320
    Likes Received:
    85
    Very Nice :D
     
  6. -=FamilyGuy=-

    -=FamilyGuy=- Site Supporter 2049

    Joined:
    Mar 3, 2007
    Messages:
    3,097
    Likes Received:
    1,045
    Last post was lost due to the crash so here it is again!

    SiZiOUS has released a gui for gditools.py in Pascal/Lazarus. It's open-source and multi-platform. You can find executables for Linux, Windows and OSX, here in the folder that corresponds to your OS: https://sourceforge.net/projects/dcisotools/files/?source=navbar

    [​IMG]

    Cheers!

    FG
     
    Last edited: Feb 8, 2015

Share This Page