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





osGetMemSize

Syntax

#include <ultra64.h>
u32 osGetMemSize(void);


Explanation
A 4MB (=36 Mbit) Memory Pak is included with 64DD. With a disk-startup game, the IPL checks whether a Memory Pak is inserted in N64. With a Game Pak-startup game, this check must be performed by the Game Pak program. In this case, osGetMemSize should be used.

The function's return value is a byte. If the Memory Pak is inserted in the N64, the value of the return byte is 0x00800000. With a Game Pak-startup game, after confirming that a Memory Pak is inserted, be sure to enable use of the expansion area.

This function differs from the osMemSize global variable in that this function confirms the existence of the Memory Pak by actually writing data in part of the extended area. To confirm the presence of a Memory Pak, be sure to use osGetMemSize().

This function destroys the expansion area (0x8040_0000 - 0x807f_ffff) but does not destroy the original 4 MB N64 area (0x8000_0000 - 0x803f_ffff). The expansion area should not be used until osGetMemSize()is used to confirm that a Memory Pak is present.



See Also
osGlobals



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