Realtime 3D Cubes on MegaCD
Moderator: Mask of Destiny
Realtime 3D Cubes on MegaCD
Well, I've been working these days on the MegaCD, trying to get the most of his powerful cpu and his "Linear Screen to Tile" automatic conversion hardware.
Then I worked on a very fast Horizontal Drawing routine (almost 26kbytes of pre-generated 68k compiled code, one optimized routine per Line Width and Word Offset)
and then I "ported" some of my fast 3D routines I used in an Atari ST demo to see how this would run on the MegaCD.
Here it is !
Running at 50fps in PAL, and 30fps in NTSC, 2 independent realtime 3D cube, on a 320x128 screen.
The zip contains 2 files, 'cube3d_mcd_eur.iso' is the CD iso for PAL system, and 'cube3D_mcd_from_cart.bin' is a cartridge binary that can be booted on the everdrive if you have a MCD attached to it (no need to burn a CD, just have one random CD in the drive) (the bin doesn't work on emulators, use the iso)
http://onorisoft.free.fr/extern/cube3d_mcd.zip
I'm so happy to have this working, big Thanks to Chilly Willy for his MegaCD code and help
Then I worked on a very fast Horizontal Drawing routine (almost 26kbytes of pre-generated 68k compiled code, one optimized routine per Line Width and Word Offset)
and then I "ported" some of my fast 3D routines I used in an Atari ST demo to see how this would run on the MegaCD.
Here it is !
Running at 50fps in PAL, and 30fps in NTSC, 2 independent realtime 3D cube, on a 320x128 screen.
The zip contains 2 files, 'cube3d_mcd_eur.iso' is the CD iso for PAL system, and 'cube3D_mcd_from_cart.bin' is a cartridge binary that can be booted on the everdrive if you have a MCD attached to it (no need to burn a CD, just have one random CD in the drive) (the bin doesn't work on emulators, use the iso)
http://onorisoft.free.fr/extern/cube3d_mcd.zip
I'm so happy to have this working, big Thanks to Chilly Willy for his MegaCD code and help
Last edited by Orion_ on Wed Feb 05, 2014 1:28 pm, edited 1 time in total.
Retro game programming !
-
- Very interested
- Posts: 710
- Joined: Sat Feb 18, 2012 2:44 am
I transfer a 320x128 screen to vram (double buffered in vram) using DMA
I'm limited to 128 because the MegaCD hardware system to convert linear screen to tile are limited to fixed Height (256/128/64/32/...) so 256 is too much and would require splitted DMA transfer, and the next height is 128
After some test, it's running at 50fps in PAL, and 30fps in NTSC
I'm limited to 128 because the MegaCD hardware system to convert linear screen to tile are limited to fixed Height (256/128/64/32/...) so 256 is too much and would require splitted DMA transfer, and the next height is 128
After some test, it's running at 50fps in PAL, and 30fps in NTSC
Retro game programming !
I think there are some nice MegaCD game, BC Racer for example really use the MegaCD hardware (zoom/rotation)
Other games use Prerendered graphics, and I think this is the best way to use MegaCD because, What I want to try is a 3D game, but even using fast 3D routines and doing this in realtime, I won't get a nice speed for a game, for the moment I have only two cube, so 12 polygons, you can't really make a game with only 12 polygons
Once you make a real 3D scene, you will end up at 15 fps or less, it's not that great :/
but I will try anyway
Other games use Prerendered graphics, and I think this is the best way to use MegaCD because, What I want to try is a 3D game, but even using fast 3D routines and doing this in realtime, I won't get a nice speed for a game, for the moment I have only two cube, so 12 polygons, you can't really make a game with only 12 polygons
Once you make a real 3D scene, you will end up at 15 fps or less, it's not that great :/
but I will try anyway
Retro game programming !
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
15 FPS is definitely not bad for a SegaCD full 3D game.Orion_ wrote:I think there are some nice MegaCD game, BC Racer for example really use the MegaCD hardware (zoom/rotation)
Other games use Prerendered graphics, and I think this is the best way to use MegaCD because, What I want to try is a 3D game, but even using fast 3D routines and doing this in realtime, I won't get a nice speed for a game, for the moment I have only two cube, so 12 polygons, you can't really make a game with only 12 polygons
Once you make a real 3D scene, you will end up at 15 fps or less, it's not that great :/
but I will try anyway