root/platform/a650/sub/100d/lib.c

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

DEFINITIONS

This source file includes following definitions.
  1. hook_raw_image_addr
  2. hook_alt_raw_image_addr
  3. vid_get_viewport_live_fb
  4. vid_get_bitmap_fb
  5. vid_get_viewport_fb
  6. vid_get_viewport_fb_d
  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_palette
  12. vid_get_bitmap_active_buffer
  13. vid_get_viewport_width_proper
  14. vid_get_viewport_height_proper

   1 #include "platform.h"
   2 
   3 char *hook_raw_image_addr()
   4 {
   5  return (char*) (*(int*)0x5684 ? 0x11F6B740 : 0x108057C0);
   6  //  return (char*)0x108057C0;
   7 }
   8 char *hook_alt_raw_image_addr()
   9 {
  10  return (char*) (*(int*)0x5684 ? 0x108057C0 : 0x11F6B740);
  11 }
  12 
  13 void *vid_get_viewport_live_fb()
  14 {
  15     void **fb=(void **)0x21D8;
  16     unsigned char buff = *((unsigned char*)0x208C);
  17     if (buff == 0) {
  18         buff = 2;
  19     }
  20     else {
  21         buff--;
  22     }
  23    return fb[buff];
  24 }
  25 
  26 void *vid_get_bitmap_fb()       
  27 {
  28     return (void*)0x10361000;
  29 }
  30 
  31 void *vid_get_viewport_fb()
  32 {
  33     return (void*)0x1065A560;
  34 }
  35 
  36 void *vid_get_viewport_fb_d()
  37 {
  38     return (void*)(*(int*)0x53E8);  // 0x53A0 + 0x48
  39 }
  40 
  41 long vid_get_viewport_height()
  42 {
  43     return 240;
  44 }
  45 
  46 char *camera_jpeg_count_str()
  47 {
  48     return (char*)0x5CB38;
  49 }
  50 
  51 // PTP display stuff, untested, adapted from ewavr chdkcam patch
  52 int vid_get_palette_type() { return 1; }
  53 int vid_get_palette_size() { return 16*4; }
  54 
  55 void *vid_get_bitmap_active_palette() {
  56     return (void *)0x4536C; // sub_FFCCB3A4
  57 }
  58 void *vid_get_bitmap_active_buffer()
  59 {
  60     return (void*)(*(int*)0xCAC4); //SaveBmpVRAMData()->sub_FFCCB464
  61 }
  62 
  63 // values from chdkcam patch
  64 // commented for now, protocol changes needed to handle correctly
  65 // note, play mode may be 704, needs to be tested
  66 #if 0
  67 int vid_get_viewport_width_proper() { 
  68     return ((mode_get()&MODE_MASK) == MODE_PLAY)?720:*(int*)0x21A8; // VRAM DataSize
  69 }
  70 int vid_get_viewport_height_proper() {
  71      return ((mode_get()&MODE_MASK) == MODE_PLAY)?240:*(int*)(0x21A8+4); // VRAM DataSize
  72 }
  73 #endif
  74 

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