#Update to Nareez: Dreamcast port.
*1 Optimizing and fixing Pvr dma rendering is now 32bit aligned and working added sh4 math header.
*2 I have been optimizing this and have fixed the 32-bit DMA rendering alignment and added SH4 math functions.
*3 Replace the inner for loop with a while loop that terminates early when the projected height falls below zero or above the screen height.
*4 I reorder the heightMap and pixelmap arrays to improve cache locality by aligning adjacent memory elements to adjacent points in the world, resulting in fewer cache misses and better performance.
*5 Precompute values that are used in the loop, like sh4FSCARadianSine, sh4FSCARadianCosine, plx, ply, prx, and pry, instead of recomputing them in each iteration of the loop.
*6 Unroll the loop that iterates over the z variable by incrementing z by 2 in each iteration since the loop body is executed twice for each value of z.
*7 Compute the rx and ry variables outside the loop that iterates over z and increment them inside the loop instead of recomputing them in each iteration of the loop. This eliminates one multiplication and one addition per iteration of the z loop.
NOw 35fps on hardware
bandicam.2023-02-15.05-14-31-568.mp4
Running on Dreamcast hardware now 21fps
bandicam.2023-02-15.03-39-15-884.mp4
##HISTORY Now 16fps on hardware
bandicam.2023-01-16.13-02-44-038.mp4
Dreamcast emulators are much faster then hardware examples below King of being way too fast flycast DEMUL 15fps 5 fps faster then a real dreamcast Redream faster then hardware Nulldc 7 fps faster then hardware Update video
-
Develop workking code of voxel space engine for Dreamcast
-
FPS Count
-
Collision
-
Fog Effect
-
Delta time
Issues:
- Screen tearing and flickering - Solution: Develop Double Buffering
- Slow RAM to VRAM data transfer - Solution: Transfer framebuffer data thru store queue copy
- Ugly surface colors - Solution: Increase brightness
- Non aligned memory not allowing to run on real hardware
- Pikuma's implementation https://github.com/gustavopezzi/voxelspace
- s-macke's implementation https://github.com/s-macke/VoxelSpace
- dcemulation.org forum and wiki
- Ian micheal Optimizing and code fixing https://github.com/ianmicheal/
- KallistiOS https://github.com/KallistiOS/KallistiOS
- Krejlooc tutorial on https://www.neogaf.com/threads/lets-build-a-sega-dreamcast-game-from-scratch-breakout.916501/
- Nold360's docker Dreamcast SDK for GCC 5 https://github.com/Nold360/docker-kallistios-sdk
- einsteinx2 docker Dreamcast SDK for GCC 9 https://github.com/einsteinx2/docker-dcdev
- Simulant Engine discord https://discord.com/invite/TRx94EV
- Dreamcast-talk https://www.dreamcast-talk.com/