SD980 port - page 9 - DryOS Development - CHDK Forum

SD980 port

  • 169 Replies
  • 65387 Views
*

Offline RaduP

  • *****
  • 926
Re: SD980 port
« Reply #80 on: 28 / September / 2009, 05:26:55 »
Advertisements
Anyway, I did find the address where the keyboard task must be hooked..
And I tried both 1930 and 1934 for the taskCreateHook, but no luck with either one of them.. I am looking at a memory dump, and 1938 is 0, so probably not useful. I could really use a SX10 103a memory dump :)

*

Offline RaduP

  • *****
  • 926
Re: SD980 port
« Reply #81 on: 28 / September / 2009, 14:28:52 »
Ok, so I got it to work (well, partially so far) by hooking it at 1938... That location was empty, so now I must say I am totally confused.
I guess there is some routine that scans the table starting at 1900 for valid function pointers and calling them??

*

Offline RaduP

  • *****
  • 926
Re: SD980 port
« Reply #82 on: 29 / September / 2009, 00:09:57 »
Ok, I have a small problem now.
I searched the code for over 30 minutes, and couldn't find where.how exactly is alt_mode_key_mask used to turn on the ALT mode?
The only relevant place was something like: physw_status[1] |= alt_mode_key_mask;
But I don't get it...

*

Offline RaduP

  • *****
  • 926
Re: SD980 port
« Reply #83 on: 29 / September / 2009, 03:07:42 »
Well, I sort of managed to get the alt mode to work, but now the camera crashes, probably because of a wrongly defined function. So I really could use some help in finding out how/where the camera really switches in the alt mode, so that I can start debugging..

*

Offline RaduP

  • *****
  • 926
Re: SD980 port
« Reply #84 on: 30 / September / 2009, 03:18:52 »
The nice people from Canon changed how the jogdial works, the function doesn't look much at all like the one for the previous cameras. I might have to just leave it unimplemented for now, my ARM ASM is not that great.

*

Offline RaduP

  • *****
  • 926
Re: SD980 port
« Reply #85 on: 30 / September / 2009, 16:26:29 »
Well, I got the jogdial to work, I took it as a challenge. Now it almost works perfectly, except that when exiting the alt mode, one single jogdial press is sent to the camera, if you moved the jogdial during the alt mode. Only a minor annoyance in the play mode.

*

Offline RaduP

  • *****
  • 926
Re: SD980 port
« Reply #86 on: 01 / October / 2009, 01:22:29 »
I implemented part of capt_seq_task, so now I can, theoretically, set the shutter speed and stuff. I hooked shooting_expo_param_override to capt_seq_task, and I verified that shooting_set_tv96_direct() is called, and _SetPropertyCase(PROPCASE_TV, &v, sizeof(v)); is executed (_SetPropertyCase is the correct addressed, verified).

Any ideas?

*

Offline reyalp

  • ******
  • 14128
Re: SD980 port
« Reply #87 on: 01 / October / 2009, 02:11:21 »
You haven't described what goes wrong. Without seeing the code, my guess would be you didn't get the call to shooting_expo_param_override in the right place in your capt_seq_taskl.
Don't forget what the H stands for.

*

Offline RaduP

  • *****
  • 926
Re: SD980 port
« Reply #88 on: 01 / October / 2009, 02:27:22 »
Oh, sorry, what goes wrong is simple: It doesn't work. The camera uses it's own shutter speed values, not mine.

The code is as for the SX10, everything is pretty similar, here is all the code up to the hook:
Code: [Select]
void __attribute__((naked,noinline)) capt_seq_task() {
 asm volatile (
                "STMFD   SP!, {R3-R9,LR}\n"
                "LDR     R6, =0x2B04\n"
                "LDR     R4, =0x4A5C8\n"
                "MOV     R9, #1\n"
                "MOV     R7, #0\n"

"loc_FF876E84:\n"
                "LDR     R0, [R6,#4]\n"
                "MOV     R2, #0\n"
                "MOV     R1, SP\n"
                "BL      sub_FF837F08\n"
                "TST     R0, #1\n"
                "BEQ     loc_FF876EB0\n"
                "LDR     R1, =0x5B3\n"
                "LDR     R0, =0xFF8769B0\n"
                "BL      sub_FF81E88C\n"
                "BL      sub_FF81E844\n"
                "LDMFD   SP!, {R3-R9,PC}\n"

"loc_FF876EB0:\n"
                "LDR     R0, [SP]\n"
                "LDR     R1, [R0]\n"
                "CMP     R1, #0x1F\n"
                "ADDLS   PC, PC, R1,LSL#2\n"
                "B       loc_FF877154\n"

"loc_FF876EC4: B       loc_FF876F44\n"
"loc_FF876EC8: B       loc_FF876FA8\n"
"loc_FF876ECC: B       loc_FF876FE4\n"
"loc_FF876ED0: B       loc_FF876FF8\n"
"loc_FF876ED4: B       loc_FF876FF0\n"
"loc_FF876ED8: B       loc_FF877000\n"
"loc_FF876EDC: B       loc_FF877008\n"
"loc_FF876EE0: B       loc_FF877010\n"
"loc_FF876EE4: B       loc_FF877068\n"
"loc_FF876EE8: B       loc_FF877090\n"
"loc_FF876EEC: B       loc_FF877074\n"
"loc_FF876EF0: B       loc_FF877080\n"
"loc_FF876EF4: B       loc_FF877088\n"
"loc_FF876EF8: B       loc_FF877098\n"
"loc_FF876EFC: B       loc_FF8770A0\n"
"loc_FF876F00: B       loc_FF8770A8\n"
"loc_FF876F04: B       loc_FF8770B0\n"
"loc_FF876F08: B       loc_FF8770B8\n"
"loc_FF876F0C: B       loc_FF8770C4\n"
"loc_FF876F10: B       loc_FF8770CC\n"
"loc_FF876F14: B       loc_FF8770D4\n"
"loc_FF876F18: B       loc_FF8770DC\n"
"loc_FF876F1C: B       loc_FF8770E4\n"
"loc_FF876F20: B       loc_FF8770F0\n"
"loc_FF876F24: B       loc_FF8770F8\n"
"loc_FF876F28: B       loc_FF877100\n"
"loc_FF876F2C: B       loc_FF877108\n"
"loc_FF876F30: B       loc_FF877110\n"
"loc_FF876F34: B       loc_FF877118\n"
"loc_FF876F38: B       loc_FF877120\n"
"loc_FF876F3C: B       loc_FF87712C\n"
"loc_FF876F40: B       loc_FF877160\n"

"loc_FF876F44:\n"

//modified code
                 "BL      sub_FF8777F4\n" //done
                 "BL      shooting_expo_param_override\n"  // +
                 "BL      sub_FF874C6C\n" //done

*

Offline RaduP

  • *****
  • 926
Re: SD980 port
« Reply #89 on: 01 / October / 2009, 03:33:54 »
I even did a _GetPropertyCase right after _SetPropertyCase, and the value is indeed identical, so it is correctly set. I guess some later function overrides it?
Or maybe PROPCASE_TV has a different value? Is there a way to find out the value the camera is using?

 

Related Topics


SimplePortal © 2008-2014, SimplePortal