The old AT&T "you will" ad campaign

So while I was looking at an iPad for no real reason, something told me I’d seen this thing before…. Something familiar..

iPad from the 1990s

iPad from the 1990s

Then I remembered this old thing.. The old AT&T you will from the early 1990’s.

 

The killer in retrospect, is that in the early 1990's most people were lucky to have pagers, cellphones were bulky and cost prohibitive (lol nothings changed there), I went from a regular pager, to a 2 way pager, then to a nextel, then to a Motorola startac..

Ok, it's not emulation, but it really is funny to see these future forward things, and how much we take for granted now, and just how... different things changed.

Mini Vmac’s Macintosh II

While browsing around, it came to my attention that the great project Mini vMac‘s Macintosh II emulation has now progressed to the point where it can actually start running stuff!

So I downloaded it, searched high & low for the necessary files, and was booting in no time!

mini vmac 26 boot

mini vmac 26 boot

While it’s not as full featured as Basilisk II, it is a *LOT* smaller, and easier to work with. By default it’ll emulate a Macintosh II with 8 MB of ram. Hard disks & floppies are only supported through the shim method of the older Mini vMac, so you can just drag & drop your images onto the screen. I tested it with an old game I had floating around on my Mac SE30 Space Quest…

mini vmac 26 space quest

mini vmac 26 space quest

And it runs well enough.

Over all I have to say it’s easy to use, very responsive, and just GREAT!

If you have a need for 68000 MAC programs, you may want to give this one a shot… And it’s so small, the Win32 binary is 144kb!!!

Slackware 3.5

A friend of mine was having a hard time trying to configure XF86 from the old Slackware 3.5 days… 1998.

Wow time sure has flown!

Anyways I kind of liked Linux back then as a lot of distros had OpenLook, which made my Linux box feel like a way cheaper SUN box.

While Slackware 3.5 installs great on Virtual PC, the networking just crashes out… So I thought I’d just fire it up on Qemu.

qemu.exe -net nic,model=ne2k_pci -net user -hda Slackware 3.5 Hard Disk.vhd” -L pc-bios -redir tcp:58080::80

And with a bit of tweaking I managed to get it running!

Although with normal VGA there is some weird issues with the cursor…

Slackware 3.5 running openlook

Slackware 3.5 running openlook

It was about as hard as I remember for the xf86config days… you kind of had to mash a few together to get it working…

And if it saves anyone the hassle, here is the XF86Config. (gzipped!)

This is basically regular VGA with a PS/2 mouse… It works on Qemu & Virtual PC, so I’m sure your favorite emulator ought to work as well.

BSD-games & Solaris fun.

I was getting bored with a stock Solaris 2.4 system, so I decided to load up some basic BSD games. Since I like the torture of it, I went to build them from source.

OH MY GOD.

I don’t mean to complain too much, but holy crap, the configuration for the BSD games package is INSANE.

After answering what feels like 100+ questions (it very well may be) you can eventually try to build BSD-games… but much to my dismay the 2.x series all hinges on you basically having a GNU environment, and well… I didn’t want to spend that much time just to run robots & fortune.

So thanks to this great page, there is some hints on building BSD=games 1.5 for Solaris… But where on earth to find something this old?! This is the weird thing, all of this older free software is being destroyed wholesale… I know right now people just don’t care, but there most certainly is this ‘digital’ divide that is coming, where most of our current history will be lost forever… Hell if nukes fell tomorrow, good luck to anyone decoding a DVD… And god help them if they succeeded. It certainly wouldn’t be worth the effort.

Anyways, with a bunch of searching I found a site in Germany with the goods.

Now the real fun starts…

I’m using gcc 2.8.1, because that is what was in the GNAT package. Anyways for some programs I was encountering errors like this:

gcc extern.o init_field.o main.o make_level.o move.o move_robs.o play_level.o query.o rnd_pos.o score.o flush_in.o -lncurses -lnsl -lsocket -L/usr/ucblib -R/usr/ucblib -lucb -o robots
Undefined first referenced
symbol in file
_tty main.o
_pfast main.o
_echoit main.o
_tty_ch main.o
_rawmode main.o
ld: fatal: Symbol referencing errors. No output written to robots
make: *** [robots] Error 1

