PowerShot SX210 IS - Porting Thread - page 24 - General Discussion and Assistance - CHDK Forum supplierdeeply

PowerShot SX210 IS - Porting Thread

  • 589 Replies
  • 254926 Views
*

Offline pixeldoc2000

  • ****
  • 356
  • IXUS900Ti 1.00C, IXUS300HS 1.00D
    • pixel::doc homebase
Re: PowerShot SX210 IS - Porting Thread
« Reply #230 on: 14 / September / 2010, 13:39:19 »
Advertisements
pixeldoc :
how do you find feather bits?
Easy, do it like the keyboard bits:

Select your physw_status address in "Memory Browser" and enable "Show misc. values" in "Debug parameters" chdk menu:
physw_status <--------> KEYS_MASK0 (physw_status[0])
physw_status + 4 <---> KEYS_MASK1 (physw_status[1])
physw_status + 8  <--> KEYS_MASK2 (physw_status[2])

Compare "default" base value with value you get if you press key or feather (the corresonding bit at the RAM address does changes from 1 -> 0).

Code: [Select]
physw_status[1] = 0xFF = 1111 1111 (default)
physw_status[1] = 0xF7 = 1111 0111 (KEY_LEFT)
physw_status[1] = 0x7F = 0111 1111 (feather up)
KEYS_MASK1      = 0x88 = 1000 1000 (key + feather bit mask)

Created KEY_MASK by "adding" all bits as 1 whitch turned low on button press.

The KEY_MASK defines with bits chdk can override. We only want to override related bits, because other bits may control stuff like power or cause other things like crash or shutdown.
« Last Edit: 14 / September / 2010, 13:44:17 by pixeldoc2000 »

*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: PowerShot SX210 IS - Porting Thread
« Reply #231 on: 14 / September / 2010, 14:11:02 »
Thanks pixeldoc I will look at it since Harpoma do the mask stuff I didnt look at it

He gets these two:
#define KEYS_MASK0 (0x00002182)
#define KEYS_MASK1 (0x000FC005)

What I get is:
physw_status[1] = 0xffdbf  (default)
physw_status[1] = 0xf65bf (KEY_LEFT)
physw_status[1] = 0xff9bf  (feather up)

In other developments
I think the props for this new cameras change, so maybe testers can help.
-> For the testers, Another thing that will be usefull is to run this script -> propdump.lua
http://www.zshare.net/download/80399351c8ad9213/
and share the propdump.log file with us.
-> make one each time and delete it from the cammera, and take note of ISO, AV, TV, BW....... when you create this file,
share it and we will learn.

For example I made 3 pictures with ISO 80, 100 and 400 , and I get these props changing

PROP , ISO 80 , ISO 100, ISO  400
103  -> 8,9,-11
149 -> 80,100,400
198 ->  29343 , 3701 ,  -16586
271 ->   935  , 933  , 956

Looks like 149 is PROPCASE_ISO_MODE
what what props are PROPCASE_SV  and  PROPCASE_DELTA_SV



« Last Edit: 14 / September / 2010, 15:08:55 by asm1989 »

*

Offline pixeldoc2000

  • ****
  • 356
  • IXUS900Ti 1.00C, IXUS300HS 1.00D
    • pixel::doc homebase
Re: PowerShot SX210 IS - Porting Thread
« Reply #232 on: 14 / September / 2010, 15:22:31 »
He gets these two:
#define KEYS_MASK0 (0x00002182)
#define KEYS_MASK1 (0x000FC005)

What I get is:
physw_status[1] = 0xffdbf  (default)
physw_status[1] = 0xf65bf (KEY_LEFT)
physw_status[1] = 0xff9bf  (feather up)
feather mask should be 0x3C00 = 0011110000000000
0x000FC005 + 0x00003C00 = 0x000FFC05 (KEYS_MASK1 key + feather)
we need to mask feather bit to disable feather osd...
« Last Edit: 14 / September / 2010, 15:27:20 by pixeldoc2000 »

Re: PowerShot SX210 IS - Porting Thread
« Reply #233 on: 14 / September / 2010, 16:05:51 »
For the color matrix
http://dl.dropbox.com/u/4052319/DCIM.rar

3 palettes and two other photos in raw and jpg


