#165497 - Dwedit - Tue Dec 23, 2008 7:40 am
In this post
Does declaring pointers as Volatile help this at all? What about only accessing VRAM with Memcpy?[/url]
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."
wintermute wrote: |
These days gcc does quite a bit of code re-ordering too where it believes that order of execution doesn't matter. This can be particularly troublesome when memory is banked - after all the compiler has absolutely no idea that writing to a particular memory location will move memory to a completely different place. That one has bitten me several times when copying data into a VRAM bank before switching it to the ARM7 or the 3D hardware - it's not that easy to debug either. If the compiler has access to more of your code it's much easier for it to put it in entirely the wrong place. |
Does declaring pointers as Volatile help this at all? What about only accessing VRAM with Memcpy?[/url]
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."