Failed Quakeworld port to OS/2 2.0

Yeah, I guess I just couldn’t salvage this thing… Sometimes when you stand on the shoulders of giants you fall off.

So what had started as a seemingly simple thing turned into a nightmare.. I took the source to my MS-DOS port of Quakeworld, and decided to build it under OS/2. And to be crazy about it, I thought it’d be awesome to get it to work under OS/2 2.0 .

Which means no sound, locked to 320×200 256 colours, full screen only, since the VGA driver won’t do anything but. Years ago on ebay I managed to score IBM TCP/IP for OS/2 2.0 & 2.1, with the LAN support!

IBM OS2 2.0 syslevel 1

IBM OS2 2.0 XR02000 (no fixpacks)

 

 

ibm os2 2.0 syslevel2

IBM TCP/IP for OS/2 with no fixpack

So as you can see from my syslevel’s I’m running a pretty bare machine, even the graphics subsystem is still 16bit!

Well the good news, is that with EMX and a HPFS disk, I was able to quickly get the null version running. With a minor amount of work, I had TCP/IP connectivity and things were going well. I had ripped apart a video demo, and got the display up, although it was ungodly slow.. Until I found out that when you are full screen you can request access to the physical video memory, under OS/2 so that sped things up a great deal!

Then all that really needed to be done was get the keyboard working.

And here is where I slipped up.

OS/2 is weird for interactive programs that want to know key states. It seems the best and most common way to do this was to setup a ‘monitor’ for the keyboard device, and try to read the stream as keys are pressed. Sadly idiots that slamm the keyboard, or gamers that hold down an arrow key for a minute lock the thing, and the key then is ‘jammed’ down until you hit it again for the release.

I’m pretty sure that I did it wrong, so I borrowed code from a more ‘advanced’ OS/2 port and it did the same thing. Maybe it’s OS/2 2.0? I don’t know, I did service pack it and update and still the same result.

I really didn’t want to spend that much time on it…..

QuakeWorld for OS/2

QuakeWorld for OS/2

I feel hesitant to release a binary as you will get killed, and I haven’t even tried the mouse yet, but I suspect it’ll still suck.

So for anyone that cares, here is the source… misspellings and all.

UDP Nat weirdness in Virtual PC 2007

Well just as soon as I posted about needing Qemu to run QuakeWorld for MS-DOS, my new machine alerts me to some new updates, among them is Virtual PC 2007’s sp1.

The cool thing is that with this update, UDP through NAT is working correctly!

QuakeWorld-2.40-MSDOS-VirtualPC-2007-sp1

QuakeWorld-2.40-MSDOS-VirtualPC-2007-sp1

 

So maybe it’ll help someone else down the road with any other UDP based applications. I was going crazy, as the TCP stuff was working just fine.

QuakeWorld client for MS-DOS

So as leileilol pointed on on VOGONS, QuakeWorld’s networking was a rapid departure from Quake 1, and formed the basis of a lot of modern multiplayer games… Like teamfortress and half-life.

So with a little bit of work, I was able to compile a QuakeWorld client for MS-DOS. Or here for the standalone exe, and don’t forget CWSDPMI. Oh and be sure to get a packet driver, for your NIC. Many vendors have these on their site for newer stuff.

Now I managed to get a new computer between posts, and it’s not working on virtual pc… I may be 500 updates behind though so maybe it’s something else. So in the meantime I’m testing with Qemu.

The other oddity is that compiling QuakeWorld with GCC 2.95.3 with either -O1 or -O2 builds a client that will time out after 2 minutes… -O0 ran for over an hour with me playing and dying a lot on quake.xs4all.nl:27500 …

Oh and what good would this be without pictures?

Yes, I’m really that bad.

You can find quakeworld servers on the site quakeservers.net. And I can verify that you can indeed download levels!

Enjoy!

Quake1 with WATTCP built with DJGPP on DOSBox

Phew.

As far as I know this was never done, as the world at large moved away from MS-DOS, and of course when Quake 1 on MS-DOS was popular they weren’t exactly giving out the source… Such a shame the DLM thing was lost in the shuffle as DLL’s on DJGPP/MS-DOS could have made quake more modular..

So what I’ve done, is I’ve used an ancient version of cygwin that I was playing around with line, and built a cross compiler for DJGPP. Then using that I’ve built the latest version of Watt-32 tcp/ip with it, then I took my build of Quake 1 on DJGPP, and built quake to use the net_bsd, net_udp, net_dgrm services, and added in the needed hooks for Watt-32 TCP/IP. And to their credit, I just added a single function call to both protocols init functions, and a single function to the general network poll function. All and all I think it’s 3 lines I changed.

Then to test, I used an older copy of DOSBox that included a virtual NE2000 that binds onto a physical interface via libpcap, loaded up the packet ne2000 driver, and ran the client!

