Changeset 1922
- Timestamp:
- 06/19/12 03:46:25 (11 months ago)
- Location:
- branches/release-1_0
- Files:
-
- 6 edited
-
core/gui.c (modified) (2 diffs)
-
core/gui_calendar.c (modified) (1 diff)
-
core/gui_draw.h (modified) (1 diff)
-
platform/a3300/kbd.c (modified) (5 diffs)
-
platform/a3300/lib.c (modified) (1 diff)
-
platform/a3300/platform_camera.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/release-1_0/core/gui.c
r1917 r1922 85 85 // KEY_DISPLAY is used for gui_subj_dist_override_koef_enum; 86 86 // KEY_LEFT/KEY_RIGHT is used for gui_subj_dist_override_value_enum (because of no separate ZOOM_IN/OUT) 87 88 #elif defined(CAMERA_a3300) // a3300 has no erase button, so make DISP button the toggle_raw and Alt +/- shortcuts. 89 //Alt mode 90 // NOTE both of these conflict with adjustable alt 91 #define SHORTCUT_TOGGLE_RAW KEY_DISPLAY 92 #define SHORTCUT_MF_TOGGLE KEY_FACE 93 //Half press shoot button 94 #define SHORTCUT_TOGGLE_HISTO KEY_UP 95 #define SHORTCUT_TOGGLE_ZEBRA KEY_DOWN 96 #define SHORTCUT_TOGGLE_OSD KEY_RIGHT 97 #define SHORTCUT_DISABLE_OVERRIDES KEY_LEFT 98 //Alt mode & Manual mode 99 #define SHORTCUT_SET_INFINITY KEY_UP 100 #define SHORTCUT_SET_HYPERFOCAL KEY_DOWN 87 101 88 102 #elif !CAM_HAS_ERASE_BUTTON … … 1506 1520 static const char* names[]={ "Print", "ISO"}; 1507 1521 static const int keys[]={ KEY_PRINT, KEY_ISO }; 1522 #elif defined(CAMERA_a3300) 1523 static const char* names[]={ "Print", "Face", "Disp"}; 1524 static const int keys[]={ KEY_PRINT, KEY_FACE, KEY_DISPLAY }; 1508 1525 #elif defined(CAMERA_sx100is) || defined(CAMERA_sx110is) 1509 1526 static const char* names[]={ "Print", "Face"}; -
branches/release-1_0/core/gui_calendar.c
r1338 r1922 13 13 #define TITLE_COLOR (MAKE_COLOR(COLOR_BLACK, COLOR_WHITE)) 14 14 #define CALENDAR_COLOR (MAKE_COLOR(COLOR_GREY, COLOR_WHITE)) 15 #define WEEKEND_COLOR (MAKE_COLOR( 0x6E, COLOR_RED))15 #define WEEKEND_COLOR (MAKE_COLOR(COLOR_YELLOW, COLOR_RED)) 16 16 17 17 //------------------------------------------------------------------- -
branches/release-1_0/core/gui_draw.h
r1888 r1922 736 736 // Used by :- A3300IS 737 737 738 #define COLOR_TRANS 0x4C 739 #define COLOR_WHITE 0x01 740 #define COLOR_RED 0x6C 741 #define COLOR_GREY 0x1D 742 #define COLOR_GREEN 0x5A 743 #define COLOR_BLUE_LT 0x58 744 #define COLOR_BLUE 0x6D 745 #define COLOR_YELLOW 0x51 746 #define COLOR_BG COLOR_TRANS 747 #define COLOR_FG COLOR_WHITE 748 #define COLOR_SELECTED_BG COLOR_RED 749 #define COLOR_SELECTED_FG COLOR_WHITE 750 #define COLOR_ALT_BG COLOR_TRANS 751 #define COLOR_SPLASH_RED COLOR_RED 752 #define COLOR_SPLASH_PINK COLOR_YELLOW 753 #define COLOR_SPLASH_GREY COLOR_GREY 754 #define COLOR_HISTO_R COLOR_RED 755 #define COLOR_HISTO_R_PLAY 0x9F 756 #define COLOR_HISTO_B COLOR_BLUE 757 #define COLOR_HISTO_G COLOR_GREEN 758 #define COLOR_HISTO_G_PLAY 0xA0 759 #define COLOR_HISTO_BG COLOR_BLUE_LT 760 #define COLOR_HISTO_RG COLOR_YELLOW 761 #define COLOR_HISTO_RB 0x66 762 #define COLOR_HISTO_RB_PLAY 0x9F 763 #define COLOR_HISTO_B_PLAY 0xA1 764 #define COLOR_HISTO_BG_PLAY 0xA0 765 #define COLOR_HISTO_RG_PLAY 0x9F 766 #undef SCREEN_COLOR 767 #define SCREEN_COLOR 0x4C 768 769 // Icon colors 770 // 3 shades of Red, Green, Yellow and Grey 771 // Separate definitions for record and playback mode 772 // to cater for cameras with variable palettes 773 #define COLOR_ICON_REC_RED COLOR_RED 774 #define COLOR_ICON_REC_RED_DK COLOR_RED 775 #define COLOR_ICON_REC_RED_LT COLOR_RED 776 #define COLOR_ICON_REC_GREEN 0x90 777 #define COLOR_ICON_REC_GREEN_DK COLOR_GREEN 778 #define COLOR_ICON_REC_GREEN_LT 0x50 779 #define COLOR_ICON_REC_YELLOW 0x6B 780 #define COLOR_ICON_REC_YELLOW_DK COLOR_YELLOW 781 #define COLOR_ICON_REC_YELLOW_LT 0x6B 782 #define COLOR_ICON_REC_GREY COLOR_GREY 783 #define COLOR_ICON_REC_GREY_DK COLOR_GREY 784 #define COLOR_ICON_REC_GREY_LT 0x13 785 #define COLOR_ICON_PLY_RED 0x9F 786 #define COLOR_ICON_PLY_RED_DK 0x9F 787 #define COLOR_ICON_PLY_RED_LT 0x9F 788 #define COLOR_ICON_PLY_GREEN 0xA0 789 #define COLOR_ICON_PLY_GREEN_DK 0xA0 790 #define COLOR_ICON_PLY_GREEN_LT 0x9E 791 #define COLOR_ICON_PLY_YELLOW 0x92 792 #define COLOR_ICON_PLY_YELLOW_DK 0x92 793 #define COLOR_ICON_PLY_YELLOW_LT 0x90 794 #define COLOR_ICON_PLY_GREY COLOR_ICON_REC_GREY 795 #define COLOR_ICON_PLY_GREY_DK COLOR_ICON_REC_GREY_DK 796 #define COLOR_ICON_PLY_GREY_LT COLOR_ICON_REC_GREY_LT 738 // Default Canon colors that are the same in record and play modes 739 #define COLOR_WHITE 0x01 740 #define COLOR_GREY_DK 0x1C 741 #define COLOR_GREY 0x10 742 #define COLOR_GREY_LT 0x08 743 #undef SCREEN_COLOR 744 #define SCREEN_COLOR 0x1C 745 746 #ifdef CHDK_COLOR_BASE 747 // CHDK colors loaded into these locations in the camera palette by load_chdk_palette() 748 #define COLOR_RED 0x1E // use Canon's red else get white behind startup spalsh 749 #define COLOR_RED_DK (CHDK_COLOR_BASE+1) 750 #define COLOR_RED_LT (CHDK_COLOR_BASE+2) 751 #define COLOR_GREEN (CHDK_COLOR_BASE+3) 752 #define COLOR_GREEN_DK (CHDK_COLOR_BASE+4) 753 #define COLOR_GREEN_LT (CHDK_COLOR_BASE+5) 754 #define COLOR_BLUE (CHDK_COLOR_BASE+6) 755 #define COLOR_BLUE_DK (CHDK_COLOR_BASE+7) 756 #define COLOR_BLUE_LT (CHDK_COLOR_BASE+8) 757 #define COLOR_MAGENTA (CHDK_COLOR_BASE+9) 758 #define COLOR_YELLOW (CHDK_COLOR_BASE+10) 759 #define COLOR_YELLOW_DK (CHDK_COLOR_BASE+11) 760 #define COLOR_YELLOW_LT (CHDK_COLOR_BASE+12) 761 #else 762 #define COLOR_RED_LT 0x1E 763 #define COLOR_RED 0x1E 764 #define COLOR_RED_DK 0x1E 765 #define COLOR_GREEN_LT 0x0E 766 #define COLOR_GREEN 0x0E 767 #define COLOR_GREEN_DK 0x0E 768 #define COLOR_BLUE_LT 0x14 769 #define COLOR_BLUE 0x14 770 #define COLOR_BLUE_DK 0x14 771 #define COLOR_YELLOW_LT 0x08 772 #define COLOR_YELLOW 0x08 773 #define COLOR_YELLOW_DK 0x08 774 #endif // CHDK_COLOR_BASE 775 776 #define COLOR_BG COLOR_GREY 777 #define COLOR_FG COLOR_WHITE 778 #define COLOR_SELECTED_BG COLOR_GREY_DK 779 #define COLOR_SELECTED_FG COLOR_WHITE 780 #define COLOR_ALT_BG COLOR_BG 781 782 #define COLOR_SPLASH_RED COLOR_RED 783 #define COLOR_SPLASH_PINK COLOR_RED 784 #define COLOR_SPLASH_GREY COLOR_GREY 785 786 #define COLOR_HISTO_R COLOR_RED 787 #define COLOR_HISTO_R_PLAY COLOR_RED 788 #define COLOR_HISTO_B COLOR_BLUE 789 #define COLOR_HISTO_B_PLAY COLOR_BLUE 790 #define COLOR_HISTO_G COLOR_GREEN 791 #define COLOR_HISTO_G_PLAY COLOR_GREEN 792 #define COLOR_HISTO_BG COLOR_BLUE 793 #define COLOR_HISTO_BG_PLAY COLOR_BLUE 794 #define COLOR_HISTO_RG COLOR_YELLOW 795 #define COLOR_HISTO_RG_PLAY COLOR_YELLOW 796 #define COLOR_HISTO_RB COLOR_RED 797 #define COLOR_HISTO_RB_PLAY COLOR_RED 798 799 // Icon colors 800 // 3 shades of Red, Green, Yellow and Grey 801 // Separate definitions for record and playback mode 802 // to cater for cameras with variable palettes 803 #define COLOR_ICON_REC_RED COLOR_RED 804 #define COLOR_ICON_REC_RED_DK COLOR_RED_DK 805 #define COLOR_ICON_REC_RED_LT COLOR_RED_LT 806 #define COLOR_ICON_REC_GREEN COLOR_GREEN 807 #define COLOR_ICON_REC_GREEN_DK COLOR_GREEN_DK 808 #define COLOR_ICON_REC_GREEN_LT COLOR_GREEN_LT 809 #define COLOR_ICON_REC_YELLOW COLOR_YELLOW 810 #define COLOR_ICON_REC_YELLOW_DK COLOR_YELLOW_DK 811 #define COLOR_ICON_REC_YELLOW_LT COLOR_YELLOW_LT 812 #define COLOR_ICON_REC_GREY COLOR_GREY 813 #define COLOR_ICON_REC_GREY_DK COLOR_GREY_DK 814 #define COLOR_ICON_REC_GREY_LT COLOR_GREY_LT 815 // 797 816 798 817 #else 799 818 #error CAM_BITMAP_PALETTE not defined 800 #endif 819 #endif // CAM_BITMAP_PALETTE 801 820 802 821 // Define default icon colors if not already defined above -
branches/release-1_0/platform/a3300/kbd.c
r1617 r1922 10 10 long canonkey; 11 11 } KeyMap; 12 13 // button and mode dial codes 14 // physw [0] 15 #define BTN_Play (0x00002000) 16 17 // physw [2] 18 #define BTN_Up (0x00000001) 19 #define BTN_Down (0x00000002) 20 #define BTN_Left (0x00000004) 21 #define BTN_Right (0x00000008) 22 #define BTN_Set (0x00000010) 23 #define BTN_Disp (0x00000020) 24 #define BTN_Face (0x00000040) 25 #define BTN_Menu (0x00000080) 26 27 // the MODE dial is in Gray code 28 // the following are informational, not used 29 /* 30 #define DIAL_Movie (0x00000600) 31 #define DIAL_Discreet (0x00000200) 32 #define DIAL_FishEye (0x00000000) 33 #define DIAL_Scene (0x00000100) 34 #define DIAL_Easy (0x00000300) 35 #define DIAL_Auto (0x00000700) 36 #define DIAL_Live (0x00000500) 37 #define DIAL_Program (0x00000400) 38 */ 39 40 #define BTN_ShootHalf (0x00001000) 41 #define BTN_ShootFull (0x00002000) 42 #define BTN_ZoomWide (0x00004000) 43 #define BTN_ZoomTele (0x00008000) 44 45 12 46 13 47 static long kbd_new_state[3]; … … 18 52 static int remote_key, remote_count; 19 53 static int shoot_counter=0; 20 static long alt_mode_key_mask = 0x00000030; // disp + set21 54 extern void _GetKbdState(long*); 22 55 … … 24 57 25 58 // override key and feather bits to avoid feather osd messing up chdk display in ALT mode 26 #define KEYS_MASK0 ( 0x00000000)59 #define KEYS_MASK0 (BTN_Play) 27 60 #define KEYS_MASK1 (0x00000000) 28 #define KEYS_MASK2 (0x0000F0BF) //set to avoid canon menu being effected while in Alt mode 29 61 #define KEYS_MASK2 ( \ 62 BTN_Up |\ 63 BTN_Down |\ 64 BTN_Left |\ 65 BTN_Right |\ 66 BTN_Set |\ 67 BTN_Disp |\ 68 BTN_Face |\ 69 BTN_Menu |\ 70 BTN_ShootHalf |\ 71 BTN_ShootFull |\ 72 BTN_ZoomWide |\ 73 BTN_ZoomTele \ 74 ) 75 30 76 #define LED_AF 0xC02200F4 31 77 #define NEW_SS (0x2000) … … 42 88 43 89 static KeyMap keymap[] = { 44 45 { 2, KEY_SHOOT_FULL , 0x00003000}, // Found @0xffb5dc9c, levent 0x0146 { 2, KEY_SHOOT_ FULL_ONLY ,0x00002000 }, // Found @0xffb5dc9c, levent 0x0147 { 2, KEY_ UP ,0x00000001 }, // Found @0xffb5dc3c, levent 0x0448 { 2, KEY_ DOWN ,0x00000002 }, // Found @0xffb5dc44, levent 0x0549 { 2, KEY_ SHOOT_HALF ,0x00001000 }, // Found @0xffb5dc94, levent 0x0050 { 2, KEY_ LEFT ,0x00000004 }, // Found @0xffb5dc4c, levent 0x0651 { 2, KEY_ RIGHT ,0x00000008 }, // Found @0xffb5dc54, levent 0x0752 { 2, KEY_ SET ,0x00000010 }, // Found @0xffb5dc5c, levent 0x0853 { 2, KEY_ DISPLAY ,0x00000020 }, // Found @0xffb5dc64, levent 0x0a54 { 2, KEY_ MENU ,0x00000080 }, // Found @0xffb5dc74, levent 0x0955 { 2, KEY_ ZOOM_OUT ,0x00004000 }, // Found @0xffb5dca4, levent 0x0356 { 2, KEY_ZOOM_ IN ,0x00008000 }, // Found @0xffb5dcac, levent 0x0257 { 2, KEY_PRINT ,0x00000030 }, // Doesn't exist, DISP + SET for ALT menu 58 { 0, 0, 0 }90 { 0, KEY_PRINT ,BTN_Play }, 91 { 2, KEY_SHOOT_FULL ,BTN_ShootFull | BTN_ShootHalf }, // Found @0xffb5dc9c, levent 0x01 92 { 2, KEY_SHOOT_HALF ,BTN_ShootHalf }, // Found @0xffb5dc94, levent 0x00 93 { 2, KEY_SHOOT_FULL_ONLY ,BTN_ShootFull }, // Found @0xffb5dc9c, levent 0x01 94 { 2, KEY_FACE ,BTN_Face }, // 95 { 2, KEY_UP ,BTN_Up }, // Found @0xffb5dc3c, levent 0x04 96 { 2, KEY_DOWN ,BTN_Down }, // Found @0xffb5dc44, levent 0x05 97 { 2, KEY_LEFT ,BTN_Left }, // Found @0xffb5dc4c, levent 0x06 98 { 2, KEY_RIGHT ,BTN_Right }, // Found @0xffb5dc54, levent 0x07 99 { 2, KEY_SET ,BTN_Set }, // Found @0xffb5dc5c, levent 0x08 100 { 2, KEY_DISPLAY ,BTN_Disp }, // Found @0xffb5dc64, levent 0x0a 101 { 2, KEY_MENU ,BTN_Menu }, // Found @0xffb5dc74, levent 0x09 102 { 2, KEY_ZOOM_OUT ,BTN_ZoomWide }, // Found @0xffb5dca4, levent 0x03 103 { 2, KEY_ZOOM_IN ,BTN_ZoomTele }, // Found @0xffb5dcac, levent 0x02 104 { 0, 0, 0 } 59 105 }; 60 106 107 // NOP 61 108 void kbd_set_alt_mode_key_mask(long key) 62 109 { 63 int i;64 for (i=0; keymap[i].hackkey; ++i) {65 if (keymap[i].hackkey == key) {66 alt_mode_key_mask = keymap[i].canonkey;67 return;68 }69 }70 110 } 71 111 … … 400 440 asm volatile ("LDMFD SP!, {R0-R11,LR}\n"); // restore R0-R11 and LR from stack 401 441 } 402 403 -
branches/release-1_0/platform/a3300/lib.c
r1617 r1922 80 80 }*/ 81 81 82 void *vid_get_bitmap_active_palette() { 83 extern int active_palette_buffer; 84 extern char* palette_buffer[]; 85 return (palette_buffer[active_palette_buffer]+8); 86 } 82 87 88 #ifdef CAM_LOAD_CUSTOM_COLORS 89 // Function to load CHDK custom colors into active Canon palette 90 void load_chdk_palette() { 91 92 extern int active_palette_buffer; 93 // Only load for the standard record and playback palettes 94 if ((active_palette_buffer == 0) || (active_palette_buffer == 4)) 95 { 96 int *pal = (int*)vid_get_bitmap_active_palette(); 97 if (pal[CHDK_COLOR_BASE+1] != 0x326EA40) // see if CHDK palette already loaded -- if not, load it 98 { 99 // pal[CHDK_COLOR_BASE+0] = 0x33ADF62; // Red -- We'll use Canon's red because otherwise during boot we get white behind splash 100 pal[CHDK_COLOR_BASE+1] = 0x326EA40; // Dark Red 101 pal[CHDK_COLOR_BASE+2] = 0x34CD57F; // Light Red 102 pal[CHDK_COLOR_BASE+3] = 0x373BFAE; // Green 103 pal[CHDK_COLOR_BASE+4] = 0x34BD6CA; // Dark Green 104 pal[CHDK_COLOR_BASE+5] = 0x395AB95; // Light Green 105 pal[CHDK_COLOR_BASE+6] = 0x34766F0; // Blue 106 pal[CHDK_COLOR_BASE+7] = 0x31250F3; // Dark Blue 107 pal[CHDK_COLOR_BASE+8] = 0x37F408F; // Cyan 108 pal[CHDK_COLOR_BASE+9] = 0x3512D5B; // Magenta 109 pal[CHDK_COLOR_BASE+10] = 0x3A9A917; // Yellow 110 pal[CHDK_COLOR_BASE+11] = 0x3819137; // Dark Yellow 111 pal[CHDK_COLOR_BASE+12] = 0x3DED115; // Light Yellow 112 113 extern char palette_control; 114 palette_control = 1; 115 vid_bitmap_refresh(); 116 } 117 } 118 } 119 #endif 83 120 -
branches/release-1_0/platform/a3300/platform_camera.h
r1697 r1922 30 30 #define CAM_RAW_ROWPIX 4704 // Found @0xFFB213A0 a3300is 31 31 #define CAM_RAW_ROWS 3504 // Found @0xFFB21398 a3300is 32 33 #define CAM_ADJUSTABLE_ALT_BUTTON 1 32 34 33 35 #undef CAM_UNCACHED_BIT … … 82 84 83 85 #undef CAM_BITMAP_PALETTE 84 #define CAM_BITMAP_PALETTE 15 86 #define CAM_BITMAP_PALETTE 15 // palette number reserved for A3300 in core/gui_draw.h 85 87 86 #define CHDK_COLOR_BASE 0x1D // Start color index for CHDK colors loaded into camera palette. 88 #define CHDK_COLOR_BASE 0xE2 // Start color index for CHDK colors loaded into camera palette. Kosy chose a place Canon doesn't seem to use. 89 #define CAM_LOAD_CUSTOM_COLORS 1 // Enable loading CHDK colors into the camera palette memory/hardware
Note: See TracChangeset
for help on using the changeset viewer.