Fanael / fanael.github.io

My blog and its static site generator
https://fanael.github.io/
GNU Affero General Public License v3.0
11 stars 1 forks source link

Current Stockfish on Windows 98?! Questions #1

Open maraakate opened 2 years ago

maraakate commented 2 years ago

Hi Fanael,

I'm working on a project with getting mingw32 working with Windows 98 and I came across your site. Your path appears to be for an older version of the mingw-libraries. I downloaded the latest mingw-w64 v6.0.0 and the structure of the libs is different. What version did you use? Are you willing to provide a precompiled DLL and libs to simplify things?

Thanks! Frank

Fanael commented 2 years ago

I downloaded the latest mingw-w64 v6.0.0 and the structure of the libs is different.

Major version 6 is old, the current version is version 9: https://sourceforge.net/projects/mingw-w64/files/mingw-w64/mingw-w64-release/

What version did you use?

Whatever was the master at the time the article was written, which was shortly after the release of version 8. The structure is still the same in the current master: https://sourceforge.net/p/mingw-w64/mingw-w64/ci/master/tree/

Are you willing to provide a precompiled DLL and libs to simplify things?

No, for three reasons:

  1. Using someone else's binaries requires certain level of trust, and I don't want people to trust a random person on the internet, which is all I really am, that much (then again, microsoft is less trustworthy than that, and yet here we are).
  2. I built them with -march=i686, which was fine for my specific purpose, as I was running it on a Pentium III, but P6-compatible CPU is a pretty steep requirement for windows 98 software — the minimal requirement of the OS is a 486, the recommended one is a Pentium — so my binaries may not be portable enough for you.
  3. I simply don't have the binaries anymore, I'd have to rebuilt them.
maraakate commented 2 years ago

I'm unsure exactly which version I am running, but I assume latest as it was downloaded from here, https://www.msys2.org/. Maybe the source forge link I grabbed earlier pointed to an older version.

Target CPU for me is PPro, but really a P3 would be better. I will check out the latest from your link and try to give it a go over the next couple of days.

maraakate commented 2 years ago

OK. Got it compiled with your patches, looks like MinGW v9 also uses CreateHardLinkW and a few others related to this. Setting KernelEx to Vista fakes past that, but then theres a few more to NTFS volume parsing. Looks like I'll have to dig deeper to find out how that's working and which DLL it comes from as it's not called in my code.

Fanael commented 2 years ago

It really depends on what parts of the standard C and C++ libraries are used by the program you're trying to build: IIRC a minimal hello world program does run with no tweaking, but anything more complicated than that may trip a landmine deep in the MinGW-w64 runtime, winpthreads, libstdc++ or similar libraries, if not in the program code itself.

Stockfish was a relatively easy case, because it's only using standard C++ input/output streams (which work fine), containers (which don't require OS support apart from a functional heap) and thread support (which is what required patching).