Confessions of a paranoid DEC Engineer: Robert Supnik talks about the great Dungeon heist!

What an incredible adventure!

Apparently this was all recorded in 2017, and just now released.

It’s very long, but I would still highly recommend watching the full thing.

Bob goes into detail about the rise of the integrated circuit versions of the PDP-11 & VAX processors, the challenges of how Digital was spiraling out of control, and how he was the one that not only championed the Alpha, but had to make the difficult decisions that if the Alpha succeeded that many people were now out of a job, and many directions had to be closed off.

He goes into great detail how the Alpha was basically out maneuvered politically and how the PC business had not only dragged them down by management not embracing the Alpha but how trying to pull a quick one on Intel led to their demise.

Also of interest was his time in research witnessing the untapped possibilities of AltaVista, and how Compaq had bogged it down, and ceded the market to the upstart Google, the inability to launch a portable MP3 player (Although to be fair the iPod wasn’t first to market by a long shot, it was the best user experience by far).

What was also interesting was his last job, working at Unisys and getting them out of the legacy mainframe hardware business and into emulation on x86, along with the lesson that if you can run your engine in primary CPU cache it’s insanely fast (in GCC land -Os is better than -O9).

The most significant part towards the end of course is where he ‘rewinds’ his story to go into his interest in simulations, and of course how he started SIMH when he had some idle time in the early 90’s. SIMH of course has done an incredible amount of work to preserve computing history of many early computers. He also touches on working with the Warren’s TUHS to get Unix v0 up and running on a simulated PDP-7 and what would have been a challenge in the day using an obscure Burroughs disk & controller modified from the PDP-9.

Yes it’s 6 hours long! But really it’s great!

NCC / K&R C compiler for the AMD64 platform

I saw this mentioned over at Hacker News, Charles Youse’s NCC and had to check it out! It really is a ‘tiny’ K&R C compiler that is targeting a proprietary a.out file format.

This is NCC, the “new” C compiler. It is intended to be used as the system compiler for BSD/64 (my port of pre-Reno 4.3BSD to Intel/AMD 64-bit desktops).

The dialect of C accepted by the compiler is basically pre-ANSI (K&R 1978) with some common extensions and a few minor “fixes”. (See the DIALECT file for specifics.) This is both a function of the compiler’s purpose — to operate on a mid-80s codebase — and, admittedly, personal taste.

The binary tools work on a proprietary object file format and produce a.out- format executables. These are documented in obj.h and a.out.h respectively.

The compiler and its tools are fully functional and have been fairly well- tested, though they are works in progress. In particular, the optimizer is quite minimal: the framework for a more aggressive optimizer is there, but for the moment only rudimentary data-flow analysis is done to aid the register allocator and clean up the more egregious output from the code generator.

Included in the source is:

* ncc: compiler driver.
* ncpp: an ANSI C89 compliant C preprocessor.
* ncc1: the C compiler proper, produces assembly output
* nas: accepts 16/32/64-bit Intel syntax assembly and produces .o object.
* nld: the object linker – combines .o files into a.out executables.
* nobj: object/executable inspector.

You can find the source over at github here: https://github.com/gnuless/ncc (I had a few versions I downloaded here).

I have to admit, I’m more interested in this 4.3BSD port to the AMD64, although Charles hasn’t made any mention of it just of yet.

For those who are interested in that sort of thing, NCC is licensed under the 2-clause BSD license.

Installing Windows 10 pro onto an older Mac Pro

So I have this 2006 Mac Pro 1,1 that I’ve had laying around and I wanted to put my old Nvidia 1030 into it, along with Windows 10 for a newer (stronger?) home machine.

So I burnt the downloadable ISO from Microsoft onto a DVD, tried to boot it up and got this:

Ignore the microwave…

I got stuck at this “Select CD-ROM Boot Type : ” prompt, which you can’t type anything into. Apparently it’s a common and known issue with 64bit boot code, as the older Intel Apple Mac’s are of course 32bit only. So there is a fix, you have to use something called “oscdimg” to rebuild the ISO with a 32bit friendly loader.

