#ifndef __GPU_H__
#define __GPU_H__
+#include <stdint.h>
+
+typedef struct GPUFreeze {
+ uint32_t ulFreezeVersion;
+ uint32_t ulStatus;
+ uint32_t ulControl[256];
+ unsigned char psxVRam[1024*512*2];
+} GPUFreeze_t;
+
#define PSXGPU_LCF (1u<<31)
#define PSXGPU_nBUSY (1u<<26)
#define PSXGPU_ILACE (1u<<22)
+#define PSXGPU_RGB24 (1u<<21)
#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 | PSXGPU_FIELD)
+#define PSXGPU_ILACE_BITS (PSXGPU_ILACE | PSXGPU_DHEIGHT)
#define HW_GPU_STATUS psxHu32ref(0x1814)
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, int cycles);
+
#endif /* __GPU_H__ */