Page 1 of 1

SCD Direct Color DMA examples

Posted: Sat Feb 23, 2013 8:15 pm
by Chilly Willy
Here's a thread for posting various direct color dma mode examples for the SegaCD. Here's one - this is LCDWolf. It just renders a Wolf3D style level. The pistol isn't centered horizontally, and it tends to find walls on the right where it shouldn't (not sure if it's his bug or mine), but it works well enough at this point to post.

Burn the ISO file in the arc to disc and run on a real SCD. It's US region, but that shouldn't be a problem for most folks. The DPad moves forward/backward and turns. Use A and C for strafing.

The turn rate is low to give smoother turning - there are 200 turns in a circle, and it takes 20 seconds to turn all the way around, so this is currently doing 10 FPS. I'm rendering 128x64, but doubling the pixels vertically to cover 128x128 of the screen since the pixel aspect ratio is about 2:1. The only assembly is the fixed point multiply.

This example waits for the next vblank before switching banks, so you never get any tearing.

Code: Select all

        // wait for vblank and then switch banks
        while (ticks >= GET_TICKS) ;
        ticks = GET_TICKS;
        switch_banks();
dmawolfdemo1.7z

Posted: Sat Feb 23, 2013 8:56 pm
by peekpoke
Thats great!! Sad, that i cant currently try this on my mega cd :( Maybe someone may put video of it running, on utub?

Posted: Sat Feb 23, 2013 10:13 pm
by Chilly Willy
On the next one, I'll include an EU ISO.

Posted: Sat Feb 23, 2013 10:41 pm
by Chilly Willy
Okay, here's the next version... other than the bugs I mentioned, I increased the resolution of the sin/cos tables. It's even better, but I still get a segment of wall close to you under certain conditions. I think at this point that the fixed point numbers are overflowing due to distance.

This arc has both US and EU ISO images.

dmawolfdemo2.7z

Posted: Sun Feb 24, 2013 9:05 am
by peekpoke
Thank you very much! Great work!

Will try right now to catch this "ghost" wall segment bug!

Posted: Sun Feb 24, 2013 11:28 pm
by Chilly Willy
Okay, here's the latest lcdwolf conversion. It seems okay... no noticeable bugs that I ran into in my quick check.

dmawolfdemo3.7z

Posted: Mon Feb 25, 2013 3:22 am
by Chilly Willy
Now with collision detection! Now you can't walk through walls... you slide along walls nicely when at an angle. I also made sure you can reach everywhere on the map (no blocked off areas).

dmawolfdemo4.7z

Posted: Mon Feb 25, 2013 8:25 am
by peekpoke
Amazing! Looks so nice! Thank you, Chilly Willy, for this great work!