Networking with Windows NT 3.1 under emulation

 

Windows NT 3.1 does NOT support the PCI bus, making most emulation difficult to impossible.

However some vendors wrote their own PCI routines allowing their PCI devices to work under Windows NT 3.1!

And as luck would have it, the two that I found should work for both VMWare & Virtual PC users!

First the Virtual PC users, you’ll want this file GF10011.EXE , and just extract it, and put it on a floppy.  x64 users will either need to do this under dosbox / MS-DOS in a VM… Also another note about Virtual PC & NT 3.1 is that it has massive pauses, to where it seems to be unusable.  I’ve found that altering the Virtual PC process, and binding it to only a single CPU, and boosting it’s priority helps a great deal, although it’s nothing compared to the speed of Qemu…

VMWare users can download an AMD Pcnet driver here that will happily bind on PCI.  Once you install the driver, you can have it scan the appropriate busses and it should pull up and work.

Another fun thing I found for Virtual PC users, is that the HP Pavilion 5000 desktop shipped ready for Windows NT 3.1, and it was equiped with a S3 video card! And it’s video driver will work with Virtual PC! You can download it from HP’s site here.

This brings Windows NT 3.1 into a far more usable state. Another fun thing I found is that Netscape 2 & 3 for Windows 3.1 WILL RUN! One of these days I’ll have to sort out the exchange client situation…

And if anyone wants to see it in action, be sure to check out Apache running on Windows NT 3.1!

Or you can hit it directly:

http://winnt31.superglobalmegacorp.com/

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?

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 real-time!  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.
Herve

What is this?  Well click the links!  It is what it sounds like, Herve 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.  Shockingly, there is a bare port of Internet explorer 3, but nothing else from 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 the service pack 3 release.

Anyways if you want to run this, I did find thru a little digging around the win32 exe is available on Herve’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 2nd 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!

Running Windows 2003 r2 x64 on Qemu 0.9.0

This took me a LOT longer then it should have to figure out. So for anyone else wanting to run the 64bit versions of Windows on Qemu (I havent tested Vista/2008/7 yet) Only version 0.9.0 will work.

Because sourceforge is still giving me errors I’ll provide direct links…

Anyways to buidl Qemu you’ll need a MinGW/MSYS enviroment. The new stuff works on Vista x64 so that’s good to me, as it’ll run natively.

You’ll need the following files:

MinGW-5.1.4.exe
MSYS-1.0.11-rc-1.exe
msysDTK-1.0.1.exe
w32api-3.13-mingw32-dev.tar.gz
mingwrt-3.15.2-mingw32-dev.tar.gz

First, install MinGW by choosing the ‘current’ version, then check the following options:

*MinGW Base tools
*G++ compiler
*MinGW make

Allow it to instal into c:\MinGW

Next install MSYS with the default options. Then it’ll ask you the following, respond as I have:

Do you wish to continue with the post install? [yn ] y

Do you have MinGW installed? [yn ] y

Please answer the following in the form of c:/foo/bar.
Where is your MinGW installation? c:/mingw

Install msysDTK with the default options.

Now you should be able to run the msys CLI
Start -> run -> mingw -> msys -> msys

Let’s expand out the win32api & mingw32 dev updates:

cd /mingw
tar -zxvf /c/install/qemu-build/w32api-3.13-mingw32-dev.tar.gz
tar -zxvf /c/install/qemu-build/mingwrt-3.15.2-mingw32-dev.tar.gz

Now your ‘gcc -v’ should return something like this:

Reading specs from c:/mingw/bin/../lib/gcc/mingw32/3.4.5/specs
Configured with: ../gcc-3.4.5-20060117-3/configure –with-gcc –with-gnu-ld –wi
th-gnu-as –host=mingw32 –target=mingw32 –prefix=/mingw –enable-threads –dis
able-nls –enable-languages=c,c++,f77,ada,objc,java –disable-win32-registry –d
isable-shared –enable-sjlj-exceptions –enable-libgcj –disable-java-awt –with
out-x –enable-java-gc=boehm –disable-libgcj-debug –enable-interpreter –enabl
e-hash-synchronization –enable-libstdcxx-debug
Thread model: win32
gcc version 3.4.5 (mingw-vista special r3)

