source: trunk/platform/sx110is/sub/100b/lib.c @ 757

Revision 757, 1.4 KB checked in by reyalp, 4 years ago (diff)

sx110 patch from chdkj http://chdk.setepontos.com/index.php/topic,2838.msg33317.html#msg33317

  • Swivel screen disabled in camera.h
  • fixed vid_get_viewport_live_fb in lib.c (Zebra, Histogramm, Motion Detection works now.)
  • Property svn:eol-style set to native
Line 
1#include "platform.h"
2
3char *hook_raw_image_addr()
4{
5//found 0x11A34C40 at 0xFFC3C948 and 0x10805040 at FFC7D80C
6// not for sure: 53A4 at 0xFFC51A60 and 0x53A4+0x18 at 0xFFC518D4
7        return (char*) (*(int*)(0x53A4+0x18) ? 0x11A34C40 : 0x10805040);       
8}
9
10long hook_raw_size()
11{
12   //      ROM:FFE60BB4                 LDR     R1, =0xEC04F0
13   return 0xEC04F0;
14}
15
16
17void *vid_get_viewport_live_fb()
18{
19   void **fb=(void **)0x21a0; //ROM:FFC285D0 dword_FFC285D0  DCD 0x21A0, look also at ROM:FFC27FF0
20   unsigned char buff = *((unsigned char*)0x2014); //ROM:FFC285C8 dword_FFC285C8  DCD 0x2014    , look also at ROM:FFC27FA0
21    if (buff == 0) buff = 2;  else buff--;
22    return fb[buff];
23}
24
25void *vid_get_bitmap_fb()
26{
27    return (void*)0x10361000;           // found at some addresses e.g. 0xffc32078 or 0xFFDD97B8 , guided by sx100 an a720 and sx10
28}
29
30void *vid_get_viewport_fb()
31{
32    return (void*)0x10659DE0; // found at some addresses e.g. 0xffe5ea50 , guided by sx100 and a720 ans sx10
33}
34
35void *vid_get_viewport_fb_d()
36{
37    return (void*)(*(int*)0x5114);   //0x50C0 + 0x54, 0x50C0 found at 0xFFC45E78 and look at 0xffc46568/0xFFC46594
38}
39
40
41long vid_get_bitmap_screen_width()
42{
43    return 360;
44}
45
46long vid_get_bitmap_screen_height()
47{
48    return 240;
49}
50
51long vid_get_viewport_height()
52{
53    return 240;
54}
55char *camera_jpeg_count_str()
56{
57        // Found at ROM:FFD84BC0       
58 return (void*)0x45E58;
59}
60
61long vid_get_bitmap_buffer_width() { return 360; }
62
63long vid_get_bitmap_buffer_height() { return 240; }
Note: See TracBrowser for help on using the repository browser.