I writed again algoritm of this patch I don't know should I wrote my name to where? ( e ) or ( c ) ? example; --- (c) Juhu07, Gurkan! --- (c) Juhu07 --- (e,p) Gurkan! I'm bored with get negative reps for nothing. Added ASM files.Original ASM:
Код:
include "x.inc" include "u10 lib2.asm" org 0x1536EC60 ;1513bedc B 0x1536EC7E ;1513BEFA org 0x15ACADD4 ;159615e0 DCD loc_15F92A2A+1 org 0x1464C4B4 ;1464C4D4 ;1462aa2e LDR R3, off_1462AA34 BX R3 ; DCB 0xFF ; DCB 0xFF off_1462AA34 DCD loc_15F92900+1 NOP back: ;================================================================================= org 0x15C75Eb0 ;15f92900 loc_15F92900: LDR R0, [R4,0x20] MOV R2, 0 MOV R1, 0x37 BL _GUIObject_SoftKeys_SetAction LDR R2, _satir_lng MOV R1, 0x37 LDR R0, [R4,0x20] BL _GUIObject_SoftKeys_SetText ; adr R0, aGrajKiedyPodpi ; "Graj, kiedy podpinasz sluchawki" ; MOV R1, 0 ; MOV R2, 0xFF ; BL _Str2ID ; ADD R2, R0, 0 ; MOV R1, 0x37 ; LDR R0, [R4,0x20] ; BL _GUIObject_SoftKeys_SetText LDR R2, dword_15F929B0 MOV R1, 0x38 LDR R0, [R4,0x20] BL _GUIObject_SoftKeys_SetText LDR R2, off_15F929A8 MOV R1, 0x38 LDR R0, [R4,0x20] BL _GUIObject_SoftKeys_SetAction LDR R0, [R4,0x20] MOV R1, 0x37 MOV R2, 0x38 BL _GUIObject_SoftKeys_SetItemAsSubItem BL sub_15F92A60 CMP R0, 0 BEQ loc_15F92958 LDR R0, [R4,0x20] MOV R1, 0x38 LDR R2, dword_15F929B8 BL _GUIObject_SoftKeys_SetInfoText LDR R0, [R4,0x20] MOV R1, 0x38 MOV R2, 0 BL _GUIObject_SoftKeys_SetEnable loc_15F92958: LDR R2, dword_15F929B4 MOV R1, 0x39 LDR R0, [R4,0x20] BL _GUIObject_SoftKeys_SetText LDR R2, off_15F929AC MOV R1, 0x39 LDR R0, [R4,0x20] BL _GUIObject_SoftKeys_SetAction LDR R0, [R4,0x20] MOV R1, 0x37 MOV R2, 0x39 BL _GUIObject_SoftKeys_SetItemAsSubItem BL sub_15F92A60 CMP R0, 1 BEQ loc_15F92992 LDR R0, [R4,0x20] MOV R1, 0x39 LDR R2, dword_15F929B8 BL _GUIObject_SoftKeys_SetInfoText LDR R0, [R4,0x20] MOV R1, 0x39 MOV R2, 0 BL _GUIObject_SoftKeys_SetEnable loc_15F92992: LDR R2, off_15F929A4 LDR R0, [R4,0x20] MOV R1, 2 BL _GUIObject_SoftKeys_SetAction LDR R3, off_15F929A0 BX R3 ; --------------------------------------------------------------------------- align 4 off_15F929A0 DCD back+1 off_15F929A4 DCD 0x1529FA90+1 ;15073670+1 off_15F929A8 DCD loc_15F929FC+1 off_15F929AC DCD sub_15F92A1C+1 dword_15F929B0 DCD 0x109 dword_15F929B4 DCD 0x108 dword_15F929B8 DCD 0x213f _satir_lng dw 0x1e9 ;aGrajKiedyPodpi du "Graj, kiedy podpinasz sluchawki",0 ; --------------------------------------------------------------------------- loc_15F929FC: PUSH {R0-R7,LR} MOV R0, 0 PUSH {R0} BL sub_15F92A1C LDR R0, off_15F92A78 adr R1, aPlugged ; "plugged" MOV R2, 4 MOVL R3, 0x180 BL __fopen BL _fclose ADD SP, SP, 4 POP {R0-R7,PC} sub_15F92A1C: PUSH {R0-R7,LR} LDR R0, off_15F92A78 adr R1, aPlugged ; "plugged" MOV R2, 0 BL _FileDelete POP {R0-R7,PC} loc_15F92A2A: PUSH {R0-R7,LR} BL sub_15F92A60 CMP R0, 0 BEQ loc_15F92A4E BL _PHF_GetState CMP R0, 0 BEQ loc_15F92A3E B loc_15F92A48 loc_15F92A3E: LDR R0, off_15F92A5C BL _FindBook CMP R0, 0 BEQ locret_15F92A52 loc_15F92A48: LDR R0, dword_15F92A58 BL _UI_Event loc_15F92A4E: LDR R7, off_15F92A54 BLX R7 locret_15F92A52: POP {R0-R7,PC} ;align 4 off_15F92A54 DCD 0x145CC00C+1 ;145B1420+1 ;pg_VoiceControl_Default__0x5E4+1 dword_15F92A58 DCD 0x27D9 off_15F92A5C DCD isAudioPlayerBook sub_15F92A60: PUSH {R1,R2,LR} LDR R0, off_15F92A78 MOV R2, 0 adr R1, aPlugged ; "plugged" BL _fstat BMI loc_15F92A72 MOV R0, 1 B locret_15F92A74 loc_15F92A72: MOV R0, 0 locret_15F92A74: POP {R1,R2,PC} align 4 off_15F92A78 DCD 0x15B5422C ;159E0804 ; "/tpa/system/settings" aPlugged du "plugged",0 _PHF_GetState: LDR R3, off_15F92A90 BX R3 off_15F92A90 DCD PHF_GetState _FindBook: LDR R3, off_15F92A98 BX R3 off_15F92A98 DCD FindBook _UI_Event: LDR R3, off_15F92AA0 BX R3 off_15F92AA0 DCD UI_Event _fstat: LDR R3, off_15F92AA8 BX R3 off_15F92AA8 DCD fstat __fopen: LDR R3, off_15F92AB0 BX R3 off_15F92AB0 DCD _fopen _fclose: LDR R3, off_15F92AB8 BX R3 off_15F92AB8 DCD fclose _FileDelete: LDR R3, off_15F92AC0 BX R3 off_15F92AC0 DCD FileDelete _GUIObject_SoftKeys_SetAction: LDR R3, off_15F92AC8 BX R3 off_15F92AC8 DCD GUIObject_SoftKeys_SetAction _Str2ID: LDR R3, off_15F92AD0 BX R3 off_15F92AD0 DCD Str2ID _GUIObject_SoftKeys_SetText: LDR R3, off_15F92AD8 BX R3 off_15F92AD8 DCD GUIObject_SoftKeys_SetText _GUIObject_SoftKeys_SetItemAsSubItem: LDR R3, off_15F92AE0 BX R3 off_15F92AE0 DCD GUIObject_SoftKeys_SetItemAsSubItem _GUIObject_SoftKeys_SetInfoText: LDR R3, off_15F92AE8 BX R3 off_15F92AE8 DCD GUIObject_SoftKeys_SetInfoText _GUIObject_SoftKeys_SetEnable: LDR R3, off_15F92AF0 BX R3 off_15F92AF0 DCD GUIObject_SoftKeys_SetEnable
NEW My ASM:
Код:
include "x.inc" include "u10 lib3.asm" org 0x1536EC60 ;1513bedc B 0x1536EC7E ;1513BEFA org 0x15ACADD4 ;159615e0 DCD _govde2+1 org 0x1464C4B4 LDR R3, off_1462AA34 BX R3 ; align 4 off_1462AA34 DCD _govde+1 NOP _back: ;================================================================================= org 0x15C78A10 _govde: LDR R0, [R4,0x20] LDR R2, _pencere_ileri MOV R1, 0x37 BL _GUIObject_SoftKeys_SetAction LDR R0, [R4,0x20] LDR R2, _title_lng MOV R1, 0x37 BL _GUIObject_SoftKeys_SetText LDR R3, _return BX R3 _pencere: PUSH {R0,R4,R7,LR} ADD R4, R0, 0 MOV R1, 0 BL _CreateOneOfMany STR R0, [R4,0x8] LDR R1, _title_lng LDR R0, [R4,0x8] BL _GUIObject_SetTitleText LDR R1, _titleicon LDR R0, [R4,0x8] BL _GUIObject_SetTitleIcon LDR R0, [R4,0x8] MOV R1, 9 BL _GUIObject_SetStyle LDR R0, [R4,0x8] MOV R1, 1 BL _ListMenu_SetHotkeyMode LDR R0, [R4,0x8] MOV R1, 2 BL _OneOfMany_SetItemCount BL _merkez LDR R0, [R4,0x8] BL _OneOfMany_SetChecked LDR R0, [R4,0x8] LDR R1, _lng_yol MOV R2, 2 BL _OneOfMany_SetTexts LDR R0, [R4,0x8] LDR R1, _selecettusu LDR R2, _selecetadres BL _GUIObject_SoftKeys_SetAction LDR R0, [R4,0x8] LDR R1, _backtusu LDR R2, _backadres BL _GUIObject_SoftKeys_SetAction LDR R0, [R4,0x8] MOVL R1, 0xFC0 LDR R2, _ekransecimyol BL _GUIObject_SoftKeys_SetAction LDR R0, [R4,0x8] BL _GUIObject_Show POP {R0,R4,R7,PC} align 4 _lng_yol dw _lngler _return dw _back+1 _pencere_ileri dw _pencere+1 _selecetadres dw _binformatyol+1 _selecettusu dw 0xFC2 _backadres dw 0x151BE19C+1 _backtusu dw 0xFAF _ekransecimyol dw _ekransecim+1 _lngler dw 0x109 dw 0x108 _titleicon dw 0xB8E _title_lng dw 0x1F3 align 4 _binformatyol: PUSH {R0-R7,LR} ADD R4, R0, 0 ADD R0, R1, 0 BL _OneOfMany_GetSelected SUB SP, SP, 4 STR R0, [SP] MOV R0, 0 PUSH {R0} MOVL R3, 0x180 MOV R2, 2 adr R1, _Binfile LDR R0, _yol LDR R3, __fopen BLX R3 ADD SP, SP, 4 ADD R5, R0, 0 MOV R2, 4 MOV R1, SP LDR R3, _fwrite BLX R3 ADD R0, R5, 0 LDR R3, _fclose BLX R3 ADD SP, SP, 4 ADD R0, R4, 0 BL _ekransecim POP {R0-R7,PC} _merkez: var_24 = -0x24 PUSH {R0,R2-R7,LR} MOV R0, 0 PUSH {R0} MOVL R3, 0x180 MOV R2, 1 adr R1, _Binfile LDR R0, _yol LDR R3, __fopen BLX R3 ADD R5, R0, 0 MOV R2, 4 MOV R1, SP LDR R3, _fread BLX R3 ADD R0, R5, 0 LDR R3, _fclose BLX R3 LDR R1, [SP,0x24+var_24] ADD SP, SP, 4 POP {R0,R2-R7,PC} _ekransecim: PUSH {LR} ADD R4, R0, 0 LDR R0, [R4,0x8] LDR R3, _Destroy BLX R3 MOV R0, 0 STR R0, [R4,0x8] POP {PC} ;----------------------------------------------------------------------------------------------------- _govde2: PUSH {R0-R7,LR} BL _merkez CMP R1, 0 BEQ _open CMP R1, 1 BEQ _close LDR R1, _PHF_GetState B _alan2 _open: LDR R0, _PLAY BL _UI_Event _close: LDR R0, _PlayerBook BL _FindBook CMP R0, 0 BEQ locret_15F92A52 _alan2: LDR R7, _return2 BLX R7 locret_15F92A52: POP {R0-R7,PC} align 4 _PLAY dw 0x27D9 _PlayerBook dw isAudioPlayerBook _return2 dw 0x145CC00C+1 ;145B1420+1 ;pg_VoiceControl_Default__0x5E4+1 _yol dw 0x15B5422C ;159E0804 ; "/tpa/system/settings" _Binfile du "Kulaklik.bin",0 align 4 _GUIObject_SoftKeys_SetAction: LDR R3, _junk1 BX R3 _GUIObject_SoftKeys_SetText: LDR R3, _junk2 BX R3 _GUIObject_SetStyle: LDR R3, _junk3 BX R3 _GUIObject_SetTitleText: LDR R3, _junk4 BX R3 _GUIObject_SetTitleIcon: LDR R3, _junk5 BX R3 _GUIObject_Show: LDR R3, _junk6 BX R3 _OneOfMany_SetTexts: LDR R3, _junk7 BX R3 _OneOfMany_SetChecked: LDR R3, _junk8 BX R3 _OneOfMany_SetItemCount: LDR R3, _junk9 BX R3 _OneOfMany_GetSelected: LDR R3, _junk10 BX R3 _CreateOneOfMany: LDR R3, _junk11 BX R3 _ListMenu_SetHotkeyMode: LDR R3, _junk12 BX R3 _PHF_GetState: LDR R3, _junk13 BX R3 _FindBook: LDR R3, _junk14 BX R3 _UI_Event: LDR R3, _junk15 BX R3 _Str2ID: LDR R3, _junk16 BX R3 _junk1 dw GUIObject_SoftKeys_SetAction _junk2 dw GUIObject_SoftKeys_SetText _junk3 dw GUIObject_SetStyle _junk4 dw GUIObject_SetTitleText _junk5 dw GUIObject_SetTitleIcon _junk6 dw GUIObject_Show _junk7 dw OneOfMany_SetTexts _junk8 dw OneOfMany_SetChecked _junk9 dw OneOfMany_SetItemCount _junk10 dw OneOfMany_GetSelected _junk11 dw CreateOneOfMany _junk12 dw ListMenu_SetHotkeyMode _junk13 dw PHF_GetState _junk14 dw FindBook _junk15 dw UI_Event _junk16 dw Str2ID _fwrite dw fwrite _fclose dw fclose _fread dw fread __fopen dw _fopen _Destroy dw GUIObject_Destroy