Учимся писать патчи : Патчестроение : Форум

Страница 180 из 180: « 1 ... 176 177 178 179 [180]

 vetel:
07.05.14, 01:35
 В оригинале 10,20,30,40,50,60 сек,
Код:
a60A5        DCB "9",0,"0",0," ",0,"A",4,"5",4,":",4,0,0,0,0
, здесь я изменил 6(60 сек) на 9 но осталось также 60, значит где то в другом месте, спасибо попробую

 Therion:
07.05.14, 10:43
 vetel, как я понимаю там идёт время и текстовая метка. Самый простой вариант это в месте где загружается время умножить его на 60

adr r0, dcb_10second ; Грузим время с патча в секундах
ldr r1, one_minute ; Одна минута = 60 секунд
mul r1, r1, r0 ; Умножаем 10 секунд на 60 (1 минута)
; 10*60 = 600 секунд
; R1 = 600 секунд

...
align 4
one_minute dw 0x60
dcb_10second db '0x10'

Как-то так. Подзабыл уже ...

 den_po:
08.05.14, 07:39
 
Therion пишет:
vetel, писал:
a10A5        DCB "1",0,"0",0," ",0,"A",4,"5",4,":",4,0,0,0,0
a20A5        DCB "2",0,"0",0," ",0,"A",4,"5",4,":",4,0,0,0,0
a30A5        DCB "3",0,"0",0," ",0,"A",4,"5",4,":",4,0,0,0,0
a40A5        DCB "4",0,"0",0," ",0,"A",4,"5",4,":",4,0,0,0,0
a50A5        DCB "5",0,"0",0," ",0,"A",4,"5",4,":",4,0,0,0,0
a60A5        DCB "9",0,"0",0," ",0,"A",4,"5",4,":",4,0,0,0,0

потыцай тут клавишу A (eng)
сколько в оригинале, есть выбор времени ?

alt+a и unicode. а в асме заменить unicode 4, <строка> на du "строка". при этом файл должен быть в utf8 без bom

 Nook:
10.05.14, 00:17
 Therion, Саш так данные подгружаются из самой прошивки =\ если я не ошбибаюсь

Код: 
include "x.inc"
include "c902.inc"
;C902 SW-R3EG004 AS
;Выбор времени автоблокировки клавиатуры и подсветки
;Выбор осуществляется в меню Параметры->Общие->Защита->Автоблок. клавиш
;v. 1.5
;(c) IronMaster
;(p) 

org 0x10DD3F84
   BLX     R1
; ---------------------------------------------------------------------------
org 0x10DD3FBC 
DCD loc_1279AD80+1
; ---------------------------------------------------------------------------
org 0x10DD3F92
   BLX     R1
; ---------------------------------------------------------------------------
org 0x10DD3FC4
DCD loc_1279AD94+1   
; ---------------------------------------------------------------------------
org 0x11BDE238
DCD loc_1279ADE0+1
; ---------------------------------------------------------------------------
org 0x109A927C
   BLX     R2
; ---------------------------------------------------------------------------
org 0x109A9294 
DCD sub_1279AF0C+1 
; ---------------------------------------------------------------------------
org 0x10E482DA                
 LDR     R5, off_10E64AD8
 BLX     R5
 B       0x10E482E4
off_10E64AD8    DCD loc_1279AF1A+1 
; ---------------------------------------------------------------------------


org 0x1269E870
loc_1279AD80:                          
                MOVS    R3, 0
                PUSH    {R3-R7,LR}
                BL      sub_1279ADAC
                ADDS    R0, R0, 1
                MOVLS   R1, 0x2700
                ADDS    R1, 0x10
                MULS    R1, R0
                POP     {R3-R7,PC}
; ---------------------------------------------------------------------------
loc_1279AD94:                          
                MOVS    R3, 0
                PUSH    {R2-R7,LR}
                BL      sub_1279ADAC
                MOVLS   R1, 0x2700
                ADDS    R1, 0x10
                MULS    R1, R0
                MOVLS   R2, 0x6D0
                SUBS    R1, R1, R2
                POP     {R2-R7,PC}
sub_1279ADAC:                          
                PUSH    {R4-R7,LR}
                SUB     SP, SP, 4
                MOV     R1, SP
                MOVS    R2, 0
                STR     R2, [SP]
                ADR     R0, aLightTime  ; "light-time"
                BL      sub_1279B040
                LDR     R0, [SP]
                CMP     R0, 0
                BNE     loc_1279ADC4
                MOVS    R0, 2
loc_1279ADC4:                          
                ADD     SP, SP, 4
                POP     {R4-R7,PC}
