News for hackers. Stuff that matters.
Re:Port of SGI ElectroPaint screensaver made via decompilation by Theodores on Monday May 05, 2014 @02:08PM (#7700099)
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?

Re:Port of SGI ElectroPaint screensaver made via decompilation by gdubs on Monday May 05, 2014 @04:09PM (#7700872)
"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.

Re:Port of SGI ElectroPaint screensaver made via decompilation by mstade on Monday May 05, 2014 @05:54PM (#7701522)
This... This right here is a true damn story.
Re:Port of SGI ElectroPaint screensaver made via decompilation by jacquesm on Monday May 05, 2014 @02:18PM (#7700148)
What I liked most about IRIX is that everything was so incredibly snappy for the time.
Re:Port of SGI ElectroPaint screensaver made via decompilation by mstade on Monday May 05, 2014 @05:57PM (#7701538)
And the internet was still cool.
Re:Port of SGI ElectroPaint screensaver made via decompilation by i_am_ralpht on Monday May 05, 2014 @02:49PM (#7700340)
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!

Re:Port of SGI ElectroPaint screensaver made via decompilation by drvink on Monday May 05, 2014 @06:04PM (#7701584)
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));
Re:Port of SGI ElectroPaint screensaver made via decompilation by neverm0re on Monday May 05, 2014 @01:06PM (#7699672)
Video of this port in action, for those who can't run it: https://www.youtube.com/watch?v=WY71C8AMCfI
Re:Port of SGI ElectroPaint screensaver made via decompilation by shimfish on Monday May 05, 2014 @02:31PM (#7700225)
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.
Re:Port of SGI ElectroPaint screensaver made via decompilation by AceJohnny2 on Monday May 05, 2014 @03:12PM (#7700499)
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?
Re:Port of SGI ElectroPaint screensaver made via decompilation by drvink on Monday May 05, 2014 @05:58PM (#7701545)
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.
Re:Port of SGI ElectroPaint screensaver made via decompilation by slacka on Tuesday May 06, 2014 @02:18AM (#7703067)
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.

Re:Port of SGI ElectroPaint screensaver made via decompilation by drvink on Wednesday May 07, 2014 @07:40AM (#7709613)
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...

Re:Port of SGI ElectroPaint screensaver made via decompilation by Xetick on Monday May 05, 2014 @03:30PM (#7700614)
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
Re:Port of SGI ElectroPaint screensaver made via decompilation by defiler101 on Monday May 05, 2014 @01:06PM (#7699663)
Fanatical work; thanks for releasing the decompiler as well.
Re:Port of SGI ElectroPaint screensaver made via decompilation by bitlord_219 on Monday May 05, 2014 @02:04PM (#7700074)
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...

Re:Port of SGI ElectroPaint screensaver made via decompilation by drvink on Monday May 05, 2014 @06:11PM (#7701622)
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
Re:Port of SGI ElectroPaint screensaver made via decompilation by brohee on Monday May 05, 2014 @01:07PM (#7699682)
The one and only screen saver with a fanatical following.
Re:Port of SGI ElectroPaint screensaver made via decompilation by MrBuddyCasino on Monday May 05, 2014 @01:22PM (#7699775)
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.
Re:Port of SGI ElectroPaint screensaver made via decompilation by mzs on Monday May 05, 2014 @01:33PM (#7699866)
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

Re:Port of SGI ElectroPaint screensaver made via decompilation by cowpewter on Tuesday May 06, 2014 @12:09AM (#7702781)
Johnny Castaway was amazing. Very fond memories.
Re:Port of SGI ElectroPaint screensaver made via decompilation by chadgeidel on Monday May 05, 2014 @03:08PM (#7700469)
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...

Re:Port of SGI ElectroPaint screensaver made via decompilation by yardie on Monday May 05, 2014 @06:47PM (#7701786)
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.
Re:Port of SGI ElectroPaint screensaver made via decompilation by bashinator on Monday May 05, 2014 @02:55PM (#7700382)
Re:Port of SGI ElectroPaint screensaver made via decompilation by hiraki9 on Monday May 05, 2014 @05:41PM (#7701463)
The original source code for Electropaint was released a few years ago: http://freeweb.siol.net/matevzb2/igl.html
Re:Port of SGI ElectroPaint screensaver made via decompilation by drvink on Monday May 05, 2014 @06:01PM (#7701566)
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.)
Re:Port of SGI ElectroPaint screensaver made via decompilation by skymt on Monday May 05, 2014 @01:21PM (#7699766)
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.
Re:Port of SGI ElectroPaint screensaver made via decompilation by neverm0re on Monday May 05, 2014 @01:34PM (#7699881)
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.
Re:Port of SGI ElectroPaint screensaver made via decompilation by oxryly1 on Monday May 05, 2014 @09:06PM (#7702329)
Totally agree.
Re:Port of SGI ElectroPaint screensaver made via decompilation by nuxi on Monday May 05, 2014 @03:24PM (#7700566)
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")

Re:Port of SGI ElectroPaint screensaver made via decompilation by drvink on Wednesday May 07, 2014 @08:35AM (#7709763)
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!

Re:Port of SGI ElectroPaint screensaver made via decompilation by pronoiac on Monday May 05, 2014 @02:48PM (#7700331)
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.
Re:Port of SGI ElectroPaint screensaver made via decompilation by teraflop on Monday May 05, 2014 @02:59PM (#7700405)
Re:Port of SGI ElectroPaint screensaver made via decompilation by pronoiac on Monday May 05, 2014 @03:06PM (#7700457)
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.

Re:Port of SGI ElectroPaint screensaver made via decompilation by taeric on Monday May 05, 2014 @02:50PM (#7700351)
I'm betting you are thinking of Rez.

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

Re:Port of SGI ElectroPaint screensaver made via decompilation by pronoiac on Monday May 05, 2014 @03:00PM (#7700412)
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.
Re:Port of SGI ElectroPaint screensaver made via decompilation by taeric on Monday May 05, 2014 @03:32PM (#7700628)
If you figure it out, let me know.
Re:Port of SGI ElectroPaint screensaver made via decompilation by pronoiac on Monday May 05, 2014 @03:40PM (#7700673)
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
Re:Port of SGI ElectroPaint screensaver made via decompilation by taeric on Monday May 05, 2014 @09:17PM (#7702365)
Awesome, thanks!
Re:Port of SGI ElectroPaint screensaver made via decompilation by cjbprime on Monday May 05, 2014 @01:10PM (#7699693)
Happy to see this, I remember the IRIX version fondly.
Re:Port of SGI ElectroPaint screensaver made via decompilation by vinny2020 on Monday May 05, 2014 @03:53PM (#7700757)
Very cool, makes me want to fire up my old SGI O2 :)
Re:Port of SGI ElectroPaint screensaver made via decompilation by mstade on Monday May 05, 2014 @05:59PM (#7701548)
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)