Hello you all !
Long time no see.
I'd like to answer to ammianus
ammianus wrote:Every few months I return to these forums and try to reread this thread, hoping I'll understand better after having learned more on my own about programming a similar kind of demo for a while now. I still can't make heads or tails about what is going on here. :(
When I started SuperVDP, I didn't know how to do it. The end result is far far away from what I planned in the very beginning.
ammianus wrote:ob1, could you please perhaps explain, for us civilians, what your final demo is actually doing?
The demo takes 2 tiles plane and scroll them.
The Vega (?) stage features line scrolling, whereas the "chinese" stage features sprites (the boat and the kanji).
Don' have it right now. It's a little bit simpler than the diagram though.
ammianus wrote:In the end are you using both processors for drawing sprites/tiles?
Absolutely.
The master draws sprites that lay in the upper screen (0 to 111), and the slave draws sprite that lay in the lower screen (112 to 223).
ammianus wrote:If so, how do you divide work between them?
As far as I remember, the CPU says :
for each scanline (0 to 111 or 112 to 223),
I browse the plane table (which is similar to the Genesis plane table),
If a line from a tile is the same of the current scanline
Then I draw this line of the tile
ammianus wrote:Are you using DMA after all? If so, how?
Definitely !
DMA, byte by byte, from the tiles data to the Frame Buffer.
If I remember correctly,
the Master DMA0 is used to transfer tile data from the Genesis side to the 32x SDRAM
the Master DMA1 is for the SuperVDP
the Slave DMA0 is for the SuperVDP
the Slave DMA1 is fr the 32x palette.
ammianus wrote:What size tile are you using in final version of the demo?
8x8 I guess, but it could go up to 32x32.
Besides, sprites are handled differently. You'll only find raw data (colors), and not indirect access to tiles.
ammianus wrote:I see you have done impressive things, squeezing every last cycle from the 32X for best possible performance.
I have been rethinking about it quite recently, and there's a way to be faster. That's the NeoGeo 32x thing I won't have time to do.
Feel free to develop it ;)
ammianus wrote:When you have scrolling planes though, are you redrawing the FB each time?
Yes.
ammianus wrote:In my simplistic game demo, I "scroll" the background, but really I am just telling it what part of the game map to draw each frame. Is that what you mean by scrolling? Or is it something more fundamental than that? Anyway you can diagram what it is you do? :D
In a Genesis only game, for each frame, the 68k tells the VDP what is to be drawn : scroll data, plane table, sprite data, tiles, palette ...
It's exactly the same for the SuperVDP. For each frame, the 68k tells the
SuperVDP what to draw : scroll data, plane table, tiles, sometimes sprites, palette. My 2 demos focus only on a stage (~640 x 224), but if you want something bigger (a game demo), the 68k would have to tell the 32x what to draw, determine what part of the game map to draw, and so on...
My demos are more proof of the concept, 32x-side.
Hop that helps ;)