This has been done for a few cameras on a custom basis by philmoz. IIRC, he was able to remap the pointers to the Canon palettes to an area in RAM where he created a custom pallette.
Not quite.
On the cameras I did there are multiple palette definitions in the firmware (in some cases up to 16 different palettes).
When the camera changes mode the appropriate firmware data is copied to a RAM buffer, again there are multiple of these.
My 'hack' overwrites the active RAM buffer with CHDK color values (32 bit ARGB AYUV) in fixed locations; but it is only done for some palette modes - record, playback etc. In other modes the CHDK colors will be whatever the firmware has set them to.
This is done at the start of the spytask loop, every 20ms or so.
To use my hack you have to:
- find the RAM buffer address for the palette data and the active palette
- find the mode numbers for the active palette for the modes you want to overwrite
- find a block of 13 colors that are not used in the Canon firmware for each mode
For simplicity my solution assumes you can find a common block of colors to overwrite.
Phil.
@philmoz : Old post but new problem so I think is the best place to ask this.
I've been working on the screen colors for sx50hs port. The colors specified in active_palette_buffer() that every other camera implementing this function uses turn out to be semi-transparent on the sx50hs. While some might find this attractive, it make things like CHDK menus hard to read.
So my question is how you arrived at the hex color values you used in that function? I tried adding debugs to "peek" color values from the unmodified palette buffers and that works. But the sx50 does not have a lot of nice bright colors (other than standard Canon orange,white and black) so random peeks are not going to get me nice reds, blues or greens.
Also, for the record, the valid active_palette_buffer values for the sx50hs are 0,5,6 for shooting, playback,menu respectively.