G11 porting - page 26 - DryOS Development - CHDK Forum

G11 porting

  • 530 Replies
  • 232979 Views
*

Offline ERR99

  • ****
  • 339
Re: G11 porting
« Reply #250 on: 12 / January / 2010, 15:24:34 »
Advertisements
A couple of suggestions :-
DEF(some_flag_for_af_scan, 0x72B4)   //found at ROM:FF965F34
DEF(movie_status, 0x6D58+0x38)      //ROM:FF96249C
Bingo! Addresses are correct.  :)
Now also AF-Scan during videomode works.

I also added the suggested recreview_hold value, but i dont know how to test it.
In which use-cases this variable should change his value?

Re: G11 porting
« Reply #251 on: 12 / January / 2010, 16:18:02 »
I am not able to test this but I guess you use the memory browser to monitor that location while you take a photo.

If you have set review hold to some value in the Canon menu then presumably that memory location changes while the camera is in review mode.

*

Offline ERR99

  • ****
  • 339
Re: G11 porting
« Reply #252 on: 12 / January / 2010, 17:02:03 »
Hmm, nope. I cant see any difference in the value (if i set previously review hold to "HOLD" or to some seconds) during review of the taken picture. It it still zero. I tried 0x7D00+0xD8, 0x7D00+0x10, 0x7D00+0x64. Only at 0x7D00+0x10 the value is changing to 1, but only if i press the shoot button half. Does not make much sense.

I also got no progress getting the void vid_bitmap_refresh() functional.
It is still without effect, it does not lead to a redraw of the canon gui, so all chdk menus are overlayed drawn.
I am using:
NHSTUB(RefreshPhysicalScreen, 0xFFA11130)
and
DEF(enabled_refresh_physical_screen, 0x98B4+0x28)
in vid_bitmap_refresh().

If i add a draw_clear(); call in my vid_bitmap_refresh() function, the complete OSD is cleared (including the canon OSD), so i know that my function get called. Is my function adress for RefreshPhysicalScreen or enabled_refresh_physical_screen wrong?

Re: G11 porting
« Reply #253 on: 12 / January / 2010, 19:27:55 »
NHSTUB(RefreshPhysicalScreen, 0xFFA11130)

Based on the SX200, that seems likely.

However, based on the IXUS200 it would be 0xFFA0FED8.

I have no idea if the IXUS200 is correct.

Maybe an IXUS200 user (or Radup) could confirm if the screen refreshes OK ?



*

Offline ERR99

  • ****
  • 339
Re: G11 porting
« Reply #254 on: 13 / January / 2010, 04:38:26 »
Okay, i also tried 0xFFA0FED8, but still no success.
I also tried the vid_bitmap_refresh() variants, found in other ports:
Code: [Select]
void vid_bitmap_refresh()
{
 extern int enabled_refresh_physical_screen;
 enabled_refresh_physical_screen=1;
 _RefreshPhysicalScreen(1);
}

Code: [Select]
void vid_bitmap_refresh()
{
 extern int enabled_refresh_physical_screen; // screen lock counter
 int old_val = enabled_refresh_physical_screen;
 if ( old_val == 0 )
 {
   _ScreenLock(); // make sure code is called at least once
 } else {
   enabled_refresh_physical_screen=1; // forces actual redraw
 }
 _RefreshPhysicalScreen(1); // unlock/refresh

 // restore original situation
 if ( old_val > 0 )
 {
   _ScreenLock();
   enabled_refresh_physical_screen = old_val;
 }
}
Code: [Select]
void vid_bitmap_refresh()
{
_ScreenLock();
    _RefreshPhysicalScreen(1);
}

But it was allways the same, screen refresh is not working.  :'(

Re: G11 porting
« Reply #255 on: 13 / January / 2010, 05:54:27 »
i also tried 0xFFA0FED8, but still no success.

You also need correct value of 'enabled_refresh_physical_screen'

As the IXUS200 seems to be working, maybe you could ask Radup how he found that value ?

*

Offline ERR99

  • ****
  • 339
Re: G11 porting
« Reply #256 on: 13 / January / 2010, 12:42:12 »
Correction: I think you are right with 0xFFA0FED8 for RefreshPhysicalScreen().
I did a closer look on the dissassembly, and i think i found a variable that looks like "enabled_refresh_physical_screen": 0x9840
I dont know if its 100% correct, but now the screen gets refreshed and i dont have anymore overlayed drawn CHDK menus.  :)

But there is now another problem: Sometimes at startup (if started in PLAY mode) at the point where normally the CHDK-Splash screen is shown, the camera crashes now with this assert message:
Code: [Select]
ASSERT!! FsIoNotify.c Line 451
Occured Time  2010:01:13 22:27:06
Task ID: 13828123
Task name: SpyTask
SP: 0x0038884C
StackDump:
0x00000000
0xFF86C8F8
0x000001C3
0x00000000
0x00000003
0x00000000
0x001772B2
0x19980218
0x19980218
0x19980218
0x19980218
0xFF86CA1C
0x00000000
0x001772B2
0x00000003
0x00000000
0x19980218
0xFF8359A0
0x4028DB80
0x003888B8
0x001772B2
0x19980218
0x19980218
0x00156F1C
0x00149A1F
0xFF816C5C
0xFF816C5C
0x000081FF
0x00000020
0x00000AC6
0x386D4380
0x4B4E4046
0x12C4925C
0x0000001A
0x0017E994
0x00000191
0x19980218
0x00141291
0x00372E40
0x19980218
0x19980218
0x19980218
0xFF816A20
0x19980218
0x19980218
0x00002008
ShootConDump:
0f 0f 0f 0f 0f 0f 0f 0f 0f 0f
CameraConDump:
07 0a 02 0f 0f 0f 0f 0f 0f 0f
00000090: *** Camera Log Start ***

