| 1 | |
|---|
| 2 | #include "platform.h" |
|---|
| 3 | |
|---|
| 4 | char *hook_raw_image_addr() |
|---|
| 5 | { |
|---|
| 6 | /* SX10 |
|---|
| 7 | return (char*) (*(int*)(0x55CC+0x18) ? 0x424F1948 : 0x40F65B18); |
|---|
| 8 | end 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 | |
|---|
| 16 | long 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 | |
|---|
| 27 | void *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 | |
|---|
| 39 | void *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 | |
|---|
| 44 | void *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 | |
|---|
| 49 | void *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 | |
|---|
| 55 | long vid_get_bitmap_screen_width() |
|---|
| 56 | { |
|---|
| 57 | return 360; |
|---|
| 58 | } |
|---|
| 59 | |
|---|
| 60 | long vid_get_bitmap_screen_height() |
|---|
| 61 | { |
|---|
| 62 | return 240; |
|---|
| 63 | } |
|---|
| 64 | |
|---|
| 65 | long vid_get_viewport_height() |
|---|
| 66 | { |
|---|
| 67 | return 240; |
|---|
| 68 | } |
|---|
| 69 | char *camera_jpeg_count_str() |
|---|
| 70 | { |
|---|
| 71 | // Found at ROM:FFD84BC0 |
|---|
| 72 | return (void*)0x45E58; |
|---|
| 73 | } |
|---|
| 74 | |
|---|
| 75 | long vid_get_bitmap_buffer_width() { return 360; } |
|---|
| 76 | |
|---|
| 77 | long vid_get_bitmap_buffer_height() { return 240; } |
|---|