Want to Join Us ?

you'll be able to discuss, share and send private messages.

Source Code Release fix edat tool

Discussion in 'Homebrew' started by Rip Cord, Aug 5, 2016.

Share This Page

  1. Rip Cord

    Administrator Staff Member Admin Developer

    a tool to fix edats:

    display basic edat info
    converts type 1 and 2 to type 3
    converts version 4 to version 3

    support for large files
    put klic in klics folder, rap in raps folder

    fixedat.exe version 0.3.6 based on make_npdata by Hykem

    aes crypto/sha1 from polarssl
    aes omac 1 is from public code of geohot
    rap to rif is from public code of FLATZ
    metadata crypto is from make_npdata


    fixedat <input edat> <option[modifier]> [new content id] [type]

    options: f, i, x; fix, info, extract only
    optional modifiers: r, t; change region, change type

    fix the edat: fix_edat.exe Game.edat f
    display edat information: fix_edat.exe Game.edat i
    extract only: fix_edat.exe Game.edat x

    modifier usage:
    edit region: fix_edat.exe Game.edat fr UP0001-BLUS01234_00-GAMEUPATCH000001
    edit type: fix_edat.exe Game.edat ft 20
    edit both: fix_edat.exe Game.edat frt UP0001-BLUS01234_00-GAMEUPATCH000001 20

    adapted from make_npdata of Hykem
    thanks to the member who shared his extensive knowledge of edats and his ideas on what will make a useful tool and for all the time/work he spent testing. thanks.

    edit:
    update fixes bug with edate > 4bg
    thanks to the member who spotted the problem
    sorry, I didn't have 4gb+ edat to test :oops:
     

    Attached Files:

    Last edited: Aug 12, 2016
    catalinnc likes this.
  2. Rip Cord

    Administrator Staff Member Admin Developer

    here is the source code

    no keys included

    to compile:
    first paste the edat keys into fixedat.c, 3 locations, search for: paste_key_here

    edit:
    updated source code, fixes bug with edat > 4gb

    for linux 32 or linux 64
     

    Attached Files:

    Last edited: Aug 12, 2016
    catalinnc and storm shadow like this.
  3. Rip Cord

    Administrator Staff Member Admin Developer

    updated post one exe
    updated source code
    fixes bug with files > 4gb
    thanks to the member who spotted the problem
     
    storm shadow likes this.
  4. Rip Cord

    Administrator Staff Member Admin Developer

    here is version for compiling with gcc on Windows 32 bit for exe to run on 32 bit Windows like XP

    no keys included
    before compiling, paste edat keys in to fix_edat.c, 3 locations
    search for: paste_key_here

    used TDM-GCC-64
    mingw that runs on 32 bit Windows but compiles for 64 bit Windows
    use compile option -m32 to compile for 32 bit windows
    Code (Text):

    gcc -std=c99 -m32 -D_FILE_OFFSET_BITS=64 -o fix_edat.exe sha1.c aes.c fix_edat.c
     
    that way can use ftello64 etc, that don't work properly in regular mingw32

    look for tdm64-gcc-5.1.0-2.exe
    maybe don't install this version of mingw on same partition as another installation of mingw or gcc toolchain. I have no idea if this causes problems or not with already existing gcc toolchain.
     

    Attached Files:

    Last edited: Aug 13, 2016
    storm shadow likes this.
Top