Optimized port/rewrite of SNES9x 1.52+ to Libretro.