Page 3 of 4

Posted: Wed Jul 22, 2009 10:14 pm
by fincs
Hi,
Until recently I was a guest visitor to this forum because I found the CD-i through YouTube Poop.
Then I read the last message of this thread and I began searching for the Zelda palette.
And guess what, I found it.
(EDIT: Look at the following posts to get it)

Posted: Thu Jul 23, 2009 8:40 am
by LuigiBlood
Where did you found it ?!

Posted: Thu Jul 23, 2009 9:23 am
by fincs
I found it in a special format buried in the ROM: (EDIT: see following post)

Posted: Thu Jul 23, 2009 9:35 am
by LuigiBlood
Can i have the offset to it ?

Also, i'm pretty sure that the pallette of Link Faces of Evil is the same as you found on WoG.

EDIT: I tested the pallette... There's something wrong on it...

Posted: Thu Jul 23, 2009 10:56 am
by opt_fr_
I 've compared it with my pallet I was building and it is nearly its clone !

I will test it with the zelda WoG image data, to confirm your nice find :)

Edit : can be found @ 0x6339D of zdata.rtf for WoG.

Posted: Thu Jul 23, 2009 12:07 pm
by opt_fr_
thanx, there are also other pallets in that file.

Posted: Thu Jul 23, 2009 4:47 pm
by fincs
Ok, it seems the cutscenes in FoE and WoG share the same palette because I extracted the same data from both games.
Also, concerning LuigiBlood/KiiroBomber's Morshu video in HD, the colors that are right are exactly the same as the king's so if one applies this palette to the Morshu cutscenes the right colors will come up (the gray and green colors were placeholders right?).

EDIT: Figured out the format. The quote below is just for archiving purposes.
I made a mistake with the format, the color number is 1-based and not 0-based.
Additionally there's a part where it jumps from the color BF to C3 to 80 so there might be two palettes in one...
The biggest number in the color number column is 0xBF, that means, color #63.
I figured out the format for the palettes. The earlier posts are wrong.
Each palette consists of a set of entries which are in this format ([] once again represents a byte):
[description] [data1] [data2] [data3]

A palette begins with an entry with description 0xC3 and unknown data bytes (EDIT: palette bank), then 64 entries come in this format:
[color number (0 based) + 128] [Red] [Green] [Blue]
The color number ranges from 0x80 to 0xBF meaning there are only 64 colors per palette.

There are several 64-color palettes (3 I think) stored on that region of the file and I decoded them.
Link: http://www.quickfilepost.com/download.d ... 83c2357ad4
EDIT 2: I screwed up the conversion process. Look at my following post.

The following part contains misleading information kept for archiving purposes:
Summary:
- The first palette is the one that we were looking for.
- The second palette appears to be an alternate palette used for something.
- The third palette is kinda empty, it's only got a few colors at the end.

Posted: Fri Jul 24, 2009 12:01 am
by cdifan
What you are describing looks very much like the in-memory representation of palettes needed by the video hardware.

You can look up the formats in the hardware specs of the VDSC chip on the ICDIA site; basically:
- The hardware has a 256 color palette
- In the usual case, 128 entries are available from each video plane
- The palette is divided into 4 "banks"
- Each bank has 64 entries

So you get a "select color bank" instruction followed by 64 "set color" instructions; the latter indeed use the range 80 - BF.

Posted: Fri Jul 24, 2009 4:16 pm
by fincs
I made a mistake during the conversion process of the 3 palettes (stripping out the last color of each palette).
I read the document about the CD-i VDSC chip and finally made some sort of "mini-emulator" to decode the palettes.
So here it is, the final version of the animation palette:

Code: Select all

