Line is not an emulator

I don’t know how I didn’t find this earlier, and how it’s been overlooked for so long….

But this incredible program, LINE, will run statically linked Linux ELF binaries on Windows.

Yes, you read that right, this user mode program will load an ELF exe, and run it under a software debugger with no need for device drivers, and intercept all the sycalls (ie int 0x80’s) through the cygwin1.dll, giving you a POSX/Command line linux experience.

It does come bundled with various hello programs, and a few things on testing forks… But the real magic for me was being able to grab a static version of dungeon, and running it on both Windows 7 x64, and emulated NT 4.0.

And it works!

Line running Dungeon

I’ve put my copy of dungeon, along with a copy of cygwin1.dll that works with the LINE package here for anyone interested.

I’m just amazed at the size, and simplicity of the whole thing…..

In the documentation there is even mentions of NSO (Native shared objects?), and dynamic linking…

Clearly this project should have had more of a future to it!

NetBSD 0.9

Well by some strange google search I actually found a site in Russia that had NetBSD 0.9 for the i386! Wasting no time, I mirrored the site on my VPS, then spent some time late last night trying to figure out how to boot this thing, but to no avail. Qemu, Virtual BOX and Virtual PC, could not boot the disk images correctly, while BOCHS was running into all kinds of errors related to the 0.9 kernel’s floppy, and hard disk errors with 1.0’s handling of the hard disk.

So for the heck of it, I tried it on VMWare Fusion for OS X, and lo, it booted the NetBSD 0.9 kernel floppy! So I went ahead, and made all the diskettes for the release, and went ahead and installed it on VMWare. Now while VMWare may be able to install NetBSD, it doesn’t emulate peripherals like NE2000’s so networking would involve PPP or SLIP over the COM port, which sounds like a lot of work, looking back to my adventure with SLIP a while back, that I’m not looking to redo anytime soon.

So with my installed VMDK (the disk file VMWare uses), I used the qemu utility qemu-img to convert it to a compressed qcow2 image, then booted up Qemu with the image.

And it worked!

So with that in hand, I rebuilt Qemu to remove the NE2000 on 0x300/IRQ 9, and then rebuilt the NetBSD kernel to remove all the devices I don’t need/care about (SCSI,NFS,MATH EMULATION,etc..) and reconfigured the NE2000 to be on 0x320 IRQ 10, to match Qemu, and then ran the whole thing together, configured the network, and it seemed to be working fine.

From there it was a matter of transferring the disk image back to VMWare, I copied in the source code for lynx and ircII-4.4 then transfered it back to Qemu. And yes they worked as expected!

The only thing remaining in my flight of adventure was to build f2c, and see if it’d run Dungeon.

xx

Yes it runs Dungeon!

So with all of that out of the way, for anyone that wants to run it, I’ve uploaded my work on my sourceforge project page.

Now I just need to find myself a copy of NetBSD 0.8, and spend some more time with 386 BSD 0.0 & the hard disk parameters to see if I can get that to cleanly install.

In the meantime, feel free to load up NetBSD 0.9, fire up irc and say hi.

NetBSD 1.2 & the MicroVAX II

So I’ve been working on some instructions to install the first NetBSD I could find that would run on SIMH’s MicroVAX II… Think of it as a lineage continuation from the 4.3 BSD to the Net/2. Anyways the 1.2 install proved to be.. .difficult to say the least, however once it’s installed I found a weird snag, that NetBSD 1.2 doesn’t seem to have curses…. And I though curses was one of those things that made any BSD a BSD.

I haven’t put together an install just yet, I figure I’ll have to download ncurses over, and build with that but I just don’t have the time today, so I’m leaving things where they are for now. Although I did manage to get a bunch more other stuff built, which I’ve posted package tapes on my sourceforge page here. And if anyone is that motivated they can always follow the above instructions, and install their own NetBSD 1.2 VAX, although I’m not holding my breath.. lol

Also I noticed that NetBSD 1.2 doesn’t have any fortran, so I built f2c, and managed to get dungeon running. woo!

Yep, it runs Dungeon!

Oh well it’s all good fun from 1996.

Smith Corona teletype conversion

While converting your typewriter into a teletype may not be all the rage, nor may it be all that … ‘new’ of a project, this one was sent in to me by Stefan (thanks!).

