
Port of SGI ElectroPaint screensaver made via decompilation - QqQqQqQqQ
http://github.com/drvink/electroportis
======
Theodores
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?

~~~
gdubs
"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.

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

------
i_am_ralpht
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!

~~~
drvink
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));

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

------
shimfish
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.

------
AceJohnny2
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?

~~~
drvink
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.

~~~
slacka
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](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.

~~~
drvink
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...

------
Xetick
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](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](http://www.plane9.com/scenes/vrwwq5sg/wild-color)

------
defiler101
Fanatical work; thanks for releasing the decompiler as well.

------
bitlord_219
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...

~~~
drvink
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](https://news.ycombinator.com/item?id=7700340)

------
brohee
The one and only screen saver with a fanatical following.

~~~
mzs
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](https://www.youtube.com/watch?v=hVgGfKY91Lg)

~~~
cowpewter
Johnny Castaway was amazing. Very fond memories.

------
hiraki9
The original source code for Electropaint was released a few years ago:
[http://freeweb.siol.net/matevzb2/igl.html](http://freeweb.siol.net/matevzb2/igl.html)

~~~
drvink
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.)

------
skymt
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.

~~~
neverm0re
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.

~~~
oxryly1
Totally agree.

------
drvink
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](https://github.com/drvink/electroportis/releases)

Enjoy!

------
pronoiac
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.

~~~
teraflop
Was it called "tranquility"?

[http://en.wikipedia.org/wiki/Tranquility_(video_game)](http://en.wikipedia.org/wiki/Tranquility_\(video_game\))

~~~
pronoiac
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](http://youtu.be/EbLhw_zJiFo) \- if you
liked Electropaint you may like this.

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

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

~~~
mstade
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)

