Posted: Thu May 29, 2008 6:51 am
Hey Chilly.
I've thought about it but haven't achieved too long since :
- I don't know how much DMA is implemented in Gens (quite hard for debugging without it, right ?)
- copying sprites is very memory intensive, but I need a special DMAC for it :
I copy 8 bytes from a tile to 8 bytes in Frame Buffer. I then copy 8 bytes from a tile to a place located 320 bytes (at least) further in Frame Buffer. I thus need a special incremenation, and the SH2 DMAC only allows +1/+2/+4 increment. So, with DMA, the transfer would be faster, but between each transfer, I'd have to set the destination value, ie address DMAC registers, and that would be quite long. Moreover, I ain't sure whether the DMAC handles the bus better than the normal copy.
And I don't even speak of changing tile !
I've thought about SH2 DMA, but I'm afraid that changing regulary registers will sink my fillrate.
By the way, I only achieve nearly 2 layers with the 2 CPU. 2 layers is not exact. It would be more precise that I can achieve 2200 tiles/frames @ 30 fps. Using only one CPU, I'd reach just a little more than 1100 tiles/frames @ 30fps.
I've thought about it but haven't achieved too long since :
- I don't know how much DMA is implemented in Gens (quite hard for debugging without it, right ?)
- copying sprites is very memory intensive, but I need a special DMAC for it :
I copy 8 bytes from a tile to 8 bytes in Frame Buffer. I then copy 8 bytes from a tile to a place located 320 bytes (at least) further in Frame Buffer. I thus need a special incremenation, and the SH2 DMAC only allows +1/+2/+4 increment. So, with DMA, the transfer would be faster, but between each transfer, I'd have to set the destination value, ie address DMAC registers, and that would be quite long. Moreover, I ain't sure whether the DMAC handles the bus better than the normal copy.
And I don't even speak of changing tile !
I've thought about SH2 DMA, but I'm afraid that changing regulary registers will sink my fillrate.
By the way, I only achieve nearly 2 layers with the 2 CPU. 2 layers is not exact. It would be more precise that I can achieve 2200 tiles/frames @ 30 fps. Using only one CPU, I'd reach just a little more than 1100 tiles/frames @ 30fps.