I know.. .WTF?! So after building & rebuilding ncurses, I found on some obscure Fortran list that the linker in Solaris is… weird. So to save anyone the hell, here is the “correct” string in this instance.

gcc extern.o init_field.o main.o make_level.o move.o move_robs.o play_level.o query.o rnd_pos.o score.o flush_in.o -L/usr/ucblib -R/usr/ucblib -lcurses -ltermcap -lucb -lncurses -o robots

Notice the difference? Yeah, the big one, is that now it linked. The position of the -L & -R really matters to the SUN linker.

Another error I was getting (in this example from tetris) was this:

In file included from screen.c:59:
screen.h:62: parse error before `__P’
screen.h:63: parse error before `__P’
screen.h:64: parse error before `__P’
screen.h:65: parse error before `__P’
screen.h:66: parse error before `__P’
screen.h:67: parse error before `__P’
screen.h:68: parse error before `__P’

I assume in the future (or was it the past?) that this __P macro would be standard with GCC? Maybe it’s a linux-isim? I don’t know. What I do know is this block

#undef __P
#ifndef __P
#if __STDC__
#define __P(protos) protos
#else
#define __P(protos) ()
#endif
#endif

Will fix it.

Another weird error revolves around setjmp.h . Now I know in Solaris some headers have to be included in a certain order or all hell will break loose, or the part you are looking for just won’t be included. But I just mined out the relevant parts to get what I wanted…

In file included from /usr/ucbinclude/setjmp.h:44,
from screen.c:47:
/usr/include/sys/ucontext.h:24: parse error before `sigset_t’
/usr/include/sys/ucontext.h:24: warning: no semicolon at end of struct or union
/usr/include/sys/ucontext.h:25: warning: data definition has no type or storage class
/usr/include/sys/ucontext.h:28: parse error before `}’
/usr/include/sys/ucontext.h:28: warning: data definition has no type or storage class

So I just removed the reference to setjmp.h & instead put in this:

#define _JBLEN 10 /* ABI value */
typedef int jmp_buf[_JBLEN];

And it was happy. Now I know this is a HORRIBLE “FIX” but heh, sometimes you just want the dammed thing to compile!

Next I was getting these weird sigset_t errors…

screen.c: In function `stopset’:
screen.c:238: `sigset_t’ undeclared (first use in this function)
screen.c:238: (Each undeclared identifier is reported only once
screen.c:238: for each function it appears in.)
screen.c:238: parse error before `sigset’
screen.c:242: `sigset’ undeclared (first use in this function)
screen.c:244: parse error before `)’

And again I just mashed in the definition of:

typedef struct { /* signal set type */
unsigned long __sigbits[4];
} sigset_t;

Lastly was another error revolving around sig_t … So just inserting this:

typedef void (*sig_t) (int);

Into the code, got it to stop complaining.

So the upshot is that after manually linking a bunch of these programs, and manually installing the binaries & datafiles (Solaris 2.4’s install doesn’t work the way BSD-games 1.5 expects…) I finally could do this:

UNIX(r) System V Release 4.0 (solaris24)

login: rootb
Password:
Last login: Sat Dec 12 19:01:49 from qemunat
bash# fortune
There can be no twisted thought without a twisted molecule.
— R. W. Gerard
bash#

Now the big question…. Was it worth it?

Yeah sure, I learned a valuable lesson about the linker. The rest, not so valuable.

200th post!, and using ADA to fix your system…

Wow, so I was about to post this when I check to see how many posts I’ve done, and this will put me at 200.

It’s hard to believe it all started out on running Netware 3.12 on Qemu 0.9.0.

Ok, now let’s get on with today’s fun.

I’ve recently managed to get Solaris 2.4 running on Qemu, and it’s been all great, but I’d love to build some programs for it! Now there are binary builds of GCC for Solaris 2.4, but they are about 17MB compressed, and I think it was about 80 uncompressed!

Well that sounds great, except for 2 major limitations:

1. For some reason Solaris doesn’t want to mount any ISO I give it… I’m still kind of lost there.
2. The only networking I can get working is the usermode NAT, and Solaris 2.4’s ftp client/server is just too old for passive mode.

So what the heck can I do?

Well back in college we had this RS/6000 that was cool, *BUT* for some reason I don’t recall it couldn’t build and use mtools (among other things) but from what we had heard is that if we had gcc, it’d run fine. Except without a working C compiler, how does one get GCC running on a RISC machine?

