Visual C++ 4.0 arrived today!

For the RISC cpu!… That being Alpha & MIPS. Although the back of the box does mention PowerPC there is no PowerPC anything here…

Visual C++ 4.0 RISC box
Visual C++ 4.0 RISC box

I always did like the old Microsoft boxes during this time period… They always looked somewhat professional, not like today’s weird boxes that look like some kind of toy should be inside.

Also speaking of RISC cpu’s check the back of the Visual C++ 2.0 for mips box:

Visual C++ 2.0 MIPS box back
Visual C++ 2.0 MIPS box back

You have to remember it was “time” the golden age of the promised RISC cpu… Intel was hitting that wall with the 486, but lo the pentium changed all of that. And the Pentium PRO cemented all the little RISC cpu’s death. It’s funny how at the same time the “itanic/itanium” is just as dead as well.. MIPS. At least MIPS has their embedded space.. Which is funny looking back at the R4000 as a workstation CPU, and now it’s available in handhelds & set tops.. Although the Acorn derived strongarm is well… Strong-arming MIPS & Power for embedded dominance.

I’m pretty sure that Visual C++ 4.0 brought a lot of Windows 95 like functionality to NT, so I’ll have to see just how much(or little) of modern stuff will build. According to this link, 4.0a was the LAST version to support the MIPS, so Unless I can find 4.0a this is as good as it’s going to get.

If anyone has either insight on where to get Visual C++ 4.0a for the MIPS, or even where to get NT 3.1 for the Alpha give me a line…. Not to mention service pack 3 for the MIPS running NT 3.1… I have a feeling the shiped kernel is at fault in the emulator…

Microsoft eMbedded Visual C++ 4.0

Well I was looking for a way to cross compile to the MIPS and also if I could use my old Platform builder 2.11..  Anyways Platform builder has cross compilers, but no libraries, I figured you need the eMbeded Visual C++.  And as luck has it, you can download it right here!  Also you’ll probably want service pack 4 (local mirror), and don’t forget the code TRT7H-KD36T-FRH8D-6QH8P-VFJHQ

System Requirements
  • Supported Operating Systems: Windows 2000; Windows XP
  • Microsoft Windows® 2000 Professional SP2, Microsoft Windows 2000 Server SP2, or Microsoft Windows XP Professional
  • A desktop computer with a Pentium-II class processor, 450 MHz or faster
  • 96 MB (128 MB recommended) memory for Windows 2000 Professional or Windows XP Professional. 192 MB (256 MB recommended) memory for Windows 2000 Server.
  • 200 MB hard disk space
  • CD-ROM drive
  • VGA or higher-resolution monitor. A Super VGA (800 x 600 or larger) monitor is recommended.
  • Mouse or compatible pointing device

If your machine is NOT up to this kind of capability, then you can download the older eMbedded Visaul C++ 3.0, that will run on Windows NT 4.0 (i386 of course). Purdue also had a nice walkthrough on installing the 3.0 tool kit.

I DO recommend that you install IIS on your cross compiling machine, as it’s an easy way to move your object files to the MIPS host for linking.

It is worth noting that Visual C++ 4.0’s emulator will NOT run under Virtual PC.  They use the same call set, and it thinks VPC is Windows CE..  I know it’s confusing.

I would imagine everyone could run this…  Well if they were so inclined.  Well the installation is pretty simple but now for the ‘fun’ stuff.

First let’s download the source code to Quake.  ID software has been most kind to provide the Quake engine under the GPL!  So we can use it for a MIPS cross compile test.. (As far as I know there is no Dec Alpha cross compiler, but there is a PowerPC.. Anyone use a PowerPC NT machine?)  You can download it here.  This went nowhere, as it turns out WindowsCE and Windows NT use different models for floating point, and are incompatible.

Ok with your embedded tools installed, we are now going to merge our Visual C++ MIPS CD so we use it for libraries & include files.  Since we are all going to use the same compiler it’ll be somewhat easy.  I’m using the tools out of “C:\Program Files\Microsoft eMbedded C++ 4.0\EVC\WCE400”

11/27/2001  03:00 AM         1,073,152 C1XX_MP.DLL
11/27/2001  03:00 AM           581,632 C1_MP.DLL
11/27/2001  03:00 AM         1,056,768 C2_MP.DLL
11/27/2001  03:00 AM            69,632 CLMIPS.EXE
06/13/2001  03:00 AM           180,276 MSPDB60.DLL

