root/platform/a710/sub/100a/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 #include "keyboard.h"
   3 
   4 void *hook_raw_fptr()
   5 {
   6     return (void*)0x3F960;
   7 }
   8 
   9 void *hook_raw_ret_addr()
  10 {
  11     return (void*)0xFFCC6640;
  12 }
  13 
  14 char *hook_raw_image_addr()
  15 {
  16     return (char*)(0x10400000+0x164000+0xBF0);
  17 }
  18 
  19 void *vid_get_viewport_live_fb()
  20 {
  21 //    return (void*)0x10670ee0;
  22     void **fb=(void **)0x522C;
  23     unsigned char buff = *((unsigned char*)0x523C);
  24     if (buff == 0) {
  25         buff = 2;
  26     }
  27     else {
  28         buff--;
  29     }
  30     return fb[buff];
  31 }
  32 
  33 void *vid_get_bitmap_fb()
  34 {
  35     return (void*)0x10361000;
  36 }
  37 
  38 void *vid_get_viewport_fb()
  39 {
  40     return (void*)0x1055A7E0; //0x105f25e0;
  41 }
  42 
  43 void *vid_get_viewport_fb_d()
  44 {
  45     return (void*)(*(int*)0x70854);
  46 }
  47 
  48 long vid_get_viewport_height()
  49 {
  50     return ((mode_get()&MODE_MASK) == MODE_PLAY)?240:230;
  51 }
  52 char *camera_jpeg_count_str()
  53 {
  54     return (char*)0x7BD98;
  55 }
  56 
  57 // PTP display stuff, untested, adapted from ewavr chdkcam patch
  58 // reyalp - type guessed
  59 int vid_get_palette_type() { return 2; }
  60 int vid_get_palette_size() { return 16*4; }
  61 
  62 void *vid_get_bitmap_active_palette() {
  63     return (void *)0x70250; // GetPaletteFromPhysicalScreen
  64 }
  65 void *vid_get_bitmap_active_buffer()
  66 {
  67     return (void*)(*(int*)0x5FB0);
  68 }
  69 
  70 // values from chdkcam patch
  71 // commented for now, protocol changes needed to handle correctly
  72 // note, play mode may be 704, needs to be tested
  73 #if 0
  74 int vid_get_viewport_width_proper() { 
  75     return ((mode_get()&MODE_MASK) == MODE_PLAY)?720:*(int*)0x3EED0; // VRAM DataSize
  76 }
  77 int vid_get_viewport_height_proper() {
  78     return ((mode_get()&MODE_MASK) == MODE_PLAY)?240:*(int*)0x3EED4; // VRAM DataSize
  79 }
  80 #endif

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