So first I just used 7zip to extract the downloaded ISO, and then create the new 32bit ISO with the following:

oscdimg -n -m -bc:\temp\Windows10\boot\etfsboot.com c:\temp\Windows10 c:\temp\LegacyBootWindows10dvd.iso

And yes, it boots!

Brigadier

Now what about those special ‘bootcamp’ drivers? Obviously under Windows 10 there is no nice way to get the ones you want. And what about which model/download package to get?

Then I found Brigadier!

It’ll probe your hardware type and grab the drivers for you!

https://github.com/timsutton/brigadier/releases

Retro computing for $99

So I was cruising around New Capital Computer Plaza, looking for some cisco console cables, and I saw a bunch of old Xeon desktop computers for sale.  Prices were in the 250-500 USD range, which seemed pricey to me.  And keeping in mind that my desktop is already a Xeon E3-1230, it did seem kind of pointless.  But then I saw this Dell Precision 490 for about $99 USD.

Dell Precision 490

Dell Precision 490

Great, so what are the general specs?

Well the ‘nice’ thing about Dell is that they keep all their old stuff online, so looking at the specsheet we can see It’s not a bad machine for something circa 2006.  Even archive.org has the old pricing online too!

Mine came with a Xeon 5160, 8GB of ram, 250 GB disk, and an ATI HD 4850

  • Dell Precision Workstation 490 Desktop – 32bit $2,852
  • Dual Core Intel® Xeon® Processor 5160 3.00GHz, 4MB L2,1333 [add $930]
  • 4GB, DDR2 SDRAM FBD Memory, 533MHz, ECC (4 DIMMS) [add $570]
  • 4GB, DDR2 SDRAM FBD Memory, 533MHz, ECC (4 DIMMS) [add $570]
  • 250GB SATA 3.0Gb/s,7200 RPM NCQ Hard Drive with 8MB DataBurst Cache™ [add $90]

By my calculations this machine was about $5,012 USD, and that isn’t including the after market video card, which would be about $180 USD when it was new in 2008, bringing the total MSRP on this thing to $5,192 USD!

Of course it is now 2016, and this machine is 10 years old, with an 8 year old video card.  Also of interest is that it came licensed for Windows XP x64, which was the first publicly available AMD64 OS from Microsoft.  Unlike traditional Windows XP, this 64bit version is actually built around Windows server 2003.

The computer came with a pirated copy of Windows 7, which I wanted to promptly remove.  I have an old MSDN copy of Windows XP x64 that I wanted to install, however the optical drive is broken, and I needed to install from USB.  Thankfully even though this machine is old, it can boot from USB devices.  The first step was to download WinSetupFromUSB 1.2 to get XP onto a USB stick.  Naturally once I had booted from USB, the disk controller wasn’t supported.  The BIOS screen revealed that it was a:

Serial ATA AHCI BIOS, Version iSrc 1.02.25 07222007. Copyright (c) 2003-2006 Intel Corporation. Copyright (c) 2003-2006 Dell, Inc. Controller …

This translated into the Intel iaStor product, and I was able to slipstream in the last version from 2009, 8.9.0.123 into the USB by using nlite.

I have to say that once I had removed the gratuitous pirated Chinese Windows 7, and installed XP that this machine was pretty damned snappy!  As always I updated to service pack 2.

The onboard NIC is a Broadcom NetXtreme 57xx gigabit NIC, which unlike the ‘gigabit’ nic on my newer desktop, this one actually works at 1Gb.

With Windows XP installed, I went to the AMD/ATI site, and found the download for the HD 4xxx series, and went ahead and installed Steam.

I have to say that Half-Life 2 runs GREAT.  According to it’s onboard FPS counter I was getting anywhere around 60-180 FPS.  Pretty awesome.  Fallout 3 runs pretty snappy too.  I tried Deus Ex: Human Revolution, and much to my surprise this vintage 2011 game runs on my 2006 Windows XP x64 setup.

