1 #include "platform.h" 2 3 char *hook_raw_image_addr() 4 { 5 return (char*)0x10A87B58; //ixus40 value seems ok 6 } 7 8 // buffer of live picture when shoot button is not pressed 9 void *vid_get_viewport_live_fb() 10 { 11 //there seem to be 3 buffers: 12 //pointer -> buffer 13 //0x52E4 -> 0x109CBD20 14 //0x52F0 -> 0x10A6A760 15 //0x52FC -> 0x10B02560 16 //above buffer _addresses_ are the same in ixus30, ixus40 17 18 //suspicious code @ff8a4250, it's kind of like @ffc8e724 in A410... 19 void **fb=(void **)0x3204; //@ff8a4254 20 unsigned char buff = *((unsigned char*)0x3214); //@ff8a4250 21 if (buff == 0) { 22 buff = 2; 23 } 24 else { 25 buff--; 26 } 27 return fb[buff]; 28 //above is experimental, the following works for sure 29 //return (void*)0x10B02560; 30 } 31 32 /** 33 * OSD screen 34 */ 35 void *vid_get_bitmap_fb() 36 { 37 /* 38 @6b6b0 108ceb20 @8e2ac? @afb88 @b187c 39 @6b6b4 108E3CA0 (108ceb20+(360*240)) @afb8c 40 */ 41 return (void*) 0x108CEB20; //@ff9279d0, same as in ixus40 42 //return (void*) *(long*) (*(int*)0x6b6d0 == 1)?0x6b6b0:0x6b6b4; //experiment... no go...inspired by routine @ff96862c 43 } 44 45 /** 46 * IMG viewport in 'rec' mode 47 */ 48 // buffer of live picture when shoot button is (half-)pressed. 49 void *vid_get_viewport_fb() 50 { 51 return (void*)0x10B02560; //todo 52 } 53 54 /** 55 * IMG viewport in 'play' mode 56 */ 57 // buffer of picture in play mode 58 void *vid_get_viewport_fb_d() 59 { 60 //return (void*)(*(int*)0x66820); //not really good either... 61 return (void*)0x109CBD20; //sort of works... 62 //return (void*)0x10a6a760; // 63 //return (void*)0x112fc960; //the last full view of the picture, not affected by zoom (!) 64 } 65 66 long vid_get_viewport_height() 67 { 68 /* 69 In replay mode, the viewport height is: 70 576 pixel (PAL output setting, TV-out in use) 71 480 pixel (NTSC output setting, TV-out in use) 72 240 pixel (no tv-out) 73 In rec mode, it's really only 240... 74 In 640x480 movie mode, the viewport is 720x480 75 Conclusion: expect correct results only when the height is 240 76 */ 77 // return ((mode_get()&MODE_MASK) == MODE_PLAY)?576:240; 78 return 240; 79 } 80 81 int vid_get_viewport_width() //in both rec and play modes, 352 while tv-out is active 82 { 83 return 360; 84 } 85 86 char *camera_jpeg_count_str() 87 { 88 return "0000"; //TODO 89 }