N64® OS Functions
in Alphabetical Order

Nintendo® Confidential
             
To search the list, choose Find from the Edit menu in your browser.
OS_CYCLES_TO_NSECConverts from CPU Count register cycles to nanoseconds
OS_CYCLES_TO_USECConverts from CPU Count register cycles to microseconds
OS_DCACHE_ROUNDUP_ADDRRounds up an address to an alignment matching that of the R4300 data cache line size (16 bytes)
OS_DCACHE_ROUNDUP_SIZERounds up an integer value to match that of the R4300 data cache line size (16 bytes)
OS_K0_TO_PHYSICALTranslates from a cached, direct-mapped CPU address to a physical address
OS_K1_TO_PHYSICALTranslates from an uncached, direct-mapped CPU address to a physical address
OS_NSEC_TO_CYCLESConverts from nanoseconds to CPU Count register cycles
OS_PHYSICAL_TO_K0Translates from a physical address to a cached, direct-mapped CPU address
OS_PHYSICAL_TO_K1Translates from a physical address to an uncached, direct-mapped CPU address
OS_USEC_TO_CYCLESConverts from microseconds to CPU Count register cycles
osAckRamromReadIs no longer needed
osAckRamromWriteIs no longer needed
osAiGetLengthReturns the number of bytes remaining in the current DMA buffer
osAiGetStatusReturns the hardware status of the audio interface
osAiSetFrequencyBased on a requested frequency (in Hz), it calculates the correct values for the internal divisors and returns the actual frequency generated by these divisors
osAiSetNextBufferSets up the next DMA transfer from DRAM to the audio interface buffer
osAppNMIBufferIs a global variable that holds a 64-byte buffer that is cleared on a cold reset
osCartRomInitReturns the required hardware status information when using the ROM Emulator
osContGetQueryReturns Controller's status and type
osContGetReadDataReturns 3D Stick data and button settings to the pad
osContInitInitializes the game Controller
osContResetResets all game Controllers
osContSetChSets number of Controllers for reading
osContStartQuerySends Query command to the Controller to obtain Controller's status and type
osContStartReadDataIssues a read data command to obtain game Controller input settings
osCreateLogInitializes the OSLog data structure
osCreateMesgQueueInitializes a given OSMesgQueue structured message queue to an empty state
osCreatePiManagerCreates and starts the PI Manager system thread to provide mutual exclusion and synchronization support for the PI devices
osCreateRegionCreates any number of memory regions at run-time
osCreateSchedulerCreates an RCP task scheduler
osCreateThreadInitializes a specified thread and puts it on an active queue to make it known to the N64 debugger
osCreateViManagerInvokes the video interface (VI) manager system thread at the beginning of an application
osDestroyThreadRemoves a specified thread from the active queue as well as any other queue the thread may be on
osDpGetCountersGet internal performance counters from the display processor
osDpGetStatusReturns the hardware status of the display processor command status register
osDpSetNextBufferUpdates the display processor pointers causing the display processor to begin reading an RDP display list from the DRAM buffer
osDpSetStatusUpdates the display processor command status register with status
osEepromLongReadReads multiple blocks of data from EEPROM
osEepromLongWriteWrites multiple blocks of data to EEPROM
osEepromProbeRequests the status of EEPROM, and returns 1 if EEPROM exists, 0 if it does not
osEepromReadIssues a read EEPROM command to obtain 8 bytes of data from the specified address
osEepromWriteIssues a write EEPROM command to write 8 bytes of data to the specified address
osEPiGetDeviceTypeGains access to EPI without using the PI Manager to get the PI information recognized by the PI handler
osEPiLinkHandleSets a pointer to the next member using an EPI handler
osEPiRawReadIoPerforms 32-bit IO read operation and stores the value
osEPiRawStartDmaPerforms a polling operation to determine whether or not the interface is available before setting the DMA register
osEPiRawWriteIoPerforms a 32-bit IO write operation to the EPI's device address
osEPiReadIoPerforms 32-bit IO read operations from the PI device address
osEPiStartDmaSets up a DMA transfer condition between RDRAM and the EPI device address space
osEPiWriteIoPerforms 32-bit IO write operations to the PI device address
osFlushLogTransfers the log data to the host
osFreeDe-allocates a buffer by putting the buffer back at the head of the region's free list
osGetCauseReturns the current value of the MIPS R4300 Cause register that describes the cause of the most recent exception
osGetCompareReturns the current value of the R4300 Compare register
osGetConfigReturns the current value of the R4300 Configuration register
osGetCountReturns the current value of the MIPS R4300 Count register, a free running counter that increments at half the CPU clock speed
osGetCurrFaultedThreadReturns the most recent faulted thread or NULL if there is no faulted thread
osGetFpcCsrReturns the current value of the R4300 floating-point control/status register
osGetIntMaskGets the enabled interrupt mask
osGetMemSizeConfirms that the Memory Pak that comes with the N64 Disk Drive is inserted into the N64. All game Paks must use this function before using the Memory Pak
osGetNextFaultedThreadReturns the next faulted thread from the active thread queue based on the last thread
osGetRegionBufCountReturns the total number of buffers created for the region
osGetRegionBuffSizeReturns the size (in bytes) allocated for each buffer in the region
osGetSRReturns the current value of the R4300 Status register
osGetThreadIdObtains the debugger identifier of a thread
osGetThreadPriReturns the priority of the given thread
osGetTimeReturns the value of time in CPU Count register cycles since the last hard reset
osGetTLBASIDReturns the current TLB Address Space ID in the R4300 EntryHi register
osGetTLBHiReads the appropriate TLB entry and returns the value of the R4300 EntryHi register
osGetTLBLo0Reads the appropriate TLB entry and returns the value of the R4300 EntryLo0 register
osGetTLBLo1Reads the appropriate TLB entry and returns the value of the R4300 EntryLo1 register
osGetTLBPageMaskReads the appropriate TLB entry and returns the value of the R4300 PageMask register
osGlobalsIncludes the osTvType, osResetType, osMemSize, and osAppNMIBuffer Operating System global variables
osInitializePerforms hardware and software initialization procedures
osInitRdbSets up an outgoing buffer for the rdb debug port
osInvalDCacheInvalidates CPU data cache lines
osInvalICacheInvalidates CPU instruction cache lines
osJamMesgCopies the message to the front of the given message queue
osLogEventAdds an entry to the given log
osMallocAllocates a buffer by taking the buffer at the head of the region's free list and returns a pointer to that aligned buffer
osMapTLBSets the TLB entry index (ranges from 0 to 31)
osMemSizeIs a global variable that holds the installed main memory (DRAM) size in bytes
osMotorInitInitializes the Rumble Pak
osMotorStartStarts the Rumble Pak motor
osMotorStopStops the Rumble Pak motor
osPfsAllocateFileCreates a new game note
osPfsCheckerInspects and repairs the Controller Pak's file system
osPfsDeleteFileDeletes a game note
osPfsFileStateObtains game note information
osPfsFindFileSearches the specified game note
osPfsFreeBlocksObtains the available number of bytes in a Controller Pak
osPfsGetLabelReads the label of a Controller Pak
osPfsInitInitializes the Controller Pak's file handle
osPfsInitPakInitializes the Controller Pak's file handle. Call this function when dealing with the Controller Pak for the first time or when the Controller Pak is initially inserted
osPfsIsPlugDetects which Controller contains a Controller Pak
osPfsNumFilesAcquires the maximum note number and the number of notes used
osPfsReadWriteFileReading and writes game note game data
osPfsRepairldRepairs the Controller Pak file system
osPfsReSizeFileChanges the capacity reserved for game notes
osPfsSetLabelWrites to the Controller Pak label
osPhysicalToVirtualIs a function version of OS_PHYSICAL_TO_K0 and thus returns the direct-mapped, cached KSEG0 address corresponding to the specified address
osPiGetCmdQueueReturns a pointer to the command queue of the PI Manager or NULL if the PI Manager has not been started
osPiGetStatusReturns the hardware status of the peripheral interface (PI)
osPiRawReadIoPerforms a 32-bit programmed IO read from a specified PI device address, and it returns the value in data. It also polls the interface for idleness before performing the operation
osPiRawStartDmaSets up a DMA transfer between a specified RDRAM virtual address and a specified PI device address
osPiRawWriteIoPerforms a 32-bit programmed IO write to a specified PI device address
osPiReadIoPerforms a 32-bit programmed IO read from a specified PI device address and returns the value in data
osPiStartDmaSets up a DMA transfer between RDRAM and PI device address space by sending a specified IO message block request to the PI manager
osPiWriteIoPerforms a 32-bit programmed IO write to a specified PI device address
osProfileIs the group of functions (osProfileInit, osProfileStart, osProfileStop, osProfileFlush) that manage the execution-time profile for disjoint text spaces
osProfileFlushTransfers profile data to the gperf tool (program) assuming gperf is running in server mode
osProfileInitInitializes the profiled segment count buffers and starts an IO thread that communicates profile data to the host when requested by the gperf tool
osProfileStartStarts the profiler's interval counter
osProfileStopTurns off profiling
osReadHostSet up the game-side connection to accept data from the host and copy it to DRAM
osRecvMesgCopies the first message in the message queue into a specified address
osResetTypeIs a global variable that saves the cause of a system reboot
osScAddClientAdds a client to the RCP task scheduler
osScGetTaskQGets the message queue used for communicating with the scheduler thread
osScRemoveClientRemoves a client from the RCP task scheduler
osSendMesgCopies the message to the end of the given message queue
osSetCauseSets the new value for the MIPS R4300 Cause register that describes the cause of the most recent exception
osSetCompareSets the new value for the R4300 Compare register
osSetConfigSets the new value for the R4300 Configuration register
osSetErrorHandlerSets debug library error handling routine
osSetEventMesgAssociates a message queue and message with an event
osSetFpcCsrSets the new value for the R4300 floating-point control/status register
osSetIntMaskSet the enabled interrupt mask
osSetSRSets the new value for the R4300 Status register
osSetThreadPriSets the priority of specified thread
osSetTimeSets the value of time in CPU Count register cycles
osSetTimerStarts an interval or countdown timer
osSetTLBASIDSets a system-wide address space identifier register that makes valid only mappings of the given address space identifier (as well as global mappings)
osSpTaskLoadLoads the given task into the serial processor
osSpTaskStartIs a macro that performs an osSpTaskLoad call followed by an osSpTaskStartGo call
osSpTaskStartGoCauses the serial processor to begin executing
osSpTaskYieldRequests that the serial processor yield
osSpTaskYieldedReturns OS_TASK_YIELDED if the task successfully yielded; otherwise it returns 0 which indicates that the task finished normally before it could yield (and therefore should not be restarted later)
osStartThreadStarts or resumes a thread
osStopThreadSuspends a thread
osStopTimerStops an interval or countdown timer
osSyncPrintfosSyncPrintf formats the given character string on the target and flushes the string back to the host immediately upon its invocation
osTestHostIs no longer supported
osTvTypeIs a global variable that indicates whether the N64 system is configured for PAL video timing (0), NTSC (1), or MPAL (2)
osUnmapTLBRemoves any existing even or odd page mapping for the TLB entry index
osUnmapTLBAllRemoves all mappings at all indexes (invalidates the entire TLB)
osViBlackBlacks out the screen and still generates vertical retrace signals
osViFadeFades between the first 2 scan lines of the frame buffer
osViGetCurrentFieldReturns the field number (either 0 or 1) currently being used by the video interface
osViGetCurrentFramebufferReturns an opaque pointer to the currently displayed framebuffer
osViGetCurrentLineReturns the current half line, sampled once per line
osViGetCurrentModeReturns the video interface (VI) mode that is currently being used
osViGetNextFramebufferReturns an opaque pointer to the next framebuffer to be displayed
osViGetStatusReturns the value of the video interface status/control register
osViRepeatLineRepeats the first scan line of the frame buffer for the entire frame
osVirtualToPhysicalTranslate an arbitrary CPU virtual address to its physical address, if such a translation exists
osViSetEventRegisters a message queue and a message with the VI Manager
osViSetModeResets all current settings such X-Y scaling and special features (for example, gamma) to the default values defined in the global mode table
osViSetSpecialFeaturesAllows the caller to enable or disable various video interface special features such as GAMMA, GAMMA_DITHER, DIVOT, and DITHER_FILTER
osViSetXScaleAllows scaling the image up horizontally (in the X direction) to the required display format from a reduced number of rendered pixels per line
osViSetYScaleAllows scaling the image up vertically (in the Y direction) to the required display format from a reduced number of rendered lines per frame
osViSwapBufferRegisters the frame buffer to be displayed at the next vertical retrace interrupt
osWritebackDCacheWrites back all data cache lines that contain the region
osWritebackDCacheAllWrites back all cached locations to physical memory
osWriteHostAttempts to copy data from the game to the host
osYieldThreadYields the CPU and invokes the thread dispatcher
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.
Last updated January 1998