root/platform/sx1/sub/200h/stubs_entry.S

/* [<][>][^][v][top][bottom][index][help] */
   1 // !!! THIS FILE IS GENERATED. DO NOT EDIT. !!!
   2 #include "stubs_asm.h"
   3 
   4 // Camera info:
   5 //   DRYOS R31 (DRYOS version 2.3, release #0031)
   6 //   Firmware Ver GM2.00H   // Found @ 0xff87ccb4, "GM2.00H" @ 0xff87ccc1
   7 //   Firmware build timestamp: Feb  4 2009 10:41:18
   8 //   Canon PowerShot SX1 IS
   9 
  10 // Values for makefile.inc
  11 //   PLATFORMOSVER = 31
  12 //   PLATFORMID = 12693 (0x3195) // Found @ 0xfffe0130
  13 //   MAXRAMADDR = 0x07ffffff
  14 //   MEMISOSTART = 0x000c2d08
  15 //   KEYSYS = d4                 // Found @ 0xffff3674
  16 //   NEED_ENCODED_DISKBOOT = 1   // Found @ 0xffff3684
  17 //   ARAM_HEAP_START = 0x3ce000  // Found @ 0xff96a758
  18 //   ARAM_HEAP_SIZE  = 0x32000   // Found @ 0xff96a718
  19 
  20 // Detected address ranges:
  21 // ROM      0xff810000 - 0xffffffff (8323072 bytes)
  22 // RAM data 0x00001900 - 0x00011934 copied from 0xffbe2c64 (  65588 bytes)
  23 
  24 // Stubs below should be checked. Stub not matched 100%, or difference found to current 'stubs_entry_2.S'
  25 //    Name                                     Address      Rule  %  Comp to stubs_entry_2.S
  26 //NHSTUB(ExitFromCompensationEVF              ,0xff825b88) //104        *** != 0xff825bac
  27 //NHSTUB(kbd_pwr_off                          ,0xff84da28) //  2 60%    *** != 0x00000000
  28 
  29 // Check of modemap from 'platform/CAMERA/shooting.c':
  30 // Firmware modemap table found @ffaa2ff8 -> ffbbb0cc
  31 // No problems found with modemap table.
  32 
  33 // Values below can be overridden in 'stubs_min.S':
  34 DEF(physw_status                            ,0x00012da4) // Found @0xff821af4
  35 DEF(physw_run                               ,0x00001c30) // Found @0xff821768
  36 DEF(physw_sleep_delay                       ,0x00001c2e) // Found @0xff821768
  37 DEF(levent_table                            ,0xffb89f4c) // Found @0xffb89f4c
  38 DEF(FlashParamsTable                        ,0xffbbb2a4) // Found @0xffbbb2a4
  39 DEF(movie_status                            ,0x000055a8) // Found @0xff867b10
  40 DEF(video_compression_rate                  ,0x000055d4) // Found @0xff867d14
  41 DEF(canon_menu_active                       ,0x00005a5c) // Found @0xff87e710
  42 DEF(canon_shoot_menu_active                 ,0x0000b819) // Found @0xff9a688c
  43 DEF(playrec_mode                            ,0x000057c4) // Found @0xff8716c8
  44 DEF(zoom_status                             ,0x0000f2a0) // Found @0xffaa4d24
  45 DEF(some_flag_for_af_scan                   ,0x0000a5e8) // Found @0xff95e58c
  46 // focus_len_table contains zoom focus lengths for use in 'get_focal_length' (main.c).
  47 // each entry contains 1 int value, which is the the zoom focus length.
  48 // there are 6 entries in the table - set NUM_FL to 6
  49 DEF(focus_len_table                         ,0xffbbeba4) // Found @0xffbbeba4
  50 DEF(zoom_busy                               ,0x00009ae8) // Found @0xff953f40
  51 DEF(focus_busy                              ,0x00009974) // Found @0xff94cf54
  52 //DEF(recreview_hold                          ,0x0000678c) // Found @0xff89020c, ** != ** stubs_min = 0x0000b400 (0xB31C+0xE4)
  53 // Camera has 2 RAW buffers @ 0x41b724c0 & 0x435627d8
  54 //  Note: active buffer --> raw_buffers[ active_raw_buffer   *3]
  55 //        other buffer  --> raw_buffers[(active_raw_buffer^1)*3]
  56 DEF(raw_buffers                             ,0xffb37040) // Found @0xffb37040
  57 DEF(active_raw_buffer                       ,0x00005764) // Found @0xff86e680
  58 DEF(fileio_semaphore                        ,0x00002bc0) // Found @0xff85caa4
  59 DEF(exmem_alloc_table                       ,0x0001d3d8) // Found @0xff877f80
  60 DEF(exmem_types_table                       ,0xffbe6c18) // Found @0x000058b4
  61 DEF_CONST(exmem_type_count                  ,0x00000012)
  62 DEF(imager_active                           ,0x00001fbc) // Found @0xff83787c (0x1fb8 + 4)
  63 DEF_CONST(uiprop_count                      ,0x00000069) // Found @0xff98c940
  64 
  65 // Values below go in 'lib.c':
  66 //void *vid_get_bitmap_fb()        { return (void*)0x40471000; }             // Found @0xff84807c
  67 //void *vid_get_viewport_fb()      { return (void*)0x4133bb10; }             // Found @0xffafc454
  68 DEF(viewport_fb_d                           ,0x00005420) // Found 0x53c8 (@0xff85fbb0) + 0x58 (@0xff85fbdc)
  69 //void *vid_get_viewport_fb_d()    { return (void*)(*(int*)(0x53c8+0x58)); } // Found @0xff85fbb0 & 0xff85fbdc
  70 DEF(jpeg_count_str                          ,0x0005ced4) // Found @0xff9ed730
  71 //char *camera_jpeg_count_str()    { return (char*)0x0005ced4; }             // Found @0xff9ed730
  72 //int get_flash_params_count(void) { return 0x79; }                          // Found @0xff98d594
  73 
  74 // Bitmap masks and physw_status index values for SD_READONLY and USB power flags (for kbd.c).
  75 //#define SD_READONLY_FLAG    0x00020000 // Found @0xffb36734, levent 0x90a
  76 //#define SD_READONLY_IDX     2
  77 //#define USB_MASK            0x00040000 // Found @0xffb36740, levent 0x902
  78 //#define USB_IDX             2
  79 //#define BATTCOVER_FLAG      0x00008000 // Found @0xffb365f0, levent 0x905
  80 //#define BATTCOVER_IDX       0
  81 //#define HOTSHOE_FLAG        0x10000000 // Found @0xffb367ac, levent 0x904
  82 //#define HOTSHOE_IDX         2
  83 //#define ANALOG_AV_FLAG      0x00100000 // Found @0xffb36758, levent 0x900 (non-inverted logic)
  84 //#define ANALOG_AV_IDX       2
  85 
  86 // Keymap values for kbd.c. Additional keys may be present, only common values included here.
  87 //static KeyMap keymap[] = {
  88 //    { 0, KEY_SHOOT_FULL      ,0x00000003 }, // Found @0xffb365cc, levent 0x01
  89 //    { 0, KEY_SHOOT_FULL_ONLY ,0x00000002 }, // Found @0xffb365cc, levent 0x01
  90 //    { 0, KEY_SHOOT_HALF      ,0x00000001 }, // Found @0xffb365c0, levent 0x00
  91 //    { 0, KEY_POWER           ,0x00002000 }, // Found @0xffb365d8, levent 0x600
  92 //    { 0, KEY_PLAYBACK        ,0x00004000 }, // Found @0xffb365e4, levent 0x601
  93 //    { 1, KEY_VIDEO           ,0x00000020 }, // Found @0xffb36638, levent 0x12
  94 //    { 1, KEY_SET             ,0x00000100 }, // Found @0xffb3665c, levent 0x08
  95 //    { 1, KEY_DISPLAY         ,0x00000200 }, // Found @0xffb36668, levent 0x0a
  96 //    { 1, KEY_UP              ,0x00000400 }, // Found @0xffb36674, levent 0x04
  97 //    { 1, KEY_DOWN            ,0x00000800 }, // Found @0xffb36680, levent 0x05
  98 //    { 1, KEY_RIGHT           ,0x00001000 }, // Found @0xffb3668c, levent 0x07
  99 //    { 1, KEY_LEFT            ,0x00002000 }, // Found @0xffb36698, levent 0x06
 100 //    { 1, KEY_MENU            ,0x00004000 }, // Found @0xffb366a4, levent 0x09
 101 //    { 0, 0, 0 }
 102 //};
 103 
 104 // Values below go in 'platform_camera.h':
 105 //#define CAM_DRYOS         1
 106 //#define CAM_RAW_ROWPIX    4152 // Found @0xffaf52d8
 107 //#define CAM_RAW_ROWS      2772 // Found @0xffaf52dc
 108 //#undef  CAM_UNCACHED_BIT
 109 //#define CAM_UNCACHED_BIT  0x40000000 // Found @0xff8280b0
 110 //#define PARAM_CAMERA_NAME 4 // Found @0xffbbd71c
 111 
 112 // Known propcases
 113 // //      PROPCASE_AFSTEP 13
 114 // #define PROPCASE_FOCUS_STATE 18
 115 // #define PROPCASE_AV 23
 116 // #define PROPCASE_BV 34
 117 // //      PROPCASE_DELTA_DIGITALGAIN 77
 118 // #define PROPCASE_DELTA_SV 79
 119 // //      PROPCASE_DELTA_ND 80
 120 // #define PROPCASE_EV_CORRECTION_2 207
 121 // #define PROPCASE_ORIENTATION_SENSOR 219
 122 // #define PROPCASE_SV_MARKET 246
 123 // //      PROPCASE_SVFIX 247
 124 // #define PROPCASE_TV 262
 125 // Guessed propset: 2
 126 
 127 // Misc stuff
 128 DEF(ctypes, 0xffb2b0c6)
 129 
 130 // EXMEM types:
 131 // EXMEM_RAMDISK        0
 132 // EXMEM_COM            1
 133 // EXMEM_FORMATTER      2
 134 // EXMEM_SHADING        3
 135 // EXMEM_FAMODE         4
 136 // EXMEM_FIRMUP         5
 137 // EXMEM_FIRMUP_VRAM    6
 138 // EXMEM_FIRMUP_INFLATE 7
 139 // EXMEM_DVLPWORK       8
 140 // EXMEM_EVF            9
 141 // EXMEM_SCRIPT         10
 142 // EXMEM_FILESTORE      11
 143 // EXMEM_MOVIE_REC      12
 144 // EXMEM_MOVIE_PLY      13
 145 // EXMEM_WIDE           14
 146 // EXMEM_NARROW         15
 147 // EXMEM_CRAW_REC       16
 148 // EXMEM_PCEVF          17
 149 
 150 // ISR flag: 0x195c, pointer to current task's control block: 0x1958
 151 // pointer to TCB area: 0x19e8, found @ 0xff815724
 152 
 153 // LED table init @ 0xff905e5c
 154 // LED #1: 0xc02200b4, offset 0x244
 155 
 156 // For capt_seq.c
 157 DEF(_nrflag,0xa5cc) // Found @ ff960d5c (0xa5d0) & ff960d78 (-0x04)
 158 //static long *nrflag = (long*)(0xa5d0-0x04);  // Found @ ff960d5c & ff960d74
 159 
 160 // Stubs below matched 100%.
 161 //    Name                                     Address                Comp to stubs_entry_2.S
 162 NHSTUB(AllocateUncacheableMemory              ,0xff82806c) //112
 163 NHSTUB(Close                                  ,0xff823a44) //120
 164 NHSTUB(CreateBinarySemaphore                  ,0xff82784c) //115
 165 NHSTUB(CreateTask                             ,0xff81aef4) //120
 166 NHSTUB(DebugAssert                            ,0xff81b1cc) //107
 167 NHSTUB(DeleteDirectory_Fut                    ,0xff8233d4) //116
 168 NHSTUB(DeleteFile_Fut                         ,0xff8232f0) //112
 169 NHSTUB(DoAELock                               ,0xff825be8) //120
 170 NHSTUB(DoAFLock                               ,0xff825898) //120
 171 NHSTUB(EnterToCompensationEVF                 ,0xff825b44) //104
 172 NHSTUB(ExecuteEventProcedure                  ,0xff879ea0) //104
 173 NHSTUB(ExitTask                               ,0xff81b184) //120
 174 NHSTUB(ExpCtrlTool_StartContiAE               ,0xff8312a4) //104
 175 NHSTUB(ExpCtrlTool_StopContiAE                ,0xff8313e8) //104
 176 NHSTUB(Fclose_Fut                             ,0xff82346c) //120
 177 NHSTUB(Feof_Fut                               ,0xff823658) //  1
 178 NHSTUB(Fflush_Fut                             ,0xff823694) //  1
 179 NHSTUB(Fgets_Fut                              ,0xff8235c0) //  1
 180 NHSTUB(Fopen_Fut                              ,0xff82342c) //120
 181 NHSTUB(Fread_Fut                              ,0xff823518) //120
 182 NHSTUB(FreeUncacheableMemory                  ,0xff8280ac) //112
 183 NHSTUB(Fseek_Fut                              ,0xff82360c) //120
 184 NHSTUB(Fwrite_Fut                             ,0xff82356c) //120
 185 NHSTUB(GetBatteryTemperature                  ,0xff850b00) //102
 186 NHSTUB(GetCCDTemperature                      ,0xff850a90) //102
 187 NHSTUB(GetCurrentAvValue                      ,0xff94f5d4) //120
 188 NHSTUB(GetCurrentShutterSpeed                 ,0xff8a1df4) //120
 189 NHSTUB(GetUsableMaxAv                         ,0xffaf66bc) //120
 190 NHSTUB(GetUsableMinAv                         ,0xffaf66a4) //120
 191 NHSTUB(GetDrive_ClusterSize                   ,0xff85e284) //  1
 192 NHSTUB(GetDrive_FreeClusters                  ,0xff85e2ec) //  1
 193 NHSTUB(GetDrive_TotalClusters                 ,0xff85e2b8) //  1
 194 NHSTUB(GetFocusLensSubjectDistance            ,0xff94da5c) //102
 195 NHSTUB(GetFocusLensSubjectDistanceFromLens    ,0xff94dd68) //  3
 196 NHSTUB(GetKbdState                            ,0xff84d880) //109
 197 NHSTUB(GetMemInfo                             ,0xff813c24) //115
 198 NHSTUB(GetOpticalTemperature                  ,0xff850b70) //120
 199 NHSTUB(GetParameterData                       ,0xff98d554) //101
 200 NHSTUB(GetPropertyCase                        ,0xff87dbcc) //102
 201 NHSTUB(GetSystemTime                          ,0xffa91bf4) //120
 202 NHSTUB(GetVRAMHPixelsSize                     ,0xff83d4e8) //120
 203 NHSTUB(GetVRAMVPixelsSize                     ,0xff83d4f4) //120
 204 NHSTUB(GetZoomLensCurrentPoint                ,0xff9548a8) //120
 205 NHSTUB(GetZoomLensCurrentPosition             ,0xffa820f8) //102
 206 NHSTUB(GiveSemaphore                          ,0xff827a88) //120
 207 NHSTUB(IsStrobeChargeCompleted                ,0xff8bdbdc) //102
 208 NHSTUB(LEDDrive                               ,0xff84cc34) //120
 209 NHSTUB(LocalTime                              ,0xff87763c) //115
 210 NHSTUB(LockMainPower                          ,0xff885580) //120
 211 NHSTUB(MakeDirectory_Fut                      ,0xff823364) //116
 212 NHSTUB(MoveFocusLensToDistance                ,0xffaf8794) //102
 213 NHSTUB(MoveIrisWithAv                         ,0xffa8c384) //120
 214 NHSTUB(MoveZoomLensWithPoint                  ,0xffa8caac) //120
 215 NHSTUB(MoveOpticalZoomAt                      ,0xff82508c) //109
 216 NHSTUB(Open                                   ,0xff823a1c) //120
 217 NHSTUB(PB2Rec                                 ,0xff888840) //104
 218 NHSTUB(PT_MoveDigitalZoomToWide               ,0xff8697c0) //120
 219 NHSTUB(PT_MoveOpticalZoomAt                   ,0xff869798) //120
 220 NHSTUB(PT_PlaySound                           ,0xff869110) //102
 221 NHSTUB(PostLogicalEventForNotPowerType        ,0xff88328c) //120
 222 NHSTUB(PostLogicalEventToUI                   ,0xff8832d8) //120
 223 NHSTUB(PutInNdFilter                          ,0xffa8c930) //102
 224 NHSTUB(PutOutNdFilter                         ,0xffa8c954) //102
 225 NHSTUB(Read                                   ,0xff819a4c) //120
 226 NHSTUB(ReadFastDir                            ,0xffa6fe64) //  1
 227 NHSTUB(Rec2PB                                 ,0xff8871b8) //104
 228 NHSTUB(RefreshPhysicalScreen                  ,0xff9fa6fc) //104
 229 NHSTUB(RenameFile_Fut                         ,0xff82329c) //  1
 230 NHSTUB(Restart                                ,0xff8298f0) //122
 231 NHSTUB(SetAE_ShutterSpeed                     ,0xffafb614) //102
 232 NHSTUB(SetAutoShutdownTime                    ,0xff8855f4) //120
 233 NHSTUB(SetCurrentCaptureModeType              ,0xff88d348) //120
 234 NHSTUB(SetFileAttributes                      ,0xff823d70) //  1
 235 NHSTUB(SetFileTimeStamp                       ,0xff823d20) //  1
 236 NHSTUB(SetLogicalEventActive                  ,0xff885240) //120
 237 NHSTUB(SetParameterData                       ,0xff98d430) //101
 238 NHSTUB(SetPropertyCase                        ,0xff87dac4) //102
 239 NHSTUB(SetScriptMode                          ,0xff885290) //120
 240 NHSTUB(SleepTask                              ,0xff827cf0) //120
 241 NHSTUB(TakeSemaphore                          ,0xff8279b8) //120
 242 NHSTUB(TurnOffBackLight                       ,0xff893fc8) //104
 243 NHSTUB(TurnOnBackLight                        ,0xff893fb0) //104
 244 NHSTUB(TurnOnDisplay                          ,0xff8481a0) //120
 245 NHSTUB(TurnOffDisplay                         ,0xff8481b0) //120
 246 NHSTUB(UIFS_WriteFirmInfoToFile               ,0xff978be0) //120
 247 NHSTUB(UnlockAE                               ,0xff825c0c) //120
 248 NHSTUB(UnlockAF                               ,0xff8258d0) //120
 249 NHSTUB(UnlockMainPower                        ,0xff8854d4) //120
 250 NHSTUB(UpdateMBROnFlash                       ,0xff85e0c4) //105
 251 NHSTUB(VbattGet                               ,0xff82046c) //120
 252 NHSTUB(Write                                  ,0xff823af0) //120
 253 NHSTUB(WriteSDCard                            ,0xff93dd0c) //108
 254 NHSTUB(_log                                   ,0xffb28344) //111
 255 NHSTUB(_log10                                 ,0xffb26fd0) //112
 256 NHSTUB(_pow                                   ,0xffb27140) //121
 257 NHSTUB(_sqrt                                  ,0xffb29fa0) //  1
 258 NHSTUB(add_ptp_handler                        ,0xffa3afbc) //121
 259 NHSTUB(apex2us                                ,0xff9fdbc8) //121
 260 NHSTUB(close                                  ,0xff819864) //109
 261 NHSTUB(err_init_task                          ,0xff814e80) //111
 262 NHSTUB(exmem_alloc                            ,0xff87857c) //103
 263 NHSTUB(exmem_free                             ,0xff8785f4) //103
 264 NHSTUB(free                                   ,0xff813a7c) //112
 265 NHSTUB(get_nd_value                           ,0xffa80674) //122
 266 NHSTUB(get_current_nd_value                   ,0xffa80630) //122
 267 NHSTUB(kbd_p1_f                               ,0xff821bf0) //109
 268 NHSTUB(kbd_p1_f_cont                          ,0xff821bfc) //109
 269 NHSTUB(kbd_p2_f                               ,0xff821408) //109
 270 NHSTUB(kbd_read_keys                          ,0xff821af4) //109
 271 NHSTUB(kbd_read_keys_r2                       ,0xff84d130) //109
 272 NHSTUB(lseek                                  ,0xff823b84) //120
 273 NHSTUB(malloc                                 ,0xff8139a8) //112
 274 NHSTUB(memcmp                                 ,0xff81cba4) //120
 275 NHSTUB(memcpy                                 ,0xff8a0984) //120
 276 NHSTUB(memset                                 ,0xff9fcf00) //120
 277 NHSTUB(mkdir                                  ,0xff823de8) //109
 278 NHSTUB(mktime_ext                             ,0xff8a11f0) //  1
 279 NHSTUB(open                                   ,0xff8197b4) //109
 280 NHSTUB(OpenFastDir                            ,0xffa6fdd0) //  1
 281 NHSTUB(closedir                               ,0xffa6ff34) //  1
 282 NHSTUB(qsort                                  ,0xffae3d50) //  1
 283 NHSTUB(rand                                   ,0xff81ccac) //121
 284 NHSTUB(realloc                                ,0xff813b5c) //115
 285 NHSTUB(reboot_fw_update                       ,0xffa77864) //106
 286 NHSTUB(set_control_event                      ,0xff884e9c) //111
 287 NHSTUB(srand                                  ,0xff81cca0) //122
 288 NHSTUB(stat                                   ,0xff823c50) //  1
 289 NHSTUB(strcat                                 ,0xff8a0798) //  1
 290 NHSTUB(strchr                                 ,0xff8a0820) //  1
 291 NHSTUB(strcmp                                 ,0xff81cb3c) //120
 292 NHSTUB(strcpy                                 ,0xff81cb24) //120
 293 NHSTUB(strftime                               ,0xff8a0bf8) //  1
 294 NHSTUB(strlen                                 ,0xff81cb80) //120
 295 NHSTUB(strncmp                                ,0xff8a07d4) //  1
 296 NHSTUB(strncpy                                ,0xff82dbf8) //  1
 297 NHSTUB(strrchr                                ,0xff9fced8) //  1
 298 NHSTUB(strtol                                 ,0xff82de30) //101
 299 NHSTUB(strtolx                                ,0xff82dc34) //109
 300    DEF(task_CaptSeq                           ,0xff86cb80) //120
 301    DEF(task_DvlpSeqTask                       ,0xff961b44) //120
 302    DEF(task_ExpDrv                            ,0xff8b3e4c) //120
 303    DEF(task_FileWrite                         ,0xffa6c6e8) //120
 304    DEF(task_InitFileModules                   ,0xff8892bc) //120
 305    DEF(task_MovieRecord                       ,0xff867d90) //120
 306    DEF(task_PhySw                             ,0xff821764) //120
 307    DEF(task_RotaryEncoder                     ,0xff84daf0) //120
 308 NHSTUB(time                                   ,0xff877c1c) //109
 309 NHSTUB(vsprintf                               ,0xff81cae8) //115
 310 NHSTUB(EngDrvRead                             ,0xff822a30) //102
 311 NHSTUB(PTM_GetCurrentItem                     ,0xff88602c) //105
 312 NHSTUB(CancelHPTimer                          ,0xff8793dc) //119
 313 NHSTUB(SetHPTimerAfterNow                     ,0xff8792d4) //119
 314 NHSTUB(PT_MFOn                                ,0xff869838) //120
 315 NHSTUB(PT_MFOff                               ,0xff869848) //120
 316 NHSTUB(GetAdChValue                           ,0xff84a390) //120
 317 NHSTUB(get_ptp_buf_size                       ,0xff8e71d8) //122
 318 NHSTUB(get_ptp_file_buf                       ,0xffa3c940) //121

/* [<][>][^][v][top][bottom][index][help] */