Ok, now let’s build the prerequisits, zlib & SDL.

zlib-1.2.3.tar.gz

cd /
mkdir -p /usr/src
cd /usr/src
tar -zxvf /c/install/qemu-build/zlib-1.2.3.tar.gz
./configure
make
make install

Now SDL.

SDL-1.2.13.tar.gz

tar -zxvf /c/install/qemu-build/SDL-1.2.13.tar.gz
cd SDL-1.2.13
./configure
make
make install

Now we need to tweak some things that MinGW seems to have issues finding in the /usr/local path.. I’m sure there is a better ‘fix’ but hell, this is quick & cheap!

cd /mingw/include
ln -s /usr/local/include/zconf.h .
ln -s /usr/local/include/zlib.h .
ln -s /usr/local/include/SDL .
cd /mingw/lib
ln -s /usr/local/lib/libSDL.a .
ln -s /usr/local/lib/libz.a .
cd /bin
ln -s true.exe texi2html.exe
ln -s true.exe pod2man.exe

Ok, now we just need the source to Qemu 0.9.0…. It’s becoming something RARE which is weird considering just how compatable this version is… So I’d recommend keeping a copy in email or something.

qemu-0.9.0.tar.gz

cd /usr/src
tar -zxvf /c/install/qemu-build/qemu-0.9.0.tar.gz
cd qemu-0.9.0
./configure –target-list=x86_64-softmmu
make

Now instead of the usual Qemu 32bit x86 emulator, you’ll get qemu-system-x86_64.exe in the x86_64-softmmu directory. Running it is just like the regular Qemu. So first I’m going to create a 16GB disk to boot from like this:

qemu-img create -f qcow win64.disk 16G

*NOTE if you have any issues where it just doesn’t work, use the qemu-img from here. I’ve had issues with the one that I’ve built, but the emulator works…. go figure.

Now let’s boot from the disc:

$ x86_64-softmmu/qemu-system-x86_64.exe -m 1024 -L pc-bios/ -hda win64.disk -cdrom en_win_srv_2003_r2_enterprise_x64_cd1.iso -net nic,model=rtl8139 -net user -boot d

Now if you don’t have the ISO files, and have physical discs don’t fret! It’s easy to have Qemu point to them… Let’s say your CD-ROM (DVD/BR disk) is D: then it’s just a matter of running:

$ x86_64-softmmu/qemu-system-x86_64.exe -m 1024 -L pc-bios/ -hda win64.disk -cdrom \\.\d: -net nic,model=rtl8139 -net user -boot d

Easy, right? Remember the -m flag for memory, otherwise your VM will run in a TINY 128mb of ram.. And it’ll be insanely SLOW.

And then you’ll get this!

The first screen.. It doesn’t sound all that 64 bit does it?


Now we are talking! It certainly is the 64 bit version… It reminds me of the PowerPC/MIPS/Alpha builds where once the Kernel has loaded, it’s all Windows NT..


Select your partition, and let’s format away!


Time for the file copy… This will take a while.


Finally!

Then it’ll reboot, and you’ll get the happy bootloader!


Bootloader in action..


I haven’t timed it, but I suspect it’ll be longer then 39 minutes.

As you can see with the right version of Qemu it’s trivial to get Windows 2003 r2 x64 running… It’s good for doing some .net 32/64 bit testing… Which reminds me of another tidbit..

Some things in .net land will NOT work on IIS running in 64 bit mode. You’ll have to throw the switch to get a 32bit .net on IIS. The good news though is that this can take advantage of 2GB for a normal exe, and if you tag it, 3GB to under 4GB of ram.. So the 64bit version is not without waste.

