Index: output/flash.dat
===================================================================
--- /branch/mouse_project/XZR/XZR_1059/XZR_3Mode_2Ch_PB_24G_LRPair_no_adc/output/flash.dat	(revision 4016)
+++ /branch/mouse_project/XZR/XZR_1059/XZR_3Mode_2Ch_PB_24G_LRPair_no_adc/output/flash.dat	(working copy)
@@ -2,7 +2,7 @@
 02
 aa
 55
-9a
+a2
 1f
 20
 20
@@ -51,7 +51,7 @@
 20
 40
 07
-8a
+8c
 20
 40
 00
@@ -5307,7 +5307,7 @@
 20
 40
 07
-8a
+8c
 70
 4b
 38
@@ -7689,6 +7689,14 @@
 00
 01
 68
+00
+c6
+e0
+c1
+02
+00
+00
+68
 02
 46
 9b
@@ -7699,7 +7707,7 @@
 20
 40
 07
-d6
+d8
 58
 00
 00
@@ -7707,7 +7715,7 @@
 20
 40
 07
-c9
+cb
 58
 00
 00
@@ -7715,7 +7723,7 @@
 20
 40
 07
-cf
+d1
 68
 00
 cb
@@ -7723,7 +7731,7 @@
 c0
 00
 87
-8d
+8f
 df
 20
 00
@@ -7755,7 +7763,7 @@
 20
 40
 07
-a0
+a2
 68
 01
 11
@@ -7791,7 +7799,7 @@
 20
 40
 07
-a0
+a2
 68
 01
 11
@@ -7835,7 +7843,7 @@
 20
 20
 87
-ad
+af
 68
 00
 91
@@ -7843,7 +7851,7 @@
 c0
 7f
 87
-b4
+b6
 68
 00
 91
@@ -7871,7 +7879,7 @@
 c0
 00
 07
-b1
+b3
 68
 01
 91
@@ -7879,7 +7887,7 @@
 20
 20
 07
-a9
+ab
 70
 11
 c4
@@ -7891,7 +7899,7 @@
 20
 20
 07
-a9
+ab
 68
 00
 91
@@ -7899,7 +7907,7 @@
 20
 40
 07
-bf
+c1
 60
 00
 91
@@ -7911,7 +7919,7 @@
 20
 3a
 07
-bd
+bf
 58
 00
 00
@@ -7935,11 +7943,11 @@
 20
 20
 07
-ba
+bc
 20
 40
 07
-c5
+c7
 1f
 e3
 7e
@@ -7947,7 +7955,7 @@
 20
 40
 07
-c6
+c8
 1f
 e6
 7e
@@ -7983,7 +7991,7 @@
 24
 21
 07
-d4
+d6
 9a
 46
 7c
@@ -7991,7 +7999,7 @@
 24
 21
 07
-d4
+d6
 70
 4b
 0d
@@ -8019,7 +8027,7 @@
 20
 20
 07
-cd
+cf
 70
 4b
 0d
@@ -8035,7 +8043,7 @@
 20
 40
 07
-dd
+df
 1f
 e2
 22
@@ -8047,7 +8055,7 @@
 20
 40
 07
-dd
+df
 1f
 e2
 24
@@ -8067,7 +8075,7 @@
 c0
 7f
 87
-e3
+e5
 68
 00
 91
@@ -8091,9 +8099,9 @@
 20
 20
 07
-e1
-d8
-8d
+e3
+0d
+87
 aa
 55
 08
@@ -9173,7 +9181,7 @@
 00
 54
 4b
-e6
+ee
 31
 00
 55
@@ -12771,5 +12779,5 @@
 55
 00
 00
-a2
-86
+a8
+bc
Index: output/program.lis
===================================================================
--- /branch/mouse_project/XZR/XZR_1059/XZR_3Mode_2Ch_PB_24G_LRPair_no_adc/output/program.lis	(revision 4016)
+++ /branch/mouse_project/XZR/XZR_1059/XZR_3Mode_2Ch_PB_24G_LRPair_no_adc/output/program.lis	(working copy)
@@ -17,7 +17,7 @@
 0008 6000cb33 store 1 ,mem_bt_ui_button_count 
 0009 204043ca call mouse_bt_discovery_button_down_disable 
 000a 204002f7 call p_mouse_spi_init 
-000b 2040078a call p_drawing_optima_init 
+000b 2040078c call p_drawing_optima_init 
 000c 20400010 call p_mouse_cb_fuction 
 000d 20400023 call p_mouse_wakeup_from_power 
 000e 20400076 call p_mouse_select_device_button_wakeup_check 
