pouët.net

Go to bottom

The Port

category: code [glöplog]
Is anyone already porting this?

https://github.com/mtuomi/SecondReality
added on the 2013-08-02 09:36:54 by friol friol
At http://pouet.net/prod.php?which=63 elend suggested making an Amiga port.
added on the 2013-08-02 10:19:49 by Adok Adok
I guess that would be more a rewrite than a port.
added on the 2013-08-02 11:12:19 by friol friol
Quote:
I guess that would be more a rewrite than a port.


It would be no matter what, since the source contains large amounts of real-mode x86 assembly. Sure, you could port it by including an x86 emulator in the new version of the demo, but meh... :P
added on the 2013-08-02 11:21:46 by mic mic

I was thinking more of a PC port.

Github says the entire source is made by 86,2% of C++ code.

It doesn't recognize Pascal, though. Strange.
added on the 2013-08-02 11:41:10 by friol friol
If by "PC port" you mean x86 desktop versions of Windows or Linux, then you'd still have to rewrite all of the assembly code since it wouldn't work as-is on either of those targets. And the C code does all sorts of things that wouldn't be allowed either, like writing directly to the VGA ports.
added on the 2013-08-02 11:53:57 by mic mic
What would be the point anyway?
The demo runs fine in Dosbox, so it already works on many platforms.

Rewriting all the hand-optimized parts and special hardware-specific routines with new routines that merely emulate the original effects seems to defy the point of the demo.
added on the 2013-08-02 12:02:12 by Scali Scali
So in your opinion, what would be the point of releasing the sourcecode, then?
added on the 2013-08-02 12:03:56 by friol friol
Best news ever! Even as a curiosity, to have a look at the most classic demo code!
added on the 2013-08-02 12:11:08 by Optimus Optimus
I looked through the code (very cursory) and while yeah there's a lot of inline nastiness, it didn't seem particularly improbable to do it. Just a LOT of work. Essentially, if I were to do it, I'd prolly just end up copying out the effect code instead of trying to compile it as is.

I'll prolly give it a shot or two if some russian haxor doesn't do it within a few days :D
added on the 2013-08-02 12:19:02 by Gargaj Gargaj
I guess what I'm trying to say is that since the parts are relatively self-contained you can port them independently, which is less work then trying to get a whole demo to work all at once. Of course linking will be a pain, but it's still entirely possible.
added on the 2013-08-02 12:26:31 by Gargaj Gargaj
And my guess is Sol is already working on it :D
added on the 2013-08-02 12:27:00 by Gargaj Gargaj
Quote:
So in your opinion, what would be the point of releasing the sourcecode, then?

It's still much, much easier to port something if you've got the source code, even if you have to rewrite parts of it.
added on the 2013-08-02 12:28:18 by mic mic
And you could also see the source code as an artifact of the demoscene. It doesn't _have_ to have a practical purpose.
added on the 2013-08-02 12:31:17 by mic mic
Quote:
So in your opinion, what would be the point of releasing the sourcecode, then?


So people can study and see how they did it. It's a piece of history, releasing the sourcecode will preserve the technology for future generations.

I think it's pretty strange that 'port' is the first thing that comes to your mind when you see sourcecode.
added on the 2013-08-02 13:05:44 by Scali Scali
Quote:
elend suggested making an Amiga port.


That would be impressive, because... Correct me if I'm wrong, the PCs you ran Second Reality on were at least twice as fast as an Amiga, nope ? That is, if you consider, and correct me again if needed, that an Amiga's CPU ran at 7.14 MHz and had the same clock speed dedicated to Agnus, Denise and Paula. I feel the explanation would be a bit more complex, but you've got the idea.

So, on one hand, a PC clocked at, at least, 33 MHz (would rather be 50 or 66 MHz I guess), and on the other hand an Amiga clocked at 7.14/14.28 MHz. It would be much more than a simple rewrite, and I think I would be astounded to see this demo run on an Amiga. It would be really amazing!
added on the 2013-08-02 13:31:58 by Korguiq Korguiq
To see how they did a starfield 20 years ago on a 486???

Come on, the "artifact of the demoscene" theory is more plausible :)
added on the 2013-08-02 13:32:47 by friol friol
Quote:

if you consider, and correct me again if needed, that an Amiga's CPU ran at 7.14 MHz


You can't port this on a standard Amiga. You'd need at least an AGA chipset (since the VGA has 256 colors, opposed to the 32 colors of an OCS chipset).

A *dithered* "rewrite" on a standard Amiga would impress me (even if I don't think a 7mhz Amiga could handle the final 3d part - feel free to prove me wrong).
added on the 2013-08-02 13:37:27 by friol friol
Quote:
Github says the entire source is made by 86,2% of C++ code.


There are a lot of inline assembly blocks, I'm rather sure they just look if the file looks like a certain programming language, and don't evaluate the language line per line. :)
That said, I think Sol already ported Death Rally to Win32/SDL, how about Second Reality next? *g*
First, a masterpiece called Desert Dream was released on Amiga.

Then, Future Crew tried to do something similar for PC.

The result was called Second Reality.
added on the 2013-08-02 13:44:13 by ham ham
Quote:
To see how they did a starfield 20 years ago on a 486???


I bet that most coders today actually have no idea how some of the effects were done in Second Reality.
Things like making use of planar EGA modes and such.
This is the domain of 'retroprogramming'.
Most coders today would only know about linear framebuffers with truecolour, and have little idea of the tricks with palettes and bitplanes you could pull on old hardware (because you simply can't do those things anymore).

Coding the effects in Second Reality on modern hardware is one thing.
Coding them in 16-bit mode on an actual 386 or 486 (and no FPU) with standard VGA is something completely different.
added on the 2013-08-02 13:45:11 by Scali Scali
Quote:
even if I don't think a 7mhz Amiga could handle the final 3d part - feel free to prove me wrong


Hmm don't like half of 90's Amiga demos have a similar VIRTUAL REALITY part? A 7MHz 68k might not be much but that's why you summon the powers of the blitter.
ham: after 20 years still bitter about that? :P
Quote:
Hmm don't like half of 90's Amiga demos have a similar VIRTUAL REALITY part? A 7MHz 68k might not be much but that's why you summon the powers of the blitter.


Look at the source tree, they even call that part Amiga City:
https://github.com/mtuomi/SecondReality/blob/master/VISU/C/AMIGACIT
:)

Having said that, a stock Amiga wouldn't be able to pull off a city scene like that as well.
added on the 2013-08-02 13:54:38 by Scali Scali
Maali: LOL! Bitter about what? :D

Besides, the "port" was done for C64 a few years ago.

Don't remember? -> Second Reality 64

;]
added on the 2013-08-02 13:58:35 by ham ham

login

Go to top