problems with firmware call to RefreshPhysicalScreen - DryOS Development - CHDK Forum  

problems with firmware call to RefreshPhysicalScreen

  • 3 Replies
  • 5902 Views
problems with firmware call to RefreshPhysicalScreen
« on: 22 / November / 2010, 20:20:41 »
Advertisements
Question :  What is the routine RefreshPhysicalScreen actually supposed to do ?  

I'm working on a SD940 port and am having trouble locating RefreshPhysicalScreen in the camera's firmware.  There have been a few posts over the last couple of years when others have run into the same problem. Various suggestions have appeared about nesting a call to ScreenLock and ScreenUnlock (easy to find in the SD940 firmware) along with the need to write a magic number (0x03) at location 0x1B2DC or maybe 0x9CF4.  None of this has helped.

So far, it looks to me like RefreshPhysicalScreen just clears whatever was previously written to the screen so a new menu can be drawn ?   If so, it seems it would be pretty easy to skip the call to the camera firmware and simply write a routine to clear each pixel - the code that displays the CHDK logo could serve as a prototype.

What else am I missing before I invest a few more nights working through that solution ?

« Last Edit: 22 / November / 2010, 20:27:24 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

Re: problems with firmware call to RefreshPhysicalScreen
« Reply #1 on: 24 / November / 2010, 20:47:34 »
Well,  here's a quick and dirty replacement for RefreshPhysicalScreen(), which is only called from  vid_bitmap_refresh() as it turns out.  Makes menus draw and clear properly but obviously does not deal with conflicts where the camera firmware writes to the screen while CHDK is also displaying information.
Code: [Select]
extern unsigned int screen_width, screen_height, screen_size;
extern void draw_filled_rect( int, int, int, int, int );

void vid_bitmap_refresh()
{
draw_filled_rect(0, 0, screen_width, screen_height, 0x00) ;
}

Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline pixeldoc2000

  • ****
  • 356
  • IXUS900Ti 1.00C, IXUS300HS 1.00D
    • pixel::doc homebase
Re: problems with firmware call to RefreshPhysicalScreen
« Reply #2 on: 01 / December / 2010, 18:37:02 »
Did you read http://chdk.setepontos.com/index.php?topic=5045.msg54841#msg54841 ?
This fix screen refresh issus on sx210 and sd4000.

Re: problems with firmware call to RefreshPhysicalScreen
« Reply #3 on: 01 / December / 2010, 23:08:15 »
Did you read http://chdk.setepontos.com/index.php?topic=5045.msg54841#msg54841 ?
This fix screen refresh issus on sx210 and sd4000.
Thanks - I did see that.  I haven't been able to find the correct addresses in my camera to make it work - and as the next post in that sequence suggests, it actually does not work properly in shot mode.  So it does not really do anything that my hacked routine doesn't do.  I'll keep looking into it.

EDIT :  Solved Feb 2011 by studying code for SD980 Beta - SD940 code for RefreshPhysicalScreen() in CHDK autobuild server now works correctly
« Last Edit: 23 / February / 2011, 20:23:01 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16


 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal