Speaking of XMEGA

I mentioned a D-series XMEGA in another thread, might as well share:

formatting link

Specifically, an XMEGA64D3 at 29.xx MHz. I'm rather impressed that it runs a raycaster so well. It's not even much slower with full floating point enabled.

The real elephant is the graphics drawing speed, limited by the 7MHz SPI. I can go up to ~10 per the datasheet, but I don't have that as an option; and at 14MHz, the display controller loses data sometimes. Poo.

The whole rendering process (assuming a no-wait-state, memory-mapped display buffer, say) is probably capable of running a solid 20 or 30 FPS steady. Or manageably less with crude texturing, probably.

As it is, only changed graphics are updated, so it can run as fast in long hallways, but bogs down when you faceplant into a big tall wall that takes up half the screen. But eh, enough talk, it's obvious in the video! :^)

This contrasts with my XT clone, a "proper" PC, "640k is enough for anyone"!

8086 at 8MHz = ~1/4th the clock rate, and many cycles per instruction besides. Plus a few wait states to system DRAM, plus waiting a whole horizontal retrace if you accidentally write to the EGA screen buffer while it's still scanning! All in all, it takes several _seconds_ to render a frame! And that's written in assembler! (Though admittedly, rather poorly conceived and optimized assembler, as was my meager knowledge at the time.)

Interestingly enough, the code takes up about 9kB either way (~4.5kwords on the AVR, ~9kB on x86). No problem on the 32k AVR. RAM is a little short though -- definitely a challenge to implement textured walls.

Tim

--
Seven Transistor Labs, LLC 
Electrical Engineering Consultation and Contract Design 
Website: https://www.seventransistorlabs.com/
Reply to
Tim Williams
Loading thread data ...

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.