http://upnotnorth.net/2010/10/29/a-new-way-to-interact-with-fiction/

Not only is it in Toronto ( Site 3 coLaboratory ), but yes……

It runs ZORK!

I suppose at some point, somone will have to find the smallest machine with an ethernet & USB port, some rs232/usb cables and a few real terminals for a real ‘micro’ vax…. Or at least, that’s what I envision… 🙂

CP/M & Zork in Java Script!!!

Yes, it’s finally happened!!!!

This morning, I got an email from Stefan Tramm, informing me of his work.. Basically he’s combined ShellInABox’s vt100 commands, js8080’s Intel 8080 emulator, along with z80pack’s disk format, and CP/M port to provide a CP/M emulator that works in Java Script!!!

YES.

It is that cool.

Now the emulator is one of these new fancy HTML5 applications, which means you’ll need either Google Chrome 5, or Safari 5.. I would imagine Internet Explorer 9 and a later Firefox ought to work….

One thing that you’ll want to do is configure your popup blocker to allow the domain tramm.li to open up popup windows, as that is how you mount disk images into the VM..

To get going though it’s real simple. Just click http://www.tramm.li/i8080/ and hit the “Start Emu8080” link, and you’ll get to the console.

Next you’ll have to download a copy of CP/M 2.2 from the server into your local browser datastore by type in:

 

CPM-1

r 0 cpma

Then load in the bootsector…

CPM2

 

b

Then start executing at 0

CPM3

 

g 0

 

Then you’ll be in CP/M

All running in a browser!

So taking it one step further, I downloaded and built the Cpmtools 2.13 on OS X, used the cpma.cpm disk image as a template, deleted it’s contents and then inserted the ZORK 1 data & program into the disk image… Giving you a zork1.cpm.

So if you’ve turned off the popup blocker on Chrome, you can type in the ‘dsk’ command before you boot up CP/M. This way you can load it into the disk 1 position (B:) then boot up CP/M and play….

CP-M Zork1 on Javascript

 

All and all, I have to say this is really impressive for something like javascript to actually be somewhat usable… Naturally a 3Ghz+ CPU makes it all possible…. lol GWBasic users back on the 4Mhz machines ought to cringe every time thinking about the level of speed required to pull this off…!!!!

And thanks to Stefan for emailing me about this!

— edit

Stefan has added the zork1 disk image onto his server, so you can now simply load it via:

r 1 zork1

And that’ll place Zork 1 into the ‘B:’ drive.

UnixWare 7.1.1

So I got myself a ‘5’ user version of UnixWare 7.1.1 to add to my collection, along with a copy of Word Perfect 5.1 for UNIX (i386 SYSV it would seem).

From the wikipedia link, 7.1.1 was the last release from “old SCO” the company that brought us exciting things like Xenix, SCO Unix and SCO OpenServer (although it’s about as ‘open’ as VMS).

Anyways I went ahead and installed it in Virtual PC 2007, and it was a pretty straight forward install. The only catch has been that if you suspend the virtual machine, the networking will cease to function. And as it stands right now I don’t have any sound, but I doubt that’ll be that big of an issue.

So I broke the nice and new shrinkwrap on the Word Perfect, and went through some minor hell trying to get the first disk to untar, as it states on the diskette and in the installation manual.. Eventually I found this worked in my Virtual PC:

tar -xvf /dev/dsk/f0q18d

Then I just ran the ‘wpinstall’. Now what is weird about this install is that word perfect then just has you hand it all the disks in any random order, then it’ll start to configure itself. While it does support over 200 terminal types, it seems that the “dtterm” console is not among them. Also what was weird is that for the X11 component the Univel UnixWare (the direct descendant to SCO UnixWare) did *NOT* work, while SCO Unix did.

I would imagine if you had a pre 2000 release of any Linux you could run this via iBCS, however that project seems to have died on the vine. The last time I tried to run Xenix stuff on NetBSD/FreeBSD & OpenBSD I was met with kernel panics and disaster. I don’t think anyone runs this stuff anymore, and now that we know how to run Xenix under Qemu/Virtual PC I guess that basically takes care of that.

Speaking of Xenix, it would seem that all of the 7.x releases of UnixWare do not include compatibility for the x.out exe format either.

At any rate, I figured I could just go ahead and run my builds of Quake & Doom on a seemingly ‘slightly’ older 7.1.1 without issue.

