Ok so I did my own Grim/scummvm minimalistic recompilation:
So far checked shadows issues:
Basically stencil functions are completely ignored. Checked engines/grim/gfx_opengl.cpp source with a debian scummvm build.
In GfxOpenGL::drawShadowPlanes() if I disable whatever stencil call, I get the same failures as the MOS version (of course).
Furthermore, removing the stencil disable in GfxOpenGL::clearShadowMode() I get a black screen (as supossed). In MOS version screen is still rendered.
So well, I don't know if it's a "feature" of SDLMOS library or R200 library. I know for sure that asking with SDL functions about OpenGL attributes it always shows that Stencil is "0", same as depth. Ignored?