1 #include "stubs_asm.h" 2 3 // BEWARE: thumb functions NEED the thumb bit in the below list 4 5 #define NULL_SUB 0xe0020929 // bx lr 6 7 NHSTUB(EnterToCompensationEVF ,0xe0298d6d) 8 NHSTUB(ExitFromCompensationEVF ,0xe0298dad) 9 NHSTUB(ExpCtrlTool_StartContiAE ,0xe02a1a91) 10 NHSTUB(ExpCtrlTool_StopContiAE ,0xe02a1bfd) 11 NHSTUB(Feof_Fut ,0xe03710c1) 12 NHSTUB(Fflush_Fut ,0xe03710eb) 13 NHSTUB(GetDrive_TotalClusters ,0xe0375125) // function immediately before GetDrive_FreeClusters in ROM 14 NHSTUB(GetFocusLensSubjectDistanceFromLens ,0xe0372eeb) 15 NHSTUB(GetImageFolder ,0xe0355015) 16 NHSTUB(MakeSDCardBootable ,NULL_SUB) 17 NHSTUB(RenameFile_Fut ,0xe0370e69) 18 NHSTUB(Restart ,0xe005b973) // Does not work - only accepts 7 as the parameter value (firmware update) 19 NHSTUB(SetFileTimeStamp ,0xe0374179) 20 NHSTUB(TurnOffBackLight ,NULL_SUB) 21 NHSTUB(TurnOnBackLight ,NULL_SUB) 22 NHSTUB(apex2us ,0xe0067ab3) 23 //NHSTUB(err_init_task ,NULL_SUB) 24 //NHSTUB(mkdir ,NULL_SUB) 25 //NHSTUB(realloc ,NULL_SUB) 26 NHSTUB(reboot_fw_update ,0xe0526847) // Does not work !!! Asserts if try to load PS.FI2 file. 27 NHSTUB(CancelHPTimer ,0xe03f4b5b) 28 29 NHSTUB(VTMLock ,0xe03780bf) // OK 30 NHSTUB(VTMUnlock ,0xe03781d7) // ??? VTMUnlock string not in FW 31 32 NHSTUB(GetActiveViewportBuffer ,0xe03aa70b) 33 34 // These don't exist 35 NHSTUB(PT_PlaySound ,NULL_SUB) 36 NHSTUB(ScreenLock ,NULL_SUB) 37 NHSTUB(ScreenUnlock ,NULL_SUB) 38 NHSTUB(SetFileAttributes ,NULL_SUB) 39 NHSTUB(SetZoomActuatorSpeedPercent ,NULL_SUB) 40 NHSTUB(UnsetZoomForMovie ,NULL_SUB) 41 NHSTUB(WriteSDCard ,NULL_SUB) 42 43 // Use overide function for GetPropertyCase to handle high-speed continuous mode 44 IGNORE(GetPropertyCase) 45 NHSTUB(GetPropertyCase_FW ,0xe036af69) 46 47 //// required because DryOS >=54 functions assert on unitialized event flag, sem etc 48 //// see https://chdk.setepontos.com/index.php?topic=12516.0 49 NHSTUB(init_focus_eventflag ,0xe059238d) 50 NHSTUB(init_nd_eventflag ,0xe05924a5) 51 NHSTUB(CreateBinarySemaphoreStrictly ,0xdffca245) 52 53 // To find these values it is easiest to use the Ghidra de-compile window. 54 DEF(debug_logging_ptr ,0x000254f4) // RAM address of function called by mzrm_sendmsg for logging 55 // To find debug_logging_ptr: 56 // Start at the mzrm_sendmsg function. 57 // Find the function call via memory pointer with first parameter = "SendMsg : %d\n" string 58 // debug_logging_ptris the memory address that contains the pointer used to make this function call 59 DEF(debug_logging_flag ,0x000254fc) // RAM address of flag to enable logging call 60 // To find debug_logging_flag: 61 // Just before the debug_logging_ptrfound above there is an if statement that tests both a memory value and 62 // the debug_logging_ptrvalue. 63 // debug_logging_flag is the memory address of the flag value in the if statement. 64 DEF(mzrm_sendmsg_ret_adr ,0xe030671b) // Thumb address to check against LR register to detect mzrm_sendmag call from Canon UI update 65 // This is the address immediately after the call to debug_logging_ptrin mzrm_sendmsg (+1 for thumb) 66 DEF(hdmi_buffer_check_adr ,0x4196a000) // For HDMI output we only want to flag UI updates when layer 0 is set to this buffer address 67 // Start at the transfer_src_overlay function, then go to the last function called 68 // Now find the function call just after the "MakeOsdVram.c" DebugAssert call. 69 // The value is the second parameter to this function. 70 71 // Incorrect by finsig - need to check 72 73 // Does not exist 74 NHSTUB(EngDrvRead ,NULL_SUB) // EngDrvRead code merged into EngDrvRead_FW !!! TODO: enable use of EngDrvRead_FW in code 75 76 // Missed by finsig - need to check 77 NHSTUB(_sqrt ,0xdffcf241) 78 NHSTUB(SetHPTimerAfterNow ,0xe03f4ac1) 79 80 DEF(task_FsIoNotifyTask ,0xe00f2b5d) 81 82 NHSTUB(get_ptp_buf_size ,0xe053364f) 83 NHSTUB(get_ptp_file_buf ,0xe0556e23)