MacHack under PDP-10 emulation

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

IanO
Posts: 496
Joined: Wed Mar 08, 2006 9:45 pm
Location: Portland, OR

MacHack under PDP-10 emulation

Post by IanO »

MacHack is perhaps the oldest program still runnable under emulation. I have heard reports of folks having run this using the simh PDP-10 emulator, but I haven't figured out how to do it. Has anyone here had any experience with it?

Here are some links to help get you started.

Simh emulator suite. It is also available as the "simh" package in many distributions. Once installed, the executable is named "simh-pdp10". If documentation is not installed, there are PDF user manuals for simh and simh-pdp10. You can also type "help" at the simh prompt.

PDP-10 archives. There are two archives containing MacHack, search the page for "DECUS 10-LIB-1" (CHESS.HOW and CHESS.SAV) and "DECUS 20-LIB-2" (decus:chess.exe.1 and decus:chess.how.1) Other archives contain the TOPS-10 and TOPS-20 operating systems, but it is unclear whether MacHack requires any operating system services.

You can view and download individual files from the archives, like CHESS.HOW. Simh implies that you can load individual SAV files at the prompt ("load chess.sav"), but this only gives me format errors. I also have not figured out how to extract files from or load the .tap archives from within the emulator.

I hope this is of interest to any historians here. Let us know if you get any better results.
IanO
Posts: 496
Joined: Wed Mar 08, 2006 9:45 pm
Location: Portland, OR

Re: MacHack under PDP-10 emulation

Post by IanO »

A little more internet research unearthed a thread in alt.sys.pdp10 from 2005, in which Mark Crispin, a staff member at UofW, admits to having source to both TECH II and MacHack, as well as experience running them under emulators. I don't suppose anyone here knows him at all? (Sadly, the thread poster rubbed him the wrong way and got nothing.)

P.S. A post in that thread claims that chess.exe mentioned above is just a copy of chess.sav saved from within the TOPS-20 system, but otherwise identical.
IanO
Posts: 496
Joined: Wed Mar 08, 2006 9:45 pm
Location: Portland, OR

Re: MacHack under PDP-10 emulation

Post by IanO »

Got it all working after downloading some premade disk images. Quite a novelty to play a program older than me! Not bad play for such a selective program.

Code: Select all

_pg

1  P/K2-K4       P/K2-K4
2  P/KB2-KB4     P/K4*P/KB5
3  N/KN1-KB3     P/Q2-Q3
4  B/KB1-QB4     P/KR2-KR3
5  P/Q2-Q4       P/KN2-KN4
6  P/KR2-KR4     P/KN4-KN5
7  N/KB3-KN1     Q/Q1-KB3
8  N/KN1-K2      P/KB5-KB6
9  P/KN2*P/KB3   Q/KB3*P/KB6
10 R/KR1-KB1     Q/KB6*P/K5
11 B/QB4*P/KB7   K/K1-Q1
12 N/QN1-QB3     Q/K5-K2
13 P/KR4-KR5     P/KN5-KN6
14 N/QB3-Q5      Q/K2-KR5
15 B/QB1-KB4     P/KN6-KN7
16 R/KB1-KB2     P/QB2-QB3
17 N/Q5-K3       Q/KR5-KR8
18 K/K1-Q2       Q/KR8-KR6
19 R/KB2*P/KN2   N/KN1-KB3
20 Q/Q1-KR1      R/KR1-KR2
21 B/KB7-KN6     R/KR2-KR1
22 R/KN2-KR2     Q/KR6-K3
23 N/K2-KN3      N/KB3-KN5
24 R/KR2-K2      N/KN5*N/K6
25 R/K2*N/K3     Q/K3-KB3
26 Q/KR1-K4      B/KB1-KN2
27 P/QB2-QB3     P/Q3-Q4
28 Q/K4-KB3      R/KR1-KB1
29 R/QR1-KB1     B/QB1-KR6
30 R/KB1-KB2     N/QN1-Q2
31 Q/KB3-K2      K/Q1-QB1
32 B/KN6-KB5     B/KR6*B/KB4
33 N/KN3*B/KB5   P/QR2-QR3
34 R/K3-K8       R/KB1*R/K1
35 Q/K2*R/K8     Q/KB3-Q1
36 N/KB5-K7      
_
bd
-- ** -- ** -- ** -- ** 
** -- WR -- WK -- WP WP 
-- ** -- ** -- WP -- ** 
** -- WB -- WP -- ** -- 
WP ** -- ** BP ** -- ** 
BP -- ** -- ** BP ** BP 
-- BB -- WN BN ** BP ** 
** -- ** WQ BQ BK ** BR 
_
(Board is shown with black (MacHack) at the bottom, probably because this interface was used to play in tournaments against humans.)