sub_1279ADC8:                          
                PUSH    {R4-R7,LR}
                ADDS    R1, R0, 0
                ADR     R0, aLightTime  ; "light-time"
                BL      sub_1279B048
                POP     {R4-R7,PC}
; ---------------------------------------------------------------------------
aLightTime      DCB "light-time",0     
                DCB 0xFF
; ---------------------------------------------------------------------------
loc_1279ADE0:                          
                PUSH    {R4-R7,LR}
                ADDS    R4, R1, 0
                MOVS    R1, 0
                ADDS    R0, R4, 0
                BL      sub_1279AFC8
                STR     R0, [R4,0x1C]
                LDR     R1, dword_1279AF4C
                BL      sub_1279B008
                LDR     R0, [R4,0x1C]
                MOVS    R1, 7
                BL      sub_1279AFF0
                ADR     R1, loc_1279AEA4
                ADDS    R1, 1
                LDR     R0, [R4,0x1C]
                BL      sub_1279AFF8
                BL      sub_1279ADAC
                ADDS    R1, R0, 0
                LDR     R0, [R4,0x1C]
                BL      sub_1279AFD8
                LDR     R0, [R4,0x1C]
                ADR     R2, loc_1279AE3C
                ADDS    R2, 1
                LDR     R1, dword_1279AF40
                BL      sub_1279B000
                LDR     R0, [R4,0x1C]
                LDR     R2, off_1279AF34
                LDR     R1, dword_1279AF44
                BL      sub_1279B000
                LDR     R0, [R4,0x1C]
                LDR     R2, off_1279AF34
                LDR     R1, dword_1279AF48
                BL      sub_1279B000
                LDR     R0, [R4,0x1C]
                BL      sub_1279B010
                POP     {R4-R7,PC}
; ---------------------------------------------------------------------------
                align 4
loc_1279AE3C:                          
                PUSH    {R4-R7,LR}
                SUB     SP, SP, 4
                ADDS    R5, R1, 0
                ADDS    R0, R1, 0
                BL      sub_1279AFD0
                ADDS    R6, R0, 0
                BEQ     loc_1279AE82
                BL      sub_1279ADAC
                CMP     R0, R6
                BEQ     loc_1279AE7E
                ADDS    R1, R0, 0
                LDR     R2, off_1279AF58
                PUSH    {R2}
                MOVS    R3, 0
                LDR     R2, dword_1279AF64
                ADDS    R0, R5, 0
                BL      sub_1279AFE0
                ADD     SP, SP, 4
                ADDS    R0, R6, 0
                BL      sub_1279ADC8
                ADDS    R1, R6, 0
                LDR     R2, off_1279AF54
loc_1279AE70:                          
                PUSH    {R2}
                MOVS    R3, 0
                LDR     R2, dword_1279AF64
                ADDS    R0, R5, 0
                BL      sub_1279AFE0
                ADD     SP, SP, 4
loc_1279AE7E:                          
                ADD     SP, SP, 4
                POP     {R4-R7,PC}
; ---------------------------------------------------------------------------
loc_1279AE82:                          
                MOV     R0, SP
                BL      sub_1279B050
                MOV     R1, SP
                LDRB    R0, [R1]
                MOVS    R1, 1
                SUBS    R6, R1, R0
                ADDS    R0, R6, 0
                BL      sub_1279B058
                MOVS    R1, 0
                CMP     R6, 0
                BEQ     loc_1279AEA0
                LDR     R2, off_1279AF5C
                B       loc_1279AE70
; ---------------------------------------------------------------------------
loc_1279AEA0:                          
                LDR     R2, off_1279AF60
                B       loc_1279AE70
; ---------------------------------------------------------------------------
loc_1279AEA4:                          
                PUSH    {R4-R7,LR}
                SUB     SP, SP, 4
                ADDS    R4, R0, 0
                BL      sub_1279B018
                CMP     R0, 1
                BNE     loc_1279AEEA
                ADDS    R0, R4, 0
                BL      sub_1279B020
                ADDS    R5, R0, 0
                BEQ     loc_1279AEEE
                SUBS    R0, R0, 1
                LSLS    R1, R0, 4
                ADR     R0, a10Sec      ; "10 sec"
                ADDS    R0, R0, R1
                MOVS    R1, 0
                MOVS    R2, 0xFF
                BL      Sub_Str2ID
                ADDS    R1, R0, 0
                ADDS    R0, R4, 0
                BL      sub_1279B028
                BL      sub_1279ADAC
                CMP     R0, R5
                BEQ     loc_1279AEE0
                LDR     R2, off_1279AF58
                B       loc_1279AEE2
