
Recently, a demo was uploaded that used DMA to the CRAM background color entry to do a direct color display (9 bit RGB). It's hard as hell to see if the mode is useful from the demo - the image used sucks donkey dongs. It's also just a small asm program.
The code was posted, so I looked it over to see how it worked... this is my demo based on it. I inserted the code into my "standard" framework and used a GOOD image, something you'll probably recognize.
http://www.mediafire.com/?gvg7m4b1rlp5w9l
The way this works is you disable ints, turn on the display and wait for the vblank. You then write some data to vram to synchronize to a specific spot on the display. Then you setup dma from memory to cram with the increment set to 0 so that it always stores to the same cram entry. You then turn off the display and start the dma. This halts the cpu until the dma is done.
We know from posted tables that there are 198 cycles for dma in horizontal line when the display is not active (in 40 cell mode). So the width of the direct color display is 198... but not all of that is visible. From my demo, you get an idea of what is visible. My image is a 320x200 image shrunk to 160x200, then centered in the 198x224 direct color display region. So you can see that the visible horizontal width in this mode is 160 (I need to move the image left a bit for proper centering - using the exact center of the 198 width is too far right).
Anywho, what use is this mode? The cpu is halted for most of the time. Well, it's AWESOMENESS PERSONIFIED for SCD games. Think about it - instead of a static display in rom, a frame buffer in word ram. The SCD game prepares the video, then swaps word ram buffers during the vblank (run in two 128KB word ram banks mode). The MD side does nothing but DMA whatever is in word ram to the screen just like in the demo. The CD side handles the word ram banks, drawing the frames and flipping them for the MD side. It also runs the game and plays the audio via the PCM chip. The only things the MD side needs to do is DMA the damn buffer and read the pads, which you would do immediately after the DMA finishes, and before you wait on the vblank.
It's stable and looks great. 160x200 is a great mode for games, especially when it means you can do 9-bit RGB. This is my mode for my MCD port of Wolf3D... I can get back on that now that I have a good video mode to use. I can actually use the original graphics instead of 16 color graphics.
You could also use this for FMV. Imagine nice direct color images instead of "cinepak" images... I'll have to make a demo for that as well. Time to get some SCD demos going.
