Hello
Something more than a month ago I was dedicated to improving the code for filling polygons, and also trying to make a new method to make use of DMA to transfer the buffer to VRAM. At first, I thought of doing this just changing the code for filling polygons, but got a way to do it, just changing a little, the code filling polygons and the method of transfer buffer, in this way, the worst case is Like the "normal" method of 628 cycles.
The downside is that to use this method, I have to use the two planes to form the image, so to make the background, I'd have to do it using sprites, another aspect is that you need twice the VRAM memory, but this is not a big problem, because two buffers are typically required, and in this case the buffer is completely transferred in about 100 lines, during forced blanking.
This is how I do it:
As I said, I use the two planes, then the tiles are ordered as follows: tile0 = planA, tile1 = planB, Tile2 = planA, tile3 = planB ... etc, from left to right and down.
Then AutoInc reg is set to 32 when using dma to be transferred, thus four pixel of each tile is drawn, and one of the two planes is moved -4 pixels (with scroll), and thus a continuous line from left to right is obtained, and to transfer the buffer completely, it is divided into 8 blocks of 2560 bytes.
Using this method, a continuous line equal to the "normal" method is achieved, and only need to change a bit codes to draw textures, lines and polygons, at least in my case only using small tables.
I made two videos to show the differences between the "normal" method and the method using DMA, (of course with the DMA method has no background):
https://www.youtube.com/watch?v=YUZpF2JLF4s
https://www.youtube.com/watch?v=oHLc0AzD85g
Here are the roms starfox3d demos of both methods (both use hint and have the code for faster filling polygons), also in the file I included the previous version to compare::)
http://www.mediafire.com/download/2guav ... 3d_new.rar