Perhaps you need to use real CGX rather than P96's CGX emulation?
Is that possible with a Mediator gfx card?
The SDL 1.2.6 README says
This version of SDL needs Cybergraphx V3 (r69+) or CyberGraphX V4 and AHI v3+. It works also with P96, althrough there are still some color problems with certain bitperpixel values. Maybe it works also with CGXAga, but it's untested.