root/platform/s95/sub/100h/movie_rec.c

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

DEFINITIONS

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

   1 #include "conf.h"
   2 
   3 int *video_quality = &conf.video_quality;
   4 int *video_mode    = &conf.video_mode;
   5 
   6 
   7 /*----------------------------------------------------------------------
   8         set_quality()
   9 -----------------------------------------------------------------------*/
  10 void  set_quality (int *x)  // -17 highest; +12 lowest
  11 {
  12         if (conf.video_mode)
  13                 *x = 12 - ((conf.video_quality-1) * (12+17) / (99-1));
  14 }
  15 
  16 
  17 /*----------------------------------------------------------------------
  18         change_video_tables()
  19 -----------------------------------------------------------------------*/
  20 void change_video_tables(int a, int b)
  21 {
  22 }
  23 
  24 
  25 /*----------------------------------------------------------------------
  26         movie_record_task()
  27 -----------------------------------------------------------------------*/
  28 void __attribute__((naked,noinline)) movie_record_task()
  29 {
  30         asm volatile (
  31 "               STMFD   SP!, {R2-R10,LR} \n"
  32 "               LDR     R9, =0x5EE \n"
  33 "               LDR     R8, =0x2710 \n"
  34 "               LDR     R4, =0x7128 \n"
  35 "               MOV     R7, #1 \n"
  36 "               LDR     R6, =0xFF98611C \n"                     // nullsub_322
  37 "               MOV     R5, #0 \n"
  38 "loc_FF986444: \n"
  39 "               LDR     R0, [R4,#0x24] \n"
  40 "               MOV     R2, #0 \n"
  41 "               ADD     R1, SP, #4 \n"
  42 "               BL      sub_FF83A2F8 \n"
  43 "               LDR     R0, [R4,#0x2C] \n"
  44 "               CMP     R0, #0 \n"
  45 "               LDRNE   R0, [R4,#0xC] \n"
  46 "               CMPNE   R0, #2 \n"
  47 "               LDRNE   R0, [R4,#0x44] \n"
  48 "               CMPNE   R0, #6 \n"
  49 "               BNE     loc_FF98655C \n"
  50 "               LDR     R0, [SP,#0x4] \n"
  51 "               LDR     R1, [R0] \n"
  52 "               SUB     R1, R1, #2 \n"
  53 "               CMP     R1, #0xA \n"
  54 "               ADDLS   PC, PC, R1,LSL#2 \n"
  55 "               B       loc_FF98655C \n"
  56 "loc_FF986488: \n"
  57 "               B       loc_FF986510 \n"
  58 "loc_FF98648C: \n"
  59 "               B       loc_FF986530 \n"
  60 "loc_FF986490: \n"
  61 "               B       loc_FF986540 \n"
  62 "loc_FF986494: \n"
  63 "               B       loc_FF986548 \n"
  64 "loc_FF986498: \n"
  65 "               B       loc_FF986518 \n"
  66 "loc_FF98649C: \n"
  67 "               B       loc_FF986550 \n"
  68 "loc_FF9864A0: \n"
  69 "               B       loc_FF986520 \n"
  70 "loc_FF9864A4: \n"
  71 "               B       loc_FF98655C \n"
  72 "loc_FF9864A8: \n"
  73 "               B       loc_FF986558 \n"
  74 "loc_FF9864AC: \n"
  75 "               B       loc_FF9864E0 \n"
  76 "loc_FF9864B0: \n"
  77 "               B       loc_FF9864B4 \n"
  78 
  79 "loc_FF9864B4: \n"
  80 // jumptable FF986480 entry 10
  81 "               STR     R5, [R4,#0x40] \n"
  82 "               STR     R5, [R4,#0x30] \n"
  83 "               STR     R5, [R4,#0x34] \n"
  84 "               STRH    R5, [R4,#6] \n"
  85 "               STR     R6, [R4,#0xB4] \n"
  86 "               LDR     R0, [R4,#0xC] \n"
  87 "               ADD     R0, R0, #1 \n"
  88 "               STR     R0, [R4,#0xC] \n"
  89 "               MOV     R0, #6 \n"
  90 "               STR     R0, [R4,#0x44] \n"
  91 "               B       loc_FF9864FC \n"
  92 
  93 "loc_FF9864E0: \n"
  94 // jumptable FF986480 entry 9
  95 "               STR     R5, [R4,#0x40] \n"
  96 "               STR     R5, [R4,#0x30] \n"
  97 "               STR     R6, [R4,#0xB4] \n"
  98 "               LDR     R0, [R4,#0xC] \n"
  99 "               ADD     R0, R0, #1 \n"
 100 "               STR     R0, [R4,#0xC] \n"
 101 "               STR     R7, [R4,#0x44] \n"
 102 "loc_FF9864FC: \n"
 103 "               LDR     R2, =0xFF985334 \n"
 104 "               LDR     R1, =0xB45D0 \n"
 105 
 106 //"             LDR     R0, =sub_FF985430 \n"
 107 "               LDR     R0, =0xFF985430 \n"
 108 
 109 "               BL      sub_FF8530D0 \n"
 110 "               B       loc_FF98655C \n"
 111 
 112 "loc_FF986510: \n"
 113 // jumptable FF986480 entry 0
 114 
 115 "               BL      unlock_optical_zoom\n"                  // added to unlock the zoom
 116 
 117 "               BL      sub_FF986244 \n"
 118 "               B       loc_FF98655C \n"
 119 
 120 "loc_FF986518: \n"
 121 // jumptable FF986480 entry 4
 122 //"             BL      sub_FF985B84 \n"
 123 "               BL      sub_FF985B84_my \n"                             // patched
 124 
 125 "               B       loc_FF98655C \n"
 126 
 127 "loc_FF986520: \n"
 128 // jumptable FF986480 entry 6
 129 "               LDR     R1, [R0,#0x18] \n"
 130 "               LDR     R0, [R0,#4] \n"
 131 "               BL      sub_FFAF2B24 \n"
 132 "               B       loc_FF98655C \n"
 133 
 134 "loc_FF986530: \n"
 135 // jumptable FF986480 entry 1
 136 "               LDR     R0, [R4,#0x44] \n"
 137 "               CMP     R0, #5 \n"
 138 "               STRNE   R7, [R4,#0x34] \n"
 139 "               B       loc_FF98655C \n"
 140 
 141 "loc_FF986540: \n"
 142 // jumptable FF986480 entry 2
 143 "               BL      sub_FF9857CC \n"
 144 "               B       loc_FF98655C \n"
 145 
 146 "loc_FF986548: \n"
 147 // jumptable FF986480 entry 3
 148 "               BL      sub_FF98547C \n"
 149 "               B       loc_FF98655C \n"
 150 
 151 "loc_FF986550: \n"
 152 // jumptable FF986480 entry 5
 153 "               BL      sub_FF9852C0 \n"
 154 "               B       loc_FF98655C \n"
 155 
 156 "loc_FF986558: \n"
 157 // jumptable FF986480 entry 8
 158 "               BL      sub_FF98698C \n"
 159 
 160 "loc_FF98655C: \n"
 161 // jumptable FF986480 default entry
 162 // jumptable FF986480 entry 7
 163 "               LDR     R1, [SP,#0x4] \n"
 164 "               STR     R5, [R1] \n"
 165 "               LDR     R3, =0xFF985124 \n"                     // MovieRecorder.c
 166 "               MOV     R2, R8 \n"
 167 "               STR     R9, [SP,#0x0] \n"
 168 "               LDR     R0, [R4,#0x28] \n"
 169 "               BL      sub_FF83AC4C \n"
 170 "               B       loc_FF986444 \n"
 171         );
 172 }
 173 
 174 
 175 /*----------------------------------------------------------------------
 176         sub_FF985B84_my()
 177 -----------------------------------------------------------------------*/
 178 void __attribute__((naked,noinline)) sub_FF985B84_my()
 179 {
 180         asm volatile (
 181 "               STMFD   SP!, {R4-R11,LR} \n"
 182 "               SUB     SP, SP, #0x64 \n"
 183 "               MOV     R8, #0 \n"
 184 "               LDR     R6, =0x7128 \n"
 185 "               MOV     R4, R0 \n"
 186 "               STR     R8, [SP,#0x54] \n"
 187 "               STR     R8, [SP,#0x4c] \n"
 188 "               LDR     R0, [R6,#0x44] \n"
 189 "               MOV     R11, #4 \n"
 190 "               CMP     R0, #3 \n"
 191 "               STREQ   R11, [R6,#0x44] \n"
 192 "               LDR     R0, [R6,#0xB4] \n"
 193 "               MOV     R9, #0 \n"
 194 "               MOV     R7, #0 \n"
 195 "               MOV     R5, #1 \n"
 196 "               BLX     R0 \n"
 197 "               LDR     R0, [R6,#0x44] \n"
 198 "               CMP     R0, #6 \n"
 199 "               BEQ     loc_FF985BE4 \n"
 200 "               LDR     R1, [R6,#0xC] \n"
 201 "               CMP     R1, #2 \n"
 202 "               BNE     loc_FF985C04 \n"
 203 "               CMP     R0, #5 \n"
 204 "               BEQ     loc_FF985C7C \n"
 205 "loc_FF985BE4: \n"
 206 "               LDR     R0, =0xFF985124 \n"                             // Movierecorder.c
 207 "               MOV     R7, #1 \n"
 208 "               MOV     R1, #0x7F0 \n"
 209 "               BL      sub_FF81EB78 \n"                                // DebugAssert
 210 "               LDR     R0, [R6,#0x44] \n"
 211 "               CMP     R0, #4 \n"
 212 "               MOVNE   R5, #0 \n"
 213 "               B       loc_FF985C0C \n"
 214 "loc_FF985C04: \n"
 215 "               CMP     R0, #4 \n"
 216 "               BNE     loc_FF985C7C \n"
 217 "loc_FF985C0C: \n"
 218 "               LDRH    R0, [R6,#6] \n"
 219 "               CMP     R0, #1 \n"
 220 "               LDREQ   R1, =0x809 \n"
 221 "               LDREQ   R0, =0xFF985124 \n"                     // Movierecorder.c
 222 "               BLEQ    sub_FF81EB78 \n"                        // DebugAssert
 223 "               LDRH    R0, [R6,#6] \n"
 224 "               CMP     R0, #3 \n"
 225 "               BNE     loc_FF985C40 \n"
 226 "               LDR     R0, [R6,#0x6C] \n"
 227 "               LDR     R1, [R6,#0xB8] \n"
 228 "               BL      sub_FFBA189C \n"
 229 "               CMP     R1, #0 \n"
 230 "               MOVNE   R5, #0 \n"
 231 "loc_FF985C40: \n"
 232 "               LDR     R0, [R6,#0x44] \n"
 233 "               CMP     R0, #6 \n"
 234 "               CMPNE   R0, #1 \n"
 235 "               CMPNE   R0, #3 \n"
 236 "               BNE     loc_FF985C84 \n"
 237 "               CMP     R7, #1 \n"
 238 "               CMPEQ   R5, #0 \n"
 239 "               BNE     loc_FF985C84 \n"
 240 "               LDR     R0, [R6,#0x18] \n"
 241 "               MOV     R1, #0x3E8 \n"
 242 "               BL      sub_FF83A714 \n"                        // eventproc_export_TakeSemaphore
 243 "               CMP     R0, #9 \n"
 244 "               BNE     loc_FF9860A4 \n"
 245 "               MOV     R0, #0x90000 \n"
 246 "               BL      sub_FF89D31C \n"                        // eventproc_export_HardwareDefect
 247 "loc_FF985C7C: \n"
 248 "               ADD     SP, SP, #0x64 \n"
 249 "               LDMFD   SP!, {R4-R11,PC} \n"
 250 "loc_FF985C84: \n"
 251 "               CMP     R5, #1 \n"
 252 "               MOV     R10, #1 \n"
 253 "               BNE     loc_FF985CAC \n"
 254 "               ADD     R3, SP, #0x4c \n"
 255 "               ADD     R2, SP, #0x50 \n"
 256 "               ADD     R1, SP, #0x54 \n"
 257 "               ADD     R0, SP, #0x58 \n"
 258 "               BL      sub_FFAF2BE4 \n"
 259 "               MOVS    R9, R0 \n"
 260 "               BNE     loc_FF985CC8 \n"
 261 "loc_FF985CAC: \n"
 262 "               LDR     R0, [R6,#0x34] \n"
 263 "               CMP     R0, #1 \n"
 264 "               BNE     loc_FF985E24 \n"
 265 "               LDR     R0, [R6,#0x6C] \n"
 266 "               LDR     R1, [R6,#0x48] \n"
 267 "               CMP     R0, R1 \n"
 268 "               BCC     loc_FF985E24 \n"
 269 "loc_FF985CC8: \n"
 270 "               CMP     R9, #0x80000001 \n"
 271 "               STREQ   R11, [R6,#0x70] \n"
 272 "               BEQ     loc_FF985D00 \n"
 273 "               CMP     R9, #0x80000003 \n"
 274 "               STREQ   R10, [R6,#0x70] \n"
 275 "               BEQ     loc_FF985D00 \n"
 276 "               CMP     R9, #0x80000005 \n"
 277 "               MOVEQ   R0, #2 \n"
 278 "               BEQ     loc_FF985CFC \n"
 279 "               CMP     R9, #0x80000007 \n"
 280 "               STRNE   R8, [R6,#0x70] \n"
 281 "               BNE     loc_FF985D00 \n"
 282 "               MOV     R0, #3 \n"
 283 "loc_FF985CFC: \n"
 284 "               STR     R0, [R6,#0x70] \n"
 285 "loc_FF985D00: \n"
 286 "               LDR     R0, [R6,#0xC] \n"
 287 "               CMP     R0, #2 \n"
 288 "               BNE     loc_FF985D68 \n"
 289 "               MOV     R1, #0 \n"
 290 "               LDR     R0, =0xFF985B78 \n"
 291 "               BL      sub_FFAAD410 \n"
 292 "               LDR     R2, [R6,#0x64] \n"
 293 "               ADD     R3, SP, #0x5c \n"
 294 "               STRD    R2, [SP,#0x28] \n"
 295 "               MOV     R2, #0x18 \n"
 296 "               ADD     R1, SP, #0x34 \n"
 297 "               ADD     R0, SP, #0x10 \n"
 298 "               BL      sub_FFB9F23C \n"
 299 "               LDR     R1, [R6,#0x84] \n"
 300 "               LDR     R2, [R6,#0x88] \n"
 301 "               MVN     R3, #1 \n"
 302 "               ADD     R0, SP, #0x60 \n"
 303 "               STMEA   SP, {R0-R3} \n"
 304 "               LDR     R0, =0xB4618 \n"
 305 "               MOV     R3, #0 \n"
 306 "               MOV     R2, #0 \n"
 307 "               MOV     R1, #0x40 \n"
 308 "               BL      sub_FFAAD368 \n"
 309 "               B       loc_FF985DBC \n"
 310 "loc_FF985D60: \n"
 311 "               MOV     R1, #1 \n"
 312 "               B       loc_FF986030 \n"
 313 "loc_FF985D68: \n"
 314 "               BL      loc_FF986A38 \n"
 315 "               LDR     R2, [R6,#0x64] \n"
 316 "               ADD     R3, SP, #0x5c \n"
 317 "               MVN     R1, #1 \n"
 318 "               MOV     R0, #0 \n"
 319 "               ADD     R5, SP, #0x1c \n"
 320 "               STMIA   R5, {R0-R3} \n"
 321 "               LDR     R3, [R4,#0x1C] \n"
 322 "               LDR     R1, [R6,#0x84] \n"
 323 "               LDR     R2, [R6,#0x88] \n"
 324 "               ADD     R4, SP, #0x0c \n"
 325 "               ADD     R0, SP, #0x60 \n"
 326 "               STMIA   R4, {R0-R3} \n"
 327 "               MOV     R3, #0 \n"
 328 "               MOV     R1, #0x40 \n"
 329 "               MOV     R2, #0 \n"
 330 "               STMEA   SP, {R1-R3} \n"
 331 "               LDR     R3, =0xB4618 \n"
 332 "               MOV     R1, #0 \n"
 333 "               MOV     R0, #0 \n"
 334 "               BL      sub_FFAAC1D8 \n"
 335 "loc_FF985DBC: \n"
 336 "               LDR     R0, [R6,#0x18] \n"
 337 "               LDR     R1, [R6,#0x60] \n"
 338 "               BL      sub_FF83A714 \n"                        // eventproc_export_TakeSemaphore
 339 "               CMP     R0, #9 \n"
 340 "               BEQ     loc_FF985D60 \n"
 341 "               LDR     R0, [SP,#0x5c] \n"
 342 "               CMP     R0, #0 \n"
 343 "               BEQ     loc_FF985DE4 \n"
 344 "loc_FF985DDC: \n"
 345 "               MOV     R1, #1 \n"
 346 "               B       loc_FF986048 \n"
 347 "loc_FF985DE4: \n"
 348 "               LDR     R0, [R6,#0xC] \n"
 349 "               MOV     R4, #5 \n"
 350 "               CMP     R0, #2 \n"
 351 "               MOV     R0, #1 \n"
 352 "               BNE     loc_FF985E10 \n"
 353 "               BL      sub_FFAAD3D0 \n"
 354 "               BL      sub_FFAAD3F8 \n"
 355 "               STR     R4, [R6,#0x44] \n"
 356 "               BL      loc_FF986A38 \n"
 357 "               STR     R10, [R6,#0x44] \n"
 358 "               B       loc_FF985E1C \n"
 359 "loc_FF985E10: \n"
 360 "               BL      sub_FFAAC28C \n"
 361 "               BL      sub_FFAAC2EC \n"
 362 "               STR     R4, [R6,#0x44] \n"
 363 "loc_FF985E1C: \n"
 364 "               STR     R8, [R6,#0x34] \n"
 365 "               B       loc_FF985C7C \n"
 366 "loc_FF985E24: \n"
 367 "               CMP     R5, #1 \n"
 368 "               BNE     loc_FF9860A4 \n"
 369 "               STR     R10, [R6,#0x38] \n"
 370 "               LDR     R0, [R6,#0x6C] \n"
 371 "               LDR     R11, [R4,#0xC] \n"
 372 "               CMP     R0, #0 \n"
 373 "               LDRNE   R9, [SP,#0x58] \n"
 374 "               LDRNE   R10, [SP,#0x54] \n"
 375 "               BNE     loc_FF985F6C \n"
 376 "               LDR     R0, [R6,#0xC] \n"
 377 "               CMP     R0, #2 \n"
 378 "               BNE     loc_FF985EC8 \n"
 379 "               MOV     R1, #0 \n"
 380 "               LDR     R0, =0xFF985B78 \n"
 381 "               BL      sub_FFAAD410 \n"
 382 "               LDR     R2, [R6,#0x64] \n"
 383 "               ADD     R3, SP, #0x5c \n"
 384 "               STRD    R2, [SP,#0x28] \n"
 385 "               MOV     R2, #0x18 \n"
 386 "               ADD     R1, SP, #0x34 \n"
 387 "               ADD     R0, SP, #0x10 \n"
 388 "               BL      sub_FFB9F23C \n"
 389 "               LDR     R1, [R6,#0x84] \n"
 390 "               LDR     R2, [R6,#0x88] \n"
 391 "               MVN     R3, #0 \n"
 392 "               ADD     R0, SP, #0x60 \n"
 393 "               STMEA   SP, {R0-R3} \n"
 394 "               LDR     R0, [SP,#0x58] \n"
 395 "               LDR     R1, [SP,#0x54] \n"
 396 "               LDR     R2, [SP,#0x50] \n"
 397 "               LDR     R3, [SP,#0x4c] \n"
 398 "               BL      sub_FFAAD368 \n"
 399 "               LDR     R0, [R6,#0x18] \n"
 400 "               LDR     R1, [R6,#0x60] \n"
 401 "               BL      sub_FF83A714 \n"                        // eventproc_export_TakeSemaphore
 402 "               CMP     R0, #9 \n"
 403 "               BEQ     loc_FF985D60 \n"
 404 "               MOV     R1, #0 \n"
 405 "               LDR     R0, =0xFF985B6C \n"
 406 "               BL      sub_FFAAD410 \n"
 407 "               B       loc_FF985F30 \n"
 408 "loc_FF985EC8: \n"
 409 "               LDR     R0, [R4,#0x20] \n"
 410 "               LDR     R2, [R6,#0x64] \n"
 411 "               ADD     R3, SP, #0x5c \n"
 412 "               MVN     R1, #0 \n"
 413 "               ADD     R9, SP, #0x1c \n"
 414 "               STMIA   R9, {R0-R3} \n"
 415 "               LDR     R3, [R4,#0x1C] \n"
 416 "               LDR     R1, [R6,#0x84] \n"
 417 "               LDR     R2, [R6,#0x88] \n"
 418 "               ADD     R0, SP, #0x60 \n"
 419 "               ADD     R9, SP, #0x0c \n"
 420 "               STMIA   R9, {R0-R3} \n"
 421 "               LDR     R1, [SP,#0x50] \n"
 422 "               LDR     R2, [SP,#0x54] \n"
 423 "               LDR     R3, [SP,#0x4c] \n"
 424 "               STMFA   SP, {R1,R3} \n"
 425 "               STR     R2, [SP,#0x0] \n"
 426 "               LDMIB   R4, {R0,R1} \n"
 427 "               LDR     R3, [SP,#0x58] \n"
 428 "               MOV     R2, R11 \n"
 429 "               BL      sub_FFAAC1D8 \n"
 430 "               LDR     R0, [R6,#0x18] \n"
 431 "               LDR     R1, [R6,#0x60] \n"
 432 "               BL      sub_FF83A714 \n"                        // eventproc_export_TakeSemaphore
 433 "               CMP     R0, #9 \n"
 434 "               BEQ     loc_FF985D60 \n"
 435 "loc_FF985F30: \n"
 436 "               LDR     R0, [SP,#0x5c] \n"
 437 "               CMP     R0, #0 \n"
 438 "               BNE     loc_FF985DDC \n"
 439 "               LDR     R0, [R6,#0xC] \n"
 440 "               CMP     R0, #2 \n"
 441 "               MOV     R0, #1 \n"
 442 "               BNE     loc_FF985F54 \n"
 443 "               BL      sub_FFAAD3D0 \n"
 444 "               B       loc_FF985F58 \n"
 445 "loc_FF985F54: \n"
 446 "               BL      sub_FFAAC28C \n"
 447 "loc_FF985F58: \n"
 448 "               LDR     R0, [SP,#0x60] \n"
 449 "               LDR     R1, [SP,#0x58] \n"
 450 "               ADD     R9, R1, R0 \n"
 451 "               LDR     R1, [SP,#0x54] \n"
 452 "               SUB     R10, R1, R0 \n"
 453 "loc_FF985F6C: \n"
 454 "               LDR     R0, [R6,#0xC] \n"
 455 "               LDR     R2, [R6,#0x64] \n"
 456 "               CMP     R0, #2 \n"
 457 "               ADD     R3, SP, #0x5c \n"
 458 "               BNE     loc_FF985FC0 \n"
 459 "               STRD    R2, [SP,#0x28] \n"
 460 "               MOV     R2, #0x18 \n"
 461 "               ADD     R1, SP, #0x34 \n"
 462 "               ADD     R0, SP, #0x10 \n"
 463 "               BL      sub_FFB9F23C \n"
 464 "               LDR     R1, [R6,#0x84] \n"
 465 "               LDR     R2, [R6,#0x88] \n"
 466 "               LDR     R3, [R6,#0x68] \n"
 467 "               ADD     R0, SP, #0x60 \n"
 468 "               STMEA   SP, {R0-R3} \n"
 469 "               LDR     R2, [SP,#0x50] \n"
 470 "               LDR     R3, [SP,#0x4c] \n"
 471 "               MOV     R1, R10 \n"
 472 "               MOV     R0, R9 \n"
 473 "               BL      sub_FFAAD368 \n"
 474 "               B       loc_FF986018 \n"
 475 "loc_FF985FC0: \n"
 476 "               LDR     R1, [R6,#0x68] \n"
 477 "               LDR     R0, [R4,#0x20] \n"
 478 "               STR     R1, [SP,#0x20] \n"
 479 "               STR     R0, [SP,#0x1c] \n"
 480 "               STR     R2, [SP,#0x24] \n"
 481 "               STR     R3, [SP,#0x28] \n"
 482 "               LDR     R3, [R4,#0x1C] \n"
 483 "               LDR     R1, [R6,#0x84] \n"
 484 "               LDR     R2, [R6,#0x88] \n"
 485 "               ADD     R0, SP, #0x60 \n"
 486 "               STR     R2, [SP,#0x14] \n"
 487 "               LDR     R2, [SP,#0x50] \n"
 488 "               STR     R1, [SP,#0x10] \n"
 489 "               STR     R3, [SP,#0x18] \n"
 490 "               LDR     R3, [SP,#0x4c] \n"
 491 "               STR     R0, [SP,#0x0c] \n"
 492 "               STMFA   SP, {R2,R3} \n"
 493 "               STR     R10, [SP,#0x0] \n"
 494 "               LDMIB   R4, {R0,R1} \n"
 495 "               MOV     R3, R9 \n"
 496 "               MOV     R2, R11 \n"
 497 "               BL      sub_FFAAC1D8 \n"
 498 "loc_FF986018: \n"
 499 "               LDR     R0, [R6,#0x18] \n"
 500 "               LDR     R1, [R6,#0x60] \n"
 501 "               BL      sub_FF83A714 \n"                        // eventproc_export_TakeSemaphore
 502 "               CMP     R0, #9 \n"
 503 "               BNE     loc_FF986038 \n"
 504 "               MOV     R1, #0 \n"
 505 "loc_FF986030: \n"
 506 "               MOV     R0, #0x90000 \n"
 507 "               B       loc_FF98604C \n"
 508 "loc_FF986038: \n"
 509 "               LDR     R0, [SP,#0x5c] \n"
 510 "               CMP     R0, #0 \n"
 511 "               BEQ     loc_FF986054 \n"
 512 "               MOV     R1, #0 \n"
 513 "loc_FF986048: \n"
 514 "               MOV     R0, #0xA0000 \n"
 515 "loc_FF98604C: \n"
 516 "               BL      sub_FF985B0C \n"
 517 "               B       loc_FF985C7C \n"
 518 "loc_FF986054: \n"
 519 "               LDR     R0, [R6,#0xC] \n"
 520 "               CMP     R0, #2 \n"
 521 "               MOV     R0, #0 \n"
 522 "               BNE     loc_FF98606C \n"
 523 "               BL      sub_FFAAD3D0 \n"
 524 "               B       loc_FF986070 \n"
 525 "loc_FF98606C: \n"
 526 "               BL      sub_FFAAC28C \n"
 527 "loc_FF986070: \n"
 528 "               LDR     R0, [SP,#0x58] \n"
 529 "               LDR     R1, [SP,#0x60] \n"
 530 "               BL      sub_FFAF2E1C \n"
 531 "               LDR     R0, [R6,#0x68] \n"
 532 
 533 "               LDR     R3, =0x71B0 \n"                         // 71b0
 534 "               ADD     R1, R0, #1 \n"
 535 "               STR     R1, [R6,#0x68] \n"
 536 "               STR     R3, [SP,#0x0] \n"
 537 "               LDR     R0, [R6,#0x64] \n"
 538 "               SUB     R3, R3, #4 \n"                          // 4
 539 "               AND     R2, R0, #0xFF \n"
 540 "               LDR     R0, [SP,#0x60] \n"
 541 "               BL      sub_FFAF0964 \n"
 542 
 543 "               LDR R0, =0x71AC \n"                             // added  (71b0 - 4)
 544 "               BL              set_quality \n"                 // added
 545 
 546 "loc_FF9860A4: \n"
 547 "               CMP     R5, #1 \n"
 548 "               LDRNEH  R0, [R6,#6] \n"
 549 "               CMPNE   R0, #3 \n"
 550 "               BNE     loc_FF985C7C \n"
 551 "               LDR     R0, [R6,#0x6C] \n"
 552 "               ADD     R0, R0, #1 \n"
 553 "               STR     R0, [R6,#0x6C] \n"
 554 "               LDRH    R1, [R6,#6] \n"
 555 "               CMP     R1, #3 \n"
 556 "               LDRNE   R1, [R6,#0x54] \n"
 557 "               LDREQ   R1, =0x3E9 \n"
 558 "               MUL     R0, R1, R0 \n"
 559 "               LDREQ   R1, =0x1770 \n"
 560 "               LDRNE   R1, [R6,#0x50] \n"
 561 "               BL      sub_FFBA189C \n"
 562 "               MOV     R4, R0 \n"
 563 "               BL      sub_FFAF3198 \n"
 564 "               LDR     R0, [R6,#0x8C] \n"
 565 "               CMP     R0, R4 \n"
 566 "               BNE     loc_FF986100 \n"
 567 "               LDR     R0, [R6,#0x3C] \n"
 568 "               CMP     R0, #1 \n"
 569 "               BNE     loc_FF986114 \n"
 570 "loc_FF986100: \n"
 571 "               LDR     R1, [R6,#0x98] \n"
 572 "               MOV     R0, R4 \n"
 573 "               BLX     R1 \n"
 574 "               STR     R4, [R6,#0x8C] \n"
 575 "               STR     R8, [R6,#0x3C] \n"
 576 "loc_FF986114: \n"
 577 "               STR     R8, [R6,#0x38] \n"
 578 "               B       loc_FF985C7C \n"
 579 
 580 "loc_FF986A38: \n"
 581 "               B       sub_FF986A38 \n"
 582         );
 583 }

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