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

A1100 IS Porting thread

  • 647 Replies
  • 244715 Views
*

Offline reyalp

  • ******
  • 14128
Re: A1100 IS Porting thread
« Reply #130 on: 27 / April / 2010, 00:25:33 »
Advertisements
Are you sure you physw_status and mmio addresses are right, if one were off by one word, this might happen ?
Don't forget what the H stands for.

Re: A1100 IS Porting thread
« Reply #131 on: 27 / April / 2010, 01:02:07 »
How find the mmio addresses?

*

Offline reyalp

  • ******
  • 14128
Re: A1100 IS Porting thread
« Reply #132 on: 27 / April / 2010, 01:40:55 »
How find the mmio addresses?
Look at the original canon kbd task.
Don't forget what the H stands for.

Re: A1100 IS Porting thread
« Reply #133 on: 27 / April / 2010, 04:08:10 »
Code: [Select]
void kbd_fetch_data(long *dst)
{
// OK, FF84A390 GetKbdState
    volatile long *mmio0 = (void*)0xc0220200;
    volatile long *mmio1 = (void*)0xc0220204;
    volatile long *mmio2 = (void*)0xc0220208;

    dst[0] = *mmio0;
    dst[1] = *mmio1;
    dst[2] = *mmio2;
}

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];
_kbd_pwr_on();
kbd_fetch_data(kbd_new_state);
//_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];
    //      physw_status[2] = kbd_new_state[2];

} 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;
}

 _kbd_pwr_off();
}

Code: [Select]
void gui_draw_debug_vals_osd() {
#ifdef OPT_DEBUGGING
 //   if (conf.debug_misc_vals_show) {
        //        long v=get_file_counter();
        // sprintf(osd_buf, "1:%03d-%04d  ", (v>>18)&0x3FF, (v>>4)&0x3FFF);
        // sprintf(osd_buf, "1:%d, %08X  ", xxxx, eeee);
       
        extern long physw_status[3];
        sprintf(osd_buf, "1:%8x  ", physw_status[0]);
        draw_txt_string(8, 10, osd_buf, conf.osd_color);

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

        sprintf(osd_buf, "3:%8x  ", physw_status[2]);
        draw_txt_string(8, 12, osd_buf, conf.osd_color);

result:

1  30d0000c
2    c2800eb
3     d0ff

Re: A1100 IS Porting thread
« Reply #134 on: 27 / April / 2010, 04:13:55 »
Code: [Select]

ROM:FFC30B28 GetKbdState                             ; CODE XREF: ROM:FFC11A30p
ROM:FFC30B28                 LDR     R1, =0xC0220000
ROM:FFC30B2C                 LDR     R2, [R1,#0x200]
ROM:FFC30B30                 STR     R2, [R0]
ROM:FFC30B34                 LDR     R2, [R1,#0x204]
ROM:FFC30B38                 STR     R2, [R0,#4]
ROM:FFC30B3C                 LDR     R1, [R1,#0x208]
ROM:FFC30B40                 MOV     R1, R1,LSL#16
ROM:FFC30B44                 MOV     R1, R1,LSR#16
ROM:FFC30B48                 STR     R1, [R0,#8]
ROM:FFC30B4C                 BX      LR
ROM:FFC30B4C ; End of function GetKbdState


is my address mmio correct?

Code: [Select]
   volatile long *mmio0 = (void*)0xc0220200;
    volatile long *mmio1 = (void*)0xc0220204;
    volatile long *mmio2 = (void*)0xc0220208;

Re: A1100 IS Porting thread
« Reply #135 on: 27 / April / 2010, 04:53:09 »
What is the address of physw_status[], where did you find it ?


Re: A1100 IS Porting thread
« Reply #136 on: 27 / April / 2010, 05:30:11 »
They are the text display on the screen.
I show physw_status[0],physw_status[1]physw_status[2]
on the screen ,these are the value.
« Last Edit: 27 / April / 2010, 05:32:19 by xiaofeng »

Re: A1100 IS Porting thread
« Reply #137 on: 27 / April / 2010, 05:35:03 »
1.I must comment out the      physw_status[2] = kbd_new_state[2];Ohterwise,the screen is not work.
2.After comment out it.The camera can start succ with any key is disable.And I can draw text on the screen.
1  30x200xc             
2    c2000eb                 
3     2d0ff

any key have no response.
the x are digit on the screen which change all the time.I press key.Likely there is no response to the key.
« Last Edit: 27 / April / 2010, 05:38:15 by xiaofeng »

Re: A1100 IS Porting thread
« Reply #138 on: 27 / April / 2010, 05:39:47 »
I check the kdb.c many times.
I think the code in kdb.c is right.Now I think if it is some function with incorrect address cause the screen not work.

Re: A1100 IS Porting thread
« Reply #139 on: 27 / April / 2010, 09:13:27 »
can I ask again, what is the address of physw_status[]. ?

Where did you find it in the firmware ?


 

Related Topics


SimplePortal © 2008-2014, SimplePortal