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
|
osReadHostFormat#include <ultra64.h> void osReadHost(void *vAddr, s32 nbytes); Arguments
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
|