root/platform/sx10/sub/101a/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_width_proper
  6. vid_get_viewport_height_proper

   1 #include "platform.h"
   2 
   3 char *hook_raw_image_addr()
   4 {
   5         return (char*) (*(int*)(0x55CC+0x18) ? 0x424F1948 : 0x40F65B18);
   6 }
   7 
   8 void *vid_get_viewport_live_fb()
   9 {
  10     void **fb=(void **)0x227C;
  11     unsigned char buff = *((unsigned char*)0x20D0); // sub_FF839DD8
  12     if (buff == 0) buff = 2;  else buff--;    
  13     return fb[buff];
  14 }
  15 
  16 void *vid_get_bitmap_fb()
  17 {
  18         return (void*)0x403B1000; 
  19 }
  20 
  21 void *vid_get_viewport_fb()
  22 {
  23         return (void*)0x4070D9D0;
  24 }
  25 
  26 // values from chdkcam patch
  27 // commented for now, protocol changes needed to handle correctly
  28 // note, play mode may be 704, needs to be tested
  29 #if 0
  30 int vid_get_viewport_width_proper() { 
  31     return ((mode_get()&MODE_MASK) == MODE_PLAY)?720:*(int*)0x224C; // VRAM DataSize
  32 }
  33 int vid_get_viewport_height_proper() {
  34     return ((mode_get()&MODE_MASK) == MODE_PLAY)?240:*(int*)(0x224C+4); // VRAM DataSize
  35 }
  36 #endif

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