/*
 * $Id: m_nmibuf.h,v 1.2 2004/02/12 22:54:41 tong Exp $
 *
 * リセットしても壊されない領域
 *
 *
 */

#ifndef __M_NMIBUF_H_
#define __M_NMIBUF_H_

#ifdef _LANGUAGE_C_PLUS_PLUS
extern "C" {
#endif
#if 0
}
#endif

/*
 * 1:ずるモードＯＮ
 * 2:異常リセット検出(リセットさん免除)
 * 4:ゲーム実行中または実行中の異常リセット
 */

#define M_APPNMI_SET_ZURUMODE()    (osAppNMIBuffer[15] |=  1)
#define M_APPNMI_CLR_ZURUMODE()    (osAppNMIBuffer[15] &= ~1)
#define M_APPNMI_XOR_ZURUMODE()    (osAppNMIBuffer[15] ^=  1)
#define M_APPNMI_TST_ZURUMODE()  !!(osAppNMIBuffer[15] &   1)
#define M_APPNMI_SET_ZURUMODE2()   (osAppNMIBuffer[15] |=  8)
#define M_APPNMI_CLR_ZURUMODE2()   (osAppNMIBuffer[15] &= ~8)
#define M_APPNMI_XOR_ZURUMODE2()   (osAppNMIBuffer[15] ^=  8)
#define M_APPNMI_TST_ZURUMODE2() !!(osAppNMIBuffer[15] &   8)
#define M_APPNMI_SET_ZURUMODE3()   (osAppNMIBuffer[15] |=  16)
#define M_APPNMI_CLR_ZURUMODE3()   (osAppNMIBuffer[15] &= ~16)
#define M_APPNMI_XOR_ZURUMODE3()   (osAppNMIBuffer[15] ^=  16)
#define M_APPNMI_TST_ZURUMODE3() !!(osAppNMIBuffer[15] &   16)
#define M_APPNMI_SET_ILGRESET1()   (osAppNMIBuffer[15] |=  2)
#define M_APPNMI_CLR_ILGRESET1()   (osAppNMIBuffer[15] &= ~2)
#define M_APPNMI_TST_ILGRESET1() !!(osAppNMIBuffer[15] &   2)
#define M_APPNMI_SET_ILGRESET2()   (osAppNMIBuffer[15] |=  4)
#define M_APPNMI_CLR_ILGRESET2()   (osAppNMIBuffer[15] &= ~4)
#define M_APPNMI_TST_ILGRESET2() !!(osAppNMIBuffer[15] &   4)

#if 0
{
#endif
#ifdef _LANGUAGE_C_PLUS_PLUS
} /* extern "C" */
#endif

#endif /* __M_NMIBUF_H_ */
