Friday, 6 July 2012

The only winning move is...

Taking a break from a playing directly with retro-hardware, last night I watched wargames and took a few notes on the interaction with the WOPR computer.

The result, lovingly crafted into a simple shell script was connected up to the telnet port in inetd whereupon three issues immediately sprung up
  1. Since there is no local telnetd, the script gets to see the initial IAC command codes (called for a little sed hackery)
  2. Calling 'system("sleep 0.1") from awk on an amd64 box sleeps for about 1/10 of a second. On a VAX... its more like 1/5 a second with overhead. Cue writing a small C program to handle outputting the text
  3. I'm pretty sure TCP Nagle is kicking in and making the output blocky, but its late & I'll come back to that
Anyway - the result should be visible by "telnet" (If your client tries SRA login you may need "telnet -K"). It turns out there was quite a lot of interaction with WOPR in the film. I suspect I have about 60-75% of it complete (mainly towards the start), and I've tried to be relatively generous in what it accepts (checking for a matching key word rather than an entire sentence).

So, how much do you remember from Lightman's typed conversations with WOPR? telnet to and test your memory :)

(In other news I upgraded the Dreamcast to NetBSD-6, which went fine apart from the fact I'd forgotten the kernel had been set to prompt for a root device, which meant my decision to run a final reboot *after* leaving the office was... unhelpful)

No comments:

Post a Comment