the sx20 porting thread - page 12 - General Discussion and Assistance - CHDK Forum supplierdeeply

the sx20 porting thread

  • 1286 Replies
  • 445203 Views
*

Offline RaduP

  • *****
  • 926
Re: the sx20 porting thread
« Reply #110 on: 26 / October / 2009, 13:19:57 »
Advertisements
You don't need anything except for the screen working to hook mykbd_task.
Make sure you get the right physw_status address.

*

Offline neszt

  • ***
  • 174
Re: the sx20 porting thread
« Reply #111 on: 26 / October / 2009, 18:37:48 »
You don't need anything except for the screen working to hook mykbd_task.
Make sure you get the right physw_status address.
I managed gui_draw_debug_vals_osd() to work, so i found all the bits correctly. Anyway after all i realized, the the keymap exactly the same as sx10. This part of the camera is closer to sx10, than sd980, including the firmware section.

Why CHDK does not handle separated the zoom full and half? I get these bits also:

   { 1, KEY_ZOOM_IN_FULL   , 0x00010000 },
   { 1, KEY_ZOOM_OUT_FULL   , 0x00020000 },

However, i still can't get keyboard to work. I'am sooo close.

*

Offline neszt

  • ***
  • 174
Re: the sx20 porting thread
« Reply #112 on: 26 / October / 2009, 18:39:20 »
ver GM1.00f P-ID 31E4 pal
That is the same as mine, so later testing is possible.

*

Offline RaduP

  • *****
  • 926
Re: the sx20 porting thread
« Reply #113 on: 26 / October / 2009, 18:57:22 »
Are ALL the keys identical to SX10? Including the index and stuff?
Did you use the correct bitmask and everything?
If it's still not working, make sure to blink the LED in various parts of the keyboard routine, to see where it gets to and where it doesn't.


*

Offline neszt

  • ***
  • 174
Re: the sx20 porting thread
« Reply #114 on: 26 / October / 2009, 19:16:10 »
Are ALL the keys identical to SX10? Including the index and stuff?
Yes, they are.
Quote
Did you use the correct bitmask and everything?
If it's still not working, make sure to blink the LED in various parts of the keyboard routine, to see where it gets to and where it doesn't.
After blinking debug it turs out, that in mykbd_task_proceed we never go into the while (physw_run).

DEF(physw_run, 0x1C38 + 0x0C)//done

How did you figured physw_run out?

*

Offline RaduP

  • *****
  • 926
Re: the sx20 porting thread
« Reply #115 on: 26 / October / 2009, 19:23:46 »
I forgot how I found it, probably by looking for the value of the SX10 (the base, without the offset) and then finding where the offset (0xc) was used, and then finding that function on my camera.

*

Offline reyalp

  • ******
  • 14080
Re: the sx20 porting thread
« Reply #116 on: 26 / October / 2009, 19:53:32 »
After blinking debug it turs out, that in mykbd_task_proceed we never go into the while (physw_run).

DEF(physw_run, 0x1C38 + 0x0C)//done

How did you figured physw_run out?
As I've said before: You need to find and correct every value that is used. There is no point in using pointers that are valid on some other camera and hoping they will work. When you don't follow this advice, and then come here with mysterious problems, it just wastes everyones time.

I'm not trying to discourage or flame (ok maybe flame just little, but I really appreciate the effort you are putting into this) but you need to understand this to make a working port.

Now that the rant is out of the way, how do you find it ? Many ports have comments in stubs_entry.S that suggest how a particular address was found. From what I remember, physw_run is found in the canon physw_task. It's main loop does something very similar to the CHDK main loop.
Don't forget what the H stands for.

*

Offline RaduP

  • *****
  • 926
Re: the sx20 porting thread
« Reply #117 on: 26 / October / 2009, 20:03:45 »
Well, I kind of found them one at a time too, because you kind of need to test each of them (otherwise you can have mistakes you won't even realize).


*

Offline reyalp

  • ******
  • 14080
Re: the sx20 porting thread
« Reply #118 on: 26 / October / 2009, 20:12:03 »
Well, I kind of found them one at a time too, because you kind of need to test each of them (otherwise you can have mistakes you won't even realize).
Right, but what I'm saying is that as you work through the platform code (which you should be doing file by file and line by line) the moment you see a something that refers to a canon address (a variable, function, or chunk of ASM) you need to correct that before you can expect that particular bit of code to execute.
Don't forget what the H stands for.

*

Offline neszt

  • ***
  • 174
Re: the sx20 porting thread
« Reply #119 on: 27 / October / 2009, 02:41:55 »
As I've said before: You need to find and correct every value that is used. There is no point in using pointers that are valid on some other camera and hoping they will work. When you don't follow this advice, and then come here with mysterious problems, it just wastes everyones time.

I'm not trying to discourage or flame (ok maybe flame just little, but I really appreciate the effort you are putting into this) but you need to understand this to make a working port.
In your point of view, it is. You just see, that i ask silly questions, and run into some problems that should, be solved miles ago. In my point of view, i try to solve the next ONE problem, make a step, 'coz i wana see it's result.

Moreover, i make my best to write some lines in english that you all could understand.. :)
Quote
Now that the rant is out of the way, how do you find it ? Many ports have comments in stubs_entry.S that suggest how a particular address was found. From what I remember, physw_run is found in the canon physw_task. It's main loop does something very similar to the CHDK main loop.
To see, how lame am i. I didn't even know, that physw_run is an address. There are no one word in the porting guide about it.

 

Related Topics