root/platform/s90/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_fb_d
  6. JogDial_CW
  7. JogDial_CCW
  8. camera_jpeg_count_str
  9. vid_get_bitmap_active_palette
  10. vid_get_bitmap_active_buffer

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

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