New firmware feature guide in the wiki - General Discussion and Assistance - CHDK Forum  

New firmware feature guide in the wiki

  • 24 Replies
  • 11683 Views
*

Offline fudgey

  • *****
  • 1705
  • a570is
New firmware feature guide in the wiki
« on: 01 / August / 2008, 07:02:18 »
Advertisements
Hi, I wrote a small guide for finding and adding stuff from the firmware to CHDK and uBASIC. It would be great if people who actually know something about these things would review it . :D

http://chdk.wikia.com/wiki/Adding_Firmware_Features


*

Offline fe50

  • ******
  • 3134
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: New firmware feature guide in the wiki
« Reply #1 on: 01 / August / 2008, 07:28:53 »
GREAT  (+) !!!

*Edit: Added link to "For Developers" in the wikia, also added link to the stubs.sh-script to "Category:GPL"
« Last Edit: 01 / August / 2008, 08:29:51 by fe50 »

*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: New firmware feature guide in the wiki
« Reply #2 on: 01 / August / 2008, 10:58:50 »
excellent.

edit: wow, so you finally found the evcompensation switch. if i call this from my "fast ev switch", lcd will adjust brightness, so i dont have to either be in the menu (ev setting) or use canon live histogram - right?
so can i integrate it? will you help with the adresses? :D
« Last Edit: 01 / August / 2008, 11:40:45 by PhyrePhoX »

*

Offline ewavr

  • ****
  • 1057
  • A710IS
Re: New firmware feature guide in the wiki
« Reply #3 on: 01 / August / 2008, 17:03:22 »
edit: wow, so you finally found the evcompensation switch. if i call this from my "fast ev switch", lcd will adjust brightness, so i dont have to either be in the menu (ev setting) or use canon live histogram - right?
so can i integrate it? will you help with the adresses? :D

Hmm... For A710, EnterToCompensationEVF == RectifyExposureWithMeasure (byte-to-byte, except assertion line number ;)). I tried second function to adjust brightness in video. Sometimes it works, but:
- it locks exposure,
- it must be called at least once before video recording started, otherwise by second call (while video is recorded) it crashes camera,
- sometimes it crashes camera in video even if previous condition is satisfied,
- some other strange things  :)
So, I removed RectifyExposureWithMeasure from my personal build.


*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: New firmware feature guide in the wiki
« Reply #4 on: 01 / August / 2008, 17:28:54 »
i wonder what other things you have (or did have in that case :D) in your private build. care to tell us? seems like you found out lotsa stuff :)
anyhow, so you removed it even though it was helpful (well, not for video though)?
it is quiete annoying on the cameras to enter ev menu, adjust ev, see the changed brightness, exit canon menu, see the "old" auto-brightness, only to see the "new" brightness on half-press again ;)
so using the fast-ev plus this EnterToCompensationEVF function should work, no?

by the way, why do you think they included two functions doing exactly the same?

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: New firmware feature guide in the wiki
« Reply #5 on: 01 / August / 2008, 17:43:25 »
edit: wow, so you finally found the evcompensation switch. if i call this from my "fast ev switch", lcd will adjust brightness, so i dont have to either be in the menu (ev setting) or use canon live histogram - right?
so can i integrate it? will you help with the adresses? :D

I think I've forgotten what the fast ev switch is? Anyway, I haven't tested it much yet. I just found it, made a very quick test  and wrote the tutorial. I haven't actually tried doing anything useful with it yet. Haven't crashed the camera with it either. :)

I don't quite have all the disassemblies ready for porting yet, but once Chr updates his wonderful perl script, I think it'll be easier...

Hmm... For A710, EnterToCompensationEVF == RectifyExposureWithMeasure (byte-to-byte, except assertion line number ;)). I tried second function to adjust brightness in video. Sometimes it works, but:
- it locks exposure,
- it must be called at least once before video recording started, otherwise by second call (while video is recorded) it crashes camera,
- sometimes it crashes camera in video even if previous condition is satisfied,
- some other strange things  :)
So, I removed RectifyExposureWithMeasure from my personal build.

Pretty interesting. RectifyExposureWithMeasure is very similar to EnterToCompensationEVF on a570is as well, but not identical. After the fourth bl (to ffc0bc94), they load different values to r1.

When I tried it (EnterToC... and ExitFromC... that is), it seemed to work just like pressing the ev compensation button without calling the ev osd, which alsomeans it only did anything in modes where ev compensation is available (not M or video).

But now that you mention your video experiments, I tried it too. Looks like it indeed successfully does lock exposure in video record (when called before pressing rec in video mode, and also during video record). That return function undoes this. No lockups experienced so far, even when calling the function (from uBASIC) during record for the first time after camera power-on.

But anyway, the intended use I had for this function was not in video mode (before your post I thought it didn't do anything in video mode) but for P/Av/Tv/SCN modes, ie ones with user accessible Ev compensation. If found unstable in video mode, the CHDK function could check the modemap (one more reason to check those) and only call it when in a safe mode.

*

Offline ewavr

  • ****
  • 1057
  • A710IS
Re: New firmware feature guide in the wiki
« Reply #6 on: 02 / August / 2008, 07:48:10 »
RectifyExposureWithMeasure is very similar to EnterToCompensationEVF on a570is as well, but not identical. After the fourth bl (to ffc0bc94), they load different values to r1.
ffc0bc94 = GetPropertyCase

Value in R1 is only assertion line number for DebugAssert. So, even for A570 EnterToCompensationEVF is equal to RectifyExposureWithMeasure.


*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: New firmware feature guide in the wiki
« Reply #7 on: 03 / August / 2008, 13:43:03 »
fudgey, may i ask how you found the adress of
Quote
NHSTUB(EnterToCompensationEVF, 0xFFEA4F84)
NHSTUB(ExitFromCompensationEVF, 0xFFEA5008)

i'm trying to do the same for s3is, but somehow i fail. in your tutorial you pop out the adress of EnterToCompensationEVF out of the blue, it is mentioned only once (in the NHSTUB declaring).
can you please alaborate on that? thanks in advance


*

Offline ewavr

  • ****
  • 1057
  • A710IS
Re: New firmware feature guide in the wiki
« Reply #8 on: 03 / August / 2008, 20:15:41 »
Well, FixAEWithCompensation(short* ev_comp) is better for A710 than RectifyExposureWithMeasure() in video mode, no crashes. So, I will work with it for changing brightness in video.

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: New firmware feature guide in the wiki
« Reply #9 on: 05 / August / 2008, 05:53:57 »
fudgey, may i ask how you found the adress of
Quote
NHSTUB(EnterToCompensationEVF, 0xFFEA4F84)
NHSTUB(ExitFromCompensationEVF, 0xFFEA5008)

i'm trying to do the same for s3is, but somehow i fail. in your tutorial you pop out the adress of EnterToCompensationEVF out of the blue, it is mentioned only once (in the NHSTUB declaring).
can you please alaborate on that? thanks in advance

Hmm... well added a few more words to that part when adding syntax hilighting, but it is and was the asm disassembly + the comment below that's supposed to be sort of enough.

 

Related Topics