Uuuh...since I'm not sure... the A540's base ROM address is 0xFFC00000, right ?
Fact is, the last program I used one can call a
disassembler was running under MSDOS, and targeted 386 CPUs.
So, I've done a little cross-check between three "sub/xxxx/lib.c" files, namely :
- your A540 sub100b, from your live view port.
- the A540 sub 100b "lib.c" from trunk 1672 .
- the A430 sub 100b "lib.c" from trunk 1672 as well.
The main diff I noticed (apart from the platforms offsets, of course), is at the very end of your file :
// PTP display stuff
int vid_get_palette_type() { return 1; }
int vid_get_palette_size() { return 16*4; }
void *vid_get_bitmap_active_palette() {
return (void *)0x634E0; // GetPaletteFromPhysicalScreen
}
void *vid_get_bitmap_active_buffer()
{
return (void*)(*(int*)0x5ED0); // FFD23420 DisplayPhysicalScreenWithYUVPalette
}
Ask me to do some complicated
hardware reverse engineering: fine, I've done it on a regular basis for the last 15 years or so...
Now, I'm so rusty at
software reverse engineering I don't even know how to search a runtime ref to a hard-coded string with IDA.
Anyway, that was just to state my current disasm skills... moldy
Looking at the last two functions in your code, I obviously need to find the bitmap's
palette and
raster indices map offsets.
To do so, I have to locate any usage references about "GetPaletteFromPhysicalScreen" and "DisplayPhysicalScreenWithYUVPalette"...
but DisplayPhysicalScreenWithYUVPalette doesn't even appear in the A540 dump ! I've run it through IDA: nothing ! Where did you find it
reyalp ?