source: trunk/platform/ixus200_sd980/sub/101c/lib.c @ 2798

Revision 1909, 1.4 KB checked in by philmoz, 12 months ago (diff)

Merged revision(s) 1907 from branches/release-1_0:
IXUS200 1.00c version plus fixes for 1.01c and 1.01d from waterwingz.
http://chdk.setepontos.com/index.php?topic=650.msg86127#msg86127

  • Property svn:eol-style set to native
Line 
1#include "platform.h"
2
3char *hook_raw_image_addr()
4{
5        return (char*)0x421E1120;
6}
7
8long hook_raw_size()
9{
10        return 0x11CA240;
11}
12
13
14void *vid_get_viewport_live_fb()//found in sub_FF8E0788
15{
16    void **fb=(void **)0x5014;
17    unsigned char buff = *((unsigned char*)0x4E5C);
18    if (buff == 0) buff = 2;  else buff--;
19        return (void*)fb[buff];
20}
21
22void *vid_get_bitmap_fb()
23{
24        return (void*)0x40431000;
25}
26
27void *vid_get_viewport_fb()
28{
29        return (void*)0x408CB700;
30}
31
32void *vid_get_viewport_fb_d()
33{
34        return (void*)(*(int*)(0x28F0+0x58));
35}
36
37long vid_get_viewport_height()       { return 240; }
38
39// Physical width of viewport row in bytes
40int vid_get_viewport_byte_width() {
41        return 960 * 6 / 4;     // IXUS 200 - wide screen LCD is 960 pixels wide, each group of 4 pixels uses 6 bytes (UYVYYY)
42}
43
44int vid_get_viewport_width()
45{
46    if (shooting_get_prop(PROPCASE_RESOLUTION) == 8)    // widescreen (16:9) image size
47                return 480;
48    else
49        return 360;
50}
51
52int vid_get_viewport_display_xoffset()
53{
54        if (shooting_get_prop(PROPCASE_RESOLUTION) == 8)        // widescreen (16:9) image size
55           return 0;
56        else
57       return 60;
58}
59
60
61char *camera_jpeg_count_str()
62{
63//      return (char*)0x4C138;
64        return (char*)0x00084ca4;      // Found @0xff9e8aa8
65}
66
67
68//only for cameras with a touchscreen
69short get_touch_click_x()
70{
71        return *(short*)(0x258C+6);
72}
73
74short get_touch_click_y()
75{
76        return *(short*)(0x258C+8);
77}
Note: See TracBrowser for help on using the repository browser.