POV-Ray : Newsgroups : povray.advanced-users : Why?... Because!! Server Time
25 Nov 2024 07:22:59 EST (-0500)
  Why?... Because!! (Message 1 to 10 of 21)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Andrew Coppin
Subject: Why?... Because!!
Date: 12 Mar 2003 16:12:06
Message: <3e6fa2a6@news.povray.org>
The new docs for PV3.5 contain a tutorial which shows you how to write a
raytracer using POV-Ray's SDL... Far out man! A raytracer simulating a
raytracer!!!

I think I may have just gone one better. Man, I bet someone else has already
done this tho |'-[ What have I done? I've only used the SDL to create an
emulator for an 8-bit computer!!! Yup, write an include file to fill a
region of the "memory" with the correct op-codes, then ask POV-Ray to render
an animation. Between each frame POV-Ray will execute one machine code
instruction.

The actual image that gets rendered is a bunch of 8-segment "LCD" displays.
(The individual segments can be switched on and off by writing the correct
bitmap value into certain memory addresses; memory-mapped I/O baby!) Also at
the bottom of the screen is a dump of the CPU state - PC, SP (and the memory
they point to), status flags and general purpose registers.

As such, the "animation" is actually best viewed as a frame-by-frame slide
show. As you can imagine, since all you're seeing is a page of code numbers
that change now and then, it's actually really hard to follow!!! I'm
thinking if I really wanted to I could create a more graphical illustration
of what's going on. (Would probably still tend to me a bit mesmerising and
require lots of concentration to follow it! LOL)

Why did I do this???

Well, for years I've been having these delusions that one day I will write
my own operating system. Of course, I couldn't possibly write an operating
system for an IBM PC - I simply don't have access to the requisite
information. I don't even know Intel assembly! Never mind all the different
protocols and chipsets for I/O... It's simply beyond my abilities. But one
of my other "lifetime ambitions" is to build my own computer - out of
individual logic gates! Of course, I haven't managed to do that yet
either... So now I'm building an emulator! At least now I can get
programming while I wait for the computer to take shape... (Hey, I could
even emulate the logic gates, couldn't I??? Mmmm....)

I actually have a C64 emulator... But I don't like some of the way the 6502
works... So I designed my own microprocessor. And now I can emulate it!
Yay!!!

[Aside] So am I completely nuts? Opinions? [/Aside]

Anyway, will post the sources - if anyone besides me actually gives a sod
that is! They're kinda big (POV-Ray works out what to do with each op-code
using a MASSIVE #switch statment - and the instruction set is about 90
codes!) But hey, there's always WinZIP (if folks have that or equivelent).
It's very uncommented ("hey, *I* know what I'm doing...") and probably still
very buggy ("oops - look at that; I got the address and data the wrong way
round...") but hey ;-)

The biggest "program" I've written so far is about 30 instructions. The
first part adds two numbers together, and the second part (the big bit!) is
a subroutine that takes a number is displays (in hex) on the 8-segment
display. So... in other words, with 30 instructions of code, you get the
same printout every time. *sigh* But hey, if you changed just 2 bytes, you


Knackered.
Andrew.


Post a reply to this message

From: Mark Weyer
Subject: Re: Why?... Because!!
Date: 13 Mar 2003 04:21:17
Message: <3E7050AB.7000607@informatik.uni-freiburg.de>
> The new docs for PV3.5 contain a tutorial which shows you how to write a
> raytracer using POV-Ray's SDL... Far out man! A raytracer simulating a
> raytracer!!!
> 
> I think I may have just gone one better. Man, I bet someone else has already
> done this tho |'-[ What have I done? I've only used the SDL to create an
> emulator for an 8-bit computer!!!

I think this is more useful than the tutorial project (as a project
that is, not as a tutorial). Imagine you want to render an animation
of an arcade hall. Instead of pre-calculating animations that you
display on the arcade machines' screens you can use the parser to
calculate what is on screen and even let it interact with the
animation's characters. All you need is the arcade machine's or home
computer's ROM image. Very useful. On the other hand I find a
raytracer implemented in SDL not very persuasive. What would make
sense is a raytracer implemented in the home computer's machine code...


-- 
merge{#local i=-11;#while(i<11)#local
i=i+.1;sphere{<i*(i*i*(.05-i*i*(4e-7*i*i+3e-4))-3)10*sin(i)30>.5}#end
pigment{rgbt 1}interior{media{emission x}}hollow}//  Mark Weyer


Post a reply to this message

From: Andrew Coppin
Subject: Re: Why?... Because!!
Date: 13 Mar 2003 17:05:15
Message: <3e71009b@news.povray.org>
> I think this is more useful than the tutorial project (as a project
> that is, not as a tutorial). Imagine you want to render an animation
> of an arcade hall. Instead of pre-calculating animations that you
> display on the arcade machines' screens you can use the parser to
> calculate what is on screen and even let it interact with the
> animation's characters.

Yeah... hadn't thought of that... Interesting idea.

> All you need is the arcade machine's or home
> computer's ROM image. Very useful.

Well... at the moment, it doesn't emulate any piece of hardware that has
ever actually existed - i.e., it doesn't emulate a C64 or a ZX Spectrum or
anything in particular, just an imaginary machine that I invented. (No
reason why such a device COULDN'T exist, it's just that I haven't built one
yet ;-) To actually make use of a ROM image (wouldn't there be copyright
issues?) it would have to actually emulate a real computer - the one the ROM
works on! But still, a neat idea...

> On the other hand I find a
> raytracer implemented in SDL not very persuasive. What would make
> sense is a raytracer implemented in the home computer's machine code...

Mmm... now there's tempting! ;-)

(Did I mention that this thing is 8-bit, with no hardware support for
floating point operations?!?)

Andrew.


Post a reply to this message

From: Rick Gutleber
Subject: Re: Why?... Because!!
Date: 17 Mar 2003 21:49:23
Message: <3e768933$1@news.povray.org>
The obvious next step:  port MAME to SDL.

;-)

"Andrew Coppin" <orp### [at] btinternetcom> wrote in message
news:3e71009b@news.povray.org...
> > I think this is more useful than the tutorial project (as a project
> > that is, not as a tutorial). Imagine you want to render an animation
> > of an arcade hall. Instead of pre-calculating animations that you
> > display on the arcade machines' screens you can use the parser to
> > calculate what is on screen and even let it interact with the
> > animation's characters.
>
> Yeah... hadn't thought of that... Interesting idea.
>
> > All you need is the arcade machine's or home
> > computer's ROM image. Very useful.
>
> Well... at the moment, it doesn't emulate any piece of hardware that has
> ever actually existed - i.e., it doesn't emulate a C64 or a ZX Spectrum or
> anything in particular, just an imaginary machine that I invented. (No
> reason why such a device COULDN'T exist, it's just that I haven't built
one
> yet ;-) To actually make use of a ROM image (wouldn't there be copyright
> issues?) it would have to actually emulate a real computer - the one the
ROM
> works on! But still, a neat idea...
>
> > On the other hand I find a
> > raytracer implemented in SDL not very persuasive. What would make
> > sense is a raytracer implemented in the home computer's machine code...
>
> Mmm... now there's tempting! ;-)
>
> (Did I mention that this thing is 8-bit, with no hardware support for
> floating point operations?!?)
>
> Andrew.
>
>


Post a reply to this message

From: Andrew Coppin
Subject: Re: Why?... Because!!
Date: 19 Mar 2003 16:25:51
Message: <3e78e05f@news.povray.org>
> The obvious next step:  port MAME to SDL.

Port whatty?!?


Post a reply to this message

From: Rohan Bernett
Subject: Re: Why?... Because!!
Date: 19 Mar 2003 20:55:02
Message: <web.3e791f49528171f8d02c7b870@news.povray.org>
Andrew Coppin wrote:
>> The obvious next step:  port MAME to SDL.
>
>Port whatty?!?
>

MAME = Multi Arcade Machine Emulator

I haven't used it personally, but it's supposed to be really good. I've
heard there are even ports of it for several consoles.

Well, here's something even loonier than making an emulator in SDL: Make a
whole game in it. Just imagine Warcraft III or Duke3d with raytraced
graphics! Drool drool drool! Pity, no current computer is fast enough to do
it in real time.

I suppose you could write a game engine that uses raytracing for the
graphics, but it would probably take 10-20 years before there is a computer
fast enough to run it at 60fps.

I've certainly been thinking about doing it, _IF_ I ever get my programming
skills up to the required level to do it (currently I'm just bordering on
being able to write Tetris).

In the mean time, perhaps you could write POV-Tetris, eh? :-)

Rohan _e_ii


Post a reply to this message

From: Greg Edwards
Subject: Re: Why?... Because!!
Date: 20 Mar 2003 18:48:17
Message: <np2hr74rujey.4i2cmenticqp.dlg@40tude.net>
On Wed, 19 Mar 2003 20:54:17 EST, Rohan Bernett wrote:

> Andrew Coppin wrote:
>>> The obvious next step:  port MAME to SDL.
>>
>>Port whatty?!?
>>
> 
> MAME = Multi Arcade Machine Emulator
> 
> I haven't used it personally, but it's supposed to be really good. I've
> heard there are even ports of it for several consoles.
> 
> Well, here's something even loonier than making an emulator in SDL: Make a
> whole game in it. Just imagine Warcraft III or Duke3d with raytraced
> graphics! Drool drool drool! Pity, no current computer is fast enough to do
> it in real time.
> 
> I suppose you could write a game engine that uses raytracing for the
> graphics, but it would probably take 10-20 years before there is a computer
> fast enough to run it at 60fps.
> 
> I've certainly been thinking about doing it, _IF_ I ever get my programming
> skills up to the required level to do it (currently I'm just bordering on
> being able to write Tetris).
> 
> In the mean time, perhaps you could write POV-Tetris, eh? :-)
> 
> Rohan _e_ii

What are you talking about? Real-time raytracing is here! There's a pretty 
impressive RTRT demo called Heaven 7 
(ftp://ftp.scene.org/pub/parties/2000/mekkasymposium00/in64/h7-final.zip). 
Considering that hardware acceleration makes any kind of graphics many 
times faster, hardware accelerated real-time raytracing is a distinct 
possibility right now! OpenRT (similar to OpenGL) is being developed right 
now. (http://www.openrt.de/) Sure hope PC hardware manufacturers catch on 
and make hardware accelerators for it.

-- 
light_source#macro G(E)sphere{z+E*y*5e-3.04rotate-z*E*6pigment{rgbt#end{
20*y-10#local n=162;1}#while(n)#local n=n-.3;G(n)x}}G(-n).7}}#end//GregE


Post a reply to this message

From: Rohan Bernett
Subject: Re: Why?... Because!!
Date: 20 Mar 2003 20:05:11
Message: <web.3e7a64b3528171f8d02c7b870@news.povray.org>
>What are you talking about? Real-time raytracing is here! There's a pretty
>impressive RTRT demo called Heaven 7
>(ftp://ftp.scene.org/pub/parties/2000/mekkasymposium00/in64/h7-final.zip).
>Considering that hardware acceleration makes any kind of graphics many
>times faster, hardware accelerated real-time raytracing is a distinct
>possibility right now! OpenRT (similar to OpenGL) is being developed right
>now. (http://www.openrt.de/) Sure hope PC hardware manufacturers catch on
>and make hardware accelerators for it.

If it's possible to do real-time raytracing, then why can't we do it with
POVRay, hmm?

Rohan _e_ii


Post a reply to this message

From: Christopher James Huff
Subject: Re: Why?... Because!!
Date: 20 Mar 2003 21:00:02
Message: <cjameshuff-D7683F.21002320032003@netplex.aussie.org>
In article <np2### [at] 40tudenet>,
 Greg Edwards <edw### [at] hotmailcomremovethis> wrote:

> What are you talking about? Real-time raytracing is here! There's a pretty 
> impressive RTRT demo called Heaven 7 
> (ftp://ftp.scene.org/pub/parties/2000/mekkasymposium00/in64/h7-final.zip). 
> Considering that hardware acceleration makes any kind of graphics many 
> times faster, hardware accelerated real-time raytracing is a distinct 
> possibility right now! OpenRT (similar to OpenGL) is being developed right 
> now. (http://www.openrt.de/) Sure hope PC hardware manufacturers catch on 
> and make hardware accelerators for it.

RTRT is still very limited. You have to make a lot of compromises in 
features and realism to get anything close to a tolerable resolution and 
frame rate. A highly tweaked and tuned demo is very different from a 
detailed game environment.
And yes, it can be accelerated...with hardware designed to accelerate 
it. And even then, there are limitations. Besides which, it doesn't 
exist comercially yet...

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Patrick Elliott
Subject: Re: Why?... Because!!
Date: 20 Mar 2003 22:23:11
Message: <MPG.18e42fd2eebf16298978e@news.povray.org>
In article <web.3e791f49528171f8d02c7b870@news.povray.org>, 
rox### [at] yahoocom says...
> Andrew Coppin wrote:
> >> The obvious next step:  port MAME to SDL.
> >
> >Port whatty?!?
> >
> 
> MAME = Multi Arcade Machine Emulator
> 
> I haven't used it personally, but it's supposed to be really good. I've
> heard there are even ports of it for several consoles.
> 
Good is an understatement. It supports virtually every game ever made, 
save for the newer vector based ones. Most that don't work are do to 
there being no good dumps of the original roms. Best to get the DOS 
version for full compatibility though and a version like Mame32 for 
playing the ones that will work in it, which should be 100% of them 'if' 
you have the right sets of rom images. Since version .32 that I used to 
have, they moved a lot of the rom images that 'used' to be built into the 
emulator out to the various rom files, this means they won't work with 
the new Mame32 and probably not for Mame 0.66 either unless patched 
first. I had to fix about 10 of the 100 or so I had, including spyhunter 
because the files I had didn't contain the needed images. At least one of 
the roms I have crashes, so some issues do exist, at least between v 0.32 
and v 0.66, but that is the only one out of all the ones I have. 
Unfortunately, while www.mame.dk is still a good place to check out for 
the data on supported games (and missing rom images), you have to get the 
roms themselves from other places. There is a mess of them on the WinMX 
and opennap networks though, including entire archives of different 
groups, like everything starting with A, etc. Also, www.romnation.net is 
good, but their auto redirect for file downloads sometimes screws up for 
me.

Patches to upgrade the roms to the 'new' versions are from another site 
http://www.sys2064.com/fixfiles.htm. Though these are not 100% complete 
with all the needed patches. I had to get one file for Spyhunter from 
another rom that had it, however the patch that was included for it also 
proved necessary to get it to work right. If you can find such patches on 
P2P networks, then good luck trying to figure out what to search on. I 
didn't see any of them when I tried to look.

Also, some people have even build arcade cabinets to hold their computers 
and monitors, then wired in the original arcade controls to them.

Thus assumes anyone even cares. ;) lol

-- 
void main () {

    call functional_code()
  else
    call crash_windows();
}


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.