X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=libpcsxcore%2Fgpu.h;h=ec5019c9cf2317e7ef3a40185b9701c6fad503b5;hb=98c546239bc51eecf56e00e10fd98fa3f79dd221;hp=98a22a0a8d6ebeef8a5772ca89f47e0bd551c6fc;hpb=edfb913768c9ebd50a0ba810697e2ab7056bcc3e;p=pcsx_rearmed.git diff --git a/libpcsxcore/gpu.h b/libpcsxcore/gpu.h index 98a22a0a..ec5019c9 100644 --- a/libpcsxcore/gpu.h +++ b/libpcsxcore/gpu.h @@ -24,10 +24,11 @@ #ifndef __GPU_H__ #define __GPU_H__ -#define PSXGPU_LCF (1<<31) -#define PSXGPU_nBUSY (1<<26) -#define PSXGPU_ILACE (1<<22) -#define PSXGPU_DHEIGHT (1<<19) +#define PSXGPU_LCF (1u<<31) +#define PSXGPU_nBUSY (1u<<26) +#define PSXGPU_ILACE (1u<<22) +#define PSXGPU_DHEIGHT (1u<<19) +#define PSXGPU_FIELD (1u<<13) // both must be set for interlace to work #define PSXGPU_ILACE_BITS (PSXGPU_ILACE | PSXGPU_DHEIGHT) @@ -35,11 +36,19 @@ #define HW_GPU_STATUS psxHu32ref(0x1814) // TODO: handle com too -#define PSXGPU_TIMING_BITS (PSXGPU_LCF | PSXGPU_nBUSY) +#define PSXGPU_TIMING_BITS (PSXGPU_LCF | PSXGPU_nBUSY | PSXGPU_FIELD) #define gpuSyncPluginSR() { \ - HW_GPU_STATUS &= PSXGPU_TIMING_BITS; \ - HW_GPU_STATUS |= GPU_readStatus() & ~PSXGPU_TIMING_BITS; \ + HW_GPU_STATUS &= SWAP32(PSXGPU_TIMING_BITS); \ + HW_GPU_STATUS |= SWAP32(GPU_readStatus() & ~PSXGPU_TIMING_BITS); \ } +enum psx_gpu_state { + PGS_VRAM_TRANSFER_START, + PGS_VRAM_TRANSFER_END, + PGS_PRIMITIVE_START, // for non-dma only +}; + +void gpu_state_change(int what); + #endif /* __GPU_H__ */