
Turbo Pascal 3 port of the smallpt C++ 99-line global illumination renderer - mariuz
http://iwasdeportedandalligotwasthislousydomain.co.uk/static.php?page=smallpt_tp
======
_0ffh
I'm not sure if this code even uses the x87 opcodes or software emulation for
the floats!

First of all, the source defines a "FloatType", which is set to "Real". But
the real type is a 6-byte float type optimised for software floating point
routines! I'd like to see the results when using the "Single" and "Double"
types.

Also, it's easy to forget that x87 code generation in TP3 is an option that
defaults to "don't".

~~~
Zardoz84
I rememeber that TurboBASIC (Borland's clone of QBasic), could use x87 math.
And it was using a TurboC like IDE

~~~
_0ffh
I'm not arguing TP3 couldn't produce x87 opcodes - I'm wondering if the author
remembered to properly tell it to do so!

------
Zardoz84
If you like something like DOSbox but with better performance (near native,
perhaps ?) you should have try DOSEmu.

Really, the difference of speed and performance is abysmal.

[https://en.wikipedia.org/wiki/DOSEMU](https://en.wikipedia.org/wiki/DOSEMU)

~~~
xenophonf
Except DOSEMU is Linux-only, whereas DOSbox is portable.

~~~
Zardoz84
Well, works at very low level stuff, do real virtualization, instead
emulating. The most similar stuff is using VirtualBox or KVM.

~~~
trm42
DOSemu was really joy to use for gaming even on Linux+486 + 10 Megs of ram. Oh
those were the days :>

~~~
xenophonf
I remember them fondly. 10 MB RAM, though? What kind of high roller were you?!
;)

~~~
trm42
Hehee, my dad ended up buying some demo/test machine from AST in 92 or so. The
comp had quite high end specs for it's time. It actually ran really fine for
long time because of switching to Linux. Stopped using it in 1998. Probably
could still remember all the IO, DMA, IRQ settings for hardware ^___^

------
reacweb
I am a bit surprised by the bad performances of TP3. I remember that it was
difficult to beat the compiler by using hand written assembly. Recent
compilers may be far better than I imagined.

~~~
mmastrac
The TP compilers were pretty bad, all the way up to TP7. I (tried to) write a
clone of Wolfenstein back in the day and the only way I could get close to the
performance of the real Wolf3D was by replacing the inner loop by raw x86.

I even still have the source (keep in mind this was written ~20 years ago):

[https://grack.com/code/legacy/deathmatch3d/](https://grack.com/code/legacy/deathmatch3d/)

------
tomcam
Hilarious, and a good remedy for my surprisingly frequent nostalgia for Turbo
Pascal.

