Yeti3D

Ask anything your want about the 32X Mushroom programming.

Moderator: BigEvilCorporation

Post Reply
Chilly Willy
Very interested
Posts: 2581
Joined: Fri Aug 17, 2007 9:33 pm

Yeti3D

Post by Chilly Willy » Mon Feb 21, 2011 7:01 am

Here's yet another release of the GPL version of the Yeti3D engine for the 32X. My last version was merely okay on emulators, and lousy on real hardware. This version is awesome on emulators, and okay on real hardware.

The main "trick" for this version is to have the engine render at 160x112. I use the line table to double the height for free, and use the slave to double the pixel horizontally. The demo uses the interpolated setting, so every other pixel is a blend of the current and previous pixels. It doesn't take any longer than just doubling the pixels from my tests.

So this gives full-screen 3D at playable rates on real hardware, but really kicks ass on emulators. :D

download

User avatar
TmEE co.(TM)
Very interested
Posts: 2300
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Mon Feb 21, 2011 7:54 am

That was awesome :D

it needs music now
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

Chilly Willy
Very interested
Posts: 2581
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Mon Feb 21, 2011 8:38 am

I'm working on it... I have my MOD playing code so it doesn't crash, but it also doesn't play music yet. It's getting there. :? :lol:

Once I have the stand-alone MOD demo done, I'll work it into the Yeti3D demo. That will give a platform someone could actually use for a simple 3D game.

tomaitheous
Very interested
Posts: 256
Joined: Tue Sep 11, 2007 9:10 pm

Post by tomaitheous » Tue Feb 22, 2011 12:47 am

Very cool :D Would there be any possible way for the 'doubled' scanlines to show at half intensity? Give it a scanline effect?

Chilly Willy
Very interested
Posts: 2581
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Tue Feb 22, 2011 1:13 am

tomaitheous wrote:Very cool :D Would there be any possible way for the 'doubled' scanlines to show at half intensity? Give it a scanline effect?
It would possible to make every other line blank at no cost. Making every other line half intensity would require using the CPU (slave or master) to draw every other line at half intensity.

The current line doubling just sets every other line offset to the same value as the line before. So line 0 is offset 256, line 1 is also 256, line 2 is 256+320, line 3 is also 256+320, etc. For a scanline effect, set line 0 to 256, line 1 to 256+112*320, line 2 to 256+320, line 3 to 256+112*320, etc.

Note that by doubling the lines for the main display, we now have enough vram for a full display. In 32K mode, you normally see 320x200 displays... there's only enough vram in 32K mode for 204 lines. Line doubling means we can go the full 224 height. If we had a status bar, we could line double the 3D part of the display, and single line the status bar. That's what I plan for the next update for Wolf32X.

TotOOntHeMooN
Interested
Posts: 38
Joined: Sun Jun 01, 2008 1:12 pm
Location: Lyon, France
Contact:

Post by TotOOntHeMooN » Mon Mar 07, 2011 10:48 pm

Many systems got undocumented display resolutions.
There are no wide pixels display mode (160x224) for helping you ?
Else, by using 8bit screen mode and writing 16bit "double pixel" ?

Chilly Willy
Very interested
Posts: 2581
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Mon Mar 07, 2011 11:12 pm

TotOOntHeMooN wrote:Many systems got undocumented display resolutions.
There are no wide pixels display mode (160x224) for helping you ?
Else, by using 8bit screen mode and writing 16bit "double pixel" ?
Yeti3D is thousands mode only. No 256 color modes. That's because it does lighting when rendering the polygons.

And the 32X has no 160 wide modes. 320 wide is the ONLY mode there is. You can use the line table to narrow that a bit, but you're just leaving larger black bars on the sides when you do. So while I can use the line table for free vertical scaling, there's nothing to help that horizontally... other than the Slave CPU. The problem is that even if you do the horizontal scaling on the slave cpu, it still takes bus time which affects the master cpu. You either spend the time scaling it yourself, or waiting on the bus to be free while the other cpu scales it.

The other option is like the double pixel suggestion - just in thousands mode (word -> long). That requires altering all functions that draw to the display so they double the pixel and draw to a spot twice as far away. I might try that sometime.

TotOOntHeMooN
Interested
Posts: 38
Joined: Sun Jun 01, 2008 1:12 pm
Location: Lyon, France
Contact:

Post by TotOOntHeMooN » Mon Mar 07, 2011 11:46 pm

I hope that can help to speed up a bit. :P

sega16
Very interested
Posts: 250
Joined: Sat Jan 29, 2011 3:16 pm
Location: U.S.A.

Post by sega16 » Mon Mar 07, 2011 11:58 pm

So how do you edit the "level" I figured out how to build it. It is a great port it runs and it seams to run fast (at least in kega fusion (i have no flash cart and no 32x))Also I could have swore you said you were gonna port the yeti 3d pro edition what is the difference between this one and the "pro" version?

Chilly Willy
Very interested
Posts: 2581
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Tue Mar 08, 2011 12:06 am

TotOOntHeMooN wrote:I hope that can help to speed up a bit. :P
See for yourself - here's an arc of the "double pixel" version of the Yeti3D demo (with music and sound). It's not any faster on the emulator that I can tell, but it may be faster on real hardware. Included is a binary and the source.

http://www.mediafire.com/download.php?a9y2dnhm3e9dfrc
sega16 wrote:So how do you edit the "level" I figured out how to build it.
You have to use the editor, make the level, save the data, then replace the data in src/maps/e1m1.c.

Also I could have swore you said you were gonna port the yeti 3d pro edition what is the difference between this one and the "pro" version?
Yeti3D-Pro is new and better, but consumes a lot more ram. That's why I haven't finished porting Pro yet. I have to get the ram usage back down again.

Features of Yeti3D-Pro:
Demo has multiple levels with more "stuff" and bad guys.
Objects and bad guys are 3D models.
Better rendering (supposedly) - supports curved surfaces.
More complete core, with more game logic and sound functions.

sega16
Very interested
Posts: 250
Joined: Sat Jan 29, 2011 3:16 pm
Location: U.S.A.

Post by sega16 » Tue Mar 08, 2011 1:30 am

Wow surprisingly the double pixel edition looks better in quality (less blurry).So did you just take out the blurring code or is it now rendering as a long and converting to a word.

Chilly Willy
Very interested
Posts: 2581
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Tue Mar 08, 2011 4:06 am

sega16 wrote:Wow surprisingly the double pixel edition looks better in quality (less blurry).So did you just take out the blurring code or is it now rendering as a long and converting to a word.
The pixels are just doubled, not blended. The other demo blends every other pixel for slightly more resolution. However, that does make it a bit "blurry". If you like the sharp look of doubled pixels, the other demo can be switched to doubled pixels by changing the lines in mars_flip() like this:

Code: Select all

  // double the frame buffer horizontally

  //ScreenStretch(SRC_PTR, SRC_WIDTH, SRC_HEIGHT, 1); // stretch with interpolation

  ScreenStretch(SRC_PTR, SRC_WIDTH, SRC_HEIGHT, 0); // stretch without interpolation

That turns off the interpolation. In a game, this would probably be an option you could change on the fly. Some people like the sharp blocky look, and others like the interpolation. The stretch code can handle both. The pixel doubled demo could, but it would make the rendering quite a bit more complex. It's much easier to leave it as simply doubled.

TotOOntHeMooN
Interested
Posts: 38
Joined: Sun Jun 01, 2008 1:12 pm
Location: Lyon, France
Contact:

Post by TotOOntHeMooN » Tue Mar 08, 2011 8:17 am

Chilly Willy wrote:See for yourself - here's an arc of the "double pixel" version of the Yeti3D demo (with music and sound). It's not any faster on the emulator that I can tell, but it may be faster on real hardware.
Unfortunately, I can't test it on a real 32X and the emulator always display 60fps.
So it's not possible to estimate the speed improvement.
May be ... Can you display a sort of "CPU usage" ?

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest