N64® Functions Menu

al - Audio Library Functions
gDP - DP GBI Macros
gdSP - General GBI Macros
gSP - SP GBI Macros
gt - Turbo Microcode RDP
gu - Graphics Utilities
Math - Math Functions
nuSys - NuSystem
os - N64 Operating System
sp - Sprite Library Functions
uh - Host to Target IO
64DD - N64 Disk Drive

Nintendo® Confidential

   

osPiRawStartDma

Format
#include <ultra64.h>
s32 osPiRawStartDma(
   s32 direction, u32 devAddr,
   void *vAddr, u32 nbytes);
What These Functions Do
The osPiRawStartDma, osPiRawWriteIo, osPiRawReadIo, and osPiGetStatus provide low-level, unmanaged access to the peripheral interface (PI). The peripheral interface (PI) is responsible for the transport of data between RDRAM and bulk-storage devices (BSD) such as ROM, RAM, CD-ROM, and other technologies. These functions provide low-level, unmanaged access to the PI; that is, they do not use the PI manager.

These functions should be used only when it is ensured that there is no other services using the PI. For this reason, Nintendo strongly recommends that "cooked" or managed, high-level PI access routines be used for most purposes; see osPiStartDma for details on this functionality. The raw routines may be useful, however, immediately after the application boot procedure is entered and before the operating system is initialized.

Based on the specified input direction (OS_READ or OS_WRITE), The osPiRawStartDma routine sets up a DMA transfer between RDRAM virtual address specified by vAddr and the PI device address specified by devAddr. The length count specified by the nbytes argument contains the number of bytes to transfer (up to 16 megabytes) and must be a multiple of two bytes. The PI device address specified by the devAddr argument must be two-byte aligned. The RDRAM virtual address specified by vAddr must be at least eight-byte aligned, but for OS_READ DMA operations, a stricter alignment is recommended. See OS_DCACHE_ROUNDUP_ADDR for a description of the problems that can result when transfers are not an integral number of cache lines. The osPiRawStartDma routine also polls the interface for idleness before programming the DMA registers.

See Also
osPiRawWriteIo
osPiRawReadIo
osPiGetStatus
osPiStartDma


Nintendo® Confidential

Warning: all information in this document is confidential and covered by a non-disclosure agreement. You are responsible for keeping this information confidential and protected. Nintendo will vigorously enforce this responsibility.


Copyright © 1998
Nintendo of America Inc. All rights reserved
Nintendo and N64 are registered trademarks of Nintendo
Last updated January 1998