Dreamcast Voxel engine

General Dreamcast discussion applies here. Before posting here please check the other forums in the Dreamcast section to see if your topic would fit better in those categories.

Moderators: pcwzrd13, mazonemayu

Forum rules
Please check the other forums in the Dreamcast section before posting here to see if your topic would fit better in those categories. Example: A new game/homebrew release would go in the New Releases/Homebrew/Emulation section: http://dreamcast-talk.com/forum/viewforum.php?f=5 or if you're having an issue with getting your Dreamcast to work or a game to boot it would go in the Support section: http://dreamcast-talk.com/forum/viewforum.php?f=42
Cass
MegaDeath
Posts: 226

Dreamcast Voxel engine

Post#1 » Sun Jan 08, 2023 9:51 pm

Despite the rumours we didn't get Outcast back in the day but some clever clogs seems to be building his own Voxel engine for the Dreamcast.


User avatar
Ryo_Hazuki
killer
Posts: 266

Re: Dreamcast Voxel engine

Post#2 » Tue Jan 10, 2023 4:27 pm

Very good, the programmer said he started working on the Dreamcast two weeks ago.

User avatar
runkthepunk
Doom
Posts: 194

Re: Dreamcast Voxel engine

Post#3 » Wed Jan 11, 2023 3:22 am

Ahh man this looks great.

I was really interested in Outcast and was disappointed when it never came out so just seeing this is cool.

TapamN
letterbomb
Posts: 149

Re: Dreamcast Voxel engine

Post#4 » Wed Jan 11, 2023 3:34 am

There was another voxel demo from 2002 that used seemed to use the algorithm from Flipcode to do hardware accelerated voxel heightmap drawing. It also looks like a commercial Dreamcast game, Surf Rocket Racers, did something similar for the water, but I've never looked at the wireframe in an emulator to verify for sure.

User avatar
Ian Micheal
Developer
Posts: 6007
Contact:

Re: Dreamcast Voxel engine

Post#5 » Wed Jan 11, 2023 6:37 am

Current one is broken non aligned memory reads i posted this to the dev and where..Does not work on a real dreamcast.

cloofoofoo
Crazy Taxi!
Posts: 535

Re: Dreamcast Voxel engine

Post#6 » Wed Jan 11, 2023 7:37 am

TapamN wrote:There was another voxel demo from 2002 that used seemed to use the algorithm from Flipcode to do hardware accelerated voxel heightmap drawing. It also looks like a commercial Dreamcast game, Surf Rocket Racers, did something similar for the water, but I've never looked at the wireframe in an emulator to verify for sure.


Its polygon based. Its grid like near the player and simpler from a distance.

User avatar
Ian Micheal
Developer
Posts: 6007
Contact:

Re: Dreamcast Voxel engine

Post#7 » Wed Jan 11, 2023 7:55 am

Software based is too slow 18 fps at 320x240 not 45fps ..

https://github.com/nareez/dreamcast-vox ... e/issues/1 this does not work at all on a real Dreamcast right now i show the problem and where..

User avatar
Nareez
noob
Posts: 1
Contact:

Re: Dreamcast Voxel engine

Post#8 » Sat Jan 14, 2023 9:47 am

Hi everyone, I'm really happy that some people are interested in the Voxel Engine on the Dreamcast. I didn't expect anyone to care about that.
Unfortunately the demo still doesn't work on real hardware. Ian Michael showed me the error and I will work to correct it.
Many improvements need to be made, as I understand how to get the best out of the Dreamcast Hardware I will improve the Engine.
I'll show the progress on my twitter @NaReeZ

User avatar
Ian Micheal
Developer
Posts: 6007
Contact:

Re: Dreamcast Voxel engine

Post#9 » Sat Jan 14, 2023 10:11 am

Nareez wrote:Hi everyone, I'm really happy that some people are interested in the Voxel Engine on the Dreamcast. I didn't expect anyone to care about that.
Unfortunately the demo still doesn't work on real hardware. Ian Michael showed me the error and I will work to correct it.
Many improvements need to be made, as I understand how to get the best out of the Dreamcast Hardware I will improve the Engine.
I'll show the progress on my twitter @NaReeZ


One of my fav engine styles i care for sure thank you..

TapamN
letterbomb
Posts: 149

Re: Dreamcast Voxel engine

Post#10 » Sun Jan 15, 2023 6:49 pm

cloofoofoo wrote:Its polygon based. Its grid like near the player and simpler from a distance.

Are you talking about the demo from boob or SRR? I looked at the boob demo a very long time ago, so I don't remember much of it. But SRR does some weirdness when the camera goes below the water, and the waterfall stage has some weird glitches that make me think it might work like the Flipcode hardware accelerated version.

Nareez wrote:Hi everyone, I'm really happy that some people are interested in the Voxel Engine on the Dreamcast. I didn't expect anyone to care about that.
Unfortunately the demo still doesn't work on real hardware. Ian Michael showed me the error and I will work to correct it.
Many improvements need to be made, as I understand how to get the best out of the Dreamcast Hardware I will improve the Engine.
I'll show the progress on my twitter @NaReeZ

I noticed you're using sq_cpy to update the frame buffer in VRAM. This is much better than trying to use video RAM directly, but it's still pretty slow. There are faster ways to update a VRAM buffer.

I got the following timings for copying a frame buffer from main RAM to video RAM for a 640x480 16-bit frame buffer:
  • memcpy: 20.80 ms
  • KOS sq_cpy: 8.24 ms
  • Modified sq_cpy: 3.89 ms
  • DMA (includes optimized cache flush, waits for DMA to complete): 1.98 ms
  • DMA (includes optimized cache flush, DMA works in background): 0.08 ms
For a 320x240 resolution screen, they would take about 1/4th the time. If you let the DMA work in the background, you wouldn't actually get all of the 1.90 ms saved when waiting, since the DMA will slow down CPU memory access. You might only save something like 1 ms total in an real game.

It looks like you tried to use DMA, but had trouble since KOS's DMA isn't designed to update the frame buffer. Video RAM DMA will only work if you enable the 3D driver... Also, KOS's cache flush function is partially broken; it does flush the cache, but it's much slower than it needs to be. Using KOS's dcache_flush_range would add an extra 1.84 ms to DMA timings I listed.

I don't have complete, sharable code for using DMA to the frame buffer without the PVR driver right now, but you can speed up sq_cpy by using this function instead of regular sq_cpy:

Code: Select all

void modified_sq_cpy_pvr32(void *dst, void *src, size_t len) {
   //Set PVR DMA register
   (volatile int *)0xA05F6888 = 1;
   
   //Convert read/write area pointer to DMA write only area pointer
   void *dmaareaptr = ((uintptr_t)dst & 0xffffff) | 0x11000000;
   
   sq_cpy(dmaareaptr, src, len);
}

  • Similar Topics
    Replies
    Views
    Last post

Return to “Lounge”

Who is online

Users browsing this forum: No registered users