libretro / gpsp

gpSP for libretro.
GNU General Public License v2.0
52 stars 52 forks source link

Enable big-endian devices: gc/wii #137

Closed davidgfnet closed 3 years ago

davidgfnet commented 3 years ago

This patch adds big-endian compatibility in gpsp (in general but only for the interpreter). There's no performance hit for little-endian platforms (should be a no-op) and only add a small overhead in memory accesses for big-endian platforms.

Most memory accesses are wrapped with a byteswap instruction and I/O reg accesses are also rewired for proper access (using macros). Video rendering has been fixed to also do byteswaps but there's a couple of games and rendering modes that still seem broken (but they amount to less than 20 games in my tests with 1K ROMs).

This also adds build rules and CI for NGC/WII/WIIU (untested)