Index: format/app_dongle.format
===================================================================
--- /YC1308AF/branch/mouse/YJX_Project/USB_24M_Philips/format/app_dongle.format	(revision 961)
+++ /YC1308AF/branch/mouse/YJX_Project/USB_24M_Philips/format/app_dongle.format	(working copy)
@@ -19,13 +19,16 @@
 1 mem_dg_kb_blank_data_enable
 1 mem_dg_kb_mul_blank_data_enable
 1 mem_dg_ms_blank_data_enable
-
+16 mem_24g_kb_data_sta_data
+16 mem_24g_kb_data_last_data
+1 mem_24g_kb_blank_data_enable
 1 mem_dg_sys_config
 9 mem_dg_usb_vid_pid
 1 mem_dg_usb_tx_interval
 30 mem_dg_usb_device_name
 1 mem_dg_kb_bind_success
 1 mem_dg_pc_sleep_flag
+100 mem_hidreportdesc_kb_new_temp
 )
 
 
Index: format/usb.format
===================================================================
--- /YC1308AF/branch/mouse/YJX_Project/USB_24M_Philips/format/usb.format	(revision 961)
+++ /YC1308AF/branch/mouse/YJX_Project/USB_24M_Philips/format/usb.format	(working copy)
@@ -68,6 +68,7 @@
 1 mem_usb_clear_halt
 16 mem_usb_mouse_data
 16 mem_usb_kb_data
+16 mem_usb_game_data
 16 mem_usb_kb_multikey
 16 mem_usb_kb_system
 2 mem_usb_test_cnt
@@ -184,6 +185,7 @@
 
 (
 0x10 USB_EP1_KB
+0x11 USB_EP1_GAME
 0x20 USB_EP2_MS
 0x21 USB_EP2_MULTIKEY
 0x22 USB_EP2_SYSTEMKEY
@@ -197,8 +199,10 @@
 0x01ba PC_GET_REPORT
 0x02ba PC_SET_REPORT
 0x0200 PC_SET_REPORT_bValue
+0x0201 PC_SET_REPORT_bValue_game
 0x0000 PC_SET_REPORT_wIndex
 0x0001 PC_SET_REPORT_bLength
+0x0002 PC_SET_REPORT_bLength_game
 0xba PC_REPORT_ID
 
 0x01 PC_GET_DATA
Index: output/eeprom.dat
===================================================================
--- /YC1308AF/branch/mouse/YJX_Project/USB_24M_Philips/output/eeprom.dat	(revision 961)
+++ /YC1308AF/branch/mouse/YJX_Project/USB_24M_Philips/output/eeprom.dat	(working copy)
@@ -2,16 +2,24 @@
 02
 aa
 55
-92
-00
+96
+03
 c2
 84
 00
-03
+05
 c0
 45
 80
-06
+08
+c0
+56
+80
+34
+c0
+46
+80
+10
 20
 20
 13
@@ -19,11 +27,11 @@
 c0
 47
 00
-0e
+66
 c0
 49
 80
-1e
+94
 20
 20
 13
@@ -54,131 +62,892 @@
 1e
 70
 48
-d7
+d7
+01
+20
+20
+12
+52
+6f
+e0
+89
+f6
+c4
+02
+80
+00
+d8
+a0
+0b
+59
+20
+40
+7a
+7e
+18
+42
+7e
+00
+c0
+00
+00
+17
+20
+20
+7a
+8f
+6f
+e0
+89
+f8
+c0
+00
+7a
+7b
+c0
+01
+00
+1c
+1f
+e6
+7c
+07
+20
+61
+00
+00
+6f
+e0
+8b
+5a
+c3
+83
+80
+00
+20
+40
+00
+77
+20
+20
+7a
+d6
+6f
+e0
+8b
+f9
+c4
+00
+80
+00
+6f
+f0
+8c
+24
+c3
+80
+80
+00
+6f
+e0
+8b
+f9
+79
+3f
+fe
+01
+67
+e0
+8b
+f9
+6f
+e0
+8b
+f7
+20
+7a
+00
+00
+c0
+08
+00
+2c
+c0
+08
+80
+30
+20
+20
+13
+7c
+70
+0b
+f7
+00
+df
+20
+00
+09
+d8
+c0
+0c
+0f
+20
+20
+7c
+b9
+70
+0b
+f7
+00
+df
+20
+00
+0f
+d8
+c0
+0c
+0f
+20
+20
+7c
+b9
+6f
+e0
+c0
+9a
+20
+3a
+31
+50
+c0
+02
+00
+40
+c0
+07
+b2
+b9
+c0
+04
+cb
+23
+c0
+05
+38
+14
+c0
+07
+34
+5e
+c0
+06
+ca
+0d
+c0
+06
+4d
+18
+c0
+05
+ad
+e8
+c0
+04
+3c
+75
+20
+60
+00
+00
+58
+00
+36
+cc
+67
+e1
+48
+8d
+58
+00
+00
+4b
+67
+e1
+48
+91
+58
+00
+00
+a7
+67
+e1
+48
+93
+58
+00
+37
+73
+67
+e1
+48
+8f
+58
+00
+00
+54
+67
+e1
+0b
+45
+20
+20
+7a
+08
+58
+00
+00
+01
+67
+e0
+8b
+ff
+6f
+e3
+c8
+98
+e7
+e3
+80
+05
+6f
+e0
+c8
+98
+24
+5a
+37
+a5
+6f
+e0
+c8
+98
+20
+5a
+37
+a9
+20
+20
+37
+0f
+6f
+e0
+c9
+36
+c2
+82
+00
+58
+6f
+e0
+c8
+f5
+c0
+ad
+00
+5c
+70
+48
+f5
+5a
+6f
+f2
+1a
+ac
+79
+20
+7e
+1d
+67
+e2
+0a
+a0
+20
+40
+36
+f7
+20
+40
+7a
+5b
+20
+40
+36
+e4
+20
+20
+00
+60
+6f
+e0
+c8
+f5
+c0
+2d
+00
+a2
+58
+00
+99
+a4
+67
+e1
+0a
+93
+70
+0a
+c4
+1a
+20
+60
+00
+00
+79
+3f
+80
+23
+6f
+e0
+8b
+59
+1f
+e1
+7e
+80
+c0
+00
+00
+6b
+20
+20
+7a
+a1
+6f
+e0
+8b
+59
+1f
+f1
+fe
+00
+1f
+e3
+7e
+00
+1f
+e1
+7e
+03
+c0
+00
+80
+71
+20
+20
+7a
+b4
+6f
+e0
+8b
+5a
+c0
+04
+80
+89
+20
+20
+7a
+cd
+6f
+e0
+8b
+61
+c1
+80
+80
+00
+6f
+e0
+8b
+62
+67
+e0
+c8
+ce
+70
+0b
+e5
+00
+70
+48
+be
+03
+20
+60
+00
+00
+6f
+e1
+0b
+5b
+d8
+40
+02
+01
+98
+46
+7c
+00
+24
+62
+80
+00
+6f
+e1
+0b
+5d
+d8
+40
+00
+00
+98
+46
+7c
+00
+24
+62
+80
+00
+6f
+e1
+0b
+5f
+d8
+40
+00
+02
+98
+46
+7c
+00
+24
+62
+80
+00
+70
+0b
+e5
+01
+20
+60
+00
+00
+d8
+a0
+0b
+61
+20
+40
+7a
+7e
+70
+0b
+e3
+01
+20
+40
+00
+7b
+6f
+e1
+0b
+5b
+67
+e1
+0b
+e1
+20
+40
+7a
+d6
+6f
+e0
+c0
+9a
+c1
+82
+00
+00
+6f
+e0
+8b
+e5
+24
+5a
+00
+74
+6f
+e0
+8b
+f9
+20
+7a
+00
+00
+6f
+f0
+8c
+24
+1f
+e1
+7e
+0f
+24
+3a
+7d
+17
+6f
+e0
+8b
+fa
+20
+3a
+7c
+ed
+6f
+e0
+8b
+ec
+c0
+01
+fd
+27
+c0
+81
+7c
+ed
+6f
+e0
+8b
+ee
+24
+3a
+7c
+ed
+20
+40
+00
+20
+20
+20
+7c
+e0
+58
+00
+49
+61
+67
+e1
+0a
+93
+6f
+e0
+c9
+61
+67
+e0
+8a
+c4
+20
+60
+00
+00
+6f
+e0
+c8
+98
+c0
+00
+00
+ad
+c0
+04
+00
+c9
+c0
+01
+37
+e5
+c0
+01
+b7
+cd
+20
+20
+00
+c6
+6f
+e0
+c8
+9a
+67
+e0
+c8
+be
+70
+48
+9a
+00
+70
+0c
+0f
 01
+d8
+a0
+0c
+10
+d8
+c0
+48
+99
+df
 20
+00
+08
 20
-12
-52
-79
-3f
-80
-23
+40
+7d
+d4
 6f
-e0
-8b
-59
-1f
-e1
-7e
-80
-c0
-00
+e4
+0c
+10
+24
+5a
+37
+c5
+6f
+e4
+0c
+10
+20
+5a
+37
+c9
+6f
+e4
+8c
+0f
+67
+e4
+c8
+f6
+68
+4c
+c8
+fe
+98
+46
+7c
 00
-13
+24
+42
+80
+db
+6f
+e4
+c8
+f6
+67
+e4
+c8
+fe
 20
 20
-7a
-a1
+00
+c6
+70
+0b
+f7
+10
 6f
 e0
 8b
-59
-1f
-f1
-fe
-00
-1f
-e3
+f9
+79
+20
 7e
+01
+67
+e0
+8b
+f9
+20
+60
 00
-1f
-e1
-7e
-03
-c0
 00
-80
-19
+d8
+a0
+47
+a7
+df
+20
+00
+42
 20
 20
-7a
-b4
+7d
+9b
+70
+0c
+0f
+08
+d8
+a0
+0c
+10
+20
+40
+00
+d8
 6f
-e0
-8b
+e7
+0c
+10
+24
 5a
-c0
-04
+37
+c5
+6f
+e7
+0c
+10
+20
+5a
+37
+c9
+6f
+e7
+8c
+0f
+67
+e7
+c9
+15
+68
+4f
+c9
+25
+98
+46
+7c
+00
+24
+42
 80
-1c
+e0
+6f
+e7
+c9
+15
+67
+e7
+c9
+25
 20
 20
-7a
-cd
+00
+c6
+d8
+c0
+48
+99
+df
 20
 00
-3a
-98
+0e
 20
 20
-7c
-4a
+7d
+d4
+70
+0b
+f7
+10
 6f
 e0
 8b
 f9
+79
 20
-7a
+7e
+01
+67
+e0
+8b
+f9
+20
+60
 00
 00
+70
+0b
+f7
+11
 6f
-f0
-8c
-24
-1f
-e1
-7e
-0f
-24
-3a
-7d
-17
+e0
+8b
+f9
+79
 20
+7e
+01
+67
+e0
+8b
+f9
 20
-7c
-cc
-43
-76
+60
+00
+00
+59
+77
 aa
 55
-20
+1d
 00
-15
+36
 49
 16
 01
 51
 31
-20
+01
 10
 51
 31
-20
-30
 00
-14
-50
-68
+60
+00
+11
+57
 69
+72
+65
 6c
-69
-70
+65
+73
 73
-20
-55
-53
-42
 20
 52
 65
@@ -209,6 +978,13 @@
 08
 aa
 55
+01
+00
+15
+40
+20
+aa
+55
 02
 00
 31
@@ -229,11 +1005,108 @@
 7b
 41
 14
+aa
+55
+5b
+00
+61
+49
+5a
+05
+01
+09
+06
+a1
+01
+85
+01
+75
+01
+95
+08
+05
+07
+19
+e0
+29
+e7
+15
+00
+25
+01
+81
+02
+95
+01
+75
+08
+81
+03
+95
+05
+75
+01
+05
+08
+19
+01
+29
+05
+91
+02
+95
+01
+75
+03
+91
+03
+95
+06
+75
+08
+15
+00
+25
+ff
+05
+07
+19
+00
+29
+ff
+81
+00
+c0
+05
+01
+09
+06
+a1
+01
+85
+08
+95
+70
+75
+01
+15
+00
+25
+01
+05
+07
+19
+00
+29
+ff
+81
+02
+c0
 55
 aa
 aa
 55
-47
-14
-38
-58
+4e
+2c
+8a
+e7
Index: output/memmap.format
===================================================================
--- /YC1308AF/branch/mouse/YJX_Project/USB_24M_Philips/output/memmap.format	(revision 961)
+++ /YC1308AF/branch/mouse/YJX_Project/USB_24M_Philips/output/memmap.format	(working copy)
@@ -650,15 +650,16 @@
 0x0bfe mem_usb_clear_halt
 0x0bff mem_usb_mouse_data
 0x0c0f mem_usb_kb_data
-0x0c1f mem_usb_kb_multikey
-0x0c2f mem_usb_kb_system
-0x0c3f mem_usb_test_cnt
-0x0c41 mem_usb_test_kb
-0x0c4b mem_usb_clear_mem_end
-0x0c4b mem_dg_rssi_noise_buffer
-0x0d4b mem_dg_rssi_noise_dg_buffer
-0x0e4b mem_dg_rssi_noise_ms_buffer
-0x0f4b mem_dg_rssi_noise_kb_buffer
+0x0c1f mem_usb_game_data
+0x0c2f mem_usb_kb_multikey
+0x0c3f mem_usb_kb_system
+0x0c4f mem_usb_test_cnt
+0x0c51 mem_usb_test_kb
+0x0c5b mem_usb_clear_mem_end
+0x0c5b mem_dg_rssi_noise_buffer
+0x0d5b mem_dg_rssi_noise_dg_buffer
+0x0e5b mem_dg_rssi_noise_ms_buffer
+0x0f5b mem_dg_rssi_noise_kb_buffer
 
 0x02be mem_le_new_param
 0x02be mem_le_new_transmitwindowsize
@@ -1921,12 +1922,16 @@
 0x4912 mem_dg_kb_blank_data_enable
 0x4913 mem_dg_kb_mul_blank_data_enable
 0x4914 mem_dg_ms_blank_data_enable
-0x4915 mem_dg_sys_config
-0x4916 mem_dg_usb_vid_pid
-0x491f mem_dg_usb_tx_interval
-0x4920 mem_dg_usb_device_name
-0x493e mem_dg_kb_bind_success
-0x493f mem_dg_pc_sleep_flag
+0x4915 mem_24g_kb_data_sta_data
+0x4925 mem_24g_kb_data_last_data
+0x4935 mem_24g_kb_blank_data_enable
+0x4936 mem_dg_sys_config
+0x4937 mem_dg_usb_vid_pid
+0x4940 mem_dg_usb_tx_interval
+0x4941 mem_dg_usb_device_name
+0x495f mem_dg_kb_bind_success
+0x4960 mem_dg_pc_sleep_flag
+0x4961 mem_hidreportdesc_kb_new_temp
 0x4882 mem_rssi_hex_received
 0x4883 mem_24g_pair_sm
 0x4884 mem_24g_pair_no_ack
Index: output/program.lis
===================================================================
--- /YC1308AF/branch/mouse/YJX_Project/USB_24M_Philips/output/program.lis	(revision 961)
+++ /YC1308AF/branch/mouse/YJX_Project/USB_24M_Philips/output/program.lis	(working copy)
@@ -1,55 +1,298 @@
               include "bt_format "
               org 0x0000
-0000 c2840003 bbit1 8 ,pf_patch_ext 
-0001 c0458006 beq patch11_3 ,p_initialize_radio_cont 
-0002 2020137e branch loop 
+0000 c2840005 bbit1 8 ,pf_patch_ext 
+0001 c0458008 beq patch11_3 ,p_initialize_radio_cont 
+0002 c0568034 beq patch15_5 ,p_app_init 
+0003 c0468010 beq patch31_5 ,p_usb_rx 
+0004 2020137e branch loop 
 
 pf_patch_ext:
-0003 c047000e beq patch31_6 ,p_usb_class_type 
-0004 c049801e beq patch32_3 ,p_usb_tx 
-0005 2020137e branch loop 
+0005 c0470066 beq patch31_6 ,p_usb_class_type 
+0006 c0498094 beq patch32_3 ,p_usb_tx 
+0007 2020137e branch loop 
 
 p_initialize_radio_cont:
-0006 7041eaff jam 0xff ,mem_gain_fix 
-0007 708a8500 jam 0x00 ,core_syn_loopdiv_dsm_cfg 
-0008 70892140 jam 0x40 ,0x8921 
-0009 70486701 jam 0x01 ,mem_24g_rx_phy 
-000a 70486801 jam 0x01 ,mem_24g_tx_phy 
-000b 7048bc1e jam 0x1e ,mem_24g_hop_interval 
-000c 7048d701 jam 1 ,mem_24g_b_s_mode_switch_disable 
-000d 20201252 branch initialize_radio_cont + 1 
+0008 7041eaff jam 0xff ,mem_gain_fix 
+0009 708a8500 jam 0x00 ,core_syn_loopdiv_dsm_cfg 
+000a 70892140 jam 0x40 ,0x8921 
+000b 70486701 jam 0x01 ,mem_24g_rx_phy 
+000c 70486801 jam 0x01 ,mem_24g_tx_phy 
+000d 7048bc1e jam 0x1e ,mem_24g_hop_interval 
+000e 7048d701 jam 1 ,mem_24g_b_s_mode_switch_disable 
+000f 20201252 branch initialize_radio_cont + 1 
+
+p_usb_rx:
+0010 6fe089f6 fetch 1 ,mem_usb_status 
+0011 c4028000 rtnbit0 usb_status_rxready 
+0012 d8a00b59 arg mem_usb_setup ,contw 
+0013 20407a7e call usb_rx_data 
+0014 18427e00 copy temp ,pdata 
+0015 c0000017 beq 0 ,p_usb0_rx 
+0016 20207a8f branch usb_data_rx 
+
+p_usb0_rx:
+0017 6fe089f8 fetch 1 ,mem_usb_read_len 
+0018 c0007a7b beq 0x00 ,usb_rx_no_data 
+0019 c001001c beq 0x02 ,p_usb_out_one_byte 
+001a 1fe67c07 sub pdata ,7 ,null 
+001b 20610000 rtn positive 
+
+p_usb_out_one_byte:
+001c 6fe08b5a fetch 1 ,mem_usb_setup + 1 
+001d c3838000 rtnbit1 7 
+001e 20400077 call p_usb_get_led_status 
+001f 20207ad6 branch usb0_reply_zerolen 
+
+p_usb_tx_data_ep1:
+0020 6fe08bf9 fetch 1 ,mem_usb_tx_enable 
+0021 c4008000 rtnbit0 1 
+0022 6ff08c24 fetch 1 ,core_usb_txbusy 
+0023 c3808000 rtnbit1 1 
+0024 6fe08bf9 fetch 1 ,mem_usb_tx_enable 
+0025 793ffe01 set0 1 ,pdata 
+0026 67e08bf9 store 1 ,mem_usb_tx_enable 
+0027 6fe08bf7 fetch 1 ,mem_usb_ep1_data 
+0028 207a0000 rtn blank 
+0029 c008002c beq usb_ep1_kb ,p_usb_tx_kb_normal_data 
+002a c0088030 beq usb_ep1_game ,p_usb_tx_game_normal_data 
+002b 2020137c branch assert 
+
+p_usb_tx_kb_normal_data:
+002c 700bf700 jam 0 ,mem_usb_ep1_data 
+002d df200009 arg 9 ,loopcnt 
+002e d8c00c0f arg mem_usb_kb_data ,contr 
+002f 20207cb9 branch usb_tx_ep1 
+
+p_usb_tx_game_normal_data:
+0030 700bf700 jam 0 ,mem_usb_ep1_data 
+0031 df20000f arg 15 ,loopcnt 
+0032 d8c00c0f arg mem_usb_kb_data ,contr 
+0033 20207cb9 branch usb_tx_ep1 
+
+p_app_init:
+0034 6fe0c09a fetch 1 ,mem_device_option 
+0035 203a3150 branch app_init ,blank 
+0036 c0020040 beq dvc_op_dongle ,p_dongle_init 
+0037 c007b2b9 beq dvc_op_antilost ,antilost_init 
+0038 c004cb23 beq dvc_op_shutter ,shutter_init 
+0039 c0053814 beq dvc_op_module ,module_init 
+003a c007345e beq dvc_op_car ,car_init 
+003b c006ca0d beq dvc_op_remote_car ,remote_car_init 
+003c c0064d18 beq dvc_op_hci_boot ,hci_init 
+003d c005ade8 beq dvc_op_ali_mesh ,ali_mesh_init 
+003e c0043c75 beq dvc_op_mouse ,mouse_init 
+003f 20600000 rtn 
+
+p_dongle_init:
+0040 580036cc setarg dongle_dispatch 
+0041 67e1488d store 2 ,mem_cb_24g_receive_process 
+0042 5800004b setarg p_dongle_g24_mouse 
+0043 67e14891 store 2 ,mem_cb_24g_data_device1 
+0044 580000a7 setarg p_dongle_g24_kb 
+0045 67e14893 store 2 ,mem_cb_24g_data_device2 
+0046 58003773 setarg dongle_ackpayload_prep 
+0047 67e1488f store 2 ,mem_cb_24g_ackpayload 
+0048 58000054 setarg p_dongle_usb_config 
+0049 67e10b45 store 2 ,mem_cb_usb_config 
+004a 20207a08 branch usb_init 
+
+p_dongle_g24_mouse:
+004b 58000001 setarg ms_report_id 
+004c 67e08bff store 1 ,mem_usb_mouse_data 
+004d 6fe3c898 fetch 7 ,mem_24g_rxdata_temp + 3 
+004e e7e38005 istore 7 ,contw 
+004f 6fe0c898 fetch 1 ,mem_24g_rxdata_temp + 3 
+0050 245a37a5 ncall dongle_g24_ms_enable_blank_data_forcibly ,blank 
+0051 6fe0c898 fetch 1 ,mem_24g_rxdata_temp + 3 
+0052 205a37a9 call dongle_g24_ms_disable_blank_data_forcibly ,blank 
+0053 2020370f branch dongle_usb_tx_ms_data 
+
+p_dongle_usb_config:
+0054 6fe0c936 fetch 1 ,mem_dg_sys_config 
+0055 c2820058 bbit1 dg_enable_kb_icon ,p_dongle_usb_config_kb 
+0056 6fe0c8f5 fetch 1 ,mem_dg_kb_bind_flag 
+0057 c0ad005c bne dongle_kb_bind_success ,p_dongle_usb_config_param 
+
+p_dongle_usb_config_kb:
+0058 7048f55a jam dongle_kb_bind_success ,mem_dg_kb_bind_flag 
+0059 6ff21aac fetch 4 ,usb_devicedata_addr + 9 
+005a 79207e1d set1 29 ,pdata 
+005b 67e20aa0 store 4 ,mem_devicedesc + 9 
+
+p_dongle_usb_config_param:
+005c 204036f7 call dongle_usb_device_name 
+005d 20407a5b call usb_tx_interval_config 
+005e 204036e4 call dongle_usb_vid_pid_config 
+005f 20200060 branch p_dongle_usb_hid_icon_config 
+
+p_dongle_usb_hid_icon_config:
+0060 6fe0c8f5 fetch 1 ,mem_dg_kb_bind_flag 
+0061 c02d00a2 beq dongle_kb_bind_success ,p_new_kb_hidreportdesc 
+0062 580099a4 setarg usb_kbdata_vendor_define_addr 
+0063 67e10a93 store 2 ,mem_hidreportdesc_kb 
+0064 700ac41a jam 0x1a ,mem_confdesc + 26 
+0065 20600000 rtn 
 
 p_usb_class_type:
-000e 793f8023 set0 mark_isstr ,mark 
-000f 6fe08b59 fetch 1 ,mem_usb_setup_bmrequesttype 
-0010 1fe17e80 and_into 0x80 ,pdata 
-0011 c0000013 beq out_device ,p_usb_out_device 
-0012 20207aa1 branch usb_class_type + 4 
+0066 793f8023 set0 mark_isstr ,mark 
+0067 6fe08b59 fetch 1 ,mem_usb_setup_bmrequesttype 
+0068 1fe17e80 and_into 0x80 ,pdata 
+0069 c000006b beq out_device ,p_usb_out_device 
+006a 20207aa1 branch usb_class_type + 4 
 
 p_usb_out_device:
-0013 6fe08b59 fetch 1 ,mem_usb_setup_bmrequesttype 
-0014 1ff1fe00 rshift4 pdata ,pdata 
-0015 1fe37e00 rshift pdata ,pdata 
-0016 1fe17e03 and_into 0x03 ,pdata 
-0017 c0008019 beq class_req ,p_usb_out_class_req 
-0018 20207ab4 branch usb_out_device + 4 
+006b 6fe08b59 fetch 1 ,mem_usb_setup_bmrequesttype 
+006c 1ff1fe00 rshift4 pdata ,pdata 
+006d 1fe37e00 rshift pdata ,pdata 
+006e 1fe17e03 and_into 0x03 ,pdata 
+006f c0008071 beq class_req ,p_usb_out_class_req 
+0070 20207ab4 branch usb_out_device + 4 
 
 p_usb_out_class_req:
-0019 6fe08b5a fetch 1 ,mem_usb_setup_brequest 
-001a c004801c beq set_report ,p_usb_set_report 
-001b 20207acd branch usb_out_class_req + 1 
+0071 6fe08b5a fetch 1 ,mem_usb_setup_brequest 
+0072 c0048089 beq set_report ,p_usb_set_report 
+0073 20207acd branch usb_out_class_req + 1 
+
+p_usb_get_output_data:
+0074 6fe08b61 fetch 1 ,mem_usb0_set_report_data 
+0075 c1808000 rtnne 0x01 
+0076 6fe08b62 fetch 1 ,mem_usb0_set_report_data + 1 
+
+p_usb_get_led_status:
+0077 67e0c8ce store 1 ,mem_24g_led_status 
+0078 700be500 jam 0 ,mem_usb_tx_win_enable 
+0079 7048be03 jam kb_led_ackpayload ,mem_24g_ackpayload_enable 
+007a 20600000 rtn 
+
+p_usb_set_report_resume_judge:
+007b 6fe10b5b fetch 2 ,mem_usb_setup_bvalue 
+007c d8400201 arg pc_set_report_bvalue_game ,temp 
+007d 98467c00 isub temp ,null 
+007e 24628000 nrtn zero 
+007f 6fe10b5d fetch 2 ,mem_usb_setup_windex 
+0080 d8400000 arg pc_set_report_windex ,temp 
+0081 98467c00 isub temp ,null 
+0082 24628000 nrtn zero 
+0083 6fe10b5f fetch 2 ,mem_usb_setup_blength 
+0084 d8400002 arg pc_set_report_blength_game ,temp 
+0085 98467c00 isub temp ,null 
+0086 24628000 nrtn zero 
+0087 700be501 jam 1 ,mem_usb_tx_win_enable 
+0088 20600000 rtn 
 
 p_usb_set_report:
-001c 20003a98 nop 15000 
-001d 20207c4a branch usb_set_report 
+0089 d8a00b61 arg mem_usb0_set_report_data ,contw 
+008a 20407a7e call usb_rx_data 
+008b 700be301 jam 1 ,mem_usb0_get_set_report 
+008c 2040007b call p_usb_set_report_resume_judge 
+008d 6fe10b5b fetch 2 ,mem_usb_setup_bvalue 
+008e 67e10be1 store 2 ,mem_usb_setup_bvalue_temp 
+008f 20407ad6 call usb0_reply_zerolen 
+0090 6fe0c09a fetch 1 ,mem_device_option 
+0091 c1820000 rtnne dvc_op_dongle 
+0092 6fe08be5 fetch 1 ,mem_usb_tx_win_enable 
+0093 245a0074 ncall p_usb_get_output_data ,blank 
 
 p_usb_tx:
-001e 6fe08bf9 fetch 1 ,mem_usb_tx_enable 
-001f 207a0000 rtn blank 
-0020 6ff08c24 fetch 1 ,core_usb_txbusy 
-0021 1fe17e0f and_into 0x0f ,pdata 
-0022 243a7d17 nbranch usb_inwake_state_tx_dispose ,blank 
-0023 20207ccc branch usb_tx + 3 
+0094 6fe08bf9 fetch 1 ,mem_usb_tx_enable 
+0095 207a0000 rtn blank 
+0096 6ff08c24 fetch 1 ,core_usb_txbusy 
+0097 1fe17e0f and_into 0x0f ,pdata 
+0098 243a7d17 nbranch usb_inwake_state_tx_dispose ,blank 
+0099 6fe08bfa fetch 1 ,mem_usb_device_enumeration_endflag 
+009a 203a7ced branch usb_tx_fifo_release ,blank 
+009b 6fe08bec fetch 1 ,mem_usb_state 
+009c c001fd27 beq usb_sleep ,usb_windows_wakeup 
+009d c0817ced bne usb_connected ,usb_tx_fifo_release 
+009e 6fe08bee fetch 1 ,mem_usb_clear_remote_wakeup 
+009f 243a7ced nbranch usb_tx_fifo_release ,blank 
+00a0 20400020 call p_usb_tx_data_ep1 
+00a1 20207ce0 branch usb_tx_data_ep2 
+
+p_new_kb_hidreportdesc:
+00a2 58004961 setarg mem_hidreportdesc_kb_new_temp 
+00a3 67e10a93 store 2 ,mem_hidreportdesc_kb 
+00a4 6fe0c961 fetch 1 ,mem_hidreportdesc_kb_new_temp 
+00a5 67e08ac4 store 1 ,mem_confdesc + 26 
+00a6 20600000 rtn 
+
+p_dongle_g24_kb:
+00a7 6fe0c898 fetch 1 ,mem_24g_rxdata_temp + 3 
+00a8 c00000ad beq 0 ,p_dongle_g24_kb_type0 
+00a9 c00400c9 beq 8 ,p_dongle_g24_game_type0 
+00aa c00137e5 beq 2 ,dongle_g24_kb_type2 
+00ab c001b7cd beq 3 ,dongle_g24_kb_type3 
+00ac 202000c6 branch p_g24_rx_interrupt_clear 
+
+p_dongle_g24_kb_type0:
+00ad 6fe0c89a fetch 1 ,mem_24g_rxdata_temp + 5 
+00ae 67e0c8be store 1 ,mem_24g_ackpayload_enable 
+00af 70489a00 jam 0 ,mem_24g_rxdata_temp + 5 
+00b0 700c0f01 jam 0x01 ,mem_usb_kb_data 
+00b1 d8a00c10 arg mem_usb_kb_data + 1 ,contw 
+00b2 d8c04899 arg mem_24g_rxdata_temp + 4 ,contr 
+00b3 df200008 arg 8 ,loopcnt 
+00b4 20407dd4 call memcpy 
+00b5 6fe40c10 fetch 8 ,mem_usb_kb_data + 1 
+00b6 245a37c5 ncall dongle_g24_kb_enable_blank_data_forcibly ,blank 
+00b7 6fe40c10 fetch 8 ,mem_usb_kb_data + 1 
+00b8 205a37c9 call dongle_g24_kb_disable_blank_data_forcibly ,blank 
+00b9 6fe48c0f fetch 9 ,mem_usb_kb_data 
+00ba 67e4c8f6 store 9 ,mem_dg_kb_data_sta_data 
+00bb 684cc8fe fetcht 9 ,mem_dg_kb_data_last_data 
+00bc 98467c00 isub temp ,null 
+00bd 244280db ncall p_g24_kb_kb_data_into_ep1_fifo ,zero 
+00be 6fe4c8f6 fetch 9 ,mem_dg_kb_data_sta_data 
+00bf 67e4c8fe store 9 ,mem_dg_kb_data_last_data 
+00c0 202000c6 branch p_g24_rx_interrupt_clear 
+
+p_dongle_usb_tx_enable_ep1:
+00c1 700bf710 jam usb_ep1_kb ,mem_usb_ep1_data 
+00c2 6fe08bf9 fetch 1 ,mem_usb_tx_enable 
+00c3 79207e01 set1 1 ,pdata 
+00c4 67e08bf9 store 1 ,mem_usb_tx_enable 
+00c5 20600000 rtn 
+
+p_g24_rx_interrupt_clear:
+00c6 d8a047a7 arg mem_24g_rxbuf ,contw 
+00c7 df200042 arg 66 ,loopcnt 
+00c8 20207d9b branch clear_mem 
+
+p_dongle_g24_game_type0:
+00c9 700c0f08 jam 0x08 ,mem_usb_kb_data 
+00ca d8a00c10 arg mem_usb_kb_data + 1 ,contw 
+00cb 204000d8 call p_g24_data_type2_copy_data0 
+00cc 6fe70c10 fetch 14 ,mem_usb_kb_data + 1 
+00cd 245a37c5 ncall dongle_g24_kb_enable_blank_data_forcibly ,blank 
+00ce 6fe70c10 fetch 14 ,mem_usb_kb_data + 1 
+00cf 205a37c9 call dongle_g24_kb_disable_blank_data_forcibly ,blank 
+00d0 6fe78c0f fetch 15 ,mem_usb_kb_data 
+00d1 67e7c915 store 15 ,mem_24g_kb_data_sta_data 
+00d2 684fc925 fetcht 15 ,mem_24g_kb_data_last_data 
+00d3 98467c00 isub temp ,null 
+00d4 244280e0 ncall p_g24_kb_game_data_into_ep1_fifo ,zero 
+00d5 6fe7c915 fetch 15 ,mem_24g_kb_data_sta_data 
+00d6 67e7c925 store 15 ,mem_24g_kb_data_last_data 
+00d7 202000c6 branch p_g24_rx_interrupt_clear 
+
+p_g24_data_type2_copy_data0:
+00d8 d8c04899 arg mem_24g_rxdata_temp + 4 ,contr 
+00d9 df20000e arg 14 ,loopcnt 
+00da 20207dd4 branch memcpy 
+
+p_g24_kb_kb_data_into_ep1_fifo:
+00db 700bf710 jam usb_ep1_kb ,mem_usb_ep1_data 
+00dc 6fe08bf9 fetch 1 ,mem_usb_tx_enable 
+00dd 79207e01 set1 1 ,pdata 
+00de 67e08bf9 store 1 ,mem_usb_tx_enable 
+00df 20600000 rtn 
+
+p_g24_kb_game_data_into_ep1_fifo:
+00e0 700bf711 jam usb_ep1_game ,mem_usb_ep1_data 
+00e1 6fe08bf9 fetch 1 ,mem_usb_tx_enable 
+00e2 79207e01 set1 1 ,pdata 
+00e3 67e08bf9 store 1 ,mem_usb_tx_enable 
+00e4 20600000 rtn 
               org 0x800
 
 start:
@@ -15841,43 +16084,43 @@
 36a5 6fe08a2b fetch 1 ,mem_tmp_buffer + dongle_kb_bind_efuse_offect 
 36a6 67e0c8f5 store 1 ,mem_dg_kb_bind_flag 
 36a7 204036c7 call dongle_xtal_select 
-36a8 6fe0c915 fetch 1 ,mem_dg_sys_config 
+36a8 6fe0c936 fetch 1 ,mem_dg_sys_config 
 36a9 2feffe05 isolate1 dg_enable_eeprom ,pdata 
 36aa 2020b6ae branch dongle_default_no_eeprom ,true 
-36ab 6fe0c915 fetch 1 ,mem_dg_sys_config 
+36ab 6fe0c936 fetch 1 ,mem_dg_sys_config 
 36ac 2feffe06 isolate1 dg_enable_new_chmap ,pdata 
 36ad 2040a2c4 call g24_chamap_param_update ,true 
 
 dongle_default_no_eeprom:
-36ae 6fe0c915 fetch 1 ,mem_dg_sys_config 
+36ae 6fe0c936 fetch 1 ,mem_dg_sys_config 
 36af 1fe17e0f and_into 0x0f ,pdata 
 36b0 67e0c1e8 store 1 ,mem_tx_power 
 36b1 20403174 call app_sys_param_init 
 36b2 704881ff jam 0xff ,mem_rssi_buff_index 
-36b3 58000c4b setarg mem_dg_rssi_noise_buffer 
+36b3 58000c5b setarg mem_dg_rssi_noise_buffer 
 36b4 67e148ed store 2 ,mem_rssi_noise_buffer_ptr 
-36b5 58000d4b setarg mem_dg_rssi_noise_dg_buffer 
+36b5 58000d5b setarg mem_dg_rssi_noise_dg_buffer 
 36b6 67e148ef store 2 ,mem_rssi_noise_self_buffer_ptr 
-36b7 58000e4b setarg mem_dg_rssi_noise_ms_buffer 
+36b7 58000e5b setarg mem_dg_rssi_noise_ms_buffer 
 36b8 67e148f1 store 2 ,mem_rssi_noise_device1_buffer_ptr 
-36b9 58000f4b setarg mem_dg_rssi_noise_kb_buffer 
+36b9 58000f5b setarg mem_dg_rssi_noise_kb_buffer 
 36ba 67e148f3 store 2 ,mem_rssi_noise_device2_buffer_ptr 
 36bb 70488085 jam tx_power_f5db ,mem_24g_pair_tx_power 
-36bc 70493e00 jam 0 ,mem_dg_kb_bind_success 
+36bc 70495f00 jam 0 ,mem_dg_kb_bind_success 
 36bd 7048d800 jam 0 ,mem_24g_bind_device_living 
 36be 204022d8 call g24_enable_1m 
 36bf 204023dc call g24_receive_init 
 36c0 204022db call g24_pair_param_init 
 36c1 204022b5 call g24_chmap_param_init 
-36c2 6fe0c91f fetch 1 ,mem_dg_usb_tx_interval 
+36c2 6fe0c940 fetch 1 ,mem_dg_usb_tx_interval 
 36c3 67e08b47 store 1 ,mem_usb_tx_interval 
-36c4 6fe4c916 fetch 9 ,mem_dg_usb_vid_pid 
+36c4 6fe4c937 fetch 9 ,mem_dg_usb_vid_pid 
 36c5 67e48b48 store 9 ,mem_usb_vid_pid 
 36c6 20600000 rtn 
 
 dongle_xtal_select:
 36c7 7040c518 jam xtal_24m ,mem_fcomp_div 
-36c8 6fe0c915 fetch 1 ,mem_dg_sys_config 
+36c8 6fe0c936 fetch 1 ,mem_dg_sys_config 
 36c9 c4038000 rtnbit0 dg_enable_xtal_24m 
 36ca 7040c508 jam xtal_16m ,mem_fcomp_div 
 36cb 20600000 rtn 
@@ -15901,7 +16144,7 @@
 36d7 20205f12 branch efuse_program 
 
 dongle_usb_config:
-36d8 6fe0c915 fetch 1 ,mem_dg_sys_config 
+36d8 6fe0c936 fetch 1 ,mem_dg_sys_config 
 36d9 c28236dc bbit1 dg_enable_kb_icon ,dongle_usb_config_kb 
 36da 6fe0c8f5 fetch 1 ,mem_dg_kb_bind_flag 
 36db c0ad36e0 bne dongle_kb_bind_success ,dongle_usb_config_param 
@@ -15950,9 +16193,9 @@
 36f6 20600000 rtn 
 
 dongle_usb_device_name:
-36f7 6fe0c920 fetch 1 ,mem_dg_usb_device_name 
+36f7 6fe0c941 fetch 1 ,mem_dg_usb_device_name 
 36f8 207a0000 rtn blank 
-36f9 d8c04920 arg mem_dg_usb_device_name ,contr 
+36f9 d8c04941 arg mem_dg_usb_device_name ,contr 
 36fa d8a00b09 arg mem_string2 ,contw 
 36fb df20001e arg 30 ,loopcnt 
 36fc 20207dd4 branch memcpy 
@@ -16020,10 +16263,10 @@
 3726 20407de9 call timer_check 
 3727 247a0000 nrtn blank 
 3728 70491300 jam 0 ,mem_dg_kb_mul_blank_data_enable 
-3729 d8a00c1f arg mem_usb_kb_multikey ,contw 
+3729 d8a00c2f arg mem_usb_kb_multikey ,contw 
 372a df200002 arg 2 ,loopcnt 
 372b 20407d8c call memset0 
-372c 700c1f03 jam kb_multikey_report_id ,mem_usb_kb_multikey 
+372c 700c2f03 jam kb_multikey_report_id ,mem_usb_kb_multikey 
 
 dongle_usb_tx_multikey_data:
 372d 700bf821 jam usb_ep2_multikey ,mem_usb_ep2_data 
@@ -16137,22 +16380,22 @@
 3775 c001377f beq datatype_device2 ,dongle_ackpayload_prep_keyboard 
 
 dongle_ackpayload_prep_mouse:
-3776 6fe0c93f fetch 1 ,mem_dg_pc_sleep_flag 
+3776 6fe0c960 fetch 1 ,mem_dg_pc_sleep_flag 
 3777 c2803785 bbit1 0 ,dongle_pc_sleep_ackpayload_prep_mouse 
 3778 20203781 branch dongle_ackpayload_prep_end 
 
 dongle_set_pc_sleep_flag:
 3779 6fe0c09a fetch 1 ,mem_device_option 
 377a c1820000 rtnne dvc_op_dongle 
-377b 70493f03 jam 3 ,mem_dg_pc_sleep_flag 
+377b 70496003 jam 3 ,mem_dg_pc_sleep_flag 
 377c 20600000 rtn 
 
 dongle_clear_pc_sleep_flag:
-377d 70493f00 jam 0 ,mem_dg_pc_sleep_flag 
+377d 70496000 jam 0 ,mem_dg_pc_sleep_flag 
 377e 20600000 rtn 
 
 dongle_ackpayload_prep_keyboard:
-377f 6fe0c93f fetch 1 ,mem_dg_pc_sleep_flag 
+377f 6fe0c960 fetch 1 ,mem_dg_pc_sleep_flag 
 3780 c280b789 bbit1 1 ,dongle_pc_sleep_ackpayload_prep_keyboard 
 
 dongle_ackpayload_prep_end:
@@ -16162,15 +16405,15 @@
 3784 20600000 rtn 
 
 dongle_pc_sleep_ackpayload_prep_mouse:
-3785 6fe0c93f fetch 1 ,mem_dg_pc_sleep_flag 
+3785 6fe0c960 fetch 1 ,mem_dg_pc_sleep_flag 
 3786 793ffe00 set0 0 ,pdata 
-3787 67e0c93f store 1 ,mem_dg_pc_sleep_flag 
+3787 67e0c960 store 1 ,mem_dg_pc_sleep_flag 
 3788 2020378c branch dongle_pc_sleep_ackpayload_prep 
 
 dongle_pc_sleep_ackpayload_prep_keyboard:
-3789 6fe0c93f fetch 1 ,mem_dg_pc_sleep_flag 
+3789 6fe0c960 fetch 1 ,mem_dg_pc_sleep_flag 
 378a 793ffe01 set0 1 ,pdata 
-378b 67e0c93f store 1 ,mem_dg_pc_sleep_flag 
+378b 67e0c960 store 1 ,mem_dg_pc_sleep_flag 
 
 dongle_pc_sleep_ackpayload_prep:
 378c 70483801 jam 0x01 ,mem_24g_datalen 
@@ -16258,15 +16501,15 @@
 37cc 20207ddb branch timer_init 
 
 dongle_g24_kb_type3:
-37cd d8a00c1f arg mem_usb_kb_multikey ,contw 
+37cd d8a00c2f arg mem_usb_kb_multikey ,contw 
 37ce d8c04898 arg mem_24g_rxdata_temp + 3 ,contr 
 37cf df200003 arg 3 ,loopcnt 
 37d0 20407dd4 call memcpy 
-37d1 6fe10c20 fetch 2 ,mem_usb_kb_multikey + 1 
+37d1 6fe10c30 fetch 2 ,mem_usb_kb_multikey + 1 
 37d2 245a37dd ncall dongle_g24_kb_mul_enable_blank_data_forcibly ,blank 
-37d3 6fe10c20 fetch 2 ,mem_usb_kb_multikey + 1 
+37d3 6fe10c30 fetch 2 ,mem_usb_kb_multikey + 1 
 37d4 205a37e1 call dongle_g24_kb_mul_disable_blank_data_forcibly ,blank 
-37d5 6fe18c1f fetch 3 ,mem_usb_kb_multikey 
+37d5 6fe18c2f fetch 3 ,mem_usb_kb_multikey 
 37d6 67e1c906 store 3 ,mem_dg_kb_multikey_sta_data 
 37d7 6849c909 fetcht 3 ,mem_dg_kb_multikey_last_data 
 37d8 98467c00 isub temp ,null 
@@ -16288,15 +16531,15 @@
 37e4 20207ddb branch timer_init 
 
 dongle_g24_kb_type2:
-37e5 d8a00c2f arg mem_usb_kb_system ,contw 
+37e5 d8a00c3f arg mem_usb_kb_system ,contw 
 37e6 d8c04898 arg mem_24g_rxdata_temp + 3 ,contr 
 37e7 df200002 arg 2 ,loopcnt 
 37e8 20407dd4 call memcpy 
-37e9 6fe10c2f fetch 2 ,mem_usb_kb_system 
+37e9 6fe10c3f fetch 2 ,mem_usb_kb_system 
 37ea 245a37f5 ncall dongle_g24_kb_sys_enable_blank_data_forcibly ,blank 
-37eb 6fe10c2f fetch 2 ,mem_usb_kb_system 
+37eb 6fe10c3f fetch 2 ,mem_usb_kb_system 
 37ec 205a37f9 call dongle_g24_kb_sys_disable_blank_data_forcibly ,blank 
-37ed 6fe10c2f fetch 2 ,mem_usb_kb_system 
+37ed 6fe10c3f fetch 2 ,mem_usb_kb_system 
 37ee 67e1490c store 2 ,mem_dg_kb_system_sta_data 
 37ef 6849490f fetcht 2 ,mem_dg_kb_system_last_data 
 37f0 98467c00 isub temp ,null 
@@ -16328,13 +16571,13 @@
 3802 c12d0000 rtneq dongle_kb_bind_success 
 
 dongle_prep_soft_reset:
-3803 70493e01 jam 1 ,mem_dg_kb_bind_success 
+3803 70495f01 jam 1 ,mem_dg_kb_bind_success 
 3804 20600000 rtn 
 
 dongle_kb_bind_soft_reset:
 3805 6fe0c09a fetch 1 ,mem_device_option 
 3806 c1820000 rtnne dvc_op_dongle 
-3807 6fe0c93e fetch 1 ,mem_dg_kb_bind_success 
+3807 6fe0c95f fetch 1 ,mem_dg_kb_bind_success 
 3808 207a0000 rtn blank 
 3809 70096400 jam 0 ,mem_temp 
 
@@ -38498,7 +38741,7 @@
 7a18 708c1104 jam 0x4 ,core_usb_hmode 
 7a19 708c0200 jam 0 ,core_usb_addr 
 7a1a 708c23ff jam 0xff ,core_usb_status 
-7a1b 58000c4b setarg mem_usb_clear_mem_end 
+7a1b 58000c5b setarg mem_usb_clear_mem_end 
 7a1c d8a00b59 arg mem_usb_clear_mem_start ,contw 
 7a1d 98a67200 isub contw ,loopcnt 
 7a1e 20207d9b branch clear_mem 
@@ -39510,7 +39753,7 @@
 usb_tx_kb_multikey_data:
 7d0b 700bf800 jam 0 ,mem_usb_ep2_data 
 7d0c df200003 arg 3 ,loopcnt 
-7d0d d8c00c1f arg mem_usb_kb_multikey ,contr 
+7d0d d8c00c2f arg mem_usb_kb_multikey ,contr 
 7d0e 20207cc5 branch usb_tx_ep2 
 
 usb_tx_kb_normal_data:
@@ -39522,7 +39765,7 @@
 usb_tx_kb_systemkey_data:
 7d13 700bf800 jam 0 ,mem_usb_ep2_data 
 7d14 df200002 arg 2 ,loopcnt 
-7d15 d8c00c2f arg mem_usb_kb_system ,contr 
+7d15 d8c00c3f arg mem_usb_kb_system ,contr 
 7d16 20207cc5 branch usb_tx_ep2 
 
 usb_inwake_state_tx_dispose:
Index: output/romcode.rom
===================================================================
--- /YC1308AF/branch/mouse/YJX_Project/USB_24M_Philips/output/romcode.rom	(revision 961)
+++ /YC1308AF/branch/mouse/YJX_Project/USB_24M_Philips/output/romcode.rom	(working copy)
@@ -11942,39 +11942,39 @@
 6fe08a2b
 67e0c8f5
 204036c7
-6fe0c915
+6fe0c936
 2feffe05
 2020b6ae
-6fe0c915
+6fe0c936
 2feffe06
 2040a2c4
-6fe0c915
+6fe0c936
 1fe17e0f
 67e0c1e8
 20403174
 704881ff
-58000c4b
+58000c5b
 67e148ed
-58000d4b
+58000d5b
 67e148ef
-58000e4b
+58000e5b
 67e148f1
-58000f4b
+58000f5b
 67e148f3
 70488085
-70493e00
+70495f00
 7048d800
 204022d8
 204023dc
 204022db
 204022b5
-6fe0c91f
+6fe0c940
 67e08b47
-6fe4c916
+6fe4c937
 67e48b48
 20600000
 7040c518
-6fe0c915
+6fe0c936
 c4038000
 7040c508
 20600000
@@ -11990,7 +11990,7 @@
 da2048f5
 d840002a
 20205f12
-6fe0c915
+6fe0c936
 c28236dc
 6fe0c8f5
 c0ad36e0
@@ -12021,9 +12021,9 @@
 67e10a93
 700ac43f
 20600000
-6fe0c920
+6fe0c941
 207a0000
-d8c04920
+d8c04941
 d8a00b09
 df20001e
 20207dd4
@@ -12071,10 +12071,10 @@
 20407de9
 247a0000
 70491300
-d8a00c1f
+d8a00c2f
 df200002
 20407d8c
-700c1f03
+700c2f03
 700bf821
 20203710
 44dd4017
@@ -12148,28 +12148,28 @@
 6fe0c839
 c000b776
 c001377f
-6fe0c93f
+6fe0c960
 c2803785
 20203781
 6fe0c09a
 c1820000
-70493f03
+70496003
 20600000
-70493f00
+70496000
 20600000
-6fe0c93f
+6fe0c960
 c280b789
 6fe0c8be
 c000b790
 c001b794
 20600000
-6fe0c93f
+6fe0c960
 793ffe00
-67e0c93f
+67e0c960
 2020378c
-6fe0c93f
+6fe0c960
 793ffe01
-67e0c93f
+67e0c960
 70483801
 580000ff
 67e0c7c9
@@ -12235,15 +12235,15 @@
 58000000
 d8e0000e
 20207ddb
-d8a00c1f
+d8a00c2f
 d8c04898
 df200003
 20407dd4
-6fe10c20
+6fe10c30
 245a37dd
-6fe10c20
+6fe10c30
 205a37e1
-6fe18c1f
+6fe18c2f
 67e1c906
 6849c909
 98467c00
@@ -12259,15 +12259,15 @@
 58000000
 d8e0000c
 20207ddb
-d8a00c2f
+d8a00c3f
 d8c04898
 df200002
 20407dd4
-6fe10c2f
+6fe10c3f
 245a37f5
-6fe10c2f
+6fe10c3f
 205a37f9
-6fe10c2f
+6fe10c3f
 67e1490c
 6849490f
 98467c00
@@ -12289,11 +12289,11 @@
 c1820000
 6fe0c8f5
 c12d0000
-70493e01
+70495f01
 20600000
 6fe0c09a
 c1820000
-6fe0c93e
+6fe0c95f
 207a0000
 70096400
 7048f55a
@@ -29209,7 +29209,7 @@
 708c1104
 708c0200
 708c23ff
-58000c4b
+58000c5b
 d8a00b59
 98a67200
 20207d9b
@@ -29963,7 +29963,7 @@
 20207cc5
 700bf800
 df200003
-d8c00c1f
+d8c00c2f
 20207cc5
 700bf700
 df200008
@@ -29971,7 +29971,7 @@
 20207cb9
 700bf800
 df200002
-d8c00c2f
+d8c00c3f
 20207cc5
 6fe08bec
 c0017d1a
@@ -30717,4 +30717,4 @@
 00000000
 00000000
 00000000
-00008120
+00001ee5
Index: program/patch.prog
===================================================================
--- /YC1308AF/branch/mouse/YJX_Project/USB_24M_Philips/program/patch.prog	(revision 961)
+++ /YC1308AF/branch/mouse/YJX_Project/USB_24M_Philips/program/patch.prog	(working copy)
@@ -3,6 +3,8 @@
 //	beq patch10_3,p_set_sync_on
 	beq patch11_3,p_initialize_radio_cont
 //	beq patch17_2,p_dongle_usb_dispatch
+	beq patch15_5,p_app_init
+	beq patch31_5,p_usb_rx
 	branch loop
 
 pf_patch_ext:
@@ -45,6 +47,110 @@
 //p_dongle_usb_dispatch:
 //	call p_wdt_kick
 //	branch dongle_usb_dispatch+1
+p_usb_rx:
+	fetch 1,mem_usb_status
+	rtnbit0 USB_STATUS_RXREADY
+	arg mem_usb_setup,contw
+	call usb_rx_data
+	copy temp,pdata
+	beq 0,p_usb0_rx
+	branch usb_data_rx
+p_usb0_rx:
+	fetch 1,mem_usb_read_len
+	beq 0x00,usb_rx_no_data
+	beq 0x02,p_usb_out_one_byte	// HUAWEI pad led status	
+	sub pdata,7,null
+	rtn positive	
+p_usb_out_one_byte:
+	fetch 1,mem_usb_setup+1
+	rtnbit1 7	// OUT_DEVICE
+	call p_usb_get_led_status
+	branch usb0_reply_zerolen	
+p_usb_tx_data_ep1:
+	fetch 1,mem_usb_tx_enable
+	rtnbit0 1
+	fetch 1,core_usb_txbusy
+	rtnbit1 1
+	fetch 1,mem_usb_tx_enable
+	set0 1,pdata
+	store 1,mem_usb_tx_enable
+	fetch 1,mem_usb_ep1_data
+	rtn blank
+	beq USB_EP1_KB,p_usb_tx_kb_normal_data
+	beq USB_EP1_GAME,p_usb_tx_game_normal_data
+	branch assert
+p_usb_tx_kb_normal_data:
+	jam 0,mem_usb_ep1_data
+	arg 9,loopcnt
+	arg mem_usb_kb_data,contr
+	branch usb_tx_ep1	
+p_usb_tx_game_normal_data:
+	jam 0,mem_usb_ep1_data
+	arg 15,loopcnt
+	arg mem_usb_kb_data,contr
+	branch usb_tx_ep1	
+	
+p_app_init:
+	fetch 1,mem_device_option
+	branch app_init,blank				/* wait ram to be initialized */
+	beq dvc_op_dongle,p_dongle_init
+	beq dvc_op_antilost,antilost_init
+	beq dvc_op_shutter,shutter_init
+	beq dvc_op_module,module_init
+	beq dvc_op_car,car_init
+	beq dvc_op_remote_car,remote_car_init
+	beq dvc_op_hci_boot,hci_init
+	beq dvc_op_ali_mesh,ali_mesh_init
+ifdef COMPLIE_TEST_CODE	
+	beq dvc_op_test,test_init
+endif	
+	beq dvc_op_mouse,mouse_init
+	rtn
+p_dongle_init:
+	setarg dongle_dispatch
+	store 2,mem_cb_24g_receive_process
+	setarg p_dongle_g24_mouse
+	store 2,mem_cb_24g_data_device1
+	setarg p_dongle_g24_kb
+	store 2,mem_cb_24g_data_device2
+	setarg dongle_ackpayload_prep
+	store 2,mem_cb_24g_ackpayload
+	setarg p_dongle_usb_config
+	store 2,mem_cb_usb_config
+	branch usb_init
+p_dongle_g24_mouse:
+	setarg MS_REPORT_ID
+	store 1,mem_usb_mouse_data	//report id
+	fetch 7,mem_24g_rxdata_temp+3	//key
+	istore 7,contw
+	fetch 1,mem_24g_rxdata_temp+3	//key
+	ncall dongle_g24_ms_enable_blank_data_forcibly,blank//get kb data
+	fetch 1,mem_24g_rxdata_temp+3	//key
+	call dongle_g24_ms_disable_blank_data_forcibly,blank
+	branch dongle_usb_tx_ms_data	
+	
+p_dongle_usb_config:
+	fetch 1,mem_dg_sys_config
+	bbit1 DG_ENABLE_KB_ICON,p_dongle_usb_config_kb
+	fetch 1,mem_dg_kb_bind_flag
+	bne DONGLE_KB_BIND_SUCCESS,p_dongle_usb_config_param	
+p_dongle_usb_config_kb:
+	jam DONGLE_KB_BIND_SUCCESS,mem_dg_kb_bind_flag
+	fetch 4,USB_DEVICEDATA_ADDR+9
+	set1 29,pdata
+	store 4,mem_devicedesc+9
+p_dongle_usb_config_param:
+	call dongle_usb_device_name
+	call usb_tx_interval_config
+	call dongle_usb_vid_pid_config
+	branch p_dongle_usb_hid_icon_config	
+p_dongle_usb_hid_icon_config:
+	fetch 1,mem_dg_kb_bind_flag
+	beq DONGLE_KB_BIND_SUCCESS,p_new_kb_hidreportdesc
+	setarg USB_KBDATA_VENDOR_DEFINE_ADDR
+	store 2,mem_hidreportdesc_kb
+	jam 0x1a,mem_confdesc+26//hid_descriptor--keyboard length
+	rtn	
 
 /************************keyboard led patch start**********/
 p_usb_class_type:
@@ -67,9 +173,45 @@
 	beq SET_REPORT,p_usb_set_report
 	branch usb_out_class_req+1
 
+
+p_usb_get_output_data:
+	fetch 1,mem_usb0_set_report_data
+	rtnne 0x01		// report id
+	fetch 1,mem_usb0_set_report_data+1
+p_usb_get_led_status:
+	store 1,mem_24g_led_status
+	jam 0,mem_usb_tx_win_enable
+	jam KB_LED_ACKPAYLOAD,mem_24g_ackpayload_enable
+	rtn	
+p_usb_set_report_resume_judge:
+	fetch 2,mem_usb_setup_bValue
+	arg PC_SET_REPORT_bValue_game,temp
+	isub temp,null
+	nrtn zero
+	fetch 2,mem_usb_setup_wIndex
+	arg PC_SET_REPORT_wIndex,temp
+	isub temp,null
+	nrtn zero
+	fetch 2,mem_usb_setup_bLength
+	arg PC_SET_REPORT_bLength_game,temp
+	isub temp,null
+	nrtn zero
+	jam 1,mem_usb_tx_win_enable
+	rtn
 p_usb_set_report:
-	nop 15000	//delay 1ms
-	branch usb_set_report
+	arg mem_usb0_set_report_data,contw
+	call usb_rx_data
+	jam 1,mem_usb0_get_set_report
+	call p_usb_set_report_resume_judge
+	fetch 2,mem_usb_setup_bValue
+	store 2,mem_usb_setup_bValue_temp
+	call usb0_reply_zerolen
+	fetch 1,mem_device_option
+	rtnne dvc_op_dongle
+	fetch 1,mem_usb_tx_win_enable
+	ncall p_usb_get_output_data,blank
+	
+
 
 /************************keyboard led patch end**********/
 	
@@ -80,6 +222,97 @@
 	fetch 1,core_usb_txbusy
 	and_into 0x0f,pdata
 	nbranch usb_inwake_state_tx_dispose,blank
-	branch usb_tx+3
+	fetch 1,mem_usb_device_enumeration_endflag
+	branch usb_tx_fifo_release,blank
+	fetch 1,mem_usb_state
+	beq USB_SLEEP,usb_windows_wakeup
+	bne USB_CONNECTED,usb_tx_fifo_release
+	fetch 1,mem_usb_clear_remote_wakeup
+	nbranch usb_tx_fifo_release,blank
+	call p_usb_tx_data_ep1
+	branch usb_tx_data_ep2
+	
+p_new_kb_hidreportdesc:
+	setarg mem_hidreportdesc_kb_new_temp
+	store 2,mem_hidreportdesc_kb
+	fetch 1,mem_hidreportdesc_kb_new_temp 
+	store 1,mem_confdesc+26	
+	rtn
+
+p_dongle_g24_kb:
+	fetch 1,mem_24g_rxdata_temp+3
+	beq 0,p_dongle_g24_kb_type0	//normal key
+	beq 8,p_dongle_g24_game_type0  //game key
+	beq 2,dongle_g24_kb_type2	//system key
+	beq 3,dongle_g24_kb_type3	//multikey
+	branch p_g24_rx_interrupt_clear
+
+p_dongle_g24_kb_type0:
+	fetch 1,mem_24g_rxdata_temp+5
+	store 1,mem_24g_ackpayload_enable
+	jam 0,mem_24g_rxdata_temp+5
+	jam 0x01,mem_usb_kb_data
+	arg mem_usb_kb_data+1,contw
+	arg mem_24g_rxdata_temp+4,contr
+	arg 8,loopcnt
+	call memcpy
+	fetch 8,mem_usb_kb_data+1
+	ncall dongle_g24_kb_enable_blank_data_forcibly,blank//get kb data
+	fetch 8,mem_usb_kb_data+1	
+	call dongle_g24_kb_disable_blank_data_forcibly,blank
+	fetch 9,mem_usb_kb_data
+	store 9,mem_dg_kb_data_sta_data
+	fetcht 9,mem_dg_kb_data_last_data
+	isub temp,null
+	ncall p_g24_kb_kb_data_into_ep1_fifo,zero
+	fetch 9,mem_dg_kb_data_sta_data
+	store 9,mem_dg_kb_data_last_data
+	branch p_g24_rx_interrupt_clear
+p_dongle_usb_tx_enable_ep1:
+	jam USB_EP1_KB,mem_usb_ep1_data
+	fetch 1,mem_usb_tx_enable
+	set1 1,pdata
+	store 1,mem_usb_tx_enable
+	rtn	
+p_g24_rx_interrupt_clear:
+	arg mem_24g_rxbuf,contw
+	arg 66,loopcnt
+	branch clear_mem	
+p_dongle_g24_game_type0:
+	jam 0x08,mem_usb_kb_data
+	arg mem_usb_kb_data+1,contw
+	call p_g24_data_type2_copy_data0
+
+	fetch 14,mem_usb_kb_data+1
+	ncall dongle_g24_kb_enable_blank_data_forcibly,blank//get kb data
+	fetch 14,mem_usb_kb_data+1
+	call dongle_g24_kb_disable_blank_data_forcibly,blank
+
+	fetch 15,mem_usb_kb_data
+	store 15,mem_24g_kb_data_sta_data
+	fetcht 15,mem_24g_kb_data_last_data
+	isub temp,null
+	ncall p_g24_kb_game_data_into_ep1_fifo,zero
+
+	fetch 15,mem_24g_kb_data_sta_data
+	store 15,mem_24g_kb_data_last_data
+	branch p_g24_rx_interrupt_clear
+	
 
+p_g24_data_type2_copy_data0:
+	arg mem_24g_rxdata_temp+4,contr
+	arg 14,loopcnt
+	branch memcpy
+p_g24_kb_kb_data_into_ep1_fifo:
+	jam USB_EP1_KB,mem_usb_ep1_data
+	fetch 1,mem_usb_tx_enable
+	set1 1,pdata
+	store 1,mem_usb_tx_enable
+	rtn	
+p_g24_kb_game_data_into_ep1_fifo:
+	jam USB_EP1_GAME,mem_usb_ep1_data
+	fetch 1,mem_usb_tx_enable
+	set1 1,pdata
+	store 1,mem_usb_tx_enable
+	rtn
 
Index: sched/dongle.dat
===================================================================
--- /YC1308AF/branch/mouse/YJX_Project/USB_24M_Philips/sched/dongle.dat	(revision 961)
+++ /YC1308AF/branch/mouse/YJX_Project/USB_24M_Philips/sched/dongle.dat	(working copy)
@@ -16,13 +16,13 @@
 01 #disable
 #mouse only#auto pair
 51 31#VID
-20 10#PID
+01 10#PID
 #mouse & keyboard
 51 31#VID
-20 30#PID
+00 60#PID
 mem_dg_usb_tx_interval:00
 mem_dg_usb_device_name:
-'Philips USB Receiver
+'Wireless Receiver
 
 
 #rf config
@@ -57,6 +57,7 @@
 
 #mem_patch10:08
 mem_patch11:08
+mem_patch15:20
 #mem_patch17:04
 mem_patch31:40
 mem_patch32:08
@@ -66,4 +67,53 @@
 mem_device_option:04
 mem_lpm_ctrim:14		#xtal offset
 
-
+mem_hidreportdesc_kb_new_temp:
+#===============new keyboard desc====================
+5a     #3f+19=58
+05 01
+09 06
+a1 01
+85 01
+75 01 
+95 08
+05 07
+19 e0 
+29 e7 
+15 00
+25 01
+81 02
+95 01 
+75 08
+81 03 
+95 05
+75 01
+05 08
+19 01
+29 05  
+91 02 
+95 01  
+75 03  
+91 03
+95 06 
+75 08 
+15 00 
+25 ff
+05 07
+19 00
+29 ff 
+81 00
+c0
+
+0501 # Usage Page(Generic Desktop)
+0906 # Usage(Keyboard)
+a101 # Collection(Application)
+8508 # Report ID(8)    
+9570 # Report Count(112)
+7501 # Report Size(1)
+1500 # Logical Minimum(0)
+2501 # Logical Maximum(1)
+0507 # Usage Page(Keyboard/Keypad)
+1900 # Usage Minimum(01)
+29ff # Usage Maximum(255)
+8102 # Input(Data Variable Absolute) ; Modifier byte
+c0 # End Collection
\ No newline at end of file
