Advertisement
fjriosp

1200d.stubs.S

Apr 21st, 2015
480
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 12.43 KB | None | 0 0
  1. /** \file
  2.  * Entry points into the firmware image.
  3.  *
  4.  * These are the functions that we can call from our tasks
  5.  * in the Canon 1.0.0 firmware for the 1200D.
  6.  *
  7.  *  Indented line = incorrect.
  8.  *  Stubs identified by fjriosp comparing with the 700D firmware.
  9.  */
  10. /*
  11.  * Copyright (C) 2012 Magic Lantern Team
  12.  *
  13.  * This program is free software; you can redistribute it and/or
  14.  * modify it under the terms of the GNU General Public License
  15.  * as published by the Free Software Foundation; either version 2
  16.  * of the License, or (at your option) any later version.
  17.  *
  18.  * This program is distributed in the hope that it will be useful,
  19.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  20.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  21.  * GNU General Public License for more details.
  22.  *
  23.  * You should have received a copy of the GNU General Public License
  24.  * along with this program; if not, write to the
  25.  * Free Software Foundation, Inc.,
  26.  * 51 Franklin Street, Fifth Floor,
  27.  * Boston, MA  02110-1301, USA.
  28.  */
  29.  
  30. #include <stub.h>
  31.  
  32. .text
  33.  
  34. /** Startup **/
  35. NSTUB( ROMBASEADDR, firmware_entry )
  36. NSTUB(0xFF0C1028,  cstart)
  37. NSTUB(0xFF623B5C,  bzero32)
  38. NSTUB(0xFF0C7DF0,  create_init_task)
  39. NSTUB(0xFF0C9648,  init_task)
  40. NSTUB(   0x70594,  additional_version)
  41.  
  42. /** File I/O **/
  43. NSTUB(0xFF2A2930,  FIO_CloseFile)
  44. NSTUB(0xFF2A3900,  FIO_FindClose)                           // FindClose
  45. NSTUB(0xFF2A3820,  FIO_FindNextEx)
  46. NSTUB(0xFF2A26E0,  FIO_ReadFile)
  47. NSTUB(0xFF2A2790,  FIO_SeekSkipFile)
  48. NSTUB(0xFF2A2880,  FIO_WriteFile)
  49. NSTUB(0xFF2A316C, _FIO_CreateDirectory)
  50. NSTUB(0xFF2A258C, _FIO_CreateFile)
  51. NSTUB(0xFF2A372C, _FIO_FindFirstEx)
  52. NSTUB(0xFF2A2AAC, _FIO_GetFileSize)
  53. NSTUB(0xFF2A24D0, _FIO_OpenFile)
  54. NSTUB(0xFF2A2638, _FIO_RemoveFile)
  55. NSTUB(0xFF2A2FA4, _FIO_RenameFile)
  56.  
  57. /** GUI **/
  58. NSTUB(    0x1C18,  gui_main_struct)
  59. NSTUB(    0xA528,  gui_task_list)
  60. NSTUB(0xFF0D1590,  GUI_ChangeMode)
  61. NSTUB(0xFF0D1490,  GUI_Control)
  62. NSTUB(0xFF157514,  SetGUIRequestMode)
  63. NSTUB(0xFF0D1AF0,  gui_init_end)
  64. NSTUB(0xFF0D10D4,  gui_main_task)
  65. NSTUB(0xFF159590,  gui_massive_event_loop)
  66. // NSTUB(    ???,  GUI_SetLvMode)                           /* present on 500D.111, 50D.109, 5D2.212 */
  67. // NSTUB(    ???,  GUI_SetMovieSize_a)                      /* present on 50D.109 */
  68. // NSTUB(    ???,  GUI_SetMovieSize_b)                      /* present on 50D.109 */
  69. // NSTUB(    ???,  Gui_SetSoundRecord)                      /* present on 6D.113, 5D2.212 */
  70.  
  71. /** ASIF **/
  72. NSTUB(0xFF108C54,  PowerAudioOutput)
  73. NSTUB(0xFF11CFE8,  PowerMicAmp)
  74. NSTUB(0xFF10656C,  SetASIFMode)
  75. NSTUB(0xFF108C20,  SetAudioVolumeIn)                        /* present on 6D.113 */
  76. NSTUB(0xFF11BC20,  SetAudioVolumeOut)                       // keep volume
  77. NSTUB(0xFF106888,  SetNextASIFADCBuffer)                    // mk11174
  78. NSTUB(0xFF106AF4,  SetNextASIFDACBuffer)                    // mk11174
  79. NSTUB(0xFF11C948,  SetSamplingRate)
  80. NSTUB(0xFF10888C,  SoundDevActiveIn)
  81. NSTUB(0xFF108AE0,  SoundDevShutDownIn)
  82. NSTUB(0xFF105E10,  StartASIFDMAADC)
  83. NSTUB(0xFF1061D0,  StartASIFDMADAC)
  84. NSTUB(0xFF1060A8,  StopASIFDMAADC)                          /* present on 7D.203, 6D.113, EOSM.202 */
  85. NSTUB(0xFF106444,  StopASIFDMADAC)
  86.  
  87. /** Audio **/
  88. NSTUB(    0x1E50,  sounddev)
  89. NSTUB(0xFF2AD554, _audio_ic_read)
  90. NSTUB(0xFF2AD25C, _audio_ic_write)
  91. NSTUB(0xFF69B488,  audio_thresholds)
  92. NSTUB(0xFF10888C,  sounddev_active_in)
  93. NSTUB(0xFF108488,  sounddev_task)
  94.  
  95. /** Bitmap **/
  96. NSTUB(   0x1BBE0,  LCD_Palette)
  97. NSTUB(   0x1D3E0,  bmp_vram_info)
  98.  
  99. /** CFN **/
  100. NSTUB(0xFF5FB8EC,  GetCFnData)
  101. NSTUB(0xFF5FBB18,  SetCFnData)
  102. // NSTUB(    ???,  GUI_GetCFnForTab4)                       /* present on 7D.203 */
  103. // NSTUB(    ???,  GUI_SetCFnForTab4)                       /* present on 7D.203 */
  104.  
  105. /** Camera interface? **/
  106. NSTUB(0xC0220000,  camera_engine)
  107.  
  108. /** DMA **/
  109. NSTUB(0xFF126CFC,  dma_memcpy)
  110.  
  111. /** Debug messages **/
  112. NSTUB(    0x2440,  dm_names)
  113. NSTUB(0xFF11F5DC,  DryosDebugMsg)
  114. NSTUB(0xFF11F93C,  dm_set_store_level)
  115.  
  116. /** Dialog API **/
  117. NSTUB(0xFF3E63A4,  dialog_redraw)
  118. NSTUB(0xFF2F5E1C,  dialog_set_property_str)
  119.  
  120. /** Dialog handlers **/
  121. NSTUB(0xFF532004,  ErrCardForLVApp_handler)
  122. NSTUB(0xFF4250E0,  ErrForCamera_handler)
  123. NSTUB(0xFF43C08C,  HideUnaviFeedBack_maybe)
  124. NSTUB(0xFF440B90,  LiveViewApp_handler)
  125. NSTUB(0xFF441218,  LiveViewApp_handler_BL_JudgeBottomInfoDispTimerState)
  126. // NSTUB(    ???,  LiveViewApp_handler_end)
  127. // NSTUB(    ???,  LiveViewShutterApp_handler)
  128. NSTUB(0xFF45BDB4,  PlayMain_handler)
  129. NSTUB(0xFF56AD08,  PlayMovieGuideApp_handler)
  130. NSTUB(0xFF44F9DC,  ShootOlcApp_handler)
  131. // NSTUB(    ???,  LiveViewLevelApp_handler)                /* present on 5D3.113 */
  132. // NSTUB(    ???,  LiveViewWbApp_handler)                   /* present on 7D.203, 5D3.113, 5D2.212 */
  133. // NSTUB(    ???,  LiveViewWifiApp_handler)                 /* present on 6D.113 */
  134. // NSTUB(    ???,  StartPlayProtectGuideApp)                /* present on 7D.203, 5D2.212 */
  135. // NSTUB(    ???,  StopPlayProtectGuideApp)                 /* present on 7D.203, 5D2.212 */
  136.  
  137. /** Display **/
  138. NSTUB(0xFF403F90,  MirrorDisplay)
  139. NSTUB(0xFF403FF0,  NormalDisplay)
  140. NSTUB(0xFF403FC0,  ReverseDisplay)
  141.  
  142. /** EDMAC **/
  143. NSTUB(0xFF29C938,  ConnectReadEDmac)
  144. NSTUB(0xFF29C874,  ConnectWriteEDmac)
  145. NSTUB(0xFF29CCD4,  RegisterEDmacAbortCBR)
  146. NSTUB(0xFF29CCAC,  RegisterEDmacCompleteCBR)
  147. NSTUB(0xFF29CDDC,  RegisterEDmacPopCBR)
  148. NSTUB(0xFF29C7BC,  SetEDmac)
  149. NSTUB(0xFF29CABC,  StartEDmac)
  150. NSTUB(0xFF29CD14,  UnregisterEDmacAbortCBR)
  151. NSTUB(0xFF29CCC0,  UnregisterEDmacCompleteCBR)
  152. NSTUB(0xFF29CDF0,  UnregisterEDmacPopCBR)
  153.  
  154. /** Electronic Level **/
  155. NSTUB(0xFF2E8D5C,  GUI_SetRollingPitchingLevelStatus)
  156.  
  157. /** Engio **/
  158. NSTUB(0xFF29DBB8, _EngDrvOut)
  159. NSTUB(0xFF29DF84, _engio_write)
  160. NSTUB(0xFF29DAA8,  shamem_read)
  161. // NSTUB(    ???,  EngDrvOut)                               /* present on 7D_MASTER.203 */
  162.  
  163. /** Eventprocs (call by name) **/
  164. NSTUB(0xFF1204A4,  call)
  165.  
  166. /** Events **/
  167. NSTUB(0xFF2B9CD8,  TryPostEvent)
  168. NSTUB(0xFF2B9D34,  TryPostEvent_end)
  169. NSTUB(0xFF2B9360,  TryPostStageEvent)
  170. NSTUB(0xFF2B93BC,  TryPostStageEvent_end)
  171.  
  172. /** ExMem **/
  173. NSTUB(0xFF124E8C,  AddMemoryChunk)            // called before " 32(Src,bytes,Unit)=(%#lx,%#lx,%#lx)" in many places; see also hAddSuite
  174. NSTUB(0xFF1279B4,  AllocateContinuousMemoryResource)
  175. NSTUB(0xFF127968,  AllocateMemoryResource)
  176. NSTUB(0xFF124408,  CreateMemoryChunk)         // called from CreateMemorySuite
  177. NSTUB(0xFF124BE8,  CreateMemorySuite)
  178. NSTUB(0xFF124A1C,  DeleteMemorySuite)
  179. NSTUB(0xFF127AAC,  FreeMemoryResource)
  180. NSTUB(0xFF124F60,  GetFirstChunkFromSuite)
  181. NSTUB(0xFF1249A8,  GetMemoryAddressOfMemoryChunk)
  182. NSTUB(0xFF1256F4,  GetNextMemoryChunk)
  183. NSTUB(0xFF0D9B14,  SRM_AllocateMemoryResourceFor1stJob)
  184. NSTUB(0xFF0DC3A8,  SRM_FreeMemoryResourceFor1stJob)
  185.  
  186. /** GUI for old cameras **/
  187. // NSTUB(    ???,  gui_change_lcd_state_post)               /* present on 7D.203, 500D.111, 50D.109, 5D2.212 */
  188. // NSTUB(    ???,  gui_change_mode)                         /* present on 7D.203, 500D.111, 50D.109, 5D2.212, 600D.102, 550D.109, 1100D.105 */
  189. // NSTUB(    ???,  gui_change_shoot_type_post)              /* present on 7D.203, 500D.111, 50D.109, 5D2.212 */
  190. // NSTUB(    ???,  gui_init_event)                          /* present on 7D.203, 500D.111, 50D.109, 5D2.212 */
  191. // NSTUB(    ???,  gui_local_post)                          /* present on 7D.203, 500D.111, 50D.109, 5D2.212, 600D.102, 550D.109, 1100D.105 */
  192. // NSTUB(    ???,  gui_other_post)                          /* present on 7D.203, 500D.111, 50D.109, 5D2.212, 600D.102, 550D.109, 1100D.105 */
  193. // NSTUB(    ???,  gui_post_10000085)                       /* present on 500D.111, 50D.109, 5D2.212 */
  194. // NSTUB(    ???,  gui_timer_something)                     /* present on 7D.203, 500D.111, 50D.109, 5D2.212 */
  195. // NSTUB(    ???,  gui_timer_struct)                        /* present on 7D.203, 500D.111, 60D.111, 50D.109, 5D2.212, 600D.102, 550D.109, 1100D.105 */
  196.  
  197. /** GUI timers **/
  198. NSTUB(0xFF1292BC,  CancelTimer)
  199. NSTUB(0xFF120F28,  SetHPTimerAfterNow)
  200. NSTUB(0xFF12101C,  SetHPTimerNextTick)
  201. NSTUB(0xFF1290BC,  SetTimerAfter)
  202. NSTUB(0xFF437180,  CancelDateTimer)                         /* present on 7D.203, 6D.113, 5D3.113 */
  203.  
  204. /** H264 Encoder **/
  205. NSTUB(    0x5A14,  mvr_config)
  206. NSTUB(0xFF27FEF4,  mvrFixQScale)
  207. NSTUB(0xFF27F9D0,  mvrSetDefQScale)
  208. NSTUB(0xFF27FA08,  mvrSetFullHDOptSize)                     /* present on 500D.111, 50D.109, 600D.102, 550D.109, 1100D.105 */
  209. NSTUB(0xFF27FBF8,  mvrSetGopOptSizeFULLHD)                  /* present on 600D.102, 550D.109, 1100D.105 */
  210.  
  211. /** Interrupts **/
  212. // NSTUB(    ???,  isr_table_handler)                       /* present on 7D_MASTER.203 */
  213. // NSTUB(    ???,  isr_table_param)                         /* present on 7D_MASTER.203 */
  214. // NSTUB(    ???,  post_isr_hook)                           /* present on 7D.203, 6D.113, 5D3.113, EOSM.202 */
  215. // NSTUB(    ???,  pre_isr_hook)                            /* present on 7D.203, 6D.113, 5D3.113, 7D_MASTER.203, EOSM.202 */
  216.  
  217. /** LCD Sensor **/
  218. NSTUB(0xFF134BB8,  DispSensorStart)
  219. // NSTUB(    ???,  LightMeasure_n_Callback_r0)              /* present on 7D.203, 5D2.212 */
  220.  
  221. /** Making the card bootable **/
  222. NSTUB(   0x15010,  sd_device)                               // mk11174
  223. NSTUB(0xFF4F93E8,  fsuDecodePartitionTable)
  224. NSTUB(   0x14FEC,  cf_device)                               // mk11174
  225.  
  226. /** Memory allocation **/
  227. NSTUB(0xFF123440,  GetMemoryInformation)
  228. NSTUB(0xFF1233EC,  GetSizeOfMaxRegion)
  229. NSTUB(0xFF12369C, _AllocateMemory)
  230. NSTUB(0xFF123A2C, _FreeMemory)
  231. NSTUB(0xFF2BB314, _alloc_dma_memory)
  232. NSTUB(0xFF0C8BFC, _free)                                    // see "can't malloc"
  233. NSTUB(0xFF2BB348, _free_dma_memory)
  234. NSTUB(0xFF0C8BA4, _malloc)
  235. // NSTUB(    ???,  free_dma_memory)                         /* present on 7D_MASTER.203 */
  236.  
  237. /** Message queues **/
  238. NSTUB(0xFF2B3F80,  msg_queue_count)
  239. NSTUB(0xFF2B3C44,  msg_queue_create)
  240. NSTUB(0xFF2B3F40,  msg_queue_post)
  241. NSTUB(0xFF2B3D54,  msg_queue_receive)
  242.  
  243. /** PTP **/
  244. NSTUB(0xFF1FFF84,  ptpPropSetUILock)
  245. NSTUB(0xFF369BDC,  ptp_register_handler)
  246.  
  247. /** Properties **/
  248. NSTUB(0xFF10C850, _prop_cleanup)
  249. NSTUB(0xFF10C0C8, _prop_request_change)
  250. NSTUB(0xFF10C6A8,  prop_deliver)
  251. NSTUB(0xFF10C730,  prop_register_slave)
  252. // NSTUB(    ???,  PROPAD_GetPropertyData)                  /* present on 7D.203, 60D.111, 6D.113, 5D3.113, 50D.109, 5D2.212, 600D.102, 550D.109 */
  253. // NSTUB(    ???,  prop_unregister_slave)                   /* present on 7D.203 */
  254.  
  255. /** RPC (for 7D) **/
  256. // NSTUB(    ???,  BulkInIPCTransfer)                       /* present on 7D.203 */
  257. // NSTUB(    ???,  BulkOutIPCTransfer)                      /* present on 7D.203 */
  258. // NSTUB(    ???,  QuickOutIPCTransfer)                     /* present on 7D.203 */
  259. // NSTUB(    ???,  RegisterRPCHandler)                      /* present on 7D.203, 7D_MASTER.203 */
  260. // NSTUB(    ???,  RequestRPC)                              /* present on 7D.203, 7D_MASTER.203 */
  261.  
  262. /** Recursive locks **/
  263. NSTUB(0xFF2B408C,  AcquireRecursiveLock)
  264. NSTUB(0xFF2B3FF4,  CreateRecursiveLock)
  265. NSTUB(0xFF2B41A0,  ReleaseRecursiveLock)
  266.  
  267. /** ResLock **/
  268. NSTUB(0xFF2A0B8C,  CreateResLockEntry)
  269. NSTUB(0xFF2A10CC,  LockEngineResources)
  270. NSTUB(0xFF2A1208,  UnLockEngineResources)
  271.  
  272. /** Semaphores **/
  273. NSTUB(0xFF12213C,  create_named_semaphore)
  274. NSTUB(0xFF122384,  give_semaphore)
  275. NSTUB(0xFF12229C,  take_semaphore)
  276.  
  277. /** Task info **/
  278. NSTUB(    0x295C,  task_max)                             // mk11174
  279. NSTUB(0xFF0C7464,  get_current_task)
  280. NSTUB(0xFF132154,  get_obj_attr)
  281. NSTUB(0xFF417ED4,  is_taskid_valid)
  282.  
  283. /** Task sleep **/
  284. NSTUB(0xFF122770,  msleep)
  285.  
  286. /** Tasks **/
  287. NSTUB(    0x193C,  task_dispatch_hook)                   // mk11174
  288. NSTUB(0xFF122824,  task_create)
  289. NSTUB(0xFF12F67C,  task_trampoline)                      // mk11174
  290. // NSTUB(    ???,  current_task_ctx)                        /* present on 7D.203 */
  291. // NSTUB(    ???,  next_task_ctx)                           /* present on 7D.203 */
  292.  
  293. /** Misc **/
  294. NSTUB(0xFF11AEE0,  LoadCalendarFromRTC)
  295. NSTUB(0xFF2B74D8,  vsnprintf)
  296. // NSTUB(    ???,  EnableImagePhysicalScreenParameter)      /* present on 7D.203, 50D.109, 5D2.212 */
  297. // NSTUB(    ???,  PtpDps_remote_release_SW1_SW2_worker)    /* present on 7D.203, 5D2.212 */
  298. // NSTUB(    ???,  lv_path_struct)                          /* present on 60D.111, 600D.102, 550D.109, 1100D.105 */
  299. // NSTUB(    ???,  memcpy)                                  /* present on 7D_MASTER.203 */
  300.  
  301. /** Unused stubs or porting notes **/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement