source: branches/juciphox/platform/s5is/sub/101a/stubs_entry_2.S @ 461

Revision 461, 8.9 KB checked in by phyrephox, 5 years ago (diff)

+ new OSD Element - Temperature

+ video quality control added. when enabled (in video overrides), by the use of the up/down button you can increase or decrease movie quality OR bitrate (depends on what you enabled in the video override menu) - WHILE you are recording!

  • changed Fast video control so that it isnt enabled at default, only works on a few cameras (pause and unpause movie by pressing left/right while recording) - needs further development
  • when using fast video control switch and the pause function now the remaining time calculation is reset, so it reflects the change in bitrate faster
  • changed a few default conf values (symbols now enabled at default, because symbol file now is served together with binary)

+ introduced new versioning system: 0.10 now, X.10 will be major release (and probably without bugs, with proper documentation, scripts, optimized etc), 0.X0 will be something like "new features, a bit ironing out etc", 0.1X will be just bugfixes and really small changes
+ added vers.req to svn, will be included in zipfile when autobuilded, will definitly be useful...
+ wrote two sample readmes, one for dryos, one for vxworks, they are included in the batch-zip-complete archives, in respect to OS version. these are just drafts, need input from you. yeah you heard me, from YOU!
+ added version.txt that will also be included in said archive, reflecting latest changes. it is not cleaned up as of now, probably never will be, but gives a rough overview over latest development
+ added ubasic statement case/select switch by CHDKLover from here: http://chdk.setepontos.com/index.php/topic,1995.0.html as of now i chose the "safe" method, the multi statement, due to people not reacting. hopefully they test it in this build so we can decide on one option!

  • renamed get_movie_state to get_movie_status in ubasic

+ added command get_temperature (example: "get_temperature 0", 0 returns optical, 1 returns CCD and 2 returns battery temp)
+ added a few grids from the wiki
+ changed makefile bigtime: now with new command batch-zip-complete you now have an environment to compile a complete CHDK archive for each cam including binaries, readmes (according to OS), scripts, version history and so on. it is planned that the archive will be crammed with useful information (readmes, howtos - into the books folder), grids, scripts (working ones, universal ones, and also code fragments that will serve as examples), curves, symbols, fonts (copyright!?) and so on. as of now i just added a few of these, and some dummy texts so that zip file will accept the folders. again i need YOU to help on developing a good structure and good scripts, readmes and so on. with this build, people no longer need to sift through the wiki or the forum to find all the good stuff. at least i do hope so.

  • changed random command, now you can supply two values min & max.

example: "playsound random 3 6" will play the sounds 3,4,5,6 in random order (if repeated in a while loop)

+ added ewavrs sx100 patch from here: http://tools.assembla.com/chdk/changeset/460 (adjustable alt button)
+ added new command playsound. can and should be used from ubasic, via "playsound 0", where 0 is the startup sound. there are sounds ranging from 0 to 7, 7 being a nasty long beep. the first few sounds can only be played if they are NOT muted by the camera, the other beeps will be played though (cam must be unmuted though, didnt test it with the nasty error beep though i gotta admit). this feature will lead to many more features, for example anti theft protection together with DGs Disco lights ;)

0 = startup sound, 1 = shutter sound, 2 = button press sound, 3 = selftimer, 4 = short beep, 5 = af confirmation, 6 = error beep, 7 = long beeeeeeeeeeeeeeeeeeep (nasty!)

  • adjusted makefile.inc so that all cameras are in it now (defaulted to my s3is by the way, not that it should matter)

+ added whoever's fix for ixus950's touchwheel behaviour from here: http://chdk.setepontos.com/index.php/topic,2024.0.html

  • lng files (german & english), also copied to new folder CHDK\LANG (for gmake batch-zip-complete)

thanks to Ewavr, Hacki, reyalp, ljl, jucifer and all the guys hanging out in the irc chan ;)

ps: i hope i didnt forget anything or anyone.

