Super Mario 64s source code (from a leak on 4chan so be careful)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

104 lines
3.0 KiB

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