.n2d files

Discussion in 'NDS - ROM Hacking and Translations' started by aevanko, Jan 6, 2011.

Jan 6, 2011

.n2d files by aevanko at 8:59 AM (1,489 Views / 0 Likes) 4 replies

  1. aevanko
    OP

    Newcomer aevanko Newbie

    Joined:
    Sep 28, 2009
    Messages:
    4
    Country:
    Japan
    Can someone help me out? I am trying to figure out how to view an .n2d file. It's a background art image but I cannot find any info on how to open it.
    Thanks.
     
  2. drwhojan

    Member drwhojan GBAtemp Addict

    Joined:
    Jul 14, 2009
    Messages:
    2,888
    Location:
    this planet earth
    Country:
    United Kingdom
    Sound's like a .nds file made .n2d need renaming to .nds for legal resions

    NintendoDS game i mean
     
  3. rastsan

    Member rastsan 8 baller, Death Wizard

    Joined:
    May 28, 2008
    Messages:
    963
    Location:
    toronto
    Country:
    Canada
    where did you find it(what game)?
    any other details you can give would be appreciated.
     
  4. aevanko
    OP

    Newcomer aevanko Newbie

    Joined:
    Sep 28, 2009
    Messages:
    4
    Country:
    Japan
    It's a 2D image that is used in Ninokuni. It was found in the bg folder for the tutorial screens.
    I think .n3d represents a 3D model and .n2d represents a 2D, but i can't be sure.
     
  5. Barubary

    Newcomer Barubary Member

    Joined:
    Feb 27, 2009
    Messages:
    28
    Country:
    United States
    .n2d is one of two simple archive formats used in the game. .n3d is practically the same;
    Code:
    /*
    * char[4] magic; // "NPCK"
    * u32 dataOffset;
    * u32 numFiles;
    * {
    *ÂÂÂÂÂÂu32 fileStart; // relative to start of file
    *ÂÂÂÂÂÂu32 length; // can be 0 (if so, fileStart is also 0)
    * }[numFiles] FAT;
    * u8* data;
    */
    'numFiles' is not the actual number of files, but the possible number of files. Each .n2d should have the same number as that field. The index of the contained files is determined by their type. For example, the palette (nclr) is always the first file, while the tile maps (nscr) are always the seventh file. If a certain format is not present (buttons do not use nscr), 'fileStart' and 'length' are 0 for the corresponding index.
    The other format is just a generic archive, with magic header 'NCPK'. The only other difference is an extra u32 for each file (before 'fileStart'), of which I haven't figured out the purpose. Some .bin files use this format.

    You should be able to unpack both types of files with this tool (I know I did). Drag and drop any number of files onto it to unpack them. Dragging a folder onto it is the same as dragging all files directly inside the folder onto the program (only goes one level deep; subfolders are not checked).
    More options are available when using the command line. Provide no arguments to see its usage.
     

Share This Page