osGetMemSize osGetMemSize (function)

Checks for a Memory Exansion Pak (for 64DD)

Syntax

#include <ultra64.h>     /* ultra64.h */

u32 osGetMemSize(void);

Description

A 4MB (=36 Mbit) Memory Expansion Pack is included with 64DD. With a disk-startup game, the IPL checks whether a Memory Expansion Pack is inserted in N64. With a cassette-startup game, this check must be performed by the cassette 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 cassette-startup game, after confirming that a Memory Expansion Pack is inserted, be sure to enable use of the expansion area.

This function differs from the osMemSize (see osGlobals) 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 Expansion Pack, 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 Expansion Pack is present.

See Also

osMemSize

Revision History

1999/04/30 Changed Format