Qemu 1.7.0 released!

The main qemu page hasn’t been updated yet, but the download page has the source to the new version of Qemu.

I’ve gone ahead and built binaries for OS X, both a full version, and  a i386 minimal version.

As always testing is very minimal, all I’ve done is installed MS-DOS 6.22 & Doom 1.1, and tested the SoundBlaster 16 emulation.  And as with the pre-release versions, the adlib code is still broken.  And Ive done the ‘better’ fix in this code regarding that.

I haven’t run anything else, including fun things like the PowerPC & OS X emulation, MIPS with Windows NT, or even trying anything x64 based as I’m sure it is still broken from back in the Qemu 0.90 days.

Virtual Xenix & the internet

This is probably the most significant Xenix post I’ve made since the old days when I managed to get Xenix running in Qemu all those years ago.

3com network card

3comB network card

What has long been a frustration with the beleaguered Xenix community is that although there was a TCP/IP package for Xenix (and a much required streams package…) it only worked with a handful of ethernet cards.  And all of them were early 3com’s.  While the world was using NE2000’s on just about everything, the most common ethernet board Xenix would talk to was the 3c503, which is getting harder and harder to find as the years go on by.

But right now none of this matters.

I was looking at this article on setting up Apollo Domain UNIX, on MESS.  And apparently it will do networking!  Which is cool, so I poke around MESS, and what do I see? 3c503.c. Could it be true?

Now I ended up having to download the source to mame 0.151 (mame0151s.zip) and building it on OS X.  Of course remembering to alter the makefile to include the ‘USE_NETWORK=1’ statement, and build for Mess.  And just as it looks like something out of SIMH, Mess makes use of libpcap which means that you are *unable* to send/receive on the host computer. (OS X & Win32 binaries).  And of course you’ll need a ROM & Xenix diskettes.

Installing Xenix is pretty straightforward as long as you know your system key, and how to navigate the mess UI without rebooting mess or exiting by mistake (scrolllock on the PC, function/Delete on OS X).

First create a hard disk, and as always it should be ~500MB max.

chdman.exe createhd -o xenix.chd -chs 1015,16,63
chdman – MAME Compressed Hunks of Data (CHD) manager 0.149u1 (Aug 10 2013)
Output CHD: xenix.chd
Compression: none
Cylinders: 1015
Heads: 16
Sectors: 63
Bytes/sector: 512
Sectors/hunk: 8
Logical size: 523,837,440

then with the disk in hand, I just setup a 486 like this:

./mess64 at486 -harddisk1 xenix.chd -isa2 3c503 -ramsize 8388608 -floppydisk1 xenix/n1.vfd

Naturally you’ll need to setup the CMOS, for your memory size, and the hard disk.  The BIOS I’m using didn’t autodetect the IDE drive, but it doesn’t matter as I know it’s characteristics as I created it.

From there Xenix was a pretty straight forward deal.  Mess has good floppy drive emulation so it just worked.  Adding TCP-IP was just as involved, and all went well.  When it came time to install TCP & the network driver, remember to use thinnet, as the thicknet transceiver isn’t connected (as it would seem).  The 3c503 is softset, so I went with IRQ 5, port 0x300, and thinnet, and it works fine for me!

mess xenix networking

Xenix TCP/IP in action, inside of MESS!

Remember you will not be able to attach to it from your computer.  Instead you must attach from another computer.

Also MESS tries to emulate true to hardware so it’ll be just as slow on MESS as it was on the real hardware.  I suppose you could go with the at386 driver, but yeah it’ll be slow.  The current at586 driver has issues booting from the hard disk, and I didn’t mess with it too much as Xenix is known to have issues with some Pentium systems.

Although I think the next place for adventure is the emulated Adaptec 1542CF.

Booting from USB in VMware Workstation

(note this is a guest post from Tenox)

Jason’s note on hybrid bootable ISO reminded me of a recent discovery. I have a bootable USB pen drive that I wanted to boot in VMware Workstation. Normally impossible, but there always is a work around! Turns out the problem is with the VMware built-in BIOS and more specifically lack of USB boot support. All you have to do is get a bootable media, floppy or CDROM with a boot loader that can redirect you to the USB device. I’m using Plop. Important thing to remember is to connect the USB pen drive to the virtual machine in a pass through mode. Also it’s very very slow.

Everyone mentioned this yesterday…

275,000 transistors of awesomeness!

275,000 transistors of awesomeness!

Kind of interesting is that Linux has finally dropped support for the 80386 microprocessor.

The 386 is perhaps one of the top ten things that has changed our world, along with 4.3BSD .

No, really!

The 386 microprocessor was the first CPU by Intel that was single sourced.  This means that Intel, and only Intel would fabricate the 386 processor.  Before this time, Intel had licensed their processors to other companies (Siemens, AMD, Harris, IBM etc) So that if there was some kind of production issue at Intel other companies could manufacture 8086,80186s and 80286s.  However this all changed with the 386, as Intel stopped renewing these agreements with other companies (IBM had a license that included the 386, although they were slow in making their own), so now Intel was in charge of its destiny.

The 386 brought three major changes onto the then champion processor the 286.  The first being a 32bit processor where it could handle larger data sizes than the 16bit 286 & 8086.  The 386 also included a larger memory model, the so called “flat mode” where it could directly address 4GB of combined code+data, while the 286 could address 1GB it was limited to 64kb segments.  Lastly the 386 introduced hardware virtualization, the “v86” mode where the 386 could emulate multiple 8086 processors, allowing people to have multiple ‘virtual machines’ on the desktop.

At the time the only consumer grade 32bit processor was the hybrid 32/16 68000 from Motorola.  The 68000 could work with 32bit data, but it was restricted to a 16bit data bus, and only could address 24bits of RAM (16 megabytes).  The 68000 however did not include any kind of memory management unit (MMU) making things like porting UNIX improbable (The SUN-1 workstation included a custom MMU).  Because of the open nature of the IBM PC, clone manufacturers were able to leapfrog IBM, and release 386 based machines before IBM got around to releasing the PS/2 model 80.  It was this that effectively brought 32bit computing to the masses with the Compaq Deskpro.

Compaq's 386 Deskpro

Compaq’s 386 Deskpro

The 8086 processor could address 1MB of RAM, with its 20bit address bus.  However to preserve some compatibility with the 8080 processor it was decided that the 8086 (and 8088) CPUs would work with 64kb segments.  This became a massive headache for years as you could not easily contain more than 64kb of data at a time as you would exceed a segment.  Compiler vendors made some workarounds via the large & huge memory models, but porting a program from a 32bit minicomputer (VAX) would prove difficult if it addressed large amounts of memory, and would require a rewrite.  The 286 increased the addressable memory to 16MB, and included a limited MMU, which enabled an address space of 1GB.  However the 286 was flawed in that again the 286 could only work in 64kb segments, and in order to work with large amounts of memory, the processor had to be shifted to protected mode.  However in protected mode, you couldn’t (easily) switch back to real mode.  This needlessly delayed the adoption of protected mode environments, as you would then lose access to the sizable, and growing, library of MS-DOS programs.  Although workarounds were in place for things like OS/2 and DOS Extenders, they were hacks and couldn’t fix the fundamental 64kb issue.  The 386 built upon the 286’s foundation and included a flat memory model where it could address all 4GB of addressable memory in a single segment.  This meant that you could now use massive amounts of data on a consumer grade machine.

For a while the only 32bit environments were Xenix and MS-DOS via DOS Extenders this proved to be a huge liability and effectively stagnated the industry for a long while.  The 286 was a massive determent.  Making things worse was IBMs insistence that the new OS/2 be able to run on the 286, while Microsoft wanted to create OS/2 to run on the 386, and ignore the IBM AT all together. Basically the 286 was created with the assumption that the 8086 wouldn’t be anywhere near as popular as it was.

With the ability to address large amounts of RAM programs only seen on minicomputers and mainframes were finding their way to the microcomputer such as AutoCAD, Oracle, Links 386 Pro, and of course many in house programs where departments now wouldn’t have to pay to run on then ‘big’ minicomputers.  Combined with the 386’s MMU it was also possible to use more memory than was available in the computer, also known as virtual memory.  The 386 made this transparent to the program, only the 32bit environment needed to handle the swapping.

Finally the last big feature of the 386 was v86 mode.  V86 mode in short is a hardware virtualization platform where the 386 can emulate multiple 8086 processors in hardware.  Each virtual machine can get its own isolated memory space, virtual hardware.  Effectively 8086 programs (such as MS-DOS) can run unaltered inside of v86 mode, with the added benefit of being able to run more than one at a time. Windows/386 lead the charge into this new world of virtual machines for the end user.  Before this point, the only wide scale virtual machine environment was the IBM 370 mainframe which could also create virtual mainframes within itself allowing groups to share a single mainframe, but run incompatible software platforms all at the same time.

Thanks to its capabilities the 386 also brought UNIX to the end user.  First with Xenix, then Microport SYSV, and with the removal of AT&T code BSD was able to be released on the 386 via 386 BSD (and later BSDi’s BSD/OS).  During this timeframe the research OS, Minix was extended by Bruce Evans to be able to use some of the 386’s features which then gave rise to Linux.

Thanks to cheap commodity based 32bit computers, and the GNU projects development tools (binutils, gcc, bash) people could then finally realize GNU’s dream of bringing a free and open UNIX like operating system to the masses.

Needless to say, a lot has changed since 1991, and Linux now moving beyond the 386 processor is no surprise.  The rapid adoption of 64bit computing via AMDs extensions, and the new forthcoming 64bit ARM processors do signal the eventuality that one day Linux will even drop support for 32bit processors… Although I wouldn’t expect that for another 20 years.  Even Intel has ceased manufacturing the 386 processor in 2007.

So it is now time to say good bye to the 386 processor.  At the same time thanks to full software emulation, you will never truly be dead. And as always you can check out Linux’s early versions.

Dell UNIX Lives Again!

(please note that this is a guest post from Antoni Sawicki)

Dell UNIX is so ultra rare among rare Unix species that it doesn’t even have a Wikipedia entry. I have been hunting this elusive but important piece of computer history for well over 15 years now. Fortunately thanks to Charles H. Sauer and his excellent blog post I was finally able to lay my hands on disk and tape images and the restoration process begun.

The install tape

The system can be installed from either a tape or network server (presumably NFS). Unfortunately no virtualization software can emulate a tape drive. Hopes for a network install are even slimmer since the required network support floppy disk has been lost and chances of suitable Ethernet driver working in Bochs or Qemu are equal to that of finding the lost floppy disk.

I have decided to try a hard disk image from a readily pre-installed system. The original Dell 486 workstation had a 1GB SCSI hard disk. Unfortunately neither Dell UNIX supports LBA mode nor Qemu/Bochs support the Adaptec 154x controller required by the OS.

As all normal install options have been exhausted, the only option left was to use a second hard disk image as source of cpio archive files. Booting from the two install floppies and attaching two disk images was a snap. The next step was to inject the tape “file” in to a right place on the disk, so it can be read by cpio command. A hard disk in Dell UNIX is pretty much unusable without a valid SysV partition and VTOC. Fortunately dellsetup command does it all for you. Once VTOC was put in place I’ve attached the transfer disk image as a loopback device in my host OS. In couple of iterations I was able to aim the host os dd if=file1 of=/dev/loop0 bs=512 seek=offset at the right place, which you work out using prtvtoc /dev/rdsk/1s0 command. Then cpio -ict < /dev/dsk/1s1 was able to list contents of the emulated tape… with errors…

In my infinite wisdom, for some unknown reason I’ve assumed that LBA addressing is required above 540MB. So to be on a safe side I have made the hard disk images 512 MB. What a mistake it was! I have lost several hours trying to figure out cpio header errors coming from the disk… By pure coincidence, while the tape archive was installing (with errors) I was researching for this very blog article and found that LBA starts at 504 MB… Recreating the hard disk images just few MB smaller took all tape and prior boot problems away!

Once the cpio archive was extracted I have made few final touches taken from the original tape install script. After a reboot Dell UNIX booted perfectly. You can experience this by using the firstboot image file. The final part of installation was injecting the second tape file containing System V PKG file to the transfer disk image and running pkgadd -d /dev/dsk/1s1. This is what’s included on allsoft.img.

Dell Unix at First Boot

Some final notes on running the OS:

  • To enable mouse to work:
    • Qemu just add “-chardev msmouse,id=msmouse -device isa-serial,chardev=msmouse” to the launch arguments.
    • Bochs add to the config file:
      mouse: type=serial, enabled=1 
      com1: enabled=1, mode=mouse
      then you have to kill mousemgr process and prevent from starting by deleting /etc/rc2.d/S25mse
      then edit /usr/lib/X11/Xconfig:
      disable Xqueue
      enable Microsoft Mouse
  • To enable keyboard to work correctly in VirtualBOX start with Num Lock OFF.
  • You can use qemu-img utility to convert the image to VMware vmdk to use in VirtualBox.
  • To run X window type startx

X11 and all its glory

  • To attach it to internet use SLIP as there is no working Ethernet driver.  Contrary to most UNIXen of the time, the command is not slattach, but rather slipattach.  Thankfully it does work the same way.  I have found that running Dell Unix with VirtualBOX, along with Windows NT 4.0 I was able to connect into the Dell Unix VM, and get network access.  Just set the two VM’s up for a named pipe (\\.\pipe\dellunix) and make one of them a server, and start that VM 1st.  The steps to prepare Windows NT have been outlined before.

Telnet via SLIP

Legal disclaimer: Dell UNIX is a commercial software and should not be distributed without manufacturers permission. However as the operating system has been dead for 20 years and with a long tradition from Unix Heritage Society and Bitsavers I’m publishing this in good faith under abandonware category. If Dell or any other copyright holder wishes this software removed, please let me know.

Attached are:

  • firstboot image
  • all (pkg) software installed
  • setup instructions if you wish to install from scratch.

Download:

You may also be interested in my post about a sister System V operating system – Interactive UNIX:

Update: Dell Unix now runs on 86Box with higher resolution and proper networking.

BBS’ing with Windows/386 & Windows 3.0 under Qemu or how I learned to love rlfossil

A while back I had seen this fantastic site, “Hates the internet” with a great write up on setting up a BBS on Qemu. In retrospect it did inspire me a bit later to get my BBS going with Qemu, but I chose to use OS/2 once I found out about SIO’s vmodem feature.

HTI (Hates the internet) chose this program called rlfossil, which is for MS-DOS..

RLFOSSIL is an implementation of multi-line serial port driver corresponding to the Fido/Opus/Seadog level 5 specification and a simple HAYES-compatible modem emulator. It allows applications usually worked through BBS’s to run on the Internet, or in IP-based local net.er, and rlogin and telnet emulation using IP services numbers 513 & 23. RLFOSSIL allows combined work with other FOSSIL drivers (X00,BNU etc.).

So, I thought between that, and all the Windows/386 excitement I’d try for something even more insane. How about running a multiline BBS on Windows?

In the same effort, I was going to use Qemu 0.14.1, with MS-DOS 4.01 (the first version I could find that came with share.exe), and Windows/386 2.11. The installation of MS-DOS 4.01 worked fine on an 80MB disk image, thankfully it was one of the things that DOS 4 could do better than 3 is large disk images… Yes, I know 3.31 could as well, but it didn’t come with share so it was out.  One strange thing after install was this message…

It is kind of foreboding that DOS is warning me that because of my “large” disk I better run share. Since I plan on having a multi node BBS all in one computer, I need to run share anyways.

The next exciting part was installing Windows/386 2.11. The installation went pretty smooth, and with Qemu the mouse worked fine.  So far, so good.  I couldn’t use himem.sys that comes with Windows/386, nor could I use the himem.sys that comes with MS-DOS as the Windows/386 version complains that that A20 line is already active (?) and the MS-DOS one has Windows complaining that the HMA is already in use. Sadly, then my conventional memory footprint will be unsatisfactory, but I don’t see any way around it.

The next part is configuring rlfossil. rlfossil needs a driver to talk to the network card, and you can find them on crynwr, namely the ‘other‘ packet archive, which contains NE2000 drivers.  Keeping with HTI, I’m going to use the NE2000 and configure Qemu with the PCI NE2000 driver.

Packet drivers are loaded from the command line something like this:

ne2000 0x60 11 0xc100

This loads the driver on software interrupt 0x60, and by default the PCI NE2000 is configured for IRQ 11, port 0xc100.  Qemu 1.6.0 changed the PCI NE2000 to use port 0xc000 for what it is worth..