That was not to be the case.

dynamic linker : ./quake : error opening /usr/lib/libm.so.1
Killed

Well that’s a bummer, if I do say so myself. Thankfully this version of UnixWare included the compiler (and a license) along with the OpenServer/UnixWare development CD so I had the ‘official’ X11 headers & libraries, unlike what I had to do under 7.1.3

So I ended up shuffling around my UnixWare stuff to separate the 7.1.3 from the new 7.1.1 stuff.

7.1.1
*gmake
*gzip
*doom
*quake
*zork
*unzip

7.1.3
*gmake
*gzip
*unzip
*quake
*doom
*zork

In retrospect, I would imagine you can run 7.1.1 binaries on 7.1.3, but not the other way around… But in retrospect, that is to be expected.

I’m not sure how to even play with the X11 configuration so right now I’m limited to 256 colors… But you get the idea.

 

MCC Linux 0.97 & dungeon

Interestingly enough it seems that the ancient linux circa 0.01 – 0.10 not only didn’t have FPU emulation, but didn’t support FPU instructions at all… Or I could be doing something wrong with gcc 1.40 as there isn’t a libm, nor does it inline the math… So anything with floating point is out. So with a bit of digging around for an ancient distro, I found a Linux 0.97 version of MCC. It’s incredibly small, as things were back then. So I’ve installed it, altered the kernel to default to a US keyboard map, (Sorry to people in the UK), and tried to squeeze the disk image down to something not too big. And I’ve included the f2c components and a build of dungeon.

Another f2c platform!

For anyone interested, I’ve uploaded my MCC image, it’s just under 6 megabytes. WOW how the times have changed!!!!

Again special thanks to Jiong Zhao’s most excellent oldlinux.org.

With that said, I’ve also just gotten a note from Artyom that his SunOS patches have been sent upstream to Qemu, so hopefully they’ll be downstream any day!

2.11 BSD

Well over on the HECNet mailing list, there has been quite a bit of excitement over the opencores project, that is a PDP11/70 system on a chip.

It’ll run on two FPGA eval boards, and can even boot up 2.11 BSD!

So I figured I’d get into some of the spirit, and see how far I could get with SIMH. Following the great instructions on vak.ru to get a 2.11 BSD tape installed into SIMH. I then spent some time trying to work out a working Ethernet configuration to at least be able to telnet into the VM… It seems the de driver under the PDP-11 suffers the same problem the VAX 11/780 had regarding something being flagged somewhere with errors. I didn’t ‘fix’ the simulator I took the shortcut, and fixed the driver to ignore all errors on the interface, and now I can telnet into it!

I’ve also modified the boot program, and init to auto-boot the kernel, and bring the system up into multi-user automatically.

So I just slapped together a zip file, and placed it on my sourceforge page here for downloading. I didn’t do an installer program this time, as I wanted to build some programs to make it more fun, but it seems that the PDP-11 is limited to 64k data/ 64k instructions for executables, so although I’ve compiled ircII, it will not link. I can verify that you can telnet into the VM (localhost 42323), and the pdp11 executable I’ve enclosed includes my SLiRP patches.

And.. it runs Zork!

I guess for the more adventitious, you could extract out the rest of the source, and apply the some 400+ patches to 2.11 BSD and have a current system. But if anyone knows how to build something like IRC on 2.11 BSD give me a shout.

Oh, and much to my surprise, this version includes zork, and it’s the same RT-11/LSI-11 binary that the VAX loaded up in some RT-11 syscall emulator.

Some random updates…

I just got back from a trip, so here is a quick shot of the 8″ diskette of Zork 1 for CP/M… I put it against my keyboard for some sense of scale.. It’s MASSIVE.

Zork 1 on an 8" floppy disk

Zork 1 on an 8″ floppy disk

I also found this Infocom interpeter written in Turbo Pascal, written by Martin Korth. It was written for Turbo Pascal 4.0, but I’ve built it with 5.5 and 7.0 without issues.

A friend of mine pointed me towards this new emulator PCE that looks very promising.. It boots off real IBM ROMS! Right now it’s 8086/80186 capable, but it’s still VERY cool.

Word is the author is working on Sparc32, ARM & PPC emulation… It looks very cool.

Thats about it for me!