IXUS 1000 HS Porting Thread - page 10 - DryOS Development - CHDK Forum supplierdeeply

IXUS 1000 HS Porting Thread

  • 437 Replies
  • 107724 Views
Re: IXUS 1000 HS Porting Thread
« Reply #90 on: 03 / November / 2010, 11:22:50 »
Advertisements
i can move the switch to any position, all values do not change.

BTW: I have change in shooting.c file the ISO settings.The Ixus 1000 begin with ISO 125 upto ISO 3200.I see in the IXUS 300 source this is too wrong

const ISOTable iso_table[] = {
   { -1,    1,   "HI", -1},
   {  0,    0, "Auto", -1},
   {  1,  125 , "125", -1},
   {  2,  200,  "200", -1},
   {  3,  400,  "400", -1},
   {  4,  800,  "800", -1},
   {  5, 1600, "1600", -1},
   {  6, 3200, "3200", -1},
};
Ixus 1000 HS

Re: IXUS 1000 HS Porting Thread
« Reply #91 on: 03 / November / 2010, 12:35:28 »
the value of the switch and  other can read, when i change in the testcode the msleep value to this.

      sprintf(osd_buf, "2:       %8x  --> %8x", physw_status[1],kbd_new_state[1]);
      draw_txt_string(20, 11, osd_buf, MAKE_COLOR(0xdd,0x6f));

      sprintf(osd_buf, "3:       %8x  --> %8x", physw_status[2],kbd_new_state[2]);
      draw_txt_string(20, 12, osd_buf, MAKE_COLOR(0xdd,0x6f));
      msleep(20);

when i move the switch, after 1 sec is a diffrent value show.

see the post with the keys, i have update this.

EDIT:

I have add the link to the post with keys to the SD4500 wiki page.so the post can easy find.
the link to SD4500 wiki page i have too add in First post of this thread 
« Last Edit: 03 / November / 2010, 12:57:18 by Bernd R »
Ixus 1000 HS

*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: IXUS 1000 HS Porting Thread
« Reply #92 on: 03 / November / 2010, 13:10:40 »
for the rest of the modes you need to change them in the menu

Re: IXUS 1000 HS Porting Thread
« Reply #93 on: 03 / November / 2010, 14:33:10 »
>for the rest of the modes you need to change them in the menu

I dont understand what you mean.in the middle switch setting, i can choose some modes P stitch, nightshoot,landscape etc.

But the key test code output give always same values
« Last Edit: 03 / November / 2010, 14:34:44 by Bernd R »
Ixus 1000 HS


*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: IXUS 1000 HS Porting Thread
« Reply #94 on: 03 / November / 2010, 15:00:39 »
forget the other modes for the moment, will get them once we have the debug mode,

but I need the key for the set button, and also the changes in the numbers when you plug the usb cable connected to a PC

Please test theese two keys :
Code: [Select]
{ 1, KEY_MENU     , 0x00010000 },  // ASM1989 testing ixus1000
{ 1, KEY_PRINT     , 0x00000080 },  // ASM1989 testing ixus1000

replace them in keyb.c

once the chdk logo is gone
press the print(red video record in ixus1000) and then the menu button it should show the chdk menu

also I think this are the others, only missing the set one

Code: [Select]
{ 0, KEY_SHOOT_FULL , 0x00002002 },  // ASM1989 testing ixus1000
{ 0, KEY_SHOOT_HALF , 0x00002000 },  // looks the same in ixus1000 needs to be tested
{ 0, KEY_UP    , 0x00002000 },  // ASM1989 testing ixus1000
{ 0, KEY_DOWN , 0x00080000 },  // ASM1989 testing ixus1000
{ 1, KEY_LEFT     , 0x00040000 },  // ASM1989 testing ixus1000
{ 1, KEY_RIGHT     , 0x00004000 },  // looks the same in ixus1000 needs to be tested
{ 1, KEY_SET     , 0x00010000 },  // whating for Bernrd data for this one
{ 1, KEY_ZOOM_IN         , 0x00000004 },  // looks the same in ixus1000 needs to be tested
{ 1, KEY_ZOOM_OUT        , 0x00000001 },  // looks the same in ixus1000 needs to be tested
{ 1, KEY_MENU     , 0x00010000 },  // ASM1989 testing ixus1000
{ 1, KEY_DISPLAY         , 0x00020000 },  // ASM1989 ixus2000 dosn't have one?
{ 1, KEY_PRINT     , 0x00000080 },  // ASM1989 testing ixus1000
« Last Edit: 03 / November / 2010, 15:56:59 by asm1989 »

Re: IXUS 1000 HS Porting Thread
« Reply #95 on: 03 / November / 2010, 17:32:44 »
thanks, i have test for the 2 missing values.


0 -> 0
6f-> 0
498000 -> 0  USB Cable plug in

0 -> 0
106f-> 0
418000 -> 0  Set button

A print key the camera have not.I dont know how to print.i check what happen when i press the video button when chdk keys are correct enable.currently when i press the video button, the camera move out the lens and go to record mode,

I test your code above tomorrow, do you see the values are identical with S95 or ixus 300 HS ?
« Last Edit: 04 / November / 2010, 04:32:13 by Bernd R »
Ixus 1000 HS

*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: IXUS 1000 HS Porting Thread
« Reply #96 on: 04 / November / 2010, 01:46:06 »
Yes the print button, is the record video on the back

Code: [Select]
{ 1, KEY_SET      , 0x00001000 },  /// ASM1989 testing ixus1000
the usb is the same as sx210 , but didn't tested since I dont have a remote
Code: [Select]
#define USB_MASK (0x80000)
I still need to find the values for the KEYS_MASK0, 1 y 2 , following this procedure http://chdk.setepontos.com/index.php?topic=5045.msg54979#msg54979

No the values are not the same, some change in s95, ixus300

Re: IXUS 1000 HS Porting Thread
« Reply #97 on: 04 / November / 2010, 04:34:01 »
>0 -> 0
>106f-> 0
>498000 -> 0  Set button

sorry, i see that 49800 for set button is wrong.i copy the USB part and forget to change last value.correct is 418000

0 -> 0
106f-> 0
418000 -> 0  Set button

I change older posts too

with the key mask find, i currently not understand, i need read first more of the thread and wiki to understand that

EDIT: i add now your code and look whats work.

as far i can see, when mask out with 0x7f most keys can work for first.Only the zoom in and zoom out keys not work.maybe this 4 bits for the 4 possible positions need clear for mask then.
« Last Edit: 04 / November / 2010, 04:44:44 by Bernd R »
Ixus 1000 HS


Re: IXUS 1000 HS Porting Thread
« Reply #98 on: 04 / November / 2010, 05:11:37 »
In the wiki i read this line.

"""""
The KEY_MASK? macros should be the or of all the masks of keys that correspond to the specific index (i.e. for KEY_MASK0 you should take the masks of keys that are represented in physw_status[0]).
"""""

if i understand correct, is it possible to "or |" all key values in the kemayp menu.my kemap look as this.

static KeyMap keymap[] = {
   { 1, KEY_MENU           , 0x00010000 },  // ASM1989 testing ixus1000
    { 1, KEY_PRINT           , 0x00000080 },  // ASM1989 testing ixus1000
   { 0, KEY_SHOOT_FULL   , 0x00002002 },  // ASM1989 testing ixus1000
   { 0, KEY_SHOOT_HALF   , 0x00002000 },  // looks the same in ixus1000 needs to be tested
   { 0, KEY_UP          , 0x00002000 },  // ASM1989 testing ixus1000
   { 0, KEY_DOWN      , 0x00080000 },  // ASM1989 testing ixus1000
   { 1, KEY_LEFT           , 0x00040000 },  // ASM1989 testing ixus1000
   { 1, KEY_RIGHT           , 0x00004000 },  // looks the same in ixus1000 needs to be tested
   { 1, KEY_SET           , 0x00001000 },  //ASM1989 testing ixus1000
   { 1, KEY_ZOOM_IN         , 0x00000004 },  // looks the same in ixus1000 needs to be tested
   { 1, KEY_ZOOM_OUT        , 0x00000001 },  // looks the same in ixus1000 needs to be tested
   { 1, KEY_MENU           , 0x00010000 },  // ASM1989 testing ixus1000
   { 1, KEY_DISPLAY         , 0x00020000 },  // ASM1989 ixus2000 dosn't have one?
   { 1, KEY_PRINT           , 0x00000080 },  // ASM1989 testing ixus1000
    { 0, 0, 0 }
};

so when i do

#define KEYS_MASK1 (0x00010000 | 0x00000080 | 0x00002000 ......)

i should get the correct mask ?

EDIT:
I need only exclude the values of shoot full and shoot half i see, because this are in mask for KEYS_MASK2
« Last Edit: 04 / November / 2010, 05:41:25 by Bernd R »
Ixus 1000 HS

Re: IXUS 1000 HS Porting Thread
« Reply #99 on: 04 / November / 2010, 15:28:41 »
I have now add testcode for the keyboard, because no chdk menu is show.

In the function kbd_is_key_pressed i think there should return 1 when the key is press.but the output of this line

int state =   ((kbd_new_state[keymap.grp] & keymap.canonkey) == 0) ? 1:0;

show that it return 0 when keymap.canonkey)  is 0x4000( i use right curser as KEY_PRINT for test ) and kbd_new_state[keymap.grp] is 406f.when key is not press, or other key is press it return 1

normaly it should be 0 when key is not press and 1 when its press, or i am wrong ?


here is complete testcode

#define LOG
long kbd_is_key_pressed(long key) {
    int i;
    for (i=0;keymap.hackkey;i++) {

        if (keymap.hackkey == key) {
   #ifdef LOG
         static char osd_buf[64];
      int state =   ((kbd_new_state[keymap.grp] & keymap.canonkey) == 0) ? 1:0;
      sprintf(osd_buf, "Key %8x %8x %8x ",keymap.canonkey,kbd_new_state[keymap.grp], state);
      draw_txt_string(20, i, osd_buf, MAKE_COLOR(0xdd,0x6f));
        #endif
            return ((kbd_new_state[keymap.grp] & keymap.canonkey) == 0) ? 1:0;
        }
    }
    return 0;
}
« Last Edit: 04 / November / 2010, 17:28:01 by Bernd R »
Ixus 1000 HS

 

Related Topics