source: branches/reyalp-ptp-live/platform/a590/sub/101b/lib.c @ 1837

Revision 1837, 1.9 KB checked in by reyalp, 13 months ago (diff)

consolidate vid_get_max_* and vid_get_logical_* into vid_get_fullscreen_*

  • Property svn:eol-style set to native
Line 
1#include "platform.h"
2
3void *hook_raw_fptr()
4{
5    return (void*)0;
6}
7
8void *hook_raw_ret_addr()
9{
10    return (void*)0;
11}
12
13char *hook_raw_image_addr()
14{
15    return (char*)0x10F63920; //found at 0xFFD987A8
16}
17
18long hook_raw_size()
19{
20    return 0x9DCCE0;
21}
22
23void *vid_get_viewport_live_fb()
24{
25//    return (void*)0;//0x10670ee0;
26    void **fb=(void **)0x2168;
27    unsigned char buff = *((unsigned char*)0x1FE8); //0x1fe8 found at 0xFFC294D
28    if (buff == 0) {
29        buff = 2;
30    }
31    else {
32        buff--;
33    }
34    return fb[buff];
35}
36
37void *vid_get_bitmap_fb()  //OSD buffer     
38{
39    return (void*)0x10361000; //found at FFDC0F84
40}
41
42void *vid_get_viewport_fb()
43{
44         return (void*)0x10659E80; // same as 100e, search on constant
45
46}
47
48void *vid_get_viewport_fb_d()
49{
50    //return (void*)(*(int*)0x5228);  // same as 100e, eg FFC44B58
51        // http://chdk.setepontos.com/index.php/topic,2361.msg27125.html#msg27125
52        // sub_FFC45328
53        return (void*)(*(int*)(0x520C+0x4C));  //0x5258
54}
55
56long vid_get_viewport_height()
57{
58    return 240;
59}
60char *camera_jpeg_count_str()
61{
62    return (char*)0x49344; // same as 100e, found @ FFD727B0
63}
64
65// PTP display stuff
66// TODO type reportedly wrong
67int vid_get_palette_type() { return 1; }
68int vid_get_palette_size() { return 16*4; }
69
70void *vid_get_bitmap_active_palette() {
71    return (void *)0x3D518; // GetPaletteFromPhysicalScreen
72}
73
74void *vid_get_bitmap_active_buffer()
75{
76    return (void*)(*(int*)0x761C); // DisplayPhysicalScreenWithYUVPalette
77}
78
79// values from chdkcam patch
80// commented for now, protocol changes needed to handle correctly
81// note, play mode may be 704, needs to be tested
82#if 0
83int vid_get_viewport_width_proper() {
84    return ((mode_get()&MODE_MASK) == MODE_PLAY)?720:*(int*)0x2138; // VRAM DataSize  -> sub_FFC2A77C
85}
86int vid_get_viewport_height_proper() {
87     return ((mode_get()&MODE_MASK) == MODE_PLAY)?240:*(int*)(0x2138+4); // VRAM DataSize -> sub_FFC2A78
88}
89#endif
90
Note: See TracBrowser for help on using the repository browser.