00000100: SS:S-Imag

00000100: UI:ScreenLock

00000100: UI:ScreenUnLock

00000110: UI:Button:0x000010B4:WriteEnableMedia

00000110: UI:SetPanelDirectionToLcdController

00000130: UI:LogicalEvent:0x300a:adr:0,Para:0

00000130: UI:PB.Create

00000130: UI:DispSwCon_TurnOnBackLight

00000130: UI:TurnOnBackLight

00000210: UI:LogicalEvent:0x5001:adr:0,Para:0

00000250: UI:DispSwCon_MuteOffPhysicalScreen

00000250: UI:MuteOffPhysicalScreen

00000250: UI:LogicalEvent:0x3138:adr:0,Para:0

00000300: UI:ScreenLock

00000300: UI:ScreenUnLock

00000310: UI:LogicalEvent:0x112c:adr:0,Para:0

00000310: UI:SetPanelDirectionToLcdController

00000310: UI:LogicalEvent:0x5006:adr:0,Para:0

00000360: UI:ScreenLock

00000360: UI:ScreenUnLock

00000360: UI:SetPanelDirectionToLcdController

00000390: UI:PB.CreateE

00000400: UI:AC:StartPB

00000400: UI:DispSwCon_TurnOnDisplayDevice

00000400: UI:AC:EBtn

00000400: UI:PB.Start

00000400: UI:DSIC:46,0

00000440: UI:CC_CompFlhJpg

00000440: UI:_CompFlhJpg

00000440: UI:PB.Flash

00000440: UI:DSIC:46,0

00000440: UI:PB_LimiteActionOpenAndCloseLCD

00000450: UI:ScreenLock

00000450: UI:DSIC:46,0

00000720: UI:PB.DrawI

00000790: UI:LogicalEvent:0x320a:adr:0,Para:0

00000910: UI:LogicalEvent:0x3203:adr:0,Para:0

00000940: UI:PB.StartE

00000940: UI:PB.DPOF

00000940: UI:PB.IHist

00000950: UI:PB.DcdCBR

00000950: UI:ScreenLock

00000950: UI:PB.RfrsI

00000970: UI:ScreenLock

00000990: UI:ScreenUnLock

00000990: UI:SetPanelDirectionToLcdController

00001020: UI:LogicalEvent:0x3201:adr:0,Para:0

00001020: UI:DispSw: Unlock

00001020: UI:DispSwCon:Unlock

00001020: UI:DispSwCon_TurnOnBackLight

00001020: UI:DispSwCon_MuteOffPhysicalScreen

00001020: UI:MuteOffPhysicalScreen

00001020: UI:AC:EnryPB

00001020: UI:AP:ChkCnctUSB

So finding the correct sequence for  screen-refresh/update is still an open-point.
« Last Edit: 13 / January / 2010, 17:06:39 by ERR99 »

*

Offline ERR99

  • ****
  • 339
Re: G11 porting
« Reply #257 on: 13 / January / 2010, 17:11:55 »
An there is another thing: I think also a third propset.h is needed.
During my work to get the badpixel.lua script running, i discovered that at least this Props have changed:

"Old" propcase2.h defines, not working for G11:
Code: [Select]
#define PROPCASE_SHOOTING       206
#define PROPCASE_IS_FLASH_READY       208

G11 props that works:
Code: [Select]
#define PROPCASE_SHOOTING       208
#define PROPCASE_IS_FLASH_READY       210

Maybe there are more props changed, we will see...


Re: G11 porting
« Reply #258 on: 13 / January / 2010, 17:34:45 »
As a matter of interest, how do you create and capture the ASSERT output above ?

*

Offline ERR99

  • ****
  • 339
Re: G11 porting
« Reply #259 on: 13 / January / 2010, 18:15:55 »
Creation is easy, simply execute code that crashes the camera.  :haha
But before you do this, merge the romlog.patch from this thread into your build:
http://chdk.setepontos.com/index.php/topic,275.msg20888.html#msg20888

Then you have another option in the debug menu, which calls the FW function "GetLogToFile",
and this will do the job and creates a file in the root of your SD-Card with the assert/exception information of the last crash.

Of course you have to find the adress for GetLogToFile, but this is not hard. Search for the reference to "aLogIsNotSaved_ DCB "Log is not Saved.". In the G11 Firmware for example, it is this function: NHSTUB(GetLogToFile,0xFF96D104)
« Last Edit: 13 / January / 2010, 18:19:15 by ERR99 »

 

Related Topics