source: trunk/platform/ixus120_sd940/sub/100e/lib.c @ 1207

Revision 1207, 2.2 KB checked in by reyalp, 2 years ago (diff)

ixus120_sd940 correct vid_get_viewport_fb_d() from waterwingz in http://chdk.setepontos.com/index.php?topic=650.msg68988#msg68988

  • Property svn:eol-style set to native
Line 
1// IXUS120-SD940 fw 1.00e
2
3#include "platform.h"
4       
5long vid_get_bitmap_screen_width()             
6{               
7        return 360 ;                            // SD940 103c ?  360  103b:  seems to use same number.
8}               
9               
10long vid_get_bitmap_screen_height()             
11{               
12        return 240;                                     // SD940 103c 103b:  seems to use same number.
13}               
14               
15int vid_get_viewport_width()
16{
17        return 360 ;                                    // SD940 103c ?
18}
19
20long vid_get_viewport_height()         
21{               
22        return 240;                                     // SD940 103c 103b:  seems to use same number.
23}               
24
25long vid_get_bitmap_buffer_width()     
26{               
27        return 960;                                     // SD940 103c 103b:  seems to use same number.
28}               
29       
30long vid_get_bitmap_buffer_height()             
31{               
32        return 270;                                     // SD940 103c 103b:  seems to use same number.
33}               
34               
35char *camera_jpeg_count_str()           
36{               
37        return (char*) 0x700B0;         // SD940 103C search on "9999" 103b:  seems to use same number.
38}       
39
40char *hook_raw_image_addr()             
41{               
42    return (char*)0x4219D120;   // SD940 103c FFAD6FF8 from matching subroutine in S90 101a FFB0254C  103b:  seems to use same number.
43                                                                // ... search for aCrawBuffP      DCB "CRAW BUFF       %p",0
44}               
45               
46long hook_raw_size()           
47{               
48        return 0x11CA240;                       // SD940 103c Search for "aCrawBuffSizeP"  103b:  seems to use same number.
49
50}               
51               
52void *vid_get_bitmap_fb()               
53{               
54        return (void*)0x403F1000;       // SD940 103c @ FF8532DC after DispCon_ShowBlackChart 103b:  seems to use same number.
55}               
56       
57void *vid_get_viewport_live_fb()                    //103b:  seems to use same routine.
58{                                                                                                       // Matched IXUS100-SD780 100c code at 0xFF8B02F4 with IXUS120-SD940 at address 0xFF8D9014
59                                                                                                        // Matched IXUS200-SD980 101c code at 0xFF8E0788 with IXUS120-SD940 at address 0xFF8D9014
60        // return (void*) 0;                                                    // __LiveImage.c__  ok
61    void **fb=(void **)0x4B34;                                          // SD940 102C @ 0xFF8D9280 
62    unsigned char buff = *((unsigned char*)0x497C); // SD940 103C @ 0xFF8D9018
63    if (buff == 0) {
64        buff = 2;
65    }
66    else {
67        buff--;
68    }
69    return fb[buff];
70}
71               
72void *vid_get_viewport_fb()             
73{               
74        return (void*)0x4088B700;       // SD940 103c from matching subroutine in S90 101a 103b:  seems to use same number.
75                                                                // search on VRAM Address  sub @ 9FFAD4910)
76}               
77               
78void *vid_get_viewport_fb_d()           
79{               
80        return (void*)(*(int*)(0x2790+0x58));  //  @FF869DEC  @FF869E24
81}               
82                       
83       
84               
Note: See TracBrowser for help on using the repository browser.