Instructions in the next post.

P.S. The Mark Crispin mentioned earlier is the inventor of IMAP, and one of the worlds premier pdp10 hackers!
yl84
Posts: 21
Joined: Tue Sep 07, 2010 6:37 pm

Re: MacHack under PDP-10 emulation

Post by yl84 »

Hi Ian,
seems really interesting. One question I have is "how to be sure it is the real original MacHack"? Maybe one possibility could be to replay one of a well known historical game. This could be a real test if the programme does not depends on the computer clock. Otherwise it should be possible to simulate the slow processor speed of the past (?).
Yves
IanO
Posts: 496
Joined: Wed Mar 08, 2006 9:45 pm
Location: Portland, OR

Re: MacHack under PDP-10 emulation (HOWTO)

Post by IanO »

How to run MacHack.

Get the simh-pdp10 simulator mentioned in the previous post.

Get the "DECUS 10-LIB-1" archive mentioned in the previous post. Unbzipping will give you the file "decuslib10-01.tap". This is a 7-track tape file.

Get prebuilt disk images for a TOPS-10 7.03 installation. I found some made by Bill Schaub, though they are rather larger than necessary. This will contain disk images named "dskb.dsk" and "dskc.dsk". Put them in the same directory as the tape archive mentioned above.

Follow the instructions in the included readme.txt to attach the disk devices and boot the premade system. In these transcripts, the emulator prompt is "sim> ", the bootloader prompt is "BOOT>" (just hit enter when indicated, and the first typing of "shced" is just a typo and can be omitted), the TOPS-10 prompt is a period ".", and the MacHack prompt is "_". Other programs have different prompts. Tab-completion is allowed at most prompts, as is the "help" command.

Now follow these instructions posted by Mark Hittinger in 2005 in alt.sys.pdp10 to attach the tape archive and extract chess.sav. You only need to do this once, the restored chess files are written to the persistent disk images. Once installed, you can immediately type "r chess". You can confirm that by typing "dir" to get a directory listing.
Mark Hittinger wrote:I have this running on my simh. Since the simulators we are running are much faster than the old KL10's we can set the search depth way up!

So you'd grab decuslib10-01.tap.bz2 and bunzip2 it to make a .tap file. Then you'd use the console commands to connect that .tap file to your tape drive.

[First, type ^E (control-E) to escape from your running TOPS-10 to the emulator.]

In simh:

sim> at tu0 decuslib10-01.tap
sim> continue

.R BACKUP
/TAPE MTA
/INTERCHANGE
/FILES
/REWIND
/RESTORE *.*=MTA0:CHESS.*

! CHESS HOW
CHESS SAV

"Done

/EXIT

.RUN CHESS.SAV

_pb
_p-k4
_B P/K2-K4
_bd
If for some reason the "/TAPE MTA" command above fails, it may be because the TOPS tape handling Galaxy subsystem took control of that device. To take it back, log out, log back in as the operator, use the OPS program to unassign the device (type control-Z for an empty notification message), then log back into the public account and try again.

Code: Select all

.kjob

boot> login 1,2

.r opr

OPR>set tape-drive mta0 unavailable
Enter text and terminate with ^Z
^Z
OPR>exit

.kjob

boot> login public
Instructions for running MacHack are in CHESS.HOW linked in the previous post. You use ^C to exit MacHack, ^E to get back to the emulator, and "exit" to quit the emulator.

I hope this of interest to any software and chess historians out there!

Ian

P.S. One match I am curious about: Ken Thompson included his simple chess program in early Unix distributions. I wonder which was stronger?)
IanO
Posts: 496
Joined: Wed Mar 08, 2006 9:45 pm
Location: Portland, OR

Re: MacHack under PDP-10 emulation

