Page 1 of 4

Decoding cdi image files

Posted: Sun May 17, 2009 11:24 pm
by opt_fr_
Hello, I'm working on decoding image files in hotel mario. Has anyone succeeded ?

I've decoded some pics in the LVL0am.rtf file, but without the color (It's my first hexa decoding, can't etablish a link between the color palette and the pixels)

Image

Image

Posted: Tue May 19, 2009 11:13 am
by opt_fr_
done :)

Image

Posted: Tue May 19, 2009 1:42 pm
by Bas
Nice! How do you do that?That's the first step in discovering the fabulous 8th Hotel!

Posted: Tue May 19, 2009 3:33 pm
by opt_fr_
I've opened the files ending with "av.rtf" (edit : its not .am) of the Hotel Mario CD-i with a hexa editor.

Then I've looked for image data : the background images are in a CLUT-like format I think.

http://en.wikipedia.org/wiki/CLUT

For each image there is list of all the colors first (the image palette) and then the numeric entries of each pixels.

Image

I have not found the dimension of the images in these files but I know that the game runs in 768*558.

Then I've written a tiny program that read the palette, associates each colors with their logical number and then reads the data image, create an html file that produce each pixel with the the correct color (previously mapped).

I dunno how to create images in Java so that's why I used a html file to do that.

Posted: Wed May 20, 2009 2:41 pm
by LuigiBlood
WOW !
Finally someone who can do that !

I thought the "am.rtf" were only the musics.
Guess i was wrong.

Posted: Wed May 20, 2009 3:37 pm
by opt_fr_
oops, I'm wrong : it is the .av files, not .am files. I've edited my previous post :oops:
thanks for noticing that :o

Posted: Wed May 20, 2009 3:40 pm
by LuigiBlood
That's a little better. ^^
Well, for the first image, do you have a color version of it ?
EDIT:
And do you can get the backgrounds of cutscenes ?
(There should be a IRC chan of this forum...)

Posted: Wed May 20, 2009 3:41 pm
by opt_fr_
yes, I will put it here

Posted: Wed May 20, 2009 3:49 pm
by LuigiBlood
When you can release that program (even if it can only do html files) ?
(You don't have to answer this question, if you don't, i understand ^^)

Posted: Wed May 20, 2009 3:53 pm
by opt_fr_
Image

I cannot decode the videos. I dunno where they are recorded and in which format they are :(

Posted: Wed May 20, 2009 3:55 pm
by LuigiBlood
opt_fr_ wrote:I cannot decode the videos. I dunno where they are recorded and in which format they are :(
I rather think it's DYUV and DYUV Overlay.

Posted: Wed May 20, 2009 3:58 pm
by opt_fr_
I will post the program here but it's not user friendly.
It isn't optimized yet, it's a prototype.

Posted: Wed May 20, 2009 4:08 pm
by LuigiBlood
If i can help you about DYUV, you should check this :
http://icdia.co.uk/cdprosupport/cdi/mm/dyuv.htm

That's the only thing i can do ^^
(I've also been using many programs that's not user friendly ^^)

Posted: Wed May 20, 2009 4:57 pm
by opt_fr_
[outdated link]

The jar file may be extracted, so you can look at the sources and modify them.

(use it at you're own risks :lol: )

Posted: Wed May 20, 2009 5:56 pm
by LuigiBlood
I'm using it good, but i have a problem, i have some white things in the image...

EDIT :
Here's a pic of it :
http://i326.photobucket.com/albums/k425 ... roblem.png

I removed all the "00 00 00 00 00 FF FF FF FF FF FF FF FF FF FF 00" in this image.
EDIT 2 : I'm removing "30 08 25 02 01 0F 62 01 01 0F 62 01 47", apparently, it was because of this.

EDIT 3 :
It was because of this : "30 08 ?? 02 01 0F 62 01 01 0F 62 01"
(?? = Always different each time you see it)
To get a good image, you have to remove these bytes from the raw (even the ??).