Editing SDM CFG Files
In order to accommodate David Sykes' plans for a simpler SDM, I've rewritten my PC-based Editor for SDM configuration files (CHDK.CFG) that lets you browse and edit configuration files, displaying values in readable form. In fact there are now two editors - one lets you edit all entries, the other just OSD entries. Both are table-driven (by the same table) so that when new features are added to SDM all that is needed is updating the table. Both editors are written in pure java and should run under Windows, Mac OSX and Linux.
The main editor looks like this:
and the OSD Editor looks like this:
To run these programs for SDM version 1, download this zip file and unzip it. Note: for SDM version 2, download this zip file and unzip it. Either way, you'll get a folder containing the two editors (sdmcfg.jar and sdmosd.jar) and the shared table they both use (sdmtable.properties). To run either editor just double-click the appropriate jar file.
- addition of zip for SDM 2 version
- addition of 'save as text' and import features to OSD Editor - March 2013
- first release August 2012
The "Import" button lets you import values from a text file. The format of the text file is the same as that produced by the "Save OSD values in a text file ..." button. You are stongly advised not to create an import file from scratch, but to edit one produced by using the 'Save OSD values in a text file' button.
Each line is either a comment, starting with an asterisk or an update line having the form:
nnn : item description = xx,yy
- is the numeric identifier of an OSD entry (these 'ids' are defined in the SDM source file conf.c)
- this colon is a required separator, without it the line will be rejected
- 'item description'
- is the 'title' of the OSD item - its value is ignored when importing
- this equals sign is a required separator, without it the line will be rejected
- is the new x co-ordinate of the top left of the item
- is the new y co-ordinate of the top left of the item
Note that if 'nnn', 'xx' or 'yy' are not simple integers, the line will be rejected.
Both editors have some extra features that can be enabled by changing their properties file, "sdmcfgeditor.properties" or "sdmosd.properties", (which you will find in the same folder as once you've run them). These features are:
- the font name, size and boldness used for text.
By default the properties file contains the lines:
fontname=SansSerif fontsize=12 fontbold=NO
but fontname can be set to "Serif", "Monospaced", or the name of any of the installed fonts, such as "Century Schoolbook". You can see the names in the Font Preferences menu of a Text Editor (such as "TextEdit" or "WordPad").
- the table to be used ('cfgtable=...'). By default both use 'sdmtable.properties'.
- whether system properties are to be shown ('showparms=on' or 'showparms=off')
- The properties files also remember the size ('xsize=...' and 'ysize=...') and position ('xpos=...' and 'ypos=...') of the windows.
- finally the editor will output a debug log when it terminates if 'log=yes' is specified.
See here for details of the format of the table used by the editors.
Comments, suggestions and bug reports welcome - Dave@zenoshrdlu.com
All my apps are freeware, but if you've found them useful and would like to thank the author, you can make a donation (for example £1, €1 or $1) to show your appreciation for the many hours spent working on them!
See here for other KAP and CHDK stuff of mine.