root/platform/a2600/sub/100c/movie_rec.c

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

DEFINITIONS

This source file includes following definitions.
  1. change_video_tables
  2. set_quality
  3. movie_record_task

   1 /*
   2  * movie_rec.c - auto-generated by CHDK code_gen.
   3  */
   4 #include "conf.h"
   5 
   6 void change_video_tables(int a, int b){
   7 }
   8 
   9 void  set_quality(int *x){ // -17 highest; +12 lowest
  10  if (conf.video_mode) *x=12-((conf.video_quality-1)*(12+17)/(99-1));
  11 }
  12 
  13 /*************************************************************/
  14 //** movie_record_task @ 0xFF973648 - 0xFF9737D0, length=99
  15 void __attribute__((naked,noinline)) movie_record_task() {
  16 asm volatile (
  17 "    STMFD   SP!, {R2-R10,LR} \n"
  18 "    LDR     R8, =0xFF9732C4 \n"
  19 "    LDR     R4, =0x6B18 \n"
  20 "    LDR     R10, =0x2710 \n"
  21 "    MVN     R7, #0 \n"
  22 "    MOV     R5, #1 \n"
  23 "    MOV     R6, #0 \n"
  24 "    ADD     R9, R7, #0x670 \n"
  25 
  26 "loc_FF973668:\n"
  27 "    LDR     R0, [R4, #0x28] \n"
  28 "    MOV     R2, #0 \n"
  29 "    ADD     R1, SP, #4 \n"
  30 "    BL      sub_003F7418 /*_ReceiveMessageQueue*/ \n"
  31 "    LDR     R0, [R4, #0x30] \n"
  32 "    CMP     R0, #0 \n"
  33 "    LDRNE   R0, [R4, #0x10] \n"
  34 "    CMPNE   R0, #2 \n"
  35 "    LDRNE   R0, [R4, #0x44] \n"
  36 "    CMPNE   R0, #6 \n"
  37 "    BNE     loc_FF9737B4 \n"
  38 "    LDR     R0, [SP, #4] \n"
  39 "    LDR     R1, [R0] \n"
  40 "    SUB     R1, R1, #2 \n"
  41 "    CMP     R1, #0xD \n"
  42 "    ADDCC   PC, PC, R1, LSL#2 \n"
  43 "    B       loc_FF9737B4 \n"
  44 "    B       loc_FF973730 \n"
  45 "    B       loc_FF973754 \n"
  46 "    B       loc_FF973764 \n"
  47 "    B       loc_FF97376C \n"
  48 "    B       loc_FF973738 \n"
  49 "    B       loc_FF973774 \n"
  50 "    B       loc_FF9737A0 \n"
  51 "    B       loc_FF9737A8 \n"
  52 "    B       loc_FF973744 \n"
  53 "    B       loc_FF9737B4 \n"
  54 "    B       loc_FF9737B0 \n"
  55 "    B       loc_FF97370C \n"
  56 "    B       loc_FF9736E0 \n"
  57 
  58 "loc_FF9736E0:\n"
  59 "    STR     R6, [R4, #0x40] \n"
  60 "    STR     R6, [R4, #0x34] \n"
  61 "    STR     R7, [R4, #0xC4] \n"
  62 "    STRH    R6, [R4, #6] \n"
  63 "    STR     R8, [R4, #0xAC] \n"
  64 "    LDR     R0, [R4, #0x10] \n"
  65 "    ADD     R0, R0, #1 \n"
  66 "    STR     R0, [R4, #0x10] \n"
  67 "    MOV     R0, #6 \n"
  68 "    STR     R0, [R4, #0x44] \n"
  69 "    B       loc_FF973728 \n"
  70 
  71 "loc_FF97370C:\n"
  72 "    STR     R6, [R4, #0x40] \n"
  73 "    STR     R7, [R4, #0xC4] \n"
  74 "    STR     R8, [R4, #0xAC] \n"
  75 "    LDR     R0, [R4, #0x10] \n"
  76 "    ADD     R0, R0, #1 \n"
  77 "    STR     R0, [R4, #0x10] \n"
  78 "    STR     R5, [R4, #0x44] \n"
  79 
  80 "loc_FF973728:\n"
  81 "    STR     R5, [R4, #8] \n"
  82 "    B       loc_FF9737B4 \n"
  83 
  84 "loc_FF973730:\n"
  85 "    BL      sub_FF973014 \n"
  86 "    B       loc_FF9737B4 \n"
  87 
  88 "loc_FF973738:\n"
  89 "    LDR     R1, [R4, #0xAC] \n"
  90 "    BLX     R1 \n"
  91 //begin patch
  92 "    LDR     R0, =video_compression_rate \n" // added
  93 "    BL      set_quality \n"                 // added
  94 //end patch
  95 "    B       loc_FF9737B4 \n"
  96 
  97 "loc_FF973744:\n"
  98 "    LDR     R1, [R0, #0x18] \n"
  99 "    LDR     R0, [R0, #4] \n"
 100 "    BL      sub_FFA92CEC \n"
 101 "    B       loc_FF9737B4 \n"
 102 
 103 "loc_FF973754:\n"
 104 "    LDR     R0, [R4, #0x44] \n"
 105 "    CMP     R0, #5 \n"
 106 "    STRNE   R5, [R4, #0x34] \n"
 107 "    B       loc_FF9737B4 \n"
 108 
 109 "loc_FF973764:\n"
 110 "    BL      sub_FF972C90 \n"
 111 "    B       loc_FF9737B4 \n"
 112 
 113 "loc_FF97376C:\n"
 114 "    BL      sub_FF972B60 \n"
 115 "    B       loc_FF9737B4 \n"
 116 
 117 "loc_FF973774:\n"
 118 "    LDR     R0, =0xC1C40 \n"
 119 "    LDR     R0, [R0, #8] \n"
 120 "    CMP     R0, #0 \n"
 121 "    LDRNE   R2, =0xFF972AB4 \n"
 122 "    LDRNE   R0, =0xFF972B08 \n"
 123 "    MOVNE   R3, #0 \n"
 124 "    MOVNE   R1, R3 \n"
 125 "    BLNE    sub_FF864394 \n"
 126 "    MOV     R0, #3 \n"
 127 "    STR     R0, [R4, #0x44] \n"
 128 "    B       loc_FF9737B4 \n"
 129 
 130 "loc_FF9737A0:\n"
 131 "    BL      sub_FF972A40 \n"
 132 "    B       loc_FF9737B4 \n"
 133 
 134 "loc_FF9737A8:\n"
 135 "    BL      sub_FF9740BC \n"
 136 "    B       loc_FF9737B4 \n"
 137 
 138 "loc_FF9737B0:\n"
 139 "    BL      sub_FF973FE4 \n"
 140 
 141 "loc_FF9737B4:\n"
 142 "    LDR     R1, [SP, #4] \n"
 143 "    LDR     R3, =0xFF9727BC /*'MovieRecorder.c'*/ \n"
 144 "    STR     R6, [R1] \n"
 145 "    STR     R9, [SP] \n"
 146 "    LDR     R0, [R4, #0x2C] \n"
 147 "    MOV     R2, R10 \n"
 148 "    BL      sub_003F7D90 /*_PostMessageQueueStrictly*/ \n"
 149 "    B       loc_FF973668 \n"
 150 );
 151 }

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