root/platform/s90/sub/100c/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 S90
   6 **********************
   7 note sensor size for camera.h is from 
   8 0xEE9200  = 15634944 
   9 15634944/12 * 8  = 10423296 ---
  10                                |
  11                                |
  12 0xEA0 and 0xAE0 =              |
  13 3744  *  2784  =  10423296  --- 
  14 
  15 */ 
  16 
  17 
  18 
  19 char *hook_raw_image_addr()
  20 {
  21     return (char*)0x4213A6EC;  // search for aCrwaddressLxCr " CrwAddress %lx, CrwSize H %ld V %ld\r" 0x41c0f460 0xEA0 0xAE0
  22                                                            // or for aCrawBuffP      DCB "CRAW BUFF       %p",0
  23 }
  24 
  25 void *vid_get_viewport_live_fb()
  26 {
  27     void **fb=(void **)0x2240; //100c, 101a, 101c @ff84e0b4; sub_ff84d748
  28     unsigned char buff = *((unsigned char*)0x2084); //100c, 101a, 101c @ff84de2c; sub_ff84d748
  29     if (buff == 0) {
  30         buff = 2;
  31     }
  32     else {
  33         buff--;
  34     }
  35     return fb[buff];
  36 }
  37 
  38 void *vid_get_bitmap_fb()       
  39 {
  40         return (void*)0x40471000; // G11 OK  @FF858728 (at end of function DispCon_ShowBlackChart
  41 }
  42 
  43 void *vid_get_viewport_fb()
  44 {
  45         
  46                 return (void*)0x407E8A00;
  47 /*
  48 ROM:FFAFF2DC                 LDR     R1, =0x407E8A00
  49 ROM:FFAFF2E0                 LDR     R0, =0x7E900
  50 ROM:FFAFF2E4                 STR     R1, [R4]
  51 ROM:FFAFF2E8                 STR     R0, [R4,#4]
  52 ROM:FFAFF2EC                 ADR     R0, aVramAddressP ; "VRAM Address  : %p\r"
  53 ROM:FFAFF2F0                 BL      sub_FF93500C
  54 ROM:FFAFF2F4                 LDR     R1, [R4,#4]
  55 ROM:FFAFF2F8                 ADR     R0, aVramSize0xX ; "VRAM Size     : 0x%x\r"
  56 
  57 */
  58                                         
  59 }
  60 
  61 // Histo etc. when in play mode maybe ?
  62 void *vid_get_viewport_fb_d()
  63 {
  64         return (void*)(*(int*)(0x2A20+0x58));   
  65          // S90: 0x58 @FF86FA30  0x2A50 @FF86F9F8 (Search for aImageplayer_c)
  66 }
  67 
  68 char *camera_jpeg_count_str()
  69 {
  70     return (char*)0x9792C;// S90 OK /* Search for a9999 ; "9999" */
  71 }
  72 
  73 void *vid_get_bitmap_active_palette() {
  74     return (void *)*(unsigned int*)(0x5CFC+0x2C);  // sub_FF915248, via sub_FFAE54A0 two refs to "Palette Class."
  75 }
  76 
  77 void *vid_get_bitmap_active_buffer()
  78 {
  79     return (void*)(*(int*)(0x5CFC+0x18)); //sub_FF9152EC via "<GetBmpVramInfo> Add: %p Width : %ld Hight : %ld"
  80 }
  81 
  82 

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