#148633 - kusma - Tue Jan 08, 2008 2:08 am
I noticed the following while browsing the libnds video.h header:
Is is just me, or should at least the two first registers be defined volatile since the hardware can change the values between reads to the register due to fifo-action? I'd assume the GFX_CUTOFF_DEPTH register should be volatile as well, since you'd want writes to it to happen at the correct time as well.
Code: |
#define GFX_VERTEX_RAM_USAGE (*(uint16*) 0x04000606) #define GFX_POLYGON_RAM_USAGE (*(uint16*) 0x04000604) #define GFX_CUTOFF_DEPTH (*(uint16*)0x04000610) |
Is is just me, or should at least the two first registers be defined volatile since the hardware can change the values between reads to the register due to fifo-action? I'd assume the GFX_CUTOFF_DEPTH register should be volatile as well, since you'd want writes to it to happen at the correct time as well.