Well, thanks to the fine people that maintain GNAT, the GNU ADA translator, they provide some ready to run versions of GCC. Well not to complain but as the years drag on, lots of mirrors are gone, and there are only a handful of copies left, but they currently have:

*Dec Alpha OSF4
*HP HPPA HPUX 10.20
*i386 Solaris 2.6
*SUN Sparc Solaris 2.5.1
*IBM PowerPC AIX 4.1

And let me tell you, if you were ever given any of the above machines, you’ll be so grateful for this massive leg-up! Now these are *NOT* full development systems, as they are geared towards translation, they are lacking the libc/include files. You’ll have to source those from somewhere, but thankfully as part of the Solaris install there is an option for headers and libraries.

So, while this is all very good, how do you get this stuff to run on your SPARC?

Well.. It’s tedious! but this method is what I used to get gcc running on the RS/6000 years ago, and on the sparc. Unpack that GNAT distribution, then use uuencode/uudecode on the minimal files.. Then paste them into a console window and be sure to have turned messages off!… It’s not “sexy” but it works!

Naturally since there is no gzip for Solaris (you’d have to send one over first!) don’t bother compressing anything with gzip/bzip2… although you could us the old unix compress command, which is what I ended up doing.

So at a minimum the following files are needed to build some programs…

cc1 crt1.o crtend.o crtn.o libgcc.a
cpp crtbegin.o crti.o gcc

Yes, really!

# cat one.c

