Nintedo ARChive Format

Discussion in 'NDS - ROM Hacking and Translations' started by deufeufeu, Apr 23, 2007.

  1. deufeufeu
    OP

    deufeufeu GBAtemp Advanced Fan

    Member
    880
    0
    Nov 21, 2005
    As many of you know, I've done a lot of reversing for nintendo ds games, mainly phoenix wright related stuff.

    Lately I've seen in an increasing number of games the use of a specific file format for packing files together. We could refer to it as the NARC file format. It is the used extension in some games.
    The archive not only point to data, but gives a structure between sprites, tiles, strings, ect... So it is really important to understand it.
    Seeing this, it would be best to unite our efforts and make a full library to handle this file format.


    To do so, I propose a little schedule :

    1) Find exactly which games used this format. It might be tedious, as although games like Pokemon P/D makes a direct use of the format with explicit extensions, games like GS4 have their own packing format, and in some part of the data you can recognize some NARC files.

    2) Completly document the format. So far I'm able to extract chunks of data, but I've not found the exact type of each chunk. For example each chunk has an identiefer as a string of 4 characers. LBAL chunks are array of strings, with an easy to find structure. On the other hand GMIF chunk seems to contain a list of sub NARC, the offsets to these NARCs being referenced by a BTAF chunk.

    3) Make a library to handle these files, with a grahical browser. It is really important here to make a packing function too, as for hacking purpose we want to inject data in the same way as devellopers do.

    I will soon change the wiki version on my website, the current one being awful to use (a lot of white page lately...). As soon as it is done, I'll make a page for this format. If some moderators read this, maybe we could use the GBATemp wiki, but I'm not sure if rom hacking is on topic.
     
  2. FAST6191

    FAST6191 Techromancer

    pip Reporter
    23,747
    9,616
    Nov 21, 2005
    United Kingdom
    Search for natrium42's narctool (it does carc (lz compressed narc) as well)
    also have a read of http://www.pipian.com/ierukana/hacking/ds_narc.html (some of the other stuff is detailed a fair amount as well).
    http://pokeguide.filb.de/index.php may prove of interest.

    Oh and tony hawks uses an xml derivative if I recall.

    With regard to other files I volunteer my sound file exploits and I can also drum up loads of info on text files (various pointer systems ranging from simple to unusual to downright weird are used).
     
  3. deufeufeu
    OP

    deufeufeu GBAtemp Advanced Fan

    Member
    880
    0
    Nov 21, 2005
    wow I feel like an idiot. I had reversed almost everything on the page already... All the work goes to the trashbin :'(
     
  4. FAST6191

    FAST6191 Techromancer

    pip Reporter
    23,747
    9,616
    Nov 21, 2005
    United Kingdom
    Do not feel bad deufeufeu: I did the same this weekend only to find that website.
     
  5. arctic_flame

    arctic_flame GBAtemp ATMEGA8 Fan

    Member
    2,840
    0
    Nov 4, 2006
    England land
    Well, Natrium's tool is unfinished, and doesn't work if the archive contains folders, so you could still do it...

    P.S. Mario Kart DS contains .carc /.narc files
     
  6. deufeufeu
    OP

    deufeufeu GBAtemp Advanced Fan

    Member
    880
    0
    Nov 21, 2005
    Yes in fact my own tools was already more advanced than natrium's one. So it could be interesting that I go further into this.

    P.S. : everything I said was not to flame natrium's work but to make progress into ds hacking.
     
  7. Heran Bago

    Heran Bago Where do puyo come from?

    Member
    3,017
    436
    Nov 6, 2005
    United States
    Foggy California
    Didn't some gamecube games contain .arc? I'd keep going at it deufeufeu, and release your tools of course. [​IMG]

    edit: woa no, i was thinking of that other one the zeldas used.
     
  8. deufeufeu
    OP

    deufeufeu GBAtemp Advanced Fan

    Member
    880
    0
    Nov 21, 2005
    For those interested, my tool is something like this :
    [​IMG]
     
  9. jelbo

    jelbo Ōkami!

    Member
    807
    0
    Sep 12, 2003
    Netherlands
    Netherlands
    Indeed, this stuff is great to use original gfx from DS games to make stuff like .gif's or cursors.
     
  10. DaRk_ViVi

    DaRk_ViVi Sending you back... to the future!

    Member
    1,069
    58
    Apr 13, 2004
    Italy
    Asti, Italy
    Great! Is this app able to extract and reinsert the files? It could be useful for translations. [​IMG]

    P.S. Mac rox. [​IMG]
     
  11. Rankio

    Rankio GBAtemp Fan

    Member
    417
    1
    Mar 7, 2007
    United States
    Great job, looking forward to any progress.
     
  12. Flam9

    Flam9 GBAtemp Regular

    Member
    171
    0
    Aug 11, 2006
    Canada
    Very good work!
     
  13. Wolfus

    Wolfus Member

    Newcomer
    17
    0
    Apr 22, 2007
    That looks like it'll be really useful to a lot of people. Please keep at it. [​IMG]
     
  14. deufeufeu
    OP

    deufeufeu GBAtemp Advanced Fan

    Member
    880
    0
    Nov 21, 2005
    I'm currently in the process of making the ultimate viewer/inserter for all kind of data... You'll start by taking a file, it show up the hex dump, and then you decide what could be the data : a narc, an image with some packing info, ect... At the end when you have fully found the structure, it generates and xml. You could embeed in this file some python script for specific encoding/decoding, for example with pokemon there's some encryption that would fit there. Then to extract or insert data it will be straightforward.

    These are not some ideas thrown in the air, I'm really makin this... In fact I needed to make a common program for working on the last phoenix wright and ffxii:rw. I will call it Narc-o-matic, if you have a better name... It should be up within the next two centuries (or replace centuries by weeks if you are optimistic).
     
  15. Flam9

    Flam9 GBAtemp Regular

    Member
    171
    0
    Aug 11, 2006
    Canada
    I would call it nARCotics or something...
    that's just me though
     
  16. 111111111

    111111111 GBAtemp Advanced Fan

    Member
    516
    0
    Jan 8, 2007
    narcotic is good, or narcolepsy.
     
  17. Zidapi

    Zidapi GBAtemp Psycho!

    Member
    3,038
    1,821
    Dec 1, 2002
    I vote nARCotic too, sounds cool and i think once it's released alot of people will be addicted to going through all the releases looking for goodies [​IMG]
     
  18. Dirtie

    Dirtie :'D

    Former Staff
    3,705
    5
    Sep 9, 2003
    New Zealand
    Zealer
    Just wanted to say that http://tahaxan.arcnor.com/index.php?option...id=29&Itemid=36 has a bit of a format description on NARC files and might also be of interest (I don't know if this information is already in those other documents or not).

    I think you guys should collaborate to be honest, we could end up with something really awesome [​IMG]
     
  19. deufeufeu
    OP

    deufeufeu GBAtemp Advanced Fan

    Member
    880
    0
    Nov 21, 2005
    Dirtie : I got a lot more than this. It seems people started to get interested into narc with pokemon, I got the structures of at least 3 games , the last phoenix wright, the last ff and of course pokemon...

    For the name, narcotics will not show up directly on google, and narctool is the name of natrium tool.

    I'll soon start an alpha testing with interested tempers. You can go there http://deufeufeu.free.fr/wiki/index.php?title=NARC-O-MATIC
     
  20. Lick

    Lick Newbie

    Newcomer
    3
    0
    Apr 27, 2007
    Netherlands
    Could someone send me the NARC archives of a few games, I'm interested in writing my own loader on the DS.

    Thanks!