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

IXUS 1000 HS Porting Thread

  • 439 Replies
  • 132920 Views
Re: IXUS 1000 HS Porting Thread
« Reply #130 on: 11 / November / 2010, 05:22:21 »
Advertisements
>can you post the last kbd.c

http://www.zshare.net/download/825892492051a1aa/

Here it is.but its not perfect.I just use the set button, when do a short click.set is not need on chdk, because all can do with key right.but i try to get set working, for alt mode, when press 0,7 sec.


I get now also the down key with 1 single bit working.
I find also out, that the SD Card writeprotect is not in physw_status[2] .
Ixus 1000 HS

*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: IXUS 1000 HS Porting Thread
« Reply #131 on: 11 / November / 2010, 13:05:30 »
Have you tried this to avoid the redraw issues with jogdial moving?

http://chdk.setepontos.com/index.php?topic=5045.msg54966;topicseen#msg54966


Here you have the first cpatseq, uncomplete for now just trying to mirror the current task,
http://www.4shared.com/file/OwHC1ncx/captseqcixus1000-100D-v001.html

to test it you need this at boot.c

Code: [Select]
void taskCreateHook(int *p) {
p-=17;

if (p[0] == 0xFF883630)
p[0] = (int) capt_seq_task;

Re: IXUS 1000 HS Porting Thread
« Reply #132 on: 11 / November / 2010, 14:59:05 »
thanks to your file, i test tomorrow

In the thread you post i see this line feather up

physw_status[1] = 0x7F = 0111 1111 (feather up)

does this mean your camera send when release a key a message ?
this my camera do.i test for that with this code

0x6f is what i get when no key is press.

so when i add this output code


if (physw_status[1] != 0x6f)draw_txt_string(20, 12, osd_buf, MAKE_COLOR(0xdd,0x20));

but when i do this, i see only the key down message i list.see the post i have update that.

I also find out, as soon i change a value in physw_status[1] the rom firmware fail forever to accept keys.

no keypress is recognize and i add log code at end of function, that show really that the key is correct send to ROM Firmware, when alt mode is left.

So i have now only two options.

mask out pressed keys so the ROM cant process it.But i can then never use the ROM firmware.
or i do not set anything to physw_status[1], and can use rom firmware.

really bad luck with this camera.

currently i have add this code to check for long press set key.setkey begin press work and as long i hold the set button the message

set key hold pressed

is output.

now i need only get this code snippet working, when the set key hold message is show 0,7 sec  that it print a dummykey.but currently come so often Print key send !!!!!!!!!!!!!!!! messages.so i need look more what i do wrong.

    if (((kbd_prev_state[1] & 0xffffff00) != CANON_SET_KEY) && ((kbd_new_state[1] & 0xffffff00) == CANON_SET_KEY)) // detect a set key press
    {
   last_setkey_time=timeval;
   draw_txt_string(20, 10,"set key begin press", MAKE_COLOR(0xdd,0x6f));
   }
   if (((kbd_prev_state[1] & 0xffffff00) == CANON_SET_KEY) && ((kbd_prev_state[1] & 0xffffff00) == CANON_SET_KEY)) // detect a set key hold
    {
      if ((timeval - 7) > last_setkey_time){
      kbd_new_state[1] = PRINTKEY_DUMMYCODE;
      draw_txt_string(20, 10,"Print key send !!!!!!!!!!!!!!!!!", MAKE_COLOR(0xdd,0x6f));
      }
      ;
   draw_txt_string(20, 10,"set key hold pressed", MAKE_COLOR(0xdd,0x6f));
   }
    timeval++;
Ixus 1000 HS

*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: IXUS 1000 HS Porting Thread
« Reply #133 on: 12 / November / 2010, 01:14:34 »
 feather up is just strong push key up, at least in sx210

post the full kbd.c to see where it could fail, 

I dont know if the set button is the best for this , if you press it too long the screen saver start,

convination of two key is what the other cams use.


Re: IXUS 1000 HS Porting Thread
« Reply #134 on: 12 / November / 2010, 05:18:09 »
many thanks for new code, i activate  

if (p[0] == 0xFF883630)
      p[0] = (int) capt_seq_task;

and all work as before.
when i was in shoot mode, i see correct EV Values.When i press shoot half, i see above Histogramm Text EXP and i see then the DOV display, but show
s/r1/r2 inf,inf,inf
DOF/hyp inf,1.43

Hyp value 1.43 depend on zoom.when no zoom its 1.43 and when do full zoom its 42.1

I not touch the zoom button in alt mode, i think first need a test for maximal zoom and focus values correct ?

shoot a image in alt mode, i try also with old code.show default script in left side.

Here is no diffrence see in new code.when press shoot half, then it focus and work as in non alt mode.I can then release the shutter half button and it continue to show focus mode view. thats new.maybe Bug or Feature ?.i think its usefull, to reach the features more easy that work when half shoot press is need.

When i then press shoot full a image is record and show.same as before.but  now come the diffrence.the record image is always show and there come never again a live view.

only i can do, is switch off the camera with the on/off button and switch it on and load chdk again.

also switch to display mode and again to shoot mode does not help, the shoot button not work.

maybe there is still a problem in keyboard.I think the call of the chdk

 my_kbd_read_keys()

come too late.The ROM do also some key actions before.
I find out, that when i kill keys in alt mode, later to get the ROM key processing working again (when alt mode is disable), i must press all keys that are press during alt mode.

so for example, when i switch to alt mode and only press in alt mode the menu button and cursor right:

now i switch off alt mode and no key work.but when i press the menu button and later cursor right, then the ROM key processing work agin.because i know this i can disable keys.and when i really want ROM key processing, i get it always working when press, right left top down and menu buttons.

my code is currently that when alt mode is switch on, just a  physw_status[1] = 0x6f; is do.but the key behavior is same when i use other mask.as soon i remove any keycode in the physw_status[1] ROM key processing fail until this key is press again in non alt mode.


I get now the ALT mode button with set perfect working.

See the code.

http://www.zshare.net/download/82627551775acaff/

the screensaver never appear, you can press the button as long you wish.and when release the button after 0,6 sec press then the switch of alt mode work ok.

I change for this in the camera.h file the value for the IXUS1000 too, by add this 2 lines.

    #undef CAM_EMUL_KEYPRESS_DURATION
   #define CAM_EMUL_KEYPRESS_DURATION  100

here is the snippet i have change

#elif defined (CAMERA_ixus1000_sd4500)
    // copied from SX200 and modified
    #define CAM_DRYOS_2_3_R39         1
    #define CAM_PROPSET               3
//    #define CAM_PROPSET                 2
    #define CAM_DRYOS                   1
    #define CAM_RAW_ROWPIX              3816 // from calcs see 100C lib.c   //ASM1989
    #define CAM_RAW_ROWS                2784 //  "     "    "    "    "  //ASM1989
+    #undef CAM_EMUL_KEYPRESS_DURATION
+   #define CAM_EMUL_KEYPRESS_DURATION  100
« Last Edit: 12 / November / 2010, 05:26:13 by Bernd R »
Ixus 1000 HS

*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: IXUS 1000 HS Porting Thread
« Reply #135 on: 12 / November / 2010, 17:04:24 »
Bernd R

Here you have the new captseq, with this raw shoudl work,
and if the script for badpixel works, Dng shoudl work too.

http://www.4shared.com/file/NSBep9Qn/captseqcixus1000-100D-v003.html
« Last Edit: 13 / November / 2010, 04:51:59 by asm1989 »

Re: IXUS 1000 HS Porting Thread
« Reply #136 on: 13 / November / 2010, 03:47:39 »
great, i hope i get raw working.Have you try to compile the code ?

maybe a file you change is miss ?

I get a compile error in

stubs_auto.S:165: Error: invalid constant -- `ldr pc,=0xFF98BBFC0'
I find out what to do, the 0 is 1 number too much.

so i change code in capt_seq.c


"loc_FF98ACE4:\n"
         "BL      sub_FF98BBFC\n"

And now i get linker error,

========== F:\CHDK\DE\TRUNK\TRUNK958\BIN\LOGS\ERR-IXUS1000_SD4500-100D.TXT ==========

../platform/ixus1000_sd4500/sub/100d/libplatformsub.a(capt_seq.o): In function `sub_FF98ADD4_my':
capt_seq.c:(.text+0x330): undefined reference to `loc_FF98AE18'
../platform/ixus1000_sd4500/sub/100d/libplatformsub.a(capt_seq.o): In function `loc_FF98ACE8':
capt_seq.c:(.text+0x5c8): undefined reference to `loc_FF98AD40'
collect2: ld returned 1 exit status
F:\chdk\gcc\bin\gmake.exe[1]: *** [main.elf] Error 1
gmake: *** [all-recursive] Error 1
Ixus 1000 HS

*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: IXUS 1000 HS Porting Thread
« Reply #137 on: 13 / November / 2010, 04:51:11 »
Sorry, here you have the working version, compiles ok,
http://www.4shared.com/file/NSBep9Qn/captseqcixus1000-100D-v003.html

Now I have a cam, but its a diferent firmware 100F insetad of yours 100D, and there are some diferences in the subs addresses and some other mem adresess, and I need to change all them for your cam too.

Tested in 100F and generates raw file, not dng because I wasn't able to start the badpixel.lua script, maybe fullshutter is not ok?

you can focus on finishing kbd.c while I finish captseq and start movie too.


Re: IXUS 1000 HS Porting Thread
« Reply #138 on: 13 / November / 2010, 07:20:52 »
>you can focus on finishing kbd.c while I finish captseq and start movie too.

nice you have such a camera, what do you think about the press set button longer is alt mode ?
Or do you like more the right key and left key press together to enter alt mode ?

My idea on this set is only to add a beep in that code, so the User get a feedback that he have press the set Button long enough to go to alt mode, because i notice that i press most time longer than need.

with the beep its possible to reduce CAM_EMUL_KEYPRESS_DURATION  100 to old value.
if so, when a user hear the beep and press the button then 1 sec longer then he can reach original set button feature too.

maybe you know how can add a beep here.

   if ((timeval - 50) > last_setkey_time){
      kbd_new_state[1] = PRINTKEY_DUMMYCODE;

----->>> here there should come a beep sound(that can not switch off)

      //draw_txt_string(50, 14,"ALT KEY TOGGLE",

for more, i dont know how i should solve the chdk get key messages too late problem.I think there need look for a place before current to add that my_kybd_xxxx call

and here is better canon firmware knowledge need i think.

>Now I have a cam, but its a diferent firmware 100F insetad of yours 100D, and there are some >diferences in the subs addresses and some other mem adresess, and I need to change all them >for your cam too.

here is btw a review of the CAM.

http://www.trustedreviews.com/digital-cameras/review/2010/11/01/Canon-IXUS-1000-HS/p1

its really strange wy Canon use diffrent firmware and do not offer the newest Firmware for download for other.

Is there a reason know ?

>Tested in 100F and generates raw file, not dng because I wasn't able to start the >badpixel.lua script, maybe fullshutter is not ok?

I get raw files and it not crash, but picasa or raw therapie cant show this files.I search in inet, normaly it should work.

Can you show this files ?.If so what program you use ?

The files i get have all the size of 15.935.616 and named snd_xxxx.crw

I see there is also a file extension .jpg possible.are the files then store as jpg without denoise and sharpen by firmware ?

Problems i see:

When there is no dcim folder and directory on the Card, the camera crash with chdk after press shoot button.thats a real bad crash, because the lens is out when the camera is switch on again.

when i shoot a picture without chdk, the camera create the folder and store the picture correct.
But when i have raw enable, the camera do not show any picture that is record until i delete  the 104canon folder (which contain the raw files)

its also possible to rename this folder to _104canon, then camera show jpg pictures.
so i think for IX1000 the folder for RAW need use other name.

I use the chdk raw file in dir with jpg Option.my camera is set to create folder monthly
I have currently a folder 104___11.not sure if 3 _ or 4 _

when i disable the  "raw file in dir with jpg" Option, then it work better.

then there is a folder 100canon create and this is accept by the cam and the cam show the jpg in Folder 104___11

I dont know from what the 104 come.On my other card the dir is named 101___10

« Last Edit: 13 / November / 2010, 07:40:46 by Bernd R »
Ixus 1000 HS

*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: IXUS 1000 HS Porting Thread
« Reply #139 on: 13 / November / 2010, 10:41:05 »
I dont know the diferences between 100d and 100f, there is a 4byte offset in some of functions

About the key stuff, for my dosn't work allways with the set, I changed it for testing for up-right, and the result is moreless the same, maybe changing it for soft presses insted of hard one could be better,

The directory stuff with the raw files must be solved latter, but is a problem with the shuoting.c, #define PARAM_FILE_COUNTER      0x3A , must get the correct value for this param

I was able to open the raw if I include a fake badpixel.bin (once the kbd.c is working we can generate it withe the script) but the colors are not right, I think the rgb pattern ata camera.h is not right



 

Related Topics