Zaunkoenig M1K firmware

You do not need to install any software for the M1K. Even though the M1K has only two buttons, you can conveniently configure your CPI (same as DPI, by the way) with them. The firmware, the software that is running in the microcontroller unit (MCU) of the M1K, is open-source and is optimized for extremely low latency.

On software and CPI buttons

Traditionally there have been two approaches for changing important mouse attributes like CPI, Angle Snapping und Lift Off Distance (LOD): External software and dedicated buttons.

The one most hated by gamers is probably the dreaded external software. First, these software suites like to have a terrible user interface bloated with buggy non-features.

Second, they are a terrible solution for pro-gamers, as they cannot install software on the PC they are about to play a tournament game on. I will not even bother commenting on the monstrosity that is cloud-based driver software. Moving on.

The second approach: having dedicated buttons that do nothing else but change CPI, for example. This is much better than having to install painful software. It is especially suitable for tournaments. However, often times these CPI buttons are limited to just two or three different CPI values.

Furthermore, these dedicated buttons increase the weight of the gaming mouse. When your gaming mouse weighs 100 grams, it does not really matter that the CPI button increases the weight by half a gram. With a mouse as light as the M1K however (23 grams), even half a gram is a significant increase in overall weight.

Luckily we have an elegant solution to this problem.

Changing CPI, Angle Snapping and LOD without external software or dedicated buttons

By using the MCU of the M1K you can change CPI, Angle Snapping and LOD. The MCU will remember your changes thanks to its on-chip flash memory. The MCU the M1K uses is called ATmega32U2 and is made by US company Microchip Technology.

The following is how you can change CPI, Angle Snapping und LOD in the M1K by using the MCU.

Changing CPI

The M1K uses a PixArt 3360 sensor. You can change the CPI in steps of 100. And this is how it works:

  1. Plug the M1K into your PC.
  2. Lift the M1K a few centimeters off your mousepad so it stops tracking.
  3. Hold down both mouse buttons for five seconds.
  4. The M1K now enters the so-called «CPI programming mode». Upon entering the mouse cursor will move to show you at what CPI the M1K is currently at. The standard value of the M1K is 800 CPI. So when you enter the CPI programming mode with a brand new M1K the mouse cursor will go up and down exactly eight times. At 1400 CPI the mouse cursor would move to the right and back once (indicating 1,000 CPI), and then up and down four times (indicating 400 CPI).
  5. Now place the M1K back on your mousepad. You can now change the CPI by pressing either the left or right mouse button. Each time you now press your left mouse button, the CPI will be decreased by 100 until you reach the minimum CPI value of 100. Pressing right increases CPI by 100. While you are doing this you can move the M1K around to get a feeling for different CPI values.
  6. You exit the CPI mode the same way you entered it: Lift the M1K a few centimeters off your mousepad so it stops tracking and hold down both mouse buttons for five seconds.
  7. The M1K exits CPI programming mode and tells you again at what CPI it is running now. Say you set the mouse to 700 CPI: the mouse cursor now will move up and down seven times. After the mouse cursor has stopped moving the M1K is ready to go.
  8. Thanks to using the best available 3360 firmware version (also called SROM, or «secure read-only memory») the 3360 inside the M2K has just 2 frames of smoothing for CPI values of 100 up to 3,500. From 3,600 CPI to 12,000 CPI however the smoothing jumps to 16 frames. We thus recommend not going above 3,500 CPI.

Changing Angle Snapping and LOD

Per default Angle Snapping on the M1K is disabled, and the LOD is set to 2 millimeters. Should you want to change these values this is how it goes:

  • To activate Angle Snapping, press and hold the left button while plugging in the M1K. Cursor moves clockwise in a square to indicate the change.
  • To set LOD to 3 millimeters, press the right button while plugging in the M1K. Cursor moves clockwise in a square to indicate change.
  • To go back to default settings, press both buttons while plugging in the M1K: Angle Snapping now is disabled again and LOD is set to 2 millimeters. Cursor moves counterclockwise in a square to indicate the change.

