Zelda HLE: Implement square wave sample source.

Also fix Windows build.