How do you use the SPR for DoubleBuffering?

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
blueshogun96
Posts: 19
Joined: Thu Jun 09, 2005 3:18 am

How do you use the SPR for DoubleBuffering?

Post by blueshogun96 »

Hey everyone, I heard that it was possible to use the SPR (Scratch Pad Ram) to use double buffering in a ps2 app. I was wondering how to do this because I'd like to make a double buffer and keep it at 32-bits without using up all of my VRAM. Thanks.
b0rje
Posts: 7
Joined: Thu May 12, 2005 6:58 pm

Post by b0rje »

Hi,
this type of double buffering isnt related to the bouble buffering done by the GS. Double buffering using the SPR means that the CPU can write into the SPR during the fromSPR DMA channel copies data in the main mem without anybody waiting for the bus (is this possible because the SPR is this kind of dual port ram?). So start the fromSPR DMA channel from the first half of SPR mem and write your calculations in the second half of SPR mem. After calculations and transfer are done, swap the pointers to those mem areas and go on.
blueshogun96
Posts: 19
Joined: Thu Jun 09, 2005 3:18 am

Post by blueshogun96 »

hmm, that makes sense, thanks
Post Reply