C# port of mini2Dx