Jump Ultimate SuperStars AAR Archive

Discussion in 'NDS - ROM Hacking and Translations' started by Keshire, Sep 19, 2007.

Sep 19, 2007
  1. Keshire
    OP

    Member Keshire GBAtemp Regular

    Joined:
    Sep 8, 2007
    Messages:
    145
    Country:
    United States


  2. FAST6191

    Reporter FAST6191 Techromancer

    pip
    Joined:
    Nov 21, 2005
    Messages:
    21,748
    Country:
    United Kingdom
    I assume it is jump ultimate stars,
    for the record it ran well enough for spriting in my 6 month old of desmume (which has rudimentary sprite/tile/map viewers and such) so a current version should be fine. You also dodge the need to find palettes and decompress.

    Anyhow despite hex workshop being my choice of almost always I have very little experience in defining file types with it.
    Anyhow with thanks to deufeufeu:
    First few bytes are ALAR (a common theme in the nitroSDK)
    id

    offset (normally just the two bytes unless a massive file is happening)

    size (not always the same as offset difference as padding is sometimes used so as to end up word (or higher) aligned.

    pad (00's but if you are dealing with a massive aar file then they may be filled with offset data)

    filename ASCII, the foward slashes indicate directory. If you just want extraction then I suggest counting back 12 bytes from the name and then flip the previous 2 bytes (can be slightly confusing as an ASCII letter can appear before the name: i not J in the example below)

    Followed by standard LZ, a decompression app here: http://gbadev.org/tools.php?showinfo=56

    Demo section from info.aar (serves a point as some stuff is AARed twice)
    CODE0000000 414C 4152 0305 0400 0000 0000 0300 0000 ALAR............
    0000010 9C00 1C00 3C00 5C00 7C00 0000 0000 0047 ....
     
  3. Keshire
    OP

    Member Keshire GBAtemp Regular

    Joined:
    Sep 8, 2007
    Messages:
    145
    Country:
    United States
    Ya that's bothersome. [​IMG]

    So far the chunks are fairly straight forward.

    ALAR = Archive
    DSTX = Some type of texture? '.dtx'
    DSIG = Another type of texture? '.dig'
    ALOD = Unsure. I want to assume Level of Detail, but it contains node data.
    ALMT = Alignment?? '.amt' Contains bounding box and collision information.
    DSCP = Compression

    I DO have some experience with unknown filetypes. [​IMG]
    http://fabletlcmod.com/wiki/doku.php

    But I'm not a very good coder at all. I'm just good with providing information and hoping someone else can provide a tool for others. Otherwise I'll just use a hex editor.
     
  4. Keshire
    OP

    Member Keshire GBAtemp Regular

    Joined:
    Sep 8, 2007
    Messages:
    145
    Country:
    United States
    updated Hex Workshop Structures

    The ALAR formats are differentiated into types.

    Ripped Files that should be one of the characters. I can't tell if there's still compression going on in these files though. And I can't seem to get even the resemblance of a sprite.
    The AAR file has been decompressed and split into:

    .dtx (sprite should be in this)
    .amt (bounding box and collision information)
    .aod (Unsure what this is doing)
     
  5. FAST6191

    Reporter FAST6191 Techromancer

    pip
    Joined:
    Nov 21, 2005
    Messages:
    21,748
    Country:
    United Kingdom
    Wow, sorry about not replying I made one up and it got lost in a sea of tabs.
    Yeah, file reconstruction is a pain for all areas of DS hacking aside from basic NARC files. Nice to see more rom hackers though, I personally go the hex editor route and tweak an existing file or slightly redo the header in excel.

    Also http://tahaxan.arcnor.com/index.php?option...id=28&Itemid=36 , http://www.pipian.com/ierukana/hacking/ds_narc.html , http://kiwi.ds.googlepages.com/nsbmd.html and http://kiwi.ds.googlepages.com/sdat.html may be of some interest. It does not have what you want (other 2d files, general archives, 3d and the sound format are detailed there) but it could prove interesting if you want to make a makefile/compiler sort of thing. http://knightsc.googlepages.com/narctool.zip has source as well although it is for a different form of DS archive.

    Also I must apologise if I came of badly, most "spriters" seem to be after the end result and little more.
    Anyhow back to business "collision" data aside I would suggest the rest is the palette although I seem to have misplaced my notes on the format of it
    I assume you know basic 2d GBA/DS graphics ( http://gbatemp.net/index.php?showtopic=45360& should help if not), they are not bitmapped here so we can leave that.
     
  6. Keshire
    OP

    Member Keshire GBAtemp Regular

    Joined:
    Sep 8, 2007
    Messages:
    145
    Country:
    United States
    I just need to figure out the tiling. I definately have the sprite. It just isn't tiled correctly. Then to figure out characters. [​IMG]
     
  7. Keshire
    OP

    Member Keshire GBAtemp Regular

    Joined:
    Sep 8, 2007
    Messages:
    145
    Country:
    United States
  8. Keshire
    OP

    Member Keshire GBAtemp Regular

    Joined:
    Sep 8, 2007
    Messages:
    145
    Country:
    United States
    Getting closer.

    The characters use a different type. They ditch the dtx chunk and store both the palette and the tiling in the dig. Their also compressed. I haven't found the decompress size yet. :|

    And their using 4bpp linear reverse order. Or so tile molester is telling me.

    [​IMG]

    edit: There should be enough information now to replace koma pictures I beleive.
     
  9. Keshire
    OP

    Member Keshire GBAtemp Regular

    Joined:
    Sep 8, 2007
    Messages:
    145
    Country:
    United States
    Win.

    The second was an exact copy of the first. I just rearranged the tiles.
    I'm not sure why it had 2 exactly same sprites within the file though.
    [​IMG]

    Code:
    struct DSIG
    {
    ÂÂÂÂchar ÂID[4];
    ÂÂÂÂword ÂUnknown; //Possibly Type
    ÂÂÂÂbyte ÂPaletteNumber; //Number of Palettes.
    ÂÂÂÂbyte ÂUnknown; //Bit Depth?
    ÂÂÂÂword ÂUnknown;
    ÂÂÂÂword ÂSize; //Size of data after Palettes. Multiply by 4
    
    struct ÂPalette ÂPalettes[PaletteNumber]; //Each Palette is 32 bytes
    ÂÂÂÂdword ÂUncompressedSize; //This is the uncompressed size of the first section
    ÂÂÂÂdword ÂSections; //I'm pretty sure each section is it's own frame of animation??
    ÂÂÂÂword ÂUnknown; Â//Related to Sections.
    ÂÂÂÂword ÂOffsets[(Sections*2)-1]; //1st word = Size, 2nd word = relative offset from UncompressedSize (multiplied by 4)
    ÂÂÂÂ//compressed data
    };
    And that will get you every sprite.
     
  10. Keshire
    OP

    Member Keshire GBAtemp Regular

    Joined:
    Sep 8, 2007
    Messages:
    145
    Country:
    United States
  11. FAST6191

    Reporter FAST6191 Techromancer

    pip
    Joined:
    Nov 21, 2005
    Messages:
    21,748
    Country:
    United Kingdom
    Very nice work Keshire.
     
  12. Keshire
    OP

    Member Keshire GBAtemp Regular

    Joined:
    Sep 8, 2007
    Messages:
    145
    Country:
    United States
    No problem. I'm not much of a coder. So someone else will have to write up an import/export app. If there's enough interest I'll look at a couple other files types. Such as the computer AI or Collision detection.

    [​IMG]
     
  13. Keshire
    OP

    Member Keshire GBAtemp Regular

    Joined:
    Sep 8, 2007
    Messages:
    145
    Country:
    United States
    For the life of me I can't seem to figure out how the tiling works (having no experience with tiled sprites before).

    [​IMG]
    The tiling information for this is as so:

    It looks like Frame Number | Unknown | Position
    Code:
    00 00 | F8CA | 02 00 
    00 00 | E8E5 | 0A 00 
    00 00 | F8EA | 06 00 
    00 00 | F8FA | 05 00
    I'd like to think size and pixel offset for the unknown stuff. But I have no idea. And can't seem to get usable numbers out of it. Any suggestions?
     
  14. Retal

    Member Retal GBAtemp Advanced Fan

    Joined:
    May 20, 2007
    Messages:
    914
    Location:
    England              Sex: Daily
    Country:
    United Kingdom
    I've written applications to work with proprietary file formats before. And even dissected the file format myself. But I don't often feel like I have the energy to try to reverse engineer file formats, but if you can complete your findings and publish clearly what you know then I have some interest in writing the application.

    EDIT: Incidentally it surprises me how good you are at this for someone who claims that they cannot code.
     
  15. Keshire
    OP

    Member Keshire GBAtemp Regular

    Joined:
    Sep 8, 2007
    Messages:
    145
    Country:
    United States
    For the most part I'm done with the actual archives. I'm just trying to figure out the tiling. It's starting to become annoying. [​IMG]

    I'll post up everything I have on the archives when I get back to work. As far as coding goes. I can tear stuff apart easily. But building new stuff I suck at, and frequently find myself wondering where to even start.

    Either way if I don't figure out the tiling then I'd be stuck ripping sprites instead of editing or creating them.
     
  16. Retal

    Member Retal GBAtemp Advanced Fan

    Joined:
    May 20, 2007
    Messages:
    914
    Location:
    England              Sex: Daily
    Country:
    United Kingdom
    Well ripping is still a good start for the basis of a program.
     
  17. Keshire
    OP

    Member Keshire GBAtemp Regular

    Joined:
    Sep 8, 2007
    Messages:
    145
    Country:
    United States
    Ok we'll start with the main Archive format.

    .aar

    It's divided into 2 types so far.
    Type 3 (ChrArc.aar, Koma.aar, Item.aar, etc etc
    and
    Type 2 (/chr/_b_#c.aar, And aar files within Type 3)

    Code:
    Type 3
    
    ÂÂÂÂchar ÂÂÂÂÂID[4]; Â Â Â Â Â Â Â // 4 bytes, ALAR
    ÂÂÂÂbyte ÂType; Â Â Â Â Â Â Â //So far I've seen 2 and 3
    ÂÂÂÂbyte ÂUnknown; Â Â Â Â //Some other type of ID. Most are 05.
    ÂÂÂÂdword ÂÂÂÂÂNumberFiles; Â //Number of files contained in the Archive
    ÂÂÂÂword ÂÂÂÂÂunk; Â Â Â Â Â Â Â Â//Always 00 so far
    ÂÂÂÂdword ÂÂÂÂÂArrayCount; Â Â//Number of Items in the Index
    ÂÂÂÂword ÂÂÂÂÂSizeHeader; Â //Size of the Header
    ÂÂÂÂword ÂÂÂÂÂFileIndex[ArrayCount+1]; //Absolute Offset Pointers to the File Headers
    ÂÂÂÂ//Pad to start of table
    Â Â Â ÂFileHeaderArray[NumberFiles];
    Â Â Â Â//Pad to data
    
    File Header
    ÂÂÂÂword ÂÂÂÂÂFileID;
    ÂÂÂÂword ÂÂÂÂÂUnknown; Â Â //A file type??
    ÂÂÂÂdword ÂÂÂÂÂStartOfFile; Â//Absolute Offset Pointer to Start of the File
    ÂÂÂÂdword ÂÂÂÂÂSizeOfFile; Â //Size of the file
    ÂÂÂÂword ÂÂÂÂÂUnknown; Â Â//Always the same??
    ÂÂÂÂword ÂÂÂÂÂUnknown; Â Â//Always the same??
    ÂÂÂÂword ÂÂÂÂÂUnknown; Â //Possibly a Size, Pointer, or Type.
    ÂÂÂÂchar ÂÂÂÂÂFileName; Â Â//Null terminated string
    Â Â Â Â//Pad to next entry
    Code:
    Type 2
    
    ÂÂÂÂchar ÂÂÂÂÂID[4]; Â Â Â Â Â Â Â // 4 bytes, ALAR
    ÂÂÂÂbyte ÂType; Â Â Â Â Â Â Â //So far I've seen 2 and 3
    ÂÂÂÂbyte ÂUnknown; Â Â Â Â //Some other File Type.
    ÂÂÂÂword ÂNumberFiles;
    ÂÂÂÂbyte ÂID; Â Â Â Â Â Â Â Â Â//Some type of Game Character ID
    ÂÂÂÂbyte ÂID; Â Â Â Â Â Â Â Â Â//Some type of Game Character ID
    ÂÂÂÂbyte ÂID; Â Â Â Â Â Â Â Â Â//Some type of Game Character ID
    ÂÂÂÂbyte ÂID; Â Â Â Â Â Â Â Â Â//Some type of Game Character ID
    ÂÂÂÂbyte ÂID; Â Â Â Â Â Â Â Â Â//Some type of Game Character ID
    ÂÂÂÂbyte ÂID; Â Â Â Â Â Â Â Â Â//Some type of Game Character ID
    ÂÂÂÂbyte ÂID; Â Â Â Â Â Â Â Â Â//Some type of Game Character ID
    ÂÂÂÂbyte ÂID; Â Â Â Â Â Â Â Â Â//Some type of Game Character ID
    Â Â Â ÂFileHeaderArray[NumberFiles];
    Â Â Â Â//Pad to data
    
    FileHeader
    ÂÂÂÂbyte ÂID; Â Â Â Â Â Â Â Â Â//Some type of Game Character ID
    ÂÂÂÂbyte ÂID; Â Â Â Â Â Â Â Â Â//Some type of Game Character ID
    ÂÂÂÂbyte ÂID; Â Â Â Â Â Â Â Â Â//Some type of Game Character ID
    ÂÂÂÂbyte ÂID; Â Â Â Â Â Â Â Â Â//Some type of Game Character ID
    ÂÂÂÂdword ÂStartofFile; Â Â //Absolute Offset Pointer to Start of File
    ÂÂÂÂdword ÂSizeofFile; Â Â Â//Size of File
    ÂÂÂÂbyte ÂUnknown;
    ÂÂÂÂbyte ÂUnknown;
    ÂÂÂÂbyte ÂUnknown;
    ÂÂÂÂbyte ÂUnknown;
    
    Each data chunk is preceded by a 32 byte string
    All the files are tag based.
    Each tag is proceded by 2 bytes that are unknown.
    And there is padding between and within the files.

    Code:
    DSCP tag 
    
    ÂÂÂÂchar ÂID[4];
    ÂÂÂÂdword ÂGBA_Compression_header; //lzss compressed file
    Code:
    DSTX tag
    
    ÂÂÂÂchar ÂID[4];
    ÂÂÂÂbyte ÂUnknown; Â Â Â Â Â Â Â Â Â//
    ÂÂÂÂbyte ÂID; Â Â Â Â Â Â Â Â Â//Some type of Game Character ID
    ÂÂÂÂword ÂNumberFrames;
    ÂÂÂÂword ÂSizeofChunk;
    ÂÂÂÂword ÂIndex[Frames]; //Relative Offset Pointer to Tile Table. (Offset + 12 bytes from header)
    Â Â Â Â//Next your looking at an array and sub-array of 6 bytes.
       Âword      ÂTilePiecesArray[NumberFrames];
                 Âword        TileNumber; //Either just the Frame number, or Number of Tiles that make up the frame in the case of sprites that contain multiple frames. (ie Support Characters)
    ÂÂÂÂbyte ÂXOffset; //Pixel Offset
    ÂÂÂÂbyte ÂYOffset; //Pixel Offset
                 Âword        Arrangement;  Â//X by Y
    Code:
    DSIG tag
    
    ÂÂÂÂchar  ÂID[4];
    ÂÂÂÂword  Unknown;         Â//This is probably a type. Some DSIG's have headers that end after the palette array
    ÂÂÂÂbyte  ÂNumberPalettes;     //
    ÂÂÂÂbyte  ÂUnknown;
    ÂÂÂÂword  Unknown;
    ÂÂÂÂword  Size;
    Â Â Â ÂPaletteArray[PaletteNumber]; Â Â Â Â//32 byte Palettes
    Â Â Â Â//End of Typical Header
    Â Â Â Â//Begin of MultiFrame Sprite Header
    ÂÂÂÂdword ÂUnknown;
    ÂÂÂÂdword ÂNumberFrames;
    ÂÂÂÂword  ÂOffsets[(NumberFrames*2)]; 
    Â Â Â Â//Relative (After the palettes) Offset Pointer to Frame as well as size. Multiply the Pointer by 4 to get the Correct Offset.
    
    Multi Frame Sprites have each frame compressed. first 4 bytes are the lzss compression header.
    The other File types I haven't looked at much.

    edit:
    But, there's collision, Computer AI, Effects, Shots, etc etc that exist. I'd love to find out how they link the sprites to the moves and effects.
     
  18. TodX

    Newcomer TodX Newbie

    Joined:
    Sep 25, 2007
    Messages:
    1
    Country:
    United States
    Hi guys. This is my first post here [​IMG] .

    I'm a friend of Keshire's. I've been working with him on the ALAR achive files a bit. Here's a tool I've started working on to help out with the ALAR's.

    ALAR Tool

    For ease of programming, I've written this tool using .Net Framework 2.0. Available here.
    It is also built using visual c++ 2005 sp1 runtime libraries. Available here.

    If the program does not run correctly, I suggest trying the second link first, it's usually the culprit.

    The tool currently supports opening, viewing, and exporting ALAR type 2 and 3 archives. This should help those who are currently playing around with hacking the file types. Anyway, hope it helps.
     
  19. Retal

    Member Retal GBAtemp Advanced Fan

    Joined:
    May 20, 2007
    Messages:
    914
    Location:
    England              Sex: Daily
    Country:
    United Kingdom
    So I don't know why he was asking for someone to code it.
     
  20. Keshire
    OP

    Member Keshire GBAtemp Regular

    Joined:
    Sep 8, 2007
    Messages:
    145
    Country:
    United States
    Because I came here first, before Todx saw what I was doing. [​IMG]

    Sprite-wise. We're good to go with exporting. I'm at the moment working on the .amt file. Which looks to be some type of linking file. If we want import though there's still a few unknowns here and there that need sorted out. [​IMG]
     

Share This Page