#142005 - Rajveer - Wed Oct 03, 2007 12:32 am
What's the best way to do this? I have a function to reload a texture into vram which uses the following code to unlock vram, load a texture, and lock vram within vcount values 192 and 214:
However it seems as if it misses 192-200 frequently, turning my textures into coloured blobs :S Would I wait for an interrupt? How would I do this?
P.s. reason I used 192-200 instead of 214 is to give me enough time to actually do the copy before 214 comes around.
Code: |
while((REG_VCOUNT < 192) || (REG_VCOUNT > 200))
{} if((REG_VCOUNT >= 192) && (REG_VCOUNT <= 200)) { unlock banks, load texture, lock banks } |
However it seems as if it misses 192-200 frequently, turning my textures into coloured blobs :S Would I wait for an interrupt? How would I do this?
P.s. reason I used 192-200 instead of 214 is to give me enough time to actually do the copy before 214 comes around.