SX200is Porting - page 43 - DryOS Development - CHDK Forum

SX200is Porting

  • 1105 Replies
  • 575956 Views
*

Offline reyalp

  • ******
  • 14128
Re: SX200is Porting
« Reply #420 on: 24 / September / 2009, 01:06:34 »
Advertisements
How about  ASPECT_GRID_XCORRECTION(x) ?

The code that uses this macro is patched by CAM_USES_ASPECT_CORRECTION, but well, it's more clean than default values are left as ((x)), that implies no correction.
Maybe it would make more sense to not define these at all if you aren't using CAM_USES_ASPECT_CORRECTION. That way you'll get an error if you don't think about what the values should be ?
Don't forget what the H stands for.

Re: SX200is Porting
« Reply #421 on: 24 / September / 2009, 01:09:25 »
How about  ASPECT_GRID_XCORRECTION(x) ?
Hallo
I have tested this:
Code: [Select]
#define ASPECT_GRID_XCORRECTION(x) ( ((x) )
And it shows the Grid in right Aspect.
Smartkiller
SX200 IS Firm. 100c
SX1 IS Firm. 201a

Re: SX200is Porting
« Reply #422 on: 24 / September / 2009, 01:22:13 »
I have uploaded 2 new Full Builds with the last changes to Drop io.

Firmware 100d Users must test him.

Smartkiller
SX200 IS Firm. 100c
SX1 IS Firm. 201a

*

Offline reyalp

  • ******
  • 14128
Re: SX200is Porting
« Reply #423 on: 24 / September / 2009, 02:10:30 »
In core/gui.c is verified that canon_menu_active actually behaves differently on sx200 in
Code: [Select]
#if !CAM_SHOW_OSD_IN_SHOOT_MENU
    #if defined (CAMERA_sx200is)
      if (!(conf.show_osd) || (canon_menu_active>0) || (canon_shoot_menu_active>0))  return;
    #else
      if (!(conf.show_osd && (canon_menu_active==(int)&canon_menu_active-4) && (canon_shoot_menu_active==0)))  return;    
    #endif
#else
?

edit:
There's also
Code: [Select]
    if (gui_mode == GUI_MODE_REVERSI || gui_mode == GUI_MODE_SOKOBAN || gui_mode == GUI_MODE_4WINS || gui_mode == GUI_MODE_MASTERMIND) {
      draw_set_environment(aspect_xcorrection_games_360, aspect_ycorrection_games_360, SCREENGAMESX, SCREENGAMESY);
   } else { //default
      draw_set_environment(NULL, NULL, SCREENX, SCREENY);
   }
In addition to setting in each games gui_draw_* function. Is this really needed ?
« Last Edit: 24 / September / 2009, 02:31:31 by reyalp »
Don't forget what the H stands for.

*

Offline ihar

  • **
  • 55
Re: SX200is Porting
« Reply #424 on: 24 / September / 2009, 02:45:16 »
In core/gui.c is verified that canon_menu_active actually behaves differently on sx200 in
Code: [Select]
#if !CAM_SHOW_OSD_IN_SHOOT_MENU
    #if defined (CAMERA_sx200is)
      if (!(conf.show_osd) || (canon_menu_active>0) || (canon_shoot_menu_active>0))  return;
    #else
      if (!(conf.show_osd && (canon_menu_active==(int)&canon_menu_active-4) && (canon_shoot_menu_active==0)))  return;    
    #endif
#else


Hi
Code: [Select]
!(canon_menu_active==(int)&canon_menu_active-4) "==" (canon_menu_active>0)
!(canon_shoot_menu_active==0) "==" (canon_shoot_menu_active>0) = true

but
in sx200is
if (!(conf.show_osd) || (canon_menu_active>0) || (canon_shoot_menu_active>0))  return; //worked correct
if (!(conf.show_osd && (canon_menu_active==(int)&canon_menu_active-4) && (canon_shoot_menu_active==0))) return; //worked incorrect


I do not know why but if to change globally old condition on new it should not affect other chambers
It would be possible to leave simply
Code: [Select]
if (!(conf.show_osd) || (canon_menu_active>0) || (canon_shoot_menu_active>0))  return;

*

Offline reyalp

  • ******
  • 14128
Re: SX200is Porting
« Reply #425 on: 24 / September / 2009, 02:54:28 »
I do not know why but if to change globally old condition on new it should not affect other chambers
It would be possible to leave simply
Code: [Select]
if (!(conf.show_osd) || (canon_menu_active>0) || (canon_shoot_menu_active>0))  return;
I'm asking if the code for sx200 has been verified to be correct. On other cameras >0 is not correct.
Don't forget what the H stands for.

Re: SX200is Porting
« Reply #426 on: 24 / September / 2009, 03:11:10 »
edit:
There's also
Code: [Select]
    if (gui_mode == GUI_MODE_REVERSI || gui_mode == GUI_MODE_SOKOBAN || gui_mode == GUI_MODE_4WINS || gui_mode == GUI_MODE_MASTERMIND) {
      draw_set_environment(aspect_xcorrection_games_360, aspect_ycorrection_games_360, SCREENGAMESX, SCREENGAMESY);
   } else { //default
      draw_set_environment(NULL, NULL, SCREENX, SCREENY);
   }
In addition to setting in each games gui_draw_* function. Is this really needed ?

Yes, it's needed.

*

Offline ihar

  • **
  • 55
Re: SX200is Porting
« Reply #427 on: 24 / September / 2009, 03:27:09 »
Then it is necessary to leave as is
Code: [Select]
#if !CAM_SHOW_OSD_IN_SHOOT_MENU
    #if defined (CAMERA_sx200is)
      if (!(conf.show_osd) || (canon_menu_active>0) || (canon_shoot_menu_active>0))  return;
    #else
      if (!(conf.show_osd && (canon_menu_active==(int)&canon_menu_active-4) && (canon_shoot_menu_active==0)))  return;   
    #endif
#else

Re: SX200is Porting
« Reply #428 on: 24 / September / 2009, 03:36:24 »
Regarding edgeoverlay.c I found the bug that displays ghost old edges when a new painting of edges is done. It's a typo error that's yet in previous trunks (I hope so). It's a very little modification:

Is just the final else previous the last draw_pixel, it's x+1 nor x in draw_get_pixel.

else if( need_redraw || (draw_get_pixel(ASPECT_VIEWPORT_XCORRECTION(x+1),y+EDGE_HMARGIN) == conf.edge_overlay_color) )

*

Offline ADamb

  • **
  • 65
  • sx200is
Re: SX200is Porting
« Reply #429 on: 24 / September / 2009, 05:53:48 »
Could someone fix
Debug->
ALT +/- debug act   [CmpProp]

On "DISP." in <ALT> mode it should show changes in PROPS,
but it flashes so fast, that it is unreadable.(gui.c, gui_compare_props)...
SX200 IS-100C

 

Related Topics


SimplePortal © 2008-2014, SimplePortal