What about the overall internet experience?  Well this being Windows XP, You are pretty limited by the traditional browsers.  Internet Explorer 6 is the default browser which to say it’s dated is an understatement.  I prefer Internet Explorer 7 over 6, but they are both so old it doesn’t matter. Internet Explorer 8 is also an option.  The last version of Google Chrome to support Windows XP was 49.0.2623.75.  Chrome 49 plays youtube just fine, Scripted Amiga is a little pokey, but does run.

And how does this thing compare to my normal desktop?  Running Geekbench 2, I get a score of 3396 vs 10864.  Now keep in mind this $99 machine only has a dual core processor, while my newer machine has a quad core + hyper threading CPU.  An interesting comparison is with the Xeon E5320 CPU, with the Dell eking out a victory.

Installing additional software was possible via Virtual Clone Drive, while I did have ISO images of stuff I’ve had physical media of in the past, a broken drive wasn’t going to help me read anything.

I didn’t activate it, but Windows 10 will run on this machine as well.  I’ll probably upgrade by getting a second JD210 heat sink (I already found another 5160 processor for $10)

It’s a great machine for sub $100.  I’d hate to have spent over $5,000 on this thing, but it’s kind of cool to see that a 10 year old machine like this can still be sort of usable.  Of course updating the software will certainly go a long way in making it really usable.

OpenBSD 5.6 Sparc64 on Qemu

Well the good news is that like NetBSD the kernel boots.  The downside is that none of the network adapters I could think of work.  They are either ignored, or crash out the kernel.

OpenBIOS for Sparc64
Configuration device id QEMU version 1 machine id 0
kernel cmdline
CPUs: 1 x SUNW,UltraSPARC-IIi
UUID: 00000000-0000-0000-0000-000000000000
Welcome to OpenBIOS v1.1 built on Nov 15 2014 12:59
Type ‘help’ for detailed information
Trying cdrom:f…
Not a bootable ELF image
Not a bootable a.out image

Loading FCode image…
Loaded 4829 bytes
entry point is 0x4000
OpenBSD IEEE 1275 Bootblock 1.3
..
Jumping to entry point 0000000000100000 for type 0000000000000001…
switching to new context: entry point 0x100000 stack 0x00000000ffe8aa09
>> OpenBSD BOOT 1.6
Trying bsd…
open /pci@1fe,0/pci-ata@5/ide1@2200/cdrom@0:f/etc/random.seed: No such file or d
irectory
Booting /pci@1fe,0/pci-ata@5/ide1@2200/cdrom@0:f/bsd
3864176@0x1000000+2448@0x13af670+3261928@0x1800000+932376@0x1b1c5e8
symbols @ 0xffc5a300 119 start=0x1000000

Unexpected client interface exception: -1
console is /pci@1fe,0/ebus@3/su
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. All rights reserved.
Copyright (c) 1995-2014 OpenBSD. All rights reserved. http://www.OpenBSD.org

OpenBSD 5.6 (RAMDISK) #178: Fri Aug 8 05:00:27 MDT 2014
[email protected]:/usr/src/sys/arch/sparc64/compile/RAMDISK
real mem = 2147483648 (2048MB)
avail mem = 2103877632 (2006MB)
mainbus0 at root: OpenBiosTeam,OpenBIOS
cpu0 at mainbus0: SUNW,UltraSPARC-IIi (rev 9.1) @ 100 MHz
cpu0: physical 256K instruction (64 b/l), 16K data (32 b/l), 256K external (64 b
/l)
psycho0 at mainbus0: SUNW,sabre, impl 0, version 0, ign 7c0
psycho0: bus range 0-2, PCI bus 0
psycho0: dvma map c0000000-dfffffff
pci0 at psycho0
ppb0 at pci0 dev 1 function 0 “Sun Simba” rev 0x11
pci1 at ppb0 bus 1
ppb1 at pci0 dev 1 function 1 “Sun Simba” rev 0x11
pci2 at ppb1 bus 2
unknown vendor 0x1234 product 0x1111 (class display subclass VGA, rev 0x02) at p
ci0 dev 2 function 0 not configured
ebus0 at pci0 dev 3 function 0 “Sun PCIO EBus2” rev 0x01
“fdthree” at ebus0 addr 0-ffffffff not configured
com0 at ebus0 addr 3f8-3ff ivec 0x2b: ns16550a, 16 byte fifo
com0: console
“kb_ps2” at ebus0 addr 60-67 not configured
“Realtek 8029” rev 0x00 at pci0 dev 4 function 0 not configured
pciide0 at pci0 dev 5 function 0 “CMD Technology PCI0646” rev 0x07: DMA, channel
0 configured to native-PCI, channel 1 configured to native-PCI
pciide0: using ivec 0x7d4 for native-PCI interrupt
pciide0: channel 0 disabled (no drives)
atapiscsi0 at pciide0 channel 1 drive 0
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0: <QEMU, QEMU DVD-ROM, 2.2.> ATAPI 5/cdrom removable
cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2
prtc0 at mainbus0
softraid0 at root
scsibus1 at softraid0: 256 targets
bootpath: /pci@1fe,0/pci-ata@5,0/ide1@2200,0/cdrom@0,0:f
root on rd0a swap on rd0b dump on rd0b
unix-gettod:interpret: exception -13 caught
interpret h# 01c099ec unix-gettod failed with error ffffffffffffffed
WARNING: bad date in battery clock — CHECK AND RESET THE DATE!
erase ^?, werase ^W, kill ^U, intr ^C, status ^T

Welcome to the OpenBSD/sparc64 5.6 installation program.
(I)nstall, (U)pgrade, (A)utoinstall or (S)hell?

(I)nstall, (U)pgrade, (A)utoinstall or (S)hell? (I)nstall, (U)pgrade, (A)utoinst
all or (S)hell? s

#

But it’s great it’s this close!

NetBSD 6.1.5 Sparc64 on Qemu

Yes, really!

I thought I’d try it for the heck of it, and it’s working enough to go multiuser, but it has some issues with hitting the disk & network pretty hard.  But it does let you install!

I just started it up like this:

qemu-system-sparc64.exe -cdrom NetBSD-6.1.5-sparc64.iso -net nic,model=ne2k_pci -net user -boot c -hda netbsd-615-sparc64.raw -nographic -serial mon:telnet:127.0.0.1:23,server,wait -m 2048 -boot d

And in no time I was booting up!

OpenBIOS for Sparc64
Configuration device id QEMU version 1 machine id 0
kernel cmdline
CPUs: 1 x SUNW,UltraSPARC-IIi
UUID: 00000000-0000-0000-0000-000000000000
Welcome to OpenBIOS v1.1 built on Nov 15 2014 12:59
Type ‘help’ for detailed information
Trying cdrom:f…
Not a bootable ELF image
Not a bootable a.out image

Loading FCode image…
Loaded 7478 bytes
entry point is 0x4000
NetBSD IEEE 1275 Multi-FS Bootblock
Version $NetBSD: bootblk.fth,v 1.13 2010/06/24 00:54:12 eeh Exp $
..
Jumping to entry point 0000000000100000 for type 0000000000000001…
switching to new context: entry point 0x100000 stack 0x00000000ffe8aa09
>> NetBSD/sparc64 OpenFirmware Boot, Revision 1.16
=0x8870a0
Loading netbsd: 8072208+553056+339856 [601032+393301]=0x9cd528
Unimplemented service set-symbol-lookup ([2] — [0])

Unexpected client interface exception: -1
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
2006, 2007, 2008, 2009, 2010, 2011, 2012
The NetBSD Foundation, Inc. All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. All rights reserved.