For a server, I used the much older, quake dedicated server I had built to run on Windows NT 3.1. Although I never did automatically turn on the ‘-dedicated’ flag for some reason…

On the Windows XP virtual machine, I installed a loopback adapter, then set it up with internet connection sharing so that XP would act as a DHCP server to the Watt-32 TCP/IP stack.

Anyways, as you can see in the picture I connected a simple sniffer, WinDump to watch the packets, and it worked.

I’m still blown away that it worked on the first shot.

It’s really a testament to all the people that make all the moving parts here, when I can just string stuff along and get it to work.

For anyone daring enough, this zip contains all the source, and binaries of all the parts, except for the cygwin install. (I did have to poach a ‘modern’ cygwin1.dll from a modern install).

Enjoy!

WATTCP & DJGPP

So years ago there was this great free TCP/IP package out of the University of Waterloo (CANADA!) called WATTCP. And then later it was ported to DJGPP and named Watt-32 TCP/IP.

The sad thing is that as the years have gone by, this kind of stuff has slipped away, and is nearly all lost.

But thanks to the internet archive yet again, I’ve been able to pull out some key stuff, and google a bunch more of it out…

*watt32d-2.1-dev.1.zip
*watt32s-2.2-dev.10.zip
*watt32s-2.2-dev.10.zip

And of course the older wattcp:
*tcplib.zip

So thats one of the manual sets, a binary set, and a source set. I guess the thing that really matters is that the source set seems to be the last version..

Wattcp relied on a packet driver, in which to communicate with the outside world. I know there is SLIP/PPP and all kinds if NIC drivers out there..

So I went ahead and snagged the driver for Virtual PC’s NIC, then running the DOS-Telnet client, I went ahead and connected to a SIMH Vax running BSD…

And it works pretty well.

I’ll have to walk through some of the code and produce something more… interesting.

At any rate, I hope this will help anyone trying to do some embedded work around MS-DOS & DJGPP.

— edit
While browsing the list at www.bttr-software.de I found the new Watt-32 home page…. So it’s good news, but strange that google seems to have not picked up on it, or other people…

Fun with SLIP

Back before the advent of PPP there was SLIP. And the main difference between the two is that SLIP was configured statically. For people with static devices (routers) etc this worked fine. After all SLIP was point to point by nature. And of course it sat behind leased lines, and dialups that were maintained in a 1:1 fashion so you knew you were dialing, and where they were….

Then the internet went all consumer based, and that was out.. the world needed a ‘dynamic’ protocol, and they took SLIP and taught it to auto configure… the results were PPP.

Anyways if you ever find yourself with some kind of legacy device…. SLIP is as good as it gets.

And that is where the fun begins…..

A friend of mine scored the tcp/ip kit for a certain venerable UNIX, and of course it being from the late 1980’s it only supports SLIP. Well thankfully it runs in Virtual PC 2007. So we can have some fun with it.

Windows 7, Vista, 2003 and XP have *NO* SLIP support… That means you’ll need a Windows NT 4.0 machine to make the magic work…

So first up install a copy of NT 4.0 . It wont matter if it’s workstation,server,enterprise or terminal server. While you are installing it, setup a single NIC, and then setup RAS on COM2 with any bogus modem you want… The next thing to do is make sure you have service pack 6… You may as well update it.

Once that is done, you’ll need to make a few registry changes. The first will enable unimodem support..

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\RAS\PROTOCOLS]
Make a DWORD key named “EnableUnimodem”, and set it to 1.

The next key to modify is
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\RasArp\Parameters]
Make a DWORD key named “DisableOtherSrcPackets” and set it to 0.

Now with all that in place, reboot the NT 4.0 VM.

Next you’ll need the ‘new’ and improved driver for a nullmodem available here. thanks to Kevin Wells.

Now you can add the “RAS Serial Cable between 2PCs” on COM1, and set it up for dial out operations. While you are configuring it, be sure to uncheck all the flow control options, and all the header compression… Odds are your SLIP machine will be too old to support such stuff. While you are going thru your options, be sure to pick an ip address for your target & the NT machine…

Ok now with all that out of the way, then configure Virtual PC (or server) to use COM1 for some named pipes… \\.\pipe\slip1 works great.

Now what I do is I launch hyper terminal on the NT side, have it on COM1 running at 9600 baud (most old OS’s cannot safely do more then that because of issues with the originally 16550 UARTS). Then from the UNIX side, configure it’s COM1 on the same pipe, then try this from the UNIX side:

echo ‘a’ > /dev/tty1a

If you are lucky you’ll see an ‘a’ pop up on the serial program. If so GREAT!.. If not.. try turning off all the VM’s, and try it again…. Sometimes the pipe code for VPC/Vserver gets out of sync.

