root/platform/ixus100_sd780/sub/100c/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_width
  7. vid_get_viewport_height
  8. camera_jpeg_count_str
  9. vid_get_palette_type
  10. vid_get_palette_size
  11. vid_get_bitmap_active_buffer
  12. vid_get_viewport_width_proper
  13. vid_get_viewport_height_proper

   1 #include "platform.h"
   2 
   3 //VERIFY_SD780 - - Search for "A/%08x.CRW" and find nearby the hex value found for hook_raw_size.
   4 //VERIFY_SD780 - - Above this is the second value...only value????
   5 char *hook_raw_image_addr()
   6 {
   7         //VERIFY_SD780 ImgProcBuf 0x2968+0x18????
   8         return (char*)0x424AD900;
   9 //      return (char*) (*(int*)(0x5520 + 0x18)? 0x42CFB780 : 0x40EBAFA0);  //SD990 has this...
  10 }
  11 
  12 
  13 //VERIFY_SD780 - - Search for ; LOCATION: LiveImage.c:0 - First LDR
  14 //VERIFY_SD780 - - Find the **fb lower in function.
  15 //VERIFY_SD780 - Original location 0xFF8B02F4
  16 //VERIFY_SD780 - Have doubts...
  17 void *vid_get_viewport_live_fb()
  18 {
  19     void **fb=(void **)0x43EC;
  20     unsigned char buff = *((unsigned char*)0x4244);
  21     if (buff == 0) {
  22         buff = 2;
  23     }
  24     else {
  25         buff--;
  26     }
  27     return fb[buff];
  28 }
  29 
  30 
  31 //SD780 - - Search for ; LOCATION: BmpDDev.c:138 - First LDR
  32 //SD780 - Search ShowBlackChart FF83DAE4
  33 void *vid_get_bitmap_fb()
  34 {
  35     return (void*)0x403F1000;
  36 }
  37 
  38 
  39 //SD780 - - Search for "VRAM Address"
  40 void *vid_get_viewport_fb()
  41 {
  42     return (void *)0x415F3570;
  43     //VRAM Size = 0x7E900
  44 }
  45 
  46 //VERIFY_SD780 - - Search for "ADR     R1, _sub_.*__SlideEffect.c" RE on.
  47 //VERIFY_SD780 - - Go two jumps up.
  48 //VERIFY_SD780 - - Could be 0x64/0x68/0x54...
  49 void *vid_get_viewport_fb_d()
  50 {
  51     return (void*)(*(int*)(0x26F4 + 0x58));
  52 }
  53 
  54 //VERIFY_SD780 - - Check resolutions again.
  55 int vid_get_viewport_width()
  56 {
  57         return 360; // viewport is still 360, even though live view is 720 (960?)
  58         //return 720;
  59 }
  60 
  61 //VERIFY_SD780 - - Check resolutions again.
  62 long vid_get_viewport_height()
  63 {
  64     return 240;
  65 }
  66 
  67 //SD780 - - Search for "9999"
  68 char *camera_jpeg_count_str()
  69 {
  70     return (char *)0x33110;
  71 }
  72 // PTP display stuff - untested
  73 int vid_get_palette_type() { return 3; }
  74 int vid_get_palette_size() { return 256*4; } // sub_FF8C99C8, 0x400
  75 
  76 void *vid_get_bitmap_active_buffer()
  77 {
  78     return (void*)(*(int*)(0x4cb8+0x14)); //"Add: %p Width : %ld Hight : %ld", sub_FF8C9A74
  79 }
  80 
  81 // not verified
  82 // reyalp note - sub_FF8C9A74 indicates could be 960x270
  83 //int vid_get_viewport_fullscreen_height() { return 240; }
  84 
  85 // commented for now, protocol changes needed to handle correctly
  86 #if 0
  87 int vid_get_viewport_width_proper() { 
  88     return ((mode_get()&MODE_MASK) == MODE_PLAY)?720:*(int*)0x43bc; // GetVRAMHPixelSize
  89 }
  90 int vid_get_viewport_height_proper() {
  91     return ((mode_get()&MODE_MASK) == MODE_PLAY)?270:*(int*)(0x43bc+4); // GetVRAMVPixelSize
  92 }
  93 #endif
  94 

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