CopyVRAMPages

Copies a contiguous number of VRAM pages to a VRAM destination.

Synopsis

Err CopyVRAMPages (Item ioreq,void *dest,void *src,uint32 numpages,uint32 mask)

Description

This call is a convenience call for SPORT device transfers. It copies the specified numpages number of pages from the specified src VRAM pages to the specified dest VRAM pages. The mask argument controls which bits of the destination are modified by bits of the source.

This call uses the SPORT device to do the transfer. It does not return until the transfer is completed. That is, there is an implicit wait for the next VBlank to occur, as SPORT transfers take place only during vertical blank.

Arguments

ioreq
Item number of the I/O request.
dest
Pointer to the VRAM buffer to receive the copy.
src
Pointer to the VRAM buffer that's the source of the copy.
numpages
Number of VRAM pages to be copied.
mask
Write mask, which controls which bits of the source get copied to the destination.

Return Value

The call returns a non-negative value if successful or an error code (a negative value) if an error occurs.

Notes

The use of a mask value other than all 1s (0xFFFFFFFF) is discouraged. Future systems may not support this feature in a performance-conscious manner.

Implementation

Convenience call implemented graphics.lib V20.

Associated Files

graphics.h, graphics.lib

See Also

CloneVRAMPages(), SetVRAMPages(), SetVRAMPagesDefer(), CopyVRAMPagesDefer(), CloneVRAMPagesDefer(), GetVRAMIOReq(), GetPageSize()