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

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

DEFINITIONS

This source file includes following definitions.
  1. hook_raw_image_addr
  2. vid_get_viewport_live_fb
  3. vid_get_bitmap_fb
  4. vid_get_viewport_fb
  5. vid_get_viewport_fb_d
  6. vid_get_viewport_height
  7. camera_jpeg_count_str
  8. vid_get_viewport_width_proper
  9. vid_get_viewport_height_proper
  10. vid_get_viewport_fullscreen_width
  11. vid_get_viewport_fullscreen_height
  12. vid_get_palette_type
  13. vid_get_palette_size
  14. vid_get_bitmap_active_palette
  15. vid_get_bitmap_active_buffer

   1 #include "platform.h"
   2 
   3 char *hook_raw_image_addr()
   4 {
   5 //found 0x11A34C40 at 0xFFC3C948 and 0x10805040 at FFC7D80C
   6 // not for sure: 53A4 at 0xFFC51A60 and 0x53A4+0x18 at 0xFFC518D4
   7         return (char*) (*(int*)(0x53A4+0x18) ? 0x11A34C40 : 0x10805040);        
   8 }
   9 
  10 void *vid_get_viewport_live_fb()
  11 {
  12    void **fb=(void **)0x21a0; //ROM:FFC285D0 dword_FFC285D0  DCD 0x21A0, look also at ROM:FFC27FF0
  13    unsigned char buff = *((unsigned char*)0x2014); //ROM:FFC285C8 dword_FFC285C8  DCD 0x2014    , look also at ROM:FFC27FA0
  14     if (buff == 0) buff = 2;  else buff--;
  15     return fb[buff];
  16 }
  17 
  18 void *vid_get_bitmap_fb()
  19 {
  20     return (void*)0x10361000;           // found at some addresses e.g. 0xffc32078 or 0xFFDD97B8 , guided by sx100 an a720 and sx10
  21 }
  22 
  23 void *vid_get_viewport_fb()
  24 {
  25     return (void*)0x10659DE0; // found at some addresses e.g. 0xffe5ea50 , guided by sx100 and a720 ans sx10
  26 }
  27 
  28 void *vid_get_viewport_fb_d()
  29 {
  30     return (void*)(*(int*)0x5114);   //0x50C0 + 0x54, 0x50C0 found at 0xFFC45E78 and look at 0xffc46568/0xFFC46594
  31 }
  32 
  33 // note this appears to be 216 in rec mode 
  34 long vid_get_viewport_height()
  35 {
  36     return vid_get_viewport_height_proper();
  37 }
  38 char *camera_jpeg_count_str()
  39 {
  40         // Found at ROM:FFD84BC0        
  41  return (void*)0x45E58;
  42 }
  43 
  44 extern int _GetVRAMHPixelsSize();
  45 extern int _GetVRAMVPixelsSize();
  46 // normally 720, others unknown
  47 int vid_get_viewport_width_proper() { 
  48     return ((mode_get()&MODE_MASK) == MODE_PLAY)?720:_GetVRAMHPixelsSize();
  49 }
  50 // playback seems to be 240, rec 216 (?!), varies with digital zoom
  51 int vid_get_viewport_height_proper() {
  52     return ((mode_get()&MODE_MASK) == MODE_PLAY)?240:_GetVRAMVPixelsSize();
  53 }
  54 // this camera does not have stitch, so always fullscreen
  55 int vid_get_viewport_fullscreen_width() {
  56     return vid_get_viewport_width_proper();
  57 }
  58 int vid_get_viewport_fullscreen_height() {
  59     return vid_get_viewport_height_proper();
  60 }
  61 
  62 //this camera uses a 16 entry VUYA palette. The alpha values all appear to be 0 or 3
  63 int vid_get_palette_type() { return 4; }
  64 int vid_get_palette_size() { return 16*4; } // from sub_FFCD28D4
  65 void *vid_get_bitmap_active_palette() {
  66     return (void *)*(unsigned int*)(0x7BCC+0x20);  // sub_FFCD28D4, via sub_FFD8B650 two refs to "Palette Class."
  67 }
  68 
  69 void *vid_get_bitmap_active_buffer()
  70 {
  71     return (void*)(*(int*)(0x7BCC+0xC)); //"Add: %p Width : %ld Hight : %ld", sub_FFCD2998
  72 }
  73 

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