#include <stdio.h>
void main(void)
{
printf(“hi\n”);
}
# gcc -v one.c -o one
Using builtin specs.
gcc version 2.8.1
cpp -lang-c -v -undef -D__GNUC__=2 -D__GNUC_MINOR__=8 -Dsparc -Dsun -Dunix -D__svr4__ -D__SVR4 -D__sparc__ -D__sun__ -D__unix__ -D__svr4__ -D__SVR4 -D__sparc -D__sun -D__unix -Asystem(unix) -Asystem(svr4) -D__GCC_NEW_VARARGS__ -Acpu(sparc)
-Amachine(sparc) one.c /var/tmp/cca000KP.i
GNU CPP version 2.8.1 (sparc)
#include “…” search starts here:
#include <s…> search starts here:
/usr/include
End of search list.
cc1 /var/tmp/cca000KP.i -quiet -dumpbase one.c -version -o /var/tmp/cca000KP.s
GNU C version 2.8.1 (sparc-sun-solaris2.5.1) compiled by GNU C version 2.8.1.
one.c: In function `main’:
one.c:4: warning: return type of `main’ is not `int’
/usr/ccs/bin/as -V -Qy -s -o /var/tmp/cca000KP1.o /var/tmp/cca000KP.s
/usr/ccs/bin/as: SC3.1 dev 09 May 1994
/usr/ccs/bin/ld -V -Y P,/usr/ccs/lib:/usr/lib -Qy -o one /lib/crt1.o /lib/crti.o /usr/ccs/lib/values-Xa.o /lib/crtbegin.o -L/usr/ccs/bin -L/usr/ccs/lib /var/tmp/cca000KP1.o -lgcc -lc -lgcc /lib/crtend.o /lib/crtn.o
ld: Software Generation Utilities (SGU) SunOS/ELF (LK-1.4 (S/I))
# ./one
hi
#

After an hour of struggling with uuencode, and pasting the results with putty into Qemu running Solaris 2.4 I’ve managed to cook up the following programs:

gzip-1.24
httpd-0.5
ircII-4.4
lynx-2.8.2
make-3.75
unzip-5.52

And I’ve got to admit, that using lynx to download new stuff is a VAST improvement! So for the hell of it, I went ahead and built my favorite f2c/libf2c & dungeon-2.5.6!

Solaris 2.4 running dungeon

So there it is, Dungeon in all of its “glory”.

Now one important ‘tip’ to share, is that if you follow this path, it’s possible to run into some weird vararg issues… The problem is that gcc works better with it’s own headers for varargs, not any OS version… Everyone recommends you build GCC on your machine yourself to get all the headers in place. The GNAT packages do include the needed vararg stuff, you can simply change the lines that use something like this:

#include <varargs.h>

to

#include “/tmp/gnu/varargs.h”

And life will be good.. That’s basically what I was needing to get lynx to run.

Well, that’s the end of this adventure, hope to post at least another 200 more!

Solaris 2.4 on Qemu (SPARC)

 

Well after a lot of digging around, I was able to come up with Solaris 2.4 and proceeded to install it on QEMU.

And it works!

From my notes though, it was far easier to use Solaris 2.9’s “format” command to prepare a 2GB hard disk. For some reason Solaris 2.4’s format command didn’t want to write the label to the disk.

But with a labeled disk in hand, and placing the ISO image under the “hdb” position I was able to boot up the installer with a simple

boot disk1:d

During the installation, you can select networking, just remember that the ip address you’ll use is 10.0.2.15, the workstation is networked with a netmask of 255.255.255.0 and you should use the “other” method of resolving names.

As mentioned in the FAQ, don’t let the installer reboot when it’s done (it’s an option), be sure to do the following:

cd /a/etc
# cat >> system
set scsi_options=0x58
^D

Otherwise it’ll load up the drivers in the wrong order, and it won’t mount the root partition… The best part, is that the networking works great, and that I’m able to telnet INTO the VM, and out of the VM.

And you will want a default route…

# cat > defaultrouter
10.0.2.2
^D

Then in the file /etc/nsswitch.conf change the following:

hosts: files

to

hosts: files dns

Then to ‘fix’ up your /etc/resolv.conf

# cat > resolv.conf
nameserver 10.0.2.3
#

And then I like to add the following hosts to speed up telnet…

# cat >> hosts
10.0.2.2 qemunat
10.0.2.3 qemudns
^D

Then finally (yes!) the file /etc/default/login

comment out the line:

CONSOLE=/dev/console

Now you should be good to go!

Or at lest those are the steps I took to make my system boot. Oh, and don’t forget it won’t auto boot, you’ll have to issue

boot disk0

every time you fire up Qemu.

PCemu for Windows

Back when Linux was all new and exciting, I used to run this program, called pcemu to run some basic text only MS-DOS programs. The thing was dosemu was cool, but just unstable as hell, and a put software emulator could always be controlled because it was ‘just another process’…

Now the thing about pcemu is that it was meant for X11, and it’d suck for those of us that actually used terminals… Ages ago I ‘fixed’ a lot of the X11 stuff to run over a terminal, but I never did get the scrolling correct.

So years later, trying to remember the programs that I ran circa 1994, I thought I’d dig out pcemu and see how it runs on ‘modern’ machines…

Much to my surprise, David Given & Michael Hope, have updated it somewhat, and included curses support!

So I took the curses portion, then used a little insight from the ‘bounce’ demo from the NT 3.1 SDK, along with this great example of how to work some of the features of the Win32 Console, along with a long night trying to get the timers working, and I’ve managed to produce a copy of pcemu that’ll run on Win32 & Win64…

Now of course I’m sure you’d be saying Why…. But remember the x64 platform has no native way to run MS-DOS, so even a simple text only emulator is a nice thing to have..

pcemu-x64

pcemu-x64

So while it may not look all that exciting, it actually works!

fdisk on pcemu-x64

fdisk on pcemu-x64

Even FDISK renders correctly!

For some reason pcemu had hard disk emulation, but it was disabled by default… So I re-enabled it, and configured it to emulate the ST506 5MB hard disk.. And it works great, other then you can’t boot from it… 😐

Other then that, yes it is totally pointless, but I have to admit, it was pretty cool the first time I saw it booting up.

For the 2 or 3 people that care, my work is currently here. I’ve built it for the x86, x64 & ia64….

OS/2 1.x emulation via HXRT

I finally got this working, although I’ve got to sit down and work out the old makefile format to bind in the hxrt stub instead of running it all on the CLI…

So as a poor example, I used the ancient Fortran 5.1 to build up an OS/2 1.x VIO executable of dungeon, which would run happily on NT 3.1, but of course will not run on XP as they have removed the OS/2 subsystem.

Anyways it’s impossible to run the exe on dos, but fishing around I came across my old Visual C++ 1.5 CD, and on there was the Phar lap 286 dos extender. And one of the neat things it could do, was run simple OS/2 applications under MS-DOS!

So I bound the exe and now it’d run under MS-DOS.

phar lap 286 dungeon 2.5..6

phar lap 286 dungeon 2.5..6

However, since it’s a trial version, it’s limited to 2MB of ram, and you can’t redistribute the resulting exe. Now this is where HX DOS Extender (archive.org mirror/sourceforge mirror) comes in. Over the years, the HX dos extender has provided the functionality of the old Phar lap TNT dos extender by allowing you to run Win32 exe’s under MS-DOS, and it provides a pretty impressive subset of the Win32 api on MS-DOS.

So taking this lead, HX now has a 16 bit 286 centric version that provides a basic OS/2 emulation layer.

So by simply passing the OS/2 exe as a parameter to the DPMI loader (I haven’t quite worked out the stub syntax…) you can run the OS/2 build of dungeon under MS-DOS!

HX16 dungeon 2.5.6

HX16 dungeon 2.5.6

For anyone stuck with either legacy 16bit tools, or a need to support ancient systems, it’s certainly nicer with OS/2 as you have access to a LOT more memory! According to the documentation the HX extender should work nicely with the OpenWatcom Fortran & C, although I currently haven’t tested it.

What’s kind of interesting is that HX doesn’t work under DOSBox, while the Phar Lap 286 DOS Extender will….

Both of these dos extenders build on the old idea of the “Family API” where common API’s between OS/2 and MS-DOS could be mapped between the two OS’s, and a common “bound” executable could then run in either environment. However on the MS-DOS side, it’d be subject to the memory constraints of a realmode MS-DOS executable. The DOS extenders build on this idea, but provide access to additional memory, and a more feature rich OS/2 api.

On the road to X11

This is going to be.. involved to do… But there is some hope. The source to X11 R5 is still online, even though the xfree86-1.2 stuff is long gone. I was able to find a binary 2 bit Xserver for 386BSD, so that’s promising.

So my hope would now lay in making up a configuration file that’ll satisfy the Xfree86 1.2 server, and build enough of X11R5 to where it’s able to do something….

I have no idea if it’s even that easy to do, but if anyone has any leads on a source copy of xfree86-1.2 or 1.3 that’d probably be easier to build for 386BSD as it was used in the time frame… 2.0 was for the forks of NetBSD & FreeBSD so no doubt it’d hinge on things like DLL’s…

In the meantime, you can check out Neils Horn’s blog, with an example of what Xfree86 1.x was capable of on 0.96 linux.. Back in the day.

HTTPD 1.3

Well I was looking for a way to move data out of the 386BSD vm without too much pain, and I’ve just been hitting this brick wall about trying to compile apache.

You see the thing is, 386BSD is so old, it doesn’t have dynamic libraries, and a uname command so you have to ‘fool’ the configure scripts, and even then if you do manage to get an executable it’ll just crash… For some reason gdb couldn’t help with the whole thing… very annoying. I think it may be a program size limit..? Either way, I’m sure it was ‘fixed’ in NetBSD 0.8 ..

So after googling around the ancient news groups, I came across this post..

NCSA httpd 1.1/1.2/1.3 compile straight (well almost) out of the box. I’ve not tried the CERN one yet. I’m happy with my NCSA 1.3.

Well, now that’s interesting… Remember that NCSA gave us Mosaic, but they also gave us httpd, which apache is based on. However NCSA no longer hosts the httpd source code… It’s gone with the wind…. Except for this Slackware mirror.

So after downloading it, and building, naturally…. it crashed. However this time I was able to fire up GDB, and see that it was crashing in the mime initialization… It seems it was using a null pointer… So for the heck of it, I changed the hash macro to use the 2nd definition, and it worked!!

So after all of that, I built some stuff for 386BSD to test the transfer of the web server, and it “seems” ok to me… Naturally I wouldn’t expect this to withstand any large amounts of traffic as it doesn’t seem to fork itself… I also suspect this version may work with the VAX 4.X BSD stuff as well…

httpd-1.3
com (CP/M emulator)
GNUMake-3.75
Frotz-2.32
screen-3.7.1
gcc-2.5.8
bash-1.14.7
bash-2.0

It is kind of scary how this old software is disappearing, and at the same time, we hear this promise of how we can keep everything forever in the “digital age”… At any rate, I guess this preserves a somewhat usable OS/Webserver configuration circa 1993…