is it possible to open these cd rom .kar files
June 20, 2023 3:53 PM   Subscribe

i recently found my old Barbie Fashion Show (2004) disc and had a great time replaying it. now i have ideas that i'd love to add to the game but i can't open the file type they used. is there any way to open these proprietary files as someone who is tech savvy but not a coder

all i wanted to do at first was alter the existing textures to replace the fabric colors that i don't care for, keeping the exact same file names and resolutions. ideally i'd get to add models, stages, clothing, music, whatever, but i can't get past these damn .kar files. at this point in my research i've about given up and accepted that it probably won't happen. i can only find information on opening kar files for karaoke, nothing animation/3d/image related. any advice is appreciated, even if that advice is "give up."

the game was made by vivendi universal games (and mattel). here are a couple screenshots of the game folders if that helps-
screenshot of cd drive\
screenshot of cd drive\Fashion\Fashion
screenshot of cd drive\Fashion\Resource
the only other thing in cd\fashion is 3 tiny files so it can run on windows xp and 98
screenshot of cd drive\SUPPORT
as far as i can tell there's nothing useful in the support folder but let me know if you want to see anything in there
posted by pfeffernusse to Computers & Internet (16 answers total) 2 users marked this as a favorite
 
These look like compressed install files. It'd probably be more comprehensible if you install it?
posted by kschang at 5:28 PM on June 20, 2023


That's a pretty tall order, modding a 19 year old game. I didn't find anything useful on a quick Google search but I imagine you tried harder than me. Google is very bad at queries on old information like this. Your best bet for a query like this is to find a fanbase for this game, like a subreddit or forum, and ask there.

50/50 it's a standard archive file format, like a zip file. I'd try the 7zip or IZarc program and see if it can open them. Or look at the first bytes and try to identify it that way, maybe with the Linux file command. I'd probably quit if none of that worked but then I'm not highly motivated. If you want to email the smallest .kar file to me or upload it somewhere and email me the address, I'll take a look. MeMail me.

Even if you can take apart the .kar files there will be continuing hurdles of figuring out the image file formats, modifying them, then repackaging it so the game will load them. That could be easy or nearly impossible, hard to tell.
posted by Nelson at 5:47 PM on June 20, 2023 [2 favorites]


This appears to contain a dump of the files. I tried unzipping one as zip & rar and neither of those worked.
posted by juv3nal at 6:38 PM on June 20, 2023 [1 favorite]


Looks like the CD-ROM is downloadable here: Barbie: Fashion Show (2004).

I can't make much of the kar files either. They're a structured file of some sort, but not one I've ever seen.

This is the sort of game hack that Foone does, but you'd have to make Foone aware of this
posted by scruss at 6:42 PM on June 20, 2023 [2 favorites]


Response by poster: nelson, i now realize i just searched with duckduckgo so i'll try some brand name googling as well, and see if i can find any communities for the game.

scruss, thank you for mentioning Foone, i'll try contacting her and see what she thinks or if she knows anyone else who could help.

while i was working on this myself i looked at the files for barbie horse adventure and all of its textures are plain pngs neatly placed in folders named 'textures,' if only this game was like that...
posted by pfeffernusse at 7:03 PM on June 20, 2023


All the KAR files start with a header:
CAT RIFF

I thought that's based on RIFF (something as simple as RIFF files concatenated I figured?). If you open Credits.KAR you do see plain ol' text buried within the binary-- so you could maybe at least start by adding you name as a creator for the credit screen as a first little win.

I put it through RiffPad (a viewer made by menasoft) but it didn't recognise it, so I figured it's likely a kludge on that format, but...turns out RIFF is based on IFF, which is a generic digital container file format originally introduced by Electronic Arts and part of that mentions the CAT being used to group generic chunks of data. Seems too perfect to not be what you're looking for.

So hopefully that helps, see about finding an IFF reader and you should get one step further to your goal!
posted by Static Vagabond at 7:06 PM on June 20, 2023 [2 favorites]


From the IFF spec:
Group CAT

A CAT is just an untyped group of data objects.

Structurally, a CAT is a chunk with chunk ID "CAT " containing a "contents type" ID followed by the nested objects. The ckSize of each contained chunk is essentially a relative pointer to the next one.

CAT ::= "CAT " #{ ContentsType (FORM | LIST | CAT)* }
ContentsType ::= ID -- a hint or an "abstract data type" ID

In reading a CAT, like any other chunk, programs must respect its ckSize as a virtual end-of-file for reading the nested objects even if they're malformed or truncated.

The "contents type" following the CAT's ckSize indicates what kind of FORMs are inside. So a CAT of ILBMs would store "ILBM" there. It's just a hint. It may be used to store an "abstract data type". A CAT could just have blank contents ID ("JJJJ") if it contains more than one kind of FORM.

CAT defines only the format of the group. The group's meaning is open to interpretation. This is like a list in LISP: the structure of cells is predefined but the meaning of the contents as, say, an association list depends on use. If you need a group with an enforced meaning (an "abstract data type" or Smalltalk "subclass"), some consistency constraints, or additional data chunks, use a composite FORM instead (Cf. Composite FORMs).

Since a CAT just means a concatenation of objects, CATs are rarely nested. Programs should really merge CATs rather than nest them.
The .kar files I downloaded and peeked into seem to conform to that spec, except that the objects nested inside the "CAT " chunks are RIFF files rather than IFF chunks (the "hint" appearing before the first RIFF header always seems to be four blanks). Which is kind of a weird mashup of container formats; the ckSize field that follows the "CAT " header is big-endian, while all the size fields that follow the FOURCCs inside the embedded RIFFs are little-endian.

