4 #include "platform_info.h"
6 /**************************************************************************
8 * Copyright (C) 1994, Silicon Graphics, Inc. *
10 * These coded instructions, statements, and computer programs contain *
11 * unpublished proprietary information of Silicon Graphics, Inc., and *
12 * are protected by Federal copyright law. They may not be disclosed *
13 * to third parties or copied or duplicated in any form, in whole or *
14 * in part, without the prior written consent of Silicon Graphics, Inc. *
16 **************************************************************************/
18 /**************************************************************************
21 * $Date: 1999/01/05 13:04:00 $
22 * $Source: /hosts/gate3/exdisk2/cvs/N64OS/Master/cvsmdev2/PR/include/mbi.h,v $
24 **************************************************************************/
27 * Header file for the Media Binary Interface
29 * NOTE: This file is included by the RSP microcode, so any C-specific
30 * constructs must be bracketed by #ifdef _LANGUAGE_C
36 * the SHIFT macros are used to build display list commands, inserting
37 * bit-fields into a 32-bit word. They take a value, a shift amount,
40 * For the left shift, the lower bits of the value are masked,
43 * For the right shift, the value is shifted right, then the lower bits
46 * (NOTE: _SHIFTL(v, 0, 32) won't work, just use an assignment)
49 #define _SHIFTL(v, s, w) \
50 ((unsigned int) (((unsigned int)(v) & ((0x01 << (w)) - 1)) << (s)))
51 #define _SHIFTR(v, s, w) \
52 ((unsigned int)(((unsigned int)(v) >> (s)) & ((0x01 << (w)) - 1)))
54 #define _SHIFT _SHIFTL /* old, for compatibility only */
59 /**************************************************************************
61 * Graphics Binary Interface
63 **************************************************************************/
67 /**************************************************************************
69 * Audio Binary Interface
71 **************************************************************************/
75 /**************************************************************************
79 **************************************************************************/
87 /**************************************************************************
89 * Segment macros and definitions
91 **************************************************************************/
93 #define NUM_SEGMENTS (16)
94 #define SEGMENT_OFFSET(a) ((unsigned int)(a) & 0x00ffffff)
95 #define SEGMENT_NUMBER(a) (((unsigned int)(a) << 4) >> 28)
96 #define SEGMENT_ADDR(num, off) (((num) << 24) + (off))
102 #endif /* !_MBI_H_ */