root/platform/ixus700_sd500/sub/101a/lib.c

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

DEFINITIONS

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

   1 #include "platform.h"
   2 
   3 void *hook_raw_fptr()
   4 {
   5     return (void*)0x2F490;
   6 }
   7 
   8 void *hook_raw_ret_addr()
   9 {
  10     return (void*)0xFF8D8BDC;
  11 }
  12 
  13 char *hook_raw_image_addr()
  14 {
  15     return (char*)(0x10400000+0x160000+0x3A80);
  16 }
  17 
  18 void *vid_get_viewport_live_fb()
  19 {
  20     return (void*)0x0;
  21     // from ewavr chdkcam code, needs to be tested
  22 #if 0
  23     void **fb=(void **)0x317C;
  24     unsigned char buff = *((unsigned char*)0x318C);
  25     if (buff == 0) {
  26         buff = 2;
  27     }
  28     else {
  29         buff--;
  30     }
  31     return fb[buff];
  32 #endif
  33 }
  34 
  35 void *vid_get_bitmap_fb()
  36 {
  37     return (void*)0x103CEB20;
  38 }
  39 
  40 void *vid_get_viewport_fb()
  41 {
  42 //    return (void*)0x104B6C20;
  43 //    return (void*)0x10559670;
  44     return (void*)0x105F1470;
  45 }
  46 
  47 void *vid_get_viewport_fb_d()
  48 {
  49 //    return (void*)(*(int*)0x5BAEC);
  50  return (void*)0x104B6C20;
  51 }
  52 
  53 long vid_get_viewport_height()
  54 {
  55     return ((mode_get()&MODE_MASK) == MODE_PLAY)?240:230;
  56 }
  57 char *camera_jpeg_count_str()
  58 {
  59     return (char*)0x75BB8;
  60 }
  61 
  62 // PTP display stuff, untested, adapted from ewavr chdkcam patch
  63 int vid_get_palette_type() { return 1; }
  64 int vid_get_palette_size() { return 16*4; }
  65 
  66 void *vid_get_bitmap_active_palette() {
  67     return (void *)0x6E758; // GetPaletteFromPhysicalScreen
  68 }
  69 void *vid_get_bitmap_active_buffer()
  70 {
  71     return (void*)(*(int*)0x50F4);
  72 }
  73 // TODO value of vid_getviewport_height_proper needs to be checked in play, rec, and the different video modes
  74 //int vid_get_viewport_fullscreen_height()               { return 240; }
  75 
  76 // values from chdkcam patch
  77 // commented for now, protocol changes needed to handle correctly
  78 // note, play mode may be 704, needs to be tested
  79 #if 0
  80 int vid_get_viewport_width_proper() { 
  81     return ((mode_get()&MODE_MASK) == MODE_PLAY)?720:*(int*)0x2E158; // VRAM DataSize
  82 }
  83 int vid_get_viewport_height_proper() {
  84     return ((mode_get()&MODE_MASK) == MODE_PLAY)?240:*(int*)0x2E15C; // VRAM DataSize
  85 }
  86 #endif
  87 

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