Has anyone found a way to open and decompress the Xap files from Mario and Sonic at the Olympic games DS?

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,411
Country
United Kingdom
DS games have been modded about as extensively as any other non PC system going, and plenty more than most (indeed only the SNES and NES will stand ahead of it from where I sit).

Mario Sonic Olympics was generally considered a lame cash in on consoles and the handheld versions were not one of those exceptions that sometimes happen. To that end not many would have looked a this game specifically.

Models and (3d) animations can be more tricky. While there is the popular NSMBD and NSBCA (and NSBTX for textures, plus a few others that are even more rare, https://github.com/scurest/apicula being a good start for something more modern then a lot of stuff uses rather more custom setups and not many people make tools to view things in stuff like Blender.

XAP is not a common/generally known format to DS hacking either. It might be present in whatever else Sega Sports (the devs of this one) or maybe Smilebit (their previous incarnation) did and I might have seen it in another Sega game on the DS but might as well go from scratch.
Most things in the game bar some text files in data/camera/ , a font file (uses the popular NTFR font format, though I am seeing another supposedly font file without it but that is more likely the end credits animation for staff which are often a bit more animated than basic game text), something in a test folder (might be a developer leftover), the utility.bin in DWC folder (this is the download play part of things, sometimes worth exploring. There is also a directory called mboot, possibly short for multiboot, which is curious), a sdat file (very common sound format) and a few others.
https://pastebin.com/eqYGL4Vm has the file listing for others playing along at home (several hundred KB so not in this).

Anyway sampling a random bunch of XAP files. Everything starts with XapA and most have a minimum size before starting something more interesting (more shortly). So an archive format of sorts rather than a simple choice of extension (have seen that before too as extension does not officially mean anything in DS world).
In the data/lang/en/model/panel/common/ I opened a bunch of files. They had BMD0 about at the end of the "XAP header" as I will term it. BMD0 is the indicator for the NSBMD model format mentioned above, and also seen in the test folder of this game. lang had the usual abbreviations for other European languages in it which might mean some of the text in the game is in fact a 3d model which is somewhat unusual (though text being images in general is not).

With NSBMD being a known format with its own internal data we can begin to speculate on how the XAP format works.
Though before that, two similar files
xap_file_1.png


B001 and B401 (highlighted and also the only difference in the preceding data) if flipped around are nothing interesting, though usually you would expect either a length of the whole file or a length of the file contained within. That said 4 bytes different in size and a corresponding jump by 4 between the files says to me there is likely some relation to size.
More curiously is I am not seeing a normal compression indicator (though the files themselves might be compressed otherwise -- the . in the middle of what should be a complete word is typical of that) and that is fairly standard for 3d models in general.

Looking around though I then opened up tu_up_bg.xap from data/bg/intro/ and it differed quite considerably to the other files I saw before then.

xap_file_2.png

RGCN is the start of the popular NCGR 2d graphics format https://www.romhacking.net/documents/[469]nds_formats.htm
I did see GCN0 in another file (museum_bgup.xap in /data/bg/menu), lot of blank sections in that and other thing in the bg folder one up from that (the epe folder for instance having similar files).

Usual guesses for differences are suddenly the appearance of directories or multiple files contained within. I did have a quick scan for very large files but nothing even measured a megabyte in the XAP format ( /data/motion/char/ getting into the 200 kilobyte range at best).

Interesting format so far but I have to do other things so will leave it there for now.
 
  • Like
Reactions: Malik177

Malik177

Member
OP
Newcomer
Joined
Jun 17, 2022
Messages
12
Trophies
0
Age
23
Location
New York
XP
104
Country
United States
Hmm I think I'm starting to understand what you mean ate you using that program to extract the models and their animations out? Also, is there by any chance you can do that for me I would really appreciate it since I'm not really tech savvy.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: Lmao Xbox removed gamescript apparently