KLH10 (PDP-10 emulator) on the Sharp Zaurus (and iPAQ hx4700)
This is a port of Ken Harrenstien's KLH10 PDP-10 emulator, to ARM EABI.
I compiled it under Angstrom 2007.12-r19 on a Sharp Zaurus SL-C860, and also ran it on an HP/Compaq iPAQ hx4700:
lex@hx4700:~/klh10$ cat /etc/angstrom-version
Angstrom 2009.X-test-20090526
Built from branch: stable/2009
Revision: ea3ee6d324986ee60435e6bc0673f661f8aed9f9
This may work on other ARM EABI architectures.
Patches
Of the patches, I found the gcc-4.1 patch for kn10ops.c on
a list
and edited cenv.h myself, after getting build errors
(the cenv.h #define conflicted with a definition in my system include files). Warning: this may not have been a good thing to do, and I thought that it might affect file operations. So far though, everything's fine and the only issues that I have found were due to my inexperience with the TOPS-20 OS. I used the
Panda Distribution and needed to make a few changes to the configuration:
disable the idler to stop a hang on bootup.
For the hx4700, the NI20 device configuration was straightforward - see the
package install.txt document for configuration instructions. Here is my klt20.ini for the hx4700; the klt20.ini for the
Zaurus is similar, except that the ni20 IP address and hostnames are different.
Performance? Pretty good. It's not hugely fast on either system, but it is
usable and you can't beat the 'street-cred factor' of being able to carry an
entire PDP-10 system in your pocket [note to self: not your back pocket].
Here's the error that I needed to apply the cenv.h patch for:
In file included from ../../src/wfio.c:138:
./../src/cenv.h:270:29: warning: missing whitespace after the macro name
In file included from /usr/include/stdio.h:28,
from ../../src/wfio.c:140:
/usr/include/features.h:249:34: error: token "=" is not valid in preprocessor expressions
I think that this is caused by the preprocessor substituting a macro, when it
shouldn't. Lines 249-251 of /usr/include/features.h are:
#if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS == 64
# define __USE_FILE_OFFSET64 1
#endif
I haven't been able to fix this because I don't know what I'm dealing with
(I'm fairly new to C programming). Should that '#<space>define' be replaced
with '#define' (i.e. it doesn't like the space?).. (shrug)
Links
DEC PDP-10 Emulation
Panda Programming TOPS-20 Home Page
TOPS-20 Notebook Set
Public-access TWENEX system
Binaries
-rw-r--r-- 1 lex lex 277563 2011-01-06 03:40 klh10-2.0h-arm.tar.gz
KLH10 source code
-rw-r--r-- 1 lex lex 2486721 2011-01-06 03:35 klh10-2.0h.tar.gz
Edited command history
-rw-r--r-- 1 lex lex 1923 2011-01-05 10:16 history.txt
Patches
-rw-r--r-- 1 lex lex 840 2011-01-06 03:30 cenv.h.patch
-rw-r--r-- 1 lex lex 301 2011-01-06 03:31 kn10ops.c.patch
MD5SUMs
a46508377d1bcf6c7aef6e461cc03b2d ./dist/klh10-2.0h.tar.gz
6403bfcfbabcf4665236e8168ab4a827 ./dist/klh10-2.0h-arm.tar.gz
46101b21d38031c998c3858b631ba56c ./history.txt
c803c8757233e0d932fc48b79b31b90c ./cenv.h.patch
e155f1617649900468f0162c754a0e87 ./kn10ops.c.patch
Never-Asked Questions ('NAQ')
- Q: Why would you want to turn an old computer into an even-older computer?
- A: Because it's cool and because PDP-10s are a venerable computing platform that I aspired to use, when I was a child (the 70s and early 80s).
(Translation: as the Internet grew and I became aware of packet-switching
systems, I'd call up random computers and try to familiarise myself with the
environment. Since I was usually standing in a freezing telephone booth at
1 a.m., it wasn't easy to read what the blurred, dim LCD display of the
Tandy 102 was showing before it was whisked off the screen and replaced by
something else blurry and gray)
- Q: What's a PDP-10?
- A: Digital Equipment Corporation's PDP-10 is one in a series of
minicomputers, produced in the 60s, 70s, 80s and possibly 90s. See the
Wikipedia article.
They call it a 'mainframe', but I call it a 'minicomputer'. Bleh.
What used to fill an air-conditioned room can now fit into a device
that you'd typically lose down the back of a sofa.
- Q: Huh! My iPhone can do more than that, even when switched off!
What's the point of this waste of time?
- A: iPhone... foot... apply pressure. What good is it now?
(you might gather that I am not a fan of Apple's products, although I do
have an old iMac that I like to run Debian on).
- Q: Have you got any more pictures of this project?
- A: Yes, but they aren't very good. Here.
- Q: What's the book shown in that picture?
- A: William Gibson's 'Zero History' (I am reading the hardcover version).
- Q: How
canmay I contact you?
- A: Please see the contact page.
Return to the Zaurus Projects page
Return to the projects page
Return to the site index page