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 recall that Neko even made it to OS/2 as it was more interesting than 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 can download the x64 binaries, and the source directory that I used here.

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 i386, MIPS, Dec Alpha and Itanium build… wink wink!

—edit

Neko98’s source code has been rescued, all saved here. and on github.

—years later

I just received this screen shot of Neko x64 rocking it on Windows 8 (Desktop mode)

Neko on Windows 8

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!!!!!

The Commodore Amiga

I was enjoying that great site, stumbleupon when I came across a commented listing of the Amiga 1.2 ROM. Then it hat hit me, I’ve never really written about some of the great emulators for the Commodore Amiga.

Back when I was in highschool I wanted a Commodore Amiga, as at the time I was stuck with a Commodore 64. However the world was starting to accept the IBM PC swing of things. Windows 3.0 was out, suddenly the protected mode of the 80286 could be exploited for only a few hundred dollars, vs the thousands for a UNIX port, or what OS/2 cost. And of course the big appeal at the time was that you could build your own PC in a kit fashion (well it still is!). So I was toying with the idea of buying this 286 8Mhz board for $30 CDN when I saw this program that a kid had brought in… It needed VGA, but it could apparently emulate a Commodore Amiga!

You can still download it here.

Running it just simply threw up a picture of the Amiga’s insert a workbench diskette, and clicked the drive madly.. Passing it through a hex editor showed a copy of an Amiga ROM tacked on the end, but it didn’t actually emulate anything.

But I didn’t realize it at the time, and it cemented my decision to buy the 286.

Years later and the topic of m68k emulation came up, as there were simple cross assemblers and simulators, and I can remember in college searching to see if anyone had started an Amiga emulator… And there was one project!

UAE

Originally it stood for “Unusable Amiga Emulator” and well it was unusable. But then with enough people starting to flock to the project it suddenly could boot AmigaDOS. I used to use this on MS-DOS back in the day for ‘maximum’ speed. I was able to find one ancient version of this 0.65 that still has an MS-DOS exe. And it runs great under DOSBOX. You can find it here.

And for the heck of it, here is a screen shot with a 1.3 ROM.

UAE 0.65 under DOSBOX

UAE 0.65 under DOSBOX

Naturally transferring disks was a major pain in the butt… I luckily had a friend with a working Amiga and cross dos for AmigaDOS all configured so I could transfer some terminal emulator to my poor Amiga 500 I had picked up at a used hardware store in college. Then I used what I could of ramdisks, compression programs and whatnot to upload via some 50 foot nullmodem cable I had to transfer ADF’s of my workbench disks and an old favorite game of mine, Captain Blood. Even back at the time, Commodore was bankrupt their future was bleak. Getting spare parts then was becoming hard for my Amiga 500. And my 486SX-20 could almost run at an acceptable speed in emulation..

But time marches on.

UAE was then ported to Linux & X11, and the SVGA lib. I had some old RS232 terminal so I could keep on using my machine to ‘work’ and still play console vga stuff like doom for SVGAlib and of course UAE. Now with CPUs in the GHz++ speed range, emulation of a 8Mhz machine with 3 custom chips is more in software then raw cpu speed. The UAE project kind of died off, there hasn’t been any big updates in years, but the CPU core work lives on in all kinds of m68k derived work.

There is no doubt that there is still a few closeted Amiga users out there, but I suspect that we don’t kick up UAE all that much these days.. But it’s still cool to watch it in action.

And of course the demos! One of my favorites was the fairlight 242 demo. Which UAE with a Kickstart 1.3 ROM will run. Even the MS-DOS version!

fairlight 242 UAE for DOS on DOSBOX

fairlight 242 UAE for DOS on DOSBOX

I should add you can find more demos here, and a Win32 version of UAE here.

Qemu 0.12.3 win32 build available

Hot off the compiler….

http://vpsland.superglobalmegacorp.com/install/qemu-0.12.3.zip

I even remembered to strip the exe’s so it’s WAY smaller then the other versions….

Also for those *ONLY* interested in x86 emulation (ie regular PC) I’ve created a far smaller archive here, that only contains the pc emulator.

I figure the amount of people that run the non x86 stuff is few & far between.

Qemu 12.3 is out!

didn’t the time fly by?

Anyways scanning through the list I see that the SDL full screen/windowing has been fixed!

I’ll have to crank out some binaries later, but I had to write something here, otherwise I’d forget it.

Also on the topic of Qemu, I see this site qemu-buch.de has me listed as the latest win32 build site for Qemu on Win32…

Cool!

The oldest CP/M ‘simulator’ out there.

