root/platform/sx170is/sub/101a/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 R52 (DRYOS version 2.3, release #0052)
   6 //   Firmware Ver GM1.01A   // Found @ 0xff889710, "GM1.01A" @ 0xff88971d
   7 //   Firmware build timestamp: Sep 13 2013 12:50:47
   8 //   Canon PowerShot SX170 IS
   9 
  10 // Values for makefile.inc
  11 //   PLATFORMOSVER = 52
  12 //   PLATFORMID = 12918 (0x3276) // Found @ 0xfffe0040
  13 //   MAXRAMADDR = 0x03ffffff
  14 //   MEMISOSTART = 0x0016fb10
  15 //   KEYSYS = d4e                // Found @ 0xffff1d44
  16 //   NEED_ENCODED_DISKBOOT = 11   // Found @ 0xffff1d54
  17 //   ARAM_HEAP_START = 0x34e000  // Found @ 0xff99db0c
  18 //   ARAM_HEAP_SIZE  = 0x22000   // Found @ 0xff99dacc
  19 
  20 // Detected address ranges:
  21 // ROM      0xff810000 - 0xffffffff (8323072 bytes)
  22 // RAM code 0x003f1000 - 0x00400670 copied from 0xffcd5e9c (  63088 bytes)
  23 // RAM data 0x00001900 - 0x00010e98 copied from 0xffcc6904 (  62872 bytes)
  24 
  25 // Stubs below should be checked. Stub not matched 100%, or difference found to current 'stubs_entry_2.S'
  26 //    Name                                     Address      Rule  %  Comp to stubs_entry_2.S
  27 //NHSTUB(DeleteFile_Fut                       ,0xff816bd0) //  1 90%        == 0xff816bd0
  28 //NHSTUB(GetFocusLensSubjectDistanceFromLens  ,0xff983bfc) //  3 90%        == 0xff983bfc
  29 // ERROR: MakeDirectory_Fut is not found.                  //--- ---    *** != 0xff8176e0
  30 // ERROR: RefreshPhysicalScreen is not found.              //--- ---    *** != 0x00000000
  31 // ERROR: WriteSDCard is not found.                        //--- ---    *** != 0xff86e074
  32 
  33 // Check of modemap from 'platform/CAMERA/shooting.c':
  34 // Firmware modemap table found @ffae03dc -> ffc60e44
  35 // No problems found with modemap table.
  36 
  37 // Values below can be overridden in 'stubs_min.S':
  38 DEF(physw_status                            ,0x00011bc0) // Found @0xff81be44
  39 DEF(physw_run                               ,0x00001cf4) // Found @0xff81b990
  40 DEF(physw_sleep_delay                       ,0x00001cfc) // Found @0xff81b990
  41 DEF(levent_table                            ,0xffc0838c) // Found @0xffc0838c
  42 DEF(FlashParamsTable                        ,0xffc610bc) // Found @0xffc610bc
  43 DEF(movie_status                            ,0x000074e4) // Found @0xff98ebe8
  44 DEF(video_compression_rate                  ,0x00007514) // Found @0xff98f358
  45 DEF(full_screen_refresh                     ,0x00007cd8) // Found @0xff9b103c
  46 DEF(canon_menu_active                       ,0x00003f14) // Found @0xff8933f8
  47 DEF(canon_shoot_menu_active                 ,0x000097cd) // Found @0xffa1bc50
  48 DEF(playrec_mode                            ,0x00003678) // Found @0xff8802ac
  49 DEF(zoom_status                             ,0x0000b084) // Found @0xffa7365c
  50 DEF(some_flag_for_af_scan                   ,0x0001d950) // Found @0xffad9000
  51 // focus_len_table contains zoom focus lengths for use in 'get_focal_length' (main.c).
  52 // each entry contains 2 int value(s), the first is the zoom focus length.
  53 // there are 127 entries in the table - set NUM_FL to 127
  54 DEF(focus_len_table                         ,0xfffeabf8) // Found @0xfffeabf8
  55 DEF(zoom_busy                               ,0x00007378) // Found @0xff9892d8
  56 DEF(focus_busy                              ,0x0000714c) // Found @0xff982780
  57 // Palette colour tables  found @ 0xffc0bd1c
  58 // Camera appears to have only 1 RAW buffer @ 0x420e5c30 (Found @0xffb64e44)
  59 DEF(fileio_semaphore                        ,0x00001d6c) // Found @0xff81e394
  60 DEF(exmem_alloc_table                       ,0x00012f34) // Found @0xff823134
  61 DEF(exmem_types_table                       ,0xffcc6e08) // Found @0x00001e04
  62 DEF_CONST(exmem_type_count                  ,0x0000001b)
  63 DEF(imager_active                           ,0x0000209c) // Found @0xff83a308 (0x2098 + 4)
  64 DEF_CONST(uiprop_count                      ,0x00000094) // Found @0xff9a579c
  65 
  66 // Values below go in 'lib.c':
  67 //void *vid_get_bitmap_fb()        { return (void*)0x40431000; }             // Found @0xff8539b0
  68 //void *vid_get_viewport_fb()      { return (void*)0x40586b80; }             // Found @0xffb634c0
  69 DEF(jpeg_count_str                          ,0x000cb220) // Found @0xffa04ddc
  70 //char *camera_jpeg_count_str()    { return (char*)0x000cb220; }             // Found @0xffa04ddc
  71 //int get_flash_params_count(void) { return 0x99; }                          // Found @0xff9a6220
  72 
  73 // Bitmap masks and physw_status index values for SD_READONLY and USB power flags (for kbd.c).
  74 //#define SD_READONLY_FLAG    0x02000000 // Found @0xffbacc24, levent 0x20a
  75 //#define SD_READONLY_IDX     2
  76 //#define USB_MASK            0x10000000 // Found @0xffbacc34, levent 0x202
  77 //#define USB_IDX             2
  78 //#define BATTCOVER_FLAG      0x04000000 // Found @0xffbacc2c, levent 0x205
  79 //#define BATTCOVER_IDX       2
  80 //#define ANALOG_AV_FLAG      0x00002000 // Found @0xffbacb4c, levent 0x200 (non-inverted logic)
  81 //#define ANALOG_AV_IDX       0
  82 
  83 // Keymap values for kbd.c. Additional keys may be present, only common values included here.
  84 //static KeyMap keymap[] = {
  85 //    { 0, KEY_DISPLAY         ,0x80000000 }, // Found @0xffbacb54, levent 0x0c
  86 //    { 1, KEY_SET             ,0x00000001 }, // Found @0xffbacb5c, levent 0x0a
  87 //    { 1, KEY_MENU            ,0x00800000 }, // Found @0xffbacb74, levent 0x0b
  88 //    { 1, KEY_ERASE           ,0x08000000 }, // Found @0xffbacb7c, levent 0x19
  89 //    { 1, KEY_SHOOT_FULL      ,0x30000000 }, // Found @0xffbacb8c, levent 0x01
  90 //    { 1, KEY_SHOOT_FULL_ONLY ,0x20000000 }, // Found @0xffbacb8c, levent 0x01
  91 //    { 1, KEY_SHOOT_HALF      ,0x10000000 }, // Found @0xffbacb84, levent 0x00
  92 //    { 1, KEY_UP              ,0x40000000 }, // Found @0xffbacb94, levent 0x06
  93 //    { 1, KEY_DOWN            ,0x80000000 }, // Found @0xffbacb9c, levent 0x07
  94 //    { 2, KEY_VIDEO           ,0x00000001 }, // Found @0xffbacba4, levent 0x02
  95 //    { 2, KEY_PLAYBACK        ,0x00000008 }, // Found @0xffbacbac, levent 0x101
  96 //    { 2, KEY_POWER           ,0x00000020 }, // Found @0xffbacbb4, levent 0x100
  97 //    { 2, KEY_RIGHT           ,0x00001000 }, // Found @0xffbacbdc, levent 0x09
  98 //    { 2, KEY_LEFT            ,0x00002000 }, // Found @0xffbacbe4, levent 0x08
  99 //    { 0, 0, 0 }
 100 //};
 101 
 102 // Values below go in 'platform_camera.h':
 103 //#define CAM_DRYOS         1
 104 //#define CAM_DRYOS_2_3_R39 1 // Defined for cameras with DryOS version R39 or higher
 105 //#define CAM_DRYOS_2_3_R47 1 // Defined for cameras with DryOS version R47 or higher
 106 //#define CAM_RAW_ROWPIX    4704 // Found @0xff959c2c
 107 //#define CAM_RAW_ROWS      3504 // Found @0xff959c38
 108 //#undef  CAM_UNCACHED_BIT
 109 //#define CAM_UNCACHED_BIT  0x40000000 // Found @0xff815f04
 110 //#define CAM_DATE_FOLDER_NAMING 0x080 // Found @0xffa9ecbc (pass as 3rd param to GetImageFolder)
 111 //#define PARAM_CAMERA_NAME 3 // Found @0xffc60298
 112 //#define CAM_3ARG_DebugAssert 1
 113 
 114 // Known propcases
 115 // //      PROPCASE_AFSTEP 13
 116 // #define PROPCASE_FOCUS_STATE 18
 117 // #define PROPCASE_AV 23
 118 // #define PROPCASE_BV 34
 119 // //      PROPCASE_DELTA_DIGITALGAIN 77
 120 // #define PROPCASE_DELTA_SV 79
 121 // //      PROPCASE_DELTA_ND 80
 122 // #define PROPCASE_EV_CORRECTION_2 210
 123 // #define PROPCASE_ORIENTATION_SENSOR 222
 124 // #define PROPCASE_SV_MARKET 249
 125 // //      PROPCASE_SVFIX 250
 126 // #define PROPCASE_TV 265
 127 // Guessed propset: 6
 128 
 129 // Misc stuff
 130 DEF(ctypes, 0xffbac334)
 131 
 132 // EXMEM types:
 133 // EXMEM_RAMDISK        0
 134 // EXMEM_COM            1
 135 // EXMEM_FORMATTER      2
 136 // EXMEM_SHADING        3
 137 // EXMEM_FAMODE         4
 138 // EXMEM_FIRMUP         5
 139 // EXMEM_FIRMUP_VRAM    6
 140 // EXMEM_FIRMUP_INFLATE 7
 141 // EXMEM_DVLPWORK       8
 142 // EXMEM_EVF            9
 143 // EXMEM_SCRIPT         10
 144 // EXMEM_GPS            11
 145 // EXMEM_FACEAUTH       12
 146 // EXMEM_OHYEARLOG      13
 147 // EXMEM_WIFI           14
 148 // EXMEM_FILESTORE      15
 149 // EXMEM_MOVIE_REC      16
 150 // EXMEM_MOVIE_PLY      17
 151 // EXMEM_WIFI_RESIZE    18
 152 // EXMEM_PCEVF          19
 153 // EXMEM_WIDE           20
 154 // EXMEM_NARROW         21
 155 // EXMEM_AUTO_GIS_MODE  22
 156 // EXMEM_NP_GIS_MODE    23
 157 // EXMEM_TRIPODHDR_MODE 24
 158 // EXMEM_HSHQ_MODE      25
 159 // EXMEM_CRAW_REC       26
 160 
 161 // ISR flag: 0x1944, pointer to current task's control block: 0x1940
 162 // pointer to TCB area: 0x19c4, found @ 0xffcd750c
 163 
 164 // LED table init @ 0xff938ac4
 165 // LED #1: 0xc0223030, offset 0x104
 166 // LED #2: 0xc0220120, offset 0x4
 167 
 168 // For capt_seq.c
 169 DEF(_nrflag,0xa8f8) // Found @ ffa2fe18 (0xa900) & ffa2fe30 (-0x08)
 170 //static long *nrflag = (long*)(0xa900-0x08);  // Found @ ffa2fe18 & ffa2fe28
 171 
 172 // Stubs below matched 100%.
 173 //    Name                                     Address                Comp to stubs_entry_2.S
 174 NHSTUB(AllocateUncacheableMemory              ,0xff815ec0) //112
 175 NHSTUB(Close                                  ,0xff817244) //120
 176 NHSTUB(CreateBinarySemaphore                  ,0x003f7968) //115
 177 NHSTUB(CreateTask                             ,0x003f5778) //120
 178 NHSTUB(DebugAssert                            ,0x003f5a58) //107
 179 NHSTUB(DeleteDirectory_Fut                    ,0xff816c44) //116
 180 NHSTUB(DoAELock                               ,0xff821d94) //120
 181 NHSTUB(DoAFLock                               ,0xff8219fc) //120
 182 NHSTUB(EnterToCompensationEVF                 ,0xff821cec) //104
 183 NHSTUB(ExecuteEventProcedure                  ,0xff823bf0) //104
 184 NHSTUB(ExitFromCompensationEVF                ,0xff821d34) //104
 185 NHSTUB(ExitTask                               ,0x003f5a04) //120
 186 NHSTUB(ExpCtrlTool_StartContiAE               ,0xff832c1c) //104
 187 NHSTUB(ExpCtrlTool_StopContiAE                ,0xff832d90) //104
 188 NHSTUB(Fclose_Fut                             ,0xff816cdc) //120
 189 NHSTUB(Feof_Fut                               ,0xff816ec8) //  1
 190 NHSTUB(Fflush_Fut                             ,0xff816f04) //  1
 191 NHSTUB(Fgets_Fut                              ,0xff816e30) //  6
 192 NHSTUB(Fopen_Fut                              ,0xff816c9c) //120
 193 NHSTUB(Fread_Fut                              ,0xff816d88) //120
 194 NHSTUB(FreeUncacheableMemory                  ,0xff815efc) //112
 195 NHSTUB(Fseek_Fut                              ,0xff816e7c) //120
 196 NHSTUB(Fwrite_Fut                             ,0xff816ddc) //120
 197 NHSTUB(GetBatteryTemperature                  ,0xff85c2c0) //102
 198 NHSTUB(GetCCDTemperature                      ,0xff85c248) //102
 199 NHSTUB(GetCurrentAvValue                      ,0xff8733a8) //120
 200 NHSTUB(GetCurrentShutterSpeed                 ,0xff8b530c) //120
 201 NHSTUB(GetUsableMaxAv                         ,0xff95a600) //120
 202 NHSTUB(GetUsableMinAv                         ,0xff95a5e4) //120
 203 NHSTUB(GetDrive_ClusterSize                   ,0xff81fa20) //122
 204 NHSTUB(GetDrive_FreeClusters                  ,0xff82026c) //119
 205 NHSTUB(GetDrive_TotalClusters                 ,0xff820240) //122
 206 NHSTUB(GetFocusLensSubjectDistance            ,0xff983818) //102
 207 NHSTUB(GetImageFolder                         ,0xff961580) //122
 208 NHSTUB(GetKbdState                            ,0xff858e1c) //109
 209 NHSTUB(GetMemInfo                             ,0xff81369c) //115
 210 NHSTUB(GetOpticalTemperature                  ,0xff85c338) //120
 211 NHSTUB(GetParameterData                       ,0xff9a61dc) //101
 212 NHSTUB(GetPropertyCase                        ,0xff88af50) //101
 213 NHSTUB(GetSystemTime                          ,0xffadd774) //120
 214 NHSTUB(GetVRAMHPixelsSize                     ,0xff83fa30) //120
 215 NHSTUB(GetVRAMVPixelsSize                     ,0xff83fa3c) //120
 216 NHSTUB(GetZoomLensCurrentPoint                ,0xff989758) //120
 217 NHSTUB(GetZoomLensCurrentPosition             ,0xffac8d5c) //102
 218 NHSTUB(GiveSemaphore                          ,0x003f7bc8) //120
 219 NHSTUB(IsStrobeChargeCompleted                ,0xff8e5114) //102
 220 NHSTUB(LEDDrive                               ,0xff990a60) //120
 221 NHSTUB(LocalTime                              ,0x003f9a38) //115
 222 NHSTUB(LockMainPower                          ,0xff88f230) //120
 223 NHSTUB(MoveFocusLensToDistance                ,0xffb5f04c) //102
 224 NHSTUB(MoveIrisWithAv                         ,0xffad6c34) //120
 225 NHSTUB(MoveZoomLensWithPoint                  ,0xffad7650) //120
 226 NHSTUB(Open                                   ,0xff81717c) //120
 227 NHSTUB(PB2Rec                                 ,0xff84948c) //104
 228 NHSTUB(PT_MoveDigitalZoomToWide               ,0xff991b8c) //102
 229 NHSTUB(PT_MoveOpticalZoomAt                   ,0xff991b5c) //102
 230 NHSTUB(PT_PlaySound                           ,0xff89f1b4) //122
 231 NHSTUB(PostLogicalEventForNotPowerType        ,0xff88cde4) //120
 232 NHSTUB(PostLogicalEventToUI                   ,0xff88ce30) //120
 233 NHSTUB(PutInNdFilter                          ,0xffb5dad4) //102
 234 NHSTUB(PutOutNdFilter                         ,0xffb5db10) //102
 235 NHSTUB(Read                                   ,0xff814158) //120
 236 NHSTUB(ReadFastDir                            ,0xffab6ea4) //115
 237 NHSTUB(Rec2PB                                 ,0xff8494cc) //104
 238 NHSTUB(RenameFile_Fut                         ,0xff816b3c) //116
 239 NHSTUB(Restart                                ,0xff826c3c) //122
 240 NHSTUB(ScreenLock                             ,0xff892d08) //117
 241 NHSTUB(ScreenUnlock                           ,0xff892d5c) //117
 242 NHSTUB(SetAE_ShutterSpeed                     ,0xffb62398) //102
 243 NHSTUB(SetAutoShutdownTime                    ,0xff88f2a8) //120
 244 NHSTUB(SetCurrentCaptureModeType              ,0xff89c068) //120
 245 NHSTUB(SetFileAttributes                      ,0xff817648) //  6
 246 NHSTUB(SetFileTimeStamp                       ,0xff8175d0) //  6
 247 NHSTUB(SetLogicalEventActive                  ,0xff88ef6c) //120
 248 NHSTUB(SetParameterData                       ,0xff9a6140) //101
 249 NHSTUB(SetPropertyCase                        ,0xff88adb0) //101
 250 NHSTUB(SetScriptMode                          ,0xff88efc0) //120
 251 NHSTUB(SleepTask                              ,0x003f8d2c) //120
 252 NHSTUB(TakeSemaphore                          ,0x003f7af0) //120
 253 NHSTUB(TurnOffBackLight                       ,0xff89ea58) //104
 254 NHSTUB(TurnOnBackLight                        ,0xff89ea40) //104
 255 NHSTUB(TurnOnDisplay                          ,0xff853db0) //120
 256 NHSTUB(TurnOffDisplay                         ,0xff853dc0) //120
 257 NHSTUB(UIFS_WriteFirmInfoToFile               ,0xff9c501c) //120
 258 NHSTUB(UnlockAE                               ,0xff821e24) //120
 259 NHSTUB(UnlockAF                               ,0xff821a2c) //120
 260 NHSTUB(UnlockMainPower                        ,0xff88f180) //120
 261 NHSTUB(VbattGet                               ,0xff81abc8) //120
 262 NHSTUB(Write                                  ,0xff817298) //120
 263 NHSTUB(_log                                   ,0x003fcbc8) //111
 264 NHSTUB(_log10                                 ,0x003fd108) //112
 265 NHSTUB(_pow                                   ,0x003fd280) //121
 266 NHSTUB(_sqrt                                  ,0x003feea4) //  6
 267 NHSTUB(add_ptp_handler                        ,0xffa6ced0) //121
 268 NHSTUB(apex2us                                ,0xffa28c80) //121
 269 NHSTUB(close                                  ,0xff813fb4) //109
 270 NHSTUB(err_init_task                          ,0xff814a48) //111
 271 NHSTUB(exmem_alloc                            ,0xff82373c) //101
 272 NHSTUB(exmem_free                             ,0xff8237b4) //101
 273 NHSTUB(free                                   ,0xff8152f0) //112
 274 NHSTUB(kbd_p1_f                               ,0xff81be94) //109
 275 NHSTUB(kbd_p1_f_cont                          ,0xff81bea0) //109
 276 NHSTUB(kbd_p2_f                               ,0xff81b628) //109
 277 NHSTUB(kbd_read_keys                          ,0xff81be44) //109
 278 NHSTUB(kbd_read_keys_r2                       ,0xff8586dc) //109
 279 NHSTUB(lseek                                  ,0xff817460) //120
 280 NHSTUB(malloc                                 ,0xff815298) //112
 281 NHSTUB(memcmp                                 ,0xff815070) //120
 282 NHSTUB(memcpy                                 ,0xff8a2bcc) //120
 283 NHSTUB(memset                                 ,0xffa2346c) //120
 284 NHSTUB(mkdir                                  ,0xff8176e0) //121
 285 NHSTUB(mktime_ext                             ,0xff8a2454) //  1
 286 NHSTUB(open                                   ,0xff813f04) //109
 287 NHSTUB(OpenFastDir                            ,0xffab6d50) //115
 288 NHSTUB(closedir                               ,0xffab6d00) //121
 289 NHSTUB(get_fstype                             ,0xff81f998) //122
 290 NHSTUB(qsort                                  ,0xffb3a198) //  6
 291 NHSTUB(rand                                   ,0xffa2343c) //121
 292 NHSTUB(realloc                                ,0xffa234e8) //115
 293 NHSTUB(reboot_fw_update                       ,0xffadcdfc) //106
 294 NHSTUB(set_control_event                      ,0xff88eb60) //111
 295 NHSTUB(srand                                  ,0xffa23430) //122
 296 NHSTUB(stat                                   ,0xff8174a8) //109
 297 NHSTUB(strcat                                 ,0xff82761c) //  1
 298 NHSTUB(strchr                                 ,0xff8276a4) //  1
 299 NHSTUB(strcmp                                 ,0xff81516c) //120
 300 NHSTUB(strcpy                                 ,0xff815058) //120
 301 NHSTUB(strftime                               ,0xff8a24a0) //113
 302 NHSTUB(strlen                                 ,0xff8151b0) //120
 303 NHSTUB(strncmp                                ,0xff827658) //  1
 304 NHSTUB(strncpy                                ,0xff817dd8) //  1
 305 NHSTUB(strrchr                                ,0xff8a2d18) //  1
 306 NHSTUB(strtol                                 ,0xff827608) //101
 307 NHSTUB(strtolx                                ,0xff82740c) //109
 308    DEF(task_CaptSeq                           ,0xff87a64c) //120
 309    DEF(task_DvlpSeqTask                       ,0xff99581c) //120
 310    DEF(task_ExpDrv                            ,0xff8cb99c) //120
 311    DEF(task_FileWrite                         ,0xffab5b4c) //120
 312    DEF(task_InitFileModules                   ,0xff849e18) //120
 313    DEF(task_MovieRecord                       ,0xff98f82c) //120
 314    DEF(task_PhySw                             ,0xff81b98c) //120
 315    DEF(task_RotaryEncoder                     ,0xff858f98) //120
 316    DEF(hook_CreateTask                        ,0x003f5778) //105
 317 NHSTUB(time                                   ,0x003f9210) //119
 318 NHSTUB(vsprintf                               ,0xff817d98) //115
 319 NHSTUB(EngDrvRead                             ,0xff81bfa0) //102
 320 NHSTUB(PTM_GetCurrentItem                     ,0xff890ec8) //105
 321 NHSTUB(DisableISDriveError                    ,0xffad8164) //120
 322 NHSTUB(CancelHPTimer                          ,0xff8877b8) //119
 323 NHSTUB(SetHPTimerAfterNow                     ,0xff8876b0) //119
 324 NHSTUB(SS_MFOn                                ,0xff991c20) //120
 325 NHSTUB(SS_MFOff                               ,0xff991c30) //120
 326 NHSTUB(GetAdChValue                           ,0xff854f30) //120
 327 NHSTUB(get_ptp_buf_size                       ,0xff916980) //122
 328 NHSTUB(get_ptp_file_buf                       ,0xffa6ea24) //121

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