; ---------------------------------------------------------------------------
loc_1279AEE0:                          
                LDR     R2, off_1279AF54
loc_1279AEE2:                          
                MOVS    R1, 0
                ADDS    R0, R4, 0
                BL      sub_1279B030
loc_1279AEEA:                          
                ADD     SP, SP, 4
                POP     {R4-R7,PC}
; ---------------------------------------------------------------------------
loc_1279AEEE:                          
                LDR     R1, off_1279AF50
                ADDS    R0, R4, 0
                BL      sub_1279B028
                MOV     R0, SP
                BL      sub_1279B050
                MOV     R1, SP
                LDRB    R0, [R1]
                CMP     R0, 0
                BEQ     loc_1279AF08
                LDR     R2, off_1279AF5C
                B       loc_1279AEE2
; ---------------------------------------------------------------------------
loc_1279AF08:                          
                LDR     R2, off_1279AF60
                B       loc_1279AEE2
; ---------------------------------------------------------------------------
sub_1279AF0C:                      
                LDR     R2, off_1279AF3C
                PUSH    {R0,R2,R3,LR}
                BL      sub_1279ADAC
                MOVS    R1, 0xA
                MULS    R1, R0
                POP     {R0,R2,R3,PC}
; ---------------------------------------------------------------------------
loc_1279AF1A:                          
                LDR     R5, [R0,4]
                ADDS    R4, R1, 0
                LSLS    R0, R1, 5
                LDR     R1, dword_1279AF38
                ADDS    R6, R1, R0
                PUSH    {R0,R1,R3-R7,LR}
                BL      sub_1279ADAC
                MOVLS   R2, 0x2700
                ADDS    R2, 0x10
                MULS    R2, R0
                POP     {R0,R1,R3-R7,PC}
; ---------------------------------------------------------------------------
off_1279AF34    DCD 0x10DA2FB8+1     
dword_1279AF38  DCD 0x4BB7D5E4          
off_1279AF3C    DCD 0x109A921C+1     
dword_1279AF40  DCD 0xFC2              
dword_1279AF44  DCD 0xFBF              
dword_1279AF48  DCD 0xFC0              
dword_1279AF4C  DCD 0x3FC              
off_1279AF50    DCD 0x12F2             
off_1279AF54    DCD 0xEA2A      ;точка не выбрана
off_1279AF58    DCD 0xF350      ;точно выбора             
off_1279AF5C    DCD 0xF454      ;галочка       
off_1279AF60    DCD 0xEA28      ;фон под галочку            
dword_1279AF64  DCD 0xFFFF

a10Sec              DCB 0x31 ; 1        
        DCB    0
        DCB 0x30 ; 0
        DCB    0
        DCB 0x20
        DCB    0
        DCB 0xF1 ; с
        DCB    0
        DCB 0xE5 ; е
        DCB    0
        DCB 0xEA ; к
        DCB    0
        DCD 0
        DCB 0x32 ; 2
        DCB    0
        DCB 0x30 ; 0
        DCB    0
        DCB 0x20
        DCB    0
        DCB 0xF1 ; с
        DCB    0
        DCB 0xE5 ; е
        DCB    0
        DCB 0xEA ; к
        DCB    0
        DCD 0
        DCB 0x33 ; 3
        DCB    0
        DCB 0x30 ; 0
        DCB    0
        DCB 0x20
        DCB    0
        DCB 0xF1 ; с
        DCB    0
        DCB 0xE5 ; е
        DCB    0
        DCB 0xEA ; к
        DCB    0
        DCD 0
        DCB 0x34 ; 4
        DCB    0
        DCB 0x30 ; 0
        DCB    0
        DCB 0x20
        DCB    0
        DCB 0xF1 ; с
        DCB    0
        DCB 0xE5 ; е
        DCB    0
        DCB 0xEA ; к
        DCB    0
        DCD 0
        DCB 0x35 ; 5
        DCB    0
        DCB 0x30 ; 0
        DCB    0
        DCB 0x20
        DCB    0
        DCB 0xF1 ; с
        DCB    0
        DCB 0xE5 ; е
        DCB    0
        DCB 0xEA ; к
        DCB    0
        DCD 0
        DCB 0x36 ; 6
        DCB    0
        DCB 0x30 ; 0
        DCB    0
        DCB 0x20
        DCB    0
        DCB 0xF1 ; с
        DCB    0
        DCB 0xE5 ; е
        DCB    0
        DCB 0xEA ; к
        DCB    0
        DCD 0