%SystemRoot%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis -i -enable
iisreset
CScript “%SystemDrive%\InetPub\AdminScripts\adsutil.vbs” set w3svc/AppPools/Enable32bitAppOnWin64 1
iisreset

I did verify that this would get sharepoint to run on 2003 x64.. As I always feel better trashing a VM then real iron…

And don’t forget the flexibility of the -redir command on Qemu to allow you to redirect ports into the VM…

Say you want to use terminal server into your VM, you can redirect say port 1000 into the vm by adding:

-redir tcp:10000:10.0.2.15:3389

Then it’s a simple matter of using a terminal server client to localhost:10000

I hope this clears up how easy it is to build your own Qemu, and of course how to run something other then the ‘normal’ 32bit version of Qemu.

Windows 95 (Japanese) on Qemu

Well I ordered the Asian version of Windows 95 from retrosoftware.com . And the best part was the cover for the Internet Explorer 3.0 update:

 

Say what you will, but there is no doubt the Japanese always get more… interesting looking versions of our software…

Check out the additional pictures from the manual:

Don’t you feel bad for dear old dad?

Hmm what do I do with this RJ11??

Now we’re cruising on the internet!

Well, at least it’s not Peado bear..

Other then that, the box looks somewhat boring…

All the way from Japan!

 

Anyways I thought it would a good time to see if Qemu 0.10.5 can install Windows 95. So I started with a simple MS-DOS / Windows 3.1 install on a 1GB disk. Then I just mounted the CD-ROM (remember on a Win32/Win64 host to access your ‘D:’ drive you use the -cdrom \\.\d: to get access…)

Now the setup was SLOW, it reminded me of an old Pentium while it grinded away.. But the plus is that it actually WORKS… Unlike some other emulators with FAST machines.. I know it’s a trade off between slow emulation, or just not working at all. But Windows 95 will NOT run on physical machines with a faster then 1.5Ghz clock. (or so I remember).

Anyways with a little work you can come up with this:

Ok the good news is that it works, the ‘bad’ news is that the video & networking require drivers to run properly. Thankfully Natalia Portillo has provided all of this stuff on ONE EASY TO FIND SITE!!! I’d highly advise downloading a copy of what you need, using bzip2 to re-compress the files, and emailing them to yourself… That way you won’t lose them time & time over again!… As I just have.

Although to be honest it works better in ISA mode.. Remember the ne2000 is set for 0x300 IRQ 9 in the ISA mode.

If you want to try the PCI route, you’ll need an updated PCI driver which you can find on intel’s site here.

And one last thing I’d like to leave you Ted Stevens fans with. According to Microsoft Japan, the internet is NOT a series of tubes, but actually a bunch of trucks…. All labeled TCP/IP.

Was Ted Stevens right?

Sourceforge issues

 

Well they are changing the UI to something not quite as krusty, but in the meantime expect a WHOLE LOT OF 500 errors.

I’m trying to download a MinGW enviroment to test up some Qemu builds but that seems to be going nowhere quick…

Anyways for anyone who stumbles on this looking for my ancient BSD stuff, here is a link to my server with a newer build… I’d love to crank out all that stuff as well, but I’ve had MAJOR stability issues with SIMH 3.8-1 & Visual C++ 2008.. I’m in the middle of getting a copy from work of the ‘standard’ version which should be here soon enough… Maybe it’s just the express tools freaking out on me.

Oh well not to throw sourceforge under the bus, they have saved me a fortune in bandwidth bills in getting my stuff out to other people, and in all fairness a ‘holiday’ is a great time to do an upgrade… Well usually if you are a bank, but I think for geeks today is the day to hack.

Qemu 0.10.5 for windows

Well I screwed up the Proxmox VE thing and I needed to test some x64 stuff… Sadly the VM I used to build the x64 stuff was the proxmox… And I need it now!

So I found this site, which has the new qemu stuff built!

Just unzip it with 7zip.

And you should be good to go..