@@ -1833,7 +1833,7 @@
 052c 20203fa0 branch mouse_motion + 9 
 
 p_mouse_motion_nodata:
-052d 2040078a call p_drawing_optima_init 
+052d 2040078c call p_drawing_optima_init 
 052e 704b3800 jam 0 ,mem_low_power_check_count 
 052f 20600000 rtn 
 
@@ -2677,149 +2677,151 @@
 0780 20200001 branch p_zcode 
 
 p_drawing_optima:
-0781 6802469b fetch 4 ,mem_mouse_x 
-0782 207a0000 rtn blank 
-0783 204007d6 call p_data_abs_check 
-0784 58000003 setarg 0x03 
-0785 204007c9 call p_pdata_greater_than_check 
-0786 58000002 setarg 0x02 
-0787 204007cf call p_data_less_than_check 
-0788 6800cb0d fetch 1 ,mem_mouse_asm_flag 
-0789 c000878d beq 1 ,p_drawing_optima_modify 
+0781 6800c6e0 fetch 1 ,mem_config_sensor_type 
+0782 c1020000 rtneq p3212 
+0783 6802469b fetch 4 ,mem_mouse_x 
+0784 207a0000 rtn blank 
+0785 204007d8 call p_data_abs_check 
+0786 58000003 setarg 0x03 
+0787 204007cb call p_pdata_greater_than_check 
+0788 58000002 setarg 0x02 
+0789 204007d1 call p_data_less_than_check 
+078a 6800cb0d fetch 1 ,mem_mouse_asm_flag 
+078b c000878f beq 1 ,p_drawing_optima_modify 
 
 p_drawing_optima_init:
-078a df200005 arg 5 ,loopcnt 
-078b d8a04b0d arg mem_mouse_asm_flag ,contw 
-078c 20207ed4 branch clear_mem 
+078c df200005 arg 5 ,loopcnt 
+078d d8a04b0d arg mem_mouse_asm_flag ,contw 
+078e 20207ed4 branch clear_mem 
 
 p_drawing_optima_modify:
-078d 68014b0e fetch 2 ,mem_mouse_x_pre 
-078e 600111be store 2 ,mem_data_pre 
-078f 6801469b fetch 2 ,mem_mouse_x 
-0790 600111c0 store 2 ,mem_data_current 
-0791 204007a0 call p_drawing_optima_data 
-0792 680111be fetch 2 ,mem_data_pre 
-0793 60014b0e store 2 ,mem_mouse_x_pre 
-0794 680111c0 fetch 2 ,mem_data_current 
-0795 6001469b store 2 ,mem_mouse_x 
-0796 68014b10 fetch 2 ,mem_mouse_y_pre 
-0797 600111be store 2 ,mem_data_pre 
-0798 6801469d fetch 2 ,mem_mouse_y 
-0799 600111c0 store 2 ,mem_data_current 
-079a 204007a0 call p_drawing_optima_data 
-079b 680111be fetch 2 ,mem_data_pre 
-079c 60014b10 store 2 ,mem_mouse_y_pre 
-079d 680111c0 fetch 2 ,mem_data_current 
-079e 6001469d store 2 ,mem_mouse_y 
-079f 20600000 rtn 
+078f 68014b0e fetch 2 ,mem_mouse_x_pre 
+0790 600111be store 2 ,mem_data_pre 
+0791 6801469b fetch 2 ,mem_mouse_x 
+0792 600111c0 store 2 ,mem_data_current 
+0793 204007a2 call p_drawing_optima_data 
+0794 680111be fetch 2 ,mem_data_pre 
+0795 60014b0e store 2 ,mem_mouse_x_pre 
+0796 680111c0 fetch 2 ,mem_data_current 
+0797 6001469b store 2 ,mem_mouse_x 
+0798 68014b10 fetch 2 ,mem_mouse_y_pre 
+0799 600111be store 2 ,mem_data_pre 
+079a 6801469d fetch 2 ,mem_mouse_y 
+079b 600111c0 store 2 ,mem_data_current 
+079c 204007a2 call p_drawing_optima_data 
+079d 680111be fetch 2 ,mem_data_pre 
+079e 60014b10 store 2 ,mem_mouse_y_pre 
+079f 680111c0 fetch 2 ,mem_data_current 
+07a0 6001469d store 2 ,mem_mouse_y 
+07a1 20600000 rtn 
 
 p_drawing_optima_data:
-07a0 680111be fetch 2 ,mem_data_pre 
-07a1 680911c0 fetcht 2 ,mem_data_current 
-07a2 9840fe00 iadd temp ,pdata 
-07a3 600191c2 store 3 ,mem_data_sum 
-07a4 2feffe10 isolate1 16 ,pdata 
-07a5 202087ad branch p_data_sum_overflow ,true 
-07a6 680091c3 fetch 1 ,mem_data_sum + 1 
-07a7 c07f87b4 beq 0xff ,p_data_sum_n 
-07a8 680091c2 fetch 1 ,mem_data_sum 
+07a2 680111be fetch 2 ,mem_data_pre 
+07a3 680911c0 fetcht 2 ,mem_data_current 
+07a4 9840fe00 iadd temp ,pdata 
+07a5 600191c2 store 3 ,mem_data_sum 
+07a6 2feffe10 isolate1 16 ,pdata 
+07a7 202087af branch p_data_sum_overflow ,true 
+07a8 680091c3 fetch 1 ,mem_data_sum + 1 
+07a9 c07f87b6 beq 0xff ,p_data_sum_n 
+07aa 680091c2 fetch 1 ,mem_data_sum 
 
 p_data_store_pre:
-07a9 1fe37e00 rshift pdata ,pdata 
-07aa 600111be store 2 ,mem_data_pre 
-07ab 600111c0 store 2 ,mem_data_current 
-07ac 20600000 rtn 
+07ab 1fe37e00 rshift pdata ,pdata 
+07ac 600111be store 2 ,mem_data_pre 
+07ad 600111c0 store 2 ,mem_data_current 
+07ae 20600000 rtn 
 
 p_data_sum_overflow:
-07ad 680091c3 fetch 1 ,mem_data_sum + 1 
-07ae c00007b1 beq 0 ,p_data_sum_overflow_p 
-07af 680191c2 fetch 3 ,mem_data_sum 
-07b0 202007a9 branch p_data_store_pre 
+07af 680091c3 fetch 1 ,mem_data_sum + 1 
+07b0 c00007b3 beq 0 ,p_data_sum_overflow_p 
+07b1 680191c2 fetch 3 ,mem_data_sum 
+07b2 202007ab branch p_data_store_pre 
 
 p_data_sum_overflow_p:
-07b1 7011c400 jam 0 ,mem_data_sum + 2 
-07b2 680091c2 fetch 1 ,mem_data_sum 
-07b3 202007a9 branch p_data_store_pre 
+07b3 7011c400 jam 0 ,mem_data_sum + 2 
+07b4 680091c2 fetch 1 ,mem_data_sum 
+07b5 202007ab branch p_data_store_pre 
 
 p_data_sum_n:
-07b4 680091c2 fetch 1 ,mem_data_sum 
-07b5 204007bf call p_pdata_get_half 
-07b6 600091be store 1 ,mem_data_pre 
-07b7 600091c0 store 1 ,mem_data_current 
-07b8 203a07bd branch p_data_zero ,blank 
-07b9 580000ff setarg 0xff 
+07b6 680091c2 fetch 1 ,mem_data_sum 
+07b7 204007c1 call p_pdata_get_half 
+07b8 600091be store 1 ,mem_data_pre 
+07b9 600091c0 store 1 ,mem_data_current 
+07ba 203a07bf branch p_data_zero ,blank 
+07bb 580000ff setarg 0xff 
 
 p_data_set_direction:
-07ba 600091bf store 1 ,mem_data_pre + 1 
-07bb 600091c1 store 1 ,mem_data_current + 1 
-07bc 20600000 rtn 
+07bc 600091bf store 1 ,mem_data_pre + 1 
+07bd 600091c1 store 1 ,mem_data_current + 1 
+07be 20600000 rtn 
 
 p_data_zero:
-07bd 58000000 setarg 0 
-07be 202007ba branch p_data_set_direction 
+07bf 58000000 setarg 0 
+07c0 202007bc branch p_data_set_direction 
 
 p_pdata_get_half:
-07bf 204007c5 call p_pdata_invert 
-07c0 1fe37e00 rshift pdata ,pdata 
+07c1 204007c7 call p_pdata_invert 
+07c2 1fe37e00 rshift pdata ,pdata 
 
 p_pdata_get_new_value:
-07c1 204007c6 call p_rega_in_out 
-07c2 1fe67e00 sub pdata ,0 ,pdata 
-07c3 600091c5 store 1 ,mem_data_value 
-07c4 20600000 rtn 
+07c3 204007c8 call p_rega_in_out 
+07c4 1fe67e00 sub pdata ,0 ,pdata 
+07c5 600091c5 store 1 ,mem_data_value 
+07c6 20600000 rtn 
 
 p_pdata_invert:
-07c5 1fe67e00 sub pdata ,0 ,pdata 
+07c7 1fe67e00 sub pdata ,0 ,pdata 
 
 p_rega_in_out:
-07c6 60008aae store 1 ,mem_rega 
-07c7 68008aae fetch 1 ,mem_rega 
-07c8 20600000 rtn 
+07c8 60008aae store 1 ,mem_rega 
+07c9 68008aae fetch 1 ,mem_rega 
+07ca 20600000 rtn 
 
 p_pdata_greater_than_check:
-07c9 9a267c00 isub rega ,null 
-07ca 242107d4 nbranch p_enable_asm ,positive 
-07cb 9a467c00 isub regb ,null 
-07cc 242107d4 nbranch p_enable_asm ,positive 
+07cb 9a267c00 isub rega ,null 
+07cc 242107d6 nbranch p_enable_asm ,positive 
+07cd 9a467c00 isub regb ,null 
+07ce 242107d6 nbranch p_enable_asm ,positive 
 
 p_disable_asm:
-07cd 704b0d00 jam 0 ,mem_mouse_asm_flag 
-07ce 20600000 rtn 
+07cf 704b0d00 jam 0 ,mem_mouse_asm_flag 
+07d0 20600000 rtn 
 
 p_data_less_than_check:
-07cf 9a267c00 isub rega ,null 
-07d0 24610000 nrtn positive 
-07d1 9a467c00 isub regb ,null 
+07d1 9a267c00 isub rega ,null 
 07d2 24610000 nrtn positive 
-07d3 202007cd branch p_disable_asm 
+07d3 9a467c00 isub regb ,null 
+07d4 24610000 nrtn positive 
+07d5 202007cf branch p_disable_asm 
 
 p_enable_asm:
-07d4 704b0d01 jam 1 ,mem_mouse_asm_flag 
-07d5 20600000 rtn 
+07d6 704b0d01 jam 1 ,mem_mouse_asm_flag 
+07d7 20600000 rtn 
 
 p_data_abs_check:
-07d6 6801469b fetch 2 ,mem_mouse_x 
-07d7 204007dd call p_data_abs 
-07d8 1fe22200 copy pdata ,rega 
-07d9 6801469d fetch 2 ,mem_mouse_y 
-07da 204007dd call p_data_abs 
-07db 1fe22400 copy pdata ,regb 
-07dc 20600000 rtn 
+07d8 6801469b fetch 2 ,mem_mouse_x 
+07d9 204007df call p_data_abs 
+07da 1fe22200 copy pdata ,rega 
+07db 6801469d fetch 2 ,mem_mouse_y 
+07dc 204007df call p_data_abs 
+07dd 1fe22400 copy pdata ,regb 
+07de 20600000 rtn 
 
 p_data_abs:
-07dd 600111c0 store 2 ,mem_data_current 
-07de 680091c1 fetch 1 ,mem_data_current + 1 
-07df c07f87e3 beq 0xff ,p_data_reversal 
-07e0 680091c0 fetch 1 ,mem_data_current 
+07df 600111c0 store 2 ,mem_data_current 
+07e0 680091c1 fetch 1 ,mem_data_current + 1 
+07e1 c07f87e5 beq 0xff ,p_data_reversal 
+07e2 680091c0 fetch 1 ,mem_data_current 
 
 p_data_abs_store:
-07e1 1fe17eff and_into 0xff ,pdata 
-07e2 20600000 rtn 
+07e3 1fe17eff and_into 0xff ,pdata 
+07e4 20600000 rtn 
 
 p_data_reversal:
-07e3 680111c0 fetch 2 ,mem_data_current 
-07e4 1fe67e00 sub pdata ,0 ,pdata 
-07e5 202007e1 branch p_data_abs_store 
+07e5 680111c0 fetch 2 ,mem_data_current 
+07e6 1fe67e00 sub pdata ,0 ,pdata 
+07e7 202007e3 branch p_data_abs_store 
               org 0x2000
 
 start:
Index: program/patch.prog
===================================================================
--- /branch/mouse_project/XZR/XZR_1059/XZR_3Mode_2Ch_PB_24G_LRPair_no_adc/program/patch.prog	(revision 4016)
+++ /branch/mouse_project/XZR/XZR_1059/XZR_3Mode_2Ch_PB_24G_LRPair_no_adc/program/patch.prog	(working copy)
@@ -3430,6 +3430,8 @@
 ifdef MOUSE_SMOOTHER
 //notice: need to call p_mouse_drawing_optima_init when waked from mult
 p_drawing_optima:
+	fetch 1,mem_config_sensor_type
+	rtneq P3212
 	fetch 4,mem_mouse_x
 	rtn blank
 	call p_data_abs_check
