Goal of the Project

The main purpose of dgtdrv is to give Non-Windows-Users the opportunity to use their DGT Electronic Chess Board in their used environment. In principle, dgtdrv allows to use almost every current chess GUI to use the board. The sole requirement is that this GUI offers an engine tournament mode.


To allow almost every GUI to use dgtdrv it is implemented as a normal chess engine. It supports both the common xboard (sometimes called winboard) command set as well as the newer UCI commands. A special mode is also provided for the well known crafty chess engine by Robert Hyatt. Version 1 of dgtdrv was actually built upon the code provided by crafty. This version can only use a board connected by the serial port. Later versions however (dgtdrv2) are completely rewritten from scratch and use the dgtnix library supporting also boards connected via USB. The dgtnix library also supports various platforms. For a list of tested platforms for dgtdrv2 see below.

How it is used

Existing Chess GUI integration

An engine-engine tournament is realised by a chess GUI by havin one chess engine to play another in tournament mode. Normally the user can set the time limits and so on and then the computer "plays itself" a specified set of games where each engine plays one game as white and the subsequent one as black. The idea for the integration of the DGT Electronic Chess Board is now simple: provided one engine in this mode is actually the user at his electronic chess board all that has to be done is to feed all moves the user makes on the DGT board to the GUI as if they were from another chess engine. This is actually the way dgtdrv works in this scenario.


  • One can use almost every GUI
  • No code is required on the side of the GUI


  • No seemless integration: E.g. if one wants to set up a starting postion this has to be done within the GUI as well as on the DGT board seperately.
  • One way communication: dgtdrv can not really communicate to the GUI but is limited to send moves. The usual DGT commands (e.g. "move now" by just lifting the king and setting it back) can not work as neither the xboard nor the UCI protocoll where invented for a two way communication and as such do not have commands for this actions impelemnted.

Proof of concept: xboard 4.2.7-2_DGT

One of the main reasons to implement dgtdrv was, that a software like this would greatly simplify the integration of external chess boards into already existing GUIs. The idea of the proposed Input Engine Protocol, which is mainly an extension to the well known uci and xboard protocol, is that no new infrastructure is necessary to get external hardware working and that upon change of this hardware no chagnes to the GUI would be necessary anymore.

As a proof of concept a simple extension to xboard, the main chess interface on the Un*x platform, was implemented. The current version is available for download as a patch against xboard 4.2.7, Debian patchlevel 2 (the latter includes some patches to get cmail (e-mail correspondence chess) working again). The Debian Patch is available for convenience.

The current implementation adds merely 80 lines of code to xboard and involves the adoption of one function only!

It already allows to play another engine, even with arbitrary starting positions which are read in from the DGT board. Just set up a postion (or the normal starting position) and use dgtdrv as one of the two chess engines xboard can load upon startup. (See -fcp and -scp, use dgtdrv as second chess program to play with black.) Upon startup xboard will read the postion from the DGT board and set up its internal postion. If a DGT-clock is connected it should even set the clocks to use your external clock. Use Mode/Two Machines to start the game.

The typical xboard call could look like this (playing white against crafty)

      xboard -fcp "dgtdrv2.i686 /dev/ttyUSB0 rw $LOGNAME" -scp crafty

Note the quotes for the dgtdrv-call!

To ease up the use of multiple engines with xboard as well as to integrate dgtdrv more smoothly a small Python-GTK program named Scotty was developed.


For Developers

Tow goals where in mind while developing dgtdrv
  • Full use of the boards functionality seemlessly
  • Minimal work for GUI developers to support the board
This lead to a different approach than the library provided by the DGT Project for the Windows world. Such a library is e.g. available via the dgtnix project which is used also for dgtdrv. dgtdrv starts with the observation, that every GUI programer has to implement either the xboard or the UCI engine protocol or, in the ideal case, both of them. For this reason every chess GUI available already has quite a lot of code implemented. The new functionality of the DGT Electronic Chess Board can now be seen as a superset of this code! Actively supporting dgtdrv in ones own chess GUI is actually nothing more than just reuse the code already available for the connection to any chess engine and interpret a few more strings sent from the dgtdrv wraped in info-strings. Actually even if one uses dgtdrv in the engine tournament mode all these strings are sent to the GUI, it just silently ignores them, or, at best, displays them to the user. Suporting dgtdrv for a GUI developer is now as simple as starting a chess engine in either xboard or UCI mode. See the protocol description for the details about the communictation process. The best thing is: one could even expand ones standard communications protocolls by the dgtdrv command set. No other chess engine will send those codes and even if, it is just another input engine. As the communication only consists of strings sent via standard-I/O one could imagine to use this command set for various purposes up to remote controlling a chess GUI from the internet or working trough a set of test positions.

Supported Platforms

dgtdrv based on craftys code is only known to run on Intel and compabible based PCs running Linux with a serial connector for the DGT Electronic Chess Board

dgtdrv2 based upon the dgtnix library use only POSIX features. So in principle it should compile and run on any *nix-type system, at least when using gcc. New is also the compatiblity with USB-type boards. This was tested using a serial board and a serial to USB convertor.

dgtdrv2 is known to compile and run on the following platforms:
  • Intel and compatible PCs running Linux.
    The reference sytem is Debian GNU Linux 3.1 (stable).
  • Digital/Compaq/HP Alpha Workstations running Linux.
    The reference system is Debian GNU Linux 4.0 (testing) on a Miata based "Digital Personal Workstation 600au".
dgtdrv2 was not yet tested on MacOS-X, the dgtnix library however is known to work there and this is the more critical part.

How to get it:

You can check out the latest version of dgtdrv right out of the cvs repository at sourceforge and compile the driver yourself. The following steps are required:

Get dgtnix

Either download the prepacked library source or get it from the svn-repository at sourceforge:
      svn co https://svn.sourceforge.net/svnroot/dgtnix dgtnix/trunk

You will find the current release of the library in dgtnix/trunk subdir. See the documents there how to build and install the library.

Get dgtdrv

Check out the current version of dgtdrv from the cvs-repository at sourceforge:

       cvs -d:pserver:anonymous@dgtdrv.cvs.sourceforge.net:/cvsroot/dgtdrv login
       cvs -z3 -d:pserver:anonymous@dgtdrv.cvs.sourceforge.net:/cvsroot/dgtdrv co -P dgtdrv

The subdir dgtdrv will conatain the current version of the driver. Follow the documentation there to build it. Adoptions of the makefile might be required.

Last Update: