X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=plugins%2Fgpulib%2Fgpu.h;h=e03289b19d8b4cf5f5917f36421db2d26311a6e4;hb=a4e249a1373cf6269e1e4e0d60105e72210e67d3;hp=9f4271408dc01fd3d2a810f21d42111d419dcc3f;hpb=61124a6d0fb6a2980f9025630382d9b76c07066f;p=pcsx_rearmed.git diff --git a/plugins/gpulib/gpu.h b/plugins/gpulib/gpu.h index 9f427140..e03289b1 100644 --- a/plugins/gpulib/gpu.h +++ b/plugins/gpulib/gpu.h @@ -19,6 +19,18 @@ extern "C" { #define CMD_BUFFER_LEN 1024 +#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +#define HTOLE32(x) __builtin_bswap32(x) +#define HTOLE16(x) __builtin_bswap16(x) +#define LE32TOH(x) __builtin_bswap32(x) +#define LE16TOH(x) __builtin_bswap16(x) +#else +#define HTOLE32(x) (x) +#define HTOLE16(x) (x) +#define LE32TOH(x) (x) +#define LE16TOH(x) (x) +#endif + #define BIT(x) (1 << (x)) #define PSX_GPU_STATUS_DHEIGHT BIT(19) @@ -120,7 +132,7 @@ struct GPUFreeze; long GPUinit(void); long GPUshutdown(void); void GPUwriteDataMem(uint32_t *mem, int count); -long GPUdmaChain(uint32_t *rambase, uint32_t addr); +long GPUdmaChain(uint32_t *rambase, uint32_t addr, uint32_t *progress_addr); void GPUwriteData(uint32_t data); void GPUreadDataMem(uint32_t *mem, int count); uint32_t GPUreadData(void);