//Hybrid Version 2.72 //This is a guide by Aksd //Changes in this driver: //Sharpness incresed form 15 to 16 //Change in contrast // // // // // // // // //***************************************************************************** //Information section-This is your camera version details-All values must be in hex-Eg:2.49=2.72 //========================================================= info_name=KNC 201 15; info_vendor=aksd; info_major_ver=2; info_minor_ver=49; //Camera characteristics section-This section is not to be tampered with a change in the smallest value results in camera crashing //========================================================= cam_power_on_0 = 5, 0, 0, 1, 5; cam_power_on_1 = 5, 1, 35, 1, 0; cam_power_on_2 = 5, 2, 35, 1, 5; cam_power_on_3 = 5, 5, 6, 1, 10; cam_power_on_4 = 5, 1, 46, 1, 0; cam_power_on_5 = 5, 2, 46, 1, 5; cam_power_on_6 = 5, 3, 1, 32C8, 5; cam_power_on_7 = 5, 0, 0, 0, 1F4; cam_power_off_0= 5, 0, 0, 1, 0; cam_power_off_1= 5, 3, 1, 1, 0; cam_power_off_2= 5, 1, 46, 1, 0; cam_power_off_3= 5, 2, 46, 0, 0; cam_power_off_4= 5, 5, 6, 0, 0; cam_power_off_5= 5, 1, 35, 1, 0; cam_power_off_6= 5, 2, 35, 0, 0; cam_i2c_address=1F; cam_vf_clock_freq=1,32C8; cam_ss_clock_freq=1,32C8; cam_vf_format=B100; cam_ss_format=0001; cam_ss_format_9=B100; cam_ss_format_30=B100; cam_data_offset_9=0; cam_data_offset_30=0; cam_ss_sync_30=3; cam_data_offset=2; cam_vf_sync=7; cam_ss_sync=7; cam_ss_retries=9; //-- JPEG buffer sizes (only used for ITP)- This does NOT change your buffer size increasing the buffer will result in the camera crashing. All values of the buffer are hrardcoded into the internal OS cam_ss_jpeg_buf_size_1=3A98; // 15 KB buffer for 100x60 snap cam_ss_jpeg_buf_size_2=88B8; // 35 KB buffer for 160x120 snap cam_ss_jpeg_buf_size_3=186A0; // 100 KB buffer for 320x240 snap cam_ss_jpeg_buf_size_4=249f0; // 150 KB buffer for 640x480 snap cam_ss_jpeg_buf_size_5=61A80; // 400 KB buffer for 1280x960 snap cam_ss_jpeg_buf_size_6=927C0; // 600 KB buffer for 1600x1200 snap cam_ss_jpeg_buf_size_7=927C0; // 600 KB buffer for 1632x1088 snap cam_ss_jpeg_buf_size_8=927C0; // 600 KB buffer for 1632x1244 snap /SUPPORTED SIZES-same as in buffer change in the size values does not result in actual change in resolution //=============== // CAPTURE MODE // 1 = 100 x 60 2 = 160 x 120 3 = 320 x 240 // 4 = 640 x 480 5 = 1280x 960 6 = 1600x1200 // 7 = 1632x1088 8 = 1632x1224 // 9 = 640 x 480 YUV format // DRAFT MODE // 11 = 100 x 60 12 = 160 x 120 13 = 220 x 146 // 14 = 220 x 165 15 = 236 x 177 // VR MODE // 21 = 128 x 96 Normal mode // 22 = 128 x 96 Night mode // 23 = 176 x 144 Normal mode // 24 = 176 x 144 Night mode sup_sizes=1[64,3C,0],2[A0,78,0],3[140,F0,0], 4[280,1E0,0],5[500,3C0,0],6[640,4B0,0], 7[660,440,0],8[660,4C8,0],9[280,1E0,0], 11[64,3C,5DC],12[A0,78,5DC],13[DC,92,5DC], 14[DC,A5,5DC],15[EC,B1,5DC], 21[80,60,3E8],22[80,60,2EE],23[B0,90,3E8], 24[B0,90,2EE],30[4E,90,0]; //========================================================= //Properties: 0 = Exposure // 1 = White balance // 2 = Flicker // 3 = Vertical mirror // 4 = Horisontal mirror // 5 = JPEG Compression level // 6 = Zoom // 7 = Night mode // 8 = Effect // 9 = Focus mode // a = Focus operation // b = Exif (Read only) // c = Qtable info (Read only) // d = LED support // e = Flash support // f = Power save mode // 10 = Scene // 11 = ISO // 12 = Auto exposure // 13 = Brightness // 14 = Contrast // 15 = Sharpening // 16 = ITP focus test // 17 = ITP focus test // 18 = Spot sup_properties=0[0,15,9],1[0,6,0],2[0,3,1],3[0,1,0], 4[0,1,0],5[0,1,0],6[a,28,a],7[0,1,0], 8[0,4,0],9[0,4,0],a[0,2,0],b[0,4,0], c[0,ff,0],d[0,1,0],e[0,2,0],f[0,1,0], 10[0,7,0],11[0,d,0],12[0,ff,0],13[0,15,7], 14[0,16,8],15[0,16,8],18[0,7,0]; //I2C sequence section //========================================================= //--------------------------------------------------------- // Description of internal register usage: // // a: used to select EXIF parameter to read // e: used to remember last size id for snapshot burst mode // //--------------------------------------------------------- CMD_END=$f $d0005; //--------------------------------------------------------- //These two lines controls the locked frame rate in VR. //Use them to test different settings! //The value entered is the desired frame rate * 4. //Example: 3C means 0x3C = 60 => frame rate 60 / 4 = 15 fps VR_NORMAL_MODE_FR=3C; VR_NIGHT_MODE_FR=30; //--------------------------------------------------------- READ_AF_STATUS=05 01 00 03 03 $f $r4 4 4 4 5 $c5 E6 $cl $s4 03 $cx; READ_JPEG_STATUS=05 01 00 03 03 $f $r4 4 4 4 5 $c5 E3 $cl $d0005 05 01 00 03 03 $f $r4 4 4 4 5 $c5 E3 $cl $d0005 05 01 00 03 03 $f $r4 4 4 4 5 $c5 E3 $cl $d0005 05 01 00 03 03 $f $r4 4 4 4 5 $c5 E3 $cl $d0005 05 01 00 03 03 $f $r4 4 4 4 5 $c5 E3 $cl $d0005 05 01 00 03 03 $f $r4 4 4 4 5 $c5 E3 $cl $d0005 05 01 00 03 03 $f $r4 4 4 4 5 $c5 E3 $cl $s4 01 $cx $cx $cx $cx $cx $cx $cx; WAIT_FOR_MODE_TRANSITION=05 01 00 03 03 $f $r4 4 4 4 5 $c5 EA $cl $d000a 05 01 00 03 03 $f $r4 4 4 4 5 $c5 EA $cl $d000a 05 01 00 03 03 $f $r4 4 4 4 5 $c5 EA $cl $d000a 05 01 00 03 03 $f $r4 4 4 4 5 $c5 EA $cl $d000a 05 01 00 03 03 $f $r4 4 4 4 5 $c5 EA $cl $d000a 05 01 00 03 03 $f $r4 4 4 4 5 $c5 EA $cl $d000a 05 01 00 03 03 $f $r4 4 4 4 5 $c5 EA $cl $d000a 05 01 00 03 03 $f $r4 4 4 4 5 $c5 EA $cl $d000a 05 01 00 03 03 $f $r4 4 4 4 5 $c5 EA $cl $d000a 05 01 00 03 03 $f $r4 4 4 4 5 $c5 EA $cl $d000a 05 01 00 03 03 $f $r4 4 4 4 5 $c5 EA $cl $d000a 05 01 00 03 03 $f $r4 4 4 4 5 $c5 EA $cl $d000a 05 01 00 03 03 $f $r4 4 4 4 5 $c5 EA $cl $d000a 05 01 00 03 03 $f $r4 4 4 4 5 $c5 EA $cl $d000a 05 01 00 03 03 $f $r4 4 4 4 5 $c5 EA $cl $d000a 05 01 00 03 03 $f $r4 4 4 4 5 $c5 EA $cl $d000a 05 01 00 03 03 $f $r4 4 4 4 5 $c5 EA $cl $d000a 05 01 00 03 03 $f $r4 4 4 4 5 $c5 EA $cl $d000a 05 01 00 03 03 $f $r4 4 4 4 5 $c5 EA $cl $d000a 05 01 00 03 03 $f $r4 4 4 4 5 $c5 EA $cl $d000a 05 01 00 03 03 $f $r4 4 4 4 5 $c5 EA $cl $d000a 05 01 00 03 03 $f $r4 4 4 4 5 $c5 EA $cl $d000a 05 01 00 03 03 $f $r4 4 4 4 5 $c5 EA $cl $d0010 05 01 00 03 03 $f $r4 4 4 4 5 $c5 EA $cl $d0010 05 01 00 03 03 $f $r4 4 4 4 5 $c5 EA $cl $d0010 05 01 00 03 03 $f $r4 4 4 4 5 $c5 EA $cl $d0020 05 01 00 03 03 $f $r4 4 4 4 5 $c5 EA $cl $d0020 05 01 00 03 03 $f $r4 4 4 4 5 $c5 EA $cl $d0040 05 01 00 03 03 $f $r4 4 4 4 5 $c5 EA $cl $d0040 05 01 00 03 03 $f $r4 4 4 4 5 $c5 EA $cl $d0100 $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx; WAIT_FOR_CAPT_START=05 01 00 03 03 $f $r4 4 4 4 5 $c5 E4 $cl $d000a 05 01 00 03 03 $f $r4 4 4 4 5 $c5 E4 $cl $d000a 05 01 00 03 03 $f $r4 4 4 4 5 $c5 E4 $cl $d000a 05 01 00 03 03 $f $r4 4 4 4 5 $c5 E4 $cl $d000a 05 01 00 03 03 $f $r4 4 4 4 5 $c5 E4 $cl $d000a 05 01 00 03 03 $f $r4 4 4 4 5 $c5 E4 $cl $d000a 05 01 00 03 03 $f $r4 4 4 4 5 $c5 E4 $cl $d000a 05 01 00 03 03 $f $r4 4 4 4 5 $c5 E4 $cl $d000a 05 01 00 03 03 $f $r4 4 4 4 5 $c5 E4 $cl $d000a 05 01 00 03 03 $f $r4 4 4 4 5 $c5 E4 $cl $d000a 05 01 00 03 03 $f $r4 4 4 4 5 $c5 E4 $cl $d000a 05 01 00 03 03 $f $r4 4 4 4 5 $c5 E4 $cl $d000a 05 01 00 03 03 $f $r4 4 4 4 5 $c5 E4 $cl $d000a 05 01 00 03 03 $f $r4 4 4 4 5 $c5 E4 $cl $d000a 05 01 00 03 03 $f $r4 4 4 4 5 $c5 E4 $cl $d000a 05 01 00 03 03 $f $r4 4 4 4 5 $c5 E4 $cl $d000a 05 01 00 03 03 $f $r4 4 4 4 5 $c5 E4 $cl $d000a 05 01 00 03 03 $f $r4 4 4 4 5 $c5 E4 $cl $d000a 05 01 00 03 03 $f $r4 4 4 4 5 $c5 E4 $cl $d000a 05 01 00 03 03 $f $r4 4 4 4 5 $c5 E4 $cl $d000a 05 01 00 03 03 $f $r4 4 4 4 5 $c5 E4 $cl $d000a 05 01 00 03 03 $f $r4 4 4 4 5 $c5 E4 $cl $d000a 05 01 00 03 03 $f $r4 4 4 4 5 $c5 E4 $cl $d0010 05 01 00 03 03 $f $r4 4 4 4 5 $c5 E4 $cl $d0010 05 01 00 03 03 $f $r4 4 4 4 5 $c5 E4 $cl $d0010 05 01 00 03 03 $f $r4 4 4 4 5 $c5 E4 $cl $d0020 05 01 00 03 03 $f $r4 4 4 4 5 $c5 E4 $cl $d0020 05 01 00 03 03 $f $r4 4 4 4 5 $c5 E4 $cl $d0040 05 01 00 03 03 $f $r4 4 4 4 5 $c5 E4 $cl $d0040 05 01 00 03 03 $f $r4 4 4 4 5 $c5 E4 $cl $d0100 $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx; WAIT_FOR_POWER_SAVE_ENTER=05 01 00 03 03 $f $r4 4 4 4 5 $c5 ED $cl $d0010 05 01 00 03 03 $f $r4 4 4 4 5 $c5 ED $cl $d0010 05 01 00 03 03 $f $r4 4 4 4 5 $c5 ED $cl $d0010 05 01 00 03 03 $f $r4 4 4 4 5 $c5 ED $cl $d0010 05 01 00 03 03 $f $r4 4 4 4 5 $c5 ED $cl $d0010 05 01 00 03 03 $f $r4 4 4 4 5 $c5 ED $cl $d0020 05 01 00 03 03 $f $r4 4 4 4 5 $c5 ED $cl $d0020 05 01 00 03 03 $f $r4 4 4 4 5 $c5 ED $cl $d0020 05 01 00 03 03 $f $r4 4 4 4 5 $c5 ED $cl $d0020 05 01 00 03 03 $f $r4 4 4 4 5 $c5 ED $cl $d0020 05 01 00 03 03 $f $r4 4 4 4 5 $c5 ED $cl $d0020 05 01 00 03 03 $f $r4 4 4 4 5 $c5 ED $cl $d0020 05 01 00 03 03 $f $r4 4 4 4 5 $c5 ED $cl $d0020 05 01 00 03 03 $f $r4 4 4 4 5 $c5 ED $cl $d0020 05 01 00 03 03 $f $r4 4 4 4 5 $c5 ED $cl $d0040 05 01 00 03 03 $f $r4 4 4 4 5 $c5 ED $cl $d0040 05 01 00 03 03 $f $r4 4 4 4 5 $c5 ED $cl $d0040 05 01 00 03 03 $f $r4 4 4 4 5 $c5 ED $cl $d0040 05 01 00 03 03 $f $r4 4 4 4 5 $c5 ED $cl $d0040 05 01 00 03 03 $f $r4 4 4 4 5 $c5 ED $cl $d0100 $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx; WAIT_FOR_POWER_SAVE_LEAVE=05 01 00 03 03 $f $r4 4 4 4 5 $c5 EC $cl $d0020 05 01 00 03 03 $f $r4 4 4 4 5 $c5 EC $cl $d0020 05 01 00 03 03 $f $r4 4 4 4 5 $c5 EC $cl $d0020 05 01 00 03 03 $f $r4 4 4 4 5 $c5 EC $cl $d0020 05 01 00 03 03 $f $r4 4 4 4 5 $c5 EC $cl $d0020 05 01 00 03 03 $f $r4 4 4 4 5 $c5 EC $cl $d0020 05 01 00 03 03 $f $r4 4 4 4 5 $c5 EC $cl $d0020 05 01 00 03 03 $f $r4 4 4 4 5 $c5 EC $cl $d0020 05 01 00 03 03 $f $r4 4 4 4 5 $c5 EC $cl $d0020 05 01 00 03 03 $f $r4 4 4 4 5 $c5 EC $cl $d0020 05 01 00 03 03 $f $r4 4 4 4 5 $c5 EC $cl $d0040 05 01 00 03 03 $f $r4 4 4 4 5 $c5 EC $cl $d0040 05 01 00 03 03 $f $r4 4 4 4 5 $c5 EC $cl $d0040 05 01 00 03 03 $f $r4 4 4 4 5 $c5 EC $cl $d0040 05 01 00 03 03 $f $r4 4 4 4 5 $c5 EC $cl $d0040 05 01 00 03 03 $f $r4 4 4 4 5 $c5 EC $cl $d0040 05 01 00 03 03 $f $r4 4 4 4 5 $c5 EC $cl $d0100 05 01 00 03 03 $f $r4 4 4 4 5 $c5 EC $cl $d0200 05 01 00 03 03 $f $r4 4 4 4 5 $c5 EC $cl $d0400 05 01 00 03 03 $f $r4 4 4 4 5 $c5 EC $cl $d0800 $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx; //The get sensor is something to do with your focusing still have'nt figured it out GET_SENSOR_VERSION= 05 01 00 36 01 $f $r2 0 0 $c0 00 05 01 00 36 01 $f $r2 0 0 $c0 00 05 01 00 36 01 $f $r2 0 0 $>0 7 $c0 01 $sf 01 $cl $sf 00 $cx $cl $>0 7 $c0 01 $sf 01 $cl $sf 00 $cx $cx $cl $>0 7 $c0 01 $sf 01 $cl $sf 00 $cx $cx; seq_ping=; // The next few lines uptill Exposure are your driver intialisations seq_init=05 02 00 0B D0 #CMD_END 05 02 00 0C 07 #CMD_END //JPEG retry time max 2 sec 06 02 00 01 00 52 #CMD_END //Default no mirroring 05 02 00 18 00 #CMD_END //JPEG continuos mode infinite 06 02 00 01 03 41 //Full range focus mode - I have changed the focusing from Normal(=0) to full range(=3) 06 02 00 01 10 56 #CMD_END // Sharpness 16 - Note: All values in the driver are in hedx therefore I assumed this value to be hex too(Hex 10 = Dec 16 which is max sharpness) 06 02 00 01 01 55 #CMD_END; // Contrast 1-This is more like exposure....altering this value increases exposure #GET_SENSOR_VERSION; // If we were to include another line (06 02 00 01 01 08 #CMD_END) this would enable Spot //************************************************ // Exposure property 0 *******(THis is the exposure setting taken from the W900) //************************************************ // 0 => -3 EV, 1=> -(2 2/3) EV .... 15=> 2 EV //--------------------------------------------------- seq_set_prop_0=$s0 %0 $-0 09 $b0 00 5 3 06 02 00 01 $w0 06 #CMD_END; seq_get_prop_0 = $s1 08 $s0 08; seq_get_prop_0 = $s1 08 $s0 08; //************************************************ // White balance, property 1 ******* //************************************************ // 0 => auto 1 => tungsten 2 => fluorescent // 3 => clear sky 4 => cloudy // 5 => one push 6 => hold //--------------------------------------------------- seq_set_prop_1_0=06 02 00 01 00 11 #CMD_END; seq_set_prop_1_1=06 02 00 01 03 11 #CMD_END; seq_set_prop_1_2=06 02 00 01 04 11 #CMD_END; seq_set_prop_1_3=06 02 00 01 05 11 #CMD_END; seq_set_prop_1_4=06 02 00 01 06 11 #CMD_END; seq_set_prop_1_5=06 02 00 01 07 11 #CMD_END; seq_set_prop_1_6=06 02 00 01 01 11 #CMD_END; //**************************************************** // Flicker correction, property 2 ******* //**************************************************** // 0 => auto, 1 => 50 Hz, 2 => 60 Hz, 3 => disable // //--------------------------------------------------- seq_set_prop_2_0=06 02 00 01 01 21 #CMD_END; //Auto detect seq_set_prop_2_1=06 02 00 01 02 21 #CMD_END; //50Hz detect seq_set_prop_2_2=06 02 00 01 03 21 #CMD_END; //60Hz detect seq_set_prop_2_3=06 02 00 01 00 21 #CMD_END; //Disable //**************************************************** // Vertical mirroring, property 3 ******* //**************************************************** // // 0 => off, 1 => on // //--------------------------------------------------- seq_set_prop_3=$s0 00 $b0 %0 1 1 $b0 %0 3 1 $p1 04 $c1 00 $b0 00 0 1 $b0 00 2 1 $cl $b0 01 0 1 $b0 01 2 1 $cx 06 02 00 01 $w0 52 #CMD_END; //**************************************************** // Horizontal mirroring, property 4 ***** //**************************************************** // 0 => off, 1 => on // //--------------------------------------------------- seq_set_prop_4=$s0 00 $b0 %0 0 1 $b0 %0 2 1 $p1 03 $c1 00 $b0 00 1 1 $b0 00 3 1 $cl $b0 01 1 1 $b0 01 3 1 $cx 06 02 00 01 $w0 52 #CMD_END; // ----------- JPEG compression property 5 ---------- // // 0 => normal, 1 => fine (low compression) // //--------------------------------------------------- SET_JPEG_MAX=06 02 00 0D !1 !0 #CMD_END; //Change in any of these values which the last two values eg: 0D which arte in hex results in crashing of the driver SET_JPEG_MIN=06 02 00 0F !1 !0 #CMD_END; SET_JPEG_AVG=06 02 00 11 !1 !0 #CMD_END; //SET_JPEG_QUALITY=07 02 00 13 !0 !1 !2 #CMD_END; // INIT, AVE, LAST-THis line is present in earlier cam drovers its absent in R1CA SET_JPEG_QUALITY= $p1 0e // Check if accessory flash is connected $c1 01 // If accessory flash is connected... $s2 50 // ...then use a hardcoded compression value-THis line sets the compression for MXE-60 do not cross 50 or else your flash will stop working #SET_JPEG_MIN(00,01) // ...and change the min size limit to 1KB $cx // End if 07 02 00 13 $w2 $w2 $w2 #CMD_END; // INIT, AVE, LAST //========================================================= // Normal quality settings: // MIN MAX AVG COMPRESSION for initial, average and last quality // 100 x 60: 1 15 5 75 // 160 x 120: 1 25 8 75 // 320 x 240: 1 40 15 75 // 640 x 480: 10 150 55 75 // 1280 x 960: 60 370 150 75 // 1600 x1200: 130 580 370 75 // 1632 x1088: 125 530 360 75 // 1632 x1224: 150 600 400 75 //========================================================= seq_set_prop_5_0=$z0 $s2 50 // Keep in mind which compression value to use... $c0 01 #SET_JPEG_MIN(00,01) #SET_JPEG_MAX(00,0F) #SET_JPEG_AVG(00,05) #SET_JPEG_QUALITY $cl $c0 02 #SET_JPEG_MIN(00,01) #SET_JPEG_MAX(00,19) #SET_JPEG_AVG(00,08) #SET_JPEG_QUALITY $cl $c0 03 #SET_JPEG_MIN(00,01) #SET_JPEG_MAX(00,28) #SET_JPEG_AVG(00,0F) #SET_JPEG_QUALITY $cl $c0 04 #SET_JPEG_MIN(00,0A) #SET_JPEG_MAX(00,96) #SET_JPEG_AVG(00,37) #SET_JPEG_QUALITY $cl $c0 05 #SET_JPEG_MIN(00,3C) #SET_JPEG_MAX(01,72) #SET_JPEG_AVG(00,96) #SET_JPEG_QUALITY $cl $c0 06 #SET_JPEG_MIN(00,82) #SET_JPEG_MAX(02,44) #SET_JPEG_AVG(01,72) #SET_JPEG_QUALITY $cl $c0 07 #SET_JPEG_MIN(00,7D) #SET_JPEG_MAX(02,12) #SET_JPEG_AVG(01,68) #SET_JPEG_QUALITY $cl $c0 08 #SET_JPEG_MIN(00,96) #SET_JPEG_MAX(02,58) #SET_JPEG_AVG(01,90) #SET_JPEG_QUALITY $cx $cx $cx $cx $cx $cx $cx $cx; //========================================================= // Fine quality settings: // MIN MAX AVG COMPRESSION for initial, average and last quality // 100 x 60: 1 15 8 90 // 160 x 120: 1 25 15 90 // 320 x 240: 1 40 20 90 // 640 x 480: 10 150 80 90 // 1280 x 960: 100 400 300 90 // 1600 x1200: 360 590 480 90 // 1632 x1088: 350 550 440 90 // 1632 x1224: 400 600 500 90 //========================================================= seq_set_prop_5_1=$z0 $s2 5e // Keep in mind which compression value to use... $c0 01 #SET_JPEG_MIN(00,01) #SET_JPEG_MAX(00,0F) #SET_JPEG_AVG(00,08) #SET_JPEG_QUALITY $cl $c0 02 #SET_JPEG_MIN(00,01) #SET_JPEG_MAX(00,19) #SET_JPEG_AVG(00,0F) #SET_JPEG_QUALITY $cl $c0 03 #SET_JPEG_MIN(00,01) #SET_JPEG_MAX(00,28) #SET_JPEG_AVG(00,14) #SET_JPEG_QUALITY $cl $c0 04 #SET_JPEG_MIN(00,0A) #SET_JPEG_MAX(00,96) #SET_JPEG_AVG(00,50) #SET_JPEG_QUALITY $cl $c0 05 #SET_JPEG_MIN(00,64) #SET_JPEG_MAX(01,90) #SET_JPEG_AVG(01,2C) #SET_JPEG_QUALITY $cl $c0 06 #SET_JPEG_MIN(01,68) #SET_JPEG_MAX(02,4E) #SET_JPEG_AVG(01,E0) #SET_JPEG_QUALITY $cl $c0 07 #SET_JPEG_MIN(01,5E) #SET_JPEG_MAX(02,26) #SET_JPEG_AVG(01,B8) #SET_JPEG_QUALITY $cl $c0 08 #SET_JPEG_MIN(01,90) #SET_JPEG_MAX(02,58) #SET_JPEG_AVG(01,F4) #SET_JPEG_QUALITY $cx $cx $cx $cx $cx $cx $cx $cx; //************************************ // Zoom, property 6 ***** //************************************ // 10 => 1.0 x zoom, 11 => 1.1 x zoom, ... 40 => 4.0 x zoom // seq_set_prop_6_a=06 02 00 01 00 61; // Value 10 => 1.0 x zoom => no zoom, set value 0 // The formula below will calculate the closest possible zoom settings. // This will result in the following register values for 1.1 ... 4.0: // 3A,35,31,2E,2B,28,26,24,22,20,1E,1D,1C,1B,1A,19,18,17,16,15,15,14,13,13,12,12,11,11,10,10 // seq_set_prop_6=$s0 0a $<0 6 $s1 %0 $>1 1 $+0 r1 $/0 %0 06 02 00 01 $w0 61 #CMD_END; //****************************************** // Night mode, property 7 *****(THIS IS IMPORTANT) //****************************************** seq_set_prop_7_0=06 02 00 01 28 03 #CMD_END // Slowshutter locked at min 20 fps => 10 fps draft mode 05 02 00 08 5f #CMD_END // 30fps => 15 fps, Normal mode- This sentance is basically your aperture/shutter controls for normal mode increse to increase the aperture/shutter 06 02 00 01 81 34 #CMD_END // Transition to draft mode, use each 2 frame #WAIT_FOR_MODE_TRANSITION; seq_set_prop_7_1=06 02 00 01 0a 03 #CMD_END // Slowshutter locked at 5 fps draft mode 05 02 00 08 30 #CMD_END // This is the night mode aperture speed original is at 1e...it is in hex of course 06 02 00 01 01 34 #CMD_END // Transition to draft mode, use every frame #WAIT_FOR_MODE_TRANSITION; //*************************************** // Effects, property 8 ***** //*************************************** // 0 => normal, 1 => negative, 2 => solarize // 3 => sepia, 4 => black&white, //inverted sepia and negative B&W //--------------------------------------------------- seq_set_prop_8=06 02 00 01 %0 53 #CMD_END; //********************************************* // Focus setting, property 9 ***** //********************************************* // 0 => Normal mode (no macro range scanning) //by start up // 1 => Full range // 2 => Fast mode (no macro, reduced normal scanning) // 3 => Fast mode and full range // 4 => Macro range (only macro range scanning) seq_set_prop_9=06 02 00 01 %0 41 #CMD_END; //************************************************ // Focus operation, property 10 ***** //************************************************ // 0 => Stop AF scan and hold position // 1 => Start AF scan // 2 => Stop AF and go to infinity // Return values: // 3 <= Focus ongoing // 4 <= Focus operation success // 5 <= Focus operation failure seq_set_prop_a_0=06 02 00 01 02 42 #CMD_END; seq_set_prop_a_1=06 02 00 01 01 42 #CMD_END; seq_set_prop_a_2=06 02 00 01 00 42 #CMD_END; seq_get_prop_a=#READ_AF_STATUS $m0 4 $c0 03 $cl $+0 04 $cx; //*************************************** // Exif, property 11 ***** //*************************************** // // Property used to read out EXIF info. // // Start by setting the property to one of the values: // 0(L) 1(H) => ISO Sensitivity // 2(L) 3(H) => Exposure //--------------------------------------------------- seq_get_prop_b=05 01 00 25 04 $f $r5 0 0 1 2 3 $c3 ff 05 01 00 25 04 $f $r5 0 0 1 2 3 $c3 ff 05 01 00 25 04 $f $r5 0 0 1 2 3 $c3 ff 05 01 00 25 04 $f $r5 0 0 1 2 3 $c3 ff 05 01 00 25 04 $f $r5 0 0 1 2 3 $cx $cx $cx $cx ; //*************************************** // 0 => White Balance // 1 => Distance (LED) // 2 => Fill flash (Xenon) // 3 => Q-table, property 12 //*************************************** seq_get_prop_c=05 01 00 29 03 $f $r4 0 0 1 2 $c2 ff 05 01 00 29 03 $f $r4 0 0 1 2 $c2 ff 05 01 00 29 03 $f $r4 0 0 1 2 $c2 ff 05 01 00 29 03 $f $r4 0 0 1 2 $c2 ff 05 01 00 29 03 $f $r4 0 0 1 2 $cx $cx $cx $cx $m 3 9; //*************************************** // LED flash, property 13 *** //*************************************** // Set to 1 if the camera should expect LED support // // If white balance is set to auto - change to cloudy when using LED //--------------------------------------------------- LED_WB_SET = 06 02 00 01 05 11 #CMD_END // Not the White balance setting and note the number of required white balance change the no :05 to whchever WB setting you want when LED is on 05 02 00 20 05 #CMD_END 05 02 00 21 f4 #CMD_END 06 02 00 01 01 13 #CMD_END; LED_WB_UNSET =05 02 00 20 00 #CMD_END 05 02 00 21 00 #CMD_END 06 02 00 01 01 13 #CMD_END $u 01; seq_set_prop_d=; //**************************************** // Flash tube, property 14 *** //**************************************** // Set to 1 if the camera should expect flash support // //--------------------------------------------------- seq_set_prop_e_0= 06 02 00 01 00 5a #CMD_END; seq_set_prop_e_1= 06 02 00 01 04 5a #CMD_END; seq_set_prop_e_2= 06 02 00 01 03 5a #CMD_END; //************************************************ // Power save mode, property 15 *** //************************************************ // // 0 => Leave power save mode // 1 => Enter power save mode // //--------------------------------------------------- seq_set_prop_f_0=06 02 00 01 00 5C #CMD_END #WAIT_FOR_POWER_SAVE_LEAVE; seq_set_prop_f_1=06 02 00 01 81 34 #CMD_END #WAIT_FOR_MODE_TRANSITION 06 02 00 01 00 53 #CMD_END 06 02 00 01 01 5C #CMD_END #WAIT_FOR_POWER_SAVE_ENTER; //************************************************ // Scene, property 16 ***** //************************************************ seq_set_prop_10=06 02 00 01 %0 51 #CMD_END; // Including this in driver start up results in fixed focus //************************************************ // ISO, property 17 ***//Variation in these settings makes no difference to the ISO //************************************************ // // 0 => Auto 1 => 100 2 => 200 // 3 => 400 4 => 800 5 => 1600 // // 6=>125 7=>160 8=>250 9=>320 // 10=>500 11=> 640 12=>1000 13=>1250 // //--------------------------------------------------- seq_set_prop_11_0=06 02 00 01 00 05 #CMD_END; seq_set_prop_11_1=06 02 00 01 01 05 #CMD_END; seq_set_prop_11_2=06 02 00 01 04 05 #CMD_END; seq_set_prop_11_3=06 02 00 01 07 05 #CMD_END; seq_set_prop_11_4=06 02 00 01 0a 05 #CMD_END; seq_set_prop_11_5=06 02 00 01 0d 05 #CMD_END; seq_set_prop_11_6=06 02 00 01 02 05 #CMD_END; seq_set_prop_11_7=06 02 00 01 03 05 #CMD_END; seq_set_prop_11_8=06 02 00 01 05 05 #CMD_END; seq_set_prop_11_9=06 02 00 01 06 05 #CMD_END; seq_set_prop_11_a=06 02 00 01 08 05 #CMD_END; seq_set_prop_11_b=06 02 00 01 09 05 #CMD_END; seq_set_prop_11_c=06 02 00 01 0b 05 #CMD_END; seq_set_prop_11_d=06 02 00 01 0c 05 #CMD_END; //************************************************ // AE level, property 18 *** //************************************************ seq_get_prop_12= 05 01 00 16 02 $f $r3 0 0 1; // THis is the Auto Exposure.....Decrese the value 16 for better contrast...original was 22 //************************************************ // Brightness, property 19 ***// We can increse brightness by initialising driver in the driver initialisation //************************************************ // // 0 => Darkest .... 15 => Brightest // //--------------------------------------------------- seq_set_prop_13=06 02 00 01 %0 54 #CMD_END; //************************************************ // Contrast, property 20 *** //************************************************ // // 0 => Lowest ..... 16 => Highest // //--------------------------------------------------- seq_set_prop_14=$s0 %0 $-0 0f 06 02 00 01 $w0 55 #CMD_END; //************************************************ // Sharpening, property 21 *** //************************************************ // // 0 => Lowest ..... 16 => Highest // //--------------------------------------------------- seq_set_prop_15=$s0 %0 $-0 0f 06 02 0f 01 $w0 56 #CMD_END; //************************************************ // Focus test, property 22 *** //************************************************ // Returns: 0xDDCCBBAA, where // AA = AF value before scan // BB = AF value 64 ms after start // CC = AF value 128 ms after start // DD = AF value 2 s after scan //************************************************ seq_get_prop_16=05 01 00 2E 01 $f $r2 0 0 06 02 00 01 01 42 $f $d0080 05 01 00 2E 01 $f $r2 1 1 $d0080 05 01 00 2E 01 $f $r2 2 2 $d0710 05 01 00 2E 01 $f $r2 3 3; //************************************************ // Focus test, property 23 *** // Just returns read out AF value *** //************************************************ seq_get_prop_17=05 01 00 2E 01 $f $r2 0 0; //*************************************** // Spot, property 24 ***// These lines have been included by me and allow the option of spot by initialising the driver //*************************************** seq_set_prop_18_0= 06 02 00 01 00 08 $i; seq_set_prop_18_1= 06 02 00 01 01 08 $i; //================================================ //=============== SIZE CONFIGS ===================// I'm still trying to understand the below data will post up further info when I understand it //================================================ LOCK_NIGHT_FPS=05 02 00 08 #VR_NIGHT_MODE_FR #CMD_END // Draft mode frame rate max x fps 06 02 00 01 #VR_NIGHT_MODE_FR 03 #CMD_END // Slowshutter locked at min x fps 06 02 00 01 81 34 #CMD_END // Transition to draft mode at half rate => x/2 fps #WAIT_FOR_MODE_TRANSITION; LOCK_NORMAL_FPS=05 02 00 08 #VR_NORMAL_MODE_FR #CMD_END // Draft mode frame rate max x fps 06 02 00 01 #VR_NORMAL_MODE_FR 03 #CMD_END // Slowshutter locked at min x fps 06 02 00 01 81 34 #CMD_END // Transition to draft mode at half rate => x/2 fps #WAIT_FOR_MODE_TRANSITION; RELEASE_LOCK_FPS=$u07; // Set draft mode frame rate and do // transition to draft mode according to property 7 //Remove this when differentiation between FP1.2 and FP1.3 cameras are no longer needed! //VF_TRANSITION_DELAY=05 01 00 36 01 $f $r1 0 $c0 00 $d00c8 $cx; VF_TRANSITION_DELAY=$d00c8; seq_ss_config_1=05 02 00 19 0D #CMD_END $u05; seq_ss_config_2=05 02 00 19 0B #CMD_END $u05; seq_ss_config_3=05 02 00 19 06 #CMD_END $u05; seq_ss_config_4=05 02 00 19 04 #CMD_END $u05; seq_ss_config_5=05 02 00 19 03 #CMD_END $u05; seq_ss_config_6=05 02 00 19 02 #CMD_END $u05; seq_ss_config_7=05 02 00 19 01 #CMD_END $u05; seq_ss_config_8=05 02 00 19 00 #CMD_END $u05; seq_ss_config_9=05 02 00 19 04; seq_vf_config_11=#VF_TRANSITION_DELAY 05 02 00 07 09 #CMD_END #RELEASE_LOCK_FPS; seq_vf_config_12=#VF_TRANSITION_DELAY 05 02 00 07 07 #CMD_END #RELEASE_LOCK_FPS; seq_vf_config_13=#VF_TRANSITION_DELAY 05 02 00 07 05 #CMD_END #RELEASE_LOCK_FPS; seq_vf_config_14=#VF_TRANSITION_DELAY 05 02 00 07 04 #CMD_END #RELEASE_LOCK_FPS; seq_vf_config_15=#VF_TRANSITION_DELAY 05 02 00 07 03 #CMD_END #RELEASE_LOCK_FPS; seq_vf_config_21=#VF_TRANSITION_DELAY 05 02 00 07 08 #CMD_END #LOCK_NORMAL_FPS; seq_vf_config_22=#VF_TRANSITION_DELAY 05 02 00 07 08 #CMD_END #LOCK_NIGHT_FPS; seq_vf_config_23=#VF_TRANSITION_DELAY 05 02 00 07 06 #CMD_END #LOCK_NORMAL_FPS; seq_vf_config_24=#VF_TRANSITION_DELAY 05 02 00 07 06 #CMD_END #LOCK_NIGHT_FPS; seq_ss_config_30=05 02 00 07 06 $f 06 02 00 01 01 34 $f $d0200 03 55 AA $f 08 04 12 80 00 05 AA 55 $se 30 $d0100; EMPTY_EVENT_FIFO=05 01 00 03 03 $f $r4 4 4 4 5 $c5 00 $cl $d0005 05 01 00 03 03 $f $r4 4 4 4 5 $c5 00 $cl $d0005 05 01 00 03 03 $f $r4 4 4 4 5 $c5 00 $cl $d0005 05 01 00 03 03 $f $r4 4 4 4 5 $c5 00 $cl $d0005 05 01 00 03 03 $f $r4 4 4 4 5 $c5 00 $cl $d0005 05 01 00 03 03 $f $r4 4 4 4 5 $c5 00 $cl $d0005 05 01 00 03 03 $f $r4 4 4 4 5 $c5 00 $cl $d0005 05 01 00 03 03 $f $r4 4 4 4 5 $c5 00 $cl $d0005 05 01 00 03 03 $f $r4 4 4 4 5 $c5 00 $cl $d0005 05 01 00 03 03 $f $r4 4 4 4 5 $c5 00 $cl $d0005 05 01 00 03 03 $f $r4 4 4 4 5 $c5 00 $cl $d0005 05 01 00 03 03 $f $r4 4 4 4 5 $c5 00 $cl $d0005 05 01 00 03 03 $f $r4 4 4 4 5 $c5 00 $cl $d0005 05 01 00 03 03 $f $r4 4 4 4 5 $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx $cx; //================================================ //============ STATE TRANSITIONS ================= //================================================ seq_vf_start=$ze; // Already started in vf_config seq_vf_stop=; seq_ss_start= $s7 00; // Reset take flag to zero seq_ss_take= $c7 00 // If take flag is zero... $s7 01 // ...then set take flag to one and perform the code below #EMPTY_EVENT_FIFO $z0 $-0 re $c0 00 $cl //Don't do anything if we already have the right size (for burst mode) $p0 0d $c0 01 $p0 01 $c0 00 #LED_WB_SET $cx $cx 06 02 00 01 01 $ze $ce 09 33 $cl 32 $cx $f #WAIT_FOR_MODE_TRANSITION #WAIT_FOR_CAPT_START $cx $t0020 $cx; seq_ss_verify=$ce 09 $s0 01 $cl $ce 30 $s0 01 $cl #READ_JPEG_STATUS $c4 00 $s0 01 $cl $s0 00 $cx $d0001 05 01 00 1B 01 $f $r2 9 9 // Read out q factor even on failure $cx $cx; seq_ss_stop=06 02 00 01 00 72 #CMD_END #LED_WB_UNSET ; //Update EXIF values //================================================ //============ JPEG HEADER CREATION ============== //================================================ jpeg_qtable_selector_0=$s2 00 05 01 00 1B 01 $f $r2 1 0; jpeg_qtable_selector_1=$s2 01 05 01 00 1B 01 $f $r2 1 0; jpeg_qtable_0=10 0B 0C 0E 0C 0A 10 0E 0D 0E 12 11 10 13 18 28 1A 18 16 16 18 31 23 25 1D 28 3A 33 3D 3C 39 33 38 37 40 48 5C 4E 40 44 57 45 37 38 50 6D 51 57 5F 62 67 68 67 3E 4D 71 79 70 64 78 5C 65 67 63; jpeg_qtable_1=11 12 12 18 15 18 2F 1A 1A 2F 63 42 38 42 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63; jpeg_qtable_factors=0,320000,190000,10AA00,C8000,A0000,85500,72400,64000,58E00,50000 ,48B00,42A00,3D800,39200,35500,32000,2F000,2C700,2A100,28000 ,26100,24500,22C00,21500,20000,1EC00,1DA00,1C900,1B900,1AA00 ,19C00,19000,18300,17800,16D00,16300,15900,15000,14800,14000 ,13800,13000,12900,12200,11C00,11600,11000,10A00,10500,10000 ,FA00,F500,F000,EB00,E600,E100,DC00,D700,D100,CC00 ,C700,C200,BD00,B800,B300,AE00,A800,A300,9E00,9900 ,9400,8F00,8A00,8500,8000,7A00,7500,7000,6B00,6600 ,6100,5C00,5700,5100,4C00,4700,4200,3D00,3800,3300 ,2E00,2800,2300,1E00,1900,1400,F00,A00,500,0; jpeg_header= FF D8 FF E0 00 10 4A 46 49 46 00 01 01 00 00 01 00 01 00 00 FF DB 00 84 00 $qt0 01 $qt1 FF C4 01 A2 00 00 01 05 01 01 01 01 01 01 00 00 00 00 00 00 00 00 01 02 03 04 05 06 07 08 09 0A 0B 01 00 03 01 01 01 01 01 01 01 01 01 00 00 00 00 00 00 01 02 03 04 05 06 07 08 09 0A 0B 10 00 02 01 03 03 02 04 03 05 05 04 04 00 00 01 7D 01 02 03 00 04 11 05 12 21 31 41 06 13 51 61 07 22 71 14 32 81 91 a1 08 23 42 b1 c1 15 52 d1 f0 24 33 62 72 82 09 0a 16 17 18 19 1a 25 26 27 28 29 2a 34 35 36 37 38 39 3a 43 44 45 46 47 48 49 4a 53 54 55 56 57 58 59 5a 63 64 65 66 67 68 69 6a 73 74 75 76 77 78 79 7a 83 84 85 86 87 88 89 8a 92 93 94 95 96 97 98 99 9a a2 a3 a4 a5 a6 a7 a8 a9 aa b2 b3 b4 b5 b6 b7 b8 b9 ba c2 c3 c4 c5 c6 c7 c8 c9 ca d2 d3 d4 d5 d6 d7 d8 d9 da e1 e2 e3 e4 e5 e6 e7 e8 e9 ea f1 f2 f3 f4 f5 f6 f7 f8 f9 fa 11 00 02 01 02 04 04 03 04 07 05 04 04 00 01 02 77 00 01 02 03 11 04 05 21 31 06 12 41 51 07 61 71 13 22 32 81 08 14 42 91 a1 b1 c1 09 23 33 52 f0 15 62 72 d1 0a 16 24 34 e1 25 f1 17 18 19 1a 26 27 28 29 2a 35 36 37 38 39 3a 43 44 45 46 47 48 49 4a 53 54 55 56 57 58 59 5a 63 64 65 66 67 68 69 6a 73 74 75 76 77 78 79 7a 82 83 84 85 86 87 88 89 8a 92 93 94 95 96 97 98 99 9a a2 a3 a4 a5 a6 a7 a8 a9 aa b2 b3 b4 b5 b6 b7 b8 b9 ba c2 c3 c4 c5 c6 c7 c8 c9 ca d2 d3 d4 d5 d6 d7 d8 d9 da e2 e3 e4 e5 e6 e7 e8 e9 ea f2 f3 f4 f5 f6 f7 f8 f9 fa FF C0 00 11 08 $h $w 03 01 21 00 02 11 01 03 11 01 FF DA 00 0C 03 01 00 02 11 03 11 00 3F 00;