Small update to Wolf32X
Posted: Thu Jun 26, 2014 9:56 pm
Okay, I just updated my 32X toolchain and took the opportunity to bump the sample rate from 14kHz (two times the Wolf3D digital sample rate) to 21kHz (three times the rate). This should cure any squealing a few folks reported. That is the only change for this version... except for one other thing. If you look in the archive, you'll find files with the .32X extension, and ones with the .bin extension. The .32X files are regular old Wolf3D/SOD with the changes sample rate. The .bin file have a new experimental DMA transfer for the display.
The way Wolf3D works is it does the game logic, renders the screen, and loops. Part of rendering the screen is transferring it from the off-screen buffer to the frame buffer. That was done by copying the data with the processor. In the .bin files, I now start an asynchronous DMA operation to copy the memory to the frame buffer, and return back to the loop. What this means is the game can get busy on the next tick worth of game logic while the DMA actually copies the display to the frame buffer. When the DMA is done, an interrupt sets a flag so that if the game logic finishes before the DMA is done, it will wait before drawing the next frame. The game feels smoother to me, especially SOD.
I call it experimental because I've only tried it on my system. Please try this on yours and report how it works (or doesn't as the case may be). As always, the full source is included. It's a good resource for seeing how to do mem-to-mem DMA with the SH2.
Wolf32X-20140626
The way Wolf3D works is it does the game logic, renders the screen, and loops. Part of rendering the screen is transferring it from the off-screen buffer to the frame buffer. That was done by copying the data with the processor. In the .bin files, I now start an asynchronous DMA operation to copy the memory to the frame buffer, and return back to the loop. What this means is the game can get busy on the next tick worth of game logic while the DMA actually copies the display to the frame buffer. When the DMA is done, an interrupt sets a flag so that if the game logic finishes before the DMA is done, it will wait before drawing the next frame. The game feels smoother to me, especially SOD.
I call it experimental because I've only tried it on my system. Please try this on yours and report how it works (or doesn't as the case may be). As always, the full source is included. It's a good resource for seeing how to do mem-to-mem DMA with the SH2.
Wolf32X-20140626