fairy-stockfish / Fairy-Stockfish

chess variant engine supporting Xiangqi, Shogi, Janggi, Makruk, S-Chess, Crazyhouse, Bughouse, and many more
https://fairy-stockfish.github.io/
GNU General Public License v3.0
607 stars 189 forks source link

Emscripten build is failing when LARGEBOARD support enabled #20

Closed gbtami closed 5 years ago

gbtami commented 5 years ago

Just right after I'v ported Fairy-Stockfish to emscripten at https://github.com/gbtami/Fairy-Stockfish.js I realized that building with LARGEBOARD support is failing because of unsigned __int128 is not supported by emscripten. Do you see any chance to implement something similar https://github.com/HiraokaTakuya/apery uses for bitboards?

ianfab commented 5 years ago

To make the large-board version compatible with compilers that do not support the gcc-specific 128 bit integers is still one of the open points from https://github.com/ianfab/Fairy-Stockfish/issues/6. I made some attempts a while ago on a separate branch https://github.com/ianfab/Fairy-Stockfish/tree/non_gcc, but I think it was not fully working yet and I did not have the time to work on it in the last weeks, so the branch also needs some rebasing.

gbtami commented 5 years ago

Ahh, didn't noticed that. Thx!

ianfab commented 5 years ago

I at least rebased the branch now and made it compile, but even perft is wrong, so there must still be a serious bug.

ianfab commented 5 years ago

@gbtami There was some implicit conversion Bitboard->uint64->bool going on that bypassed the explicit Bitboard->bool conversion, so I fixed the operators. Perft is working now for all variants and bench is also the same with the built-in and the custom 128 bit type, so for now it looks quite good.

gbtami commented 5 years ago

After merged non_gcc it compiles with largeboards enabled. Thx a lot!