When 0 is greater than 1.0

I came across this fun thing debugging a QuakeWorld client on a RISC machine. I think something is failing as I’m using terminal server. For some reason width is being passed as 0. Not sure why I didn’t debug it enough to care, so I setup a quick block to only evaluate the Fov if the calculated x was greater than 1.0

And Microsoft C did not disappoint.

I think it may have been some incremental linking issue? I’m not sure I purged the build directory and re-ran make and didn’t experience the crash again. I had to get the screenshot or even I wouldn’t believe it.

In the end I got it running:

Of course among the eagle eyed you may notice this is version 13.00.8499 of the compiler. But the last compiler for the Dec Alpha / Windows NT was version 12…

More on that later!

GNU Chess ’87

I am not much of a chess player. That said one thing that has annoyed me to no end is GNU Chess 1.2. Over on bitsavers is this fun directory:

And despite being a treasure trove of ancient GNU software, I have never been able to get GNU Chess to do much of anything. At best it’ll give the Chess prompt, and then it’ll either crash (good!) or worst case it just exits silently with no reason given.

I have put only minimal effort into debugging it, and really got nowhere. I don’t know why this is such a tough beast to deal with, or why I even care. As I mentioned above, I’m not much of a chess player.

But for some reason this time around I thought I’d try the earliest release quality Visual C++ to build it. I wasn’t expecting much, however for some reason this ancient version seems to run.

I had to enable a few things such as the RANDOM & HASH to make it look like it wants to play. I ended up having to make some changes after a draw or victory as the ‘self playing mode’would keep going. Not sure what’s going on there, and I added a line at the end of the logic loop to always print the board, so at least you can see what is going on if you have it playing itself.

With that said this is the most ridiculous thing I’ve seen:

  White Black Depth  Nodes  Score    Cpu     Rate
1. e2e4 e7e5      4   5793      0   0.00      1
2. d2d4 b8c6      4      0      0   0.00      0
3. d4e5 c6e5      4  17966      0   0.00      1
4. g1f3 b7b6      4      0      0   0.00      0
5. f3e5 f8c5      4 487931   -325   0.00      1
6. d1d5 c5b4      4 2079943   -425   1.00      2079943
7. e1d1 a7a6      4      0    775   0.00      0
8. d5f7           4 161840   4525   0.00      1
Averages:  4.00 ply, 550695 nodes,  0.20 cpu, 2753473 nodes/sec

Given I don’t have any good rusage emulation going on (I know its in MinGW at some point, and I probably can find it, and get it running on MSVC but I don’t see that as important) an 8 move victory seems pretty… unlikely?

Maybe it’s a good test of other C compilers to see if they produce anything. Or maybe it’s all a red herring? I haven’t tested with much but GCC 1.40 can’t even run it on x86. Watcom 10 can build, but it crashes during a self game.

It’s one of those mysteries, that I’m sure there is some fundamental lesson, but I’m not sure what it is.

Other than it’s a long way down, standing on the shoulders of giants.

I put the source & exe over on github. Not that I expect any takers.

oneAPI Base Toolkit from Intel [free as in beer]

I’ve been informed that the toolkit includes some fancy memory tools to detect incorrect access types when you use void pointers for fun and profit, but accidentally copy in too much ( or little ) and can really mess stuff up. Just because of alignment and it ‘fits’ doesn’t mean you are doing what you think you are doing!

Anyways, link is here!

The intel toolkit is expected to integrate with Visual Studio 2017 or 2019. I have the ‘community version’ and it picked it up fine. In addition 2019 has ASAN which also helps combat the infamous memory issues of C/C++

<need quote from [HCI]Mara’akate…>

With the win being the profiling tools, and the memory leak tool. I just haven’t had time lately, I’ve been busy IRL, and wanting to wrap up some a.out to OMF adventures.

Windows Dev VM

(This is a guest post from Antoni Sawicki aka Tenox)

I have been living under a rock for several years now when it comes to Windows development. Recently wanting to do some maintenance on couple of my projects I needed to download Visual Studio and Windows SDK. Poking around the download page I have discovered that Microsoft now provides a fully pre-installed VMs with Visual Studio, SDK etc. for VMware, Hyper-V, VirtualBox and Parallels. That’s actually super cool and handy. Thank you Microsoft!

