Merge pull request #438 from s4Ys369/revert-434-patch-1
[sm64pc.git] / include / PR / mbi.h
blob6b3cebfe4bebee22ff3d0a74f10ab2b183fcada4
1 #ifndef _MBI_H_
2 #define _MBI_H_
4 #include "platform_info.h"
6 /**************************************************************************
7 * *
8 * Copyright (C) 1994, Silicon Graphics, Inc. *
9 * *
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. *
15 * *
16 **************************************************************************/
18 /**************************************************************************
20 * $Revision: 1.136 $
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,
38 * and a width.
40 * For the left shift, the lower bits of the value are masked,
41 * then shifted left.
43 * For the right shift, the value is shifted right, then the lower bits
44 * are masked.
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 */
56 #define G_ON (1)
57 #define G_OFF (0)
59 /**************************************************************************
61 * Graphics Binary Interface
63 **************************************************************************/
65 #include <PR/gbi.h>
67 /**************************************************************************
69 * Audio Binary Interface
71 **************************************************************************/
73 #include <PR/abi.h>
75 /**************************************************************************
77 * Task list
79 **************************************************************************/
81 #define M_GFXTASK 1
82 #define M_AUDTASK 2
83 #define M_VIDTASK 3
84 #define M_HVQTASK 6
85 #define M_HVQMTASK 7
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))
98 #ifndef NULL
99 #define NULL 0
100 #endif
102 #endif /* !_MBI_H_ */