Hi,
OMG... it seems that the protocol is described in dgtbrd_ruud.h. How could I have missed that file, after trouncing through PicoChess for hours yesterday?! Too tired, probably...
PicoChess is able to communicate with the board, but right after "USBboard" it hangs until the clock is power cycled. Therefore PicoChess seems to be waiting for the board to do something or send it a message. Maybe it is enough to just print USBboard, wait a second, and just continue.
I can decipher the Python code if I wanted to, but probably I'm not going to. To be really honest, PicoChess is a mess, code-wise. Some files are 1200 lines long, and it-then-else statements indent 6-7 levels deep. On top of that, Python is an (almost) untyped dynamic language, so you can basically do whatever you want. I don't want to touch it.
As I said: I've got great respect for what has been achieved with PicoChess, but I don't like the PicoChess code or the fact that it is written in Python. This is the plan:
- I have my own chess engine written in Rust, called Rustic. I'm going to extract the board representation, move generator, etc... into a library; possibly called rustic_lib. The engine itself will at some point use this library. This would be the replacement for the chess / py_chess library in python. (I could use Schakmaty, which is already such a library written in Rust... but I don't see a reason to because I have my own code already.)
- On the basis of that protocol file you linked, I'll try to write a library that implements the low-level DGT protocol. This would be the open source brother of DGTBRDDLL.dll (maybe even use the same function names so it could be a drop-in replacement). Rustic supports both UCI and Xboard protocols; so it can load either one or the other when it starts. This library can be written in the same way, so it could be extended with multiple protocols for different chessboards.
- After that, a command-line application / daemon should be written that combines both of the above libraries, and it would need to implement the UCI-interface to load engines. This, effectively, would be a Rust-based replacement for PicoChess.
All of this will probably take a few... years... to write. Unfortunately I'm not retired yet. That will also take a few ... decades (but with current rules in the Netherlands, this could be easily extended to centuries).
For now I'll use my older DGT-board for playing in the dining room, against PicoChess 0.9N on the NUC, and use the newer USB-c version to develop this new stuff. It seems I at least know where to start now, but I'll send a mail to DGT for some more information. It would be great if they could at least provide information on what changes need to be made for the new boards.
I don't have the BT board; I don't know if I ever will, because I find BT a finicky type of connection. (I've read in some threads that revision 1.4 of the RPI4 can't connect, where revision 1.2 can.) First, I'll start on the library to get both the mini-USB and USB-c board and the DGT3000 and XL clock going. The older USB-Hirose board also had an FTDI chip, so I assume it is exactly the same as the mini-USB board. I had that board, but I sold it to upgrade to the USB-c board. As said, I don't know if I'll ever own the BT-board, and I definitely won't own the Revelation II unless DGT gives me one for free. Beatiful chess computer, but at €2750, it's about €1250-€1500 more than I'm willing to spend on such a device.
The DGTPi.... well... I like the concept, but I don't like the fact that it needs auxiliary C-code to be able to make the clock connection work, and it's very finicky with regard to the speed it has to run at. As this is a complete DGT-product with a manual, I doubt if anyone cares which software it runs, besides the engines, as long as it works as is described. So I don't think I'll be getting a DGT Pi either.
Kind regards,
Marcel