Decoding cdi image files

Anything relating to CD-i can be discussed in this forum. From the multiple hardware iterations of the system to the sofware including games, reference, music and Video CDs. Maybe you hold an interest in Philips Media and the many development houses set up to cater for CD-i if so then this is the forum.
User avatar
opt_fr_
Softech Recruit
Posts: 64
Joined: Sun May 17, 2009 11:13 pm
Location: Belgium
Contact:

Decoding cdi image files

Post by opt_fr_ » Sun May 17, 2009 11:24 pm

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

User avatar
opt_fr_
Softech Recruit
Posts: 64
Joined: Sun May 17, 2009 11:13 pm
Location: Belgium
Contact:

Post by opt_fr_ » Tue May 19, 2009 11:13 am

done :)

Image

User avatar
Bas
CDinteractive Admin
Posts: 3024
Joined: Mon Jun 20, 2005 11:14 am
Location: the Netherlands
Contact:

Post by Bas » Tue May 19, 2009 1:42 pm

Nice! How do you do that?That's the first step in discovering the fabulous 8th Hotel!

User avatar
opt_fr_
Softech Recruit
Posts: 64
Joined: Sun May 17, 2009 11:13 pm
Location: Belgium
Contact:

Post by opt_fr_ » Tue May 19, 2009 3:33 pm

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.
Last edited by opt_fr_ on Wed May 20, 2009 3:38 pm, edited 1 time in total.

LuigiBlood
Softech Recruit
Posts: 63
Joined: Sat May 20, 2006 4:08 pm

Post by LuigiBlood » Wed May 20, 2009 2:41 pm

WOW !
Finally someone who can do that !

I thought the "am.rtf" were only the musics.
Guess i was wrong.
I'm french, so sometimes my english can be wrong.

User avatar
opt_fr_
Softech Recruit
Posts: 64
Joined: Sun May 17, 2009 11:13 pm
Location: Belgium
Contact:

Post by opt_fr_ » Wed May 20, 2009 3:37 pm

oops, I'm wrong : it is the .av files, not .am files. I've edited my previous post :oops:
thanks for noticing that :o
Last edited by opt_fr_ on Wed May 20, 2009 3:40 pm, edited 1 time in total.

LuigiBlood
Softech Recruit
Posts: 63
Joined: Sat May 20, 2006 4:08 pm

Post by LuigiBlood » Wed May 20, 2009 3:40 pm

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...)
Last edited by LuigiBlood on Wed May 20, 2009 3:44 pm, edited 1 time in total.
I'm french, so sometimes my english can be wrong.

User avatar
opt_fr_
Softech Recruit
Posts: 64
Joined: Sun May 17, 2009 11:13 pm
Location: Belgium
Contact:

Post by opt_fr_ » Wed May 20, 2009 3:41 pm

yes, I will put it here

LuigiBlood
Softech Recruit
Posts: 63
Joined: Sat May 20, 2006 4:08 pm

Post by LuigiBlood » Wed May 20, 2009 3:49 pm

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 ^^)
I'm french, so sometimes my english can be wrong.

User avatar
opt_fr_
Softech Recruit
Posts: 64
Joined: Sun May 17, 2009 11:13 pm
Location: Belgium
Contact:

Post by opt_fr_ » Wed May 20, 2009 3:53 pm

Image

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

LuigiBlood
Softech Recruit
Posts: 63
Joined: Sat May 20, 2006 4:08 pm

Post by LuigiBlood » Wed May 20, 2009 3:55 pm

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.
I'm french, so sometimes my english can be wrong.

User avatar
opt_fr_
Softech Recruit
Posts: 64
Joined: Sun May 17, 2009 11:13 pm
Location: Belgium
Contact:

Post by opt_fr_ » Wed May 20, 2009 3:58 pm

I will post the program here but it's not user friendly.
It isn't optimized yet, it's a prototype.

LuigiBlood
Softech Recruit
Posts: 63
Joined: Sat May 20, 2006 4:08 pm

Post by LuigiBlood » Wed May 20, 2009 4:08 pm

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 ^^)
I'm french, so sometimes my english can be wrong.

User avatar
opt_fr_
Softech Recruit
Posts: 64
Joined: Sun May 17, 2009 11:13 pm
Location: Belgium
Contact:

Post by opt_fr_ » Wed May 20, 2009 4:57 pm

[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: )
Last edited by opt_fr_ on Mon Jul 20, 2009 7:37 pm, edited 1 time in total.

LuigiBlood
Softech Recruit
Posts: 63
Joined: Sat May 20, 2006 4:08 pm

Post by LuigiBlood » Wed May 20, 2009 5:56 pm

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 ??).
I'm french, so sometimes my english can be wrong.

Post Reply