Two days after playing with the firmware, and I have to give a big thank you to
neszt and the people that made chdk possible.
My main issues with chdk for
sx20 (1.00f firmware):
a) menu, osd, grid and games were not displayed properly, fonts were too small. Grids and games also displayed only on the left hand side of the LCD.
b) AF lamp doesn't work anymore even if in the Canon menu it is enabled. As I see AF Lamp working when chdk is 'busy' (when starting up the camera, or when running some scripts, etc); I suspect is because is used as a status indicator and possibly not available for the camera.
Anyway, I came up with fix for a which I doubt it is perfect (it modifies the gui.c file also) - but was the only quick way I could figure out how to do it.
In file [tt]camera.h[/tt]:
a) locate the defines for
Sx20 (search for the string "[tt]#elif defined (CAMERA_sx20)[/tt]") and append, just before the defines for
sx1:
#undef CAM_USES_ASPECT_CORRECTION
#define CAM_USES_ASPECT_CORRECTION 1
#undef ASPECT_VIEWPORT_XCORRECTION
#define ASPECT_VIEWPORT_XCORRECTION(x) ( ((x)<<1) )
#undef ASPECT_GRID_XCORRECTION
#define ASPECT_GRID_XCORRECTION(x) ( (x) )
#undef ASPECT_GRID_YCORRECTION
#define ASPECT_GRID_YCORRECTION(y) ( (y) )
#undef GAMES_SCREEN_WIDTH
#define GAMES_SCREEN_WIDTH 360
#undef GAMES_SCREEN_HEIGHT
#define GAMES_SCREEN_HEIGHT 240
#undef ASPECT_GAMES_XCORRECTION
#define ASPECT_GAMES_XCORRECTION(x) ( ((x)<<1) )
#undef ASPECT_GAMES_YCORRECTION
#define ASPECT_GAMES_YCORRECTION(y) ( (y) )
#undef ASPECT_XCORRECTION
#define ASPECT_XCORRECTION(x) ( ((x)<<1) )
#undef ASPECT_YCORRECTION
#define ASPECT_YCORRECTION(y) ( (y) )
b) modify file [tt]gui.c[/tt] (the one in the
Sx20 git repository, not the one on chdk SVN repository):
The code below:
#if CAM_USES_ASPECT_CORRECTION //nandoide sept-2009
//the different modes arises because games are designed on a 360x240 basis and are difficult to downscale to 320x240
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, GAMES_SCREEN_WIDTH, GAMES_SCREEN_HEIGHT);
} else { //default
// draw_set_environment(NULL, NULL, SCREENX, SCREENY);
draw_set_environment(NULL, NULL, vid_get_bitmap_screen_width(), vid_get_bitmap_screen_height());
}
#endif
becomes:
#if CAM_USES_ASPECT_CORRECTION //nandoide sept-2009
//the different modes arises because games are designed on a 360x240 basis and are difficult to downscale to 320x240
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, GAMES_SCREEN_WIDTH, GAMES_SCREEN_HEIGHT);
} else { //default
// draw_set_environment(NULL, NULL, SCREENX, SCREENY);
// draw_set_environment(NULL, NULL, vid_get_bitmap_screen_width(), vid_get_bitmap_screen_height());
draw_set_environment(aspect_xcorrection_games_360, aspect_ycorrection_games_360, GAMES_SCREEN_WIDTH, GAMES_SCREEN_HEIGHT);
}
#endif
(basically, on the else clause: the line with draw_set_environment is commented and the one used for the games is added).
I could have replaced the whole ifdef with that single line, but this way the changes are more visible for the community.
I've tested and main menu, grids, menu and osd look correct now:
Now everything feels much more comfortable π