Esato

Forum > Sony Ericsson / Sony > Software, Firmware and Drivers > first prototype (v2) of supermode camdriver for K790/K800/K810

123 ... 111213  Next
Author first prototype (v2) of supermode camdriver for K790/K800/K810
Raiderski
C901 Black
Joined: Jul 03, 2006
Posts: > 500
From: Poland, Hell, Mountains
PM, WWW
Posted: 2008-01-27 11:51
Reply with quoteEdit/Delete This PostPrint this post
PROTOTYPE! THIS IS ONLY GUIDE FOR CAMDRIVER MODDERS! IF YOU ARE END-USER DO NOT INSTAL THIS DRIVER IN YOUR PHONE! SOME VALUES FOR FUNCTIONS MUST BE CORRECTED!

raider.4shared.com -> K790 K800 K810 -> prototype:
camdriver0.dat - version 1
camdriver02.dat - version 2

at last, nasty linear zoom functionality is overrided
it's big breakthrough because with this small feature we are able to use zoom keys (+/-) as we want (not for zoom only). for example:

1. we can control values of functions like manual focus, contrast, colors saturation etc.
2. modders can now in very easy way test many values as input parameter for register/command

this feature was a true revolution for K750/W800/W810 drivers, i hope it will be too for 3MP phones. ok, it's time for explanations...

1.
i'm using shorter names in code:
SET() = SET_REG()
CMD() = COM_EVENT()

i also reorganized code and i have free regE - previously it was used to store image stabilization state. currently this state is stored in regF as single bit. whole regF is used as set of various control bits (description what exactly is at bottom of source code). this is first supermode prototype that why not much of regF is used but believe me - free bits and free registers will be nedeed you can organize your code as you wish but in my code regE and regF are reserved for special purposes

VERSION 2
2.
continuous action slider with 30 steps

Code:

SC_RESET= $be 00 5 3; // reset state and direction
SC_ON= $be 01 7 1; // allow
SC_HOLD= $be 00 7 1; // hold
SC_ADD= #SC_ON $be 01 5 2; // add
SC_SUB= #SC_ON $be 02 5 2; // subtract
SC_VALUE= $m0 e $b0 00 5 3; // value to r0

...

seq_set_prop_19_0= #SC_RESET; // zoom stop (key released or min/max reached)
seq_set_prop_19_1= $d0096 #SC_ADD; // zoom in
seq_set_prop_19_2= $d0096 #SC_SUB; // zoom out

// refresh slide bar
seq_get_prop_1a=
$m1 e // cyclical update
$b1 00 0 7
$c1 80 // if move allowed
#SC_VALUE
$m1 e
$b1 00 7 1 $b1 00 0 5 // mask value bits
$c1 20
$+e 01
$cl
$c1 40
$-e 01
$cx
$cx
#SC_HOLD // hold next step
#SET_FUNCTION
$d0030
$cl // if holded then allow
#SC_ON
$cx

#SC_VALUE
$*0 02 $s1 40 $-1 r0 $m0 1
$s3 00 $s2 00 $s1 00;



$d0096 - 150ms which should delay slide. this is simply because one click action and slide action must be separated with small time gap. some users have "lazy finger" in one click action

$d0030 - delay before next steps

regE - as in previous prototype should be free but this time it doesn't keep value only but additional 3 control bits. max value = 30 steps. to get value use now: #SC_VALUE !! remember that macro must be declared in code before it will be used !!

#SET_FUNCTION - renamed #SELECT_FUNCTION with code prepared for 3 driver types (functionalities): standard, extended and supermode. this was solution used in my 2MP camdriver. you can remove additional code


VERSION 1
2.
now we have to override macros called after the zoom keys usage:


// stop zoom (key released)
seq_set_prop_19_0= ;

// zoom in
seq_set_prop_19_1=
$+e 01
#SELECT_FUNCTION;

// zoom out
seq_set_prop_19_2=
$-e 01
#SELECT_FUNCTION;


things to note:
- they are called only if slider can be moved in selected direction. so, if slider is at min (left) or max (right) border they won't be called. in this way there is no chance to go over 0 - max range. now you can ask what is max value of range, i will describe this in point 3 of this guide
- now you also know why i freed regE
- this isn't continuous action anymore. if you want to change value you must press zoom key or 3/6 key everytime. this is major disadvantage at the moment but maybe we will resolve this in future
- #SELECT_FUNCTION is macro where all actions "key pressed - do something" will be processed. you can put there anything. in prototype code i have typical supermode code structure: overrided EV functionality and functions connected to selected EV values

