OK I have a problem.
Got back to this port (day job gets in the way).
I'm stuck with the vid addresses in lib.c, what I have so far gives a scrambled splash and setting the OSD Debug option crashes.
Can anyone see where I',m going wrong?
Any help would be greatly appreciated as I've checked through this dozens of times now.
#include "platform.h"
/*
*********************
SX200IS
**********************
*/
/*
char *hook_raw_image_addr()
{
//found at FFAC8D10
//ROM:FFAC8D10 LDR R6, =0x424B41C0
//...
//ROM:FFAC8D60 MOV R1, R6
//ROM:FFAC8D64 ADR R0, aCrawBuffP ; "CRAW BUFF %p"
return (char*)(0x424B41C0);
// 2bd0 + c found at FF864C70
//return (char*) (*(int*)(0x2BD0+0xC) ? 0x11A34C40 : 0x10805040);
}
long hook_raw_size()
{
//found at FFAC8D6C
//ROM:FFAC8D6C LDR R1, =0x11CA240
//ROM:FFAC8D70 ADR R0, aCrawBuffSizeP ; "CRAW BUFF SIZE %p"
//ROM:FFAC8D74 BL sub_FF9037E8
return 0x11CA240;
}
*/
char *hook_raw_image_addr()
{
return (char*)(0x0);
}
long hook_raw_size()
{
return 0x0;
}
void *vid_get_viewport_live_fb()
{
void **fb=(void **)0xFF14; // 0xFF14 or 0x2150 ????
unsigned char buff = *((unsigned char*)0x1FD8); // found at FF838090
if (buff == 0) buff = 2; else buff--;
return fb[buff];
}
void *vid_get_bitmap_fb()
{
return (void*)0x403F1000; // found at FF842AC4
}
void *vid_get_viewport_fb()
{
return (void*)0x415F9E20; // found at FF858F80
}
void *vid_get_viewport_fb_d()
{
return (void*)(*(int*)(0x2950+0x50)); // found at FF858EB8 + FF859398
}
long vid_get_bitmap_screen_width()
{
return 360;
}
long vid_get_bitmap_screen_height()
{
return 240;
}
long vid_get_viewport_height()
{
return 240;
}
char *camera_jpeg_count_str()
{
return (void*)0x5408C; // found at FF9C1F28
}
long vid_get_bitmap_buffer_width() { return 360; }
long vid_get_bitmap_buffer_height() { return 240; }
Thanks to all.
OldGit