KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
pvr_dma.h File Reference

PVR/TA DMA interface. More...

#include <sys/cdefs.h>
#include <dc/sq.h>

Go to the source code of this file.

Typedefs

typedef void * pvr_ptr_t
 
typedef void(* pvr_dma_callback_t) (void *data)
 PVR DMA interrupt callback type.
 

Enumerations

enum  pvr_dma_type_t {
  PVR_DMA_VRAM64 , PVR_DMA_VRAM32 , PVR_DMA_TA , PVR_DMA_YUV ,
  PVR_DMA_VRAM32_SB , PVR_DMA_VRAM64_SB , PVR_DMA_REGISTERS
}
 

Functions

int pvr_dma_transfer (const void *src, void *dest, size_t count, pvr_dma_type_t type, int block, pvr_dma_callback_t callback, void *cbdata)
 Perform a DMA transfer to/from the TA/PVR RAM.
 
int pvr_txr_load_dma (const void *src, pvr_ptr_t dest, size_t count, int block, pvr_dma_callback_t callback, void *cbdata) __depr("Use pvr_dma_ta_load_txr instead.")
 Load a texture using TA DMA.
 
int pvr_dma_ta_load_txr (const void *src, pvr_ptr_t dest, size_t count, int block, pvr_dma_callback_t callback, void *cbdata)
 Load a texture using TA DMA.
 
int pvr_dma_rb_load_txr (const void *src, pvr_ptr_t dest, size_t count, int block, pvr_dma_callback_t callback, void *cbdata)
 Load a texture using PVR DMA.
 
int pvr_dma_download_txr (const void *src, void *dest, size_t count, int block, pvr_dma_callback_t callback, void *cbdata)
 Download a texture using PVR DMA.
 
int pvr_dma_load_ta (const void *src, size_t count, int block, pvr_dma_callback_t callback, void *cbdata)
 Load vertex data to the TA using TA DMA.
 
int pvr_dma_yuv_conv (const void *src, size_t count, int block, pvr_dma_callback_t callback, void *cbdata)
 Load yuv data to the YUV converter using TA DMA.
 
int pvr_dma_ready (void) __depr("Use pvr_dma_ta_ready instead.")
 Checks if the TA DMA is inactive.
 
int pvr_dma_ta_ready (void)
 Checks if the TA DMA is inactive.
 
int pvr_dma_rb_ready (void)
 Checks if the PVR DMA is inactive.
 
void pvr_dma_init (void)
 Initialize TA/PVR DMA.
 
void pvr_dma_shutdown (void)
 Shut down TA/PVR DMA.
 
void * pvr_sq_load (void *dest, const void *src, size_t n, pvr_dma_type_t type)
 Copy a block of memory to VRAM.
 
void * pvr_sq_set16 (void *dest, uint32_t c, size_t n, pvr_dma_type_t type)
 Set a block of PVR memory to a 16-bit value.
 
void * pvr_sq_set32 (void *dest, uint32_t c, size_t n, pvr_dma_type_t type)
 Set a block of PVR memory to a 32-bit value.
 

Detailed Description

PVR/TA DMA interface.

This file provides support for PVR DMA and TA DMA transfers in the Dreamcast. These DMA types can be used independently of each other, and both can operate concurrently. Depending on the transfer method specified, the appropriate DMA mechanism is selected.

TA DMA (Tile Accelerator DMA): This is a one-way transfer method used primarily for submitting data directly to the Tile Accelerator (TA). It is commonly used for submitting vertex data, texture data, and YUV conversion data.

PVR DMA (PowerVR DMA): This is a more flexible, two-way transfer mechanism that supports both uploading and downloading data. PVR DMA is used for transferring textures and palette data to VRAM, downloading data from VRAM to the SH4, and for handling register data (e. palettes, fog tables).

Author
Megan Potter
Roger Cattermole
Paul Boese
Brian Paul
Lawrence Sebald
Benoit Miller
Ruslan Rostovtsev

Typedef Documentation

◆ pvr_ptr_t

typedef void* pvr_ptr_t