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

Revision 749, 1.7 KB checked in by phyrephox, 4 years ago (diff)

+ sx110 (port done by yarvieh & chdkj, see http://chdk.setepontos.com/index.php/topic,2838.0.html)

  • Property svn:eol-style set to native
Line 
1
2#include "platform.h"
3
4char *hook_raw_image_addr()
5{
6/* SX10
7        return (char*) (*(int*)(0x55CC+0x18) ? 0x424F1948 : 0x40F65B18);
8end sx10 */
9
10
11//found 0x11A34C40 at 0xFFC3C948 and 0x10805040 at FFC7D80C
12// not for sure: 53A4 at 0xFFC51A60 and 0x53A4+0x18 at 0xFFC518D4
13        return (char*) (*(int*)(0x53A4+0x18) ? 0x11A34C40 : 0x10805040);       
14}
15
16long hook_raw_size()
17{
18   //      Found at ROM:FFE60B00
19   //      ROM:FFE60BB4                 LDR     R1, =0xEC04F0
20   //      ROM:FFE60BB8                 ADR     R0, aCrawBuffSizeP ; "CRAW BUFF SIZE  %p"
21   //      ROM:FFE60BBC                 BL      sub_FFCE7000
22   
23   return 0xEC04F0;
24}
25
26
27void *vid_get_viewport_live_fb()
28{
29//      return (void*)0;//0x10670ee0;  0=not 100% safe!
30       
31    void **fb=(void **)0x227C; //look at 0x10670ee0, no explanation for it, code from sx10
32    unsigned char buff = *((unsigned char*)0x20D0); // sx10: sub_FF839DD8, no explanation for it
33    if (buff == 0) buff = 2;  else buff--;   
34    return fb[buff];
35       
36}
37
38
39void *vid_get_bitmap_fb()
40{
41    return (void*)0x10361000;           // found at some addresses e.g. 0xffc32078 or 0xFFDD97B8 , guided by sx100 an a720 and sx10
42}
43
44void *vid_get_viewport_fb()
45{
46    return (void*)0x10659DE0; // found at some addresses e.g. 0xffe5ea50 , guided by sx100 and a720 ans sx10
47}
48
49void *vid_get_viewport_fb_d()
50{
51    return (void*)(*(int*)0x5114);   //0x50C0 + 0x54, 0x50C0 found at 0xFFC45E78 and look at 0xffc46568/0xFFC46594
52}
53
54
55long vid_get_bitmap_screen_width()
56{
57    return 360;
58}
59
60long vid_get_bitmap_screen_height()
61{
62    return 240;
63}
64
65long vid_get_viewport_height()
66{
67    return 240;
68}
69char *camera_jpeg_count_str()
70{
71        // Found at ROM:FFD84BC0       
72 return (void*)0x45E58;
73}
74
75long vid_get_bitmap_buffer_width() { return 360; }
76
77long vid_get_bitmap_buffer_height() { return 240; }
Note: See TracBrowser for help on using the repository browser.