1 #include "platform.h" 2 3 char *hook_raw_image_addr() 4 { 5 // Found at ROM:FFA11E84 6 // Search for aCrawBuffP and search backwards for the second printf argument 7 // ROM:FFA11E84 LDR R6, =0x1163B8E0 8 // ..... 9 // ROM:FFA11ED4 MOV R1, R6 10 // ROM:FFA11ED8 ADR R0, aCrawBuffP @ "CRAW BUFF %p" 11 // ROM:FFA11EDC BL sub_FFA13590 12 13 return (char*)0x1163B8E0; 14 } 15 16 void *vid_get_viewport_live_fb() 17 { 18 // Deprecated, still exists for historical reasons. 19 // Should return null pointer. 20 21 return (void*)0x0; 22 /* void **fb=(void **)0x10D29360; 23 unsigned char buff = *((unsigned char*)0x218C); 24 if (buff == 0) { 25 buff = 2; 26 } 27 else { 28 buff--; 29 } 30 return fb[buff * 0x7E900];*/ 31 } 32 33 void *vid_get_bitmap_fb() 34 { 35 // Found at ROM:FF912380 36 // Search for BmpDDev.c 37 38 return (void*)0x10361000; 39 } 40 41 void *vid_get_viewport_fb() 42 { 43 // Found at ROM:FFA103D8 44 // Search for aVramAddressP 45 // ROM:FFA103D8 LDR R1, =0x10D29360 46 // ROM:FFA103DC LDR R0, =0x7E900 47 // ROM:FFA103E0 STR R1, [R4] 48 // ROM:FFA103E4 STR R0, [R4,#4] 49 // ROM:FFA103E8 ADR R0, aVramAddressP @ "VRAM Address : %p\r" 50 51 return (void*)0x10D29360; 52 } 53 54 void *vid_get_viewport_fb_d() 55 { 56 // Found in sub_FF85B3FC (unsure, seems to do the same as this function) 57 // Search for aImageplayer_c to get at least the base value (0x56D8) 58 // ROM:FF85B3FC LDR R0, =0x56D8 59 // ROM:FF85B400 LDR R0, [R0,#0x4C] 60 // ROM:FF85B404 BX LR 61 62 return (void*)(*(int*)0x5724); // 0x56D8 + 0x4C 63 } 64 65 66 long vid_get_viewport_height() 67 { 68 return 240; 69 } 70 71 char *camera_jpeg_count_str() 72 { 73 // Found at ROM:FF9BE548. 74 // Search for a9999 75 // ROM:FF9BE548 LDR R0, =0x58304 76 // ROM:FF9BE54C ADR R1, a9999 @ "9999" 77 // ROM:FF9BE550 BL sprintf 78 79 return (char*)0x58304; 80 } 81