gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > libnds GFX_VERTEX_RAM_USAGE bug?

#148633 - kusma - Tue Jan 08, 2008 2:08 am

I noticed the following while browsing the libnds video.h header:
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.