I was surprised to come across this little simulator simply called ‘com‘ tonight. This program started out as a 8080 instruction simulator for a mc68000 machine running CP/M, back in 1984, and was written by one Jim Cathey.

‘Com’ was then later written up, and published in Dr. Dobb’s Journal.

From there it’s evolved it’s assembly core to some other 68000 cpu families and platforms, then the MIPS and PowerPC. Then in 2006 the CPU core was re-written in C.

For a while it’s primary platform was a 68000 based Unix, and it still has a lot of unix’isims buried in the source. I’m sure it’d build in MinGW though.

But in the meantime I figured it was yet another reason to fire up the old gcc 1.37.1 for Xenix to give this thing a go.

The biggest, and dumbest thing I fought was without realizing there was both a ‘Makefile’, and a ‘makefile’, and gmake kept running the lowercase one, while I was editing the Makefile in vain… But with that out of the way, and a few includes to fix, it was VERY straight forward to build. Not to mention running Xenix on Virtual PC 2007 on my new intel core i7 cpu, it compiles the C version just about as quickly as I can hit the enter key.

Because it’s on Virtual PC the last few lines of the console are garbled.. Oh well, at least the floppy controller works (as long as you hard code /dev/fd0 to 2,60).

So, here is a picture:

Xenix 2.3.4 with ccom zork1

Xenix 2.3.4 with ccom zork1

And a disk image. All I’ve really done is tweaked a few things, and built this with gcc so it includes a binary for Xenix systems. Also the ‘com.tar.gz’ package did include quite a few sample programs… mandog.com is fun, along with zork 1,2 &3!

On a final note, I thought the Xenix thing was a good road to head down because in the 1990’s there was this BIG push for ibcs2 compatibility across all these Unix platforms on the i386 cpu. Well it’s been largely abandoned work, and the best I got was OpenBSD complaining that its always out of memory, and NetBSD kernel panics!.. Open Solaris has *NO* ibcs2 compatibility even left.

I suspect it doesn’t matter, esp now that you can run some real ibcs2 OS’s in a VM, who needs 3rd party emulation?

I guess I’m just too late to the party.

Frotz on Xenix

Well after having some fun with gcc, I wanted to try something a little more… “fun”. I’ve had good luck in the past with ‘dumb frotz‘ on the old BSD stuff (4.2/4.3 etc) but surprisingly I had no luck at all with gcc & xenix.

Well that was rather odd.

So in some crazed attempt I tried the regular version of Unix Frotz 2.32. Xenix was lacking the memmove procedure, but thanks to an old post here, I was able to get it running under Xenix.

Ok, fair warning it is SLOW. It’ runs the cpu into 1.0 levels… I don’t know why. My attempts at building gdb and using it from that old Soviet site hasn’t met with much luck.

Oh, and it was easier to massage some make files with gnumake.

But it does run!

If anyone want’s to give it a whirl it’s available here.

gzip for Xenix

sorry I didn’t realize that IIS was blocking the gzip download because of it haveing no extension…

I really need to redo that whole install.

Meanwhile you can download it here:

gzip-i386-xenix

Also I found on some old “Soviet Union” website (no really it’s a .su!) a binary version of GCC for Xenix… I’ll post more later as I get a chance to go through the thing….

For the adventurous it’s here:

ftp://ftp.kiae.su/pub/unix/os/xenix/gnu/  (now offline)

It’s kind of interesting to find such a thing, and if you see the dates, it’s from January 28th 1991… In the last days of the Soviet Union… Well lucky for us, someone in Russia is a packrat! I guess they were starting to switch out from homemade PDP-11’s into 386’s and they didn’t bother porting their ‘pirated’ versions of Unix v6…

Sometimes less is more.

 

The more they overthink the plumbing, the easier it is to stop up the drain.

-Star Trek III

Well as of late we’ve been fighting this aging SQL server at work. It was originally a NT 4.0 server with SQL 6.5 upgraded to 7.0 then 2000 with Windows 2000. It also had to do some work with Oracle, and the dba’s were using MSDTC to make sure their transactions were getting committed into Oracle. Oh and to keep it ‘fresh’ the Oracle client was version 7 as it originally was talking to an Oracle 7 DB.

Well as the years go by, that Oracle 7 DB became Oracle 9i (already obsolete!), and we suddenly hit a transaction wall.

And along the way we virtualized the server to go into our VMWare ESX 2.x cluster, and it’s been since migrated to VMWare ESX 3.5

The server was dropping tens of thousands of these XA???????????????????.trc files, into the \winnt\system32 directory.

