root/platform/s90/sub/101c/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_fb_d
  6. camera_jpeg_count_str
  7. vid_get_bitmap_active_palette
  8. vid_get_bitmap_active_buffer

   1 #include "platform.h"
   2 #include "lolevel.h"
   3 /*
   4 *********************
   5 G11
   6 **********************
   7 note sensor size for camera.h is from 
   8 @ FFB09A68
   9 0xEE9200  = 15634944 
  10 15634944/12 * 8  = 10423296 ---
  11                                |
  12 @ FFB09690                     |
  13 0xEA0 and 0xAE0 =              |
  14 3744  *  2784  =  10423296  --- 
  15 
  16 ROM:FFB025A8                 LDR     R1, =0xEE9200
  17 ROM:FFB025AC                 ADR     R0, aCrawBuffSizeP ; "CRAW BUFF SIZE  %p"
  18 
  19  
  20 ROM:FF933B98                 MOV     R2, #0xEA0
  21 ROM:FF933B9C                 MOV     R3, #0xAE0
  22 
  23 */ 
  24 
  25 /*
  26 G11:  IMG VRAM BUFF = 0x41B4AE44 //0x4161CFC4 
  27           THUM VRAM BUFF= 0x40A85C30 //0x40A1C030
  28           CRAW BUFF     = 0x4213A6EC //0x41C0F460
  29           CRAW BUFF SIZE= 0xEE9200
  30           JPEG BUFF     = 0x43026600 //0x42DEAC00 (0x1215400)
  31  
  32 */
  33 
  34 /* LED
  35 c0220130 dp green      1 1 = red    0 1= orange
  36       34 dp orange
  37    2c   3c = poweroff
  38    */
  39 char *hook_raw_image_addr()
  40 {
  41     return (char*)0x4213A6EC;  // search for aCrwaddressLxCr " CrwAddress %lx, CrwSize H %ld V %ld\r" 0x41c0f460 0xEA0 0xAE0
  42                                                            // or for aCrawBuffP      DCB "CRAW BUFF       %p",0
  43 }
  44 
  45 void *vid_get_viewport_live_fb()
  46 {
  47     void **fb=(void **)0x2240; //100c, 101a, 101c @ff84e0b4; sub_ff84d748
  48     unsigned char buff = *((unsigned char*)0x2084); //100c, 101a, 101c @ff84de2c; sub_ff84d748
  49     if (buff == 0) {
  50         buff = 2;
  51     }
  52     else {
  53         buff--;
  54     }
  55     return fb[buff];
  56 }
  57 
  58 void *vid_get_bitmap_fb()       
  59 {
  60         return (void*)0x40471000; // G11 OK  @FF858728 (at end of function DispCon_ShowBlackChart
  61 }
  62 
  63 void *vid_get_viewport_fb()
  64 {
  65         
  66                 return (void*)0x407E8A00;
  67 /*
  68 ROM:FFAFF2DC                 LDR     R1, =0x407E8A00
  69 ROM:FFAFF2E0                 LDR     R0, =0x7E900
  70 ROM:FFAFF2E4                 STR     R1, [R4]
  71 ROM:FFAFF2E8                 STR     R0, [R4,#4]
  72 ROM:FFAFF2EC                 ADR     R0, aVramAddressP ; "VRAM Address  : %p\r"
  73 ROM:FFAFF2F0                 BL      sub_FF93500C
  74 ROM:FFAFF2F4                 LDR     R1, [R4,#4]
  75 ROM:FFAFF2F8                 ADR     R0, aVramSize0xX ; "VRAM Size     : 0x%x\r"
  76 
  77 */
  78                                         
  79 }
  80 
  81 // Histo etc. when in play mode maybe ?
  82 void *vid_get_viewport_fb_d()
  83 {
  84         return (void*)(*(int*)(0x2A20+0x58));   // G11
  85          // S90: 0x58 @FF86FA30  0x2A50 @FF86F9F8 (Search for aImageplayer_c)
  86 }
  87 
  88 char *camera_jpeg_count_str()
  89 {
  90     return (char*)0x9792C;// S90 OK /* Search for a9999 ; "9999" */
  91 }
  92 
  93 void *vid_get_bitmap_active_palette() {
  94     return (void *)*(unsigned int*)(0x5CFC+0x2C);  // sub_FF9152C4, via sub_FFAE56B0 two refs to "Palette Class."
  95 }
  96 
  97 void *vid_get_bitmap_active_buffer()
  98 {
  99     return (void*)(*(int*)(0x5CFC+0x18)); //sub_FF9152C4 via "<GetBmpVramInfo> Add: %p Width : %ld Hight : %ld"
 100 }
 101 

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