root/platform/a2100/sub/100a/lib.c

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

DEFINITIONS

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

   1 // A2100IS 1.00A
   2 /*
   3 ###########################################################
   4 ###########################################################
   5 #############[ FINISHED !!!! ]#############################
   6 ###########################################################
   7 ###########################################################
   8 */
   9 
  10 #include "platform.h"
  11 
  12 /*
  13 G10 sensor size from code at sub_FFACDE4C = (4480*3348)*(12/8) = 0x1574D00 = 22498560
  14 
  15 0x1180 = 4480   // raw sensor size  @ 0xFFACDE4C
  16 0xD14 =  3348   //                                      @ 0xFFACDE50
  17 0x1140 = 4416   // jpeg size 
  18 0xCF0 =  3312   //
  19 */
  20 
  21 void *vid_get_bitmap_fb()        { return (void*)0x403f1000; } // Found @0xffc2c5cc
  22 void *vid_get_viewport_fb()      { return (void*)0x4076fcc0; } // Found @0xffe441f8
  23 char *camera_jpeg_count_str()    { return (char*)0x0002f55c; } // Found @0xffd60580
  24 int get_flash_params_count(void) { return 0x7a; }              // Found @0xffd1cfec
  25 
  26 // fixed!
  27 char *hook_raw_image_addr()
  28 {
  29 // 
  30 // ROM:FFE4670C                 LDR     R4, =0x40CED8C0
  31 
  32 return (char*)0x4139E56C; // seach on CRAW BUF
  33 
  34         // Appears to be two raw buffers (this returns active buffer)
  35         // Addresses below found in table at FFC4AA5C
  36         // used in ROM:FFC4AA5C                 EXPORT _sub_FFC4AA5C__SsImgProcBuf.c__0
  37         // checks [0x2848 + 0x1C] --> defines which buffer is active
  38         
  39         //ROM:FFC4A2A0 ; LOCATION: SsImgProcBuf.c:0
  40         // ROM:FFC4A2A4                 LDR     R4, =0x2848
  41         // ROM:FFC4A2A8                 LDR     R0, [R4,#0x18]
  42 
  43 //ROM:FFC4A334                 LDR     R0, =0x40E166C0
  44 //ROM:FFCC7C74                 LDR     R1, =0x4139E56C - found by aCrwaddressLxCr tag
  45         // if (*((int*)0x2860) != 0)
  46                 // return (char*)0x40E166C0;                    // G10 @ 0xFFB101AC
  47         // else
  48                 // return (char*)0x4139E56C;                    // G10 searched for aCrwaddressLxCr or for aCrawBuffP 0xFFACDE48
  49                 
  50                 
  51 }
  52 
  53 // char *hook_alt_raw_image_addr()
  54 // {
  55         // // Appears to be two raw buffers (this returns active buffer)
  56         // // Addresses below found in table at FFB1017C , ref at FFBBAD50
  57         // // used in _sub_FF86837C__SsImgProcBuf.c__0 
  58         // // checks [0x555C + 0x18] --> defines which buffer is active
  59 // //ROM:FFC4A334                 LDR     R0, =0x40E166C0
  60 // //ROM:FFCC7C74                 LDR     R1, =0x4139E56C - found by aCrwaddressLxCr tag
  61         // if (*((int*)0x2860) == 0)
  62                 // return (char*) 0x40E166C0;                   // G10 @ 0xFFB101AC
  63         // else
  64                 // return (char*)0x4139E56C;                    // G10 searched for aCrwaddressLxCr or for aCrawBuffP 0xFFACDE48
  65 // }
  66 
  67 
  68 // long hook_raw_size()
  69 // { 
  70         // return 0x01574d00;                                   // G10 autofound @0xffad712c - search CRAW BUF SIZE
  71 // }
  72 
  73 // char *camera_jpeg_count_str()
  74 // {
  75         // return (char*)0x0004c95c;                            // G10 autofound @0xff9cccdc
  76 // } 
  77 
  78 // void *vid_get_bitmap_fb()
  79 // {
  80         // return (void*)0x40471000;                            // G10 autofound @0xff846a4c DispCon_ShowBitmapColorBar 
  81 // }
  82 
  83 // void *vid_get_viewport_fb()
  84 // {
  85         // return (void*)0x40816dc0;                            // G10 autofound @0xffad4d70 -  search on VRAM Address
  86 // }
  87 
  88 void *vid_get_viewport_fb_d()                           // G10 found
  89 {
  90 //ac: ROM:FFC3FAEC                 LDR     R8, =0x2628
  91 //ac: ROM:FFC3FB1C                 LDREQ   R0, [R8,#0x1C] 
  92         return (void*)(*(int*)(0x2628+0x58));   // @FF85ADD8 & FF85AE28 (comp S95, G11 - search for aImageplayer_c)
  93 }                                                                                       // @FF85B864 & FF85B89C
  94 
  95 void *vid_get_viewport_live_fb()                        // G10 @ FF83A41C routine - match with IXUS980_SD990
  96 {       
  97 
  98 //ac: Unknown how to find these values
  99     void **fb=(void **)0x2710;  // 0xFFC243F8 - ? ; also, may be FFC241D8                 LDR     R1, =0x1F34
 100     unsigned char buff = *((unsigned char*)0x1EC8);  // 0xFFC24228
 101     if (buff == 0) {
 102         buff = 2;
 103     }
 104     else {
 105         buff--;
 106     }
 107     return fb[buff];
 108 }

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