Slashdot Mirror


Spacewar! Lives Again

hws writes "A DEC PDP1 emulator running the original version of Spacewar! is online here. A group at MIT created a PDP1 emulator in Java. The original Spacewar! sources were assembled with a PDP1 Assembler written in Pearl. The emulator, assembler and game sources are available at this site. For those of you too young to remember, Spacewar! is probably the first video game and was done back in 1962. It and the scene that spawned it were extensively covered in Steven Levy's book - Hackers."

23 of 143 comments (clear)

  1. Hackers - GREAT! by soulhuntre · · Score: 2

    Hackers is a GREAT book .... a close second is "Soul of a New Machine".

    --
    --> Fight tyranny and repression.... read /. at -1!
  2. Re:The FIRST video game??? by Kukuman · · Score: 3

    Pong was the first VIDEO game, not computer game. Two completely different things. BTW, if you want to play REAL Pong, ask me for Poing. It's an open-source pong clone I made for DOS. Not the greatest, as it is my first C game...

  3. Spacewar also emulated in MESS by catseye · · Score: 3

    The long-neglected (but recently renewed!) MESS emulator, little sister to MAME, also emulates a PDP-1 and Spacewar.

    Executables and source are available for Mac, DOS, Windows and some Unix flavors, I believe.

    Check it out: http://mess.emuverse.com

    -A.

    ---

    --
    What did the walrus say to the penguin? "No soap, radio."
  4. Re:Ahhh! by mjg · · Score: 2

    Are you serious? PEARL is a real language, and is certainly not new. I wish I knew a little more about it myself, but here's something from FOLDOC:

    PEARL

    Process and Experiment Automation Real-Time Language. A real-time language for programming process control systems, widely used in Europe. Size and complexity exceeds Ada. One of five pedagogical languages based on Markov algorithms, used in "Nonpareil, a Machine Level Machine Independent Language for the Study of Semantics".

    I suppose you thought he meant PERL, which didn't turn up until much later (1985 or so?). Give the guy some credit, people do make spelling mistakes, but it's the facts which are important. Maybe you should check yours before criticising next time.

  5. Re:Where was computing in 1962? by Jonas+�berg · · Score: 3

    The PDP1 had a display.. sort of.. It was one of the most interesting things about it compared to the TX-0 that the MIT hackers had used before. It was actually more like a older oscilloscope and I can't imagine that it was very easy to do anything useful with it. Steve Russell apparently apparently spent close to a month getting a tiny dot on the screen that you could move with the controls.

  6. Re:Where was computing in 1962? by Sumocide · · Score: 2

    There were no pixels to control. At the time there existed CRT (cathode ray tube) monitors. But these did not work pixel but vector oriented. That means it can draw lines and shapes. The emulator translates this vector into a pixel display. That's why the ships edges seem to morph a little when it moves. To play this game actually cost a few hundred bucks in processing time back when the PDP-1 was a hot machine. And for the record those guys invented the joystick for the game.

  7. Re:The FIRST video game??? by Pascal+Q.+Porcupine · · Score: 2

    The display was the first computer-based CRT; they took an oscilloscope and hooked up outputs from the PDP11 to, IIRC, a ramp generator which made the oscilloscope act as a vector display. The first joystick was created for this game, as well, to stop the hackers' fingers from getting chewed up on the front panel switches. Read Hackers by Stephen Levy, as others have mentioned.
    ---
    "'Is not a quine' is not a quine" is a quine.

    --
    "'Is not a quine' is not a quine" is a quine.
    Quine "quine?
  8. Re:Where was computing in 1962? by Pascal+Q.+Porcupine · · Score: 3

    Actually, they didn't have text yet. Text was a very advanced display capability yet to be seen. Spacewar's display involved an oscilloscope and a ramp generator. :) (Remember the Vectrex, or the original Star Wars arcade game?)
    ---
    "'Is not a quine' is not a quine" is a quine.

    --
    "'Is not a quine' is not a quine" is a quine.
    Quine "quine?
  9. Re:Anyone remember the DOS version? by Stonehand · · Score: 2

    Oh yes. ;-)

    The version with:

    * thrust/turn L/turn R/reverse-thrust
    for steering, plus hyperspace
    * torps/phasers for firepower, ea. costing
    energy
    * separate, transferrable weapon/energy power?

    and a star w/ a planet orbitting it, perhaps w/
    gravity?

    Mmmmmmm. That was GOOD stuff.

    Hmmm. Wonder if the source for that version is available... the AI opponents were both a little silly to the point that you could beat them firing just once in the game, or sometimes exactly zero times (with the sun/planet on)...

    --
    Only the dead have seen the end of war.
  10. xpilot! by triple6 · · Score: 2

    If you like SpaceWar, then you'll probably love xpilot. Not only is it a multi-player network game, but it comes with most Linux distros. I'm almost always up for a game. :)

  11. Re:Dumbass - So what? by William+Tanksley · · Score: 2

    As for java, the language is cool. The VM stuff is equaly cool, though less refined. It will, in time, prove to be one of the most significant computer things of all time.

    I didn't used to think this, but I have to admit that the language IS cool. It does lack a lot, but oh well -- so does everything except Lisp.

    The VM, on the other hand, is ridiculous. Why did they go and use bytecodes, the single most inefficient and insecure technology out there? Wordcodes would have been faster, smaller, and more secure; abstract syntax trees would have been faster and more secure (smaller in transit, too, but they take more memory to compile than the basic bytecode interpreter).

    An example of AST technology is Juice and ANDF.

  12. I wrote a clone of it - without knowing... by Hanno · · Score: 2

    The basics of Spacewar was featured in Scientific American's GREAT* column "Computer Recreations" years ago.

    While in high school in Germany, I wrote my own version of it that I called "Grav" - using Turbo Pascal 3.0 on old 4.77 MHz Dos PCs, using CGA graphics and "incredible" (eek) sound effects.

    It was quite a hit with school mates and we spent a lot of school breaks competing with each other on it. I also distributed it as freeware, including its (horrible) pascal source code. In those days, you had to order free- and shareware disks through mail order, if anyone cares to remember that...

    Anyway, only later when I had my game finished I found "Spacewar", which (I think) was written in C and had a much better keyboard control code.

    Nevertheless, I liked my own version and still think that Grav did not have to hide from Dos' Spacewar in any way.


    (* I think that this series of wonderful articles actually made me consider studying computer science in the first place.)

    ------------------

    --

    ------------------
    You may like my a cappella music
  13. Re:The FIRST video game??? by Eric+Smith · · Score: 2
    The display was the first computer-based CRT;
    The PDP-1 did NOT have the first "computer-based CRT". Computers had CRT displays in the early 1950s.
  14. Re:The FIRST video game??? by Eric+Smith · · Score: 2
    Pong wasn't really Atari's first video game. A variant of Spacewars was.
    If you're referring to Computer Space, that was NOT an Atari product. But it was the first coin-operated video game.
  15. Re:whine whine whine by TurkishGeek · · Score: 2

    I couldn't agree more. Frankly, I don't believe most of the Java bashers here ever sat down and wrote any application of substance in Java.

    --
    Zigbee Central: A Zigbee weblog
  16. PDP emulation---screw space wars, run V7 UNIX! by Kaz+Kylheku · · Score: 3

    I played with this a couple of years ago. There was (probably still is) a PDP-11 emulator you could download from ftp.dec.com. With the provided disk images, you could run V7 UNIX. I played with it for a while; I was able to log in, wrote a little C program using ed, and then compile and run it. Here, I think I found the link! (ftp://ftp.digital.com/pub/DEC/sim/).

  17. Java by Chris+Johnson · · Score: 2

    I will say this: one, this is a Java emulator of the PDP-1 and not just a game written in Java. It's like a Java version of MAME only for Spacewar.
    I'll also say this: I'm trying it in netscape 4.08, and I know that the Netscape jvm bites. Makes me sorry I stopped using iCab ;)
    That said: ack! I'm running a 300Mhz G3 processor here. I can run Unreal Tournament without it being too much of a slideshow. To have _spacewar_ being unplayably slow and totally unresponsive is just disgusting. Blech! And yet I am delighted to have seen it- I read 'Hackers' too but I'd never seen the actual game. It was worth the hassle to actually see those little shapes and know that this was the game that started it all :)
    I downloaded the class file in hopes of running it on a better JVM sometime. I freaked out when it was only 4,615 bytes, sure that I'd got the wrong file. Then did a doubletake... _wait_ a minute... *grin* *hehehehe* funny what this industry does to your sense of proportion, isn't it?

  18. Wordcodes by William+Tanksley · · Score: 3

    Wordcodes are technically just an extension of bytecodes; instead of being 8 bits long, they're longer. A common length is 16 bits.

    They're faster and smaller because there are so many more possible ones -- the VM can have many more primitives which are more tailored to the job at hand. They're more secure for the same reason; it's possible to design an instruction set which does not have as many illegal combinations of primitives.

    You still need a security manager, of course, but the verifier can be much smaller and quicker.

    Secure in what sense?

    Secure in the sense that a verifier has to watch for much fewer conditions, and is thus simpler to build. Once you've built the verifier, of course, both systems have the same security.

    An example of a wordcoded system is threaded Forth. I don't know whether anyone has made a portable executable format out of wordcodes.

    -Billy

    1. Re:Wordcodes by Eric+Smith · · Score: 2
      I don't buy it. I'm familiar with the internals of FORTH, Java, and the old UCSD P-System. I haven't seen any compelling size advantage to Forth code, which, by the way, does NOT normally use wordcodes, but uses thread pointers which these days are typically 32 bits.

      Just having the code be 16-bits wide neither allows you to have more primitives (which you can do with multi-byte sequences of bytecode), nor does it "not have as many illegal combinations of primitives". Certainly FORTH allows (even in 16-bit implementations) for a huge number of "illegal combinations".

      Furthermore, there is every reason to expect that wordcodes would be larger than bytecodes, since even the most common primitives are forced to use twice as many bits.

      If x-codes were fundamentally better for larger x, don't you think people would have noticed that by now?

      For equivalent security to that provided by Java, wordcodes would still require a wordcode verifier. The verifier does a whole lot more than check for illegal codes. It has to analyze the code and make sure every possible path results in the same stack depth. Wordcodes don't help with this sort of problem.

    2. Re:Wordcodes by William+Tanksley · · Score: 2

      I haven't seen any compelling size advantage to Forth code, which, by the way, does NOT normally use wordcodes, but uses thread pointers which these days are typically 32 bits.

      I have. It's one of the things that just about every Forth programmer touts as the Great Thing about Forth. And yes, I know that most modern Forths use 32-bit cells; in fact, many modern Forths are switching to call threading rather than token threading, because it allows for inlined optimization. This is often an easy choice, because a call for many processors takes up 32 bits anyhow.

      Just having the code be 16-bits wide neither allows you to have more primitives (which you can do with multi-byte sequences of bytecode),

      At a serious cost in speed.

      nor does it "not have as many illegal combinations of primitives". Certainly FORTH allows (even in 16-bit implementations) for a huge number of "illegal combinations".

      You're ignoring what I said -- I said that it's possible to design an instruction set which does not have as many illegal combinations of primitives. I didn't say that Forth was it -- of course not. Forth was designed for totally different purposes -- security doesn't even show up on the list.

      Furthermore, there is every reason to expect that wordcodes would be larger than bytecodes, since even the most common primitives are forced to use twice as many bits.

      That's obvious. What's not obvious is that since there are many more wordcodes, the most common sequences of bytecodes can be encoded in a single, preoptimised, wordcode. This is also how a certain amount of increased security is possible.

      If x-codes were fundamentally better for larger x, don't you think people would have noticed that by now?

      Why do you think they haven't? I'm not sharing qabbalistic secrets here. Optimising wordcodes is a new science; using them is old.

      For equivalent security to that provided by Java, wordcodes would still require a wordcode verifier. The verifier does a whole lot more than check for illegal codes. It has to analyze the code and make sure every possible path results in the same stack depth. Wordcodes don't help with this sort of problem.

      Of course. You're absolutely right. All I claimed is that the analysis was less complex. I admit that not only did I not give numbers, though, I don't even HAVE any. To the best of my knowledge, nobody's ever written a security-critical system using wordcodes -- but then Java's the only bytecode-based system I know of.

      My preference is to use neither -- I like abstract syntax trees.

      -Billy

  19. Re:Anyone remember the DOS version? by CrayDrygu · · Score: 2
    I remember playing a version of this for DOS quite some time ago...

    Yeah, I remember that =) One of the few games I had for my old IBM XT. Great little computer... I think it had DOS version 2.something... I even had a version of Microsoft Works for it. I think it was the best version of MS works I've ever used, too ;)

    --

    --
    "I personal[ly] think Unix is "superior" because on LSD it tastes like Blue." -- jbarnett

  20. Re:Where was computing in 1962? by w3woody · · Score: 2

    No text; just three D to A converters controlling the horizontal, vertical and intensity of an oscilloscope. Quite elegant, really.

    I once dismantled an Atari Asteroids machine to see how it worked (I wish I kept it, damn it!), and it did more or less the same thing. The only thing it had that I suspect the Digital PDP didn't was specialized circuitry which controlled the horizontal and vertical using a simple "stepping" state machine. That is, you would program the start point of the electron gun as (x,y) in two registers, and a counter "stepper" in two registers. A counter would increment, and as it hit the values in the stepper registers, it would either increment or decrement the (x,y) value, changing the value of the electron gun. It was a fairly primitive mechanism for doing line drawings on the display, offloading that task from the 6502 processor that powered the machine. Quite clever, really.

    Of course this is all from memory; I've long lost the schematics and the video game motherboard. Makes me long for the days when I used to do embedded code...

  21. Does anyone know where I could get any of these? by jd · · Score: 2

    I -love- old-time classics, and would love it if someone could point me to sites that have the sources (or ports or clones) for any. I'm mostly interested in PET games, but Apple I & Apple II games are of interest, too, and I wouldn't say no to any pointers to games for yet older machines.

    --
    It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)