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

   

osReadHost

Format
#include <ultra64.h>
void osReadHost(void *vAddr, s32 nbytes);


Arguments
  • vAddr is the pointer to the DRAM virtual address; it should be 8-byte (64-bit) aligned
  • nbytes is the transfer size; due to a host restriction, it must be a multiple of 4
What This Function Does
The osReadHost, osWriteHost, osTestHost, osAckRamromRead, and osAckRamromWrite routines allow the game to transfer data back and forth from a host application to/from RDRAM. They work in concert with the host-to-target IO functions (uhOpenGame, uhCloseGame, uhReadGame, uhWriteGame, uhReadRamrom, and uhWriteRamrom) on the host side. The osReadHost routine sets up the game side connection to accept nbytes of data from the host and copy it to DRAM beginning at the address vAddr. For correct synchronization, it should be paired from the game side with the uhWriteGame function using exactly the same number of bytes. If the read is attempted from the game side before the host has executed the write, the game thread will block. Conversely, if the write is attempted from the host side before the game has executed a read, the host process will block. When both sides have correctly made the corresponding procedure call, the transfer will take place and the blocking side will proceed.

Note that the rmon debugging program must be running to manage the low-level synchronization.

See uhOpenGame for an example that shows how to correctly initiate and use a connection from the host.

See Also
osWriteHost
osTestHost
osAckRamromRead
osAckRamromWrite
uhOpenGame
uhCloseGame
uhReadGame
uhWriteGame
uhReadRamrom
uhWriteRamrom


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