The firmware of the M1K is open-source

The firmware of the M1K is based on the firmware user qsxcv developed upon reverse engineering the PixArt 3366 sensor. He later used this firmware to make a wireless mouse that had lower input lag than any wired mouse from Logitech. See his thread on for more information on this: A wireless mouse faster than Logitech's wired ones? Oh yes!

As did qsxcv with his firmware, we made our firmware open-source. See our GitHub repository.

8,000 hertz

When you plug the M1K into your computer it will run with 1,000 hertz which results in your PC getting new mouse data every 1.0 milliseconds. Thanks to the code of qsxcv the firmware of the M1K fetches new data from the sensor every 0.125 milliseconds. Put another way: internally the M1K runs at 8,000 hertz. Only when used in conjunction with an overclocked Windows driver though can you actually use the M1K at 8,000 hertz in Windows.

Using the M1K at 8,000 hertz as opposed to 1,000 hertz reduces input lag by 0.4375 milliseconds on average.

Compared to 500 hertz a mouse running with 8,000 hertz will be quicker by 0.9375 milliseconds on average.

Should you want to try overclocking your Windows driver to 8,000 hertz give this two minute long tutorial a try. For more information check out SweetLows thread «USB mouse hard overclocking (2000 Hz+)».

By the way: we see no reason for using the M1K at 500 hertz. Modern gaming PCs have plenty of processing power for a 1,000 hertz mouse. Hence, the M1K runs with 1,000 hertz per default and does not offer the option to be downgraded to 500 hertz. We think a 500 hertz mouse is the equivalent to a 60 hertz monitor: outdated.

Zero lag switch debouncing

Many so-called gaming mice have problems with accidental double clicks. And in order to prevent accidental double clicks, many gaming mice use their MCU to artificially delay each click, or the release of a click, by up to 40 milliseconds.

Delaying clicks is especially bad in FPS games. Just imagine each of your shots having an extra delay of 40 milliseconds. Just to put this into perspective: In many cases these 40 milliseconds are higher than the lag of your internet connection. The delayed release of a click is not as bad in FPS games. It is a problem in RTS games though, where you have to do quick and precise selection boxes.

The M1K uses a debouncing technique called the set/release latch method with which we can prevent accidental double clicks without introducing any delay to clicks or releases.

Using the set/release latch method is not exactly rocket science and not exactly expensive. This begs the question: why has it not been used up to now? Daniel Sauvageau, the author of an in-depth article on debouncing mouse switches, offers this explanation:

«This is one more example of perfectly good theory not getting used in practice to save pennies per unit and also to perpetuate planned obsolescence. That is, sales would drop if you no longer needed a new mouse every two to four years as a result of glitchy buttons.»

Thanks to zero lag debouncing in combination with internal 8,000 hertz the M1K already has insanely fast clicks. However qsxcv came up with a neat little trick to get even less input lag than you would have when polling the switches with 8,000 hertz. The state of each switch are sampled continuously so that there is no delay due to reading a switch while it is bouncing.

Installing a custom firmware on the M1K

Since our firmware is open-source, you can take it and adjust it any way you want. When you are done you can install your own firmware on the M1K with a program called DFU Programmer. See this guide for how to do that exactly.

Why does it make sense to write your own firmware? You can do trivial changes like setting the default CPI of your M1K to something else than 800 CPI. Or you could use the firmware to set your M1K to 850 CPI (for that the MCU would have to do interpolation). You could do more advanced changes as well however. For example you could choose different CPI values for the x and y axis. Or maybe you find a way to further reduce the input lag of the M1K.

Up to you.

The Zaunkoenig newsletter

Join the Zaunkoenig newsletter if you would like to get no-bullshit Blog articles about our gaming mouse design philosophy delivered to your inbox: