A1100 IS Porting thread - page 11 - DryOS Development - CHDK Forum

A1100 IS Porting thread

  • 647 Replies
  • 242678 Views
*

Offline reyalp

  • ******
  • 14126
Re: A1100 IS Porting thread
« Reply #100 on: 26 / April / 2010, 03:21:59 »
Advertisements
OK,I fixed the chdk logo now,It looks more big and clear.Ican see the text of OSD.They Like

1: xxxxxxxxx 0
f:                   0
z:                   0

what's that meaning?

This is the misc debug values I mentioned earlier: http://chdk.setepontos.com/index.php/topic,4727.msg49322.html#msg49322

You can use this to show some variables on the screen.
Don't forget what the H stands for.

Re: A1100 IS Porting thread
« Reply #101 on: 26 / April / 2010, 06:29:42 »
This is the misc debug values I mentioned earlier.

It is, but they are not the physw_status[] values, they have been commented-out in the TRUNK version.


Re: A1100 IS Porting thread
« Reply #102 on: 26 / April / 2010, 09:41:27 »
I also confused how to get the keymask,I can display text on the screen.How these value(physw_status...) combine the keymap
with this I can see text "2d0fa" on the screen.

 sprintf(osd_buf, "1:       %8x  --> %8x", physw_status[2]);
   draw_txt_string(20, 10, osd_buf, conf.osd_color);

#define KEYS_MASK0 (0x00020000)
#define KEYS_MASK1 (0x00000000)
#define KEYS_MASK2 (0x00000DFF)

static KeyMap keymap[] = {
   /* tiny bug: key order matters. see kbd_get_pressed_key()
    * for example
    */

   { 0, KEY_DISPLAY   , 0x00020000 },   // playback key

   { 2, KEY_SHOOT_FULL   , 0x00000030 },
   { 2, KEY_SHOOT_HALF   , 0x00000010 },
   { 2, KEY_UP      , 0x00000001 },
   { 2, KEY_DOWN      , 0x00000002 },
   { 2, KEY_LEFT      , 0x00000008 },
   { 2, KEY_RIGHT      , 0x00000004 },
   { 2, KEY_SET      , 0x00000100 },
   { 2, KEY_ZOOM_IN   , 0x00000080 },
   { 2, KEY_ZOOM_OUT   , 0x00000040 },
   { 2, KEY_MENU      , 0x00000400 },
   { 2, KEY_PRINT      , 0x00000800 },   // mode key
          { 0, 0, 0 }
};

Re: A1100 IS Porting thread
« Reply #103 on: 26 / April / 2010, 09:47:03 »
Normally, you would display physw_status[0], physw_status[1] and physw_status[2], unless you know all the key presses use physw_status[2].

Anyway, press each of the keys listed above and note the bit patterns.
If a digit is constantly changing, just replace with 'x'.

e.g  fffex0xd

Post your results here.

Note that full-press is really an Or'ing of half-press and full-press.


EDIT

THE PAGE HAS NOW CHANGED TO '8'
« Last Edit: 26 / April / 2010, 09:50:53 by Microfunguy »

Re: A1100 IS Porting thread
« Reply #104 on: 26 / April / 2010, 09:48:23 »
just give me one example like how to get keymap like this   { 2, KEY_UP      , 0x00000001 }
How to show these value and combine these values to get keymap.Sorry my english is poor.

physw_status[2]   --->2d0fa
KEY_UP                --->1
Mask2                  ---->0x00000DFF(define value at he head,how this value come from?firmware?)

Re: A1100 IS Porting thread
« Reply #105 on: 26 / April / 2010, 09:49:58 »
Just post the information I requested in above post.

Re: A1100 IS Porting thread
« Reply #106 on: 26 / April / 2010, 09:54:25 »
   sprintf(osd_buf, "1:       %8x  --> %8x", physw_status[0]);
   draw_txt_string(20, 10, osd_buf, conf.osd_color);

   sprintf(osd_buf, "2:       %8x  --> %8x", physw_status[1]);
   draw_txt_string(20, 11, osd_buf, conf.osd_color);
   sprintf(osd_buf, "2:       %8x  --> %8x", physw_status[2]);
   draw_txt_string(20, 12, osd_buf, conf.osd_color);

result

1:       21000000
2:       521ffa3
3:        2d0fa

Re: A1100 IS Porting thread
« Reply #107 on: 26 / April / 2010, 09:59:00 »
Yes, but you have to repeat that for all the different key presses.

Re: A1100 IS Porting thread
« Reply #108 on: 26 / April / 2010, 10:01:52 »
void my_kbd_read_keys()
{
   kbd_prev_state[0] = kbd_new_state[0];
   kbd_prev_state[1] = kbd_new_state[1];
   kbd_prev_state[2] = kbd_new_state[2];
   
   _platformsub_kbd_fetch_data(kbd_new_state);

   if (kbd_process() == 0){
      // leave it alone...
          physw_status[0] = kbd_new_state[0];
          physw_status[1] = kbd_new_state[1];  ---->work
          physw_status[2] = kbd_new_state[2];   ---->not work let the screen not work

   }
//   else {
//      // override keys
//    physw_status[0] = (kbd_new_state[0] & (~KEYS_MASK0)) |
//           (kbd_mod_state[0] & KEYS_MASK0);
//
//   physw_status[1] = (kbd_new_state[1] & (~KEYS_MASK1)) |
//           (kbd_mod_state[1] & KEYS_MASK1);

   //physw_status[2] = (kbd_new_state[2] & (~KEYS_MASK2)) |
   //        (kbd_mod_state[2] & KEYS_MASK2);

   //}
   
   //_kbd_read_keys_r2(physw_status);

////   remote_key = (physw_status[2] & USB_MASK)==USB_MASK;
//      if (remote_key)
//         remote_count += 1;
//      else if (remote_count) {
//         usb_power = remote_count;
//         remote_count = 0;
//      }
//   if (conf.remote_enable) {
//      physw_status[2] = physw_status[2] & ~(SD_READONLY_FLAG | USB_MASK);
//   } else {
//      physw_status[2] = physw_status[2] & ~SD_READONLY_FLAG;
//   }

}

Re: A1100 IS Porting thread
« Reply #109 on: 26 / April / 2010, 10:03:40 »
Yes, but you have to repeat that for all the different key presses.

With you hint,I probably know how to get it.
But if I get the physw_status[2] = kbd_new_state[2]; work ,the screen is not work

 

Related Topics


SimplePortal © 2008-2014, SimplePortal