MiFa

Untitled

Oct 9th, 2011
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;C902 SW-R3EG004 AO
  2. ;Run elf Myshortcuts © albertnet3
  3. ;for running this elf, pressing short press the softkey left in standbybook
  4. ;added vibration at moment to press the left softkeys.
  5. ;elf Load form: "/tpa/user/other/Zbin/" or "/card/other/Zbin/".
  6. ;If this elf not exist in Memory phone or card:
  7. ;+ Vibra
  8. ;+ playing Sound:
  9. ;Path: "/tpa/user/other/Ini/"
  10. ;Name: "emptybattery.3gp"
  11. ;and show the message:
  12. ;------------------------
  13. ;x"MyShortcuts.elf    x
  14. ;x © albertnet3        x
  15. ;x Not exist in     x
  16. ;x    Memory         x
  17. ;x Phone or Card!"    x
  18. ;------------------------
  19. ;(!)Note: Info for patch makers:
  20. ;I used the functions GetDir(0x1273D054) and elfload(0x1273DD50)
  21. ;of the "ELFPack v1.999 © Hussein".
  22. ;© albertnet3
  23. ;(p) buhh83
  24. ;V1.1
  25.  
  26. include "x.inc"
  27. include "lib\c902_r3eg004.asm"
  28.  
  29. org 0x10D99520;10d752c0
  30.                 DCD 0x22CE ;Shortcuts
  31.  
  32. org 0x10D9951C;10d752bc
  33.                 DCD newcode+1
  34.  
  35. ; ---------------------------------------------------------------------------
  36. org 0x127c3170
  37. sub_127C3170:
  38.                 PUSH    {LR}
  39.                 BL      j_AudioControl_Init
  40.                 CMP     R0, 0
  41.                 BNE     loc_127C3180
  42.                 BL      j_GetAudioControlPtr
  43.                 LDR     R0, [R0]
  44.  
  45. loc_127C3180:                          
  46.                 MOVL    R3, 0x12C
  47.                 MOV     R2, 0x32
  48.                 MOV     R1, 0x96
  49.                 BL      j_AudioControl_Vibrate
  50.                 POP     {PC}
  51.  
  52.                 DCB    0
  53.                 DCB    0
  54.  
  55. newcode:
  56.                 PUSH    {R4-R6,LR}
  57.                 LDR     R4, off_127C322C
  58.                 SUB     SP, SP, 0x1FC
  59.                 SUB     SP, SP, 0x20
  60.                 MOV     R0, 0x11
  61.                 BL      j_GetDir
  62.                 LSL     R5, R4, 0
  63.                 ADD     R5, 0xD0
  64.                 ADD     R2, SP, 0x200
  65.                 LSL     R1, R5, 0
  66.                 BL      j_fstat
  67.                 CMP     R0, 0
  68.                 BNE     loc_127C31DE
  69.                 MOV     R0, 0x11
  70.  
  71. loc_127C31B0:                          
  72.                 BL      j_GetDir
  73.                 LSL     R1, R0, 0
  74.                 MOV     R0, SP
  75.                 BL      j_wstrcpy
  76.                 ADD     R4, 0xF0
  77.                 LSL     R1, R4, 0
  78.                 MOV     R0, SP
  79.                 BL      j_wstrcat
  80.                 MOV     R3, 0
  81.                 MOV     R2, 0
  82.                 LSL     R1, R2, 0
  83.                 MOV     R0, SP
  84.                 BL      j_elfload
  85.                 BL      sub_127C3170
  86.                 MOV     R0, 1
  87.  
  88. loc_127C31D8:                          
  89.                 ADD     SP, SP, 0x1FC
  90.                 ADD     SP, SP, 0x20
  91.                 POP     {R4-R6,PC}
  92.  
  93.  
  94. loc_127C31DE:                          
  95.                 MOV     R0, 0x10
  96.                 BL      j_GetDir
  97.                 ADD     R2, SP, 0x200
  98.                 LSL     R1, R5, 0
  99.                 BL      j_fstat
  100.                 CMP     R0, 0
  101.                 BNE     loc_127C31F4
  102.                 MOV     R0, 0x10
  103.                 B       loc_127C31B0
  104.  
  105.  
  106. loc_127C31F4:                          
  107.                 LDR     R5, dword_127C3230
  108.                 MOV     R1, 0
  109.                 LSL     R2, R5, 0
  110.                 LSL     R0, R4, 0
  111.                 BL      j_TextID_Create
  112.                 LSL     R6, R0, 0
  113.                 MOV     R1, 0
  114.                 MOV     R0, 0
  115.                 PUSH    {R0,R1}
  116.                 MOV     R3, 1
  117.                 LDR     R0, dword_127C3234
  118.                 LSL     R2, R5, 0
  119.                 LSL     R1, R6, 0
  120.                 BL      j_MessageBox
  121.                 MOV     R2, 0xA
  122.                 LSL     R1, R4, 0
  123.                 ADD     R1, 0xAC
  124.                 ADD     R4, 0x80
  125.                 LSL     R0, R4, 0
  126.                 BL      j_PlayFileV
  127.                 BL      sub_127C3170
  128.                 MOV     R0, 0
  129.                 ADD     SP, SP, 8
  130.                 B       loc_127C31D8
  131. ; ---------------------------------------------------------------------------
  132. off_127C322C    DCD aMyshortcuts_el    
  133. dword_127C3230  DCD 0xFFFF
  134. dword_127C3234  DCD 0x6FFFFFFF          
  135. ; ---------------------------------------------------------------------------
  136. j_AudioControl_Init:                    
  137.                 LDR     R3, off_127C323C
  138.                 BX      R3              
  139. off_127C323C    DCD AudioControl_Init+1
  140. ; ---------------------------------------------------------------------------
  141. j_GetAudioControlPtr:
  142.                 LDR     R3, dword_127C3244
  143.                 BX      R3
  144. dword_127C3244  DCD GetAudioControlPtr;0x4BBD3A40
  145. ; ---------------------------------------------------------------------------
  146. j_AudioControl_Vibrate:                
  147.                 PUSH    {R3}
  148.                 LDR     R3, off_127C3254
  149.                 MOV     R12, R3
  150.                 POP     {R3}
  151.                 BX      R12            
  152.                 NOP
  153. off_127C3254    DCD AudioControl_Vibrate+1
  154. ; ---------------------------------------------------------------------------
  155. j_GetDir:
  156.                 LDR     R3, off_127C325C
  157.                 BX      R3
  158. off_127C325C    DCD 0x1273D054
  159. ; ---------------------------------------------------------------------------
  160. j_fstat:                                
  161.                 LDR     R3, off_127C3264
  162.                 BX      R3              
  163. off_127C3264    DCD fstat+1
  164. ; ---------------------------------------------------------------------------
  165. j_wstrcpy:                              
  166.                 LDR     R3, off_127C326C
  167.                 BX      R3              
  168. off_127C326C    DCD wstrcpy+1
  169. ; ---------------------------------------------------------------------------
  170. j_wstrcat:                              
  171.                 LDR     R3, off_127C3274
  172.                 BX      R3              
  173. off_127C3274    DCD wstrcat+1
  174. ; ---------------------------------------------------------------------------
  175. j_elfload:
  176.                 PUSH    {R3}
  177.                 LDR     R3, off_127C3284
  178.                 MOV     R12, R3
  179.                 POP     {R3}
  180.                 BX      R12
  181.                 NOP
  182. off_127C3284    DCD 0x1273DD50
  183. ; ---------------------------------------------------------------------------
  184. j_TextID_Create:                        
  185.                 LDR     R3, off_127C328C
  186.                 BX      R3              
  187. off_127C328C    DCD TextID_Create+1
  188. ; ---------------------------------------------------------------------------
  189. j_MessageBox:                          
  190.                 PUSH    {R3}
  191.                 LDR     R3, off_127C329C
  192.                 MOV     R12, R3
  193.                 POP     {R3}
  194.                 BX      R12            
  195.                 NOP
  196. off_127C329C    DCD MessageBox+1
  197. ; ---------------------------------------------------------------------------
  198. j_PlayFileV:                            
  199.                 LDR     R3, off_127C32A4
  200.                 BX      R3              
  201. off_127C32A4    DCD PlayFileV+1
  202. ; ---------------------------------------------------------------------------
  203. aMyshortcuts_el du      "MyShortcuts.elf",0xA,0xA9
  204.                 ;DCW 0xA
  205.                 ;DCW 0xA9
  206.                 DCB " ",0
  207. aAlbertnet3NotE du      "albertnet3",0xA
  208.                 ;DCW
  209.                 du      "Not exist in Memory Phone or Card!",0
  210. aTpaUserOtherIn du      "/tpa/user/other/Ini/",0
  211.                 DCB    0
  212.                 DCB    0
  213. aEmptybattery_3 du      "emptybattery.3gp",0
  214.                 DCB    0
  215.                 DCB    0
  216. aMyshortcuts__0 du      "MyShortcuts.elf",0
  217. aMyshortcuts__1 du      "/MyShortcuts.elf",0
  218.  
  219.  
Advertisement
Add Comment
Please, Sign In to add comment