Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login
Port of SGI ElectroPaint screensaver made via decompilation (github.com) similar stories update story
90 points by QqQqQqQqQ | karma 79 | avg karma 79.0 2014-05-05 11:55:24 | hide | past | favorite | 44 comments



view as:

Fanatical work; thanks for releasing the decompiler as well.

Video of this port in action, for those who can't run it: https://www.youtube.com/watch?v=WY71C8AMCfI

The one and only screen saver with a fanatical following.

Honestly curious - I've read, watched and scratched my head. Why the cult? Its nice, and certainly more so for its time, but still - maybe I'm just more the flying toasters guy? Also: I summon JWZ for a history lecture.

I would not say it's the only one, Johnny Castaway is an old favorite of mine and others:

https://www.youtube.com/watch?v=hVgGfKY91Lg


Johnny Castaway was amazing. Very fond memories.


I'm going to chime in with the awesome "Voodoo Lights" screensaver (which I purchased back in the day) http://www.soulreaver.freeserve.co.uk/voodoo.html

I should dig up the registration info and see if it still runs in modern Windows...


Afterdark is still my absolute favourite. I believe it had/has a cult following in the Mac community that is probably larger than the Irix community.

Happy to see this, I remember the IRIX version fondly.

The "StonerView" module of XScreenSaver is based on ElectroPaint. If you don't care about absolute fidelity, it will be easier to get running on Linux or OS X than this port.

Unfortunately I think describing the situation as merely 'fidelity' is a bit misleading. There's other ep clones out there, but they're all lacking the set of animation routines the original had and so none of them really look like the original other than that they all have color-shifting polys zipping around. For an abstract art piece, this is rather important, hence the absurd effort spent on decompiling an 80s screensaver.

Totally agree.

Not quite the same. Ep had an animation sequencer built in, as well as a script recorder. There was also a GUI for fiddling with various rotations, color changes etc. You were able to record everything into a script and play it back using the sequencer.

(The default sequencer script of this port is in src/ep.c, under "static char *defaultScript")


The author claims this is the "original":

> ElectroPortis is a Windows version of ElectroPaint, the only screensaver. This is the real deal. It is not a clone, nor a reimplementation, nor a product of manual reverse engineering. It was made by running the original binary through a custom MIPS to C decompiler.

but later, says that it's the OpenGL version and links to these words:

> During my time at SGI I rewrote Electropaint to use OpenGL instead of IrisGL and it wasn't quite the same afterwards (I removed the control UI since the panels toolkit wasn't making the journey and I must have broken the random seed...).

Wouldn't be such a pedant normally, but if you're going to make such a fuss about it being the "original," don't contradict yourself on the same page...


I'm reasonably certain that the drawing routines are the same, apart from the translation to OpenGL. The author of the OpenGL translation showed up in this thread, actually: https://news.ycombinator.com/item?id=7700340

Massive +1 for this, I am an 'IRIX refugee' living in Linux-land and I miss the sheer class that went with everything SGI. I am so pleased there are some people out there making sure the memory lives on.

I would personally quite like the 'cpueater' desktop back, with some giant SGI logo rotating around in the corner of my desktop. I know everything is supposed to be better these days, but I don't feel it is. So much of the IRIX desktop - including the screen savers - could do with being rediscovered. I liked things like those little scroll wheels to zoom up the icons in a folder. The icon animations were pretty cool too, they had a language of their own so you knew if something was open or running from the icon state.

Thinking about it, when IRIX died, Linux was just a little bit lame on the look and feel aspect. Imagine how cool it would have been if the picks of IRIX were ported to Linux to deliver a decent desktop. SGI could have done that but they went with NT. Had they gone the Linux direction they could have brought the 3D content tool makers over to it and they could have created something useful for programmer types. But it all went babies and bath water.

P.S. Is Google Docs still down?


What I liked most about IRIX is that everything was so incredibly snappy for the time.

And the internet was still cool.

"I know everything is supposed to be better these days, but I don't feel it is."

Singular focus and commitment to an idea is magical. SGIs were magical.


This... This right here is a true damn story.

Back at university in the early 90s, I worked on a driving simulator made up of a Rover 216GTi in front of a projector screen powered by a SGI Onyx. One evening we just sat in the car, put some Floyd or something on the stereo and just watched ep for an hour. Happy days.

The spinning floating brightly colored polygons is reminding me of a game, whose name escapes me. I think the soundtrack was ambient, based on your movements. I should look for that.

I'm betting you are thinking of Rez.

http://en.wikipedia.org/wiki/Rez


No, though Rez is awesome. This was a PC game, with the polygons in columns, and if you entered the columns, you'd float along. You'd have to jump from one to the next, in mid-air.

If you figure it out, let me know.

In a sibling reply, teraflop got it: it's "tranquility." The original site's down, and I haven't tried the old binaries yet. Here's a video: http://youtu.be/EbLhw_zJiFo

