You've already forked ultrasm64-2
mirror of
https://github.com/HackerN64/ultrasm64-2.git
synced 2026-01-21 10:38:08 -08:00
Refresh 16.5
This commit is contained in:
97
include/PR/bcp.h
Normal file
97
include/PR/bcp.h
Normal file
@@ -0,0 +1,97 @@
|
||||
#ifndef _BCP_H_
|
||||
#define _BCP_H_
|
||||
|
||||
#ifdef BBPLAYER
|
||||
#include "rcp.h"
|
||||
|
||||
/**
|
||||
* MIPS Interface (MI) Additional Registers
|
||||
*/
|
||||
|
||||
//! MI_SK_EXCEPTION_REG ?
|
||||
#define MI_14_REG (MI_BASE_REG + 0x14)
|
||||
|
||||
//! MI_SK_WATCHDOG_TIMER ?
|
||||
#define MI_18_REG (MI_BASE_REG + 0x18)
|
||||
|
||||
//! ?
|
||||
#define MI_30_REG (MI_BASE_REG + 0x30)
|
||||
|
||||
//! MI_HW_INTR_REG ?
|
||||
#define MI_38_REG (MI_BASE_REG + 0x38)
|
||||
|
||||
//! MI_HW_INTR_MASK_REG ?
|
||||
#define MI_3C_REG (MI_BASE_REG + 0x3C)
|
||||
|
||||
/**
|
||||
* Peripheral Interface (PI) Additional Registers
|
||||
*/
|
||||
|
||||
//! PI_ATB_UPPER_REG ?
|
||||
#define PI_40_REG (PI_BASE_REG + 0x40)
|
||||
|
||||
//! ?
|
||||
#define PI_44_REG (PI_BASE_REG + 0x44)
|
||||
|
||||
//! PI_CARD_CNT_REG ?
|
||||
#define PI_48_REG (PI_BASE_REG + 0x48)
|
||||
|
||||
//! ?
|
||||
#define PI_4C_REG (PI_BASE_REG + 0x4C)
|
||||
|
||||
//! PI_AES_CNT_REG ?
|
||||
#define PI_50_REG (PI_BASE_REG + 0x50)
|
||||
|
||||
//! PI_ALLOWED_IO_REG ?
|
||||
#define PI_54_REG (PI_BASE_REG + 0x54)
|
||||
|
||||
//! PI_EX_RD_LEN_REG ?
|
||||
#define PI_58_REG (PI_BASE_REG + 0x58)
|
||||
|
||||
//! PI_EX_WR_LEN_REG ?
|
||||
#define PI_5C_REG (PI_BASE_REG + 0x5C)
|
||||
|
||||
//! PI_MISC_REG ?
|
||||
#define PI_60_REG (PI_BASE_REG + 0x60)
|
||||
|
||||
//! ?
|
||||
#define PI_64_REG (PI_BASE_REG + 0x64)
|
||||
|
||||
//! PI_CARD_BLK_OFFSET_REG ?
|
||||
#define PI_70_REG (PI_BASE_REG + 0x70)
|
||||
|
||||
//! PI_EX_DMA_BUF ?
|
||||
#define PI_10000_REG(i) (PI_BASE_REG + 0x10000 + (i))
|
||||
|
||||
//! PI_ATB_LOWER_REG ?
|
||||
#define PI_10500_REG(i) (PI_BASE_REG + 0x10500 + (i) * 4)
|
||||
|
||||
/**
|
||||
* Serial Interface (SI) Additional Registers
|
||||
*/
|
||||
|
||||
//! ?
|
||||
#define SI_0C_REG (SI_BASE_REG + 0x0C)
|
||||
|
||||
//! ?
|
||||
#define SI_1C_REG (SI_BASE_REG + 0x1C)
|
||||
|
||||
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
|
||||
|
||||
extern u8 *__osBbEepromAddress;
|
||||
extern u32 __osBbEepromSize;
|
||||
extern u32 __osBbFlashAddress;
|
||||
extern u32 __osBbFlashSize;
|
||||
extern u32 __osBbSramAddress;
|
||||
extern u32 __osBbSramSize;
|
||||
extern u32 *__osBbPakAddress[];
|
||||
extern u32 __osBbPakSize;
|
||||
extern u32 __osBbIsBb;
|
||||
extern u32 __osBbHackFlags;
|
||||
|
||||
void skKeepAlive(void);
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
114
include/PR/gu.h
114
include/PR/gu.h
@@ -1,29 +1,99 @@
|
||||
#ifndef _ULTRA64_GU_H_
|
||||
#define _ULTRA64_GU_H_
|
||||
#ifndef _GU_H_
|
||||
#define _GU_H_
|
||||
|
||||
/**************************************************************************
|
||||
* *
|
||||
* Copyright (C) 1994, Silicon Graphics, Inc. *
|
||||
* *
|
||||
* These coded instructions, statements, and computer programs contain *
|
||||
* unpublished proprietary information of Silicon Graphics, Inc., and *
|
||||
* are protected by Federal copyright law. They may not be disclosed *
|
||||
* to third parties or copied or duplicated in any form, in whole or *
|
||||
* in part, without the prior written consent of Silicon Graphics, Inc. *
|
||||
* *
|
||||
**************************************************************************/
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* $Revision: 1.48 $
|
||||
* $Date: 1999/07/13 08:00:20 $
|
||||
* $Source: /exdisk2/cvs/N64OS/Master/cvsmdev2/PR/include/gu.h,v $
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
#include <PR/mbi.h>
|
||||
#include <PR/ultratypes.h>
|
||||
#include <PR/sptask.h>
|
||||
|
||||
#define GU_PI 3.1415926
|
||||
/* Functions */
|
||||
#ifndef MAX
|
||||
#define MAX(a,b) (((a)>(b))?(a):(b))
|
||||
#endif
|
||||
#ifndef MIN
|
||||
#define MIN(a,b) (((a)<(b))?(a):(b))
|
||||
#endif
|
||||
|
||||
void guPerspectiveF(float mf[4][4], u16 *perspNorm, float fovy, float aspect,
|
||||
float near, float far, float scale);
|
||||
void guPerspective(Mtx *m, u16 *perspNorm, float fovy, float aspect, float near,
|
||||
float far, float scale);
|
||||
void guOrtho(Mtx *m, float left, float right, float bottom, float top,
|
||||
float near, float far, float scale);
|
||||
void guTranslate(Mtx *m, float x, float y, float z);
|
||||
void guRotate(Mtx *m, float a, float x, float y, float z);
|
||||
void guScale(Mtx *m, float x, float y, float z);
|
||||
void guMtxF2L(float mf[4][4], Mtx *m);
|
||||
void guMtxIdent(Mtx *m);
|
||||
void guMtxIdentF(float mf[4][4]);
|
||||
void guMtxL2F(float mf[4][4], Mtx *m);
|
||||
void guNormalize(float *, float *, float *);
|
||||
#define M_PI 3.14159265358979323846
|
||||
|
||||
#define GU_PI 3.1415926
|
||||
|
||||
#define FTOFIX32(x) (long)((x) * (float)0x00010000)
|
||||
#ifdef AVOID_UB
|
||||
#define FIX32TOF(x) ((float)(x) * (1.0f / (float)0x00010000))
|
||||
#else
|
||||
#define FIX32TOF(x) (x / (float)0x00010000)
|
||||
#endif
|
||||
#define FTOFRAC8(x) ((int) MIN(((x) * (128.0f)), 127.0f) & 0xff)
|
||||
|
||||
#define FILTER_WRAP 0
|
||||
#define FILTER_CLAMP 1
|
||||
|
||||
/*
|
||||
* matrix operations:
|
||||
*
|
||||
* The 'F' version is floating point, in case the application wants
|
||||
* to do matrix manipulations and convert to fixed-point at the last
|
||||
* minute.
|
||||
*/
|
||||
extern void guMtxIdent(Mtx *m);
|
||||
extern void guMtxIdentF(float mf[4][4]);
|
||||
extern void guOrtho(Mtx *m, float l, float r, float b, float t,
|
||||
float n, float f, float scale);
|
||||
extern void guOrthoF(float mf[4][4], float l, float r, float b, float t,
|
||||
float n, float f, float scale);
|
||||
extern void guPerspective(Mtx *m, u16 *perspNorm, float fovy,
|
||||
float aspect, float near, float far, float scale);
|
||||
extern void guPerspectiveF(float mf[4][4], u16 *perspNorm, float fovy,
|
||||
float aspect, float near, float far, float scale);
|
||||
extern void guRotate(Mtx *m, float a, float x, float y, float z);
|
||||
extern void guRotateF(float mf[4][4], float a, float x, float y, float z);
|
||||
extern void guScale(Mtx *m, float x, float y, float z);
|
||||
extern void guScaleF(float mf[4][4], float x, float y, float z);
|
||||
extern void guTranslate(Mtx *m, float x, float y, float z);
|
||||
extern void guTranslateF(float mf[4][4], float x, float y, float z);
|
||||
extern void guMtxF2L(float mf[4][4], Mtx *m);
|
||||
extern void guMtxL2F(float mf[4][4], Mtx *m);
|
||||
|
||||
/* vector utility: */
|
||||
extern void guNormalize(float *x, float *y, float *z);
|
||||
|
||||
/* Used only in Fast3DEX2 */
|
||||
void guLookAtReflect (Mtx *m, LookAt *l, float xEye, float yEye, float zEye,
|
||||
float xAt, float yAt, float zAt,
|
||||
float xUp, float yUp, float zUp);
|
||||
#endif
|
||||
extern void guLookAtReflect(Mtx *m, LookAt *l,
|
||||
float xEye, float yEye, float zEye,
|
||||
float xAt, float yAt, float zAt,
|
||||
float xUp, float yUp, float zUp);
|
||||
extern void guLookAtReflectF(float mf[4][4], LookAt *l,
|
||||
float xEye, float yEye, float zEye,
|
||||
float xAt, float yAt, float zAt,
|
||||
float xUp, float yUp, float zUp);
|
||||
|
||||
/*
|
||||
* Math functions
|
||||
*/
|
||||
extern float sinf(float);
|
||||
extern double sin(double);
|
||||
extern float cosf(float);
|
||||
extern double cos(double);
|
||||
|
||||
extern float sqrtf(float);
|
||||
|
||||
#endif /* !_GU_H_ */
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
#ifndef IQUE_H
|
||||
#define IQUE_H
|
||||
|
||||
#include "rcp.h"
|
||||
|
||||
#define MI_SK_EXCEPTION_REG (MI_BASE_REG+0x14)
|
||||
#define MI_SK_WATCHDOG_TIMER (MI_BASE_REG+0x18)
|
||||
|
||||
// Hardware interrupts
|
||||
// 0x40 = NAND DMA, 0x80 = MD, 0x100 = RDB, 0x200 = AES,
|
||||
// 0x400 = PI_ERR, 0x800 = USB0, 0x1000 = USB1, 0x2000 = NAND
|
||||
#define MI_HW_INTR_REG (MI_BASE_REG+0x38)
|
||||
#define MI_HW_INTR_MASK_REG (MI_BASE_REG+0x3C)
|
||||
|
||||
#define PI_CARD_ADDR_REG (PI_BASE_REG+0x48)
|
||||
#define PI_EX_RD_LEN_REG (PI_BASE_REG+0x58)
|
||||
#define PI_EX_WR_LEN_REG (PI_BASE_REG+0x5C)
|
||||
#define PI_MISC_REG (PI_BASE_REG+0x60)
|
||||
|
||||
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
|
||||
|
||||
extern u8 *__osBbEepromAddress;
|
||||
extern u32 __osBbEepromSize;
|
||||
extern u32 __osBbFlashAddress;
|
||||
extern u32 __osBbFlashSize;
|
||||
extern u32 __osBbSramAddress;
|
||||
extern u32 __osBbSramSize;
|
||||
extern u32 *__osBbPakAddress[];
|
||||
extern u32 __osBbPakSize;
|
||||
extern u32 __osBbIsBb;
|
||||
extern u32 __osBbHackFlags;
|
||||
|
||||
void skKeepAlive(void);
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,7 +1,195 @@
|
||||
#ifndef _ULTRA64_LIBAUDIO_H_
|
||||
#define _ULTRA64_LIBAUDIO_H_
|
||||
/*====================================================================
|
||||
* libaudio.h
|
||||
*
|
||||
* Copyright 1993, Silicon Graphics, Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics,
|
||||
* Inc.; the contents of this file may not be disclosed to third
|
||||
* parties, copied or duplicated in any form, in whole or in part,
|
||||
* without the prior written permission of Silicon Graphics, Inc.
|
||||
*
|
||||
* RESTRICTED RIGHTS LEGEND:
|
||||
* Use, duplication or disclosure by the Government is subject to
|
||||
* restrictions as set forth in subdivision (c)(1)(ii) of the Rights
|
||||
* in Technical Data and Computer Software clause at DFARS
|
||||
* 252.227-7013, and/or in similar or successor clauses in the FAR,
|
||||
* DOD or NASA FAR Supplement. Unpublished - rights reserved under the
|
||||
* Copyright Laws of the United States.
|
||||
*====================================================================*/
|
||||
|
||||
#include "abi.h"
|
||||
/**************************************************************************
|
||||
*
|
||||
* $Revision: 1.173 $
|
||||
* $Date: 1997/12/01 12:42:21 $
|
||||
* $Source: /exdisk2/cvs/N64OS/Master/cvsmdev2/PR/include/libaudio.h,v $
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef __LIB_AUDIO__
|
||||
#define __LIB_AUDIO__
|
||||
|
||||
#ifdef _LANGUAGE_C_PLUS_PLUS
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <PR/ultratypes.h>
|
||||
#include <PR/mbi.h>
|
||||
|
||||
/***********************************************************************
|
||||
* misc defines
|
||||
***********************************************************************/
|
||||
|
||||
typedef s32 ALMicroTime;
|
||||
typedef u8 ALPan;
|
||||
|
||||
/***********************************************************************
|
||||
* Error handling
|
||||
***********************************************************************/
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define ALFailIf(condition, error) \
|
||||
if (condition) { \
|
||||
__osError(error, 0); \
|
||||
return; }
|
||||
|
||||
#else
|
||||
#define ALFailIf(condition, error) \
|
||||
if (condition) { \
|
||||
return; }
|
||||
#endif
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define ALFlagFailIf(condition, flag, error) \
|
||||
if (condition) { \
|
||||
if(flag) __osError(error, 0); \
|
||||
return; }
|
||||
|
||||
#else
|
||||
#define ALFlagFailIf(condition, flag, error) \
|
||||
if (condition) { \
|
||||
return; }
|
||||
#endif
|
||||
|
||||
/***********************************************************************
|
||||
* Macros
|
||||
***********************************************************************/
|
||||
|
||||
#define ALBnkfPatch(src, base, type) (type)((uintptr_t) src + (uintptr_t) base)
|
||||
|
||||
/***********************************************************************
|
||||
* data structures for sound banks
|
||||
***********************************************************************/
|
||||
|
||||
#define AL_BANK_VERSION 0x4231 /* 'B1' */
|
||||
|
||||
/* Possible wavetable types */
|
||||
enum {AL_ADPCM_WAVE = 0,
|
||||
AL_RAW16_WAVE};
|
||||
|
||||
typedef struct {
|
||||
s32 order;
|
||||
s32 npredictors;
|
||||
s16 book[1]; /* Actually variable size. Must be 8-byte aligned */
|
||||
} ALADPCMBook;
|
||||
|
||||
typedef struct {
|
||||
u32 start;
|
||||
u32 end;
|
||||
u32 count;
|
||||
ADPCM_STATE state;
|
||||
} ALADPCMloop;
|
||||
|
||||
typedef struct {
|
||||
u32 start;
|
||||
u32 end;
|
||||
u32 count;
|
||||
} ALRawLoop;
|
||||
|
||||
typedef struct {
|
||||
ALMicroTime attackTime;
|
||||
ALMicroTime decayTime;
|
||||
ALMicroTime releaseTime;
|
||||
u8 attackVolume;
|
||||
u8 decayVolume;
|
||||
} ALEnvelope;
|
||||
|
||||
typedef struct {
|
||||
u8 velocityMin;
|
||||
u8 velocityMax;
|
||||
u8 keyMin;
|
||||
u8 keyMax;
|
||||
u8 keyBase;
|
||||
s8 detune;
|
||||
} ALKeyMap;
|
||||
|
||||
typedef struct {
|
||||
ALADPCMloop *loop;
|
||||
ALADPCMBook *book;
|
||||
} ALADPCMWaveInfo;
|
||||
|
||||
typedef struct {
|
||||
ALRawLoop *loop;
|
||||
} ALRAWWaveInfo;
|
||||
|
||||
typedef struct ALWaveTable_s {
|
||||
u8 *base; /* ptr to start of wave data */
|
||||
s32 len; /* length of data in bytes */
|
||||
u8 type; /* compression type */
|
||||
u8 flags; /* offset/address flags */
|
||||
union {
|
||||
ALADPCMWaveInfo adpcmWave;
|
||||
ALRAWWaveInfo rawWave;
|
||||
} waveInfo;
|
||||
} ALWaveTable;
|
||||
|
||||
typedef struct ALSound_s {
|
||||
ALEnvelope *envelope;
|
||||
ALKeyMap *keyMap;
|
||||
ALWaveTable *wavetable; /* offset to wavetable struct */
|
||||
ALPan samplePan;
|
||||
u8 sampleVolume;
|
||||
u8 flags;
|
||||
} ALSound;
|
||||
|
||||
typedef struct {
|
||||
u8 volume; /* overall volume for this instrument */
|
||||
ALPan pan; /* 0 = hard left, 127 = hard right */
|
||||
u8 priority; /* voice priority for this instrument */
|
||||
u8 flags;
|
||||
u8 tremType; /* the type of tremelo osc. to use */
|
||||
u8 tremRate; /* the rate of the tremelo osc. */
|
||||
u8 tremDepth; /* the depth of the tremelo osc */
|
||||
u8 tremDelay; /* the delay for the tremelo osc */
|
||||
u8 vibType; /* the type of tremelo osc. to use */
|
||||
u8 vibRate; /* the rate of the tremelo osc. */
|
||||
u8 vibDepth; /* the depth of the tremelo osc */
|
||||
u8 vibDelay; /* the delay for the tremelo osc */
|
||||
s16 bendRange; /* pitch bend range in cents */
|
||||
s16 soundCount; /* number of sounds in this array */
|
||||
ALSound *soundArray[1];
|
||||
} ALInstrument;
|
||||
|
||||
typedef struct ALBank_s {
|
||||
s16 instCount; /* number of programs in this bank */
|
||||
u8 flags;
|
||||
u8 pad;
|
||||
s32 sampleRate; /* e.g. 44100, 22050, etc... */
|
||||
ALInstrument *percussion; /* default percussion for GM */
|
||||
ALInstrument *instArray[1]; /* ARRAY of instruments */
|
||||
} ALBank;
|
||||
|
||||
typedef struct { /* Note: sizeof won't be correct */
|
||||
s16 revision; /* format revision of this file */
|
||||
s16 bankCount; /* number of banks */
|
||||
ALBank *bankArray[1]; /* ARRAY of bank offsets */
|
||||
} ALBankFile;
|
||||
|
||||
void alBnkfNew(ALBankFile *f, u8 *table);
|
||||
|
||||
/***********************************************************************
|
||||
* Sequence Files
|
||||
***********************************************************************/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@@ -48,4 +236,8 @@ typedef struct
|
||||
|
||||
void alSeqFileNew(ALSeqFile *f, u8 *base);
|
||||
|
||||
#ifdef _LANGUAGE_C_PLUS_PLUS
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
#ifndef _LIBULTRA_H
|
||||
#define _LIBULTRA_H
|
||||
|
||||
#define TV_TYPE_NTSC 1
|
||||
#define TV_TYPE_PAL 0
|
||||
#define TV_TYPE_MPAL 2
|
||||
|
||||
#define RESET_TYPE_COLD_RESET 0
|
||||
#define RESET_TYPE_NMI 1
|
||||
#define RESET_TYPE_BOOT_DISK 2
|
||||
|
||||
extern u32 osTvType;
|
||||
extern u32 osRomBase;
|
||||
extern u32 osResetType;
|
||||
extern u32 osMemSize;
|
||||
extern u8 osAppNmiBuffer[64];
|
||||
|
||||
#endif /* _LIBULTRA_H */
|
||||
683
include/PR/os.h
683
include/PR/os.h
File diff suppressed because it is too large
Load Diff
@@ -93,6 +93,7 @@ typedef struct {
|
||||
/* controller errors */
|
||||
#define CONT_NO_RESPONSE_ERROR 0x8
|
||||
#define CONT_OVERRUN_ERROR 0x4
|
||||
#define CONT_RANGE_ERROR -1
|
||||
#ifdef _HW_VERSION_1
|
||||
#define CONT_FRAME_ERROR 0x2
|
||||
#define CONT_COLLISION_ERROR 0x1
|
||||
|
||||
119
include/PR/os_convert.h
Normal file
119
include/PR/os_convert.h
Normal file
@@ -0,0 +1,119 @@
|
||||
|
||||
/*====================================================================
|
||||
* os_convert.h
|
||||
*
|
||||
* Copyright 1995, Silicon Graphics, Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics,
|
||||
* Inc.; the contents of this file may not be disclosed to third
|
||||
* parties, copied or duplicated in any form, in whole or in part,
|
||||
* without the prior written permission of Silicon Graphics, Inc.
|
||||
*
|
||||
* RESTRICTED RIGHTS LEGEND:
|
||||
* Use, duplication or disclosure by the Government is subject to
|
||||
* restrictions as set forth in subdivision (c)(1)(ii) of the Rights
|
||||
* in Technical Data and Computer Software clause at DFARS
|
||||
* 252.227-7013, and/or in similar or successor clauses in the FAR,
|
||||
* DOD or NASA FAR Supplement. Unpublished - rights reserved under the
|
||||
* Copyright Laws of the United States.
|
||||
*====================================================================*/
|
||||
|
||||
/*---------------------------------------------------------------------*
|
||||
Copyright (C) 1998 Nintendo. (Originated by SGI)
|
||||
|
||||
$RCSfile: os_convert.h,v $
|
||||
$Revision: 1.2 $
|
||||
$Date: 1999/04/21 02:53:11 $
|
||||
*---------------------------------------------------------------------*/
|
||||
|
||||
#ifndef _OS_CONVERT_H_
|
||||
#define _OS_CONVERT_H_
|
||||
|
||||
#ifdef _LANGUAGE_C_PLUS_PLUS
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <PR/ultratypes.h>
|
||||
#include <PR/os_version.h>
|
||||
|
||||
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* Type definitions
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* Global definitions
|
||||
*
|
||||
*/
|
||||
|
||||
#define OS_CLOCK_RATE 62500000LL
|
||||
#define OS_CPU_COUNTER (OS_CLOCK_RATE*3/4)
|
||||
|
||||
|
||||
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* Macro definitions
|
||||
*
|
||||
*/
|
||||
|
||||
#if LIBULTRA_VERSION > OS_VER_H
|
||||
#define OS_NSEC_TO_CYCLES(n) (((u64)(n)*(OS_CPU_COUNTER/15625000LL))/(1000000000LL/15625000LL))
|
||||
#define OS_USEC_TO_CYCLES(n) (((u64)(n)*(OS_CPU_COUNTER/15625LL))/(1000000LL/15625LL))
|
||||
#define OS_CYCLES_TO_NSEC(c) (((u64)(c)*(1000000000LL/15625000LL))/(OS_CPU_COUNTER/15625000LL))
|
||||
#define OS_CYCLES_TO_USEC(c) (((u64)(c)*(1000000LL/15625LL))/(OS_CPU_COUNTER/15625LL))
|
||||
#else
|
||||
#define OS_NSEC_TO_CYCLES(n) (((u64)(n)*(osClockRate))/(1000000000LL))
|
||||
#define OS_USEC_TO_CYCLES(n) (((u64)(n)*(osClockRate))/(1000000LL))
|
||||
#define OS_CYCLES_TO_NSEC(c) (((u64)(c)*(1000000000LL))/(osClockRate))
|
||||
#define OS_CYCLES_TO_USEC(c) (((u64)(c)*(1000000LL))/(osClockRate))
|
||||
#endif
|
||||
|
||||
/* OS_K?_TO_PHYSICAL macro bug fix for CodeWarrior */
|
||||
#ifndef __MWERKS__
|
||||
#define OS_K0_TO_PHYSICAL(x) (u32)(((char *)(x)-0x80000000))
|
||||
#define OS_K1_TO_PHYSICAL(x) (u32)(((char *)(x)-0xa0000000))
|
||||
#else
|
||||
#define OS_K0_TO_PHYSICAL(x) ((char *)(x)-0x80000000)
|
||||
#define OS_K1_TO_PHYSICAL(x) ((char *)(x)-0xa0000000)
|
||||
#endif
|
||||
|
||||
#define OS_PHYSICAL_TO_K0(x) (void *)(((u32)(x)+0x80000000))
|
||||
#define OS_PHYSICAL_TO_K1(x) (void *)(((u32)(x)+0xa0000000))
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* Extern variables
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* Function prototypes
|
||||
*
|
||||
*/
|
||||
|
||||
/* Address translation routines and macros */
|
||||
|
||||
extern uintptr_t osVirtualToPhysical(void *);
|
||||
extern void * osPhysicalToVirtual(u32);
|
||||
|
||||
|
||||
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
|
||||
|
||||
#ifdef _LANGUAGE_C_PLUS_PLUS
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !_OS_CONVERT_H_ */
|
||||
@@ -66,6 +66,10 @@ extern "C" {
|
||||
#define EEP16K_MAXBLOCKS 256
|
||||
#define EEPROM_BLOCK_SIZE 8
|
||||
|
||||
/* EEPROM SIZE */
|
||||
|
||||
#define EEPROM_SIZE EEPROM_BLOCK_SIZE * EEPROM_MAXBLOCKS
|
||||
#define EEP16K_SIZE EEPROM_BLOCK_SIZE * EEP16K_MAXBLOCKS
|
||||
|
||||
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
|
||||
|
||||
|
||||
@@ -63,6 +63,7 @@ typedef u32 OSHWIntr;
|
||||
/* Interrupt masks */
|
||||
|
||||
#define OS_IM_NONE 0x00000001
|
||||
#define OS_IM_RCP 0x00000401
|
||||
#define OS_IM_SW1 0x00000501
|
||||
#define OS_IM_SW2 0x00000601
|
||||
#define OS_IM_CART 0x00000c01
|
||||
|
||||
@@ -1,19 +1,41 @@
|
||||
#ifndef _ULTRA64_OS_INTERNAL_H_
|
||||
#define _ULTRA64_OS_INTERNAL_H_
|
||||
#include "PR/os_message.h"
|
||||
/**************************************************************************
|
||||
* *
|
||||
* Copyright (C) 1995, Silicon Graphics, Inc. *
|
||||
* *
|
||||
* These coded instructions, statements, and computer programs contain *
|
||||
* unpublished proprietary information of Silicon Graphics, Inc., and *
|
||||
* are protected by Federal copyright law. They may not be disclosed *
|
||||
* to third parties or copied or duplicated in any form, in whole or *
|
||||
* in part, without the prior written consent of Silicon Graphics, Inc. *
|
||||
* *
|
||||
**************************************************************************/
|
||||
|
||||
/* Internal functions used by the operating system */
|
||||
/* Do not include this header in application code */
|
||||
/*---------------------------------------------------------------------*
|
||||
Copyright (C) 1998 Nintendo. (Originated by SGI)
|
||||
|
||||
$RCSfile: os_internal.h,v $
|
||||
$Revision: 1.20 $
|
||||
$Date: 1998/10/09 08:01:09 $
|
||||
*---------------------------------------------------------------------*/
|
||||
|
||||
/* Variables */
|
||||
#ifndef _OS_INTERNAL_H_
|
||||
#define _OS_INTERNAL_H_
|
||||
|
||||
//extern u64 osClockRate;
|
||||
#ifdef _LANGUAGE_C_PLUS_PLUS
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Functions */
|
||||
#include <PR/os.h>
|
||||
|
||||
/*u32 __osProbeTLB(void *);
|
||||
u32 __osDisableInt(void);
|
||||
void __osRestoreInt(u32);*/
|
||||
OSThread *__osGetCurrFaultedThread(void);
|
||||
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
|
||||
|
||||
#include "os_internal_reg.h"
|
||||
#include "os_internal_si.h"
|
||||
#include "os_internal_vi.h"
|
||||
#include "os_internal_rsp.h"
|
||||
#include "os_internal_error.h"
|
||||
#include "os_internal_debug.h"
|
||||
#include "os_internal_exception.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
42
include/PR/os_internal_debug.h
Normal file
42
include/PR/os_internal_debug.h
Normal file
@@ -0,0 +1,42 @@
|
||||
/**************************************************************************
|
||||
* *
|
||||
* Copyright (C) 1995, Silicon Graphics, Inc. *
|
||||
* *
|
||||
* These coded instructions, statements, and computer programs contain *
|
||||
* unpublished proprietary information of Silicon Graphics, Inc., and *
|
||||
* are protected by Federal copyright law. They may not be disclosed *
|
||||
* to third parties or copied or duplicated in any form, in whole or *
|
||||
* in part, without the prior written consent of Silicon Graphics, Inc. *
|
||||
* *
|
||||
**************************************************************************/
|
||||
|
||||
/*---------------------------------------------------------------------*
|
||||
Copyright (C) 1998 Nintendo. (Originated by SGI)
|
||||
|
||||
$RCSfile: os_internal_debug.h,v $
|
||||
$Revision: 1.1 $
|
||||
$Date: 1998/10/09 08:01:09 $
|
||||
*---------------------------------------------------------------------*/
|
||||
|
||||
#ifndef _OS_INTERNAL_DEBUG_H_
|
||||
#define _OS_INTERNAL_DEBUG_H_
|
||||
|
||||
#ifdef _LANGUAGE_C_PLUS_PLUS
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <PR/os.h>
|
||||
|
||||
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
|
||||
|
||||
/* Debug port */
|
||||
extern int __osAtomicDec(unsigned int *p);
|
||||
|
||||
|
||||
#endif /* _LANGUAGE_C */
|
||||
|
||||
#ifdef _LANGUAGE_C_PLUS_PLUS
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !_OS_INTERNAL_DEBUG_H */
|
||||
43
include/PR/os_internal_error.h
Normal file
43
include/PR/os_internal_error.h
Normal file
@@ -0,0 +1,43 @@
|
||||
/**************************************************************************
|
||||
* *
|
||||
* Copyright (C) 1995, Silicon Graphics, Inc. *
|
||||
* *
|
||||
* These coded instructions, statements, and computer programs contain *
|
||||
* unpublished proprietary information of Silicon Graphics, Inc., and *
|
||||
* are protected by Federal copyright law. They may not be disclosed *
|
||||
* to third parties or copied or duplicated in any form, in whole or *
|
||||
* in part, without the prior written consent of Silicon Graphics, Inc. *
|
||||
* *
|
||||
**************************************************************************/
|
||||
|
||||
/*---------------------------------------------------------------------*
|
||||
Copyright (C) 1998 Nintendo. (Originated by SGI)
|
||||
|
||||
$RCSfile: os_internal_error.h,v $
|
||||
$Revision: 1.1 $
|
||||
$Date: 1998/10/09 08:01:10 $
|
||||
*---------------------------------------------------------------------*/
|
||||
|
||||
#ifndef _OS_INTERNAL_ERROR_H_
|
||||
#define _OS_INTERNAL_ERROR_H_
|
||||
|
||||
#ifdef _LANGUAGE_C_PLUS_PLUS
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <PR/os.h>
|
||||
|
||||
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
|
||||
|
||||
/* Error handling */
|
||||
|
||||
extern OSThread * __osGetCurrFaultedThread(void);
|
||||
|
||||
|
||||
#endif /* _LANGUAGE_C */
|
||||
|
||||
#ifdef _LANGUAGE_C_PLUS_PLUS
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !_OS_INTERNAL_ERROR_H */
|
||||
50
include/PR/os_internal_exception.h
Normal file
50
include/PR/os_internal_exception.h
Normal file
@@ -0,0 +1,50 @@
|
||||
/**************************************************************************
|
||||
* *
|
||||
* Copyright (C) 1995, Silicon Graphics, Inc. *
|
||||
* *
|
||||
* These coded instructions, statements, and computer programs contain *
|
||||
* unpublished proprietary information of Silicon Graphics, Inc., and *
|
||||
* are protected by Federal copyright law. They may not be disclosed *
|
||||
* to third parties or copied or duplicated in any form, in whole or *
|
||||
* in part, without the prior written consent of Silicon Graphics, Inc. *
|
||||
* *
|
||||
**************************************************************************/
|
||||
|
||||
/*---------------------------------------------------------------------*
|
||||
Copyright (C) 1998 Nintendo. (Originated by SGI)
|
||||
|
||||
$RCSfile: os_internal_exception.h,v $
|
||||
$Revision: 1.1 $
|
||||
$Date: 1998/10/09 08:01:10 $
|
||||
*---------------------------------------------------------------------*/
|
||||
|
||||
#ifndef _OS_INTERNAL_EXCEPTION_H_
|
||||
#define _OS_INTERNAL_EXCEPTION_H_
|
||||
|
||||
#ifdef _LANGUAGE_C_PLUS_PLUS
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "os.h"
|
||||
|
||||
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
|
||||
|
||||
/* Routine for HW interrupt "handler" */
|
||||
#if LIBULTRA_VERSION >= OS_VER_J
|
||||
extern void __osSetHWIntrRoutine(OSHWIntr interrupt, s32 (*handler)(void), void *stackEnd);
|
||||
#else
|
||||
extern void __osSetHWIntrRoutine(OSHWIntr interrupt, s32 (*handler)(void));
|
||||
#endif
|
||||
|
||||
/* Routine for global interrupt mask */
|
||||
extern void __osSetGlobalIntMask(OSHWIntr);
|
||||
extern void __osResetGlobalIntMask(OSHWIntr);
|
||||
|
||||
|
||||
#endif /* _LANGUAGE_C */
|
||||
|
||||
#ifdef _LANGUAGE_C_PLUS_PLUS
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !_OS_INTERNAL_EXCEPTION_H */
|
||||
57
include/PR/os_internal_reg.h
Normal file
57
include/PR/os_internal_reg.h
Normal file
@@ -0,0 +1,57 @@
|
||||
/**************************************************************************
|
||||
* *
|
||||
* Copyright (C) 1995, Silicon Graphics, Inc. *
|
||||
* *
|
||||
* These coded instructions, statements, and computer programs contain *
|
||||
* unpublished proprietary information of Silicon Graphics, Inc., and *
|
||||
* are protected by Federal copyright law. They may not be disclosed *
|
||||
* to third parties or copied or duplicated in any form, in whole or *
|
||||
* in part, without the prior written consent of Silicon Graphics, Inc. *
|
||||
* *
|
||||
**************************************************************************/
|
||||
|
||||
/*---------------------------------------------------------------------*
|
||||
Copyright (C) 1998 Nintendo. (Originated by SGI)
|
||||
|
||||
$RCSfile: os_internal_reg.h,v $
|
||||
$Revision: 1.2 $
|
||||
$Date: 1999/03/10 12:19:14 $
|
||||
*---------------------------------------------------------------------*/
|
||||
|
||||
#ifndef _OS_INTERNAL_REG_H_
|
||||
#define _OS_INTERNAL_REG_H_
|
||||
|
||||
#ifdef _LANGUAGE_C_PLUS_PLUS
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "os.h"
|
||||
|
||||
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
|
||||
|
||||
/* Routines to get/fetch coprocessor 0 registers */
|
||||
extern u32 __osGetCause(void);
|
||||
extern void __osSetCause(u32);
|
||||
extern u32 __osGetCompare(void);
|
||||
extern void __osSetCompare(u32);
|
||||
extern u32 __osGetConfig(void);
|
||||
extern void __osSetConfig(u32);
|
||||
extern void __osSetCount(u32);
|
||||
extern u32 __osGetSR(void);
|
||||
extern void __osSetSR(u32);
|
||||
extern u32 __osDisableInt(void);
|
||||
extern void __osRestoreInt(u32);
|
||||
extern u32 __osGetWatchLo(void);
|
||||
extern void __osSetWatchLo(u32);
|
||||
|
||||
/* Routines to get/set floating-point control and status register */
|
||||
extern u32 __osSetFpcCsr(u32);
|
||||
extern u32 __osGetFpcCsr(void);
|
||||
|
||||
#endif /* _LANGUAGE_C */
|
||||
|
||||
#ifdef _LANGUAGE_C_PLUS_PLUS
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !_OS_INTERNAL_REG_H */
|
||||
48
include/PR/os_internal_rsp.h
Normal file
48
include/PR/os_internal_rsp.h
Normal file
@@ -0,0 +1,48 @@
|
||||
/**************************************************************************
|
||||
* *
|
||||
* Copyright (C) 1995, Silicon Graphics, Inc. *
|
||||
* *
|
||||
* These coded instructions, statements, and computer programs contain *
|
||||
* unpublished proprietary information of Silicon Graphics, Inc., and *
|
||||
* are protected by Federal copyright law. They may not be disclosed *
|
||||
* to third parties or copied or duplicated in any form, in whole or *
|
||||
* in part, without the prior written consent of Silicon Graphics, Inc. *
|
||||
* *
|
||||
**************************************************************************/
|
||||
|
||||
/*---------------------------------------------------------------------*
|
||||
Copyright (C) 1998 Nintendo. (Originated by SGI)
|
||||
|
||||
$RCSfile: os_internal_rsp.h,v $
|
||||
$Revision: 1.1 $
|
||||
$Date: 1998/10/09 08:01:12 $
|
||||
*---------------------------------------------------------------------*/
|
||||
|
||||
#ifndef _OS_INTERNAL_RSP_H_
|
||||
#define _OS_INTERNAL_RSP_H_
|
||||
|
||||
#ifdef _LANGUAGE_C_PLUS_PLUS
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <PR/os.h>
|
||||
|
||||
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
|
||||
|
||||
/* Signal processor interface (Sp) */
|
||||
|
||||
extern u32 __osSpGetStatus(void);
|
||||
extern void __osSpSetStatus(u32);
|
||||
extern s32 __osSpSetPc(u32);
|
||||
extern s32 __osSpRawWriteIo(u32, u32);
|
||||
extern s32 __osSpRawReadIo(u32, u32 *);
|
||||
extern s32 __osSpRawStartDma(s32, u32, void *, size_t);
|
||||
|
||||
|
||||
#endif /* _LANGUAGE_C */
|
||||
|
||||
#ifdef _LANGUAGE_C_PLUS_PLUS
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !_OS_INTERNAL_RSP_H */
|
||||
50
include/PR/os_internal_si.h
Normal file
50
include/PR/os_internal_si.h
Normal file
@@ -0,0 +1,50 @@
|
||||
/**************************************************************************
|
||||
* *
|
||||
* Copyright (C) 1995, Silicon Graphics, Inc. *
|
||||
* *
|
||||
* These coded instructions, statements, and computer programs contain *
|
||||
* unpublished proprietary information of Silicon Graphics, Inc., and *
|
||||
* are protected by Federal copyright law. They may not be disclosed *
|
||||
* to third parties or copied or duplicated in any form, in whole or *
|
||||
* in part, without the prior written consent of Silicon Graphics, Inc. *
|
||||
* *
|
||||
**************************************************************************/
|
||||
|
||||
/*---------------------------------------------------------------------*
|
||||
Copyright (C) 1998 Nintendo. (Originated by SGI)
|
||||
|
||||
$RCSfile: os_internal_si.h,v $
|
||||
$Revision: 1.1 $
|
||||
$Date: 1998/10/09 08:01:13 $
|
||||
*---------------------------------------------------------------------*/
|
||||
|
||||
#ifndef _OS_INTERNAL_SI_H_
|
||||
#define _OS_INTERNAL_SI_H_
|
||||
|
||||
#ifdef _LANGUAGE_C_PLUS_PLUS
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <PR/os.h>
|
||||
|
||||
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
|
||||
|
||||
/* Serial interface (Si) */
|
||||
|
||||
extern u32 __osSiGetStatus(void);
|
||||
extern s32 __osSiRawWriteIo(u32, u32);
|
||||
extern s32 __osSiRawReadIo(u32, u32 *);
|
||||
extern s32 __osSiRawStartDma(s32, void *);
|
||||
|
||||
extern void __osSiGetAccess(void);
|
||||
extern void __osSiRelAccess(void);
|
||||
extern int __osSiDeviceBusy(void);
|
||||
extern void __osSiCreateAccessQueue(void);
|
||||
|
||||
#endif /* _LANGUAGE_C */
|
||||
|
||||
#ifdef _LANGUAGE_C_PLUS_PLUS
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !_OS_INTERNAL_SI_H */
|
||||
96
include/PR/os_internal_vi.h
Normal file
96
include/PR/os_internal_vi.h
Normal file
@@ -0,0 +1,96 @@
|
||||
/**************************************************************************
|
||||
* *
|
||||
* Copyright (C) 1995, Silicon Graphics, Inc. *
|
||||
* *
|
||||
* These coded instructions, statements, and computer programs contain *
|
||||
* unpublished proprietary information of Silicon Graphics, Inc., and *
|
||||
* are protected by Federal copyright law. They may not be disclosed *
|
||||
* to third parties or copied or duplicated in any form, in whole or *
|
||||
* in part, without the prior written consent of Silicon Graphics, Inc. *
|
||||
* *
|
||||
**************************************************************************/
|
||||
|
||||
/*---------------------------------------------------------------------*
|
||||
Copyright (C) 1998 Nintendo. (Originated by SGI)
|
||||
|
||||
$RCSfile: os_internal_vi.h,v $
|
||||
$Revision: 1.1 $
|
||||
$Date: 1998/10/09 08:01:13 $
|
||||
*---------------------------------------------------------------------*/
|
||||
|
||||
#ifndef _OS_INTERNAL_VI_H_
|
||||
#define _OS_INTERNAL_VI_H_
|
||||
|
||||
#ifdef _LANGUAGE_C_PLUS_PLUS
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <PR/os.h>
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* Global definitions
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* Video Interface (VI) states
|
||||
*/
|
||||
#define VI_STATE_MODE_UPDATED 0x01
|
||||
#define VI_STATE_XSCALE_UPDATED 0x02
|
||||
#define VI_STATE_YSCALE_UPDATED 0x04
|
||||
#define VI_STATE_CTRL_UPDATED 0x08 // related to control regs changing
|
||||
#define VI_STATE_BUFFER_UPDATED 0x10 // swap buffer
|
||||
#define VI_STATE_BLACK 0x20 // probably related to a black screen
|
||||
#define VI_STATE_REPEATLINE 0x40 // repeat line?
|
||||
#define VI_STATE_FADE 0x80 // fade
|
||||
|
||||
/*
|
||||
* Video Interface (VI) masks
|
||||
*/
|
||||
#define VI_SCALE_MASK 0xfff //see rcp scale_x/scale_y
|
||||
#define VI_2_10_FPART_MASK 0x3ff
|
||||
#define VI_SUBPIXEL_SH 0x10
|
||||
|
||||
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
|
||||
|
||||
/*
|
||||
* Structure for VI context
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ f32 factor;
|
||||
/* 0x4 */ u16 offset;
|
||||
/* 0x8 */ u32 scale;
|
||||
} __OSViScale;
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u16 state;
|
||||
/* 0x02 */ u16 retraceCount;
|
||||
/* 0x04 */ void* framep;
|
||||
/* 0x08 */ OSViMode *modep;
|
||||
/* 0x0c */ u32 control;
|
||||
/* 0x10 */ OSMesgQueue *msgq;
|
||||
/* 0x14 */ OSMesg *msg;
|
||||
/* 0x18 */ __OSViScale x;
|
||||
/* 0x24 */ __OSViScale y;
|
||||
} __OSViContext;
|
||||
|
||||
/* Video interface (Vi) */
|
||||
|
||||
extern __OSViContext *__osViGetCurrentContext(void);
|
||||
extern void __osViSwapContext(void);
|
||||
extern void __osViInit(void);
|
||||
|
||||
extern __OSViContext *__osViNext;
|
||||
extern __OSViContext *__osViCurr;
|
||||
|
||||
extern u32 __additional_scanline;
|
||||
|
||||
#endif /* _LANGUAGE_C */
|
||||
|
||||
#ifdef _LANGUAGE_C_PLUS_PLUS
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !_OS_INTERNAL_VI_H */
|
||||
@@ -1,18 +1,96 @@
|
||||
|
||||
/*====================================================================
|
||||
* os_libc.h
|
||||
*
|
||||
* Copyright 1995, Silicon Graphics, Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics,
|
||||
* Inc.; the contents of this file may not be disclosed to third
|
||||
* parties, copied or duplicated in any form, in whole or in part,
|
||||
* without the prior written permission of Silicon Graphics, Inc.
|
||||
*
|
||||
* RESTRICTED RIGHTS LEGEND:
|
||||
* Use, duplication or disclosure by the Government is subject to
|
||||
* restrictions as set forth in subdivision (c)(1)(ii) of the Rights
|
||||
* in Technical Data and Computer Software clause at DFARS
|
||||
* 252.227-7013, and/or in similar or successor clauses in the FAR,
|
||||
* DOD or NASA FAR Supplement. Unpublished - rights reserved under the
|
||||
* Copyright Laws of the United States.
|
||||
*====================================================================*/
|
||||
|
||||
/*---------------------------------------------------------------------*
|
||||
Copyright (C) 1998 Nintendo. (Originated by SGI)
|
||||
|
||||
$RCSfile: os_libc.h,v $
|
||||
$Revision: 1.3 $
|
||||
$Date: 1999/07/13 01:43:47 $
|
||||
*---------------------------------------------------------------------*/
|
||||
|
||||
#ifndef _OS_LIBC_H_
|
||||
#define _OS_LIBC_H_
|
||||
#define _OS_LIBC_H_
|
||||
|
||||
#include "ultratypes.h"
|
||||
#ifdef _LANGUAGE_C_PLUS_PLUS
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// Old deprecated functions from strings.h, replaced by memcpy/memset.
|
||||
extern void bcopy(const void *, void *, size_t);
|
||||
extern void bzero(void *, size_t);
|
||||
#include <PR/ultratypes.h>
|
||||
|
||||
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* Type definitions
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* Global definitions
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* Macro definitions
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* Extern variables
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* Function prototypes
|
||||
*
|
||||
*/
|
||||
|
||||
/* byte string operations */
|
||||
|
||||
|
||||
extern void bcopy(const void *, void *, size_t);
|
||||
extern void bzero(void *, size_t);
|
||||
|
||||
/* Printf */
|
||||
|
||||
extern int sprintf(char *s, const char *fmt, ...);
|
||||
extern void osSyncPrintf(const char *fmt, ...);
|
||||
extern void osAsyncPrintf(const char *fmt, ...);
|
||||
extern int osSyncGetChars(char *buf);
|
||||
extern int osAsyncGetChars(char *buf);
|
||||
extern int sprintf(char *s, const char *fmt, ...);
|
||||
extern void osSyncPrintf(const char *fmt, ...);
|
||||
|
||||
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
|
||||
|
||||
#ifdef _LANGUAGE_C_PLUS_PLUS
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !_OS_LIBC_H_ */
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
#ifndef _ULTRA64_OS_MISC_H_
|
||||
#define _ULTRA64_OS_MISC_H_
|
||||
#include <PR/ultratypes.h>
|
||||
/* Miscellaneous OS functions */
|
||||
|
||||
void osInitialize(void);
|
||||
u32 osGetCount(void);
|
||||
|
||||
uintptr_t osVirtualToPhysical(void *);
|
||||
|
||||
#endif
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user