sub_1279AFC8:                          
                LDR     R3, off_1279AFCC
                BX      R3
; ---------------------------------------------------------------------------
                align 4
off_1279AFCC    DCD CreateListMenu+1   
sub_1279AFD0:                          
                LDR     R3, off_1279AFD4
                BX      R3
; ---------------------------------------------------------------------------
off_1279AFD4    DCD ListMenu_GetSelectedItem+1
sub_1279AFD8:                          
                LDR     R3, off_1279AFDC
                BX      R3
; ---------------------------------------------------------------------------
off_1279AFDC    DCD ListMenu_SetCursorToItem+1
sub_1279AFE0:                          
                PUSH    {R3}
                LDR     R3, off_1279AFEC
                MOV     R12, R3
                POP     {R3}
                BX      R12
; ---------------------------------------------------------------------------
                align 4
off_1279AFEC    DCD ListMenu_SetItemIcon+1
sub_1279AFF0:                          
                LDR     R3, off_1279AFF4
                BX      R3
; ---------------------------------------------------------------------------
off_1279AFF4    DCD ListMenu_SetItemCount+1
sub_1279AFF8:                          
                LDR     R3, off_1279AFFC
                BX      R3
; ---------------------------------------------------------------------------
off_1279AFFC    DCD ListMenu_SetOnMessage+1
sub_1279B000:                          
                LDR     R3, off_1279B004
                BX      R3
; ---------------------------------------------------------------------------
off_1279B004    DCD GUIObject_SoftKeys_SetAction+1
sub_1279B008:                          
                LDR     R3, off_1279B00C
                BX      R3
; ---------------------------------------------------------------------------
off_1279B00C    DCD GUIObject_SetTitleText+1
sub_1279B010:                          
                LDR     R3, off_1279B014
                BX      R3
; ---------------------------------------------------------------------------
off_1279B014    DCD GUIObject_Show+1   
sub_1279B018:                          
                LDR     R3, off_1279B01C
                BX      R3          
off_1279B01C    DCD GUIonMessage_GetMsg+1
sub_1279B020:                          
                LDR     R3, off_1279B024
                BX      R3
; ---------------------------------------------------------------------------
off_1279B024    DCD GUIonMessage_GetCreatedItemIndex+1
sub_1279B028:                          
                LDR     R3, off_1279B02C
                BX      R3
; ---------------------------------------------------------------------------
off_1279B02C    DCD GUIonMessage_SetMenuItemText+1
sub_1279B030:                          
                LDR     R3, off_1279B034
                BX      R3
; ---------------------------------------------------------------------------
off_1279B034    DCD GUIonMessage_SetMenuItemIcon+1
Sub_Str2ID:                          
                LDR     R3, off_1279B03C
                BX      R3
; ---------------------------------------------------------------------------
off_1279B03C    DCD Str2ID+1           
sub_1279B040:                          
                LDR     R3, off_1279B044
                BX      R3
; ---------------------------------------------------------------------------
off_1279B044    DCD 0x10DA2FC4+1    ; возврат
sub_1279B048:                          
                LDR     R3, off_1279B04C
                BX      R3
; ---------------------------------------------------------------------------
off_1279B04C    DCD 0x10DA30AC+1    ; возврат 
sub_1279B050:                          
                LDR     R3, off_1279B054
                BX      R3
; ---------------------------------------------------------------------------
off_1279B054    DCD 0x10DA31EC+1     ; возврат
sub_1279B058:                          
                LDR     R3, off_1279B05C
                BX      R3
; ---------------------------------------------------------------------------
off_1279B05C    DCD 0x10DA31D8+1     ; возврат



 den_po:
10.05.14, 14:37
 
Nook пишет:
Код: 
a10Sec              DCB 0x31 ; 1        
        DCB    0
        DCB 0x30 ; 0
        DCB    0
        DCB 0x20
        DCB    0
        DCB 0xF1 ; с
        DCB    0
        DCB 0xE5 ; е
        DCB    0
        DCB 0xEA ; к
        DCB    0

отстой по двум причинам

 Nook:
13.05.14, 09:01
 den_po, Дэн это один из самых первых патчей что я портировал) я знаю эти причины)

 IronMaster:
15.05.14, 11:49
 Там время получается путем умножения установленного пункта на 10 сек. В явном виде время нигде не хранится
Страница 180 из 180: « 1 ... 176 177 178 179 [180]

URL этой темы:
https://mobilefree.justdanpo.ru/newbb_plus/viewtopic.php?topic_id=965&start=1790

© 2005-2018 supertrubka.org