Assuming it worked, you can then initiate the ‘dialing’ part from the NT side, give it a phone number of 1 to satisfy the script and it’ll sit there waiting for *ANYTHING* on the serial port…

On the UNIX side I run this in a script…

echo ‘a’ > /dev/tty1a
slattach /dev/tty1A 10.0.1.1 10.0.1.2 255.255.255.0 9600
route add default 10.0.1.2 1

Then run the script, and NT 4.0 should beep and you should be in business!

Go ahead and ping and whatnot…

If that is working, then you can take the next step on your LAN and add some routing statements pointing the 10.0.1.1 towards the LAN ip of your NT machine, and it should route!

I’ve managed to get the box on the internet so it does work!!!!!

MS-DOS lan client for Virtual PC 2007

So while I was going through the motion of making my tradewars more… multi user friendly, I needed to test between all kinds of clients and a server…

Since I’m using MS-DOS, Windows 3.0 as my test bed (if it’ll run there, it’ll run anywhere!) I had MAJOR issues with the 3.0 lan client… But digging around on the NT 4.0 Server CD I tried the lanman.dos client.

Using the lan drivers from here: http://wiki.oldos.org/Downloads/DriversAndBootdisks

It was a snap!

I’ve built an NT 4.0 domain controller with both NetBIOS & TCPIP protocols that way all my machines can map into it…

I wonder if there ever was a ms net requester for MacOS..?

HECnet client for SIMH

Ok the good news is that my PS3 running SIMH/VAX/Quasijarus is pinging away on my OpenBSD machine running the HECnet bridge program…

The ‘bad’ news for now is that it’s all *nix based… so no joy for the windows crowd. I’ll fix this soon enough, and release some binaries…

For now you can read about it here:

http://mailman.trailing-edge.com/pipermail/simh/2009-February/002205.html

Anonet revisited..

Well anonet moved client ports, and I was getting some questions about the whole thing. The client port has finally been well… finalized as far as I can tell. I don’t use it all that much but I figured that the ‘bar’ needed lowering for people curious about this anonet thing.

So what I’ve done for windows people is to setup an installable version of DSL linux that is just click and run that is configured for anonet. It’s got the DNS information all ready to go so you can run nirc and join the main irc server (don’t forget to edit the .nirc file if you so wish) and the dillo & firefox web browsers are also setup & working. However firefox is SLOW… But I figure this will allow people to easily see what’s what without installing any device drivers… And it’s more fun in a VM.

Currently I’m just sharing this in a torrent which you can download here:

Naturally you can use things like utorrent (http://utorrent.com/) to download it.

It’s all setup in a nsis script that I’ve been evolving from the BSD4.2 on windows thing.. so it’ll be straightforward to install & uninstall. Vista & Windows 7 users need to remember that the disk image will re-appear in their:

%userprofile%\AppData\Local\VirtualStore\Program Files\anonet-client\

or

%userprofile%\AppData\Local\VirtualStore\Program Files (x86)\anonet-client\

Directories… so remember to remove it.. I don’t know how to do that nicely offhand just yet.

Oh well you can leave me feedback public/private anonymously or whatever.

Anonet

Ok, this isn’t emulation, exactly but it does involve virtual networking…

I’m talking about Anonet! it’s an internet style network that is encapsulated over OpenVPN.

From the site:

In early 2005, a few people fed up with the way the Internet was heading, began in earnest to create a large wide area network that was secure and lived in its own space. On this new network anyone would be free to do as they saw fit – roam about, host services, or just be social without fear of being monitored or even worse censored. The first step to bring this network to fruition was to encrypt the information that normally travels across the Internet. What they ended up with is known as anoNet.This network was inspired by MetaNet, another “dark” network on the Internet, that used similar techniques to reach their goals. A few “core” members of anoNet were once a part of MetaNet but due to their strict nature, peering with MetaNet was lost and they became an “island”. anoNet has already surpassed what MetaNet had in membership, and is on its way to being a viable alternative to the “Internet” you currently know, whether you love it or hate it. If you are feeling adventurous check it out. If you are feeling really adventurous you can help; there is still lots to be done.

http://anonet.org/

So how does it work? Basically each ‘node’ runs OpenVPN connections to other peers, and they redistribute all networks over BGP. It’s very much in the same style as the real internet. I’d recommend checking it out. As for getting on the Anonet, it’s pretty simple. Just follow the instructions here:

http://anonet.org/quickstart/index.html

It will run on any platform that runs OpenVPN. I’m using Windows 2000 Pro in a VirtualPC VM. I hang out on the anonet IRC server from time to time ( 1.0.9.1 #anonet) if you are feeling brave, load up openvpn, retreive the client configuration and drop by!

If you are feeling real brave, try to become a peer onto the network!