IXUS 1000 HS Porting Thread - page 9 - DryOS Development - CHDK Forum  

IXUS 1000 HS Porting Thread

  • 439 Replies
  • 130001 Views
Re: IXUS 1000 HS Porting Thread
« Reply #80 on: 02 / November / 2010, 06:03:00 »
Advertisements
>CONF_INFO( 38, conf.reader_file,            CONF_DEF_PTR,   ptr:"A/README.TXT", conf_change_script_file),

when i remove the line, as you suggest, a

if ( i == 100)blink();  //work

but still not work complete.I try change to

if ( i == 200)blink();  // not work

I manage it currently not to create a file on the flash card.Do i something wrong ?
i use the code of conf_save() below and modify it.but i get no valid filenumber

My test was

void conf_load_defaults() {
    register int i;
    int fd;
char *buf=umalloc(100);
if (buf)
{
//blink();// work
fd = open("a/testfile.txt", O_WRONLY|O_CREAT|O_TRUNC, 0777);
    if (fd>=0){
         blink(); //not work
      //fprintf(fd,"hello \n"); // compile error no fputs found
     memcpy(buf,"hello\n",sizeof("hello\n"));
    close(fd);
   }
    ufree(buf);
}

EDIT: ok i see, i forget the write command, but the file should open
« Last Edit: 02 / November / 2010, 06:05:53 by Bernd R »
Ixus 1000 HS

*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: IXUS 1000 HS Porting Thread
« Reply #81 on: 02 / November / 2010, 06:35:23 »
you need to narrow the search to find where it fails between 100 and 200 and comment it

Re: IXUS 1000 HS Porting Thread
« Reply #82 on: 02 / November / 2010, 11:27:35 »
I see there is another call to same function as in 38.

//    CONF_INFO(194, conf.script_file,            CONF_DEF_PTR,   ptr:"", conf_change_script_file),

when i deactivate that, the function

conf_load_defaults(

work complete.

but then it crash on later stat function call.

I think there is something wrong on first init.But what ?.
as far i see the stub file is automatic create.

conf_load_defaults();
//blink (); //work
    if( stat(CONF_FILE,&st) != 0 || st.st_size < sizeof(int))
    {   blink(); //not work
        return;
   }
   blink(); //not work

The questions are.

Wy is spytask_can_start never set to 1.
Wy does
 fd = open("a/testfile.txt", O_WRONLY|O_CREAT|O_TRUNC, 0777);

give no usable fd.

Ixus 1000 HS

Re: IXUS 1000 HS Porting Thread
« Reply #83 on: 02 / November / 2010, 12:09:47 »
I do now add testcode to test the stat Function.It fail too.so it seem always crash in the stat func.

void conf_restore() {
    int fd, rcnt, i;
    unsigned short id, size;
    char *buf;
    int offs;
    struct stat st;

    stat("a/test.txt",&st);
    blink(); //not work

    conf_init_defaults();

    conf_load_defaults();
Ixus 1000 HS


Re: IXUS 1000 HS Porting Thread
« Reply #84 on: 02 / November / 2010, 14:42:39 »
I do add some testcode in this function.
I test if write to SD Card can work and do mkdir.It work and create this dir on SD-Card

void conf_restore() {
    int fd, rcnt, i;
    unsigned short id, size;
    char *buf;
    int offs;
    struct stat st;
    mkdir("A/testdir"); //work
    stat("A/test.txt",&st); //not work
    blink(); //not work

...............

I also test older code of V3 ixus 1000 of task_Startup_my().it work in same way.

stat not work, but romlog give other output now.the addresses are still not in the dump.

ASSERT!! KerSem.c Line 333
Occured Time  2010:11:02 19:17:53
Task ID: 16973859
Task name: SpyTask
SP: 0x0038C194
StackDump:
0x00000000
0xFF83B2EC
0x0000014D
0x0038C1E4
0x19980218
0x00000001
0x19980218
0x19980218
0x19980218
0x19980218
0x0038C1D8
0xFF83B33C
0x0038C1E4
0xFF836DBC
0x0038C22C
0x0038C1DC
0x0017B9B7
0x0018A580
0x19980218
0x00000001
0xFF8128AC
0x00000032
0xFF83B5B8
0x00000000
0x02FAF080
0x00000191
0x00000191
0x19980218
0x00000001
0x19980218
0x00172D31
0x00372BB8
0x19980218
0x19980218
0x0018E860
0x19980218
0x0038C230
0xFF816B74
0x0018E860
0x19980218
0x19980218
0x00001008
ShootConDump:
0f 0f 0f 0f 0f 0f 0f 0f 0f 0f
CameraConDump:
07 0a 02 0f 0f 0f 0f 0f 0f 0f
00000130: *** Camera Log Start ***

00000140: UI:_BeforeCBRForPlay

00000140: UI:_AfterCBRForPlay

00000150: UI:DSIC:55,0

00000150: UI:LogicalEvent:0x5003:adr:0,Para:0

00000150: UI:LogicalEvent:0x1165:adr:0,Para:0

00000150: UI:_SImage

00000150: UI:SetPanelBrightnessToLcdController

00000150: UI:SetDisplayType

00000150: UI:TurnOnDisplayForStartup

00000150: UI:LogicalEvent:0x5007:adr:0,Para:0

00000210: UI:LogicalEvent:0x5001:adr:0,Para:0

00000210: SS:S-Imag

00000230: UI:ScreenLock

00000230: UI:ScreenUnLock

00000230: UI:LogicalEvent:0x300a:adr:0,Para:0

00000230: UI:HDMIConnectCnt

00000230: UI:PB.Create

00000270: UI:PB.CreateE

00000270: UI:DisplayPhysicalScreenCBR

00000270: UI:DispSwCon_TurnOnBackLight

00000270: UI:TurnOnBackLight

00000340: UI:MuteOffPhysicalScreen

00000340: UI:LogicalEvent:0x3138:adr:0,Para:0

00000420: UI:LogicalEvent:0x5006:adr:0,Para:0

00000420: UI:AC:StartPB

00000420: UI:DispSwCon_TurnOnDisplayDevice

00000420: UI:AC:EBtn

00000420: UI:PB.Start

00000420: UI:DSIC:47,0

00000450: UI:CC_CompFlhJpg

00000450: UI:_CompFlhJpg

00000450: UI:PB.Flash

00000450: UI:ScreenLock

00000450: UI:DSIC:47,0

00000450: UI:ScreenUnLock

00000450: UI:ScreenLock

00000450: UI:DSIC:47,0

00000460: UI:LogicalEvent:0x3209:adr:0x12,Para:18

00000630: UI:PB.DrawI

00000650: UI:PB.StartE

00000650: UI:PB.TOTAL

00000650: UI:DisplayPhysicalScreenCBR

00000650: UI:LogicalEvent:0x320a:adr:0,Para:0

00000650: UI:PB.DPOF

00000700: UI:LogicalEvent:0x321f:adr:0,Para:0

00000700: UI:PB.CTG

00000740: UI:LogicalEvent:0x3203:adr:0,Para:0

00000750: UI:PB.DcdCBR

00000750: UI:DSIC:48,0

00000750: UI:PB.RfrsI

00000770: UI:LogicalEvent:0x3201:adr:0,Para:0

00000780: UI:ScreenUnLock

00000780: UI:DSIC:48,0

00000800: UI:DispSw: Unlock

00000800: UI:DispSwCon:Unlock

00000800: UI:DispSwCon_TurnOnBackLight

00000800: UI:DispSwCon_MuteOffPhysicalScreen

00000800: UI:MuteOffPhysicalScreen

00000800: UI:AC:EnryPB

00000800: UI:AP:ChkCnctUSB

00000800: UI:DisplayPhysicalScreenCBR

00002790: UI:ScreenLock

00002790: UI:ScreenUnLock

00002800: UI:DisplayPhysicalScreenCBR
 
Ixus 1000 HS

*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: IXUS 1000 HS Porting Thread
« Reply #85 on: 02 / November / 2010, 14:43:15 »
Good work Bernrd , I had wrong the stat stub

please change this in platform\ixus1000_sd4500\sub\100d\stubs_entry_2.S

Code: [Select]
NHSTUB(stat, 0xFF8381C4)  // -> ASM1989,Nov-10 remember to include "#define CAM_DRYOS_2_3_R39 1"  in camera.h
The good one is 0xFF8381C4,

now uncomment the commented lines and tell us how it goes.

Re: IXUS 1000 HS Porting Thread
« Reply #86 on: 02 / November / 2010, 15:27:33 »
Great, now it work much better, i see now a popup over the image that show chdk raw and in second line a Versionnumber.

then after 1-2 sec, the chdk image is gone.I cant switch the camera off or click menu.only i can rotate the wheel and the prev or next image is show.zoom in image too not work.
Ixus 1000 HS

*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: IXUS 1000 HS Porting Thread
« Reply #87 on: 02 / November / 2010, 15:55:18 »
very good news, :)

I have to work now on converting the rest of the functionality, the keyboard and jogdial, and more,

One I have the basics I will upload new files for you to test out more

but since I think most or all of the stubs are ok, the rest of the work is mechanical, I will try to find some time to start it

please post your boot.c to have the last one.

The next step for you is edit the platform\ixus1000_sd4500\kbc.c and in the function my_kbd_read_keys() add the next

Code: [Select]
void my_kbd_read_keys()
{
static char osd_buf[64];

kbd_prev_state[0] = kbd_new_state[0];
kbd_prev_state[1] = kbd_new_state[1];
kbd_prev_state[2] = kbd_new_state[2];


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

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(500);

This will show 3 hex numbers that will change on every key you press, I need you to get the 3 number for each key and post all them

this goes for all the buttons, and also for all the cammera modes M, P , Video....

If you get no output, you need to change boot.c and uncommnet at task_Startup_my()

Code: [Select]
CreateTask_PhySw(); // our keyboard task
and in CreateTask_PhySw()

Code: [Select]
" LDR R3, =mykbd_task \n" // PhySw Task patch
« Last Edit: 02 / November / 2010, 16:12:47 by asm1989 »


Re: IXUS 1000 HS Porting Thread
« Reply #88 on: 03 / November / 2010, 06:28:51 »
I activate keyboard task and get the output of some values.the left right up and down keys have 2 positions possible.

when do a hardpress, it happen easy that you press other pos key soft, so diffrent values are possible.

the zoom slider too have 2 positions

let me know if you need more info

0 -> 0
6f-> 0
418000 -> 0     no key

0 -> 0
406f-> 0
418000 -> 0     right soft press

Note: the diffrence value happen because a soft press have no good click point and so can randomly happen to other directions when you press not exact in the middle

0 -> 0
8486f-> 0        sometimes  8686f     686f
418000 -> 0     right hard press

0 -> 0
4006f-> 0        
418000 -> 0     left soft press

0 -> 0
c806f-> 0         sometimes ca06f 4a06f
418000 -> 0     left hard press


0 -> 0
8006f-> 0
418000 -> 0     down soft press

0 -> 0
e006f-> 0       ;sometimes e406f-> 0 e806f-> 0
418000 -> 0     down hard press

0 -> 0
4206f-> 0
418000 -> 0     up soft press

0 -> 0
4246f-> 0       ;sometimes 4646f-> 0 ;sometimes 646f-> 0
418000 -> 0     up hard press


0 -> 0
6b-> 0
418000 -> 0     zoom in soft press

0 -> 0
67-> 0
418000 -> 0     zoom in hard press

0 -> 0
6e-> 0
418000 -> 0     zoom out soft press

0 -> 0
6d-> 0
418000 -> 0     zoom out hard press

0 -> 0
1006f-> 0
418000 -> 0    Menu

0 -> 0
6f-> 0
41a000 -> 0    shoot soft press

0 -> 0
6f-> 0
41a002 -> 0    shoot hard press

0 -> 0
ef-> 0
418000 -> 0    Video

0 -> 0
6f-> 0
418100 -> 0  play button  

0 -> 0
6f-> 0
418008 -> 0  on/off button  

automatic mode (switch full right)

0 -> 0
2f-> 0
418000 -> 0  

middle Pos Camera Mode

0 -> 0
6f-> 0
418000 -> 0  

left pos Movie Mode

0 -> 0
4f-> 0
418000 -> 0  

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

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





0 -> 0
6f-> 0
418000 -> 0     no key

0 -> 0
406f-> 0
418000 -> 0     right soft press

0 -> 0
686f-> 0
418000 -> 0     right hard press

0 -> 0
4006f-> 0
418000 -> 0     left soft press

0 -> 0
4a06f-> 0
418000 -> 0     left hard press


0 -> 0
8006f-> 0
418000 -> 0     down soft press

0 -> 0
e006f-> 0       ;sometimes e406f-> 0
418000 -> 0     down hard press

0 -> 0
206f-> 0
418000 -> 0     up soft press

0 -> 0
4246f-> 0       ;sometimes 4646f-> 0
418000 -> 0     up hard press


0 -> 0
6b-> 0
418000 -> 0     zoom in soft press

0 -> 0
67-> 0
418000 -> 0     zoom in hard press

0 -> 0
6e-> 0
418000 -> 0     zoom out soft press

0 -> 0
6d-> 0
418000 -> 0     zoom out hard press

0 -> 0
1006f-> 0
418000 -> 0    Menu

0 -> 0
6f-> 0
41a000 -> 0    shoot soft press

0 -> 0
6f-> 0
41a002 -> 0    shoot hard press

0 -> 0
ef-> 0
418000 -> 0    Video

0 -> 0
6f-> 0
418100 -> 0  play button  

0 -> 0
6f-> 0
418008 -> 0  on/off button  

automatic mode (switch full right)

0 -> 0
2f-> 0
418000 -> 0  

middle Pos Camera Mode

0 -> 0
6f-> 0
418000 -> 0  

left pos Movie Mode

0 -> 0
4f-> 0
418000 -> 0  

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

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

EDIT:

here is link to boot.c with activate keyboard


http://www.zshare.net/download/82291842a09001bd/

« Last Edit: 10 / November / 2010, 10:53:34 by Bernd R »
Ixus 1000 HS

*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: IXUS 1000 HS Porting Thread
« Reply #89 on: 03 / November / 2010, 11:01:08 »
thanks bernrd , i also need the values for the difrent when switch to the diferent modes p, manual...

also I need the set button codes
« Last Edit: 03 / November / 2010, 14:41:49 by asm1989 »

 

Related Topics