Awesome, thanks!


Ooh, I think that's it! The screenshots aren't loading for me, though. Thanks!

Edit: I checked Youtube, and you're definitely right. Thank you! Here's the video - http://youtu.be/EbLhw_zJiFo - if you liked Electropaint you may like this.


This is awesome! I rewrote EP to use OpenGL (instead of IrisGL) while at SGI, though in retrospect I wish I'd just made it link against Igloo (SGI's IrisGL-on-OpenGL wrapper library). We were moving to supporting commodity graphics (i.e.: not an SGI graphics chip) in IRIX at the time, and I ported a bunch of the IRIX desktop tools over. Electropaint was definitely the most complex IrisGL app that I ported as part of that...

It's super weird that this port is a Windows app, though!


I'm glad you like it! I'm sorry that it's Windows-only; I would like to make it available for more OSes, but the pointer size issue is a real impediment, and Windows is least likely to be throwing away 32-bit support any time soon, so...

A WebGL or GLES version would be great, but I actually don't know much at all about graphics!

By the way, as far as I can tell, I don't think you broke anything in your port. The disassembly of the OpenGL version's drawing routines looks like a pretty direct translation of the routines from the ep source that comes with IGL. The random seed initialization is the same in both, too:

  srand(0);
  srand(time(NULL));

I was hoping this would be cleaned-up code based on the decompiled original (like how ScummVM and OpenTTD started) but

  var_10 = s1.u64;
  ARGS->f13.s = f22.s;
  var_B8 = ra.u64;
  {
    ARGS->f14.s = f22.s;
    wrap_glColor3f((float) ARGS->f12.s, (float) ARGS->f13.s, (float) ARGS->f14.s, wincount);
  }
Nope. Furthermore, I don't understand the license on that core file (ep.c). Are we free to improve it and recover cleaner code?

Hi, I'm the guy that wrote the decompiled version. I forgot to ask David Tristram whether he wanted a specific license applied to the ep part of what I released beyond the text for which he asked. The version of ep in the IGL distribution is under the GPL, but I've sent an email to him for clarification. I'll update the license file once I get a reply.

Very impressive! I just left a bug report with instructions to get it working with VC2013 Express.

How does your technique in epanos compare to https://github.com/notaz/ia32rtools used to decompile Starcraft so it could be ported to ARM?

If you do get around to it, I'd love to see a Linux version. Even a 32-bit only version would be sweet. I've had great success with the ia32-libs getting 32-bit apps to run on 64-bit OS's.


Thanks! I'll fix it ASAP.

I saw ia32rtools when it was released (and was impressed, since x86 is so much more difficult than MIPS), but I haven't had a good chance to really look over how it works. But I think his approach is roughly the same in spirit--the translation from disassembly to C is pretty direct. His tool has to track the stack, set flags for instructions that change them, and other things like that; my decompiler doesn't bother with the stack at all (the ElectroPaint binary has no functions that spill arguments to stack and never adjusts the stack pointer within a function), and MIPS doesn't have "flags" (ALU comparison results are just stored in a GPR, though floating point comparisons do have a flag--I think later MIPS versions have multiple condition FPU registers though). Both tools handle variable argument functions, and of course in order to do so you have to have special handling of each function--that's why my decompiler has an entire parser just for printf and scanf...fortunately the only variable argument functions used by ep. :)

I don't know if or when I'll have time for a Linux version, but I would love to see it made available for all OSes. I just know I can't personally commit to properly maintaining it for more than one platform for the time being, mostly because of the 64-bit issue more than anything...


That's some serious effort in duplicating the effect. All I can do is to chime in on trying to mimic the effect. I however ended up with looking at it and trying to come up with what it did so it's probably not a completely true representation http://www.plane9.com/scenes/eagi15iz/electro. Then I tried to extend on the original effect. Mainly by simply adding blending and glow. The result can be seen in http://www.plane9.com/scenes/vrwwq5sg/wild-color

Very cool, makes me want to fire up my old SGI O2 :)

Me too buddy. I fear it and my ol' Octane were both casualties of a house move a couple of years ago, but I've decided to at least go looking through storage to see if I can find 'em. If nothing else, they are probably still fine personal servers – although the electric bill might not be worth it. :o)

The original source code for Electropaint was released a few years ago: http://freeweb.siol.net/matevzb2/igl.html

That source is very old and lacks the animation scripts that have made ep famous, as I described in the README. (In fact, there have been a number of different animation scripts over the years; I've been in contact with the author of the software you linked, and he was nice enough to provide some, though I haven't yet tried them in the version I decompiled.)

Just in case anyone is still reading this--I failed to point this out better (or rather, GitHub fails to make it clear that you can even provide them), but there's a prebuilt binary here: https://github.com/drvink/electroportis/releases

Enjoy!


Legal | privacy