Regarding my previous post... So, vetz donated PCX2 in order to help development, so I would like to publicly thank him for this generous gesture. Thank you, vetz! 😀
For now it helped my NEC PowerVR in PCem emulation to become more mature because I could do a basic reverse engineering in order to gather information about registers. For now I discovered some registers of which I'm 100% sure also now I know more or less how communication between driver and PCX2 works - where and how in PowerVR's memory is information stored about tiles, context etc. The problem is that even if everything should be correct, still SGL library does not load, so I think I missed some register and because of this driver goes to different code path. Tomb Raider works, but is null rendered, if only I could get SGL to work in Windows then I can write some demos in order to discover the rest of registers and implement simple rasterizer.
Also I wrote from scratch new MiniGL driver for PCX2, it's lightweight, working and very fast. For now fully supports retained and immediate mode, most API functions, but texturing is not supported as well as other more serious things like mipmapping, blending or direct access to framebuffer (which anyway will be unsupported I think). This code may be used as a base for wrapping OpenGL over other APIs.