NetBSD 6.1.5 (GENERIC)
total memory = 2048 MB
avail memory = 1997 MB
mainbus0 (root): OpenBiosTeam,OpenBIOS: hostid 80123456
cpu0 at mainbus0: SUNW,UltraSPARC-IIi @ 100 MHz, UPA id 0
cpu0: 256K instruction (64 b/l), 16K data (32 b/l), 256K external (64 b/l)
psycho0 at mainbus0
psycho0: SUNW,sabre: impl 0, version 0: ign 7c0 bus range 0 to 2; PCI bus 0
pci0 at psycho0
ppb0 at pci0 dev 1 function 0: Sun Microsystems Simba PCI Bridge (rev. 0x11)
pci1 at ppb0 bus 1
ppb1 at pci0 dev 1 function 1: Sun Microsystems Simba PCI Bridge (rev. 0x11)
pci2 at ppb1 bus 2
genfb0 at pci0 dev 2 function 0: unmatched vendor 0x1234 product 0x1111 (rev. 0x02)
ebus0 at pci0 dev 3 function 0
ebus0: Sun Microsystems PCIO Ebus2, revision 0x01
fdthree at ebus0 addr 0-ffffffff not configured
com0 at ebus0 addr 3f8-3ff ipl 2b: ns16550a, working fifo
com0: console
kb_ps2 at ebus0 addr 60-67 not configured
ne0 at pci0 dev 4 function 0: Realtek 8029 Ethernet
ne0: Ethernet address 52:54:00:12:34:56
ne0: 10base2, 10baseT, 10baseT-FDX, auto, default [0x40 0x40] 10baseT-FDX
ne0: interrupting at ivec 3010
cmdide0 at pci0 dev 5 function 0: CMD Technology PCI0646 (rev. 0x07)
cmdide0: primary channel configured to native-PCI mode
cmdide0: using ivec 14 for native-PCI interrupt
atabus0 at cmdide0 channel 0
cmdide0: secondary channel configured to native-PCI mode
atabus1 at cmdide0 channel 1
NULL phandle
Unexpected client interface exception: -1
pcons at mainbus0 not configured
No counter-timer — using %tick at 100MHz as system clock.
wd0 at atabus0 drive 0
wd0: <QEMU HARDDISK>
wd0: 2048 MB, 4161 cyl, 16 head, 63 sec, 512 bytes/sect x 4194304 sectors
atapibus0 at atabus1: 2 targets
cd0 at atapibus0 drive 0: <QEMU DVD-ROM, QM00003, 2.2.50> cdrom removable
wd0: no disk label
wd0: no disk label
FATAL: boot device not found, check your firmware settings!
root device: cd0c
dump device (default cd0b):
file system (default generic):
root on cd0c dumps on cd0b
root file system type: cd9660
WARNING: no TOD clock present
WARNING: using default initial time
warning: no /dev/console
init path (default /sbin/init):
init: trying /sbin/init
Created tmpfs /dev (622592 byte, 1184 inodes)
init: kernel security level changed from 0 to 1

You are using a serial console, we do not know your terminal emulation.
Please select one, typical values are:

vt100
ansi
xterm

Terminal type (just hit ENTER for ‘vt220’): xterm

NetBSD/sparc64 6.1.5

This menu-driven tool is designed to help you install NetBSD to a hard disk,
or upgrade an existing NetBSD system, with a minimum of work.
In the following menus type the reference letter (a, b, c, …) to select an
item, or type CTRL+N/CTRL+P to select the next/previous item.
The arrow keys and Page-up/Page-down may also work.
Activate the current selection from the menu by typing the enter key.

┌─────────────────────────────────────────────┐
│>a: Installation messages in English │
│ b: Installation auf Deutsch │
│ c: Mensajes de instalacion en castellano │
│ d: Messages d’installation en français │
│ e: Komunikaty instalacyjne w jezyku polskim │
└─────────────────────────────────────────────┘

Wow, how’s that for cool?

A few notes though, if you use a VMDK disk access is dreadfully slow during the install, raw disk images are MUCH MUCH faster (36Kb/sec vs 3+MB/sec).  The kernel cannot figure out the root disk, so you have to tell it on every boot.  When installing it’s cd0c, when booting off the harddisk it’s wd0a. The e1000 adapter causes the kernel to go crazy, and on bootup the system indexes the man pages, which seems to kill the machine.

makemandb

makemandb indexing like crazy

As you can see this is what happens when you hit the disk too hard..

# dd if=/dev/wd0c of=/dev/null bs=1m
^Ccmdide0:0:0: lost interrupt
type: ata tc_bcount: 2048 tc_skip: 0
463+0 records in
463+0 records out
485490688 bytes transferred in 59.701 secs (8132036 bytes/sec)

and if you don’t incur the rage of the disk controller it’s the same speed:

# dd if=/dev/wd0c of=/dev/null bs=1m count=10
10+0 records in
10+0 records out
10485760 bytes transferred in 1.217 secs (8616072 bytes/sec)

But yeah, I can’t complain!

 

Cross compiling to i386 Linux ELF from OS X

This isn’t terribly useful for 99.9% of the people out there but I needed to do something creative on an F5.  Luckily they run a somewhat sane version of Linux.

Unfortunately I am stuck on Windows 10 right now, so installing a matching Linux distro is out of the question.  So on my OS X box, I thought I’d just build a cross compiler.  Going back to my DJGPP cross compiler, I thought I’d stick with binutils 2.9.1 and gcc 2.95.3, since they worked so well before.

Plus to flesh it out, you’ll want libc, libg++, and the appropriate Linux includes.  I took all of these from Slackware 3.3 since it’s from around that era.

So on the plus side this cross compiler + library set , will crank out static ELF executables, which makes running things on alien platforms all the better.

On the realistic side, I doubt anyone will need it, but here it is.

Clang didn’t want to build anything this old, but luckily that backported GCC-4.2 has no issues.

OpenWatcom v2

I know what you are thinking, wouldn’t it be great if you could create MS-DOS executables directly from a Win64 desktop with no MS-DOS needed?

Well, I just found out about this unofficial Open Watcom v2 project that targets the usual suspects, allows you to compile from Win64!

Hello World!

Hello World!

Some of the features of this fork include:

  • New 2-phase build system, OW can be build by platform native C/C++ compiler or by itself
  • Code generator properly initialize pointers by DLL symbol addresses
  • DOS version of tools now support long file names (LFN) if appropriate LFN driver is loaded by DOS
  • OW is ported to 64-bit hosts (WIN64, Linux X64)
  • Librarian support X64 CPU object modules and libraries
  • RDOS 32-bit C run-time compact memory model libraries are fixed
  • Resource compiler and Resource editors support WIN64 executables
  • OW text editor is now self containing, it can be used as standalone tool without any requirements for any additional files or configuration
  • Broken C++ compiler pre-compiled header template support is fixed
  • Many C++ compiler crashes are fixed
  • Debugger has no length limit for any used environment variable

Binaries are available on sourceforge.

So how does it fare?  I thought I’d take the old Wolf4GW, and compile it with this toolset.  The first hurdle I hit was this fun feature:

  • The C++ compiler now treats warning W737, implicit conversion of pointers to integral types of same size, as an error.

Which is an integral part of wl_menu.cpp .  So this was somewhat problematic, until I just commented out that block, and while I was expecting no working keyboard, I’m able to play, and load/save games…. Even the boss key works.

Wolf4GW

Wolf4GW

So with the W737 taken care of, I have to say this thing compiles FAST.  Incredibly FAST.  If for some reason you have to build 16bit or 32bit anything, you should look at a 64bit tool chain, well assuming you have a 64bit computer by now.

If anyone want’s to build their own Wolf4GW with the newer OpenWatcom, my source drop is here.

Now this reminds me of “turning the engine off and then back on again at 55 mph.”

the v86-64 patch, Allows you to enter v86 mode from long mode on a 64bit linux kernel.

Basically it works just like an old school DOS Extender, where it’ll switch from long mode, to 32bit compatible mode, then enter v86 mode run some code, then re-enter 32bit mode, to jump back into 64bit long mode.

From an old mailing list:

PERFORMANCE
This 64-bit DOSEMU compile runs substantially slower than the 32-bit compile
that I used previously on this computer.  I have several rather large
PowerBASIC/DOS programs that are, in fact, the main reason why I use DOSEMU.

Up until a couple of days ago, I had Fedora 7/i386 on this computer.  I just
happen to still have the numbers when compiling one of those programs with
PowerBASIC/DOS under DOSEMU:

With F7/i386:  1686600 lines per minute -- total time to compile the program:
0.2 seconds

With F8/x86_64:  230400 lines per minute -- total time to compile the program:
1.6 seconds.

The F8/x86_64 DOSEMU is running approximately 13 times slower.

Which I bet runs a bit faster than an old 386.