The famous Zelda CD-i (FoE and WoG) palette for animations:
0: 0xffffff
1: 0x101010
2: 0xe0e040
3: 0xdfac10
4: 0xe0861c
5: 0xdb7512
6: 0xa45010
7: 0x944410
8: 0xe04711
9: 0xe01412
10: 0xc81313
11: 0xb01212
12: 0x931312
13: 0x1414da
14: 0x113be0
15: 0x175ce0
16: 0x117fe0
17: 0x119fdf
18: 0x11bae0
19: 0x126018
20: 0x117814
21: 0x129410
22: 0x11a813
23: 0x12c810
24: 0x88349c
25: 0x9245a6
26: 0x9d45d8
27: 0xab61e0
28: 0xb27de0
29: 0xbb94e0
30: 0xb7a9e0
31: 0xb1bce0
32: 0x401d1d
33: 0x1ec61a
34: 0x10ac2c
35: 0x0c8020
36: 0x126018
37: 0x164411
38: 0x163911
39: 0x11807e
40: 0x11a9a3
41: 0x11c7b5
42: 0x11dfc8
43: 0x74e0e0
44: 0x10e0e0
45: 0x10a8cd
46: 0x1111b5
47: 0x103911
48: 0x382a11
49: 0x4c2f13
50: 0x603712
51: 0x4f4e13
52: 0x5d4d11
53: 0x684e13
54: 0x785420
55: 0x806628
56: 0x977058
57: 0xa08858
58: 0xa89068
59: 0xb09874
60: 0xb9a9a4
61: 0x809ee0
62: 0x607ee0
63: 0x195ce0
64: 0x771e14
65: 0x8e1010
66: 0xaf1010
67: 0xc81110
68: 0xde1111
69: 0xe02c18
70: 0xed4644
71: 0xe06142
72: 0xe07668
73: 0xe08c99
74: 0x146714
75: 0x118413
76: 0x10a812
77: 0x11c612
78: 0x11d610
79: 0x10e010
80: 0xe06b10
81: 0x9c6c10
82: 0xa27913
83: 0xb68e21
84: 0xc8a210
85: 0xdeb211
86: 0xd4c710
87: 0xe0d910
88: 0x451010
89: 0x511211
90: 0x661512
91: 0x7a1010
92: 0x881410
93: 0x9b1a10
94: 0x123710
95: 0x101078
96: 0x123710
97: 0x101078
98: 0xe0a88d
99: 0x63141b
100: 0x811448
101: 0xa2104f
102: 0xc31066
103: 0xdc1096
104: 0xe032c0
105: 0xe06bae
106: 0xe08ad1
107: 0xe0a6e0
108: 0xe0b6e0
109: 0xe0cce0
110: 0x4ca314
111: 0x648010
112: 0x6e6211
113: 0x6e4610
114: 0x855c12
115: 0x947312
116: 0xa58c11
117: 0xaca712
118: 0xb4b66a
119: 0xb4c56c
120: 0x101010
121: 0x303030
122: 0x585858
123: 0x808080
124: 0xa8a8a8
125: 0xc8c8c8
126: 0xe0e0e0
127: 0xe00000

Posted: Thu Sep 17, 2009 11:39 am
by LuigiBlood
Thanks to fincs and opt_fr_ to make the rips possible :

Link : The Faces of Evil goes in HD and in all languages (English, French, German, Dutch) :
http://www.youtube.com/view_play_list?p ... F734DF3875

Cartoon Jukebox

Posted: Thu Apr 21, 2011 6:15 pm
by opt_fr_
Hi all,

After Hotel Mario & Zelda, I've partially extracted a cartoon of Philips Sidewalk Studio's Cartoon Jukebox, for fun. If you feel intersted in, good watching!
Wheels on the bus
http://www.youtube.com/watch?v=EGcvgwKERtA
Row, row, row your boat
http://www.youtube.com/watch?v=6QviQOMgOxE
Note : Current missing colors were maybe those alterable in the original game

Posted: Sat Mar 24, 2012 8:34 pm
by Shikotei
I need some help with decoding images.
Thus far, the tool Opt_fr once made has helped me to get a lot of background images from The Apprentice. (thanks for that btw)
But I need to find a way to decode the sprites themselves. They are coded differently and remain a mystery to me.

Knowing that there are only TWO animated sprites hidden in the overworld map (where you get to see the 5 towers and the well with a waving flag), I tried out different methods but ended up -suspecting- that they are a combination of a CLUT and somehow something with coordinates...

The data file: http://www.shikotei.com/tmp/ImageData.data
Palette file one: http://www.shikotei.com/tmp/ImagePalette.palette
Palette file two: http://www.shikotei.com/tmp/ImagePalette2.palette

I've placed the image data and the two palettes in the map file on my website and ask the people here to take a look at them and maybe find out how to decode these sprites..

--edit--
corrected the .cim with .com, but you probably noticed that ^^'

--edit--
I just realized something: The ImageData file might actually NOT contain sprites (maybe the flag), but could be compiled code to show the sprites and animate the flag.
Therefor, I've added a second set of files (links are below) that MUST contain sprites (maybe not animated, but definitely encoded sprites).
The sprites I expect to be present in this file are the alphabet characters and a set of extra characters (these in total: ABCDEFGHIJKLMNOPQRSTUVWXYZ?!-+#$% )

links:

The data file: http://www.shikotei.com/tmp/ImageData_hiScores.data
Palette file one: http://www.shikotei.com/tmp/ImagePalett ... es.palette
Palette file two: http://www.shikotei.com/tmp/ImagePalett ... es.palette

Posted: Fri May 18, 2012 9:01 pm
by LuigiBlood
Image

Re: Decoding cdi image files

Posted: Tue Apr 26, 2016 7:29 pm
by joesteve1914
Does anyone happen to have opt_fr_'s tool still? The link on his website is down.

Re: Decoding cdi image files

Posted: Wed Apr 27, 2016 10:04 pm
by joesteve1914
I managed to contact opt_fr_, who very kindly provided me with the tools. I'll post them here on Google Drive so they stay available.
I also included the instructions that opt_fr_ sent me in a readme file (if you want this removed let me know since it was from a PM)

https://drive.google.com/file/d/0Bzi52y ... sp=sharing