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.

VOGONS.org turns 20 years old today!

Stiletto had dropped on by to share this amazing milestone!

Today is the 20th anniversary of http://VOGONS.org. I was there helping to brainstorm it into existence in June 2000 at @bravenet on vladr’s VDMSound forums before @zetafleet hosted it, I registered for it on July 1st, and I helped give it its name and “theme”!

Follow the twitter thread here!

For the longest time VOGONS was the place to get information about VDMsound the sound blaster emulator for NTVDM, allowing a far more rich gaming experience on NT, DOSBox, the ubiquitous PC/MS-DOS emulator that is simply everywhere, and of course where I was ‘discovered’ via ‘Quake1 with WATTCP built with DJGPP on DOSBox‘ some 10+ years ago!

So happy 20th to VOGONS!

Microsoft Ends the Bethesda Launcher

Why yes, I do live in a cave!

Although I only got this for Fallout 76, back after the discounts started after launch:

So it doesn’t mean a heck of a lot to me. And they did a Fallout 76 migration a while back, and the rest was just freebies given out for whatever reason. Oh well. Steam, love them or hate them kills another single vendor pointless storefront.

Nothing

I’m not sure why but I seem to be getting pulled into the ZX spectrum. Maybe it’s because I’ve yet to have seen one, and find it interesting about this massive parallel space I knew nothing of.

I’d found this review of the game, by sinc LAIR, which goes over a bit of history behind this port of the game. Very cool stuff, but for non русский speakers like me, be sure to turn on the auto translated subtitles!

The game is for sale for a mere €3 zxonline.net. One thing I had issues with, is because it’s Russian, normal Pay Pal blocks the transaction of account to account, so you have to use incognito mode, and tell Pay Pal to process it as credit card and it’ll work fine. Keeping in mind since Pay Pal does the CC charge, your # never goes to Russia. And it’s a damned shame, it’s not like ever Russian hacker is all about online crimes, some just want to make cool games.

Game play is challenging as hell! It’s very much a ‘one touch and you are dead’ game. I cheated and uses save states from the EmuZWin emulator.

ABSOLUTELY GET A JOYSTICK!

I don’t know why I was playing with the keyboard, holy crap don’t do that, don’t waste your time!

Would I recommend nothing for the ZX Spectrum 128k? Absolutely. It’s totally worth the €3, you can feel the love in this game!

sinc LAIR is going to have a live stream of it in a few hours, so I can see how to get past the spinning monster thing on level 2. Maybe I’ll post some video of me constantly dying.

PETSCII Robots released for the ZX Spectrum

PETSCII Robots title

So yeah on the surface, it’s an 8 bit game on another platform. Not that exciting but this isn’t a 6502, the Spectrum is a Z80! So yes it’s been manually ported by mr287cc with music from Shiru.

faux petscii mode

So this is pretty cool watching the game break out of the 6502 that spawned it. So overall yeah, it’s the same game, but new platform. And the first image is the traditional game, which works fine, but where would be the fun in that? Instead you get a whopping 4 versions of the game, along with a program that plays all the sountracks, a full 184kb worth of fun. I suspect it’s a full tapes worth.

Gripes on strange and foreign platforms…

The biggest and weirdest thing to me is loading the tape files into an emulator. I have to admit I never even heard of a Spectrum until college, and it was largely that it’d been emulated better before anything Commodore, and that it too had an extensive (although 100% tape based) library, which really restricted things like RGP’s and Adventure games, having to run from the incredibly limited 8bit ram.

Anyways to load from tape the command is:

LOAD "".

But the spectrum doesn’t have a Microsoft Basic, rather you type in J for the load command. Yes. J.

Spectrum Keyboard matrix

I had to google around a fair bit to find this, butt here is a keyboard matrix.

The P key

Yes seriously. And because it’s the most pressed key, many of them are impossible to tell from images that they have the double quote. Also it’s a “symbol shift” key so in emulators it maybe a control or alt key, so it’s J CTRL+P CTRL+P, then play on your virtual tape deck and listen to the screeching data (just like a modem). The game loads in a minute or so, and off you go!

The Microbots image

Adding to the keyboard fun, this is the game keyboard layout:

So it’s not too bad.

Colour Micro Robots banner

Is it worth it?

Absolutely! You do get several versions for your $10, and the ZX-Microbots version is the best by far, with music, and of course a high resolution screen letting you see far more of the action!

I’ve tried it in a bunch of emulators, and it works fine, so compatibility seems to be very good, but I don’t have any hardware to run it native. You do get WAV & TAP files in the sizeable download, along with PDF’s of the manuals. I haven’t seen anything about mastering tapes, so I don’t think there will be a physical release.

You can pick it up on David’s site for $10 USD. It’s totally worth it in my opinion.

My disclosure is that I’ve bought it for the Pet/c64 twice (once by accident), ZX and Amiga, 100% on my own money.

68000/Amiga

As a bonus non 6502, there is also an Amiga version, which sounds great, plays fine, but compared to the Spectrum version, it just feels cramped.

32016 stand alone planetfall!

InfoTaskForce’87 running on a simple NS32016 emulator

