root/platform/a450/sub/100d/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
  16. vid_get_viewport_fullscreen_height
  17. vid_get_viewport_fullscreen_width
  18. vid_get_viewport_display_xoffset_proper
  19. vid_get_viewport_display_yoffset_proper

   1 #include "platform.h"
   2 #include "keyboard.h"
   3 
   4 void *hook_raw_fptr()
   5 {
   6     return (void*)0x440C0; 
   7 }
   8 
   9 void *hook_raw_ret_addr()
  10 {
  11     return (void*)0xFFD4CBD8; 
  12 }
  13 
  14 char *hook_raw_image_addr()
  15 {
  16     return (char*)(0x10800000+0x41000+0x260);      
  17 }
  18 
  19 void *vid_get_viewport_live_fb() //@ffd630f8
  20 {
  21     void **fb=(void **)0x6028;
  22     unsigned char buff = *((unsigned char*)0x6038);
  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*)0x10361000;  //(0x10360000 + 0x1000)
  35 }
  36 
  37 void *vid_get_viewport_fb()
  38 {
  39     return (void*)0x10E81260; //0x10558D30
  40 }
  41 
  42 void *vid_get_viewport_fb_d()
  43 {
  44     return (void*)(*(int*)0x6D048);
  45 }
  46 
  47 long vid_get_viewport_height()
  48 {
  49     return 240;
  50 }
  51 
  52 char *camera_jpeg_count_str()
  53 {
  54     return (char*)0x10F70;
  55 } 
  56 
  57 // PTP display stuff
  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 *)0x45af8;  // sub_ffdbb11c, (marked by 2 adjacent bmpddev.c asserts, just like in A410)
  63 }
  64 
  65 void *vid_get_bitmap_active_buffer()
  66 {
  67     return (void*)(*(int*)(0x8dc8)); //sub_ffdbb11c, fed into 0xc0f140d4
  68 }
  69 
  70 extern int _GetVRAMHPixelsSize();
  71 extern int _GetVRAMVPixelsSize();
  72 // normally 720, goes to 360 for stitch, 320x240 video, max digital zoom
  73 int vid_get_viewport_width_proper() { 
  74     return ((mode_get()&MODE_MASK) == MODE_PLAY)?720:_GetVRAMHPixelsSize();
  75 }
  76 // varies from 62 - 240 with digital zoom, 120 in stitch
  77 int vid_get_viewport_height_proper() {
  78     return ((mode_get()&MODE_MASK) == MODE_PLAY)?240:_GetVRAMVPixelsSize();
  79 }
  80 
  81 int vid_get_viewport_fullscreen_height() {
  82     // except for stitch, always full screen
  83     return vid_get_viewport_height_proper();
  84 }
  85 int vid_get_viewport_fullscreen_width() {
  86     // except for stitch, always full screen
  87     return vid_get_viewport_width_proper();
  88 }
  89 int vid_get_viewport_display_xoffset_proper() {
  90     return 0;
  91 }
  92 int vid_get_viewport_display_yoffset_proper() {
  93     return 0;
  94 }

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