p.p.s: introducing with this build we might actually have an autobuild server... wait and see in the forums...

Line 
1    #include "stubs_asm.h"
2
3NHSTUB(SleepTask                              ,0xFF82AC20)
4NHSTUB(CreateTask                             ,0xFF81B9C4)
5NHSTUB(ExitTask                               ,0xFF81BC54)
6NHSTUB(AllocateMemory                         ,0xFFA41170)
7
8// Look over all these again, some point to a B sub_.... so that's unnecessary.
9NHSTUB(ExecuteEventProcedure                  ,0xFF81BF64)
10NHSTUB(FreeMemory                             ,0xFFA4115C)
11NHSTUB(GetCurrentTargetDistance               ,0xFF95126C)
12NHSTUB(GetSystemTime                          ,0xFFA4126C)
13NHSTUB(ints_disable                           ,0xFF81058C) // Actually identified as IRQdisable by signatures
14NHSTUB(ints_enable                            ,0xFF8105B4) // Actually identified as IRQenable by signatures
15NHSTUB(memcmp                                 ,0xFF81E72C)
16NHSTUB(memcpy                                 ,0xFF8B32C8)
17NHSTUB(memset                                 ,0xFFA64C5C)
18NHSTUB(Close                                  ,0xFF825D8C)
19NHSTUB(Open                                   ,0xFF825D64)
20NHSTUB(Read                                   ,0xFF825E34)
21NHSTUB(Write                                  ,0xFF825E38)
22NHSTUB(Lseek                                  ,0xFF825F94)
23NHSTUB(strcmp                                 ,0xFF81E6C4)
24NHSTUB(strcpy                                 ,0xFF81E670)
25NHSTUB(strlen                                 ,0xFF81E708)
26NHSTUB(TakeSemaphore                          ,0xFF81B860)
27NHSTUB(vsprintf                               ,0xFF81E5F0)    // first sub called in FADBGPrintf
28NHSTUB(GetFocusLensSubjectDistance            ,0xFF95250C)    // returns 0. What's wrong?
29NHSTUB(GetZoomLensCurrentPoint                ,0xFF957D84)
30NHSTUB(GetZoomLensCurrentPosition             ,0xFF957D88)
31NHSTUB(RefreshPhysicalScreen                  ,0xFF8B2E58)
32NHSTUB(GetPropertyCase                        ,0xFF874864)    // PT_GetPropertyCaseString
33NHSTUB(SetPropertyCase                        ,0xFF874774)    // PT_SetPropertyCaseString
34NHSTUB(VbattGet                               ,0xFF8222CC)   
35NHSTUB(GetParameterData                       ,0xFF973028) // Guess but it seems correct. IDA incorrectly identified sub_FF972524 as GetParameterData
36NHSTUB(SetParameterData                       ,0xFF972F9C) // Idem, with different address though :)
37NHSTUB(IsStrobeChargeCompleted                ,0xFF8DB5FC)
38
39
40// these (open, write, close) are educated guesses but not 100% certain
41NHSTUB(open                                   ,0xFF81A030)
42NHSTUB(write                                  ,0xFF81A328)
43NHSTUB(close                                  ,0xFF81A0E0)
44NHSTUB(lseek                                  ,0xFF825ECC) // Lseek_0
45NHSTUB(read                                   ,0xFF81A2C8) // Read
46
47NHSTUB(Fopen_Fut                              ,0xFF825730)
48NHSTUB(Fwrite_Fut                             ,0xFF825870)
49NHSTUB(Fclose_Fut                             ,0xFF825770)
50NHSTUB(Fread_Fut                              ,0xFF82581C)
51NHSTUB(Fseek_Fut                              ,0xFF825910)
52
53NHSTUB(Remove                                 ,0xFF825DD4)
54NHSTUB(rename                                 ,0xFF825E60)
55
56NHSTUB(stat                                   ,0xFF825F98)
57NHSTUB(openfastdir                            ,0xFFA27934)
58NHSTUB(readfastdir                            ,0xFFA279C8)
59NHSTUB(closefastdir                           ,0xFFA27A98)
60
61NHSTUB(opendir                                ,0xFFA27934) // OpenFastDir
62NHSTUB(ReadFastDir                            ,0xFFA279C8)
63NHSTUB(closedir                               ,0xFFA27A98) // CloseFastDir
64NHSTUB(mkdir                                  ,0xFF826130)
65
66NHSTUB(GetDrive_ClusterSize                   ,0xFF856DD0)
67NHSTUB(GetDrive_TotalClusters                 ,0xFF856E04)
68NHSTUB(GetDrive_FreeClusters                  ,0xFF856E70)
69
70NHSTUB(LockMainPower                          ,0xFF877DF8)
71NHSTUB(UnlockMainPower                        ,0xFF877D54)
72
73NHSTUB(GetCurrentAvValue                      ,0xFF952E5C)
74NHSTUB(MoveFocusLensToDistance                ,0xFFA0D4E4)
75NHSTUB(MoveZoomLensWithPoint                  ,0xFF957BFC)
76NHSTUB(SetZoomActuatorSpeedPercent            ,0xFF957D38)
77
78NHSTUB(malloc                                 ,0xFF813A2C)
79NHSTUB(free                                   ,0xFF813B00)
80NHSTUB(FreeUncacheableMemory                  ,0xFF82ADD0)
81NHSTUB(AllocateUncacheableMemory              ,0xFF82AD9C)
82
83NHSTUB(rand                                   ,0xFF81E834)
84NHSTUB(srand                                  ,0xFF81BDB4)
85NHSTUB(_log10                                 ,0xFFA92F04)
86NHSTUB(_pow                                   ,0xFFA93074)
87NHSTUB(_log                                   ,0xFFA93FC0)
88NHSTUB(_sqrt                                  ,0xFFA95328)
89
90NHSTUB(qsort                                  ,0xFF9CA2EC)
91
92NHSTUB(strstr                                 ,0xFF9C9E0C)
93NHSTUB(strncpy                                ,0xFF81E688)
94NHSTUB(strrchr                                ,0xFF8B32A0)
95NHSTUB(strncmp                                ,0xFF8B3230)
96NHSTUB(strchr                                 ,0xFF8B327C)
97NHSTUB(strcat                                 ,0xFF8B31F4)
98NHSTUB(strtol                                 ,0xFF831DAC)
99
100NHSTUB(LocalTime                              ,0xFF8706CC)
101
102NHSTUB(UpdateMBROnFlash                       ,0xFF856B98)
103
104NHSTUB(UniqueLedOn                            ,0xFF913BBC)
105NHSTUB(UniqueLedOff                           ,0xFF913C44)
106
107NHSTUB(SetAutoShutdownTime                    ,0xFF877F58)
108
109
110NHSTUB(phySw                                  ,0xFF823668)
111NHSTUB(phySw_p1                               ,0xFF823A6C) // called from phySw
112NHSTUB(phySw_p2                               ,0xFF82330C) // called when phySw_p1 returns 1
113NHSTUB(NewTaskShell                           ,0xFF874330) // starts new shell on Console. GUI output?
114
115NHSTUB(kbd_read_keys                          ,0xFF823990) // Called in kbd.c (originally called from phySw_p1, line 3)
116NHSTUB(kbd_p1_f                               ,0xFF823A6C) // is phySw_p1
117NHSTUB(kbd_p1_f_cont                          ,0xFF823A78) // after call to kbd_read_keys
118NHSTUB(kbd_p2_f                               ,0xFF82330C) // is phySw_p2
119NHSTUB(kbd_read_keys_r2                       ,0xFF84D4AC) // called from kbd_read_keys
120
121
122
123// Possibly useful but not yet necessary
124NHSTUB(GetCCDTemperature                      ,0xFF8505BC) // Unknown units, doesn't really seem to respond
125NHSTUB(GetBatteryTemperature                  ,0xFF85062C) // Unknown units, doesn't really seem to respond to frozen batteries
126NHSTUB(GetOpticalTemperature                  ,0xFF85069C) // Unknown units, doesn't really seem to respond
127NHSTUB(OpenMShutter                           ,0xFFA0BED0)
128NHSTUB(CloseMShutter                          ,0xFFA0BE98)
129NHSTUB(PutOutNdFilter                         ,0xFFA0BE00) // Doesn't really work on S5, sometimes crashes camera
130NHSTUB(PutInNdFilter                          ,0xFFA0BDC8) // Doesn't really work on S5, sometimes crashes camera
131NHSTUB(SSAPI_ExtStrobeCharged                 ,0xFF8288B4) // Functionality unknown. Implied effect implemented in IsStrobeChargeCompleted
132
133
134
135///////////
136// FOLLOWING FUNCTION NOT FOUND, points to nullsub. Function does not exist
137// where it is to be expected according to A720 firmware. Copied it from A720
138// and hooked in boot.c
139//NHSTUB(time, 0xFF81096C)
140
141
142///////////
143// The following functions were not found in the S5 firmware. They do not
144// seem to be required but for some reason someone made this list.
145// Point to nullsub for immediate return
146// nullsub_1: 0xFF81096C (S5)
147NSTUB(CreatePhysicalVram,                0xFF81096C)
148NSTUB(CreateTaskStrict,                  0xFF81096C)
149NSTUB(DisableDispatch,                   0xFF81096C)
150NSTUB(DisplayImagePhysicalScreen,        0xFF81096C)
151NSTUB(EnableDispatch,                    0xFF81096C)
152NSTUB(ioctl,                                     0xFF81096C)
153NSTUB(iosDevAdd,                                 0xFF81096C)
154NSTUB(iosDrvInstall,                     0xFF81096C)
155NSTUB(isalpha,                                   0xFF81096C)
156NSTUB(isdigit,                                   0xFF81096C)
157NSTUB(islower,                                   0xFF81096C)
158NSTUB(isspace,                                   0xFF81096C)
159NSTUB(isupper,                                   0xFF81096C)
160NSTUB(localtime,                                 0xFF81096C)
161NSTUB(MakeDirectory,                     0xFF81096C)
162NSTUB(memPartAlloc,                              0xFF81096C)
163NSTUB(memPartFindMax,                    0xFF81096C)
164NSTUB(Mount_FileSystem,                  0xFF81096C)
165NSTUB(PhySw_testgpio,                    0xFF81096C)
166NSTUB(ProtectFile,                               0xFF81096C)
167NSTUB(readdir,                                   0xFF81096C)
168NSTUB(rewinddir,                                 0xFF81096C)
169NSTUB(taskCreateHookAdd,                         0xFF81096C)
170NSTUB(taskDeleteHookAdd,                         0xFF81096C)
171NSTUB(taskIdListGet,                     0xFF81096C)
172NSTUB(taskLock,                          0xFF81096C)
173NSTUB(taskName,                          0xFF81096C)
174NSTUB(taskResume,                                0xFF81096C)
175NSTUB(taskSuspend,                               0xFF81096C)
176NSTUB(taskUnlock,                                0xFF81096C)
177NSTUB(utime,                                     0xFF81096C)
178NSTUB(Unmount_FileSystem,                0xFF81096C)
179NSTUB(UIFS_WriteFirmInfoToFile,  0xFF81096C)
180NSTUB(kbd_pwr_off,                               0xFF81096C) // Does not even exist, I think
181NSTUB(kbd_pwr_on,                                0xFF81096C) // Does not even exist, I think
182NHSTUB(PT_PlaySound, 0xFF86B5A4)
183
184
185
Note: See TracBrowser for help on using the repository browser.