Changeset 400
- Timestamp:
- 05/20/08 16:33:37 (2 years ago)
- Files:
-
- branches/dataghost/core/dgmod.c (modified) (3 diffs)
- branches/dataghost/core/dgmod.h (modified) (2 diffs)
- branches/dataghost/core/gui.c (modified) (5 diffs)
- branches/dataghost/core/gui_lang.c (modified) (1 diff)
- branches/dataghost/core/gui_lang.h (modified) (1 diff)
- branches/dataghost/platform/a570/sub/100e/stubs_entry_2.S (modified) (1 diff)
- branches/dataghost/platform/a570/sub/100e/stubs_min.S (modified) (1 diff)
- branches/dataghost/platform/a570/sub/101a/stubs_entry_2.S (modified) (1 diff)
- branches/dataghost/platform/a570/sub/101a/stubs_min.S (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/dataghost/core/dgmod.c
r397 r400 44 44 int *dg_cameralog_file_dynamic_entry; 45 45 46 int dg_firm_dump_start_addr; 46 47 47 48 //--- Local global variables ---------------------------------------- … … 140 141 void dg_cameralog_file_stop(); 141 142 void dg_cameralog_file_dynamic_call(int arg); 143 144 void dg_dump_firmware(int arg); 142 145 143 146 //--- Local function prototypes ------------------------------------- … … 1543 1546 } 1544 1547 1548 1549 // --- Firmware dumper ---------------------------------------------- 1550 void dg_dump_firmware(int arg) { 1551 char *base; 1552 int fd; 1553 1554 started(); 1555 1556 if(dg_firm_dump_start_addr == 0) { 1557 base = (char *) 0xFF810000; 1558 } else { 1559 base = (char *) 0xFFC00000; 1560 } 1561 1562 fd = open("A/PRIMARY.BIN", O_WRONLY|O_CREAT|O_TRUNC, 0777); 1563 if(fd >= 0) { 1564 write(fd, base, 0xFFFFFFFF - (int) base); 1565 close(fd); 1566 } 1567 1568 finished(); 1569 } 1570 1571 1572 branches/dataghost/core/dgmod.h
r397 r400 80 80 extern void dg_dynamic_menu_init(); 81 81 82 extern void dg_dump_firmware(int arg); 83 82 84 extern long *_GetShutterReadyStateVar(long); 83 85 … … 94 96 extern int *dg_cameralog_file_dynamic_entry; 95 97 98 extern int dg_firm_dump_start_addr; 96 99 97 100 branches/dataghost/core/gui.c
r399 r400 174 174 const char* gui_dg_led_number_enum(int change, int arg); 175 175 const char* gui_dg_led_action_enum(int change, int arg); 176 const char* gui_dg_firmware_addr_enum(int change, int arg); 176 177 static void gui_draw_dg_hexviewer(int arg); 177 178 static int dg_show_is_internals_always = 0; … … 239 240 static CMenu dg_is_submenu = {LANG_MENU_DG_IS_MENU_TITLE, NULL, dg_is_submenu_items }; 240 241 242 static CMenuItem dg_firmware_submenu_items[] = { 243 {LANG_MENU_DG_FIRM_DUMP_START_ADDR,MENUITEM_ENUM, (int*)gui_dg_firmware_addr_enum }, 244 {LANG_MENU_DG_FIRM_DUMP_DUMP, MENUITEM_PROC, (int*)dg_dump_firmware }, 245 {LANG_MENU_BACK, MENUITEM_UP }, 246 {0} 247 }; 248 249 static CMenu dg_firmware_submenu = {LANG_MENU_DG_FIRM_DUMP_MENU_TITLE, NULL, dg_firmware_submenu_items }; 250 241 251 242 252 static CMenuItem dg_submenu_items[] = { … … 247 257 {LANG_MENU_DG_BRIGHT_MENU, MENUITEM_SUBMENU, (int*)&dg_bright_submenu }, 248 258 #endif 259 {LANG_MENU_DG_FIRM_DUMP_MENU, MENUITEM_SUBMENU, (int*)&dg_firmware_submenu }, 249 260 {LANG_MENU_DG_QUICK_DEBUGGER, MENUITEM_PROC, (int*)dg_quick_debugger }, 250 261 {LANG_MENU_DG_HEXVIEWER, MENUITEM_PROC, (int*)gui_draw_dg_hexviewer }, … … 1490 1501 dg_cameralog_screen_draw(); 1491 1502 } 1492 1503 //static int disablemute = 0; 1504 //if(!disablemute) { 1505 //_DispSwCon_DisableMute(); // Disables screen muting (log entries still appear, though) 1506 //disablemute = 1; 1507 //} 1493 1508 // Disables disabling the screen, so it still displays stuff during image 1494 1509 // capture and shutdown. 1495 1510 //_MuteOffPhysicalScreen(); 1496 1511 //_DispSwCon_MuteOffPhysicalScreen(); 1512 //_TurnOnDisplay(); 1513 //_DispSw_Unlock(); 1497 1514 gui_in_redraw = 1; 1498 1515 gui_mode_old = gui_mode; … … 2518 2535 } 2519 2536 2520 2521 2522 2537 2538 const char* gui_dg_firmware_addr_enum(int change, int arg) { 2539 static const char* modes[]={ "FF81...", "FFC0..."}; 2540 2541 dg_firm_dump_start_addr+=change; 2542 if (dg_firm_dump_start_addr<0) 2543 dg_firm_dump_start_addr = 1; 2544 else if (dg_firm_dump_start_addr>1) 2545 dg_firm_dump_start_addr = 0; 2546 2547 return modes[dg_firm_dump_start_addr]; 2548 } 2549 2550 2551 2552 branches/dataghost/core/gui_lang.c
r397 r400 505 505 "403 \"Resume logging camera log to file\"\n" 506 506 507 "404 \"Firmware dumping ->\"\n" 508 "405 \"Firmware dumping\"\n" 509 "406 \"FW start address\"\n" 510 "407 \"Dump FW to A/PRIMARY.BIN\"\n" 507 511 508 512 ; branches/dataghost/core/gui_lang.h
r397 r400 514 514 #define LANG_MENU_DG_CAMLOG_FILE_RESUME 403 515 515 516 #define LANG_MENU_DG_FIRM_DUMP_MENU 404 517 #define LANG_MENU_DG_FIRM_DUMP_MENU_TITLE 405 518 #define LANG_MENU_DG_FIRM_DUMP_START_ADDR 406 519 #define LANG_MENU_DG_FIRM_DUMP_DUMP 407 520 516 521 517 522 518 523 //------------------------------------------------------------------- 519 524 520 #define GUI_LANG_ITEMS 40 3525 #define GUI_LANG_ITEMS 407 521 526 522 527 //------------------------------------------------------------------- branches/dataghost/platform/a570/sub/100e/stubs_entry_2.S
r311 r400 16 16 NHSTUB(GetDrive_FreeClusters, 0xFFE463BC) 17 17 NHSTUB(WriteSDCard, 0xFFE58EEC) 18 19 20 /////////// 21 // Following functions are for dgmod. If there is documentation for them, it is 22 // likely to be found in platform/s5is/sub/101b/stubs_entry_2.S. 23 // Currently these functions ALL point to nullsub_1 (FFC017E4). They are here 24 // only to get CHDK to compile. Please do not use the functions using these, 25 // behaviour may be undefined. 26 NHSTUB(GetISPitchPWM, 0xFFC017E4) 27 NHSTUB(GetISYawPWM, 0xFFC017E4) 28 NHSTUB(GetISShiftLensPitchPosition, 0xFFC017E4) 29 NHSTUB(GetISShiftLensYawPosition, 0xFFC017E4) 30 NHSTUB(SetISPitchPWM, 0xFFC017E4) 31 NHSTUB(SetISYawPWM, 0xFFC017E4) 32 NHSTUB(MoveISLensToTopLimitPosition, 0xFFC017E4) 33 NHSTUB(MoveISLensToBottomLimitPosition, 0xFFC017E4) 34 NHSTUB(MoveISLensToLeftLimitPosition, 0xFFC017E4) 35 NHSTUB(MoveISLensToRightLimitPosition, 0xFFC017E4) 36 NHSTUB(MoveISLensToCentralPosition, 0xFFC017E4) 37 38 NHSTUB(GetISHallDevicePitchOffset, 0xFFC017E4) 39 NHSTUB(GetISHallDeviceYawOffset, 0xFFC017E4) 40 NHSTUB(GetISHallDevicePitchGain, 0xFFC017E4) 41 NHSTUB(GetISHallDeviceYawGain, 0xFFC017E4) 42 NHSTUB(GetISGyroPitchOffset, 0xFFC017E4) 43 NHSTUB(GetISGyroYawOffset, 0xFFC017E4) 44 NHSTUB(GetISGyroPitchGain, 0xFFC017E4) 45 NHSTUB(GetISGyroYawGain, 0xFFC017E4) 46 NHSTUB(GetISLensCenterShiftAaxis, 0xFFC017E4) 47 NHSTUB(GetISLensCenterShiftBaxis, 0xFFC017E4) 48 NHSTUB(GetISLensEViAaxis, 0xFFC017E4) 49 NHSTUB(GetISLensEViBaxis, 0xFFC017E4) 50 NHSTUB(GetISLensDampAaxis, 0xFFC017E4) 51 NHSTUB(GetISLensDampBaxis, 0xFFC017E4) 52 53 // Second set of IS lens controls 54 NHSTUB(GetISDriveAaxis, 0xFFC017E4) 55 NHSTUB(GetISDriveBaxis, 0xFFC017E4) 56 NHSTUB(GetISPositionAaxis, 0xFFC017E4) 57 NHSTUB(GetISPositionBaxis, 0xFFC017E4) 58 NHSTUB(GetISHallOffsetAaxis, 0xFFC017E4) 59 NHSTUB(GetISHallOffsetBaxis, 0xFFC017E4) 60 NHSTUB(GetISHallGainAaxis, 0xFFC017E4) 61 NHSTUB(GetISHallGainBaxis, 0xFFC017E4) 62 NHSTUB(GetISGyroGainAaxis, 0xFFC017E4) 63 NHSTUB(GetISGyroGainBaxis, 0xFFC017E4) 64 NHSTUB(GetISCoefficientP_A, 0xFFC017E4) 65 NHSTUB(GetISCoefficientP_B, 0xFFC017E4) 66 NHSTUB(GetISCoefficientI_A, 0xFFC017E4) 67 NHSTUB(GetISCoefficientI_B, 0xFFC017E4) 68 NHSTUB(GetISCoefficientD_A, 0xFFC017E4) 69 NHSTUB(GetISCoefficientD_B, 0xFFC017E4) 70 NHSTUB(GetISPLFAaxis, 0xFFC017E4) 71 NHSTUB(GetISPLFBaxis, 0xFFC017E4) 72 NHSTUB(GetISLPFAaxis, 0xFFC017E4) 73 NHSTUB(GetISLPFBaxis, 0xFFC017E4) 74 NHSTUB(GetISDbgData, 0xFFC017E4) 75 NHSTUB(GetISADData, 0xFFC017E4) 76 NHSTUB(GetISDampAaxis, 0xFFC017E4) 77 NHSTUB(GetISDampBaxis, 0xFFC017E4) 78 NHSTUB(GetISEViAaxis, 0xFFC017E4) 79 NHSTUB(GetISEViBaxis, 0xFFC017E4) 80 NHSTUB(GetISHallOut1Amp, 0xFFC017E4) 81 NHSTUB(ISActive, 0xFFC017E4) 82 83 NHSTUB(GetWBStruct, 0xFFC017E4) 84 85 NHSTUB(MuteOffPhysicalScreen, 0xFFC017E4) 86 87 88 NHSTUB(PostLEDMessage, 0xFFC017E4) 89 90 NHSTUB(TurnOnDisplay, 0xFFC017E4) 91 NHSTUB(TurnOffDisplay, 0xFFC017E4) 92 NHSTUB(TurnOnBackLight, 0xFFC017E4) 93 NHSTUB(TurnOffBackLight, 0xFFC017E4) 94 NHSTUB(SwitchOnDisplay, 0xFFC017E4) 95 NHSTUB(SwitchOffDisplay, 0xFFC017E4) 96 97 NHSTUB(StopContinuousVRAMData, 0xFFC017E4) 98 99 NHSTUB(GetShutterReadyStateVar, 0xFFC017E4) 100 branches/dataghost/platform/a570/sub/100e/stubs_min.S
r247 r400 11 11 DEF(canon_shoot_menu_active,0x27B1) 12 12 DEF(recreview_hold, 0x2584) 13 14 // Found in PutsCameraLogEvent, right before calling the actual 'puts' function 15 // ROM:FFC059BC LDR R3, =0xD9CC 16 // ROM:FFC059C0 LDR R0, [R3] 17 // ROM:FFC059C4 BL LogPutsToBuffer 18 DEF(dg_cameralog_base, 0xD9CC) 19 branches/dataghost/platform/a570/sub/101a/stubs_entry_2.S
r311 r400 17 17 NHSTUB(WriteSDCard, 0xFFE58F60) 18 18 19 20 /////////// 21 // Following functions are for dgmod. If there is documentation for them, it is 22 // likely to be found in platform/s5is/sub/101b/stubs_entry_2.S. 23 NHSTUB(GetISPitchPWM, 0xFFE0F1BC) 24 NHSTUB(GetISYawPWM, 0xFFE0F1D0) 25 NHSTUB(GetISShiftLensPitchPosition, 0xFFE0F1E4) 26 NHSTUB(GetISShiftLensYawPosition, 0xFFE0F1F8) 27 NHSTUB(SetISPitchPWM, 0xFFE0EF58) 28 NHSTUB(SetISYawPWM, 0xFFE0EF68) 29 NHSTUB(MoveISLensToTopLimitPosition, 0xFFE0EE4C) 30 NHSTUB(MoveISLensToBottomLimitPosition, 0xFFE0EE3C) 31 NHSTUB(MoveISLensToLeftLimitPosition, 0xFFE0EE2C) 32 NHSTUB(MoveISLensToRightLimitPosition, 0xFFE0EE1C) 33 NHSTUB(MoveISLensToCentralPosition, 0xFFE0F090) 34 35 NHSTUB(GetISHallDevicePitchOffset, 0xFFE0F15C) 36 NHSTUB(GetISHallDeviceYawOffset, 0xFFE0F16C) 37 NHSTUB(GetISHallDevicePitchGain, 0xFFE0F17C) 38 NHSTUB(GetISHallDeviceYawGain, 0xFFE0F18C) 39 NHSTUB(GetISGyroPitchOffset, 0xFFE0EDD4) 40 NHSTUB(GetISGyroYawOffset, 0xFFE0EDCC) 41 NHSTUB(GetISGyroPitchGain, 0xFFE0F19C) 42 NHSTUB(GetISGyroYawGain, 0xFFE0F1AC) 43 NHSTUB(GetISLensCenterShiftAaxis, 0xFFE0EDA0) 44 NHSTUB(GetISLensCenterShiftBaxis, 0xFFE0EDA8) 45 NHSTUB(GetISLensEViAaxis, 0xFFE0F20C) 46 NHSTUB(GetISLensEViBaxis, 0xFFE0F220) 47 NHSTUB(GetISLensDampAaxis, 0xFFE0F234) 48 NHSTUB(GetISLensDampBaxis, 0xFFE0F248) 49 50 // Second set of IS lens controls 51 NHSTUB(GetISDriveAaxis, 0xFFE8B0C8) 52 NHSTUB(GetISDriveBaxis, 0xFFE8B104) 53 NHSTUB(GetISPositionAaxis, 0xFFE8B144) 54 NHSTUB(GetISPositionBaxis, 0xFFE8B184) 55 NHSTUB(GetISHallOffsetAaxis, 0xFFE8B1C8) 56 NHSTUB(GetISHallOffsetBaxis, 0xFFE8B20C) 57 NHSTUB(GetISHallGainAaxis, 0xFFE8B24C) 58 NHSTUB(GetISHallGainBaxis, 0xFFE8B28C) 59 NHSTUB(GetISGyroGainAaxis, 0xFFE8B2CC) 60 NHSTUB(GetISGyroGainBaxis, 0xFFE8B30C) 61 NHSTUB(GetISCoefficientP_A, 0xFFE8B810) 62 NHSTUB(GetISCoefficientP_B, 0xFFE8B850) 63 NHSTUB(GetISCoefficientI_A, 0xFFE8B890) 64 NHSTUB(GetISCoefficientI_B, 0xFFE8B8D0) 65 NHSTUB(GetISCoefficientD_A, 0xFFE8B910) 66 NHSTUB(GetISCoefficientD_B, 0xFFE8B950) 67 NHSTUB(GetISPLFAaxis, 0xFFE8B68C) 68 NHSTUB(GetISPLFBaxis, 0xFFE8B6BC) 69 NHSTUB(GetISLPFAaxis, 0xFFE8B70C) 70 NHSTUB(GetISLPFBaxis, 0xFFE8B73C) 71 NHSTUB(GetISDbgData, 0xFFE8B3D8) 72 NHSTUB(GetISADData, 0xFFE8B41C) 73 NHSTUB(GetISDampAaxis, 0xFFE8B56C) 74 NHSTUB(GetISDampBaxis, 0xFFE8B5A4) 75 NHSTUB(GetISEViAaxis, 0xFFE8B5DC) 76 NHSTUB(GetISEViBaxis, 0xFFE8B614) 77 NHSTUB(GetISHallOut1Amp, 0xFFE8B50C) 78 NHSTUB(ISActive, 0xFFC017E4) // nullsub_1 79 80 NHSTUB(GetWBStruct, 0xFFC017E4) // nullsub_1, useless for now 81 82 NHSTUB(MuteOffPhysicalScreen, 0xFFC34DD8) 83 84 85 NHSTUB(PostLEDMessage, 0xFFDE5890) 86 87 NHSTUB(TurnOnDisplay, 0xFFC34CE8) 88 NHSTUB(TurnOffDisplay, 0xFFC34D14) 89 NHSTUB(TurnOnBackLight, 0xFFC34D40) 90 NHSTUB(TurnOffBackLight, 0xFFC34D70) 91 NHSTUB(SwitchOnDisplay, 0xFFE0C28C) 92 NHSTUB(SwitchOffDisplay, 0xFFE0C258) 93 94 NHSTUB(StopContinuousVRAMData, 0xFFC017E4) // nullsub_1, useless for now 95 96 NHSTUB(GetShutterReadyStateVar, 0xFFC017E4) // nullsub_1, useless for now 97 98 99 branches/dataghost/platform/a570/sub/101a/stubs_min.S
r247 r400 11 11 DEF(canon_shoot_menu_active,0x27B1) 12 12 DEF(recreview_hold, 0x2584) 13 14 // Found in PutsCameraLogEvent, right before calling the actual 'puts' function 15 // ROM:FFC059BC LDR R3, =0xD9CC 16 // ROM:FFC059C0 LDR R0, [R3] 17 // ROM:FFC059C4 BL LogPutsToBuffer 18 DEF(dg_cameralog_base, 0xD9CC) 19