dciabrin / ngdevkit

Open source development for Neo-Geo
GNU Lesser General Public License v3.0
262 stars 26 forks source link

Registers in include/ngdevkit/registers.h should be casted to (volatile u8/16 *) #51

Closed KScl closed 2 years ago

KScl commented 2 years ago

... as opposed to (u8/16 *) like they currently are, to keep GCC from optimizing out register read/writes. Writing to VRAM with -O1 or higher is basically impossible otherwise.

dciabrin commented 2 years ago

Oops, you're right, the volatile keyword disappeared during the refactoring in 9adf0c6becfbf3100749d06c9cd7a3a515a4ef95. I'm adding them back.