However for Windows 2003 x64 R2 it seems that those binaries crash on ‘starting windows’, apparently they were compiled with GCC 4 while the ancient qemu 0.90 built with GCC 3 works…

I’ve also found a source ‘fix’ for why 0.91 crashes on vista…:

patch hw/ide.c:

just replace all ‘free(buf)’ in guess_disk_lchs function to ‘qemu_free(buf)’.

Sounds easy enough. I’ll have to get a working toolchian.

I’ve been slacking

Ok, I’m still unpacking stuff in the new apt, so I don’t have anything that exciting.

I’m hoping that this blog will become more interesting as the guy fills out content… Ah yeah, remember the ‘good’ old days of 16 bit development? Ok they weren’t *THAT* good, but we all know the pain of legacy code.

I don’t know if it’s worth mentioning, but yet another version of Qemu has been released, 0.15..

And it would appear that proxmox has been updated to 1.3… I’m going to have to upgrade and give it a whirl… I just hope it doesn’t trash my raid.

And finally you can view Warren Toomey’s presentation about recovering an ancient version of UNIX…

Video of the presentation is here:
http://minnie.tuhs.org/Z/toomey.mov

Paper: http://www.usenix.org/events/usenix09/tech/full_papers/toomey/toomey.pdf
Slides: http://www.usenix.org/events/usenix09/tech/slides/toomey.pdf

Have a fun weekend!

TROPIX

 

Tropix booted to the login prompt

So I was browsing some stuff, and playing with a few other emulators getting something together when I found an article briefly mentioning TROPIX.

Now TROPIX is interesting as some people from Brazil tried to get a UNIX license in the 1970’s but they were denied. Not to take that as a loss, they bought ‘a’ UNIX system (some kind of v7 box) and built their own OS around the v7 ‘feel’. The result is a multiprocessor, real time UNIX clone written in Portuguese!

Now what is interesting is during the time of TROPIX (the mid 80’s) Brazil was still a dictatorship, and they would refuse to import western things, if there was a local equivalent.. So UNIX vendors never could get a foothold in Brazil because of TROPIX, well back then it was called Plurix. Conversely TROPIX/Plurix never got out because it’s all localalized in Portuguese. Which is too bad, as if it had the ability to spread on the internet I’m pretty sure it would have been popular..

More information can be found here:

However it’s all in Portuguese, so you’ll probably want to use a translator. http://www.google.com/translate is what I’m using.

The latest release was in December of 2008, and added support for USB 2.0 & SATA. So while it may feel dated, it’s being updated to support modern hardware. They even dedicate it to Newton Faller who’s a big name IT wise in Brazil, they even give out awards similar to the Turing award in his honor.

Now onwards to the install!

I am using Qemu as it can emulate the required hardware. Virtual PC will work, but the networking will NOT.

First download the ISO image from here . You’ll need a copy of gzip & tar for whatever your platform is to extract the ISO image. The install is actually somewhat straight forward once I translated the install document, which can be found here.

Basically the following input got me to a working system…

TROPIX CD boot

>

enter

boot>

-f

n

r

s

s

s

s

fdisk>

w

s

q

boot>

-i

login root
password tropix

mkfs /dev/rhda1
mount /dev/hda1 /aroot
cd /usr/etc/install
install

s
hda1
s
n (it’ll copy files)
s

reboot

I’m still trying to figure out the DHCP or the default gateway as neither appear to be working at the moment… Take note that the TCP/IP in TROPIX was written by them, it is *NOT* a 4.3 BSD derived thing. So there is no ifconfig / route / arp commands. Not to be disapointing but it also needs it’s first partition somewhere in the first 512mb as it seems to have some old BIOS booting issues.. Now it could be Qemu, but I’m not sure, a 10gig disk didn’t boot from the HD, although the CD could be make to use the HD for a root…

Right now the only ‘fun’ program to run is coremap & fortune.

But it’s very interesting to see a UNIX developed from another part of the world, and just how similar and different it is… Oh and it’s Si/Non, not YES/NO.