To make it “feel” like visual c++ 2.0 I’m going to put them in the c:\msvc20\bin directory on my HOST pc (Vista Pro x64).  Then I simply copy the include & lib directory from the MIPS Visual C++ CD into the corresponding directories on my host.  We are ALMOST there.

The next thing I did was to grab an intel copy of Visual C++ 2.0 (I almost be dammed near all of them can do this..) and take it’s linker.  The linker out of the embedded tools is obsessed with the windowsce subsystem which won’t help us at ALL.

09/16/1994  01:00 PM            67,584 DBI.DLL
09/16/1994  01:00 PM            12,980 LINK.ERR
09/16/1994  01:00 PM           420,352 LINK.EXE

Go ahead and place those files into the c:\msvc20\bin directory.

Now we just need to create a simple batch file to keep our enviroment in order:

set LIB=c:\msvc20\lib

set PATH=c:\msvc20\bin;%path%

set include=c:\msvc20\include

Save that to something like mipvars.cmd, and run it & we should be ready to start compiling!

To test the cross compiler I’m going to build a SIMPLE program that has 2 files.

hi.c

#include <stdio.h>

extern int bob(void);

void main(void)
{
printf(“%d”,bob());
}

bob.c

int bob(void)
{
return 3;
}

Ok, now we compile it like so:

C:\msvc20>clmips *.c -o bob.exe
Microsoft (R) C/C++ Optimizing Compiler Version 12.20.9419 for MIPS R-Series
Copyright (C) Microsoft Corp 1984-2001. All rights reserved.

bob.c
hi.c
Generating Code…
Microsoft (R) 32-Bit Incremental Linker Version 2.50
Copyright (C) Microsoft Corp 1992-94. All rights reserved.

/out:bob.exe
/out:bob.exe
bob.obj
hi.obj
LINK : error LNK1104: cannot open file “corelibc.lib”

Oh no trouble!  Because this was all ripped from the embeded tools it wants to think it has corelibc not libc.  But we can cheat, just copy libc.lib to corelibc.lib and I’ve also copied rpcndr.lib to coredll.lib to satisfy the linker.  Now when we re-compile:

C:\msvc20>clmips *.c -o bob.exe
Microsoft (R) C/C++ Optimizing Compiler Version 12.20.9419 for MIPS R-Series
Copyright (C) Microsoft Corp 1984-2001. All rights reserved.

bob.c
hi.c
Generating Code…
Microsoft (R) 32-Bit Incremental Linker Version 2.50
Copyright (C) Microsoft Corp 1992-94. All rights reserved.

/out:bob.exe
/out:bob.exe
bob.obj
hi.obj

That’s right, we got an executable!  Now if you run it on your x86(or x64) host you’ll get this:

c:\msvc20\bob.exe is not a valid Win32 application.

And of course since you installed IIS on your HOST( or cross compiling VM) you can connect to it from your MIPS vm, download the exe & run it.

MIPS cross compile
MIPS cross compile

I’m kind of surprised it worked.  It does go to show though, that somewhere inside Microsoft they have some COOL cross compiler technology, it’s just too bad they didn’t make it into an easy package for the RISC stuff.  But now that the MIPS is coming back to life via Qemu, and NT 4.0 can be had for $5 a retail box on ebay… I figure it’s worth this much for those people who can find Visual C++ for MIPS/RISC.

SoftPC –AT Version 3

Ok, so I’ve been on this MIPS kick as of late.. Me & Antoni just split the cost of Visual C++ 4.0 for the MIPS…  All being well it’ll arrive on Wednesday and we can do some more stuff.  As I understand it, Visual C++ 4.0 was THE compiler for Windows 95 people at the time, and it will have all the controls & stuff that Visual C++ 2.0 simply does NOT have.

Anyways while I was playing with my virtual MIPS machine, I decided to try the MS-DOS emulation out..  I had heard that they had a pretty advanced emulator to run stuff.  So I downloaded a new version of MSD, and was really surprised at the CPU that it was emulating… a 486!  And this is on a MIPS machine, I had to wonder why they couldn’t have continued this for the x64 product…

486!
486!

Anyways ok so it’s a 486, but can it play DOOM?

doom under MIPS NT (1)

Much to my amazement, the answer is YES.  Ok the pallet is all screwed up, and yes it is SLOW.. It reminds me of a 386, but it’s actually running!

Now I was interested, I opened up the ntvdm.exe in notepad to reveal it’s origin:

SoftPC-AT Version 3

(C)Copyright Insignia Solutions Inc. 1987-1992

