I thought it would be great to run dyson on linux or mac, tried it and failed. Then I ran it through MoMA and saw: Oh, there is a P/Invoke down in Wuwei.dll. I fired up .NET Reflector and the unportable class looked suspicously like the QueryPerfCounter from msdn. So I've googled some time and eventually found a class which offers the same methods as the p/invoked methods: System.Diagnostics.Stopwatch
namespace Wuwei.Core {
using System;
using System.Diagnostics;
public class PrecisionTimer
{
private static readonly Decimal multiplier = new Decimal(1.0e9);
private long start, stop;
public void Start()
{
start = Stopwatch.GetTimestamp();
}
public void Stop()
{
stop = Stopwatch.GetTimestamp();
}
public double Duration(int iterations)
{
return ((((double)(stop - start) * (double)multiplier) / (double)Stopwatch.Frequency)/iterations);
}
}
}
Then I patched it into Wuwei.dll and Dyson ran flawlessly

Some hints:
- You will need the *.dll.config files from SdlDotNet, get them from their websites
- Under OS X you will need a application bundle or you will encouter some very strange bugs, you may use macpack to create one
Other Dependencies:
- mono (duh). 1.9.1 worked great for me
- SDL, SDL_image, SDL_mixer and SDL_gfx
- libvorbis and libpng
If you're running linux you may get all that stuff from the package manager of your distribution.
If you are ready you can start Dyson in the shell with
mono Dyson.exeEdit: cleanup
Edit2:
submitted the patch to the Wuwei tracker, hope they will notice it