What is it?

It sure may not look like much but it was an adventure getting here.

First, what is it? Well it’s the very simple NS32016 from here, with a few minor changes. I expanded the RAM from 256kb to a whopping 8MB. Then I added simple character I/O allowing me to print messages to the screen. Next looking at the toolchain page, I used my old Linux to Windows GCC 4 cross compiler to build the appropriate Canadian cross compiler to the NS3216.

Building the tools

A while back, I had built a cross compiler from Linux to Windows using GCC 4.1 as the basis as it was the last version that didn’t have massive external dependencies. NS32016 support was dropped some time in the late 3.x or early 4.x GCC so it means we need to go old anyways. I arbitrary picked GCC 2.8.1 for this build, while using the recommended Binutils 2.27

I cheated and just downloaded my existing linux-minw32.7z cross compiler as I didn’t feel like rebuilding everything again, although it is all in the Building a MIPS Compiler for Windows on a Linux VM! article. I also used an old Linux to Linux i586 32bit compiler (back from the OSKit build!) although you can use your hosts as well.

configuring Binutils is pretty simple like this:

./configure --prefix=/cross --target=ns32k-pc532-netbsd --host=i686-mingw32 --build=i586-linux

You can try omitting the –build portion, Debian GNU Linux 10 seemed okay with Gcc 8 as the default system compiler.

configuring GCC 2.8.1 was pretty similar:

./configure --target=ns32k-pc532-netbsd --prefix=/cross --disable-libssp --build=i586-linux --host=i686-mingw32

GCC 2.8.1 doesn’t quite know what we are doing so there is some flags we need to run off in auto-config.h namely

  • #define HAVE_BCMP 1
  • #define HAVE_BCOPY 1
  • #define HAVE_BZERO 1
  • #define HAVE_INDEX 1
  • #define HAVE_KILL 1
  • #define HAVE_RINDEX 1
  • #define HAVE_SYS_RESOURCE_H 1
  • #define HAVE_SYS_TIMES_H 1

You can just comment them out, or remove those lines all together.

When it came to building GCC, I did run into issues with GCC 7/8 trying to build GCC 2.8.1. I found it much easier to either have that Linux 4.1 compiler, or if you have access to Wine or WSL you can just run the Win32 binaries for the gen phases.

./configure --prefix=/cross --target=ns32k-pc532-netbsd --host=i686-mingw32
make CC=i686-mingw32-gcc xgcc cccp cc1 cc1obj

If you can run your own Win32 exe’s on Linux it’ll run just fine using the Linux to Windows GCC 4 cross. Otherwise you will need to either patch GCC or make your own GCC 4 hosted Linux to Linux cross compiler like this:

make CC=i686-mingw32-gcc HOST_CC=i586-linux-gcc xgcc cccp cc1 cc1obj

Hopefully that worked enough, and now you have your cross compiler. Now it’s time to build libgcc1.a

cp cccp cpp.exe
cp cc1 cc1.exe
cp xgcc xgcc.exe
cp ../binutils-2.27/gas/.libs/as-new.exe as.exe
cp ../binutils-2.27/binutils/.libs/ar.exe ar
cp ../binutils-2.27/binutils/.libs/ranlib.exe ranlib
make libgcc1.a TARGET_TOOLPREFIX="./" OLDCC=./xgcc.exe

Again you really want to be able to run the resulting programs on Linux but I guess you could script it out. Naturally if you wanted to just use Linux, it’d be easier to make that cross compiler directly, although I’m not sure how much of GCC 2.8.1 I want to fight, or just get GCC 4 running on Linux and use that to port.

crt0, somewhere for C to start

As mentioned a crt0.s is missing but there was enough inspiration to come up with this:

#NO_APP
gcc_compiled.:
.text
        .align 1
.globl _start
_start:
        enter [],0
#APP
#       setting the stack 256k under 8MB
        lprd sp,0x7c0000
        jsr _main
#NO_APP
L1:
        exit []
#       setting the stack 256k under 8MB
        lprd sp,0x7c0000
        bpt
        .align 1

#does nothing
.globl ___main
___main:
        ret 0

.globl _exit
_exit:
        bpt
        ret 0

I used a bit of the C example, and added some hooks that GCC was expecting namely a __main call that is made from main before it does anything (a place to init memory perhaps?), a place to catch an explicit exit call, along with setting the stack of course.

Patching InfoTaskForce without malloc / disk access

It’s not going to win any awards, but it was really great to get it to run a simple program written in GCC. Looking for something more fun, I took the old InfoTaskForce interpreter from ’87, and dug up my modification to run on cisco routers, and cooked up this version, that adds enough of printf from Linux, a bogus malloc that just allocates from a fixed memory array (otherwise you have to actually know about your platform), and a fun trick with later binutils where you can import a binary file directly as an object!

Neat!

Since I don’t have any file I/O being able to have the game data in RAM is crucial. I tried to tweak it so you could build the same working thing on Windows (maybe others?).

So for anyone who wants to look at the standalone adventure Win32 hosted tools are here, although the emulator should be somewhat portable.