So keeping with the HTI tradition, I’m going to put my packet driver (ne2000.com) and unpack the rlfossil archive in c:\packet. The next thing to do is configure rlfossile which uses the wattcp configuration file.  Since I’m going to use the usermode NAT and a redirect, I configure my VM like this:

Wattcp.cfg

Address:10.0.2.15
Netmask:255.255.255.0
Gateway:10.0.2.2
DNS: 10.0.2.3

With that all in place now it’s time to configure the config.sys/autoexec.bat.  Some things are going to be different from a normal install because we plan to run a BBS, and multiple instances of it!

So my config.sys looks like:

FILES=96
STACKS=0,0
DEVICE=C:\DOS\ANSI.SYS
SHELL=C:\COMMAND.COM /P /E:768

And my autoexec.bat is like this:

PATH C:\WIN386;C:\DOS
PROMPT $P$G
SHARE
SET TEMP=C:\TEMP
CD \PACKET
NE2000 0x60 11 0xC100
RLFOSSIL 0 4 WIN386

And of course launching Qemu I do it like this:

qemu.exe -L pc-bios -m 16 -net nic,model=ne2k_pci -net user-redir tcp:23::23 -hda telegard.qcow2

This configures the VM for 16MB of ram (which would have cost a FORTUNE back then), the PCI NE2000, and it’ll redirect telnet from my host machine into the VM.

And just like HTI, I went with telegard, because it supports fossil based ports.

Well that sure was a *LOT* of work, and surprisingly testing it with a single node, actually works.  And you can bring up a few other MS-DOS prompts and it’ll work fine. But if you launch the second node…

Disaster struck.  So needless to say, while Windows/386 was pretty slick for the day it just couldn’t measure up.  So I figured for the hell of it, I’d try Windows 3.0 Â I mean I would have imagined that Windows 3.0 most certainly could NOT handle this kind of challenge.

So with some disks shuffled, I fired it up and..

Two node telegard under Windows 3.0

It actually worked!  So with a LOT of chaos going on I managed to get Trade Wars 2002 running, although I couldn’t figure out how to automatically figure out the node.. Hell the whole door configuration thing is.. bizarre. Synchronet really kicks ass in regards to easy of configuration.

Running TW2002, two copies

And using PIF’s to configure each node for some easy of launching, and some reduced memory, I could easily run all four nodes that rlfossil can support.

Four Nodes!

I have to admit, Windows 3.0 really is impressive considering all the UAE’s and how generally crappy we thought it was at the time.  I’m sure even emulated having a multiple Ghz cpu helps quite a bit.

460KB free!

And look at all that memory.. I guess it’s pretty impressive it even works.  Since Windows anything throttles the CPU at 100% I’m not going to put this online…. Although at the same time combined with an CPU idle program (is there a Windows 3.0 idle vxd?) it sits ok, but who wants a single user system in 2011?

VM/386

So I picked up this old 386 multitasker on amazon called.. VM/386. I remember seeing ads on how awesome it was back in the day.

VM/386 diskettes

VM/386 diskettes

 

VM/386 1.2 splash screen

VM/386 1.2 splash screen

So much to my luck, I not only got 1.2 but 1.22! Even luckier all the disks read! However what ever magic they employed doesn’t work under any emulation … 😐

Sure it’ll load up, and let you do some options.. But this is all I get.

VM/386 in action

VM/386 in action

I’ve tried it on various Qemu levels, I’ve even used a real cirrus logic video ROM (from an ISA board, I’ll have to find a PCI cirrus logic ROM…) VMware, Virtual PC, and Virtual BOX.

Has anyone ever used this thing? I was under the impression it was multiuser as well as multitasking but it seems from what little I’ve been able to use that it’s only multi tasking…

Oh well I guess another sem-interesting update in MS-DOS multi-taskers.

— edit

And… I just got word of a copy of 2.0 and it’s being shipped.. 5 user version too!

Notes on fat binaries & OS X

I suppose this also applied to NeXTSTEP/OPENSTEP but I didn’t cross build that much between the m68k and i386…

So let’s start with a 3 way compile…

