| 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 | #define PSXGPU_DHEIGHT (1<<19) |
| 12 | |
| 13 | // both must be set for interlace to work |
| 14 | #define PSXGPU_ILACE_BITS (PSXGPU_ILACE | PSXGPU_DHEIGHT) |
| 15 | |
| 16 | #define HW_GPU_STATUS psxHu32ref(0x1814) |
| 17 | |
| 18 | // TODO: handle com too |
| 19 | #define PSXGPU_TIMING_BITS (PSXGPU_LCF | PSXGPU_nBUSY) |
| 20 | |
| 21 | #define gpuSyncPluginSR() { \ |
| 22 | HW_GPU_STATUS &= PSXGPU_TIMING_BITS; \ |
| 23 | HW_GPU_STATUS |= GPU_readStatus() & ~PSXGPU_TIMING_BITS; \ |
| 24 | } |