Looks like this has been available for 3 or 4 years now. Oh well.

Christmas came early!

Iv’e been in Japan the last 10 days, but upon my return to Hong Kong this little 9kg box was eagerly awaiting me!

I know that ‘unboxing’ donation videos are quite popular, but I thought I’d do the blog equivalent. I don’t want to ‘out’ the sender, although I did email them back a big THANKS, although I didn’t get a reply. Maybe it’s an email thing but I wanted to tell them THANKS again!

To start is a bunch of loose CD’s including old SDK’s, and the infamous Windows 2000 RC1 set including Dec Alpha builds of workstation & server. Also in there is Beta 3 of Windows 98! Cool!

In the box was also Back Office 45, Visual C++ 6.0, a sealed copy of Windows 2000 Server, Visual Studio 2005 Standard and Expression Studio 2.

I’ve always loved this, it’s NT 4.0 and all the good bits of 1997, like Exchange 5.5 & IIS 4.0! Also in there is a copy of Outlook 2000, so this is a much later build/packaging of Back Office 4.5 . I’ve always wondered how many if any Back Office purchasers ever used SNA Server. I’ve seen it something exclusively used in real enterprises that have site licenses anyways.

Visual C 6.0 is the last x86 compiler that was ‘pure’ before the .NET invasion. Although you can with a bit of work get 2003 and onward to build for strict Win32, but who wants to work? This is getting increasingly hard to find, and getting far more expensive. But it’s great to have this in retail in the box again! (I used to have this and Visual Studio 97/6.0).

It almost feels wrong to break the seal on this, although I’ll probably do an active directory deployment eventually now that I have machines running in the USA, Hong Kong, and Japan.

I’m super thankful for all of this, and if anyone else wants to send me their ‘old / obsolete junk’ drop me a line!

VC6 Ultimate updates

I’ve been trading emails with various people from the project after I had made my post, and helping them integrate more of Visual Studio 2003 into the project and working through a few issues to bring far better compatibility to VS 2003.

And the best part is being able to build projects in parallel!

10.2 seconds in parallel!

I haven’t ordered new processors, so the 2.1Ghz parts are… lacking. However being able to use all available cores makes building DOSBox pretty fast.

Restricting the build to a single process takes 1:13 while the full parallel build on this machine takes a mere 10 seconds!

So absolutely check out VC6Ultimate!

Visual Studio .net Enterprise Architect

I uh, also saw this on archive.org, which may help people looking for this stuff from the future as old tools get harder and harder to find. Especially bigger editions like the Enterprise Architect version.

VC6 Ultimate


I saw this the other day, VC6 Ultimate. It’s an interesting ‘update’ on the old Visual C++ 6.0 product with an improved UI, along with updated compiler toolchain taken from later versions of Visual C++. Naturally something like this is 1000000% unofficial.

Features include:

  • Portable and compatible with Win7 / Win10
    bye bye regedit, hello .hjson setting file !
    also meaning it should not mess with your current install
  • More compatible compiler
    multicore version of VC7.1 compiler (It’s fast)
    you can compile with other compilers (64bit), but not debug yet
  • Real-time highlighting and diagnostics
    based on libclang 6.0 and compatible with VisualAssistX
  • Real multicursor editing
    search, sort, number, evaluate, etc. while in multicursor mode
  • Improved UX and UI
    32bit icons, dark skin, lot of visual hints
    multi-monitor friendly
    revamped dialogs (project settings, threads, breakpoints, …)
    searchable command palette
  • It’s free (as in free beer)
    ever had to pay for a birthday present ? 😉
  • Every change has a toggle
    only take what you like, but we can not check each combination
  • It’s an internal spare time project
    don’t expect everything to work in every setup, but feel free to reach out

Included in the bundle is the following compilers:

  • clang version 3.8.0 (branches/release_38)
    Target: i686-pc-windows-msvc
  • Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.6030 for 80×86
    Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
  • Microsoft (R) C/C++ Optimizing Compiler Version 14.00.40310.41 for AMD64
    Copyright (C) Microsoft Corporation. All rights reserved.