3.
we have overrided keys but we must also do something with zoom slider - it must show correct value (regE)


// controls slide bar steps
seq_get_prop_1a=
$m1 e
$*1 03
$s0 40
$-0 r1

$s3 00 $s2 00 $s1 00;


code is very easy - set slider at value from reg0. previously in reg0 was zoom value, now we have to put value of regE but this isn't so easy. slider is prepared only for zoom values:

40 = x1.0 (min, left)
3F = x1.0
3E = x1.0
3D = x1.0
3C = x1.1
...
06 = x10.7
05 = x12.8
04 = x16.0 (max, right)

as you can see slider range is 40 - 04. we must convert value from regE to this range. look at italic code part - this is conversion. bolded value can be used to control how much steps will be between min - max values:

01 = 60 steps
02 = 30
03 = 20

4.
last step. below code is old zoom functionality (known from 2MP phones) and it is used in video telephony. unfortunately it's also called after normal snapshot. so, if you used zoom keys to control, for example, manual focus and slider is not on 0 then after snapshot zoom will be applied to viewfinder. looks like bug so we have to fix this


seq_set_prop_6=
// allow zoom only for VT
$s0 00
$z1
$c1 19 // VT normal
$s0 01
$cl
$c1 20 // VT night
$s0 01
$cx
$cx

$c0 01
#SET(3d,3c)
#SET(3e,01)
$s4 %0 $s5 40 $*5 0a $/5 r4
#CMD(61,$w5)
$cx;


that's all


_________________
K800 R1KG001 (driver in development)
raider.4shared.com
flickr.com/photos/raiderek

[ This Message was edited by: Raiderski on 2008-01-31 11:36 ]
tranced
LG Nexus 4
Joined: Jan 19, 2006
Posts: > 500
From: Santo Domingo, wonDeRland
PM
Posted: 2008-01-27 12:14
Reply with quoteEdit/Delete This PostPrint this post
@raiderski: it's a big step! a lot of ppl will be happy now

congrats for this.
I jay0726 | (+3, 0) | Clara, Evita, Mimmi & Victoria | My Pics | Do your job!
Mike2
T630
Joined: Feb 04, 2005
Posts: 322
From: Thessaloniki, Greece
PM, WWW
Posted: 2008-01-27 12:24
Reply with quoteEdit/Delete This PostPrint this post
Finally!
EM camera driver modding is about to begin!

Btw, what happens to the zoom?
Do we lose it?
I've never used a K750/etc EM camdriver, so I don't know what happens to it.

Also, will we be able to actually force ISO, exposure, etc now (I guess not ) ?
Genus' camdriver couldn't always force ISO and exposure.
jomateixa
C901 Silver
Joined: Dec 09, 2007
Posts: > 500
From:
PM
Posted: 2008-01-27 12:28
Reply with quoteEdit/Delete This PostPrint this post
LOL Raider you're a legend
tranced
LG Nexus 4
Joined: Jan 19, 2006
Posts: > 500
From: Santo Domingo, wonDeRland
PM
Posted: 2008-01-27 12:29
Reply with quoteEdit/Delete This PostPrint this post
@mike: zoom is not lost. we can use zoom while macro mode is on.

see the super camdriver thread(1st post): http://www.esato.com/board/viewtopic.php?topic=135737
I jay0726 | (+3, 0) | Clara, Evita, Mimmi & Victoria | My Pics | Do your job!
Raiderski
C901 Black
Joined: Jul 03, 2006
Posts: > 500
From: Poland, Hell, Mountains
PM, WWW
Posted: 2008-01-27 13:41
Reply with quoteEdit/Delete This PostPrint this post
zoom in this prototype is at EV +0.7 but value isn't fitted properly and effect is visible just after half slider position. almost all functions have not well-fitted values - pure demo only if someone want to try:

EV -0.7 - colors saturation (0 = auto, 1 - 20 = black&white - oversaturated)
EV -0.3 - contrast (0 = default, 1 - 8 = bigger)
EV 0.0 - focus (0 = auto, >0 = manual)
EV +0.3 - exposure (somewhere at the end of slider)
EV +0.7 - zoom (after half slider position)

now we can go in many directions with code and extend functionality from simplest thing (manual focus) to additional supermode functions