AMD64 Pinball extravaganza!

With all the talk of 64bit versions of Pinball I thought I’d share simple script to extract Pinball from an XP x64 CD-ROM so you can take it with you. It’s portable so thats nice too, although it doesn’t use any wad/pak/zip files so all the assets are loose files:

expand f:\amd64\font.da_ font.dat
expand f:\amd64\pinball.da_ pinball.dat
expand f:\amd64\pinball.ex_ pinball.exe
expand f:\amd64\pinball.in_ pinball.inf
expand f:\amd64\pinball.mi_ pinball.mid
expand f:\amd64\pinball2.mi_ pinball2.mid
expand f:\amd64\sound1.wa_ sound1.wav
expand f:\amd64\sound104.wa_ sound104.wav
expand f:\amd64\sound105.wa_ sound105.wav
expand f:\amd64\sound108.wa_ sound108.wav
expand f:\amd64\sound111.wa_ sound111.wav
expand f:\amd64\sound112.wa_ sound112.wav
expand f:\amd64\sound12.wa_ sound12.wav
expand f:\amd64\sound13.wa_ sound13.wav
expand f:\amd64\sound131.wa_ sound131.wav
expand f:\amd64\sound136.wa_ sound136.wav
expand f:\amd64\sound14.wa_ sound14.wav
expand f:\amd64\sound16.wa_ sound16.wav
expand f:\amd64\sound17.wa_ sound17.wav
expand f:\amd64\sound18.wa_ sound18.wav
expand f:\amd64\sound181.wa_ sound181.wav
expand f:\amd64\sound19.wa_ sound19.wav
expand f:\amd64\sound20.wa_ sound20.wav
expand f:\amd64\sound21.wa_ sound21.wav
expand f:\amd64\sound22.wa_ sound22.wav
expand f:\amd64\sound24.wa_ sound24.wav
expand f:\amd64\sound240.wa_ sound240.wav
expand f:\amd64\sound243.wa_ sound243.wav
expand f:\amd64\sound25.wa_ sound25.wav
expand f:\amd64\sound26.wa_ sound26.wav
expand f:\amd64\sound27.wa_ sound27.wav
expand f:\amd64\sound28.wa_ sound28.wav
expand f:\amd64\sound29.wa_ sound29.wav
expand f:\amd64\sound3.wa_ sound3.wav
expand f:\amd64\sound30.wa_ sound30.wav
expand f:\amd64\sound34.wa_ sound34.wav
expand f:\amd64\sound35.wa_ sound35.wav
expand f:\amd64\sound36.wa_ sound36.wav
expand f:\amd64\sound38.wa_ sound38.wav
expand f:\amd64\sound39.wa_ sound39.wav
expand f:\amd64\sound4.wa_ sound4.wav
expand f:\amd64\sound42.wa_ sound42.wav
expand f:\amd64\sound43.wa_ sound43.wav
expand f:\amd64\sound45.wa_ sound45.wav
expand f:\amd64\sound49.wa_ sound49.wav
expand f:\amd64\sound49d.wa_ sound49d.wav
expand f:\amd64\sound5.wa_ sound5.wav
expand f:\amd64\sound50.wa_ sound50.wav
expand f:\amd64\sound528.wa_ sound528.wav
expand f:\amd64\sound53.wa_ sound53.wav
expand f:\amd64\sound54.wa_ sound54.wav
expand f:\amd64\sound55.wa_ sound55.wav
expand f:\amd64\sound560.wa_ sound560.wav
expand f:\amd64\sound563.wa_ sound563.wav
expand f:\amd64\sound57.wa_ sound57.wav
expand f:\amd64\sound58.wa_ sound58.wav
expand f:\amd64\sound6.wa_ sound6.wav
expand f:\amd64\sound65.wa_ sound65.wav
expand f:\amd64\sound68.wa_ sound68.wav
expand f:\amd64\sound7.wa_ sound7.wav
expand f:\amd64\sound713.wa_ sound713.wav
expand f:\amd64\sound735.wa_ sound735.wav
expand f:\amd64\sound8.wa_ sound8.wav
expand f:\amd64\sound827.wa_ sound827.wav
expand f:\amd64\sound9.wa_ sound9.wav
expand f:\amd64\sound999.wa_ sound999.wav
expand f:\amd64\table.bm_ table.bmp
copy f:\amd64\WAVEMIX.inf WAVEMIX.INF

Naturally you’ll want to substitute F:\ with whatever drive letter your CD-ROM/ISO file is mounted on.

And thanks to a long needed feature in Windows 10 you can verify that yes indeed it is a 64bit version.

Or skip the pain, and download the first currently available AMD64 version here: pinball-3790-1069.7z

Isn’t that awesome?! Obviously ARM64 users are left out in the dark, as far as I know there was no ARM64 versions of Windows XP. As a matter of fact, was there any public versions of Windows XP for ARM? Naturally the Surface RT shipped with 8.0

Anyways at long last we can have our 64bit pinball despite the weird bugs, and how the plunger is mostly hidden no doubt due to yet more weird floating point/integer size inconsistencies