Create Xref-Html Frames                    Remove All Frames
file:/home/jivera/wd/pcsx/PsxCommon.h        (Tue Nov 25 22:46:14 2003 )


   1: /*  Pcsx - Pc Psx Emulator
   2:  *  Copyright (C) 1999-2003  Pcsx Team
   3:  *
   4:  *  This program is free software; you can redistribute it and/or modify
   5:  *  it under the terms of the GNU General Public License as published by
   6:  *  the Free Software Foundation; either version 2 of the License, or
   7:  *  (at your option) any later version.
   8:  *
   9:  *  This program is distributed in the hope that it will be useful,
  10:  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  11:  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12:  *  GNU General Public License for more details.
  13:  *
  14:  *  You should have received a copy of the GNU General Public License
  15:  *  along with this program; if not, write to the Free Software
  16:  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  17:  */
  18: 
  19: #ifndef __PSXCOMMON_H__
  20: #define __PSXCOMMON_H__
  21: 
  22: #include "System.h"
  23: #if defined(__DREAMCAST__)
  24: #include <zlib/zlib.h>
  25: #else
  26: #include <zlib.h>
  27: #endif
  28: 
  29: #if defined(__WIN32__)
  30: 
  31: #include <windows.h>
  32: 
  33: typedef struct {
  34:         HWND hWnd;           // Main window handle
  35:         HINSTANCE hInstance; // Application instance
  36:         HMENU hMenu;         // Main window menu
  37: } AppData;
  38: 
  39: #elif defined (__LINUX__) || defined (__MACOSX__)
  40: 
  41: #include <sys/types.h>
  42: 
  43: #define __inline inline
  44: 
  45: #endif
  46: 
  47: #if defined (__LINUX__) || defined (__MACOSX__)
  48: #define strnicmp strncasecmp
  49: #endif
  50: 
  51: // Basic types
  52: #if defined(_MSC_VER_)
  53: 
  54: typedef __int8  s8;
  55: typedef __int16 s16;
  56: typedef __int32 s32;
  57: typedef __int64 s64;
  58: 
  59: typedef unsigned __int8  u8;
  60: typedef unsigned __int16 u16;
  61: typedef unsigned __int32 u32;
  62: typedef unsigned __int64 u64;
  63: 
  64: #elif defined(__LINUX__) || defined(__DREAMCAST__) || \
  65:           defined(__MINGW32__) || defined(__MACOSX__)
  66: 
  67: typedef char s8;
  68: typedef short s16;
  69: typedef long s32;
  70: typedef long long s64;
  71: 
  72: typedef unsigned char u8;
  73: typedef unsigned short u16;
  74: typedef unsigned long u32;
  75: typedef unsigned long long u64;
  76: 
  77: #endif
  78: 
  79: #ifdef ENABLE_NLS
  80: 
  81: #include <libintl.h>
  82: 
  83: #undef _
  84: #define _(String) dgettext (PACKAGE, String)
  85: #ifdef gettext_noop
  86: #  define N_(String) gettext_noop (String)
  87: #else
  88: #  define N_(String) (String)
  89: #endif
  90: 
  91: #else
  92: 
  93: #define _(msgid) msgid
  94: #define N_(msgid) msgid
  95: 
  96: #endif
  97: 
  98: extern int Log;
  99: void __Log(char *fmt, ...);
 100: 
 101: typedef struct {
 102:         char Gpu[256];
 103:         char Spu[256];
 104:         char Cdr[256];
 105:         char Pad1[256];
 106:         char Pad2[256];
 107:         char Net[256];
 108:         char Mcd1[256];
 109:         char Mcd2[256];
 110:         char Bios[256];
 111:         char BiosDir[256];
 112:         char PluginsDir[256];
 113:         char Lang[256];
 114:         long Xa;
 115:         long Sio;
 116:         long Mdec;
 117:         long PsxAuto;
 118:         long PsxType; // ntsc - 0 | pal - 1
 119:         long QKeys;
 120:         long Cdda;
 121:         long HLE;
 122:         long Cpu;
 123:         long PsxOut;
 124:         long SpuIrq;
 125:         long RCntFix;
 126:         long UseNet;
 127:         long VSyncWA;
 128: } PcsxConfig;
 129: 
 130: PcsxConfig Config;
 131: 
 132: extern long LoadCdBios;
 133: extern int StatesC;
 134: extern int cdOpenCase;
 135: extern int NetOpened;
 136: 
 137: #define gzfreeze(ptr, size) \
 138:         if (Mode == 1) gzwrite(f, ptr, size); \
 139:         if (Mode == 0) gzread(f, ptr, size);
 140: 
 141: #define gzfreezel(ptr) gzfreeze(ptr, sizeof(ptr))
 142: 
 143: //#define BIAS  4
 144: #define BIAS    2
 145: #define PSXCLK  33868800        /* 33.8688 Mhz */
 146: 
 147: #include "R3000A.h"
 148: #include "PsxMem.h"
 149: #include "PsxHw.h"
 150: #include "PsxBios.h"
 151: #include "PsxDma.h"
 152: #include "PsxCounters.h"
 153: #include "PsxHLE.h"
 154: #include "Mdec.h"
 155: #include "CdRom.h"
 156: #include "Sio.h"
 157: #include "Spu.h"
 158: #include "plugins.h"
 159: #include "Decode_XA.h"
 160: #include "Misc.h"
 161: #include "Debug.h"
 162: #include "Gte.h"
 163: 
 164: #endif /* __PSXCOMMON_H__ */
 165: /* arch-tag: Matthew Dempsky Wed Oct 15 10:34:46 CST 2003 (PsxCommon.h)
 166:  */
 167: 








































Html form generated by Xrefactory version 1.6.4 on Fri Dec 12 20:52:56 2003
Trial version.