Rayman Origin Wii (*.ckd - dds Texture)

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
shadow_lonely
Posts: 216
Joined: Mon Oct 06, 2014 3:30 am

Rayman Origin Wii (*.ckd - dds Texture)

Post by shadow_lonely »

Could you help me convert .ckd to dds and back? I think it's Little Endian
Image
Here is example file:
font02_0.tga.rar

Thanks for any help!
shadow_lonely
Posts: 216
Joined: Mon Oct 06, 2014 3:30 am

Re: Rayman Origin Wii (*.ckd - dds Texture)

Post by shadow_lonely »

Anyone! Can help? :cry:
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Rayman Origin Wii (*.ckd - dds Texture)

Post by aluigi »

I think it's a bit more complex than that.

quickbms has a cool features that allows to swap the endianess of all the fields that have been read from the file so I did the following test, I made a BACKUP copy of the file and then used this script with the -E -w options of quickbms (quickbms -E -w script.bms font02_0.tga.ckd):

Code: Select all

get DDS_SIGN long
  DWORD           dwSize;
  DWORD           dwFlags;
  DWORD           dwHeight;
  DWORD           dwWidth;
  DWORD           dwPitchOrLinearSize;
  DWORD           dwDepth;
  DWORD           dwMipMapCount;
  DWORD           dwReserved1[11];

  #DDS_PIXELFORMAT ddspf;
#struct DDS_PIXELFORMAT {
  DWORD dwSize;
  DWORD dwFlags;
  DWORD dwFourCC;
  DWORD dwRGBBitCount;
  DWORD dwRBitMask;
  DWORD dwGBitMask;
  DWORD dwBBitMask;
  DWORD dwABitMask;
#};

  DWORD           dwCaps;
  DWORD           dwCaps2;
  DWORD           dwCaps3;
  DWORD           dwCaps4;
  DWORD           dwReserved2;

get MAX_SIZE asize
savepos TMP
xmath NUM "(MAX_SIZE - TMP) / 4"
for i = 0 < NUM
    get DUMMY long
next i

Then I renamed font02_0.tga.ckd to font02_0.dds and opened it but the output image doesn't have sense.
I tried also to comment the last part (from get MAX_SIZE) but it's still not clear.

Hope it's a starting point, at least.
shadow_lonely
Posts: 216
Joined: Mon Oct 06, 2014 3:30 am

Re: Rayman Origin Wii (*.ckd - dds Texture)

Post by shadow_lonely »

aluigi wrote:I think it's a bit more complex than that.

quickbms has a cool features that allows to swap the endianess of all the fields that have been read from the file so I did the following test, I made a BACKUP copy of the file and then used this script with the -E -w options of quickbms (quickbms -E -w script.bms font02_0.tga.ckd):

Code: Select all

get DDS_SIGN long
  DWORD           dwSize;
  DWORD           dwFlags;
  DWORD           dwHeight;
  DWORD           dwWidth;
  DWORD           dwPitchOrLinearSize;
  DWORD           dwDepth;
  DWORD           dwMipMapCount;
  DWORD           dwReserved1[11];

  #DDS_PIXELFORMAT ddspf;
#struct DDS_PIXELFORMAT {
  DWORD dwSize;
  DWORD dwFlags;
  DWORD dwFourCC;
  DWORD dwRGBBitCount;
  DWORD dwRBitMask;
  DWORD dwGBitMask;
  DWORD dwBBitMask;
  DWORD dwABitMask;
#};

  DWORD           dwCaps;
  DWORD           dwCaps2;
  DWORD           dwCaps3;
  DWORD           dwCaps4;
  DWORD           dwReserved2;

get MAX_SIZE asize
savepos TMP
xmath NUM "(MAX_SIZE - TMP) / 4"
for i = 0 < NUM
    get DUMMY long
next i

Then I renamed font02_0.tga.ckd to font02_0.dds and opened it but the output image doesn't have sense.
I tried also to comment the last part (from get MAX_SIZE) but it's still not clear.

Hope it's a starting point, at least.


Thanks! Hope it's a starting point! :)
shadow_lonely
Posts: 216
Joined: Mon Oct 06, 2014 3:30 am

Re: Rayman Origin Wii (*.ckd - dds Texture)

Post by shadow_lonely »

Could you swap the endianess from normal texture (DXT3/DXT5 with alpha)?