Post by IanO »

yl84 wrote:Hi Ian,
seems really interesting. One question I have is "how to be sure it is the real original MacHack"? Maybe one possibility could be to replay one of a well known historical game. This could be a real test if the programme does not depends on the computer clock. Otherwise it should be possible to simulate the slow processor speed of the past (?).
Yves
This version is simply the one that was released to the public, probably a few years after its last public competition. The file date is 9-Jun-1970 (just a few months into the Unix epoch!)

I doubt you would be able to recreate any games, because Richard Greenblatt was constantly tweaking MacHack during its entire tournament career. Also, instead of time controls, the operator could adjust depth and each ply's selectivity between moves to control thinking time. I don't think such settings were logged anywhere.

I've also heard that this particular binary had been hand tweaked in DDT several times after release to retain compatibility with various OS and device upgrades. (Tweaking binaries was a much more common practice in those days.)

There is a lot more discussion about the provenance of MacHack in those alt.sys.pdp10 threads I linked to earlier.
Max
Posts: 247
Joined: Tue Apr 13, 2010 10:41 am

Re: MacHack under PDP-10 emulation

Post by Max »

Hi Ian,

thanks for your great guide! Without any problem I managed to compile simh on my MacBook and playing there with MacHack. 8-) Bringing back some 36-bit memories. :D

After setting search depth to 8, MacHack terminated to TOPS-10 with an error message while calculating the second move. If you are running Windows or Linux could you please verify this issue? Just to be sure that nothing went wrong with my simh compile.

Code: Select all

.run chess.sav

_setd 8
_setw 15 15 9 9 7 7 5 5
_setd=
8
_setw= 
15 15 9 9 7 7 5
_ps
_
W P/K2-K4
B P/K2-K4
W N/KN1-KB3
B N/KN1-KB3
W P/Q2-Q4
B N/KB3*P/K5
W B/KB1-Q3
B P/Q2-Q4
W N/KB3*P/K5
B B/QB1-K3
W O-O
B N/QN1-Q2
W N/K5*N/Q7
B Q/Q1*N/Q2		     <-- last bookmove
W R/KB1-K1
?
?Push down list overflow at user PC 000000

.
Thanks,
Max
larsbrinkhoff
Posts: 4
Joined: Tue Aug 25, 2020 12:38 pm
Full name: Lars Brinkhoff

Re: MacHack under PDP-10 emulation

Post by larsbrinkhoff »

Hello,

The GitHub ITS repository has MacHack VI in two versions: one with a chessboard on the 340 vector display, and another displaying on a Knight TV raster display. There is also Tech II.

http://github.com/PDP-10/its

Some instructions here:
https://github.com/PDP-10/its/blob/mast ... ac-hack-vi
jdart
Posts: 4366
Joined: Fri Mar 10, 2006 5:23 am
Location: http://www.arasanchess.org

Re: MacHack under PDP-10 emulation

Post by jdart »

I remember using a PDP-10 at Caltech in the 1970's. I think it was the first time-sharing system they had. At the time I wasn't into computer chess and wasn't aware of McHack, but SpaceWar and Star Trek games were very popular on that system. There is actually a source repository for SpaceWar (https://github.com/historicalsource/Spacewar). These had ASCII text graphics (real graphics terminals were very scarce and expensive at the time). Most of the terminals were actually TTYs.

I mostly played Star Trek. You'd be limping to a base, low on fuel, and then you'd get the message "Enterprise caught in long-range tractor beam!" and you'd be pulled into a quadrant full of Klingons. If you lost, you got the message "The Enterprise has been destroyed. The Federation will be conquered."

--Jon
larsbrinkhoff
Posts: 4
Joined: Tue Aug 25, 2020 12:38 pm
Full name: Lars Brinkhoff

Re: MacHack under PDP-10 emulation

Post by larsbrinkhoff »

jdart wrote: Mon Sep 07, 2020 4:12 pmSpaceWar and Star Trek games were very popular on that system. There is actually a source repository for SpaceWar (https://github.com/historicalsource/Spacewar). These had ASCII text graphics (real graphics terminals were very scarce and expensive at the time).
Interesting, did Caltech have a text version of Spacewar? The ones I know about used vector CRT displays.