It’s an interesting project, although I tried to re-build some Visual C++ 2003 projects and it bombed out. Maybe it’s just more geared towards VC 6 as indicated.

You can download it here

https://gitlab.com/VC6Ultimate/VC6Ultimate

Platform SDK & DirectX for Visual C++ Express Edition 2005

Visual C++ 2005 Express Edition

So I’m back out, and on my limited machine (I did order something new, but on a group buying thing so it won’t be here for another SIX weeks… but then I’ll be on the road again so if I’m lucky 11 weeks……..) I’m using Visual C++ 2005 Express Edition, which by default includes just enough to compile simple stdio CLI based stuff.  To do anything more complicated you need what is known as the ‘Platform SDK’.  And to match up for the time period I’m using the Windows® Server 2003 SP1 Platform SDK Full Download. And of course various Direct X SDK’s too.

For my benefit (maybe yours too), here is

Instructions to integrate the Platform SDK are here, although I did set this to match the expected paths that were in my setup after installing service pack 1.  However I still had to manually do step 4:

Update the default.js file (found in %VSINSTALLDIR%\VC\VCWizards\AppWiz\Generic\Application\scripts\1033) and change the two lines that read:

LinkTool.AdditionalDependencies = “kernel32.lib $(NoInherit)”;

to:

// LinkTool.AdditionalDependencies = “kernel32.lib $(NoInherit)”;

And I was all set to go.

To make life easier (for me) this is headers & libs for the platform SDK + Direct X 6 & 7, and only 18 megabytes, instead of hundreds to download platform_directx6_7.7z  This has the directories and whatnot where they were expected, although you’ll have to manually add in the Direct X include & library directories, if you want to do anything with Direct X.

From the Tools menu in Visual Studio, select Options. The Options dialog box appears.

From the Options dialog box, expand the Projects and Solutions node and select VC++ Directories. In that section, add the following paths to the appropriate subsection:

unresolved symbol __imp____iob_func aka SDL 1.25 & Visual Studio 2015

While trying to build something with Visual C++ 2015 Community edition I got this fun error while trying to link:

LNK2019 unresolved external symbol __imp____iob_func referenced in function _ShowError
LNK2019 unresolved external symbol __imp__fprintf referenced in function _ShowError

So it turns out that some of the fundamental streams have changed, and when the SDL library is compiled it attaches LIBC into it, which then creates this fun mis-match.  The fix is easy, of course, just download the source to SDL 1.25, and re-build it with Visual Studio 2015.  But then you’ll get another error that /ZI and /Gy- are incompatible with eachother.  I just changed /ZI to the older /Z7 setting, and I could quickly compile SDL, copy the libs to my project and happily link & run.

Visual C++ Toolkit 2003

For those 2-3 people still searching for this thing, it’s the old ‘free’ CLI C++ compiler from Visual Studio .NET 2003.

Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3052 for 80×86
Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.

Although Visual C++ .NET 2003 SP1 gives you a later version of the compiler…

Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.6030 for 80×86
Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.

I’m not sure if you can service pack this toolkit.

You can download it from my site as VCToolkitSetup.exe

For anyone who wants to run this under newer versions of Windows as I know I can’t install it on Windows 8 or 10, I installed it on my Windows XP x64 machine, and uploaded it here as vc2003toolkit.7z

By the time this came out, Microsoft had started to admit that they had lost serious ground to GCC, as for years they had neglected the low end $99 market that they had dominated during their fights with Borland in the QuickC vs TurboC days.  Once Borland had withdrawn from the market, Microsoft felt no need to compete and this left plenty of time for GNU tools to take hold in the marketplace.  This was a stopgap reaction as a prelude to the Visual Studio Express that would happen in 2005 onward.

Elsewhere I’ve been able to find an old Windows 2003 SP1 Platform SDK image, it should certainly let this compiler build far more interesting things.  Although unless you really need 2003, you really ought to look at newer stuff.  Unless you like really old stuff, then as a reminder the Win32s 1.1 SDK includes the version 8.00 compiler from 1993 as well.  You can download it from here: win32s-1.1-build-88-msvc32sdev.7zÂ