root/platform/a530/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
  16. vid_get_viewport_fullscreen_height
  17. vid_get_viewport_fullscreen_width

   1 #include "platform.h"
   2 #include "keyboard.h"
   3 
   4 void *hook_raw_fptr()
   5 {
   6     return (void*)0x0; 
   7 }
   8 
   9 void *hook_raw_ret_addr()
  10 {
  11     return (void*)0x0; 
  12 }
  13 
  14 char *hook_raw_image_addr()//
  15 {
  16     return (char*) (0x10587D78);
  17     //return (char*)0x10B85AA4;
  18     //return (char*) (0x10D45400);
  19 }
  20 
  21 void *vid_get_viewport_live_fb()
  22 {   //Found at 0xffc902d4 - similar to a530
  23     void **fb=(void **)0x5288;
  24     unsigned char buff = *((unsigned char*)0x5298);
  25     if (buff == 0) {
  26         buff = 2;
  27     }
  28     else {
  29         buff--;
  30     }
  31     return fb[buff];
  32 }
  33 
  34 void *vid_get_bitmap_fb()//
  35 {
  36     return (void*)0x103c79a0;  
  37 }
  38 
  39 void *vid_get_viewport_fb()//
  40 {
  41     return (void*)(0x10605748);
  42     //return (void*)(0x103f1ea0);
  43     //return (void*)(0x1069d548);
  44 }
  45 
  46 void *vid_get_viewport_fb_d()//
  47 {
  48     return (void*)(*(int*)0x63a40);
  49     //return (void*)(*(int*)0x639a8);
  50     //return (void*)(*(int*)0x63908);
  51     //return (void*)(*(int*)0x638fc);
  52 }
  53 
  54 long vid_get_viewport_height()
  55 {
  56     return 240;//((mode_get()&MODE_MASK) == MODE_PLAY)?240:230;
  57 }
  58 
  59 char *camera_jpeg_count_str() /* XXXA530XXX */
  60 {
  61     return (char*)0x6E820;
  62 }
  63 
  64 //PTP
  65 extern int _GetVRAMHPixelsSize();
  66 extern int _GetVRAMVPixelsSize();
  67 
  68 int vid_get_palette_type() { return 1; }
  69 int vid_get_palette_size() { return 16*4; }
  70 
  71 void *vid_get_bitmap_active_palette() {
  72     return (void *)0x63450; // GetPaletteFromPhysicalScreen -> FFD12B30
  73 }
  74 
  75 void *vid_get_bitmap_active_buffer()
  76 {
  77     return (void*)(*(int*)0x5EFC); // DisplayPhysicalScreenWithYUVPalette -> FFD12AE4
  78 }
  79 
  80 int vid_get_viewport_width_proper() { 
  81     return ((mode_get()&MODE_MASK) == MODE_PLAY)?720:_GetVRAMHPixelsSize();
  82 }
  83 int vid_get_viewport_height_proper() {
  84     return ((mode_get()&MODE_MASK) == MODE_PLAY)?240:_GetVRAMVPixelsSize();
  85 }
  86 
  87 int vid_get_viewport_fullscreen_height() {
  88     // except for stitch, always full screen
  89     int m = mode_get();
  90     if((m&MODE_MASK) != MODE_PLAY && (m&MODE_SHOOTING_MASK) == MODE_STITCH) {
  91         return 240;
  92     }
  93     return vid_get_viewport_height_proper();
  94 }
  95 int vid_get_viewport_fullscreen_width() {
  96     // except for stitch, always full screen
  97     int m = mode_get();
  98     if((m&MODE_MASK) != MODE_PLAY && (m&MODE_SHOOTING_MASK) == MODE_STITCH) {
  99         return 720;
 100     }
 101     return vid_get_viewport_width_proper();
 102 }
 103 

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