• If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • Want to organize your cloud files? Sign up for a free webinar to see how Dokkio (a new product from PBworks) can help you find, organize, and collaborate on your Drive, Gmail, Dropbox, and Slack files: Weds, May 27 at 2PM Eastern / 11AM Pacific


Page history last edited by Vasile 11 years ago


Creating a New Skin

The graphics used by the default GUI is found in /, /img and /img/lib. They all consist of JPEG and PNG images. JPEG images are used as backdrops and are rendered using the image's true color palette. PNG images are used as overlays and they are rendered using a 8-bit indexed palette contained in dvdplayer.bin (at offset 0xF8A60 in the 1.4.4 firmware).


The palette in dvdplayer does contain a 4-bit alpha channel but dvdplayer.bin is not honoring PNG alpha transparency (the bKGD chunk) nor PNG indexed transparency (the tRNS chunk). Palette index 254 (magenta #FF00FF in the original firmware) is used instead as matte and will be rendered transparent (with exceptions, see note after palette usage table below).


Most of the default PNG images don’t contain any palette information (PLTE chunk) so it isn’t really needed by MG-35 for rendering the GUI (since it uses a global palette contained within dvdplayer.bin).


Making new JPEG graphics

Make any graphics you like in the same size as the original. Save it as small as possible to leave as much space as possible for other applications. Use for example Photoshop’s “Save For Web” with preset “JPEG High”.


Making new PNG graphics

This is not as easy and straightforward as JPEG. We need to keep file size to a minimum, use a global 8-bit indexed palette and at the same time taking in account the colors needed for all the graphical elements drawn in runtime (text and frames).


This is one way to do it but there are off course others…



Step 1. Make all you graphics in the same size as the original using for example Photoshop. Use actions to batch “Save For Web” with preset “PNG-8 128 Dithered” (you might want to lower Dither to 50%) in PNG format.


Step 2. Use a program like PalMerge to build a new global palette based on all your PNG-files.


Step 3. Edit your new global palette so that preferred colors for runtime drawn graphics are found at the right indexes, refer to table below:

Description Palette Index Original Color
Selected browser text 0 #FFFFFF
Status value text 0 #FFFFFF
Setup selected text 0 #FFFFFF
Info value text 0 #FFFFFF
Time search header text 0 #FFFFFF
Subtitles fill 1 #FEFEFE
Setup highlighted text 115 #3CC5D7
OSD background rect. 135 #124850
Setup rounded rect. 140 #2E2E2E
Directory browser text 153 #4B4B4B
Highlighted browser text 234** #FBEA77
Info label text 234* #FBEA77
Volume/brightness/contrast bar 247 #00FF00
Time search input text 248 #00D500
Subtitles outline 253 #000000
Transparent matte 254 #FF00FF
Backdrop text 255 #000000
File browser text 255 #000000
Status description text 255 #000000
Setup description text 255 #000000
Time search text 255 #000000
Firmware upgrade text 255 #000000



*  Index 234 is used by some binary in a different way than by dvdplayer.bin, it doesn’t use index 254 for transparency, overlay images popup.png, popup_s.png and arrow_p.png all uses index 234 as it's background color and some binary is hard coded to erase the rect made by arrow_p.png with index 234! It is lame and makes it more or less impossible to use any other color than index 234 as the background color for popup.png, popup_s.png and arrow_p.png!

** Only for Freecom (on browse while playing music)? This one in otherwize index 255.


Step 4. Save your new global palette in Photoshop .ACT format so that it can be injected in dvdplayer.bin.


Step 5. Use actions to batch assign the new global palette to all your PNG-files (one way in Photoshop is to alter “Image” “Mode” to “RGB Color” and then alter it back to “Indexed Color” and there assign the new global palette using “Dither” “Diffusion” around 50%).


Step 6. Reduce file size of your PNG-files using a program like Pngcrush (using the command line argument “-remove alla” to remove all known ancillary chunks except for tRNS).



Inject the new pallette into dvdplayer.bin


One of the oddities of the MG35 firmware is that it uses a global palette which is hardcoded into dvdplayer.bin. Since your new graphics probably use a totally different palette than the original one, you'll need to patch the dvdplayer.bin. Fortunately, some wise people created tools to help you in this endeavour.



On the Windows platform, you can apply the palette to dvdplayer.bin using MgPalSwap.exe with the following command:


MgPalSwap.exe -p myNewPalette.act -o 0xF8A60


This will create a file named 'output.bin' containing your custom palette, which you can use to replace the stock dvdplayer.bin. You can use MgPalSwap.exe -h for details about the options. NOTE: MgPalSwap requires the .NET platform to be installed.




On the Linux platform, you can use palfixup.py to replace the palette. For example:


palfixup.py -s dvdplayer.bin -p stockpal.act -c new_palette.act -o patched_dvdplayer.bin


This will search for the stock palette stockpal.act within dvdplayer.bin, and create a patched dvdplayer containing your new custom palette to patched_dvdplayer.bin. NOTE: palfixup requires the python scripting language to be installed.


Packing your new Firmware

Now that you have all the pieces needed, you should put them together and create the new .upgrade file.



Example: Royal Blue Skin


Go here for screenshots of the Royal Blue skin in action.



This page has been viewed times.


Comments (0)

You don't have permission to comment on this page.