thing to do:
- continuous value change, not by click-click-click (it's booooring!)
- understand why commands doesn't take effect after focusing. because of this we cannot set long exposure time as "temporary EM solution" or even change contrast, exposure compensation etc. that's bad


_________________
K800 R1KG001 (driver in development)
W800 CID36 R1BD001 (driver 6.7.2)
raider.4shared.com
flickr.com/photos/raiderek

[ This Message was edited by: Raiderski on 2008-01-27 12:43 ]
SonarikK510
W610 Orange
Joined: Oct 15, 2007
Posts: 156
From: Saratov, Russia Federation
PM
Posted: 2008-01-27 13:46
Reply with quoteEdit/Delete This PostPrint this post
Thanks, Raiderski, my friend
W610 + M2 512Mb + HBH-DS970 + Patches + Flash menus + Language edit + Most High Quality camdriver ( by me ) + many other......
SonarikK510
W610 Orange
Joined: Oct 15, 2007
Posts: 156
From: Saratov, Russia Federation
PM
Posted: 2008-01-27 14:23
Reply with quoteEdit/Delete This PostPrint this post
Can you help me with written some code for camdriver?
I want: 1) Usually EV correction in my camdriver
2) But, by enable Sepia effect EV correction change to Manual Shutter speed.
This is real or not? Zoom keys is inactive on K550/W610, unfortunalely... and i can't use Supermod settings from Super camera driver for K750/W810.....

I am wrote some code, check it:
$p1 08 // if effect
$c1 03 // Sepia is enabled
$s5 %0 $-5 09 #COM_EVENT(04,$w5); // then change shutter by EV correction

Thanks. You are a God of camdrv editing
W610 + M2 512Mb + HBH-DS970 + Patches + Flash menus + Language edit + Most High Quality camdriver ( by me ) + many other......
SonarikK510
W610 Orange
Joined: Oct 15, 2007
Posts: 156
From: Saratov, Russia Federation
PM
Posted: 2008-01-27 14:29
Reply with quoteEdit/Delete This PostPrint this post
And, Raider, how you think - bigger file size (about 700-800kb average) gives a more quality to photo, with comparison original values of file sizes about 470-520kb?
W610 + M2 512Mb + HBH-DS970 + Patches + Flash menus + Language edit + Most High Quality camdriver ( by me ) + many other......
Kriomag
W810 black
Joined: Dec 20, 2006
Posts: > 500
From: Poland
PM, WWW
Posted: 2008-01-27 14:40
Reply with quoteEdit/Delete This PostPrint this post
GRATULACJE!
LaurensB
K800 Black
Joined: Nov 28, 2007
Posts: 35
PM
Posted: 2008-01-27 15:22
Reply with quoteEdit/Delete This PostPrint this post
Awesome! Thanks for this
pietropizzi
K800 Black
Joined: Nov 16, 2007
Posts: 130
From: Vienna
PM
Posted: 2008-01-27 16:15
Reply with quoteEdit/Delete This PostPrint this post
Here we go:

First Prototype of OSD (On Screen Menue) for SM




How I did that:

Enlarged the Zoombar horizontally and vertically
Enlarged the Blue Stick vertically
Deleted the chicken
made vkp and patched --> Works

Conclusion:
We can easily make a transparent (!!!) menue with all SM settings !

To check:
*) Zoombar using whole top area --> Make Stick jump larger ?
*) right Scale numbers, scaling on images are just examples



[ This Message was edited by: pietropizzi on 2008-01-27 15:16 ]

[ This Message was edited by: pietropizzi on 2008-01-27 15:19 ]
milan91
K800 Black
Joined: Jun 04, 2006
Posts: > 500
From: Europe
PM
Posted: 2008-01-27 16:31
Reply with quoteEdit/Delete This PostPrint this post
Awesome!...
Good job raiderski and pietropizzi
SonarikK510
W610 Orange
Joined: Oct 15, 2007
Posts: 156
From: Saratov, Russia Federation
PM
Posted: 2008-01-27 17:04
Reply with quoteEdit/Delete This PostPrint this post
pietropizzi, great!!!! Editing of camdrivers step to next stage!!
Also, we can change GUI camera!
W610 + M2 512Mb + HBH-DS970 + Patches + Flash menus + Language edit + Most High Quality camdriver ( by me ) + many other......
Mike2
T630
Joined: Feb 04, 2005
Posts: 322
From: Thessaloniki, Greece
PM, WWW
Posted: 2008-01-27 17:14
Reply with quoteEdit/Delete This PostPrint this post

On 2008-01-27 16:15:43, pietropizzi wrote:
Here we go:

First Prototype of OSD (On Screen Menue) for SM

[...]


I'm sorry, but this doesn't look like an OSM to me.
It just displays information of what each EV value does. It doesn't allow you to change anything.
Access the forum with a mobile phone via esato.mobi
123 ... 111213  Next
Goto page:
Lock this Topic Move this Topic Delete this Topic