root/platform/ixus275_elph350hs/sub/100a/boot.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. CreateTask_spytask
  2. boot
  3. CreateTask_my
  4. sub_FF0203C4_my
  5. sub_FF0228D4_my
  6. sub_FF024704_my
  7. sub_FF027AA0_my
  8. task_Startup_my
  9. taskcreatePhySw_my
  10. init_file_modules_task
  11. init_required_fw_features

   1 /*
   2  * boot.c - auto-generated by CHDK code_gen.
   3  */
   4 #include "lolevel.h"
   5 #include "platform.h"
   6 #include "core.h"
   7 #include "dryos31.h"
   8 
   9 #define offsetof(TYPE, MEMBER) ((int) &((TYPE *)0)->MEMBER)
  10 
  11 const char * const new_sa = &_end;
  12 
  13 /*----------------------------------------------------------------------
  14     CreateTask_spytask
  15 -----------------------------------------------------------------------*/
  16 void CreateTask_spytask()
  17 {
  18     _CreateTask("SpyTask", 0x19, 0x2000, core_spytask, 0);
  19 }
  20 
  21 /*----------------------------------------------------------------------
  22     boot()
  23 
  24     Main entry point for the CHDK code
  25 -----------------------------------------------------------------------*/
  26 
  27 
  28 
  29 /*************************************************************/
  30 //** boot @ 0xFF02000C - 0xFF02017C, length=93
  31 void __attribute__((naked,noinline)) boot() {
  32 asm volatile (
  33 "    LDR     R1, =0xC0410000 \n"
  34 "    MOV     R0, #0 \n"
  35 "    STR     R0, [R1] \n"
  36 "    MOV     R1, #0x78 \n"
  37 "    MCR     p15, 0, R1, c1, c0 \n"
  38 "    MOV     R1, #0 \n"
  39 "    MCR     p15, 0, R1, c7, c10, 4 \n"
  40 "    MCR     p15, 0, R1, c7, c5 \n"
  41 "    MCR     p15, 0, R1, c7, c6 \n"
  42 "    MOV     R0, #0x3D \n"
  43 "    MCR     p15, 0, R0, c6, c0 \n"
  44 "    MOV     R0, #0xC000002F \n"
  45 "    MCR     p15, 0, R0, c6, c1 \n"
  46 "    MOV     R0, #0x39 \n"
  47 "    MCR     p15, 0, R0, c6, c2 \n"
  48 "    MOV     R0, #0x40000039 \n"
  49 "    MCR     p15, 0, R0, c6, c3 \n"
  50 "    MOV     R0, #0x80000017 \n"
  51 "    MCR     p15, 0, R0, c6, c4 \n"
  52 "    LDR     R0, =0xFF00002F \n"
  53 "    MCR     p15, 0, R0, c6, c5 \n"
  54 "    MOV     R0, #0x34 \n"
  55 "    MCR     p15, 0, R0, c2, c0 \n"
  56 "    MOV     R0, #0x34 \n"
  57 "    MCR     p15, 0, R0, c2, c0, 1 \n"
  58 "    MOV     R0, #0x34 \n"
  59 "    MCR     p15, 0, R0, c3, c0 \n"
  60 "    LDR     R0, =0x3333330 \n"
  61 "    MCR     p15, 0, R0, c5, c0, 2 \n"
  62 "    LDR     R0, =0x3333330 \n"
  63 "    MCR     p15, 0, R0, c5, c0, 3 \n"
  64 "    MRC     p15, 0, R0, c1, c0 \n"
  65 "    ORR     R0, R0, #0x1000 \n"
  66 "    ORR     R0, R0, #4 \n"
  67 "    ORR     R0, R0, #1 \n"
  68 "    MCR     p15, 0, R0, c1, c0 \n"
  69 "    MOV     R1, #0x80000006 \n"
  70 "    MCR     p15, 0, R1, c9, c1 \n"
  71 "    MOV     R1, #6 \n"
  72 "    MCR     p15, 0, R1, c9, c1, 1 \n"
  73 "    MRC     p15, 0, R1, c1, c0 \n"
  74 "    ORR     R1, R1, #0x50000 \n"
  75 "    MCR     p15, 0, R1, c1, c0 \n"
  76 "    LDR     R2, =0xC0200000 \n"
  77 "    MOV     R1, #1 \n"
  78 "    STR     R1, [R2, #0x10C] \n"
  79 "    MVN     R1, #0 \n"
  80 "    STR     R1, [R2, #0xC] \n"
  81 "    STR     R1, [R2, #0x1C] \n"
  82 "    STR     R1, [R2, #0x2C] \n"
  83 "    STR     R1, [R2, #0x3C] \n"
  84 "    STR     R1, [R2, #0x4C] \n"
  85 "    STR     R1, [R2, #0x5C] \n"
  86 "    STR     R1, [R2, #0x6C] \n"
  87 "    STR     R1, [R2, #0x7C] \n"
  88 "    STR     R1, [R2, #0x8C] \n"
  89 "    STR     R1, [R2, #0x9C] \n"
  90 "    STR     R1, [R2, #0xAC] \n"
  91 "    STR     R1, [R2, #0xBC] \n"
  92 "    STR     R1, [R2, #0xCC] \n"
  93 "    STR     R1, [R2, #0xDC] \n"
  94 "    STR     R1, [R2, #0xEC] \n"
  95 "    STR     R1, [R2, #0xFC] \n"
  96 "    LDR     R1, =0xC0400008 \n"
  97 "    LDR     R2, =0x430005 \n"
  98 "    STR     R2, [R1] \n"
  99 "    MOV     R1, #1 \n"
 100 "    LDR     R2, =0xC0243100 \n"
 101 "    STR     R2, [R1] \n"
 102 "    LDR     R2, =0xC0242010 \n"
 103 "    LDR     R1, [R2] \n"
 104 "    ORR     R1, R1, #1 \n"
 105 "    STR     R1, [R2] \n"
 106 "    LDR     R0, =0xFF8642F4 \n"
 107 "    LDR     R1, =0x6B1000 \n"
 108 "    LDR     R3, =0x6E2D32 \n"
 109 
 110 "loc_FF02013C:\n"
 111 "    CMP     R1, R3 \n"
 112 "    LDRCC   R2, [R0], #4 \n"
 113 "    STRCC   R2, [R1], #4 \n"
 114 "    BCC     loc_FF02013C \n"
 115 "    LDR     R0, =0xFF84D238 \n"
 116 "    LDR     R1, =0x1900 \n"
 117 "    LDR     R3, =0x189BC \n"
 118 
 119 "loc_FF020158:\n"
 120 "    CMP     R1, R3 \n"
 121 "    LDRCC   R2, [R0], #4 \n"
 122 "    STRCC   R2, [R1], #4 \n"
 123 "    BCC     loc_FF020158 \n"
 124 "    LDR     R1, =0x2CF204 \n"
 125 "    MOV     R2, #0 \n"
 126 
 127 "loc_FF020170:\n"
 128 "    CMP     R3, R1 \n"
 129 "    STRCC   R2, [R3], #4 \n"
 130 "    BCC     loc_FF020170 \n"
 131 /* Install task hooks via 0x193x is not possible with this new dryos version
 132    So the below code patches the CreateTask function in RAM to install our
 133    hook -- ERR99
 134 */
 135 // Install CreateTask patch
 136 "    LDR     R0, =patch_CreateTask\n"   // Patch data
 137 "    LDM     R0, {R1,R2}\n"             // Get two patch instructions
 138 "    LDR     R0, =hook_CreateTask\n"    // Address to patch
 139 "    STM     R0, {R1,R2}\n"             // Store patch instructions
 140 
 141 "    B       sub_FF0203C4_my \n"  // --> Patched. Old value = 0xFF0203C4.
 142 
 143 "patch_CreateTask:\n"
 144 "    LDR     PC, [PC,#-0x4]\n"          // Do jump to absolute address CreateTask_my
 145 "    .long   CreateTask_my\n"
 146 );
 147 }
 148 
 149 /*************************************************************/
 150 //** CreateTask_my @ 0x006B5658 - 0x006B565C, length=2
 151 void __attribute__((naked,noinline)) CreateTask_my() {
 152 asm volatile (
 153 "    STMFD   SP!, {R0}\n"
 154 //R3 = Pointer to task function to create
 155 
 156 /*** INSTALL capt_seq_task() hook ***/
 157 "    LDR     R0, =task_CaptSeq\n"       // DryOS original code function ptr.
 158 "    CMP     R0, R3\n"                  // is the given taskptr equal to our searched function?
 159 "    LDREQ   R3, =capt_seq_task\n"      // if so replace with our task function base ptr.
 160 "    BEQ     exitHook\n"                // below compares not necessary if this check has found something.
 161 
 162 /*** INSTALL exp_drv_task() hook ***/
 163 //"    LDR     R0, =task_ExpDrv\n"
 164 //"    CMP     R0, R3\n"
 165 //"    LDREQ   R3, =exp_drv_task\n"
 166 //"    BEQ     exitHook\n"
 167 
 168 /*** INSTALL filewrite() hook ***/
 169 //"    LDR     R0, =task_FileWrite\n"
 170 //"    CMP     R0, R3\n"
 171 //"    LDREQ   R3, =filewritetask\n"
 172 //"    BEQ     exitHook\n"
 173 
 174 /*** INSTALL movie_record_task() hook ***/
 175 //"    LDR     R0, =task_MovieRecord\n"
 176 //"    CMP     R0, R3\n"
 177 //"    LDREQ   R3, =movie_record_task\n"
 178 //"    BEQ     exitHook\n"
 179 
 180 /*** INSTALL liveimage_task() hook ***/
 181 //"    LDR     R0, =task_LiveImageTask\n"
 182 //"    CMP     R0, R3\n"
 183 //"    LDREQ   R3, =liveimage_task\n"
 184 //"    BEQ     exitHook\n"
 185 
 186 /*** INSTALL init_file_modules_task() hook ***/
 187 "    LDR     R0, =task_InitFileModules\n"
 188 "    CMP     R0, R3\n"
 189 "    LDREQ   R3, =init_file_modules_task\n"
 190 
 191 "exitHook:\n" 
 192 // restore overwritten registers
 193 "    LDMFD   SP!, {R0}\n"
 194 // Execute overwritten instructions from original code, then jump to firmware
 195 "    STMFD   SP!, {R1-R9,LR} \n"
 196 "    MOV     R4, R0 \n"
 197 "    LDR     PC, =0x006B5660 \n"  // Continue in firmware
 198 );
 199 }
 200 
 201 /*************************************************************/
 202 //** sub_FF0203C4_my @ 0xFF0203C4 - 0xFF02042C, length=27
 203 void __attribute__((naked,noinline)) sub_FF0203C4_my() {
 204 
 205    // Replacement of sub_FF02BBF4 for correct power-on.
 206    // (ON/OFF short press = playback mode, long press = record mode)
 207    // value and pointer from sub_FF0746D8
 208    *(int*)(0x2e60) = (*(int*)0xC022F48C)&0x80000 ? 0x80000 : 0x40000;
 209 
 210 asm volatile (
 211 "    LDR     R0, =0xFF02043C \n"
 212 "    MOV     R1, #0 \n"
 213 "    LDR     R3, =0xFF020474 \n"
 214 
 215 "loc_FF0203D0:\n"
 216 "    CMP     R0, R3 \n"
 217 "    LDRCC   R2, [R0], #4 \n"
 218 "    STRCC   R2, [R1], #4 \n"
 219 "    BCC     loc_FF0203D0 \n"
 220 "    LDR     R0, =0xFF020474 \n"
 221 "    MOV     R1, #0x1C0 \n"
 222 "    LDR     R3, =0xFF02065C \n"
 223 
 224 "loc_FF0203EC:\n"
 225 "    CMP     R0, R3 \n"
 226 "    LDRCC   R2, [R0], #4 \n"
 227 "    STRCC   R2, [R1], #4 \n"
 228 "    BCC     loc_FF0203EC \n"
 229 "    MOV     R0, #0xD2 \n"
 230 "    MSR     CPSR_cxsf, R0 \n"
 231 "    MOV     SP, #0x1000 \n"
 232 "    MOV     R0, #0xD3 \n"
 233 "    MSR     CPSR_cxsf, R0 \n"
 234 "    MOV     SP, #0x1000 \n"
 235 "    LDR     R0, =0x3A8 \n"
 236 "    LDR     R2, =0xEEEEEEEE \n"
 237 "    MOV     R3, #0x1000 \n"
 238 
 239 "loc_FF020420:\n"
 240 "    CMP     R0, R3 \n"
 241 "    STRCC   R2, [R0], #4 \n"
 242 "    BCC     loc_FF020420 \n"
 243 "    B       sub_FF0228D4_my \n"  // --> Patched. Old value = 0xFF0228D4.
 244 );
 245 }
 246 
 247 /*************************************************************/
 248 //** sub_FF0228D4_my @ 0xFF0228D4 - 0xFF0229E0, length=68
 249 void __attribute__((naked,noinline)) sub_FF0228D4_my() {
 250 asm volatile (
 251 "    LDR     R1, =0x1A5C \n"
 252 "    STR     LR, [SP, #-4]! \n"
 253 "    SUB     SP, SP, #0x7C \n"
 254 "    MOV     R0, #0x80000 \n"
 255 "    STR     R0, [R1] \n"
 256 "    LDR     R0, =0x40DEBEE0 \n"
 257 "    LDR     R1, =0x1A60 \n"
 258 "    STR     R0, [R1] \n"
 259 "    LDR     R1, =0x1A64 \n"
 260 "    ADD     R0, R0, #0x2000 \n"
 261 "    STR     R0, [R1] \n"
 262 "    MOV     R1, #0x78 \n"
 263 "    ADD     R0, SP, #4 \n"
 264 "    BL      sub_006DACE4 \n"
 265 "    MOV     R0, #0xA0000 \n"
 266 "    STR     R0, [SP, #8] \n"
 267 
 268 #if defined(CHDK_NOT_IN_CANON_HEAP) // use original heap offset if CHDK is loaded in high memory
 269 "    LDR     R0, =0x2CF204 \n"
 270 #else
 271 "    LDR     R0, =new_sa\n"   // otherwise use patched value
 272 "    LDR     R0, [R0]\n"      //
 273 #endif
 274 
 275 "    LDR     R2, =0x56346C \n"
 276 "    STR     R0, [SP, #0xC] \n"
 277 "    SUB     R0, R2, R0 \n"
 278 "    STR     R0, [SP, #0x10] \n"
 279 "    MOV     R0, #0x22 \n"
 280 "    STR     R0, [SP, #0x1C] \n"
 281 "    MOV     R0, #0x98 \n"
 282 "    STR     R0, [SP, #0x20] \n"
 283 "    MOV     R0, #0x1E8 \n"
 284 "    STR     R2, [SP, #0x14] \n"
 285 "    STR     R0, [SP, #0x24] \n"
 286 "    LDR     R1, =0x56E000 \n"
 287 "    MOV     R0, #0xFA \n"
 288 "    STR     R0, [SP, #0x28] \n"
 289 "    MOV     R0, #0xB6 \n"
 290 "    STR     R1, [SP, #4] \n"
 291 "    STR     R0, [SP, #0x2C] \n"
 292 "    MOV     R0, #0x85 \n"
 293 "    STR     R0, [SP, #0x30] \n"
 294 "    MOV     R0, #0x40 \n"
 295 "    STR     R0, [SP, #0x34] \n"
 296 "    MOV     R0, #4 \n"
 297 "    STR     R0, [SP, #0x38] \n"
 298 "    MOV     R0, #0 \n"
 299 "    STR     R0, [SP, #0x3C] \n"
 300 "    MOV     R0, #0x10 \n"
 301 "    STR     R0, [SP, #0x60] \n"
 302 "    MOV     R0, #0x1000 \n"
 303 "    STR     R0, [SP, #0x64] \n"
 304 "    MOV     R0, #0x100 \n"
 305 "    STR     R0, [SP, #0x68] \n"
 306 "    MOV     R0, #0x2000 \n"
 307 "    STR     R1, [SP, #0x18] \n"
 308 "    STR     R0, [SP, #0x6C] \n"
 309 "    LDR     R1, =sub_FF024704_my \n"  // --> Patched. Old value = 0xFF024704.
 310 "    MOV     R2, #0 \n"
 311 "    ADD     R0, SP, #4 \n"
 312 "    BL      sub_006B1BC8 \n"
 313 "    ADD     SP, SP, #0x7C \n"
 314 "    LDR     PC, [SP], #4 \n"
 315 );
 316 }
 317 
 318 /*************************************************************/
 319 //** sub_FF024704_my @ 0xFF024704 - 0xFF02479C, length=39
 320 void __attribute__((naked,noinline)) sub_FF024704_my() {
 321 asm volatile (
 322 "    STMFD   SP!, {R4,LR} \n"
 323 "    LDR     R4, =0xFF0247C0 /*'/_term'*/ \n"
 324 "    BL      sub_FF020858 \n"
 325 "    LDR     R1, =0x1A5C \n"
 326 "    LDR     R0, =0x19F0 \n"
 327 "    LDR     R1, [R1] \n"
 328 "    LDR     R0, [R0] \n"
 329 "    ADD     R1, R1, #0x10 \n"
 330 "    CMP     R0, R1 \n"
 331 "    LDRCC   R0, =0xFF0247D0 /*'USER_MEM size checking'*/ \n"
 332 "    BLCC    _err_init_task \n"
 333 "    BL      sub_FF0234E0 \n"
 334 "    CMP     R0, #0 \n"
 335 "    LDRLT   R0, =0xFF0247E8 /*'dmSetup'*/ \n"
 336 "    BLLT    _err_init_task \n"
 337 "    BL      sub_FF0224E8 \n"
 338 "    CMP     R0, #0 \n"
 339 "    LDRLT   R0, =0xFF0247F0 /*'termDriverInit'*/ \n"
 340 "    BLLT    _err_init_task \n"
 341 "    MOV     R0, R4 \n"
 342 "    BL      sub_FF0225C8 \n"
 343 "    CMP     R0, #0 \n"
 344 "    LDRLT   R0, =0xFF024800 /*'termDeviceCreate'*/ \n"
 345 "    BLLT    _err_init_task \n"
 346 "    MOV     R0, R4 \n"
 347 "    BL      sub_FF022100 \n"
 348 "    CMP     R0, #0 \n"
 349 "    LDRLT   R0, =0xFF024814 /*'stdioSetup'*/ \n"
 350 "    BLLT    _err_init_task \n"
 351 "    BL      sub_FF024D70 \n"
 352 "    CMP     R0, #0 \n"
 353 "    LDRLT   R0, =0xFF024820 /*'stdlibSetup'*/ \n"
 354 "    BLLT    _err_init_task \n"
 355 "    BL      sub_FF0210A8 \n"
 356 "    CMP     R0, #0 \n"
 357 "    LDRLT   R0, =0xFF02482C /*'extlib_setup'*/ \n"
 358 "    BLLT    _err_init_task \n"
 359 "    LDMFD   SP!, {R4,LR} \n"
 360 "    B       sub_FF027AA0_my \n"  // --> Patched. Old value = 0xFF027AA0.
 361 );
 362 }
 363 
 364 /*************************************************************/
 365 //** sub_FF027AA0_my @ 0xFF027AA0 - 0xFF027AF0, length=21
 366 void __attribute__((naked,noinline)) sub_FF027AA0_my() {
 367 asm volatile (
 368 "    STMFD   SP!, {R3,LR} \n"
 369 "    BL      sub_FF0339F0 \n"
 370 "    BL      sub_FF02D1D0 /*_IsNormalCameraMode_FW*/ \n"
 371 //"  BL      _sub_FF02BBF4 \n"  // startup check,disabled
 372 //"  CMP     R0, #0 \n"
 373 //"  BNE     loc_FF027AC0 \n"
 374 //"  BL      _sub_FF02B3A0 \n"
 375 
 376 "loc_FF027ABC:\n"
 377 //"  B       loc_FF027ABC \n"
 378 
 379 "loc_FF027AC0:\n"
 380 "    BL      sub_006B8A84 \n"
 381 "    LDR     R1, =0x60E000 \n"
 382 "    MOV     R0, #0 \n"
 383 "    BL      sub_FF037C50 \n"
 384 "    MOV     R3, #0 \n"
 385 "    STR     R3, [SP] \n"
 386 "    LDR     R3, =task_Startup_my \n"  // --> Patched. Old value = 0xFF027A38.
 387 "    MOV     R2, #0 \n"
 388 "    MOV     R1, #0x19 \n"
 389 "    LDR     R0, =0xFF027AFC /*'Startup'*/ \n"
 390 "    BL      _CreateTask \n"
 391 "    MOV     R0, #0 \n"
 392 "    LDMFD   SP!, {R3,PC} \n"
 393 );
 394 }
 395 
 396 /*************************************************************/
 397 //** task_Startup_my @ 0xFF027A38 - 0xFF027A9C, length=26
 398 void __attribute__((naked,noinline)) task_Startup_my() {
 399 asm volatile (
 400 "    STMFD   SP!, {R4,LR} \n"
 401 "    BL      sub_FF022C84 \n"
 402 "    BL      sub_FF02C0B4 \n"
 403 "    BL      sub_FF02B34C \n"
 404 //"  BL      _sub_FF074EFC \n"  // --> Nullsub call removed.
 405 "    BL      sub_FF0379FC \n"
 406 //"  BL      _sub_FF0378BC \n"  // load DISKBOOT.BIN
 407 "    BL      sub_FF037B60 \n"
 408 "    BL      sub_FF037D24 \n"
 409 //"  BL      _sub_FF037B54 \n"  // --> Nullsub call removed.
 410 "    BL      sub_FF037A38 \n"
 411 "    BL      sub_FF033928 \n"
 412 "    BL      sub_FF037D2C \n"
 413 "    BL      CreateTask_spytask\n" // added
 414 "    BL      taskcreatePhySw_my \n"  // --> Patched. Old value = 0xFF02BAA0.
 415 "    BL      init_required_fw_features\n" // added
 416 "    BL      sub_FF0315DC \n"
 417 "    BL      sub_FF0C30D4 \n"
 418 "    BL      sub_FF028E70 \n"
 419 "    BL      sub_FF02ACC4 \n"
 420 "    BL      sub_FF0375D0 \n"
 421 "    BL      sub_FF02B300 \n"
 422 "    BL      sub_FF02AC58 \n"
 423 //"  BL      _sub_FF037B58 \n"  // --> Nullsub call removed.
 424 "    BL      sub_FF029C8C \n"
 425 "    BL      sub_FF02AC14 \n"
 426 "    LDMFD   SP!, {R4,LR} \n"
 427 "    B       sub_FF022DD4 \n"
 428 );
 429 }
 430 
 431 /*************************************************************/
 432 //** taskcreatePhySw_my @ 0xFF02BAA0 - 0xFF02BAE4, length=18
 433 void __attribute__((naked,noinline)) taskcreatePhySw_my() {
 434 asm volatile (
 435 "    STMFD   SP!, {R3-R5,LR} \n"
 436 "    BL      sub_FF03683C \n"
 437 "    BL      sub_FF02D108 /*_IsFactoryMode_FW*/ \n"
 438 "    CMP     R0, #0 \n"
 439 "    BLEQ    sub_FF0367A4 /*_OpLog.Start_FW*/ \n"
 440 "    LDR     R4, =0x1CA8 \n"
 441 "    LDR     R0, [R4, #4] \n"
 442 "    CMP     R0, #0 \n"
 443 "    BNE     loc_FF02BAE4 \n"
 444 "    MOV     R3, #0 \n"
 445 "    STR     R3, [SP] \n"
 446 "    LDR     R3, =mykbd_task \n"  // --> Patched. Old value = 0xFF02BA6C.
 447 "    MOV     R2, #0x2000 \n"  // --> Patched. Old value = 0x800. stack size for new task_PhySw so we don't have to do stack switch
 448 "    MOV     R1, #0x17 \n"
 449 "    LDR     R0, =0xFF02BD94 /*'PhySw'*/ \n"
 450 "    BL      sub_006B7BD4 /*_CreateTaskStrictly*/ \n"
 451 "    STR     R0, [R4, #4] \n"
 452 
 453 "loc_FF02BAE4:\n"
 454 "    LDMFD   SP!, {R3-R5,PC} \n"
 455 );
 456 }
 457 
 458 /*************************************************************/
 459 //** init_file_modules_task @ 0xFF060A90 - 0xFF060AC4, length=14
 460 void __attribute__((naked,noinline)) init_file_modules_task() {
 461 asm volatile (
 462 "    STMFD   SP!, {R4-R6,LR} \n"
 463 "    BL      sub_FF0AD0DC \n"
 464 "    LDR     R5, =0x5006 \n"
 465 "    MOVS    R4, R0 \n"
 466 "    MOVNE   R1, #0 \n"
 467 "    MOVNE   R0, R5 \n"
 468 "    BLNE    _PostLogicalEventToUI \n"
 469 "    BL      sub_FF0AD10C \n"
 470 "    BL      core_spytask_can_start\n"  // CHDK: Set "it's-safe-to-start" flag for spytask
 471 "    CMP     R4, #0 \n"
 472 "    LDMNEFD SP!, {R4-R6,PC} \n"
 473 "    MOV     R0, R5 \n"
 474 "    LDMFD   SP!, {R4-R6,LR} \n"
 475 "    MOV     R1, #1 \n"
 476 "    B       _PostLogicalEventToUI \n"
 477 );
 478 }
 479 /*
 480     *** TEMPORARY workaround ***
 481     Init stuff to avoid asserts on cameras running DryOS r54+
 482     Execute this only once
 483  */
 484 void init_required_fw_features(void) {
 485     extern void _init_focus_eventflag();
 486     extern void _init_nd_eventflag();
 487     extern void _init_nd_semaphore();
 488     //extern void _init_zoom_semaphore(); // for MoveZoomLensWithPoint
 489 
 490     _init_focus_eventflag();
 491     _init_nd_eventflag();
 492     _init_nd_semaphore();
 493 }
 494 

/* [<][>][^][v][top][bottom][index][help] */