root/platform/ixus220_elph300hs/sub/101g/lib.c

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

DEFINITIONS

This source file includes following definitions.
  1. hook_raw_image_addr
  2. hook_alt_raw_image_addr
  3. vid_get_viewport_live_fb
  4. vid_get_bitmap_fb
  5. vid_get_viewport_fb
  6. vid_get_viewport_fb_d
  7. camera_jpeg_count_str

   1 #include "platform.h"
   2 
   3 /*
   4 IXUS220HS / ELPH300HS
   5 full 19131120
   6 0x1048 *  BF4   =  C29CA0
   7 4168 * 3060 = 12754080 
   8 */
   9 
  10 char *hook_raw_image_addr()
  11 {
  12 
  13         if (*((int*)0x2E94) != 0)
  14                 return (char*) 0x46000000;
  15         else
  16                 return (char*) 0x413391A0;  // FFB615BC
  17 
  18 }
  19 
  20 char *hook_alt_raw_image_addr()
  21 {
  22 
  23         if (*((int*)0x2E94) == 0)
  24                 return (char*) 0x46000000;
  25         else
  26                 return (char*) 0x413391A0;  // FFB615BC
  27 
  28 }
  29 
  30 void *vid_get_viewport_live_fb()
  31 {
  32         return (void*)(void*)(*(int*)(0x2258));
  33         
  34         // Found by searching RAM locations that referenced 0x405D7980 (viewport buffer)
  35         // and also changed to the other buffer addresses over time. Then used each here
  36         // and selected value that gave the fastest Motion Detect response using http://dataghost.com/chdk/md_meter.html.
  37 }
  38 
  39 // OSD buffer
  40 void *vid_get_bitmap_fb()
  41 {       
  42         //FF050F24                 LDR     R0, =0x40471000
  43         return (void*)0x40471000;
  44 }                                  
  45 
  46 // Live picture buffer (shoot half-pressed)
  47 void *vid_get_viewport_fb()
  48 {
  49         return (void*)0x405c6b80;                                                          // found by search for VRAM Address @FF371E8C
  50 }
  51 
  52 void *vid_get_viewport_fb_d()
  53 {
  54         return (void*)(*(int*)(0x2c08+0x58));
  55 }
  56 
  57 char *camera_jpeg_count_str()
  58 {
  59         //FF2327FC                 LDR     R0, =0xCA790
  60         return (void*)0x000babac;                                      
  61 
  62 }
  63 

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