root/platform/a2200/sub/100b/lib.c

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

DEFINITIONS

This source file includes following definitions.
  1. get_flash_params_count
  2. camera_jpeg_count_str
  3. hook_raw_image_addr
  4. hook_alt_raw_image_addr
  5. vid_get_bitmap_fb

   1 #include "platform.h"           
   2 
   3 int get_flash_params_count(void) {
   4         
   5         return 0xA0;                            // Found @0xFF98E5AC
   6 }
   7 
   8 char *camera_jpeg_count_str() {
   9         
  10         return (char*)0x000B3B14;       // Found @0xFF9F71C8
  11 }       
  12 
  13 char *hook_raw_image_addr() {
  14         
  15         //if (*((int*)(0x2B68 + 0xC)) != 0)     // Found @0xFF87A198 + @0XFF87A1C4
  16         //      return (char*) 0x46000000;
  17         //else
  18         //      return (char*) 0x421316C0;
  19                 
  20         return (char*)0x421316C0;       // Found @0xFFB1A77C
  21 }               
  22 
  23 char *hook_alt_raw_image_addr() {
  24         
  25         //if (*((int*)(0x2B68 + 0xC)) != 0)     // Found @0xFF87A198 + @0XFF87A1C4
  26         //      return (char*) 0x46000000;
  27         //else
  28         //      return (char*) 0x421316C0;
  29                 
  30         return (char*)0x421316C0;       // Found @0xFFB1A77C
  31 }
  32 
  33 void *vid_get_bitmap_fb() {
  34         
  35         return (void*)0x403F1000;       // Found @0xFF85B81C
  36 }       
  37 
  38 // Those functions were replaced by their generic implementation in ../lib.c
  39 /*
  40 void *vid_get_viewport_live_fb() {
  41         
  42         //if ((mode_get()&MODE_MASK) == MODE_REC)
  43         //      return (void*)((void*)(*(int*)(0x2144))-vid_get_viewport_xoffset()*3);
  44         
  45         return (void*)(void*)(*(int*)(0x2144)); // Possible addresses (20F0, 2144, 221C)
  46         
  47         // Found by searching RAM locations that referenced 0x40546B80 (viewport buffer)
  48         // and also changed to the other buffer addresses over time. Then used each here
  49         // and selected value that gave the fastest Motion Detect response using http://dataghost.com/chdk/md_meter.html.
  50 }
  51 
  52 void *vid_get_viewport_fb() {
  53         
  54         //if ((mode_get()&MODE_MASK) == MODE_REC)
  55         //      return (void*)(0x40546B80-vid_get_viewport_xoffset()*3);
  56                 
  57         return (void*)0x40546B80;       // Found @0xFFB17310
  58 } 
  59                 
  60 void *vid_get_viewport_fb_d() {
  61         
  62 
  63         return (void*)(*(int*)(0x29a0+0x58));   // Found @0xff871344 & 0xff87137c
  64 }               

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