Nintedo ARChive Format

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

Apr 23, 2007

Nintedo ARChive Format by deufeufeu at 11:47 AM (4,432 Views / 0 Likes) 39 replies

  1. deufeufeu
    OP

    Member deufeufeu GBAtemp Advanced Fan

    Joined:
    Nov 21, 2005
    Messages:
    880
    Country:
    Cote d'Ivoire
    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

    Reporter FAST6191 Techromancer

    pip
    Joined:
    Nov 21, 2005
    Messages:
    21,712
    Country:
    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

    Member deufeufeu GBAtemp Advanced Fan

    Joined:
    Nov 21, 2005
    Messages:
    880
    Country:
    Cote d'Ivoire
    wow I feel like an idiot. I had reversed almost everything on the page already... All the work goes to the trashbin :'(
     
  4. FAST6191

    Reporter FAST6191 Techromancer

    pip
    Joined:
    Nov 21, 2005
    Messages:
    21,712
    Country:
    United Kingdom
    Do not feel bad deufeufeu: I did the same this weekend only to find that website.
     
  5. arctic_flame

    Member arctic_flame GBAtemp ATMEGA8 Fan

    Joined:
    Nov 4, 2006
    Messages:
    2,840
    Location:
    England land
    Country:
    United Kingdom
    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

    Member deufeufeu GBAtemp Advanced Fan

    Joined:
    Nov 21, 2005
    Messages:
    880
    Country:
    Cote d'Ivoire
    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

    Member Heran Bago Where do puyo come from?

    Joined:
    Nov 6, 2005
    Messages:
    2,849
    Location:
    Foggy California
    Country:
    United States
    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

    Member deufeufeu GBAtemp Advanced Fan

    Joined:
    Nov 21, 2005
    Messages:
    880
    Country:
    Cote d'Ivoire
    For those interested, my tool is something like this :
    [​IMG]
     
  9. jelbo

    Member jelbo Ōkami!

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

    Member DaRk_ViVi ...is everywhere!

    Joined:
    Apr 13, 2004
    Messages:
    1,014
    Location:
    Asti, Italy
    Country:
    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

    Member Rankio GBAtemp Fan

    Joined:
    Mar 7, 2007
    Messages:
    417
    Country:
    United States
    Great job, looking forward to any progress.
     
  12. Flam9

    Member Flam9 GBAtemp Regular

    Joined:
    Aug 11, 2006
    Messages:
    171
    Country:
    Canada
    Very good work!
     
  13. Wolfus

    Newcomer Wolfus Member

    Joined:
    Apr 22, 2007
    Messages:
    17
    Country:
    United Kingdom
    That looks like it'll be really useful to a lot of people. Please keep at it. [​IMG]
     
  14. deufeufeu
    OP

    Member deufeufeu GBAtemp Advanced Fan

    Joined:
    Nov 21, 2005
    Messages:
    880
    Country:
    Cote d'Ivoire
    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

    Member Flam9 GBAtemp Regular

    Joined:
    Aug 11, 2006
    Messages:
    171
    Country:
    Canada
    I would call it nARCotics or something...
    that's just me though
     
  16. 111111111

    Member 111111111 GBAtemp Advanced Fan

    Joined:
    Jan 8, 2007
    Messages:
    516
    Country:
    Zimbabwe
    narcotic is good, or narcolepsy.
     
  17. Zidapi

    Member Zidapi GBAtemp Addict

    Joined:
    Dec 1, 2002
    Messages:
    2,536
    Country:
    Australia
    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

    Former Staff Dirtie :'D

    Joined:
    Sep 9, 2003
    Messages:
    3,705
    Location:
    Zealer
    Country:
    New Zealand
    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

    Member deufeufeu GBAtemp Advanced Fan

    Joined:
    Nov 21, 2005
    Messages:
    880
    Country:
    Cote d'Ivoire
    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

    Newcomer Lick Newbie

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

    Thanks!
     

Share This Page