/**
 * TrueReality - parser_extern.h
 * Copyright (C) 1998 Niki W. Waibel
 *
 * This program is free software; you can redistribute it and/
 * or modify it under the terms of the GNU General Public Li-
 * cence as published by the Free Software Foundation; either
 * version 2 of the Licence, or any later version.
 *
 * This program is distributed in the hope that it will be use-
 * ful, but WITHOUT ANY WARRANTY; without even the implied war-
 * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU General Public Licence for more details.
 *
 * You should have received a copy of the GNU General Public
 * Licence along with this program; if not, write to the Free
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
 * USA.
 *
 * Information about me (the author):
 *   Niki W. Waibel, Reichenau 20, 6890 Lustenau, Austria - EUROPE
 *   niki.waibel@gmx.net
**/





#define __PARSER_EXTERN_H





/*** struct section ***/

struct tr_prefs
{
        /* :) ... a developer need this */
        
        unsigned long long int debug;
        
        
        
        /* Display */
        
        int display;
        
        

        /* Controller */
        
        int plugged_controller;
        
        

        /* X11 */
        
        int UseSHM;
        

        
        /* for future */
        
        int sound;
        int sound_bits;
        int sound_freq;
        int sound_stereo;
        
        int joystick;
        
        
        
        /* more should come */
        
}; /* struct tr_prefs */





/*** extern section ***/

extern struct tr_prefs prefs;





/*** define section ***/

/* tr_prefs.display */

#define NO_DISPLAY              0
#define LOCAL_DISPLAY           1
#define LOCAL_DISPLAY_PROCESS   2
#define REMOTE_DISPLAY          3

/* tr_prefs.debug */

#define DBG_CPU_ALL             0x00000000000000ffULL
#define DBG_CPU_PC              0x0000000000000001ULL
#define DBG_CPU_REG             0x0000000000000002ULL
#define DBG_CPU_INSTR           0x0000000000000004ULL
#define DBG_CPU_COUNT           0x0000000000000008ULL
#define DBG_CP0_INSTR           0x0000000000000010ULL
#define DBG_CP1_INSTR           0x0000000000000020ULL
#define DBG_CP2_INSTR           0x0000000000000040ULL

#define DBG_INTR_ALL            0x000000000000ff00ULL
#define DBG_INTR_COMP           0x0000000000000100ULL
#define DBG_INTR_VI             0x0000000000000200ULL
#define DBG_INTR_SI             0x0000000000000400ULL
#define DBG_INTR_SP             0x0000000000000800ULL
#define DBG_INTR_PI             0x0000000000001000ULL

#define DBG_MEMORY_ALL          0x00000fffffff0000ULL
#define DBG_MEMORY              0x0000000000010000ULL
#define DBG_RD_RAM              0x0000000000020000ULL
#define DBG_RD_REG              0x0000000000040000ULL
#define DBG_SP_DMEM             0x0000000000080000ULL
#define DBG_SP_IMEM             0x0000000000100000ULL
#define DBG_SP_REG              0x0000000000200000ULL
#define DBG_SP_PC_REG           0x0000000000400000ULL
#define DBG_SP_IBIST_REG        0x0000000000800000ULL
#define DBG_DPC_REG             0x0000000001000000ULL
#define DBG_DPS_REG             0x0000000002000000ULL
#define DBG_MI_REG              0x0000000004000000ULL
#define DBG_VI_REG              0x0000000008000000ULL
#define DBG_AI_REG              0x0000000010000000ULL
#define DBG_PI_REG              0x0000000020000000ULL
#define DBG_RI_REG              0x0000000040000000ULL
#define DBG_SI_REG              0x0000000080000000ULL
#define DBG_PI_DOM2_ADDR1       0x0000000100000000ULL
#define DBG_PI_DOM1_ADDR1       0x0000000200000000ULL
#define DBG_PI_DOM2_ADDR2       0x0000000400000000ULL
#define DBG_PI_DOM1_ADDR2       0x0000000800000000ULL
#define DBG_PI_ROM              0x0000001000000000ULL
#define DBG_PI_RAM              0x0000002000000000ULL
#define DBG_PI_DOM1_ADDR3       0x0000004000000000ULL

#define DBG_DISP                0x0000f00000000000ULL
#define DBG_DISP_REFRESH        0x0000100000000000ULL
#define DBG_DISP_MODE           0x0000200000000000ULL

#define DBG_CONTR_ALL           0x000f000000000000ULL
#define DBG_CONTR_PIF           0x0001000000000000ULL
#define DBG_CONTR_BUTTONS       0x0002000000000000ULL

#define DBG_EXC                 0xfff0000000000000ULL
#define DBG_EXC_OV              0x0010000000000000ULL
#define DBG_EXC_FPE             0x0020000000000000ULL



/* tr_prefs.plugged_controller */

#define MAX_CONTR       4      /* BUG: maybe 6 ???*/

#define NOCONTR         0x00
#define CONTR_1         0x01
#define CONTR_2         0x02
#define CONTR_3         0x04
#define CONTR_4         0x08
#define CONTR_5         0x10    /* BUG: ??? */
#define CONTR_6         0x20    /* BUG: ??? */


