Someone had contacted me about running some Fortran programs on the DEC Alpha with Windows NT. Now I know that DEC had released some compilers for the Alpha, the Digital Visual Fortran thing which some people still sell for around $600 USD. OUCH. But luckily a friend mentioned that I should look at the source code for Open Watcom. So, I figure for the hell of it, I’ll show how to build a Dec Alpha cross compiler for both C & Fortran. First I’m using Open Watcom 1.8, the current ‘release’ version. You are on your own for older or newer versions. First install Open Watcom 1.8, with whatever your host is (I’m running on win64, so I’m using the win32 install), and set the target for 32bit NT. We will need the headers so this is the easiest way to ensure your Watcom can make NT exes. Next you are going to need the file owaxp0401.zip. This is a pre-compiled version of the compiler & libraries for the DEC Alpha. All we need from this is the libaxp directory, which you can just unzip to your Watcom directory. Now we’ll need to copy some files to satisfy the build process. C:\WATCOM\binnt>copy wcl386.exe bwcl386.exe C:\WATCOM\binnt>copy wlib.exe bwlib.exe C:\WATCOM\binnt>copy wrc.exe bwrc.exe Ok, now with that out of the way, run c:\watcom\owsetenv.bat to setup your environment, and now let’s extract the source to 1.8. I’m just going to use c:\temp as a place to put it. Also you will have to edit the setvars.bat file, and change the following: set OWROOT=c:\temp\ow18src set WATCOM=c:\watcom set DOC_BUILD=0 Now I suppose you could save this into a batch file, and kick that off, and this will build the needed libraries, then the C compiler. cd c:\temp\OW18src\bld\builder\nt386 wmake cd c:\temp\ow18src\bld\dwarf\dw\osi386\ wmake cd c:\temp\OW18src\bld\yacc\nt386 wmake copy yacc.exe \WATCOM\binnt\byacc.exe cd c:\temp\OW18src\bld\re2c\nt386 wmake copy re2c.exe \WATCOM\binnt\re2c.exe cd c:\temp\ow18src\bld\cg\risc\axp\nt386\ wmake cd c:\temp\ow18src\bld\sdk\rc\wres\flat386\mf_r wmake cd c:\temp\ow18src\bld\cfloat\osi386 wmake cd c:\temp\ow18src\bld\as\alpha\inline\osi386\ wmake cd c:\temp\ow18src\bld\owl\osi386\ wmake Now this will build the cross compiler… cd c:\temp\OW18src\bld\cc\wcl\nt386.axp wmake copy wclaxp.exe \WATCOM\binnt cd c:\temp\OW18src\bld\cc\nt386.axp wmake copy wccaxpc.exe \WATCOM\binnt\wccaxp.exe copy wccdaxpc.dll \WATCOM\binnt\wccdaxp.dll cd c:\temp\OW18src\bld\as\alpha\nt386 wmake copy wasaxp.exe \WATCOM\binnt Now for the Fortran 77 compiler. Please note that the default flags include -we which will cause the compiler to error if there is a warning. And as luck would have it, one function doesn’t declare a prototype… So you can either remove the -we flat from the mif file, or fix the c file… The choice is yours. cd c:\temp\OW18src\bld\f77\wfl\nt386.axp wmake copy wflaxp.exe \WATCOM\binnt cd c:\temp\OW18src\bld\f77\wfc\nt386.axp wmake copy wfcaxp.exe \WATCOM\binnt attrib c:\temp\OW18src\bld\f77\f77lib\flags.mif -r notepad c:\temp\OW18src\bld\f77\f77lib\flags.mif Do a search and replace on -we and replace it with nothing… cd c:\temp\OW18src\bld\f77\f77lib\winnt.axp\_s wmake copy flib.lib \WATCOM\libaxp With all that out of the way, let’s build some test programs… Let’s start with hello.f for the Fortran compiler. C234567 program hello print *, ‘Hello!’ end c:\temp>wflaxp hello.f Open Watcom F77 Alpha AXP Compile and Link Utility Version 1.8 Portions Copyright (c) 1990-2002 Sybase, Inc. All Rights Reserved. Source code is available under the Sybase Open Watcom Public License. See http://www.openwatcom.org/ for details. wfcaxp hello.f Open Watcom FORTRAN 77 Alpha AXP Optimizing Compiler Version 1.8 Portions Copyright (c) 1984-2002 Sybase, Inc. All Rights Reserved. Source code is available under the Sybase Open Watcom Public License. See http://www.openwatcom.org/ for details. hello.f: 3 statements, 40 bytes, 1 extensions, 0 warnings, 0 errors Open Watcom Linker Version 1.8 Portions Copyright (c) 1985-2002 Sybase, Inc. All Rights Reserved. Source code is available under the Sybase Open Watcom Public License. See http://www.openwatcom.org/ for details. loading object files searching libraries creating a Windows NT(AXP) character-mode executable c:\temp> Watcom Fortran cross on Dec Alpha Ok, now that’s enough for now…! Later I’ll show how to build these compilers so they’ll run on the Dec Alpha. # Neko x64! For no real reason today I remmeber that there used to be this cool program back in the Windows 3.0 days called Neko. I was trying to explain it to my girlfriend about this cat that would chase your mouse! Click the picture above to play with neko in jdosbox. I recal that Neko even made it to OS/2 as it was more interesting then the mouse trails alternative from Microsoft. At any rate, I was wondering if there ever was a 32bit version of Neko… And much to my amazement I found there was a Neko95, and a Neko98! And they even ran on my x64 version of Windows… So after googling around, I found the source code to Neko 98! So I did the next best thing, which is download the source, fix a single casting ‘error’ in some square root function and I got it building under Visual C++ 2008. Then I figured, what the hell, added a target for the x64, and built… a 64 bit version of neko! You may need some VC runtimes if your system is an old x64… At this moment it can be found here: Or by searching for Microsoft Visual C++ 2008 SP1 Redistributable Package (x64) Oh well at any rate, it’s cool to see Neko still kicking! PS When I get back I’ll have to see about an i386MIPS, Dec Alpha and Itanium build… wink wink! —edit Neko98’s source code has been rescued, all saved here. —years later I just received this screen shot of Neko x64 rocking it on Windows 8 (Desktop mode) Neko on Windows 8 # Just got a DEC AlphaServer 800… All 100lb of it. It is HEAVY. Anyways, long story short, after hauling it around Financial District, and Times Square, it’s now safe and installing Windows NT 4.0 Terminal Server. AlphaServer 800 It’s got a single 5/500 CPU, along with 256MB of ram, and 2x 36gig disks. I’ll have to check to see if I have any ram that’ll fit it. I may very well turn it into a public access thing too….. But we’ll see. # DEC Legacy Event Well I just found out about a “DEC Legacy Event” being held in the UK. Sadly I already booked tickets to the UK *this* month not the correct one… But then who knows… 😉 From the site: The DEC Legacy Event that will take place on the 17th & 18th April 2010 in Windermere, UK. The purpose of the event is to bring together people with an interest in the company Digital Equipment Corporation and their legacy of hardware, software and ethos. There will be both vintage DEC computer hardware and software and more recent HP hardware and software being demonstrated at the event. I suppose this would have been the place to get some win terminals going, and have multi-user access into a VMS system running on SIMH on an Alpha… Oh well… At any rate they promise to upload video from the aftermath, and they’ve got up some interesting promo pics # SIMH on the DEC Alpha… I released a partial binary build of SIMH on the DEC Alpha using Visual C++ 6.0 … I didn’t think much of it, but it’s been downloaded 400% more then I had thought…. (I didn’t think anyone would!)… I can either conclude that: • There are some DEC Alpha NT users still out there… • Some people download things for the sake of downloading… If you are one of the four remaining users, let me know… I have Visual C++ 6 I can try to build other stuff…. In the meantime, here is VMS on WNT… VAX./VMS running on a Dec Alpha / NT machine # Updates for NT 4.0 on the DEC Alpha It seems that the ‘official’ updates for NT 4.0/Alpha on the Microsoft website are long gone… I know that Internet explorer 5.0 will be a part of that SUN vs Microsoft lawsuit which barred Microsoft from distributing any product containing the MS JVM… (like Office 97, IE5, J++ etc…) However I found a stack of CD’s containing among other things the last updates that were provided for the DEC Alpha platform running NT 4.0. For Windows NT 4.0 workstation & server users you’ll want Service pack 6a. Terminal Server users will no doubt want Service pack 5. As far as I can tell, this was the last update to Terminal Server for Alpha users. Also there are MANY WTSALPHA.EXE’s out there, that are ALL corrupt… I was very lucky to have found this on a CD, and I can safely say that it runs perfectly fine on my Alpha. Finally, on the Service pack 6a CD, there is a copy of Internet Explorer 5.0, and I’m pretty sure this was the last Alpha version of IE released. I’m sure its possible to run Firefox 1.5 or maybe even IE6 via !FX32, but native exe’s are so much the better. Internet Explorer 5.0 contains the standard accessories, namely outlook express, netmeeting, comic chat, and the media player… I’ve been lucky enough to have a MSDN CD set from 1998, that included the MS Word, and Excel for the DEC Alpha… Back in 1997 when I used a DEC Multia, as a primary machine, I remember how ‘cool’ it was to run Office 97 through FX32, along with lotus notes to do work stuff… But I have to tell you, sure it’s 2010, but having a native version is way more cooler. Also I have to say the C++ compiler for the DEC Alpha is the buggiest thing I’ve ever seen. The ‘hint’ should have been from the NT 3.5 SDK that builds all the Alpha stuff with the /Od flag turning off all optimizations. I had such a hard time with unzip it’s not even funny. Luckily Visual C++ 6.0 for the Alpha is way more stable, even unzip will build with the /O2 flags. I can only wonder how much Microsoft went crazy fighting this compiler.. They seemed all to willing to give up on public releases of NT for the Alpha, but rumor is that the Itanium was so delayed for physical units, the 64bit version of Windows 2000 was started on the DEC Alphas… Then finally ‘tested’ with the Windows 2000 Data Center limited availability release… For what it’s worth, here is the version strings of the compiler…. Microsoft (R) & Digital (TM) Alpha C/C++ Optimizing Compiler Version 12.00.8217 Copyright (C) Microsoft Corp 1984-1998. Copyright (C) Digital Equipment Corporation 1992-1998 Copyright (C) Compaq Computer Corporation 1998. All rights reserved. And the compiler that is on the NT 3.5 SDK… Microsoft (R) & Digital (TM) AXP C/C++ Optimizing Compiler Version 8.03.JFa Copyright (C) Microsoft Corp 1984-1994. Copyright (C) Digital Equipment Corporation 1992-1994 All rights reserved. It’s funny that there is almost *NO* mention of this 8.03.JFa version… But then I’m sure most people at the time, didn’t realize that the i386/MIPS compilers were on the 3.1 SDK, the Alpha on the 3.5 & the PowerPC on the 3.51… I never did figure out why they didn’t keep on providing these compilers…. But then MS works in mysterious ways at times. Oh, and I finally benched quake on the console with a 32k video card.. It was just shy of 60FPS! Which for a 600Mhz machine circa 1996 is pretty dammed fast! The fastest intel cpu at the time would have been the 200Mhz Pentium PRO… I actually have one, and I’ll have to install NT 4.0 on that and do a comparison.. # Dungeon on the DEC Alpha I forgot to mention this, but f2c built, although there is probably some error with the floating point… I’ve had issues building f2c on OSF/1 on Alphas a while ago…. Anyways it can be found here. One day I’ll have to try to debug the floatlib on the Alpha to see why f2c freaks out…. But then again, who still uses DEC Alpha’s? # Well today I got my new Dec Alpha running! Ok, my friends say I’m insane to have bought this… but I couldn’t resist. It’s a DEC Alpha 221164 machine, with 64MB of ram, and a 4GB disk! It’s the best technology of 1996-1997! So I’ve gone ahead and installed Windows NT 4.0 on the beast… at 600Mhz it’s pretty dammed fast… considering how old it is. Although I suspect a Pentium III I found in the garbage with a 1Ghz cpu is 2x faster….. But at any rate, this is a DEC Alpha, the long time geek cpu of dreams etc… What makes this slightly useful for me, is that I do have Visual C++ 4.0 & 6.0 for the Alpha. So at least I can build *SOME* stuff to run on the thing…. So I’ve been fighting the compiler, and it seems it’s default blended optimizations do *NOT* work on my machine.. I’m sure this will be fun down the road. However it seems setting the target cpu to the 21064 produces ok code.. I’ve got to bench the stuff, but at least my exe’s are not crashing. So what have I manage to produce today so far? Well… unzip is a major one.. It’s hard to use a machine today without it. The other thing I’ve manage to get running, is Quake! I’ve included my source & project trees as it was a feisty little thing to build.. I’m currently building & testing over terminal services so I don’t know what the speed is on the console… Also, this build does not include networking… I’m sure the winsock code will work just fine, I’m just not in a good position physically to test it, as Quake1 will *NOT NAT* correctly.. Also the SDL sound doesn’t actually output anything, so I’ve built it with the null sound driver.. I’d love to get that m68k->C build of frontier elite to go on the Alpha but I’m afraid my 64mb of ram will be a major constraint.. I know this isn’t much of an emulation thing, as the only emulator that possibly can run Windows NT for the Alpha costs upwards of$16,000 USD… It’s cheaper to score an alpha on ebay for \$100 USD.

Well here is the screen shot…

Quake on the Dec Alpha

I know it’s not much to ‘look’ at, but the pallet is correct, because it’s a real Alpha!.. Unlike the MIPS thing.