Well naturally you’ll eventually hit this wall of how many 8.3 translations you can do before the system CRAWLS. And boy oh boy did we hit that wall. So at first my idea was to delete all of these trc files, and let it live, but that’s not such a ‘great’ idea… As this reeks of a fundamental problem.

So the ‘first’ step in all of this madness was to up the OS to Windows 2003 enterprise (it was 2000 Advanced server before) And see how things were doing. The OS upgrade went smoothly I had slipstreamed sp2 into the update, so I only had some 90+ updates needing to be done once the OS had been upgraded. And for ‘good’ measure I thought I’d take the server from 768MB of ram up to 2GB, and set VMWare to allow 4 cpu’s for the database server. The node it was running on wasn’t doing terribly much so what the hell right?

Wrong…

The server was now performing markibly SLOWER… And yes, still dropping TRC files like there was no tomorrow.

After a bunch of digging around, I found out that in 2003 you have to click a box in the component manager to allow XA (cross architecture) transactions! Well now it wasn’t dropping as many XA trc files, but after watching it for a while, when two went to run at the same time, the SQL server would crash with a hex code saying it was out of memory.

Out of memory? I’d just given it more!?

So I did the ‘logical’ thing and gave the system 5 GB of ram, and enabled the /3GB flag in boot.ini

Same crashes.

I moved SQL server up to using 2GB of ram (out of 5, sure why not?). Same error.

Well this sucked, so we tried to update the Oracle client from 7 to 9i. In the process I found I couldn’t un-install the 7 client, nor could the 9i thing just ‘upgrade’ it, 9i kind of installed in parallel. Which led us to our next major fault, after swapping out the new client, removing the Oracle product key from the registry, and re-linking the Oracle servers using a new registration string, now ALL of our transactions against the oracle servers were failing.

Thank goodness for google, as we were able to deduce that the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsfot\MSDTC\MTxOCI was populated with all the old Oracle 7 values….

OracleOciLib -> oci.dll
OracleSqlLib -> orasql9.dll
OracleTraceFilePath -> c:\oratrace
OracleXaLib -> oraclient9.dll

So changing it to reflect Oracle 9i and suddenly our transactions were running! Even two at a time!!

But there was no doubt about it the transactions were slower then hell. We had gone from 1 minute to 11 minutes on one, and 5 minutes to just under an HOUR.

I added MORE memory to only find the SQL server couldn’t see the network card. So I added another one, and it got even SLOWER.

So in a minute of panic, I reduced the ram back to 768MB, took the VM from 4 cpu’s to 2 cpu’s and forced SQL server to use a single processor.

And our timings are now fantastic! That 1 minute process can complete now in 12 seconds!!! The other process finishes in about a minute give or take, but it’s tremendously faster.

From what I can gather, since SQL is so IO bound the more ‘top’ hardware you give it, the harder it pushes the IO stalling itself… Naturally it’s different on a physical machine, but sometimes it’s interesting to see what happens.

And may this be a lesson, just because it can emulate multiple CPU’s doesn’t mean it’ll run parallel things ‘better’…

Xenix, K&R and f2c…

Well a friend of mine let me have access to a Xenix 386 machine with a C compiler! Which was great, The first thing I built was gzip, as I couldn’t imagine a machine without it…

then I spent the better part of 3 hours ‘fixing’ f2c/libf2c for some Zork fun. Well let me say that while it was fun and all, the C environment from Xenix is…. old. No stdlib.h.. Among other things. Also gzip and f2c had issues where some programs would use ‘local’ copies of procedures… Naturally whatever compiler (MS?) my friend had wouldn’t have any of that!

Not to mention the other slight stumbling block, was that this was a K&R Compiler… Ouch.

However I was able to bash together a version of f2c that ran!

However it left me fixing the prototypes for the output… Because by default f2c outputs in ANSI.

It’s no biggie for ‘hello’ or even the textcnv program for Dungeon, but there was no way I was going to do this for the 100’s of procedures in Dungeon…

But the upshot is that the simple answer was a man page away…

Use the -K flag, instead of the -C flag, and all will be well.

I didn’t bother trying to clean up the gettim.C thing, maybe some other day, but I can’t promise much.

But in the meantime, here it is, for the 2 or 3 people with some kind of legacy Xenix thing out there..

 

Dungeon-2.5.6 for Xenix.

This is an 80386 exe, so you 80286 users would be out of luck… I don’t know if I even can make 80286 stuff.. I think the next thing I’ll have to see how hard it is to build is that ACK as it says it supports Xenix… And free compilers are always ‘good’ things.