*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: PowerShot SX210 IS - Porting Thread
« Reply #234 on: 14 / September / 2010, 17:26:05 »
Code: [Select]
0x000FC005 + 0x00003C00 = 0x000FFC05 (KEYS_MASK1 key + feather)
Thanks Pixeldoc, now works much better, even the histogram shows

Thanks rraauurr , if someone could generate the colormatrix will be very welcome!

*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: PowerShot SX210 IS - Porting Thread
« Reply #235 on: 14 / September / 2010, 18:22:32 »
More into props

Looks like its propset 3

Some of the values verified, trough debug
Code: [Select]
#define PROPCASE_USER_TV        266  //ASM1989 looks like
#define PROPCASE_TV         264  //ASM1989 looks like
#define PROPCASE_USER_AV      26   //ASM1989 looks like
#define PROPCASE_ISO_MODE     149    //ASM1989 looks like

so maybe the override problem is elsewere???

about Iso I find:

ISO    80  100 200  400 800 1600
PROP
248: 449 480 576  672 768  864
249: 371 411 507  603 699  795

so is this right????:
Code: [Select]
#define PROPCASE_SV            249
#define PROPCASE_DELTA_SV      79   
#define PROPCASE_SV_MARKET      248

anyway prop 79 dosnt change on iso change is it right, what does delta suposed to do??? Ho do I find it???



*

Offline pixeldoc2000

  • ****
  • 356
  • IXUS900Ti 1.00C, IXUS300HS 1.00D
    • pixel::doc homebase
Re: PowerShot SX210 IS - Porting Thread
« Reply #236 on: 14 / September / 2010, 18:45:27 »
Code: [Select]
0x000FC005 + 0x00003C00 = 0x000FFC05 (KEYS_MASK1 key + feather)
Thanks Pixeldoc, now works much better, even the histogram shows
You are welcome!
I'm happy we can share some work to get the job done (tm)  :D

*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: PowerShot SX210 IS - Porting Thread
« Reply #237 on: 14 / September / 2010, 18:54:01 »
Quote
I'm happy we can share some work to get the job done (tm)

Here to Help, since we have sister-cams :D

probably your cam uses propset 3, have you tried?

I find this http://chdk.setepontos.com/index.php/topic,2722.msg25533.html#msg25533 to automate search for props but didn't test it.
« Last Edit: 14 / September / 2010, 18:56:02 by asm1989 »


*

Offline pixeldoc2000

  • ****
  • 356
  • IXUS900Ti 1.00C, IXUS300HS 1.00D
    • pixel::doc homebase
Re: PowerShot SX210 IS - Porting Thread
« Reply #238 on: 14 / September / 2010, 19:35:08 »
Here to Help, since we have sister-cams :D
Yes, looks like SD4000 and SX210 share a lot of code. This make stuff easier!

probably your cam uses propset 3, have you tried?

I find this http://chdk.setepontos.com/index.php/topic,2722.msg25533.html#msg25533 to automate search for props but didn't test it.
I'm gonna test proset 3... used proset 2 without verifying it...


I've added JogDial support: http://chdk.setepontos.com/index.php/topic,5574.msg55004.html#msg55004 .

I verified this for SX210:
ROM:FF860858 taskcreate_RotarySw() -> ROM:FF860504 task_RotarySw() -> _sub_FF8608AC__JogDial.c__14()
Code: [Select]
ROM:FF8608F0                 LDR     R0, =0xC0240000 <---
ROM:FF8608F4                 MOV     R1, #2
ROM:FF8608F8                 STR     R1, [R0,#0x104] <---

JogDial events are also the same as SD4000.
« Last Edit: 14 / September / 2010, 22:08:08 by pixeldoc2000 »

*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: PowerShot SX210 IS - Porting Thread
« Reply #239 on: 15 / September / 2010, 02:48:36 »
Thanks pixeldoc, It was allready implemented in my kbd.c, and I think i worked so far

but the events I have
Code: [Select]
void JogDial_CW(void){
 _PostLogicalEventForNotPowerType(0x874, 2);  // RotateJogDialRight
}

void JogDial_CCW(void){
 _PostLogicalEventForNotPowerType(0x875, 2);  // RotateJogDialLeft
}

works the same with 874, 875 and 876 877, wierd
« Last Edit: 15 / September / 2010, 03:06:30 by asm1989 »

 

Related Topics