Here's an exclusive video of the classic Star Wars arcade running on an oscilloscope thanks to a sound card and a specially patched version of MAME. We talked with James Brown—the author of this hack, not the Godfather of Soul—about how he did it and the possibilities for his hack. Among them: connect it to a real laser cannon. Full interview and details after the jump.Jesus Diaz: Stunning hack, James. First question: can you run Asteroids on this? James Brown: It should run any of the vector games that MAME handles. I've only tried it with Star Wars and Asteroids though. I have a poor quality video of Asteroids running on it:
JD: Did it require patching the MAME source? JB: It did involve patching MAME —in fact that's all it requires. I modified MAME's vector rendering code so that instead of rasterizing the image for display on a conventional monitor, it does pretty much what the original hardware was doing.
Since there's no input on the scope for varying the brightness of the beam, I vary the speed of it to produce the same effect. The scanning signal is output using the soundcard, and the scope connected to the left and right channels in XY mode.
JD: Amazing. So how much time did it take you to do this? JB: It took a couple of hours to get it up and running.
JD: Is electronics related to your profession or just a hobby? JB: I work for Lumen Digital creating interactive exhibits. It's mostly software, but I do a little hardware prototyping too. This hack didn't involve any electronics; I just happened to have a scope lying around and wanted to play with it.
Lumen Digital Show Reel
JD: It's hard to believe that no special electronics are needed for a dumbass like me. JB: Well, there's not much to say on the project technically. It uses no special hardware—just an oscilloscope connected to the sound card line out.
Early '80s vector games don't have a huge amount of detail in them—in game, Star Wars is generally using fewer than 1,000 lines (including repositioning the beam and drawing the starfield). This is easily achievable within the audio bandwidth.
There's no direct control over beam intensity on my oscilloscope, so instead I vary the speed of the beam. If you turn the brightness right up on the scope, you can see the beam moving from one line to another. To play the game, you turn down the brightness so that only the slowly drawn lines are visible.
JD: So only a soundcard is needed... JB: Soundcards output an AC signal—any DC component gets cancelled out. What this means when controlling a vector display is that if you have a lot of lines on the left side of the screen, the display will drift to the right to keep it centred. To get around this, the code tracks where the beam is spending its time during each frame, and then draws little dots at the corners of the display to make it balance. You can see these dots flickering on and off in the video as the action changes on screen.
JD: Are you planning to release the patched code back to the community? JB: It's tempting to make the code available, but there's a big difference between a quick proof-of-concept hack, and clean code that can be rolled into MAME and that has a reasonable chance of running on anybody else's hardware. If there's enough interest I'll probably do it, but there's not too many people with access to an oscilloscope.
JD: Yeah, well, but I have a friend who has a friend with a laser cannon... imagine Star Wars on an entire building... JB: Yeah, I too want to run it on a laser projector. I built an XY scanner using a couple of speakers with mirrors on them, but it didn't have the frequency response to display a game. I suspect it can't be done without closed-loop feedback.
JD: Well, hopefully someone will drop a package with one for you to play. Thank you very much for your time, James. And again, amazing work. JB: Thank you!
[Star Wars disco-sci-fi theme by legendary group The Bordens]