$ gcc -arch i386 -arch x86_64 -arch ppc7400 dhrystone.c -o dhrystone
$ file dhrystone
dhrystone: Mach-O universal binary with 3 architectures
dhrystone (for architecture i386): Mach-O executable i386
dhrystone (for architecture x86_64): Mach-O 64-bit executable x86_64
dhrystone (for architecture ppc7400): Mach-O executable ppc
$

This builds the single file for all 3 machine types of OS X..

For anyone that cares, this is my quad core box..

$ ./dhrystone
Dhrystone(1.1) time for 500000000 passes = 83
This machine benchmarks at 6024096 dhrystones/second

Ok, now let’s pull out the PowerPC executable, and run that….

$ lipo -extract ppc7400 dhrystone -output dpc
$ file dpc
dpc: Mach-O universal binary with 1 architecture
dpc (for architecture ppc7400): Mach-O executable ppc
$
$ ./dpc
Dhrystone(1.1) time for 500000000 passes = 214
This machine benchmarks at 2336448 dhrystones/second
$

Which isn’t too bad, seeing the emulator runs at 1/3rd speed of the native exe.. It’s no wonder that IBM bought transitive, and shut them down. This kind of technology would make it far too easy for everyone to move away from expensive CPUs…!

Now let’s extract the 32bit i386 exe.

$ lipo -extract i386 dhrystone -output di3

Nothing to really see here.

And for the final part, let’s combine the extracted PPC & i386 executables.

$ lipo di3 dpc -create -output dip
$ file dip
dip: Mach-O universal binary with 2 architectures
dip (for architecture i386): Mach-O executable i386
dip (for architecture ppc7400): Mach-O executable ppc

And there we have it.. Using this I guess I can try to find versions of Qemu that will hopefully cross build on my machine that I can stitch together so that some platforms (PPC) have *SOMETHING* to run at least…..

Or maybe it’ll help someone at least make a stub ‘we are sorry, nothing to see here’ vs an exe error.

Fun with INTERACTIVE UNIX 3.0

(This is a guest post from Antoni Sawicki aka Tenox)

ix30
I’ve been hunting for a complete set of INTERACTIVE UNIX System for quite some time. While I had the “basic set” of it, the real stuff Visix Looking Glass graphical environment was nowhere to be found. Recently I got my hands on a box containing a massive set of 5.25″ floppy disks. Without further delay this is how the famous 386 UNIX GUI looks like:
The os has a long and convoluted history. It started as PC/IX for the IBM XT created by Interactive Systems Corporation. Later updated to 386/ix and renamed as INTERACTIVE UNIX System V/386. The company was acquired by Kodak and the OS was later sold to Sun Microsystems.
SunSoft INTERACTIVE UNIX 4.1
Sun has reportedly used the OS to help port SunOS/Solaris to x86 platform. However they also sold and supported it as a stand alone product. The system was widely used as part of Reuters Terminal and other embedded applications. It briefly survived Oracle acquisition making the os Oracle INTERACTIVE UNIX?

This article specifically covers version 3.0 released by ISC around 1991. The installation is pretty straightforward except for swapping 50 disk images and later configuration of NIC, TCP/IP and VGA/X11. The floppy images are available here. I have spent quite a lot of time to get TCP/IP working and VGA at half decent resolution.

Fortunately thanks to 86Box you can enjoy a fully working OS in a “high-res” (1024×768) mode, 256 colors and working TCP/IP. You can even pretend to browse the web using early version of Mosaic and WRP:

Looking Glass comes with a file manager and funky icons for pretty much every utility in the system:

The OS has a bunch of GNU apps and I even found a super early version of xv:

Finally this is how you manage the system with a “sysadm” utility and “kconfig” kernel configurator:

On a text console side, the OS has virtual consoles switchable via SYSRQ + F key. Console is on F8.

One should probably appreciate that PC had such a cool Unix version before Linux was even born. Unfortunately this stuff was all prohibitively expensive and mortals could not afford it to run on their 386s.

You can download 86Box version here. Make sure to look at readme for some last minute updates. Especially around configuring TCP/IP and Looking Glass licensing. There also is a VirtualBox OVA, however it only works in 800×600 and no networking/tcpip. Additional software can be downloaded from funet ftp. Install disks are here.

Also you may be interested in a follow up article covering VP/ix DOS hypervisor included with the OS.

Have Fun With Virtualization!