From 7cb503b9a4450ea732317bf8ffa643284dfd0e0e Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Wed, 31 Jan 2018 14:37:10 +0100 Subject: [PATCH] Support Scorpio bitbases The CECP EGT flavor 'scorpio' is now translated to the UCI option 'bitbases path'. This is a bit awkward because, unlike all other flavors, the UCI option name does not start with the flavor name. So new code had to be added to recognize this as an exception. In addition, the UCI option is not universally used by engines supporting Scorpio EGBB. --- UCI2WB.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/UCI2WB.c b/UCI2WB.c index 05600ee..4f7fb9d 100644 --- a/UCI2WB.c +++ b/UCI2WB.c @@ -32,7 +32,7 @@ // Set VARIANTS for in WinBoard variant feature. (With -s option this will always be reset to use "shogi".) #define VARIANTS ",normal,xiangqi" #define STDVARS "chess,chess960,crazyhouse,3check,giveaway,suicide,losers,atomic,seirawan,shogi,xiangqi" -#define EGT ",gaviotaTbPath,syzygyPath,nalimovPath,robbotripleBaseDirectory,robbototalBaseDirectory," +#define EGT ",gaviotaTbPath,syzygyPath,nalimovPath,robbotripleBaseDirectory,robbototalBaseDirectory,bitbases path," #define DPRINT if(debug) printf #define EPRINT(X) { char f[999]; sprintf X; DPRINT("%s", f); fprintf(toE, "%s", f + 2*(*f == '#')); /* strip optional # prefix */ } @@ -361,7 +361,7 @@ Engine2GUI() if(!strcasecmp(name, "newgame") && !strcmp(type, "button")) { newGame++; continue; } if(!strcasecmp(name, "usemillisec")) { unit = (!strcmp(val, "false") ? 2 : 1); continue; } sprintf(buf, ",%s,", name); if(p = strcasestr(EGT, buf)) { // collect EGT formats - strcpy(buf, p); for(p=buf; *++p >='a';){} *p = 0; strcat(egts, buf); continue; // clip at first non-lower-case + strcpy(buf, p); for(p=buf; *++p >='a';){} if(*p == ' ') strcpy(buf, ",scorpio"); *p = 0; strcat(egts, buf); continue; // clip at first non-lower-case } // pass on engine-defined option as WB option feature if(!strcmp(type, "filename")) type[4] = 0; @@ -593,7 +593,7 @@ GUI2Engine() else if(!strcmp(command, "cores")&& !!*threadOpt) { sscanf(line, "cores %d", &cores); EPRINT((f, "# setoption %s%s %s%d\n", nameWord, threadOpt, valueWord, cores)) } else if(!strcmp(command, "egtpath")){ sscanf(line+8, "%s %[^\n]", type, command); - if(p = strstr(EGT, type)) strcpy(type, p), p = strchr(type, ','), *p = 0; + if(p = strstr(EGT, type)) strcpy(type, p), p = strchr(type, ','), *p = 0; else strcpy(type, "bitbases path"); EPRINT((f, "# setoption name %s value %s\n", type, command)); } else if(!strcmp(command, "sd")) sscanf(line, "sd %d", &depth); -- 1.7.0.4