SCD Direct Color DMA examples
Posted: Sat Feb 23, 2013 8:15 pm
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.
dmawolfdemo1.7z
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();