Код:
;W580 SW-R8BE001 ;My Shortcusts V1.2 ;Add option in main menu "My Shortcuts" and add icon. ;and add acces directly to: ;=========================== ;>themes and add icon. ;>Brightness and add icon. ;>Bluetooth and add icon. ;>RAdio and add icon. ;>mediaplayer_Video and add icon. ;>sound_Recorder and add icon. ;=========================== ;and add item info for all items. ;Add option in main menu "My Elfs" and add icon. ;The links to the best elfs more used for you: ;in subItmen add this elfs: ;=========================== ;BcfgEdit and add icon. path => "/tpa/user/other/ZBin/BcfgEdit.elf" ;DynCheck and add icon. path => "/tpa/user/other/ZBin/DynCheck.elf" ;NShooter and add icon. path => "/tpa/user/other/ZBin/NShooter.elf" ;EPManager and add icon. path => "/tpa/user/other/ZBin/EPManager.elf" ;FindFiles and add icon. path => "/tpa/user/other/ZBin/FindFiles.elf" ;MyShortcuts and add icon. path => "/tpa/user/other/ZBin/MyShortcuts.elf" ;=========================== ;and add item info for all elfs. ;and add option for show about of the patch. ;© albertnet3 ;(i) Original idea by yener90 ;(!) conflict whit patch "Add "More Menu" to Main Menu" ;------------------------------------------------------------------------------------------- include "x.inc" include "W580_R8BE001.lib.asm" ;============================================================== org 0x45386276 Hook: LDR R3, off_body BX R3 align 4 off_body dw _body+1 return: ;============================================================== org 0x45C1FF40 _body: LDR R2, _carga LDR R1, a_ACTION_SELECT1 ADD R0, R4, 0 BL _SetAction ;============================================================== MOV R2, 0 MOV R1, 2 ADD R0, R4, 0 BL _SetAction LDR R2, aMisAtajos_lng MOV R1, 2 ADD R0, R4, 0 BL _SetText LDR R2, atajos_icn MOV R1, 2 ADD R0, R4, 0 BL _SetIcon ;============================================================== MOV R2, 3 MOV R1, 2 ADD R0, R4, 0 BL a_SetItemAsSubItem LDR R2, aThemes_lng MOV R1, 3 ADD R0, R4, 0 BL _SetText LDR R2, _db_list_theme_icn MOV R1, 3 ADD R0, R4, 0 BL _SetIcon LDR R2, aThemes_lng MOV R1, 3 ADD R0, R4, 0 BL _SetInfoText LDR R2, link__Display_setthe MOV R1, 3 ADD R0, R4, 0 BL _SetAction ;============================================================== MOV R2, 4 MOV R1, 2 ADD R0, R4, 0 BL a_SetItemAsSubItem LDR R2, aWallpaper_lng MOV R1, 4 ADD R0, R4, 0 BL _SetText LDR R2, _db_list_image_directory_icn MOV R1, 4 ADD R0, R4, 0 BL _SetIcon LDR R2, aWallpaper_lng MOV R1, 4 ADD R0, R4, 0 BL _SetInfoText LDR R2, link__Settings_backg MOV R1, 4 ADD R0, R4, 0 BL _SetAction ;============================================================== MOV R2, 5 MOV R1, 2 ADD R0, R4, 0 BL a_SetItemAsSubItem LDR R2, aBrightness_lng MOV R1, 5 ADD R0, R4, 0 BL _SetText LDR R2, _rn_vert_bookmarks_ani_icn MOV R1, 5 ADD R0, R4, 0 BL _SetIcon LDR R2, aBrightness_lng MOV R1, 5 ADD R0, R4, 0 BL _SetInfoText LDR R2, link__Settings_brigh MOV R1, 5 ADD R0, R4, 0 BL _SetAction ;============================================================== MOV R2, 6 MOV R1, 2 ADD R0, R4, 0 BL a_SetItemAsSubItem LDR R2, aBluetooth_lng MOV R1, 6 ADD R0, R4, 0 BL _SetText LDR R2, _menu_bt_remote_control_icn MOV R1, 6 ADD R0, R4, 0 BL _SetIcon LDR R2, aBluetooth_lng MOV R1, 6 ADD R0, R4, 0 BL _SetInfoText LDR R2, link__Menuitem_bt_ac MOV R1, 6 ADD R0, R4, 0 BL _SetAction ;============================================================== MOV R2, 7 MOV R1, 2 ADD R0, R4, 0 BL a_SetItemAsSubItem LDR R2, aRadio_lng MOV R1, 7 ADD R0, R4, 0 BL _SetText LDR R2, aEntertainnement_menu_radio_icn MOV R1, 7 ADD R0, R4, 0 BL _SetIcon LDR R2, aRadio_lng MOV R1, 7 ADD R0, R4, 0 BL _SetInfoText LDR R2, link_aFmradio MOV R1, 7 ADD R0, R4, 0 BL _SetAction ;============================================================== MOV R2, 8 MOV R1, 2 ADD R0, R4, 0 BL a_SetItemAsSubItem LDR R2, aVideo_lng MOV R1, 8 ADD R0, R4, 0 BL _SetText LDR R2, aDB_list_video_file_icn MOV R1, 8 ADD R0, R4, 0 BL _SetIcon LDR R2, aVideo_lng MOV R1, 8 ADD R0, R4, 0 BL _SetInfoText LDR R2, link__Mediaplayer_vi MOV R1, 8 ADD R0, R4, 0 BL _SetAction ;============================================================== MOV R2, 9 MOV R1, 2 ADD R0, R4, 0 BL a_SetItemAsSubItem LDR R2, asoundrecorder_lng MOV R1, 9 ADD R0, R4, 0 BL _SetText LDR R2, aentertainament_menu_soundrecorder_icn MOV R1, 9 ADD R0, R4, 0 BL _SetIcon LDR R2, asoundrecorder_lng MOV R1, 9 ADD R0, R4, 0 BL _SetInfoText LDR R2, link__Soundrecorder MOV R1, 9 ADD R0, R4, 0 BL _SetAction ;============================================================== MOV R2, 0 MOV R1, 0xA ADD R0, R4, 0 BL _SetAction adr R0, aMy_elfs MOV R1, 0 MOV R2, 0xF0 BL aStr2ID ADD R2, R0, 0 MOV R1, 0xA ADD R0, R4, 0 BL _SetText LDR R2, atajos_icn MOV R1, 0xA ADD R0, R4, 0 BL _SetIcon ;============================================================== MOV R2, 0xB MOV R1, 0xA ADD R0, R4, 0 BL a_SetItemAsSubItem adr R0, aBcfgEdit MOV R1, 0 MOV R2, 0xF0 BL aStr2ID ADD R2, R0, 0 MOV R1, 0xB ADD R0, R4, 0 BL _SetText adr R0, aBcfgEdit MOV R1, 0 MOV R2, 0xF0 BL aStr2ID ADD R2, R0, 0 MOV R1, 0xB ADD R0, R4, 0 BL _SetInfoText LDR R2, BcfgEdit_Icon MOV R1, 0xB ADD R0, R4, 0 BL _SetIcon LDR R2, link_Load_BcfgEdit MOV R1, 0xB ADD R0, R4, 0 BL _SetAction ;============================================================== MOV R2, 0xC MOV R1, 0xA ADD R0, R4, 0 BL a_SetItemAsSubItem adr R0, aDynCheck MOV R1, 0 MOV R2, 0xF0 BL aStr2ID ADD R2, R0, 0 MOV R1, 0xC ADD R0, R4, 0 BL _SetText adr R0, aDynCheck MOV R1, 0 MOV R2, 0xF0 BL aStr2ID ADD R2, R0, 0 MOV R1, 0xC ADD R0, R4, 0 BL _SetInfoText LDR R2, DynCheck_Icon MOV R1, 0xC ADD R0, R4, 0 BL _SetIcon LDR R2, link_Load_DynCheck MOV R1, 0xC ADD R0, R4, 0 BL _SetAction ;============================================================== MOV R2, 0xD MOV R1, 0xA ADD R0, R4, 0 BL a_SetItemAsSubItem adr R0, aNShooter MOV R1, 0 MOV R2, 0xF0 BL aStr2ID ADD R2, R0, 0 MOV R1, 0xD ADD R0, R4, 0 BL _SetText adr R0, aNShooter MOV R1, 0 MOV R2, 0xF0 BL aStr2ID ADD R2, R0, 0 MOV R1, 0xD ADD R0, R4, 0 BL _SetInfoText LDR R2, NShooter_Icon MOV R1, 0xD ADD R0, R4, 0 BL _SetIcon LDR R2, link_Load_NShooter MOV R1, 0xD ADD R0, R4, 0 BL _SetAction ;============================================================== MOV R2, 0xE MOV R1, 0xA ADD R0, R4, 0 BL a_SetItemAsSubItem adr R0, aEpmanager MOV R1, 0 MOV R2, 0xF0 BL aStr2ID ADD R2, R0, 0 MOV R1, 0xE ADD R0, R4, 0 BL _SetText adr R0, aEpmanager MOV R1, 0 MOV R2, 0xF0 BL aStr2ID ADD R2, R0, 0 MOV R1, 0xE ADD R0, R4, 0 BL _SetInfoText LDR R2, Epmanager_Icon MOV R1, 0xE ADD R0, R4, 0 BL _SetIcon LDR R2, link_Load_EPManager MOV R1, 0xE ADD R0, R4, 0 BL _SetAction ;============================================================== MOV R2, 0xF MOV R1, 0xA ADD R0, R4, 0 BL a_SetItemAsSubItem adr R0, aFindFiles MOV R1, 0 MOV R2, 0xF0 BL aStr2ID ADD R2, R0, 0 MOV R1, 0xF ADD R0, R4, 0 BL _SetText adr R0, aFindFiles MOV R1, 0 MOV R2, 0xF0 BL aStr2ID ADD R2, R0, 0 MOV R1, 0xF ADD R0, R4, 0 BL _SetInfoText LDR R2, FindFiles_Icon MOV R1, 0xF ADD R0, R4, 0 BL _SetIcon LDR R2, link_Load_FindFiles MOV R1, 0xF ADD R0, R4, 0 BL _SetAction ;============================================================== MOV R2, 0x10 MOV R1, 0xA ADD R0, R4, 0 BL a_SetItemAsSubItem adr R0, aMyShortcuts MOV R1, 0 MOV R2, 0xF0 BL aStr2ID ADD R2, R0, 0 MOV R1, 0x10 ADD R0, R4, 0 BL _SetText adr R0, aMyShortcuts MOV R1, 0 MOV R2, 0xF0 BL aStr2ID ADD R2, R0, 0 MOV R1, 0x10 ADD R0, R4, 0 BL _SetInfoText LDR R2, MyShortcuts_Icon MOV R1, 0x10 ADD R0, R4, 0 BL _SetIcon LDR R2, link_Load_MyShortcuts MOV R1, 0x10 ADD R0, R4, 0 BL _SetAction ;============================================================== LDR R2, A_autor_inf_o MOV R1, 0x11 ADD R0, R4, 0 BL _SetAction LDR R2, aAbout_lng MOV R1, 0x11 ADD R0, R4, 0 BL _SetText LDR R2, aInfo_icn MOV R1, 0x11 ADD R0, R4, 0 BL _SetIcon LDR R2, aAbout_lng MOV R1, 0x11 ADD R0, R4, 0 BL _SetInfoText ;============================================================== LDR R0, [R6,8] LDR R3, _retorno BX R3 ;============================================================== _Display_setthe: PUSH {LR} LDR R0, aDisplay_setthe B _GoToMenuLink ;============================================================== _Settings_backg: PUSH {LR} LDR R0, aSettings_backg B _GoToMenuLink ;============================================================== _Settings_brigh: PUSH {LR} LDR R0, aSettings_brigh B _GoToMenuLink ;============================================================== _Menuitem_bt_ac: PUSH {LR} LDR R0, aMenuitem_bt_ac B _GoToMenuLink ;============================================================== _Mediaplayer_vi: PUSH {LR} LDR R0, aMediaplayer_vi B _GoToMenuLink ;============================================================== _Soundrecorder: PUSH {LR} LDR R0, aSoundrecorder B _GoToMenuLink ;============================================================== _aFmradio: PUSH {LR} LDR R0, aFmradio ;============================================================== _GoToMenuLink: BL aGoToMenuLink POP {PC} ;============================================================== autor_info: PUSH {R0-R7,LR} adr R0, aMy_Shortcusts MOV R1, 6 MOV R2, 0x40 BL aStr2ID ADD R1, R0, 0 LDR R0, aEMPTY_SID ADD R4, R0, 0 MOV R2, 0 MOV R3, 1 BL aMessageBox POP {R0-R7,PC} align 4 _carga dw 0x45385F41 a_ACTION_SELECT1 dw 0xFC2 ;=================Labels============================================= aThemes_lng dw 0x5D3 aWallpaper_lng dw 0x5AA aBrightness_lng dw 0xFDC aBluetooth_lng dw 0xDE9 aRadio_lng dw 0x81D aVideo_lng dw 0x5FA asoundrecorder_lng dw 0x1B94 aMisAtajos_lng dw 0x94B aAbout_lng dw 0x4CE ;=================Icons============================================= _db_list_theme_icn dw 0xEA2D _db_list_image_directory_icn dw 0xEA05 _rn_vert_bookmarks_ani_icn dw 0xEEAF _menu_bt_remote_control_icn dw 0xEC6B aEntertainnement_menu_radio_icn dw 0xEAF5 aDB_list_video_file_icn dw 0xEA30 aentertainament_menu_soundrecorder_icn dw 0xEAF6 atajos_icn dw 0xEE81 aInfo_icn dw 0xEBA7 BcfgEdit_Icon dw 0xF426 DynCheck_Icon dw 0xF427 NShooter_Icon dw 0xF42B Epmanager_Icon dw 0xF428 FindFiles_Icon dw 0xF429 MyShortcuts_Icon dw 0xF42A ;=================links============================================= link__Display_setthe dw _Display_setthe+1 link__Settings_backg dw _Settings_backg+1 link__Settings_brigh dw _Settings_brigh+1 link__Menuitem_bt_ac dw _Menuitem_bt_ac+1 link_aFmradio dw _aFmradio+1 link__Mediaplayer_vi dw _Mediaplayer_vi+1 link__Soundrecorder dw _Soundrecorder+1 link_Load_BcfgEdit dw Load_BcfgEdit link_Load_DynCheck dw Load_DynCheck link_Load_NShooter dw Load_NShooter link_Load_EPManager dw Load_EPManager link_Load_FindFiles dw Load_FindFiles link_Load_MyShortcuts dw Load_MyShortcuts A_autor_inf_o dw autor_info+1 ;=====================functions========================================= _SetAction: LDR R3, aGUIObject_Softkey_SetAction BX R3 ;============================================================== _SetText: LDR R3, aGUIObject_Softkey_SetText BX R3 ;============================================================== a_SetItemAsSubItem: LDR R3, aGUIObject_SoftKeys_SetItemAsSubItem BX R3 ;============================================================== _SetIcon: LDR R3, aGUIObject_SoftKeys_SetIcon BX R3 ;============================================================== aGoToMenuLink: LDR R3, aGoToMenuLinkX BX R3 ;============================================================== aStr2ID: LDR R3, offaStr2ID BX R3 ;============================================================== aMessageBox: LDR R3, off_Box BX R3 ;============================================================== _SetInfoText: LDR R3, off_InfoText BX R3 ;=====================branchs========================================= align 4 aDisplay_setthe dw 0x45BB1FA0 ;"Display_SetTheme_Id",0 aSettings_backg dw 0x45BC8FB8 ;"Settings_Background_Id",0 aSettings_brigh dw 0x45BC9690 ;"Settings_Brightness_Id",0 aMenuitem_bt_ac dw 0x45BCC410 ;"MenuItem_Bt_Activation",0 aFmradio dw 0x45BCB7E8 ;"FMRadio",0 aMediaplayer_vi dw 0x45BC85B8 ;aMediaplayer_video aSoundrecorder dw 0x45BC823C ;aSoundrecorder _retorno dw return+1 ;0x45386282+1 off_InfoText dw GUIObject_SoftKeys_SetInfoText+1 off_Box dw MessageBox+1 offaStr2ID dw Str2ID+1 aGUIObject_Softkey_SetAction dw GUIObject_SoftKeys_SetAction+1 aGUIObject_Softkey_SetText dw GUIObject_SoftKeys_SetText+1 aGUIObject_SoftKeys_SetItemAsSubItem dw GUIObject_SoftKeys_SetItemAsSubItem+1 aGUIObject_SoftKeys_SetIcon dw 0x45381740+1 aGoToMenuLinkX dw 0x45386F80+1 aEMPTY_SID dw 0x6FFFFFFF ;=================texts============================================= aMy_elfs du 'My Elfs',0 align 4 aBcfgEdit du 'BcfgEdit',0 align 4 aDynCheck du 'DynCheck',0 align 4 aNShooter du 'NShooter',0 align 4 aEpmanager du 'EPManager',0 aFindFiles du 'FindFiles',0 aMyShortcuts du 'MyShortcuts',0 aMy_Shortcusts db 'My Shortcuts v1.2', 0xA, '© albertnet3', 0xA, 'www.topsony.com', 0xA, 'www.supertrubka.org',0 align 4 ;=======================elfs1======================================= CODE32 Load_BcfgEdit: STMFD SP!, {LR} LDR R1, [R0,0x74] MOV R3, 0 LDR R2, [R1,8] LDR R1, [R1,4] adr R0, aTpaOtherZbinBc SWI 0x10D LDMFD SP!, {PC} CODE16 aTpaOtherZbinBc du '/tpa/user/other/ZBin/BcfgEdit.elf',0 align 4 CODE32 ;=======================elfs2======================================= Load_DynCheck: STMFD SP!, {LR} LDR R1, [R0,0x74] MOV R3, 0 LDR R2, [R1,8] LDR R1, [R1,4] adr R0, aTpaOtherZbinDy SWI 0x10D LDMFD SP!, {PC} CODE16 aTpaOtherZbinDy du '/tpa/user/other/ZBin/DynCheck.elf',0 align 4 CODE32 ;=======================elfs3======================================= Load_NShooter: STMFD SP!, {LR} LDR R1, [R0,0x74] MOV R3, 0 LDR R2, [R1,8] LDR R1, [R1,4] adr R0, aTpaOtherZbinNS SWI 0x10D LDMFD SP!, {PC} CODE16 aTpaOtherZbinNS du '/tpa/user/other/ZBin/NShooter.elf',0 align 4 CODE32 ;=======================elfs4======================================= Load_EPManager: STMFD SP!, {LR} LDR R1, [R0,0x74] MOV R3, 0 LDR R2, [R1,8] LDR R1, [R1,4] adr R0, aTpaOtherZbinEP SWI 0x10D LDMFD SP!, {PC} CODE16 aTpaOtherZbinEP du '/tpa/user/other/ZBin/EPManager.elf',0 align 4 CODE32 ;=======================elfs5======================================= Load_FindFiles: STMFD SP!, {LR} LDR R1, [R0,0x74] MOV R3, 0 LDR R2, [R1,8] LDR R1, [R1,4] adr R0, aUsbOtherZbinFi SWI 0x10D LDMFD SP!, {PC} CODE16 aUsbOtherZbinFi du '/tpa/user/other/ZBin/FindFiles.elf',0 align 4 CODE32 ;=======================elfs6======================================= Load_MyShortcuts: STMFD SP!, {LR} LDR R1, [R0,0x74] MOV R3, 0 LDR R2, [R1,8] LDR R1, [R1,4] adr R0, aUsbOtherZbinMy SWI 0x10D LDMFD SP!, {PC} CODE16 aUsbOtherZbinMy du '/tpa/user/other/ZBin/MyShortcuts.elf',0