Executing Event Procedures by name - page 2 - General Discussion and Assistance - CHDK Forum supplierdeeply

Executing Event Procedures by name

  • 43 Replies
  • 19260 Views
*

Offline RaduP

  • *****
  • 908
Re: Executing Event Procedures by name
« Reply #10 on: 02 / November / 2009, 21:10:27 »
Advertisements
I gave it a try today:

Code: [Select]
ret=_ExecuteEventProcedure("RegisterProductTestEvent");
if(ret==-1)blink_led(1);
ret=_ExecuteEventProcedure("PT_PlaySound",0x2001);
if(ret==-1)blink_led(1);

This code should NOT crash the camera, right?

*

Offline reyalp

  • ******
  • 13444
Re: Executing Event Procedures by name
« Reply #11 on: 02 / November / 2009, 21:18:37 »
In some newer cameras the actual "PT_Playsound" eventproc takes a pointer to the value, not the actual value. Other than that, it shouldn't crash. (CHDK PT_Playsound on these cameras actually points at a later function that takes the numeric value)
Don't forget what the H stands for.

*

Offline RaduP

  • *****
  • 908
Re: Executing Event Procedures by name
« Reply #12 on: 02 / November / 2009, 21:25:27 »
Yes, that's the case of my camera as well :/
I will try again with some other function.
Meanwhile, I find the ExportToEventProcedure() function very useful to name the functions in my dump. It helps a lot to know the function names :)

*

Offline reyalp

  • ******
  • 13444
Re: Executing Event Procedures by name
« Reply #13 on: 02 / November / 2009, 21:32:09 »
Yes, that's the case of my camera as well :/
I will try again with some other function.
Meanwhile, I find the ExportToEventProcedure() function very useful to name the functions in my dump. It helps a lot to know the function names :)
The IDC scripts linked at http://chdk.wikia.com/wiki/Loading_dump_to_IDA will do this automatically for many of them. You can try testevp.lua attached above, if you use the patch in the same post.
Don't forget what the H stands for.


*

Offline RaduP

  • *****
  • 908
Re: Executing Event Procedures by name
« Reply #14 on: 02 / November / 2009, 22:23:46 »
Well, I tried it with a made up function name, and it crashed instead of returning -1..

*

Offline RaduP

  • *****
  • 908
Re: Executing Event Procedures by name
« Reply #15 on: 02 / November / 2009, 22:38:42 »
It seems that if I manually register the function it works...

*

Offline reyalp

  • ******
  • 13444
Re: Executing Event Procedures by name
« Reply #16 on: 22 / December / 2009, 21:44:15 »
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 13444
Re: Executing Event Procedures by name
« Reply #17 on: 26 / December / 2009, 04:14:22 »
Note, you really CAN kill your camera with these. Don't play with the "factory mode" stuff unless you are very sure what you are doing.

Ask me how I know  >:(
Don't forget what the H stands for.


*

Offline fe50

  • ******
  • 3134
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: Executing Event Procedures by name
« Reply #18 on: 26 / December / 2009, 05:07:22 »
Note, you really CAN kill your camera with these. Don't play with the "factory mode" stuff unless you are very sure what you are doing.
Ask me how I know  >:(

OMG - you killed your loved A540  :o ?

*

Offline reyalp

  • ******
  • 13444
Re: Executing Event Procedures by name
« Reply #19 on: 26 / December / 2009, 05:26:07 »
Well, it's a nice paperweight with a yellow LED.

The rescue loader works edit normal diskboot loader I guess, so I can load a diskboot, but calling writesdcard like udumper doesn't do anything. Trying to figure out what's left of the ROM without blinking it... Maybe it just cleared the signature.

Thank you Santa, but could I get the coal next time  :xmas ?
« Last Edit: 26 / December / 2009, 06:28:31 by reyalp »
Don't forget what the H stands for.

 

Related Topics