Shooting tethered with the Leica M9          
    Freeware for PC/Windows 7          
    RAM DISK IN THE LEICA M9          

RAMDisk mode seems to be an undocumented feature (the term 'RAMDisk mode' is my own invention).

Use of it is at your own risk, since your faithful programmer doesn't know exactly why it's there or what it's meant for and wasn't able to find anyone who could shed some light on it.

This warning is somewhat redundant, since through the license agreement you already agreed that the use of M9Tether is at your own risk, but I'd like to be explicit here.

In the default state (when you switch on the camera) the RAM disk is not operational. It just sits there doing nothing. It needs a specific PTP command to turn it on. Then the fun starts...

My own assumption is that it's meant for tethered shooting - with info about it possibly shared with software houses if they ask for it -, that it's purely a Leica internal option for testing at their factories, or that it's both. It's also possible I suppose that the RAM is needed as an intermittent stage for loading new firmware and that it serves more than one purpose this way, I'm not sure. The RAM has the size of about one DNG, so it does seem to be designed mainly for holding photos, although I find it quite surprising it can only hold one object (even a small JPG locks it up - nothing else can be written to it till the JPG is removed and I've not been able to get around that limitation).

I have not noticed any anomalies using it, but since Leica isn't sharing (I also didn't ask them) I don't know what this thing is exactly (apart from usable), hence these extra remarks.

There are some considerations with this option, so please read the whole page. If you feel it's too complicated, don't use it. I mainly view it as a good backup option for a lacking, full or broken SD card when you're shooting tethered, but the increased transfer speed is also a nice bonus.

As with the rest of M9Tether, there is NO low level 'hacking' going on. The application operates through the regular and documented WPD layer and only uses the exposed PTP functions on the camera side. The command to switch on the RAM disk is available through PTP (although it's not documented). Leica exposes it and the RAM disk is visible in Windows (also when it's switched off, the default state when switching on the camera), so the assumption must be that turning it on the official way can't do any harm. If it did, it would be kind of an embarrasment to Leica I suppose. I can also guarantee that my camera is still fine, after going back and forth a whole lot of times between normal and ramdisk use, during the development of this new feature.

The advantages of RAMDisk mode

  • You can shoot tethered without an SD card (in fact, switching from regular to RAMDisk mode can be slow if the SD card contains many photos. Removing the card or emptying it first makes the switch the quickest).

  • It speeds up the transfer (the speed gain is quite spectacular if you shoot DNG - difference goes up to somewhere around 50%. From 'shoot' to the PC in about 3 seconds on my system. With JPGs the difference is smaller, I'd say around 10 to 20%, because the files are smaller and take less time writing to SD card. Note these are very rough estimates, I didn't clock it properly, so you be the judge...).

How to turn RAMDisk mode on or off

You can turn on RAMDisk mode in three ways:

  • Click on the 'RAMDisk...' button in M9Tether (note that the first time the switch to RAMDisk mode might take a while).

  • Remove the SD card (put the bottom cover back), turn the camera on and start M9Tether. You'll now be asked if you want to switch to RAMDisk mode. Selecting 'No' to that question will allow you to take a few pictures, till the buffer is full and the camera freezes up (there's no SD card).

  • Startup M9Tether.exe with behind it the option -ramdiskmode (with the dash). This will land your camera in RAMDisk mode immediately - without any questions asked - at startup. Don't use this option unless you have read this page. You can add this command in the shortcut on your desktop by rightclick -> Properties. On the tab 'Shortcut' at 'Target' fill it in like this:

    "<path>\M9Tether.exe" -ramdiskmode

    If you didn't change the default installation folder, the total line should read: "C:\Program Files\M9Tether\M9Tether.exe" -ramdiskmode
When the camera is in RAMDisk mode, you will see it mentioned above the camera settings in the main window.

Turn off RAMDisk mode by clicking the 'RAMDisk...' button again, or by closing M9Tether. If you don't have an SD card in the camera, turning off RAMDisk mode will lead to errors if you continue shooting.

RAMDisk mode considerations

M9Tether says my firmware is not correct
  • RAMDisk mode is locked for firmware 1.138, 1.162, 1.174, 1.176 and 1.196. With higher or lower firmware this function will not be available. New firmware will first be tested by me, as to prevent mishaps. After firmware release check back the main page, I will update M9Tether asap.
