[Windows Mobile Software Development] Chainfire:
CFC for VGA and WVGA

!IMPORTANT! Updated 11.11.2009: CFC GUI updated. Support DLLs updated to CFC 0.60!

!IMPORTANT! Updated April 20, 2009: CFC Live Patch discontinued!

I have recompiled the libgles proxy file originally made for QVGA to a version that only handles the CFC compression, and should work on any 'normal' Manila 3D version, like the ones found on the Touch Diamond, Pro and HD.

If you cooks/chefs/whomever implement this, you can reduce TF3D's size footprint by half (7 mb smaller in my test). This also makes a positive performance difference, as the on-the-fly decompression of the images is actually faster than the flashdisk access.

Patching TF3D to be able to use CFC compression also allows theme makers to make faster and smaller themes.

Instructions to modify TF3D VGA/WVGA - for users NEW!:

FOR v2.5 AND NEWER PATCH MANUALLY!

- Get CFC GUI, attached to the first post of this topic.

- Connect your device using ActiveSync

- Use the "Device->Patch Manila on device" feature

Instructions to modify TF3D VGA/WVGA - for chefs:

FOR v2.5 AND NEWER PATCH MANUALLY!

- Get CFC GUI, attached to the first post of this topic.

- Run CFC GUI and select the folder where your Manila package is stored

- Make sure you got a backup of said folder

- Go to Tools -> Patch Manila

The following things will be done to your Manila package:

- All image files will be CFC compressed (lossless, faster)

- All image files will be padded to be a multiple of 512 bytes in size (faster)

- All image files will be set to System/Hidden/Archive file attributes

- Manila.exe will be patched to use libgles_mn.dll

- Manil2.exe will be patched to use libgles_mn.dll (depending on Manila version)

- Mode9.dll will be patched to use libgles_mn.dll

- libgles_mn.dll will be placed in the package

- zlib_mn.dll will be placed in the package

If no errors occur, there is nothing else you need to do, aside from cooking the package :)

Instructions to modify TF3D VGA/WVGA - by hand

Attached is a zip file (cfc-support-dlls) with the two DLLs you need: libgles_mn.dll and zlib_mn.dll . These must be placed in your \Windows folder.

Next, hex edit Manila.exe, Manil2.exe and Mode9.dll to use libgles_mn.dll instead of libgles_cm.dll. Just search for "libgles_cm.dll" in the files and replace it with "libgles_mn.dll". These values may appear multiple times in the file! Make sure to search and replace for both ANSI and UNICODE variants! Your Manila version may not have both Manila and Manil2, or only one of them may contain the "libgles_cm.dll" string. This is normal.

You should also modify HKLM\Software\OEM\MASD\Manila and append _CFC to the version string. This so people can recognize if their installation supports CFC.

This will only add support for CFC to your Manila install, it will not make images and such actually use CFC. But you can now support themes that do use CFC.

Note to people who used an older version of this patch

You don't have to do it again, but the automated tool makes sure everything is done right. If you still have zlib1.dll from the old patch on your device, do not remove it unless you want to break the "Teeter" game.

You can run the automated tool over a package you used the older patch on - it will clean it up.