Apart from the endian weirdness, these nested-chunk formats are pretty straightforward. If I were going to work on these, the first thing I'd do is write a little script that converts a .kar file into a folder full of RIFF files, and another that packs a folder created by the first script back into a .kar file again. Then I'd write a second pair of scripts that does the same thing with RIFF containers, hoping to see the embedded chunks emerge as files in some standard image format that I could manipulate with existing tools.

This kind of thing is pretty easy to whip up on a Linux box like my daily driver, but would be kind of a pain in the arse on Windows.

Also, I agree with kschang. There's a really good chance that these things are archives in a format understood by the game installer, and that the important pieces of what they contain would end up split out into their own files post-installation. So before I did anything about diving inside the .kar files I'd be messing with the game as installed in its Program Files subfolder rather than as distributed on CD-ROM.
posted by flabdablet at 10:33 PM on June 20, 2023 [2 favorites]


Response by poster: i don't have time to check the other things right now but here is the installed software.

i uninstalled and reinstalled to double check that that's where everything went but yeah, that's it. i still don't understand too much but i feel like this is worse. at the very least i can't open anything with 7zip, not sure what i can try with the DLL ones

(thank you all so much for the help btw!)
posted by pfeffernusse at 1:32 AM on June 21, 2023


I'd be tempted to see what happens if you try selecting one of those DLLs when you try to change an icon on Windows. Sometimes there's weird, visible shit in there.
posted by Iteki at 1:37 AM on June 21, 2023 [2 favorites]


OK, so if C:\Program Files (x86)\Barbie(TM)\Barbie(TM) Fashion Show(TM) CD-ROM is the only new folder created by installing this software, then I'm guessing this is one of those truly irritating titles that insists on having the CD-ROM inserted in order to run. That would explain why most of the files in the Internet Archive listing of BarbieFashion.iso don't show up in the folder as installed.

I'm a bit intrigued now, and since I can apparently download this thing from IA via the link that scruss provided above, I'm going to have a play with it on my Debian laptop. You should be able to make use of any scripts I come up with after installing WSL2 and Debian.
posted by flabdablet at 4:26 AM on June 21, 2023 [1 favorite]


I made a thing that breaks .kar files out into separate .riff files, but the content of most of those is leaving me none the wiser. Some of them contain embedded Ogg Vorbis audio and I've been amusing myself by playing that back, but I've yet to find any embedded image files in standard formats so no luck on textures as yet.
posted by flabdablet at 6:59 AM on June 21, 2023 [1 favorite]


Not sure if this would help, but the game was developed by Knowledge Adventure, which was since renamed Jumpstart had concentrated on educational games, no more licensed stuff.

However, a company tends to keep the same engine for their installer / packer, so maybe that's another hint to research.
posted by kschang at 6:59 AM on June 21, 2023 [1 favorite]


This sounds exactly like a project foone would love.

(ETA: Doh, missed the earlier mention of her on first scroll.)
posted by jferg at 7:30 AM on June 21, 2023 [2 favorites]


Response by poster: i will get back to working on this later tonight. for now here are Foone's initial thoughts (i'm on mobile and don't know how to do the indent quote thing):

okay so here's how you reverse engineer an arbitrary game, the quick version:

Research. Who made the game? what else did they make? Maybe they made a game with the same engine, and someone already figured out that one? (not that I saw on a quick look, but you may be able to dig deeper) Also, look in the game files. There's a PowerRender.dll and a sipEngine.bc file. Nothing for sipEngine, but PowerRender has a hit on the internet archive, maybe that download includes some info on how it encodes files?
Look at the files (with a hex editor, like HxD). KAR files seem to be the main storage mechanism, and they've got a RIFF header. RIFF is a standard, though they're not using it exactly. But this might help. Another thing you can spot in the KAR files is a bunch of english strings (CreditsTb.kar is lousy with them). That's a good sign: it means the files aren't compressed, so you don't have to figure out the compression method.
Static analysis of the EXE. Get Ghidra and load up the EXE. Find where it opens files (CreateFileA/CreateFileW on windows), trace back from there. Check the strings. Hey look, function FUN_004e6260 is called with "KAResource.kar". so FUN_004e6260 is probably a function to load arbitrary resource files. Dig through that, figure out how it works.
Dynamic analysis of the EXE. Stick it in a debugger and see what it does. Set a breakpoint on CreateFileA/W and follow the execution. I don't have a good recommendation for what tool to use here, I'm from the past. I've used Ollydbg a lot but it hasn't been updated in 9 years.
Hijack the EXE and make it do your work for you. One thing I noticed while looking around was references to Python. This game apparently embeds a python interpreter, version 2.2. Maybe you can find where it loads the code from, or inject your own code?

Anyway those are some introductory ideas. feel free to ask any follow-up questions, but this hopefully gives you some idea of where to start?

Good luck!
posted by pfeffernusse at 5:39 PM on June 21, 2023 [1 favorite]


Best answer: foone's continuing on Mastodon.
posted by Pronoiac at 8:19 PM on June 21, 2023 [2 favorites]


foone is the best!
posted by scruss at 1:22 PM on June 22, 2023


« Older Best way to digitize vinyl records with my...   |   Phone case with a built-in solar charger Newer »

You are not logged in, either login or create an account to post comments