Binaries of Spector

Discussion of chess software programming and technical issues.

Moderator: Ras

Aldus
Posts: 27
Joined: Mon Sep 03, 2018 12:59 pm
Location: Romania
Full name: Cristi Ilovan

Binaries of Spector

Post by Aldus »

Hi, guys,

I've noticed the source code of Spector (a program from 1987 by Steven Edwards, written in ANSI C, which participated at the ACM 1994) is freely available to download at https://www.chessprogramming.org/Spector. Does anyone have a working Windows binary that he is willing to share? Or is any of you curious to try to compile it? :) Even a binary for an old CPU would be great. Thanks.

I guess compiling such an old C code can be viewed as a challenge in itself.
dangi12012
Posts: 1062
Joined: Tue Apr 28, 2020 10:03 pm
Full name: Daniel Infuehr

Re: Binaries of Spector

Post by dangi12012 »

Code: Select all

"C:\Program Files\LLVM\bin\clang" main.c -std=c99
main-0ccc91.o : error LNK2019: unresolved external symbol progname referenced in function main
main-0ccc91.o : error LNK2019: unresolved external symbol progauth referenced in function main
main-0ccc91.o : error LNK2019: unresolved external symbol proguscf referenced in function main
main-0ccc91.o : error LNK2019: unresolved external symbol progexpr referenced in function main
main-0ccc91.o : error LNK2019: unresolved external symbol version_major referenced in function main
main-0ccc91.o : error LNK2019: unresolved external symbol version_minor referenced in function main
main-0ccc91.o : error LNK2019: unresolved external symbol progdate referenced in function main
main-0ccc91.o : error LNK2019: unresolved external symbol progvers referenced in function main
main-0ccc91.o : error LNK2019: unresolved external symbol Init referenced in function main
main-0ccc91.o : error LNK2019: unresolved external symbol PrTwoStrsNL referenced in function main
main-0ccc91.o : error LNK2019: unresolved external symbol progdone referenced in function main
main-0ccc91.o : error LNK2019: unresolved external symbol Command referenced in function main
main-0ccc91.o : error LNK2019: unresolved external symbol Term referenced in function main
main-0ccc91.o : error LNK2019: unresolved external symbol Transfer referenced in function main
a.exe : fatal error LNK1120: 14 unresolved externals
Seems like clang is not using the symbols defined in c.
If someone has a way to generate a makefile automatically for all c files? or maybe there are flags in clang to use all files for compilation :?:
Worlds-fastest-Bitboard-Chess-Movegenerator
Daniel Inführ - Software Developer
dangi12012
Posts: 1062
Joined: Tue Apr 28, 2020 10:03 pm
Full name: Daniel Infuehr

Re: Binaries of Spector

Post by dangi12012 »

Man in my cellar I have an old P2 system. Would be so cool to use Clang-15 to target this platform.
Maybe even compare it to Visual Studio 3.0 from 1999 to see how far compilers have progressed. :mrgreen:
Worlds-fastest-Bitboard-Chess-Movegenerator
Daniel Inführ - Software Developer
dangi12012
Posts: 1062
Joined: Tue Apr 28, 2020 10:03 pm
Full name: Daniel Infuehr

Re: Binaries of Spector

Post by dangi12012 »

You know the one where the CPU was Slotted in into a vertical Socket like GPUs.
Good times.
Worlds-fastest-Bitboard-Chess-Movegenerator
Daniel Inführ - Software Developer
jkominek
Posts: 69
Joined: Tue Sep 04, 2018 5:33 am
Full name: John Kominek

Re: Binaries of Spector

Post by jkominek »

dangi12012 wrote: Fri Feb 17, 2023 3:20 pm You know the one where the CPU was Slotted in into a vertical Socket like GPUs.
Good times.
https://www.cpu-world.com/CPUs/Pentium- ... %20II.html

It would be satisfying in a way - if you are into computer chess archeology - to get Spector running on a Pentium II machine. But can it be plugged into cutechess-cli?
dangi12012
Posts: 1062
Joined: Tue Apr 28, 2020 10:03 pm
Full name: Daniel Infuehr

Re: Binaries of Spector

Post by dangi12012 »

Now I am itching to get one of those:

DUAL SLOT 1 Pentium II
Image

Literally one of the first consumer dual socket options.
Might even be a good investment since they seem to be quite rare. Full upgradable:

Motherboard: P6DBE
CPU: 2x Pentium III 1133 Mhz

That wont be a guarantee tho since the filter capacitors will have aged quite a bit since 1999 so FSB of 133mhz will probably be hard to find good ram for. But dual 1ghz is possible on those boards.
More time correct would be a 1998 - 500mhz dual PII with the aforementioned motherboard.
And it would be interesting indeed to see Clang-15 emit code for PII and compare it to oldschool windows 98 visual studio.
Worlds-fastest-Bitboard-Chess-Movegenerator
Daniel Inführ - Software Developer
dangi12012
Posts: 1062
Joined: Tue Apr 28, 2020 10:03 pm
Full name: Daniel Infuehr

Re: Binaries of Spector

Post by dangi12012 »

Sooooo...

Looking in the sourcecode Windows is not supported - and missing includes proof that.

Code: Select all

#define os_unix 1 /* generic Unix */
#define os_mac  0 /* Macintosh */
So after some fixing of code I got a binary for Windows. Turned out that unix specific functions were declared but never actually called inside the program.

Code: Select all

clang *.c -Wno-everything
Here it is:
https://1drv.ms/u/s!AoDIyNlDG2QTg8xMgu0 ... w?e=fWnKKR
Worlds-fastest-Bitboard-Chess-Movegenerator
Daniel Inführ - Software Developer
dangi12012
Posts: 1062
Joined: Tue Apr 28, 2020 10:03 pm
Full name: Daniel Infuehr

Re: Binaries of Spector

Post by dangi12012 »

Code: Select all

clang *.c -Wno-everything -march=pentium -o out_pentium.exe -O3
Pentium Build with Optimisations
https://1drv.ms/u/s!AoDIyNlDG2QTg8xNGNp ... A?e=gTVSSf
Worlds-fastest-Bitboard-Chess-Movegenerator
Daniel Inführ - Software Developer
Vinvin
Posts: 5287
Joined: Thu Mar 09, 2006 9:40 am
Full name: Vincent Lejeune

Re: Binaries of Spector

Post by Vinvin »

The Windows anti-virus detects a virus for both exe :/
Aldus
Posts: 27
Joined: Mon Sep 03, 2018 12:59 pm
Location: Romania
Full name: Cristi Ilovan

Re: Binaries of Spector

Post by Aldus »

dangi12012 wrote: Sat Feb 18, 2023 12:47 am

Code: Select all

clang *.c -Wno-everything -march=pentium -o out_pentium.exe -O3
Pentium Build with Optimisations
https://1drv.ms/u/s!AoDIyNlDG2QTg8xNGNp ... A?e=gTVSSf
Thank you sir.

They won't work under Windows XP, but they do work under older Core2Duo CPUs (with Windows 7 at least, it seems).

Care to share the modified sources, too? :)