modified zdoom version, search for CS5650 for details