Neat information box in the middle of the screen. - how to ? - page 2 - Script Writing - CHDK Forum

Neat information box in the middle of the screen. - how to ?

  • 13 Replies
  • 6912 Views
*

Offline srsa_4c

  • ******
  • 4451
Re: Neat information box in the middle of the screen. - how to ?
« Reply #10 on: 30 / January / 2014, 11:18:07 »
Advertisements
print(active_palette_buffer) gives nil , in both cases.  - something's wrong ?
'active_palette_buffer' is a firmware variable, you can find its address here: https://www.assembla.com/code/chdk/subversion/nodes/3344/trunk/platform/s110/sub/102b/stubs_entry.S#ln55 . If the camera in question is not the s110, locate stubs_entry.S for it by navigating from that previous assembla link.
You can use the peek() Lua command to read its value, you can print that (do it in both playback and record mode).
print(peek(0xa9fc))
You may want to compare the palettes in LCD and in video out mode (CHDK settings -> Color settings -> Draw palette), and make screenshots from them, so that we have an idea about the possibly unoccupied palette entries without spending time to guess them.

Re: Neat information box in the middle of the screen. - how to ?
« Reply #11 on: 30 / January / 2014, 11:36:30 »
ok, there are differences between at least 2 rows of the palettes. the missing colors look "right".
Should I stick to the colors that are common in both palettes ? - or is there an option to assign RGB values (I could not find it, so I doubt)

*

Offline srsa_4c

  • ******
  • 4451
Re: Neat information box in the middle of the screen. - how to ?
« Reply #12 on: 30 / January / 2014, 12:05:23 »
ok, there are differences between at least 2 rows of the palettes. the missing colors look "right".
Should I stick to the colors that are common in both palettes ?
If you don't help us then the answer is yes ;)
Quote
is there an option to assign RGB values (I could not find it, so I doubt)
Newer (DIGIC4 or better processor, from ~2009 on) cameras have a 256 color palette for the bitmap overlay. Since the Canon firmware rewrites the palette from time to time, the only possibility for including some custom colors is from CHDK code (it would be hard and suboptimal to do from a script). The CHDK custom colors are placed in one of the gaps (if any) of selected Canon palettes. The custom colors are hardcoded.

Re: Neat information box in the middle of the screen. - how to ?
« Reply #13 on: 30 / January / 2014, 17:18:16 »
thanks for the explanation.
After finding the right colors, everything works great - thank you all.

 

Related Topics


SimplePortal © 2008-2014, SimplePortal