psxcounters: handle overflow = target case
[pcsx_rearmed.git] / libpcsxcore / gpu.h
CommitLineData
ddbaf678 1
2/*
3 * q: Why bother with GPU stuff in a plugin-based emu core?
4 * a: mostly because of busy bits, we have all the needed timing info
5 * that GPU plugin doesn't.
6 */
7
8#define PSXGPU_LCF (1<<31)
9#define PSXGPU_nBUSY (1<<26)
10#define PSXGPU_ILACE (1<<22)
11
12#define HW_GPU_STATUS psxHu32ref(0x1814)
13
14// TODO: handle com too
15#define PSXGPU_TIMING_BITS (PSXGPU_LCF | PSXGPU_nBUSY)
16
17#define gpuSyncPluginSR() { \
18 HW_GPU_STATUS &= PSXGPU_TIMING_BITS; \
19 HW_GPU_STATUS |= GPU_readStatus() & ~PSXGPU_TIMING_BITS; \
20}