Magic Lantern Firmware Wiki


328pages on
this wiki
Add New Page
Talk0 Share

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

this is an attempt to document DryOS API.

these are 98-100% guess...

See also dryos.h interface, dialog.h, gui.h from Magic Lantern

addresses are given by default for 550D/1.0.8

RAM:0001E774 winsys_struct // mapped from 5d2 107

ROM:FF010DD4 ; void __fastcall DryosPanic(unsigned __int32 arg0, unsigned __int32 arg1)  // mapped from 5d2 107 and dryos.h
ROM:FF016040 sched_yield(3 args maybe) // mapped from 5d2 107

ROM:FF1D2A60 ; int __fastcall CreateMessageQueue(char *name, int size)
ROM:FF1D2B70 ; int __fastcall ReceiveMessageQueue(void *queue_handle, struct **event_addr, int wait)
struct event { // from dumper.c
  uint32_t  type; 
  uint32_t  param;  
  void *  obj; uint32_t            
  arg; // unknown meaning

// properties. see property.h
ROM:FF056E38 ; void __fastcall prop_request_change(unsigned int property, void *address, __int32 len)
ROM:FF0574A0 ; void __fastcall prop_register_slave(unsigned int *property_list, unsigned int count, void *(__fastcall *prop_handler)(), void *priv, void (__fastcall *token_handler)())
ROM:FF057418 ; void __fastcall prop_deliver(unsigned int prop, void *buf, int len, unsigned int mzb)
ROM:FF0575C0 ; void *__fastcall prop_cleanup(void *token, unsigned int property)
ROM:FF057654 ; void __fastcall prop_get_value(unsigned int property, void *addr, __int32 len) // mapped from 5d2 110 using gensig and finsig from CHDK!
ROM:FF09786C ; void __fastcall prop_request_icu_autopoweroff(int mode) // see dryos.h, #define EM_ALLOW 1, #define EM_PROHIBIT 2

// semaphores
ROM:FF069D10 ; struct semaphore *__fastcall CreateBinarySemaphore(const char *name, int initial_value) // 550d 108 and dryos.h
ROM:FF069E70 ; int __fastcall TakeSemaphore(struct semaphore *semaphore, int timeout_interval) // 550d 108 and dryos.h
ROM:FF069F58 ; int __fastcall give_semaphore(struct semaphore *semaphore) // 550d 108 and dryos.h

ROM:FF068178 ; void call(const char *name, ...) // mapped from 5d2 107 and dryos.h 
ROM:FF06A344 ; void __fastcall msleep(__int32 msec) // mapped from 5d2 107 and dryos.h
ROM:FF06A3F8 ; int __fastcall CreateTask(char *name, int priority, int stack_size_maybe, void *event_dispatch, int flags)
ROM:FF06E3F0 new_task_struct // 

ROM:FF016B8C get_current_task() // mapped from 5d2 107

ROM:FF1D85E4 ; void *__cdecl CreateStateObject(char *name, int zero, int *ValSubList, int TotInputs, int TotStates)

//File IO
ROM:FF1C6648 ; int __fastcall FIO_CreateFile(char *name)  //returns handle or -1 if error
ROM:FF1C693C ; int __fastcall FIO_WriteFile(int handle, void *start_addr, unsigned __int32 length)
ROM:FF1C69EC ; int __fastcall FIO_CloseFile(int handle)

// dialogs and windows
ROM:FF2B5EEC CreateDialogBox // (== ROM:FFA5499C dialog_create() in 5d2 107)
ROM:FF2B614C dialog_window_prepare() // mapped from 5d2 107
ROM:FF2B6154 ; void __fastcall dialog_resize(struct dialog *dialog, int w, int h, int unknown) // mapped from 5d2 107 and dialog.h
ROM:FF2B61F8 ; void __fastcall MoveAllDialogItem(struct dialog *dialog, int x, int y) // (ROM:FFA54CA4 dialog_move() in 5d2 107) and dialog.h
ROM:FF2B63D4 ; void __fastcall dialog_label_item(struct dialog *dialog, unsigned int id, const char *label, int len_maybe, int unknown)  // mapped from 5d2 107 and dialog.h
ROM:FF2B67F4 ; void __fastcall dialog_draw(struct dialog *dialog) // mapped from 5d2 107 and dialog.h
ROM:FF2B71B4 ; void __fastcall dialog_window_resize(struct dialog *dialog, int w, int h, int unknown) // mapped from 5d2 107 and dialog.h
ROM:FF2B7474 ; void __fastcall dialog_move_item(struct dialog *dialog, int x, int y, int index) // mapped from 5d2 107 and dialog.h
ROM:FF2B7564 ; void __fastcall dialog_set_origin_type(struct dialog *dialog, int type) // mapped from 5d2 107 and dialog.h
ROM:FF2B7744 ; void __fastcall dialog_window_draw(struct dialog *dialog) // mapped from 5d2 107 and dialog.h 

ROM:FF2CFCA0 winsys_take_semaphore // mapped from 5d2 107
ROM:FF2CFB18 winsys_struct_1e774_set_0x30 
ROM:FF2CFB28 winsys_struct_1e774_get_0x30

ROM:FF44F7CC ; int __fastcall memcpy(void *dest, void *src, int size)
ROM:FF44F8C0 ; int __fastcall bzero32(void *addr, int size)
ROM:FF44F97C ; int __fastcall hton32(int val, int *dest)

For CreateStateObject details, see 2.0.4_StateObjects

Also on Fandom

Random Wiki