@(#)sun4_a3cpu.c    1.2 5/24/91 Copyright Insignia Solutions Ltd.

Now what is really interested is this bit.. It only appears in the MIPS binary:

This version is subject to confidentiality provisions and should not be distributed. %s %s%s Copyright %s, an unpublished work by Insignia Solutions Inc.%s %s %s Copyright %s by Insignia Solutions Inc. All rights reserved.

Otherwise there is a LOT of mentions of D:\nt\private\mvdm\softpc.new  I guess it’s about their build process since the DDK is nt\public.

Anyways I thought it was really interesting to see just how involved the NTVDM was on the RISC cpu’s.  I think there is no doubt that the Connectix product was faster, and of course on Ghz+ machines its usable.  Not to mention once Connectix made a native version of Virtual PC for Windows… It’s really not that surprising why Microsoft snatched the product up!

Somewhere around here I have SoftPC 3.0 for the Apple Macintosh… I wonder if it can load doom?

SimpleIRC & ROIDS for the MIPS!

 

Well I’ve been looking for an IRC client for the MIPS and I’ve come up with nothing… And looking for source to much of anything win32 is LONG past something that will compile with Visual C++ 2.0 …

However I did find this simple library built by Andrew Cater: http://www.rohitab.com/discuss/index.php?showtopic=33056

So with very little understanding of how IRC actually works I was able to build a SUPER simple client.  Please note that it’s so simple the / commands that you’ve come to love are not implemented…!  You get one shot for your name/nick/server & channel.. But hey the exe is like 70kb for the MIPS/x64 and 35 for the i386.

sirc and roids MIPS in action
sirc and roids MIPS in action

You can find it’s source & binaries right here.

Also Antoni Sawicki has given me a BUNCH of leads on old public source, and binaries, namely ROIDS the first real graphical game we seem to have now for the MIPS.  The source was a part of a PDTools thing that Dec had put together, however a lot of it will build for both i386 & MIPS. I’ve extracted the source for roids here.

I don’t want to over promise but I’ll see if I can get quake to build some time in the next week.. I don’t know if I can get any graphics out of it, but it’d be fun for a server at least…  Windows NT 4.0 sp1 should have DirectX 2.0 …  The pinball game is quite playable (although the colors are all screwed up, due to a pallet glitch in the emulator) so we shall see.

More fun with Nethack & MIPS NT!

Well a friend of mine pointed out some great archives of OLD Windows NT software..  Checking the list I noticed that there was a port of Nethack to Windows NT, namely Nethack 3.1.2  So using the nethack wiki I got the source code, and converted it to a zip file ( tar & gzip on SFU!)

The build was a little weird as it’s expecting the first compiler tools that shipped with the Win32 SDK “Final release” for Windows NT 3.1  While it may have been ‘easier’ to just install the old SDK, you can just copy cl.exe to mcl.exe & make a dummy ntdll.lib ….

Anyways with a little poking around I got it to build & run!  It’s cool!  Although to be honest I SUCK at nethack.

You can download it here.  It’s lovingly hard coded to use c:\games\nethack … I’m sorry about that, as I’ve given up on having C/D/E drives like a ‘secure’ MIPS machine, and just have a giant (haha!) 2GB system partition.

nethack MIPS
nethack MIPS

It’s also worth noting that it’s easier to try to build stuff on a ‘native’ machine running MSVC 2.0/2.1 then copy the stuff over the the MIPS simulator as it is SLOW.  But then that is to be expected.. It’s too bad the Qemu MIPS simulator cannot idle… as it runs one of my cores @ 100%.

MIPS blast from the past..

WindowsNT 4.0 MIPS
WindowsNT 4.0 MIPS

Personally I’ve never used any MIPS workstations with Windows NT, I’ve been lucky to have used the PowerPC build for IIS (it was cool in that intel hacks wouldn’t work.. It’s too bad it didn’t live long from Microsoft’s end) and of course SQL server on the Dec Alpha.  I also used a Dec Alpha as a workstation (the multia!) at the time I recall it was cool as it could decode MP3’s in realtime!  Sadly my multia died the day Microsoft killed the port.

Anyways while I was searching around hoping the qemu forum had come alive (it is!) I came across this post:

Hello,
I wanted to let you know that I succeeded to run MS Windows NT/MIPS in the Qemu emulator.
As far as I know, Qemu is the first emulator to be able to run Windows NT non i386/x64.
Some screenshots:
http://hpoussineau.free.fr/qemu/arc20081202-nt350-4.png
http://hpoussineau.free.fr/qemu/arc20090315_nt4.png
Code needs to be cleaned up and will be contributed upstream.
Hervé

What is this?  Well click the links!  It is what it sounds like, Hervé got Windows NT running on the MIPS emulation for Qemu!!

I’ve tested a 3.51 workstation CD to no avail… It hangs checking the hard disk.  I also have a 3.1 CD with the win32 sdk & it doesn’t work either.  However 4.0 works fine!  I should also add, this gave me a chance to install Microsoft Visual C++ 2.0 for the MIPS, and to try SQL 4.21 for the MIPS out.

One of the first thing you’ll find out, is that the Dec Alpha was popular non intel machine to run because of FX!32.  This program from Dec, allowed for dynamic translation of 32bit binaries on the Alpha.  So that you could run Office 97 for the i386 on the Alpha.  And on the 2nd run it was effectively a native copy as it had been translated at that point.  Nothing like this existed for the MIPS.  Thus native applications are RARE if any.  Another thing contributing to the lack of MIPS stuff, is that right after sp1 for Windows NT 4.0 came out, a week later all support for the MIPS ended.  Thus there is no internet explorer 3, and any of those resulting projects…  Which is really sad.  I *think* there may still be some copies floating out there for the PowerPC, but it was killed around the time of service pack 3.

Anyways if you want to run this, I did find thru a little digging around the win32 exe is available on Hervé’s site.

Download both of these files:

qemu-system-mips64el

setup.zip

And go ahead and unzip them.  In the setup.zip you will have found a file called NTPROM.RAW, rename it mipsel_bios.bin  .

Now we are ready to go!

Create a 2GB disk like this:

qemu-img create –f qcow2 nt4.disk 2G

Then run the emulator

qemu-system-mips64el.exe -hda nt4.disk  -M magnum -L .  -net nic -net user-cdrom winnt40wks_sp1_en.iso

Your system will initialize and just run thru the quick setup… Keep the display at 800×600 as the mouse will actually work at that resolution!  Also set the date to the correct date, and ensure the MAC address for your Ethernet is not all zeros.  You can make up any address you want.

Then to install NT you have to run 2 programs…

cd:\mips\arcinst

This will install a system partition, and setup the ARC bootloader.  A 5MB partition is all you need, it’ll format it, and just exit arcinst.

cd:\mips\setupldr

This will kick off the install.  It will look & act like every other copy of Windows NT 4.0 that you have installed.  Keep in mind that you will create a ‘d’ partition, and install in there.  I’d recommend you skip the exhaustive disk scan as that seems to always screw up for me.  The install is pretty straight forward, I’d recommend you select an easy password, and you will probably want to setup an automatic logon.

From there you are on your own.  I’ve seen Exchange 4.0 available for the MIPS, and some old versions of SQL Server, SNA Server out there.  I’ve never seen Microsoft Word for NT & Microsoft Excel for NT.  They were 32bit versions released prior to Office 95, and I *THINK* they had i386/mips/powerpc/alpha versions.. But I’m really not that sure.  I think internet explorer 2.0 is the ONLY web browser for the MIPS and no, Windows CE MIPS stuff will NOT run on the MIPS NT.  So don’t be all that disappointed as this isn’t too useful, but it may be interesting to see what all those MIPS directories were all about!

Internet Explorer 6 full download

*This post is now just historical the downloads in question are long gone.

Internet Explorer 6

Well I was going thru some boxes, and I pulled out this copy of Windows NT 4.0 workstation that I got in Japan…  I figured I’d install it to see if there was any cool themes/backgrounds unique to Japan..  There was some stuff for Windows 95 & 98 but not as much for NT.

Anyways Microsoft won’t let you download the full version of IE6.. Which is going to be an issue “one day” but for now you can trick the site to giving you everything…

First download ie6setup.exe:

Click here for the English download

Click here for the Japanese download.

Then you have to run it as:

“C:\Downloads\ie6setup.exe” /c:”ie6wzd.exe /d /s:””#E”

Then you can select your editions, and save it to a folder.. You should save this as it will disappear one day….

Also You will want the mp3 codec that were targeted for Windows 95, but will work on Windows NT 4.0

l3codecp.exe  The MP3 codec for Windows

Gunkies got a quick overhaul…

 

This is where I keep all my notes, and I’d encourage others to come on and fill in the MASSIVE blanks…

http://gunkies.org/wiki/Main_Page

I still think it’s got great potential but that my be just me..

Also The Unix Heritage Society has gone wiki as well…  I wish I were an authority on ancient Unix, but it does have potential it only needs people to start…..