Shash : I've fixed a bug in 3D viewport calculation. The bug is quite stupid : in the NDS the "h" and "w" params of the viewport command are the coordinates of the bottom-right corner of the viewport. In OpenGL these params are the height and width of the viewport. I've attached 2 screenshots, one of the official version and one of my version, to show what I fixed. (It's the Nehe10 sample from the libnds, I've modded it to reduce the viewport to (3, 3, 255-3, 191-3) to get 3-pixel borders). I tell it to you in order to allow you to fix it too.