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

A1100 IS Porting thread

  • 647 Replies
  • 247090 Views
Re: A1100 IS Porting thread
« Reply #170 on: 28 / April / 2010, 02:51:13 »
Advertisements
I think I have complete the port of 60%

Re: A1100 IS Porting thread
« Reply #171 on: 28 / April / 2010, 03:00:43 »
it's good news! I wish you success!

Re: A1100 IS Porting thread
« Reply #172 on: 28 / April / 2010, 05:20:59 »
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]).

Sorry,as my bad english,I do not understand these clear.

I konw how to generate  the keymap with the help of Microfunguy.

But I do not understand how to general the keyMask

my keymap:
Code: [Select]
static KeyMap keymap[] = {
/* tiny bug: key order matters. see kbd_get_pressed_key()
* for example
*/
{ 1, KEY_DISPLAY , 0x00004000 },   
{ 2, KEY_SHOOT_FULL , 0x00000020 },
{ 2, KEY_SHOOT_HALF , 0x00000010 },
{ 1, KEY_UP , 0x00000100 },
{ 1, KEY_DOWN , 0x00000200 },
{ 1, KEY_LEFT , 0x00000800 },
{ 1, KEY_RIGHT , 0x00000400 },
{ 1, KEY_SET , 0x00001000 },
{ 2, KEY_ZOOM_IN , 0x00000040 },
{ 2, KEY_ZOOM_OUT , 0x00000080 },
{ 1, KEY_MENU , 0x00002000 },
{ 1, KEY_PRINT , 0x00008000 },   
        { 0, 0, 0 }
};

Re: A1100 IS Porting thread
« Reply #173 on: 28 / April / 2010, 05:28:02 »
KEY_SHOOT_FULL should be  :-

{ 2, KEY_SHOOT_FULL   , 0x00000030 },

because two bit positions (2 and 1 values) go low.
So, 2 + 1 = 3.

For the masks, you have a '1' wherever a key bit is located.
That is so we can override the keys without affecting other devices that use physw_status[].

There are no key bits in physw_status[0], so the mask is  :-

#define KEYS_MASK0 (0x00000000)

For physw_status[1],  every bit of the nibble in fourth position from right and third position from right are used for key presses.
So, those two nibbles are 'ff' and mask is  :-

#define KEYS_MASK1 (0x0000FF00)

For physw_status[2], all the bits in second nibble from right are used and mask is  :-

#define KEYS_MASK2 (0x000000F0)


Now see if the MENU key works.

Re: A1100 IS Porting thread
« Reply #174 on: 28 / April / 2010, 08:18:54 »
Thanks,The keyboard work fine now.
Next ,I will port the RAW function.

I try the histogram cause the screen show many red line on it.

Re: A1100 IS Porting thread
« Reply #175 on: 29 / April / 2010, 00:48:12 »
ASM

Code: [Select]
"locFFC49098:\n"                                               //  ; CODE XREF: task_CaptSeqTask+20j
                 "LDR     R0, [SP]\n"
                 "LDR     R1, [R0]\n"
                 "CMP     R1, #0x1D\n"
                 "ADDLS   PC, PC, R1,LSL#2\n"
                 "B       locFFC49294\n"

result:

Code: [Select]
\-> main.elf
../platform/a1100/sub/100c/libplatformsub.a(capt_seq.o): In function `locFFC4909
8':
capt_seq.c:(.text+0x5c): undefined reference to `locFFC49294'
how to resovle it?
I

Re: A1100 IS Porting thread
« Reply #176 on: 29 / April / 2010, 03:21:41 »
Good News.
OK,I fixed it now!
RAW function is work now.

Re: A1100 IS Porting thread
« Reply #177 on: 29 / April / 2010, 05:41:51 »
How did you fix it ?

(this will help people who read this thread in the future).

Re: A1100 IS Porting thread
« Reply #178 on: 29 / April / 2010, 07:40:52 »
locFFC49294 should be loc_FFC49294,I write it wrong.

Re: A1100 IS Porting thread
« Reply #179 on: 29 / April / 2010, 07:46:31 »
Fist File is DNG
Second is CR2.
Both of them is incorrect
Any idear?

 

Related Topics


SimplePortal © 2008-2014, SimplePortal