Save to PC if you don't want to loose any shots
  • In RAMDisk mode the SD card is automatically skipped over by the camera. Nothing is written to it. That's a given, not my choice or something I can change (writing also to the SD card would probably defeat the purpose of the RAM). Therefore you have to turn on the option 'Store captures on PC' in the main window of M9Tether if you don't want to loose any shots. The RAM disk can only hold one photo and it's emptied after transfer to PC, to make room for the next shot. You can save JPGs through the internal viewer of M9Tether if that option is turned on, but you will not be able to find back the photos - taken in RAMDisk mode - on the SD card if a card was present.
Why the delay the first time switching to RAMDisk mode?
  • When switching to RAMDisk mode, M9Tether enumerates all the objects (photos) within the camera if the SD card is present. This is necessary, else the camera will do it automatically after a photo gets deleted from the RAM disk. This will hold up the camera after the first shot. To prevent this temporary freeze I decided to enumerate immediately after the switch to RAMDisk mode, since it needs to be done only once in a session. If you want to skip over this phase, either remove the SD card before switching to RAMDisk mode, or delete as many photos from the SD card as possible. The less photos on the memory card, the quicker the switch to RAMDisk mode. The enumeration only needs to take place once in a session. Switching to RAMDisk mode a second time (provided the camera wasn't switched off in between) will go a lot faster. Be aware that enumerating might take up to 30 seconds or more on the bigger cards (16/32gb) with a few hundred pictures on them.
The bottom cover
  • If you remove the SD card (or place it back), don't forget placing back the bottom cover. Shooting without it leads to errors and without bottom cover M9Tether thinks there's no SD card present (the bottom cover notification spoils a good start up of PTP on the camera side and the SD card stays invisible).
Why can't I shoot DNG and JPG together like in regular mode?
  • The RAM disk can only hold one object. It's therefore not possible to shoot DNG + JPG, but only DNG or JPG. If your format setting was at DNG + JPG, M9Tether will switch automatically to DNG and warn if you try to set it back to DNG + JPG. If the 'set' button is available on the camera (usually it becomes available after taking a shot with preview set to 'on') you can manually set the format to DNG + JPG. That's not wise though. The camera will accept it, but will then freeze up after one shot.
Disconnecting the camera
  • If you disconnect the camera from the PC without closing M9Tether first - and the camera is in RAMdisk mode - shooting it manually without the PC connected, will freeze up the camera after the second shot. Close M9Tether first before you disconnect the camera, it will automatically turn off RAMDisk mode on the camera. If you didn't close the software before disconnecting the camera, switch off the camera and then turn it back on. That will also take it out of RAMDisk mode. Obviously you will have to reinsert your SD card if you took it out. If your camera does freeze up (the red light will be blinking continuously) simply switch off the camera and turn it back on. Battery removal doesn't seem to be necessary for this one.
About file names and counting
  • File names on the RAMDisk start with M9__ and are then sequentially numbered starting with 0001. After restarting the camera, the number is back to 0001. If you store files on the PC at always the same location, the files with the same name will be overwritten. For this reason M9Tether adds an extra string to the file name (based on the current date and time in the format YYYYMMDDHHMMSS e. g. 20110127231236, thus the full file name would be M9_20110127231236__0001.DNG) when the camera is shooting in RAMDisk mode. For sorting reasons M9Tether places the string right after the M9 label. That way you're able to sort the photos on date and time. If you do not appreciate this extra service, locate M9Tether.ini on your computer (close M9Tether first, else it might overwrite your changes) and change the following setting from 1 to 0, so it reads:


    If you don't see the setting, startup M9Tether and close it again. Then it should be there.

    The string adding will now be disabled, but be aware that photos with similar file names will be overwritten without question or warning. This is particularly annoying in RAMDisk mode, since you won't have a backup photo on the SD card. If you don't want to run the risk of loosing photos, don't touch this option.

    Note that the time stamp in the string is the time the photo arrived on the computer (taken from the computer clock), not the time the shot was taken.

  • If you switch off RAMDisk mode, the file numbering on the SD card will continue where it left off. The photos taken through the RAM disk are not reflected in the file name count on the SD card (in other words: the file name count on the SD card won't show that photos were taken 'in between').

  • ImageUniqueID (shutter count) is not affected by RAMDisk mode and will keep counting. In fact, I have not been able to detect any differences in the EXIF between regular and RAM disk use. Everything seems to operate as it does with SD card, only faster.

Click here to go back to the main page.

See also the blog