#include <ultra64.h>
void osReadHost(void *vAddr, s32 nbytes);
void osWriteHost(void *vAddr, s32 nbytes);
s32 osTestHost(void);
* osTestHost routine is not supported.
* osAckRamromRead and osAckRamromWrite are used to form associations with uhReadRamrom and uhWriteRamrom. There currently is no need to use these functions - they are ignored.
Explanation
These routines are used to transfer data between the 64 game and the host application. These are written into the 64 program, and function paired with the uj** function, which is declared in in the host-side application.
The osReadHost routine receives nbytes of data sent by uhWriteGame on the host side at the address vAddr in RDRAM.
The osWriteHost routine transfers nbytes of data from the address vAddr in RDRAM to uhReadGame on the host side.
For more precise synchronization, accurately match the numbers of bytes transferred in the paired functions osReadHost and uhWriteGame, and osWriteHost and uhReadGame.
When any of the functions is called, the corresponding host-side command is executed, and the thread at the call origin is blocked until the transfer is completed.
For example, if osReadHost is executed on the game side, the thread on the game side is interrupted until uhWriteGame is executed on the host side. Conversely, if uhWriteGame is executed, the program is blocked on the host side until osReadHost is executed on the game side.
Align the DRAM virtual address on 8 bytes (64 bit). Also make the transfer size nbytes a multiple of 4. (Due to a 4 bytes restriction on the host side)
Please be aware of the "endian" differences when data transferred from a host-side program on an Intel machine are to be used by a 64 program, or when data transferred from a 64 program are to be used by a host-side program on an Intel machine.
Cautions
Because these use 64 development environment functions, it is necessary to link to a debugging library when compiling. (-|**_d)
Restrictions in PARTNER
- Add the PTN64 definition to the compile options in makefile. (-DPTN64)
- osCreateViManager must be executed before using this routine in the PC version of PARTNER. This is a restriction since a timer is used inside the function.
See uhOpenGame for an example that shows how to correctly initiate and use a connection from the host.
See Also
osReadHost
uhReadGame
uhOpenGame
uhCloseGame
uhWriteGame
|
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 March 1998
|