Hey guys, I've been playing around with 2003SE trying to figure out how to change the bootsplash, and this is what I've found so far.
I executed the following command:
Code:
pmemdump.exe 0x80000000 0x2000000 rom.raw
This should have dumped the entire ROM, as documented here:
http://www.xs4all.nl/~itsme/projects/xda/wince-rom-layout.html
I then opened the file rom.raw using IrfanView with the following options:
Image Width=240, Image height=70000, Header size=0, 16 BPP, NO Vertical flip.
And I was able to see an image that resembled the bootsplash near the top, but it was distorted. However, about a quarter of the way down I see the "Welcome to T-Mobile" logo in 320x240 perfectly.
It looks like the distorted bootsplash image is repeated twice when I open it in this format, so I tried opening the file with a width of 120 pixels, but it was still distorted. I've tried opening the raw file with all of the combinations I can think of, but none show the bootsplash clearly.
Any ideas of how we can determine it's starting byte position and format?
WM2003SE Bootsplash Address and Format Found
The bootsplash for the available WM2003SE rom is stored at 0x800417e0, and is only 76800 bytes long. Extract it from the rom using the following command:
Code:
pmemdump 0x800417e0 76800 bootsplash.raw
Open it as a 320x240 raw file with 8 bits per pixel (grayscale?) no header.
I have attached the bootsplash.raw file below, but had to change extension to .txt for uploading.
I'm unable to write a new bootsplash since pnewbmp doesn't support this offset, and pnewbootloader has other complaints using this offset.
There may be some color information in the 8 bits per pixel.
What we need now:
1.) Someone that knows more about graphic formats to investigate if the bootsplash has color information.
2.) A modified version of the pnewbmp.exe file from http://www.xs4all.nl/~itsme/projects/xda/tools.html that supports the new offset. (Ideally, modify it so it can be used for any offset).
Shawn
Are u sure?
old files had been twice big (153600 Byte)
Have you tried this size?
You shoud be able to run
Code:
pnewbmp -o 0x800417e0 filename
The file you've upladed doesn't look complete.....
Stefan
The T-Mobile ROm you´ve found is added by the kitchen.
Until now it´s not possible to cook a ROM without the splashscreen. So it´s added at the 0x80780000 position.
Has nothing to do with the real splash screen....
Stefan
Fairly Certain
old files had been twice big (153600 Byte)
Click to expand...
Click to collapse
Stefan,
You're absolutely right, it is definitely different than previous bootsplash formats. If I'm right, it's half the size because it uses 8 bits per pixel instead of 16 bits per pixel, as before. I believe that means it must use a standard 256 color table. We just need to know which standardized color table it uses (Windows System?), and find graphics software that will open bitmaps without headers.
Have you tried this size?
Click to expand...
Click to collapse
I've tried dumping the old file size, but it is just garbage after 76800 bytes. Perhaps they switched to this format to save memory.
The T-Mobile ROm you´ve found is added by the kitchen.
Click to expand...
Click to collapse
That's good to know. I thought that was the real bootsplash, and there was some switch in the code for this version of the ROM to point the bootsplash image to a temporary image that we are seeing. Let me illustrate with code:
Code:
Internal_Rom = True;
...
If (Internal_Rom==True)
Bootsplash_start_byte=0x800417e0;
else
Bootsplash_start_byte=0x80780000;
But since that's not the case, we don't need to worry about tracking down that switch.
I've tried using pnewbmp with the offset option, but I'm getting an error reading the bitmap. I've tried appending the original ROM data after my custom bootsplash (when necessary) to create files of sizes 76800, 151672, and 153600, but I still received the error so I don't think it is a problem with the file size, but it may not recognize the format. (pnewbmp appears to be trying to read the size 0x25800=153600, so that file size should have worked if it were a file size issue)
So, here's a theory of how to make a bootsplash for this new ROM format:
1. Create your image in RGB 320x240.
2. Change Image Mode to 8 bits/channel, and Indexed Color using the Palette "System (Windows)" (?).
3. Save your file in RAW format (Uncheck Alpha Channels), 0 Header
Resulting File Size=76800.
Now I just need to test this theory using a program that will allow me to write an arbitrary number of bytes to an arbitrary byte offset in the ROM.
Shawn
It works!
I'm getting ready to sell my Wallaby (replaced with PPC-6700), so I gave my (old) theory a try, and it worked!
I executed the following commands:
Code:
pmemdump.exe 0x80000000 0x417e0 one.raw
pmemdump.exe 0x800543E0 0x1FABC20 three.raw
I opened one.raw, three.raw, my new bootsplash raw image (described above), and an example NK.nbf file in a hex editor (PSPad). I appended the first two lines from NK.nbf to one.raw. They look like this:
PW10B1-ENG-3.16-000-aa9a--------
Click to expand...
Click to collapse
I then appended my new bootsplash image to the end of one.raw, then appended three.raw to the end of one.raw. I then saved this file as NK.nbf and replaced the default NK.nbf for the installer built at LumpiStefan's site.
When I ran the installer, it complained that aa9a wasn't the correct checksum, but it went through anyway, and works fine. The only problem is I can't control colors, since I don't know what color pallet it uses. The closest match is Mac OS. Until that gets figured out, it's best to just use a black & white image.
Update November 11, 2009
CFC and CFC GUI have been updated to 0.60 and 0.60.35 respectively. CFC runtime files have been updated.
Changes:
- Support for new filenames (and categories) used in TF3D v2.5+
- Support for new file formats (read only, "replace" write is always in old format) used in TF3D v2.5+
- Support for new compressed formats that correspond to the new formats mentioned above
- If you are using this with 2.5, please do read the 2.5 specific notes!
- At this time I STRONLY recommend patching Manila files manually instead of using the auto-patching! See the tech thread referenced below.
Update June 5, 2009
CFC and CFC GUI have been updated to 0.55 and 0.55.25 respectively. The CFC runtime files have not been updated.
Changes:
- Better compression ratio (backwards compatible with old runtime)
- UltraHQ en/de-coding support (CFC)
- "Patch Manila on device" function has been improved to work-around the issue of Manila no longer starting that some people have (CFC-GUI)
Update April 20, 2009
CFC GUI v0.50 has been released! LOTS of new features! Also updated CFC runtime (for on the device) to 0.50.
Deployment of CFC 0.50 is needed for UltraHQ background images. "Use Device->Patch Manila on device" to deploy new version to device. Note that CFC Live Patch has been discontinued in favor of this function.
Also, a patch to xboxmod's TF3Dv2-VGA is needed. Can be deployed to device with "TF3Dv2->Deploy xboxmod TF3Dv2-VGA background fix" option. The file in question is also attached to this post ( 2a3d01cc_manila ).
For chefs: see the tech reference thread for updated runtime files or use the "Tools->Patch Manila" function.
Update Feb 26, 2009
CFC and CFC GUI have been updated to 0.46.15. Fixed an issue with PNGs without alpha channel.
Update Jan 15, 2009
CFC Live Patch 0.45.01 has been released. You can run this tool on your phone to make your current Manila installation compatible with CFC compression.
See this post.
---
Really short
CFC GUI is a Manila3D image tool, somewhat like Manila Editor, but better on some fronts.
Related threads
Technical / reference thread
CFC command line version, full history / progress, complete technical documentation of all relevant file formats and how to en/decode them.
DONATE!
I do not need your donations to be able to buy my smokes, beers, pizza's, kebabs or phones - though they certainly help! However, nothing shows appreciation like a donation, and encourages people to continue developing and implementing feature requests. If you are a themer actively taking donations for your work, a donation would even be fair, instead of just nice.
Do not underestimate just how much time and research goes into many of the things posted on XDA. Donate something to someone (not necessarily me) or even XDA itself, don't be a cheapskate. (Yes I donate time, effort and funds myself to various projects, more than I get back!)
Things you should know
- RTFM. It will be a few posts down from here. Failure to RTFM will give you 7 years bad luck.
- The tool is called CFC and supports CFC compression, but you can also "not do" that. It's optional. Do note that not all ROMs and TF3D packages support CFC compression (yet).
- CFC GUI uses version notation of Z.XX.YY, where XX is the CFC-core version shared with the command line CFC program, and YY is the version of the GUI.
History
CFC is the tool I originally built to assist me with some things when I ported TF3D to QVGA. At first, I was severely annoyed with the size of TF3D, which lead me to implement extra lossless compression (as it turns out, Manila images compress very well). You will not be surprised to learn that CFC stands for "Chainfire's Compression" Unexpectedly, but not completely surprisingly, the compression actually made TF3D faster.
I was however not content with this, and thus wanted to scale images down to QVGA size. Not content with Manila Editor's image quality, I figured out how to do this with much better quality using an ATI tool: The Compressonator. This however required a lot of mucking with different texture formats and the conversions between those, which are all things that could be done with the CFC tool. A lot of things were figured out, and the complete reference can be found in the technical/reference counterpart of this thread.
Now, 3 months after all that, myself and D-MAN666 (one of the people originally behind Manila Editor) have finally figured out the complete QTC format, and I decided to create my own encoder/decoder. Both encoding and decoding quality easily beats Manila Editor, and rivals The Compressonator (but a lot less hassle!).
(< 0.60 : 12497 downloads)
TFM - The F*ing Manual, take 5 minutes to read it.
- Last updated for CFC GUI version 0.60.35 on 11.11.2009 -
Window features
The interface is rather simple, so I will not waste too may words on it.
On the left you have a list of the files in the directory you selected, including the resolution and four possible flags: Alpha channel, Padded, Compressed (CFC), RGBA-CFC and BPP (number).
On the top-right you have some boxes in various colors, which allow you to change the image background color, a checkbox that allows you to switch between actual size and 'fit-to-screen', and last but not least, the actual image.
Bottom-right you have some information about the image, and a few buttons. These buttons are also represented under the File menu and should speak for themselves for the most part.
The menu
Items in the File menu (or on the buttons) apply either to the program or the currently selected file.
Items in the Tools menu apply either to all listed files or a Manila package.
Items in the Device menu relate to doing things with Manila on your device.
Items in the TF3Dv2 menu are related only to the new Manila versions from Topaz and newer devices (though available on many older devices now too).
Must-know background info - Headers
If you come from Manila Editor, you might wonder why you never have to select any header info in CFC GUI. This is because the complete QTC image format is now known. The correct headers will be set automatically.
Must-know background info - Alpha channel
There are two different Manila image (QTC) formats, one that has an alpha channel and one that doesn't. Most images have an alpha channel, and those that don't are exactly those images Manila Editor chokes on.
Must-know background info - Padding
Original HTC Manila image files are all padded to make sure they are a multiple of 512 bytes in size. This is because read access is faster if the files are cooked in this way (it makes no difference if not cooked in).
Must-know background info - Compression
CFC GUI allows to use/compress/decompress CFC format compressed image files. These are smaller and usually faster than non-compressed files, however, they are not supported on all ROMs and TF3D packages (yet).
Must-know background info - RGBA
The new CFC 0.50 supports RGBA compressed images. This is very much comparable to PNG, but a different file-format to get Manila to read it and optimize loading the data into the graphics chip. You cannot convert between these and QTC using the "CFC Compress" options. This is by design! Currently the only function making use of this format is the TF3Dv2 background creator, but technically you could use it to create lossless PNG-style images for all Manila content.
Must-know background info - background images
These are generated in a special way to fix up various bugs in Manila background placement. You should not run any other background fixes aside from the xboxmod fix included - and that only if you are using TF3Dv2 on VGA!
Function: Replace with ...
Replace currently selected file with a PNG of your choice.
Function: Save as ...
Save currently selected file to a PNG of your choice.
Function: Pad
Make sure the selected file (or all files) are padded.
Function: Trim
Make sure the selectd file (or all files) are NOT padded.
Function: CFC Compress
Compress the selected file (or all files) to CFC format.
Function: CFC Decompress
Decompress the selected file (or all files) to normal QTC format.
Function: From device
Replaces the current image with the image with the same name from your device.
Function: To device
Saves the image to your device and restarts Manila if needed.
Function: Revert to ROM
Deletes the image from device and restarts Manila if needed - so the image from the ROM will be used. Do not use this function if you installed Manila via a CAB.
Function: Export
Exports all images to PNG format in the folder you select
Function: Fix file attributes
Makes sure all images have the Hidden/System/Archive attributes
Function: Finish up
Asks you a few questions and makes sure all images are optimized and ready. See "When you're done editing ..." below.
Function: Scale VGA -> QVGA
For people working on the QVGA ports. Scales down all images (that are not too small) by half.
Function: Patch Manila
Patches Manila to be able to use CFC compressed images. Also pads the files, sets attributes, and adds required DLLs to the folder. This option is mainly here for cooks. For users who want to make their current Manila on their phone CFC compression compatible, use the CFC Live Patch tool. For both options, see this post in the technical / reference thread. Do not use this function without having read that post! Only for VGA and WVGA Manila's, do NOT use it for QVGA Manila!
I STRONGLY ADVISE YOU TO PATCH MANILA MANUALLY AT THIS TIME. SEE THE TECH THREAD FOR HOW
Function: Device->Manila
Start, stop, or restart Manila on your device.
Function: Device->Import from device
Copies all Manila images on your device to the current working folder.
Function: Device->Export to device
Finds all changes compared to the Manila on your device, and sends these changes to your device. Will restart Manila if needed. (Files are not just copied because you would have two copies of unchanged files - one on internal storage and one in ROM!)
Function: Device->Revert to ROM
Reverts all images files on your device to ROM. Do not use with a CAB-installed Manila version! See Revert to ROM function above for more details.
Function: Device->List changes
Finds all changes compared to the Manila on your device.
Function: Device->Export changes as QTC/CFC
Finds all changes compared to the Manila on your device and saves them to a folder of your choice in the actual format used.
Function: Device->Export changes as PNG
Finds all changes compared to the Manila on your device and saves them to a folder of your choice, converted to PNGs.
Function: Device->Patch Manila on device
Deploys the included version of CFC to your device. Will restart Manila if needed.
I STRONGLY ADVISE YOU TO PATCH MANILA MANUALLY AT THIS TIME. SEE THE TECH THREAD FOR HOW
Function: TF3Dv2->Create background
Creates high quality backgrounds for TF3Dv2. Supported are both WVGA and VGA versions of TF3Dv2, and can create portrait as well as landscape files.
Function: TF3Dv2->Deploy xboxmod TF3Dv2-VGA background fix
Deploys fixed LUA for backgrounds on xboxmod's TF3Dv2-VGA. The patch was given to xboxmod before V1D release but he included the wrong version of the patch by accident.
Function: View->By file name / By Manila name
Switches file list view between file name and internal Manila name.
When you're done editing and going to use the images ...
For best performance and usage, you should always make sure when you're done that the files are all either compressed or uncompressed, padded or trimmed, and have the correct file attributes. You can do this manually through the buttons or the menu, but the "Finish up" function (Ctrl+F) does all this for you.
A note on PNG images
It seems not all PNG images are supported equally. If you are using Photoshop, it is known that "Save for web" option may create PNG files CFC GUI cannot read. Please use normal "Save as ..." to PNG!
How to make Manila compatible with CFC compression
The "Tools -> Patch Manila" option exists to patch a complete Manila package. If you want to patch the Manila currently on your device, use "Device -> Patch Manila on device".
Information about both can be found in this post in the technical / reference thread.
Manila/TF3D v2.5+ specific notes
- Due to how it is cooked into ROMs, you MUST patch manually at this time, or chances are everything will go wrong. You may need to dump the entire ROM for this.
- The new image formats can now be CFC compressed, but you do need the new 0.60 runtime files.
- The OEM packages spread the *_manila files over multiple folders. You will need to open and compress each folder seperately, CFC GUI does not support scanning sub-dirs at the moment.
- While CFC GUI can read and export to PNG all known (and new) formats, if you replace an image it will currently always be converted to ATI_RGB or ATI_RGB_EXPLICIT_ALPHA (auto-detected) formats. The new formats are not currently supported as target, only as source, so to speak.
Changelogs
0.60.35, 11.11.2009
Support for new filenames (and categories) used in TF3D v2.5+
Support for new file formats (read only, "replace" write is always in old format) used in TF3D v2.5+
Support for new compressed formats that correspond to the new formats mentioned above
If you are using this with 2.5, please do read the 2.5 specific notes!
At this time I STRONLY recommend patching Manila files manually instead of using the auto-patching! See the tech thread referenced below.
0.55.25, 05.06.2009
Improved compression ratio (backwards compatible)
UltraHQ en/de-coding support in command line tool (see tech thread)
"Patch Manila on device" function has been fixed to prevent the non-starting Manila issue
0.50.22, 20.04.2009
TF3Dv2->Deploy xboxmod TF3Dv2-VGA background fix
Background images now support full RGBA mode (takes up lots of space!)
Redone list refresh - only the changes files are reloaded now when doing a simple operation - much faster
File list now allows multiple files to be selected to perform "File" and button-press actions on
Files can now be dragged from the file list to explorer to export as QTC
"Device drop box" added. You can drag files from the file list or from explorer to copy them to the device and restart Manila
TF3Dv2->Create background added
Manila is now only restarted if it was running before a device action was performed
Added display by original Manila filename (instead of hashes)
Added File->From device, reloads the current image from device
Added File->To device, exports the current image to device (restarts Manila)
Added File->Revert to ROM, reverts the current image to the ROM image on the device (only) (restarts Manila)
Added Tools->Import from PNGs, to import a folder full of PNGs
Added Device->Import from Device, imports all images from your Manila install on your device
Added Device->Export to Device, exports the images that are different than on your device to the device (restarts Manila)
Added Device->Revert to ROM, reverts all images on the device (only) to the ROM images (restarts Manila)
Added Device->List changes, compares your local set to the device set and lists changes
Added Device->Export changes to QTCs, copies the changes as ^^^ to a folder
Added Device->Export changes to PNGs, copies the changes converted to PNG as ^^^ to a folder
Added movable splitter between file list and image panel
Made file list auto-sizing
0.46.15, 26.02.2009
Fixed decoding issue with PNGs without alpha channel in CFC core
0.45.15, 14.01.2009
Added some more file attribute handling code
Added some file backup/restore in case of failure code
Adjusted screen layout to cope with different DPI settings
Added progress screen for directory scanning on first load
Added progress screen for encoding PNG -> QTC (Replace with ...)
Added "Tools -> Finish up" feature (see manual)
Added "Tools -> Export" feature (see manual)
Added "Tools -> Fix file attributes" feature (see manual)
Form caption now displays current working directory
You can now provide the directory you want to load as a commandline option
Settings are saved to and loaded from the registry, so it remember the current working directory and such.
-- All mine! --
-- Last one --
Thanks for this tool bro I really it
I appreciate it
Woooow very nice, (editing manila as I type)
Guess its time to change my good ol Manila editor
Thank you very much I appreciate.
Greets.
S t u c k !
Thanks for the great application chainfire! Sorry to be the first with the questions, but I try to replace a png in a manila file, but the manila file disappears from the list on the left and the folder from where I opened it. Same when trying to save a png file. What am I doing wrong? I did rtfm.
Btw the buttons on the bottom right appear out of the bottom right border of the app window, i.e. they are almost not visible.
Thanks again!
Phat7 said:
Thanks for the great application chainfire! Sorry to be the first with the questions, but I try to replace a png in a manila file, but the manila file disappears from the list on the left and the folder from where I opened it. Same when trying to save a png file. What am I doing wrong? I did rtfm.
Btw the buttons on the bottom right appear out of the bottom right border of the app window, i.e. they are almost not visible.
Thanks again!
Click to expand...
Click to collapse
I'll look into the disappearing problem tomorrow (nap time now) - perhaps zip up and attach some files you know this happens with? May be an attribute issue or smth. The buttons falling out of the screen probably has to do with a non-default DPI setting on your system. TBH I didn't actually look at that. I'll check it out.
OS version?
Attached a manila file that the problem appears with. I have XP Pro SP2. Stock 2.03 Europe WWE on my Diamond. Will look into the dpi problem.
Thanks!
Phat7 said:
Attached a manila file that the problem appears with. I have XP Pro SP2. Stock 2.03 Europe WWE on my Diamond. Will look into the dpi problem.
Thanks!
Click to expand...
Click to collapse
Image seems to fine, probably an attribute problem. Some things fixed in the next update will hopefully fix that issue. Let me know.
Also changed some DPI related stuff and tested it on XP SP2 in 96 and 120 DPI modes, as well as Vista in 96 and 120 DPI modes, seems to work, so if you keep having the button problem, let me know and provide a screenshot please.
CFC GUI 0.45.15 released!
0.45.15, 14.01.2009
Added some more file attribute handling code
Added some file backup/restore in case of failure code
Adjusted screen layout to cope with different DPI settings
Added progress screen for directory scanning on first load
Added progress screen for encoding PNG -> QTC (Replace with ...)
Added "Tools -> Finish up" feature (see manual)
Added "Tools -> Export" feature (see manual)
Added "Tools -> Fix file attributes" feature (see manual)
Form caption now displays current working directory
You can now provide the directory you want to load as a commandline option
Settings are saved to and loaded from the registry, so it remember the current working directory and such.
Great work
Much thanks to chainfire for this wonderful tool.
Also thanks to dman and sushi for their work on manila editor.
It's so easy to use. Keep up the good work!
DPI and file disappearance fixed. Thanks!
But still can't replace the image in the manila file. I select "Replace with" choose the source png, but the image on the screen stays the same.
Phat7 said:
DPI and file disappearance fixed. Thanks!
But still can't replace the image in the manila file. I select "Replace with" choose the source png, but the image on the screen stays the same.
Click to expand...
Click to collapse
Thats too bad. I have no idea what the issue is with it. I've modified the files on my system, including the one you posted, without issue. I tried manipulating file attributes, and that still works. The only thing I can imagine is that either CFC GUI or you as user don't have the required rights to change the attributes of the file (or delete / overwrite it). Either that or I made a serious error somewhere that didn't show up in my testing ... which was fairly rigorous for this specific issue.
One other last thought... perhaps the reading of the PNG goes wrong somehow, that could also be a reason the file isn't replaced. Try opening the PNG in mspaint or photoshop and saving it to a different name, then replacing the manila file with that. However, I have used the PNG library I'm using for CFC GUI in a lot of projects and so far it has never failed on me...
(perhaps post PNG? There's nothing abnormal about the manila file you attached earlier ...)
If anyone else is seeing this issue please speak up!
Problem solved!
Just did an extensive work on png's in Photoshop and found out that the problem was with png's saved using "Save for web". Normal "Save as..." png's work fine. "Save for web" png's don't.
Thanks a lot again, chainfire. Awesome stuff!
WOW can't wait to see this in action. I used a theme already compressed with this and it was very fast a bit buggy but very fast.
Phat7 said:
Problem solved!
Just did an extensive work on png's in Photoshop and found out that the problem was with png's saved using "Save for web". Normal "Save as..." png's work fine. "Save for web" png's don't.
Thanks a lot again, chainfire. Awesome stuff!
Click to expand...
Click to collapse
I do not use Photoshop much - I'm a code guy, not a gfx guy, my biz partner always does the graphics for my stuff - perhaps "Save for web" uses artihmic coding, which CFC GUI does not support. I'd be surprised if it does, but it's a possibility. Good to know, though. Will post that info in the first few posts.
Image stretched
I resized a 480x800 image to 512x512, downloaded a 4a087e41_manila with a 512x512 image, and replaced the image. I set the 480x800 image as background in the home tab, but the image on the other tabs looks stretched compared to the home tab.
I noticed that the original image in the 4a087e41_manila file didn't filll up the whole canvas, looked like it was 462x512.
I even tried to resize the image to 462x512, but it's still stretched.
Any idea how to make the images on the home tab and the other tabs looks like?