root/platform/a610/sub/100f/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*)0x367D0;
   6 }
   7 
   8 void *hook_raw_ret_addr()
   9 {
  10     return (void*)0xFFCB4C5C;
  11 }
  12 
  13 char *hook_raw_image_addr()
  14 {
  15     return (char*)0x1058EBD4;
  16 }
  17 
  18 void *vid_get_viewport_live_fb()
  19 {
  20 //    return (void*)0x10670d50;
  21     void **fb=(void **)0x52EC;
  22     unsigned char buff = *((unsigned char*)0x52FC);
  23     if (buff == 0) {
  24         buff = 2;
  25     }
  26     else {
  27         buff--;
  28     }
  29     return fb[buff];
  30 }
  31 
  32 void *vid_get_bitmap_fb()
  33 {
  34     return (void*)0x103C79A0;
  35 }
  36 
  37 void *vid_get_viewport_fb()
  38 {
  39     return (void*)0x10559570;
  40 }
  41 
  42 void *vid_get_viewport_fb_d()
  43 {
  44     return (void*)(*(int*)0x7279c);
  45 }
  46 
  47 long vid_get_viewport_height()
  48 {
  49     return 240;
  50 }
  51 
  52 char *camera_jpeg_count_str()
  53 {
  54     return (char*)0x80A90;
  55 }
  56 
  57 // PTP display stuff, untested, adapted from ewavr chdkcam patch
  58 int vid_get_palette_type() { return 1; }
  59 int vid_get_palette_size() { return 16*4; }
  60 
  61 void *vid_get_bitmap_active_palette() {
  62     return (void *)(0x724E0); // GetPaletteFromPhysicalScreen
  63 }
  64 void *vid_get_bitmap_active_buffer()
  65 {
  66     return (void*)(*(int*)0x6A58);
  67 }
  68 
  69 // values from chdkcam patch
  70 // commented for now, protocol changes needed to handle correctly
  71 // note, play mode may be 704, needs to be tested
  72 #if 0
  73 int vid_get_viewport_width_proper() { 
  74     return ((mode_get()&MODE_MASK) == MODE_PLAY)?720:*(int*)0x35F20;// VRAM DataSize
  75 }
  76 int vid_get_viewport_height_proper() {
  77     return ((mode_get()&MODE_MASK) == MODE_PLAY)?240:*(int*)(0x35F20+4); // VRAM DataSize     
  78 }
  79 #endif

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