Has anyone managed to open up the SW:TFU files?

Discussion in 'NDS - ROM Hacking and Translations' started by CPhantom, Sep 20, 2008.

Sep 20, 2008
  1. CPhantom
    OP

    Member CPhantom The Noob :(

    Joined:
    May 14, 2008
    Messages:
    587
    Country:
    United States
    I would like to find out how to get into the files, but they are compiled differently than a regular DS game. o.o;; anyone figure this stuff out?
     
  2. FAST6191

    Reporter FAST6191 Techromancer

    pip
    Joined:
    Nov 21, 2005
    Messages:
    21,738
    Country:
    United Kingdom
    Interesting.
    To save others the effort
    CODEarm7.bin
    arm9.bin
    banner.bin
    header.bin
    overlay
    y7.bin
    y9.bin
    data
    data\FileData.bin
    data\FileInfo.bin

    Or if you prefer

    Base directory
    ÂÂÂÂÂÂÂÂÂÂ 166,336 arm7.bin
    ÂÂÂÂÂÂÂÂÂÂ 798,264 arm9.bin
    ÂÂÂÂÂÂÂÂÂÂÂÂ 2,112 banner.bin
    ÂÂÂÂÂÂÂÂÂÂÂÂÂÂdata
    ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ 512 header.bin
    ÂÂÂÂÂÂÂÂÂÂÂÂÂÂoverlay
    ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ 0 y7.bin
    ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ 0 y9.bin

    Directory of
    \data

    ÂÂÂÂÂÂÂÂ65,592,808 FileData.bin
    ÂÂÂÂÂÂÂÂÂÂÂÂ57,812 FileInfo.bin
    2 File(s)ÂÂÂÂ 65,650,620 bytes

    Directory of
    \overlay

    ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ 0 File(s)ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ0 bytes

    It would not be a stretch to see fileinfo.bin as the index for filedata.bin.

    Anyhow (ASCII and unicode) strings (4 char min) search in fileinfo.bin generates some of the usual magic stamp stuff (NRF0 to begin with) but not much else (no list of names like SDAT files)
    No obvious compression.
    Setting it to a 12 byte width (first address will be 0, next will be C, 18, 24....) makes for interesting reading (after a byte flip).
    Code:
    0000000 3046 524E 0022 0002 0000 002F 0FRN."...../
    000000C 0009 0001 0004 0000 2E43 4911 .........CI.
    0000018 0000 000A 0998 0004 46BF 413F ........F.A?
    0000024 0000 000A 0018 099C 2067 8F83 ........ g..
    0000030 0000 000A 006E 09B4 3236 17BA .....n..26..
    000003C 0000 000A 0001 0A22 414B A191 ......."AK..
    0000048 0018 000A 0000 0A23 8644 ABF6 .......#.D..
    0000054 0000 0022 0233 0C59 917D 04E9 ...".3.Y.}..
    0000060 0000 0022 03C1 0E8C 966A AABA ...".....j..
    000006C 0000 0022 005F 124D C49D 985C ..."._.M...\
    0000078 0000 0022 0003 12AC 93D3 DB80 ..."........
    0000084 0000 0022 001A 0A23 DDB5 E6FB ..."...#....
    0000090 0000 0022 0006 0A3D 443E 4D58 ..."...=D>MX
    000009C 0000 0022 0008 0A43 FC70 B8AA ..."...C.p..
    00000A8 0000 0022 0026 0A4B B586 7DFD ...".&.K..}.
    00000B4 0000 0022 000D 0A71 C5DF 2559 ..."...q..%Y
    00000C0 0000 0022 003A 0A7E FAFB 6A0D ...".:.~..j.
    00000CC 0000 0022 003D 0AB8 29C9 D53A ...".=..)..:
    00000D8 0000 0022 002C 0AF5 079D 9681 ...".,......
    00000E4 0000 0022 0027 0B21 9692 B4AE ...".'.!....
    00000F0 0000 0022 0038 0B48 F272 2BD5 ...".8.H.r+.
    00000FC 0000 0022 0008 0B80 07EA 5B4B ..."......[K
    0000108 0000 0022 0007 0B88 4B20 655A ..."....K eZ
    0000114 0000 0022 0009 0B8F 560D B074 ..."....V..t
    0000120 0000 0022 0006 0B98 FBB4 A267 ...".......g

    It looks like a pointer array with some other info at first glance.

    Over to filedata.bin.
    String search. Lots of magic stamps, moreover ones I recognise.
    A couple of ASCII phrases related to the star wars universe too.
    E970 is a good place here. Some compression by the looks of things too: likely text, levels and/or textures then.

    01916350 is another good spot. Looks like an archive and given the names it is likely graphical.

    37c18c. BMA0 and some more interesting stuff.

    A few more interesting things through the file.

    Latching onto 37c18c for a second and scanning through the fileinfo.bin
    11AC (unflipped) gives us 8cc13700 or flipped 0037c18c
    Appears to continue as the file goes on.

    Number immediately after is length of file
    00011A0 0037 B1B8 0000 0FD4 2260 C84A .7......"`.J
    00011AC 0037 C18C 0000 02DC 2260 C923 .7......"`.#

    0037 C18C - 0037 B1B8 = 0FD4
     
  3. CPhantom
    OP

    Member CPhantom The Noob :(

    Joined:
    May 14, 2008
    Messages:
    587
    Country:
    United States
    My brain just exploded, haha.

    FAST6191, you are amazing with that stuff [​IMG]


    Do you think it would be possible to extract files like that from these files? I'm very interested in seeing if a texture hack could happen.
     
  4. FAST6191

    Reporter FAST6191 Techromancer

    pip
    Joined:
    Nov 21, 2005
    Messages:
    21,738
    Country:
    United Kingdom
    The offsets and the sizes (I am not sure if they are the sizes or start of next files: sometimes the file ends before a good place to align) are all there so you just need a hex editor.
    Names (if they even exist) I will work on.

    edit: looks like it is file length (offset 1c8 in fileinfo.bin)
    Address 00011D90 "length" = 054FDE
    Add the two
    66D6E, next file is actually 66d70.

    Edit2. Still trying to figure out what the numbers after the size and before the next address mean, they appear to be counting up as the file goes on.
    They roll around should they become larger than FFFF FFFF although some of the next areas count round rather quickly before returning to normal "slow counting". No obvious correlation between address or file size.
    Example
    It takes to the line beginning 74DC to get to a number bigger than FFFF FFFF the first time.
    The next cycle completes in 24 (decimal) lines.
    The following cycle has a few more but nowhere near the original.
    I also noticed some patterns in the filedata.bin


    The sound (SDAT) file if anyone wondered is at
    02DC318C length 010C83A0


    Edit again:
    http://kiwi.ds.googlepages.com/nsbmd.html
    MLD0 spotted in the filedata.bin (shortly before SDAT).
    This is good as it means we do not have to reverse engineer a graphics format on top of this.

    Commencing tile editor exploration.
    Address 2D7D4A0 has some 4bpp GBA format tiles.
    Appears to belong to the "RNAN" file at 02D7D3B8

    02992418 (hex)
    8bpp GBA, offset 24
    RGCN file at 029923E8

    Repeated a few more times, each appears to be a portrait of some form.

    Back to the fileinfo.bin and the unknown data.
    Does not appear to be size related.
    At BA6C in the fileinfo.bin there are a bunch of same size (and files of similar size to those 2028 vs 2030) file. Differences between differences and the previous file are quite big. I will see about setting up a bit pattern search in the morning, video time now.

    OK that was a lie. I ran Crystaltile2's intelligent LZ compression detection and Tar "compressed" the results, fed it into a tile editor and there was plenty more to look at.
    Plenty more = menus, character portraits, borders and although not visible in the editor it looks like some 3d related stuff (although I could have told you that already).
     
  5. dinofan01

    Member dinofan01 Misses the old days...

    Joined:
    Jul 4, 2008
    Messages:
    2,842
    Country:
    United States
    I hope you guys get this to work. I would love to see some one texture hack this to get Darth Maul or something in the game.
     
  6. CPhantom
    OP

    Member CPhantom The Noob :(

    Joined:
    May 14, 2008
    Messages:
    587
    Country:
    United States
    Well Darth Maul would mean Model editing, which I wouldn't even want to learn to do. I'm already terrified enough wanting to do a texture hack. But, you should change things to maybe be like darth maul (i.e. using the Master Jedi Robes as a base and making a texture for it to be Darth Maul), it'd just have a lightsaber though.
     

Share This Page