Files
psxrecomp/runtime/include/gpu_interlace.h
T
2026-09-06 13:13:03 +03:00

17 lines
684 B
C

#ifndef PSX_GPU_INTERLACE_H
#define PSX_GPU_INTERLACE_H
/* GP0 raster primitives skip the active field only in 480i mode with
* drawing-to-display prohibited. VRAM transfer commands do not use this rule.
* Return -1 for progressive drawing, otherwise the native VRAM row parity
* that must remain unchanged. The display origin participates in that parity. */
static inline int psx_gpu_raster_skipped_row(unsigned interlace,
unsigned high_vertical_resolution, unsigned draw_to_display,
unsigned display_y, unsigned field) {
if (!interlace || !high_vertical_resolution || draw_to_display)
return -1;
return (int)((display_y + field) & 1u);
}
#endif