Mario Kart 64
Loading...
Searching...
No Matches
mbi.h
Go to the documentation of this file.
1#ifndef _MBI_H_
2#define _MBI_H_
3
4/**************************************************************************
5 * *
6 * Copyright (C) 1994, Silicon Graphics, Inc. *
7 * *
8 * These coded instructions, statements, and computer programs contain *
9 * unpublished proprietary information of Silicon Graphics, Inc., and *
10 * are protected by Federal copyright law. They may not be disclosed *
11 * to third parties or copied or duplicated in any form, in whole or *
12 * in part, without the prior written consent of Silicon Graphics, Inc. *
13 * *
14 **************************************************************************/
15
16/**************************************************************************
17 *
18 * $Revision: 1.136 $
19 * $Date: 1999/01/05 13:04:00 $
20 * $Source: /hosts/gate3/exdisk2/cvs/N64OS/Master/cvsmdev2/PR/include/mbi.h,v $
21 *
22 **************************************************************************/
23
24/*
25 * Header file for the Media Binary Interface
26 *
27 * NOTE: This file is included by the RSP microcode, so any C-specific
28 * constructs must be bracketed by #ifdef _LANGUAGE_C
29 *
30 */
31
32/*
33 * the SHIFT macros are used to build display list commands, inserting
34 * bit-fields into a 32-bit word. They take a value, a shift amount,
35 * and a width.
36 *
37 * For the left shift, the lower bits of the value are masked,
38 * then shifted left.
39 *
40 * For the right shift, the value is shifted right, then the lower bits
41 * are masked.
42 *
43 * (NOTE: _SHIFTL(v, 0, 32) won't work, just use an assignment)
44 *
45 */
46#define _SHIFTL(v, s, w) ((unsigned int) (((unsigned int) (v) & ((0x01 << (w)) - 1)) << (s)))
47#define _SHIFTR(v, s, w) ((unsigned int) (((unsigned int) (v) >> (s)) & ((0x01 << (w)) - 1)))
48
49#define _SHIFT _SHIFTL /* old, for compatibility only */
50
51#define G_ON (1)
52#define G_OFF (0)
53
54/**************************************************************************
55 *
56 * Graphics Binary Interface
57 *
58 **************************************************************************/
59
60#include <PR/gbi.h>
61
62/**************************************************************************
63 *
64 * Audio Binary Interface
65 *
66 **************************************************************************/
67
68#include <PR/abi.h>
69
70/**************************************************************************
71 *
72 * Task list
73 *
74 **************************************************************************/
75
76#define M_GFXTASK 1
77#define M_AUDTASK 2
78#define M_VIDTASK 3
79#define M_HVQTASK 6
80#define M_HVQMTASK 7
81
82/**************************************************************************
83 *
84 * Segment macros and definitions
85 *
86 **************************************************************************/
87
88#define NUM_SEGMENTS (16)
89#define SEGMENT_OFFSET(a) ((unsigned int) (a) & 0x00ffffff)
90#define SEGMENT_NUMBER(a) (((unsigned int) (a) << 4) >> 28)
91#define SEGMENT_NUMBER2(a) ((unsigned int) (a) >> 24)
92#define SEGMENT_ADDR(num, off) (((num) << 24) + (off))
93
94#ifndef NULL
95#define NULL 0
96#endif
97
98#endif /* !_MBI_H_ */