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.

119 lines
3.0 KiB

6 years ago
  1. /*====================================================================
  2. * os_exception.h
  3. *
  4. * Copyright 1995, Silicon Graphics, Inc.
  5. * All Rights Reserved.
  6. *
  7. * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics,
  8. * Inc.; the contents of this file may not be disclosed to third
  9. * parties, copied or duplicated in any form, in whole or in part,
  10. * without the prior written permission of Silicon Graphics, Inc.
  11. *
  12. * RESTRICTED RIGHTS LEGEND:
  13. * Use, duplication or disclosure by the Government is subject to
  14. * restrictions as set forth in subdivision (c)(1)(ii) of the Rights
  15. * in Technical Data and Computer Software clause at DFARS
  16. * 252.227-7013, and/or in similar or successor clauses in the FAR,
  17. * DOD or NASA FAR Supplement. Unpublished - rights reserved under the
  18. * Copyright Laws of the United States.
  19. *====================================================================*/
  20. /*---------------------------------------------------------------------*
  21. Copyright (C) 1998 Nintendo. (Originated by SGI)
  22. $RCSfile: os_exception.h,v $
  23. $Revision: 1.1 $
  24. $Date: 1998/10/09 08:01:07 $
  25. *---------------------------------------------------------------------*/
  26. #ifndef _OS_EXCEPTION_H_
  27. #define _OS_EXCEPTION_H_
  28. #ifdef _LANGUAGE_C_PLUS_PLUS
  29. extern "C" {
  30. #endif
  31. #include <PR/ultratypes.h>
  32. #if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
  33. /**************************************************************************
  34. *
  35. * Type definitions
  36. *
  37. */
  38. typedef u32 OSIntMask;
  39. typedef u32 OSHWIntr;
  40. #endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
  41. /**************************************************************************
  42. *
  43. * Global definitions
  44. *
  45. */
  46. /* Flags for debugging purpose */
  47. #define OS_FLAG_CPU_BREAK 1 /* Break exception has occurred */
  48. #define OS_FLAG_FAULT 2 /* CPU fault has occurred */
  49. /* Interrupt masks */
  50. #define OS_IM_NONE 0x00000001
  51. #define OS_IM_SW1 0x00000501
  52. #define OS_IM_SW2 0x00000601
  53. #define OS_IM_CART 0x00000c01
  54. #define OS_IM_PRENMI 0x00001401
  55. #define OS_IM_RDBWRITE 0x00002401
  56. #define OS_IM_RDBREAD 0x00004401
  57. #define OS_IM_COUNTER 0x00008401
  58. #define OS_IM_CPU 0x0000ff01
  59. #define OS_IM_SP 0x00010401
  60. #define OS_IM_SI 0x00020401
  61. #define OS_IM_AI 0x00040401
  62. #define OS_IM_VI 0x00080401
  63. #define OS_IM_PI 0x00100401
  64. #define OS_IM_DP 0x00200401
  65. #define OS_IM_ALL 0x003fff01
  66. #define RCP_IMASK 0x003f0000
  67. #define RCP_IMASKSHIFT 16
  68. #if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
  69. /**************************************************************************
  70. *
  71. * Macro definitions
  72. *
  73. */
  74. /**************************************************************************
  75. *
  76. * Extern variables
  77. *
  78. */
  79. /**************************************************************************
  80. *
  81. * Function prototypes
  82. *
  83. */
  84. /* Interrupt operations */
  85. extern OSIntMask osGetIntMask(void);
  86. extern OSIntMask osSetIntMask(OSIntMask);
  87. #endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
  88. #ifdef _LANGUAGE_C_PLUS_PLUS
  89. }
  90. #endif
  91. #endif /* !_OS_EXCEPTION_H_ */