1 /***************************************************************************
\r
4 begin : Sun Mar 08 2009
\r
5 copyright : (C) 1999-2009 by Pete Bernert
\r
6 web : www.pbernert.com
\r
7 ***************************************************************************/
\r
9 /***************************************************************************
\r
11 * This program is free software; you can redistribute it and/or modify *
\r
12 * it under the terms of the GNU General Public License as published by *
\r
13 * the Free Software Foundation; either version 2 of the License, or *
\r
14 * (at your option) any later version. See also the license.txt file for *
\r
15 * additional informations. *
\r
17 ***************************************************************************/
\r
19 //*************************************************************************//
\r
20 // History of changes:
\r
22 // 2009/03/08 - Pete
\r
23 // - generic cleanup for the Peops release
\r
25 //*************************************************************************//
\r
27 #ifndef _GPU_PLUGIN_H
\r
28 #define _GPU_PLUGIN_H
\r
30 /////////////////////////////////////////////////////////////////////////////
\r
36 #if !defined(_WINDOWS) && !defined(__NANOGL__)
\r
37 #define glOrtho(x,y,z,xx,yy,zz) glOrthof(x,y,z,xx,yy,zz)
\r
40 #define PRED(x) ((x << 3) & 0xF8)
\r
41 #define PBLUE(x) ((x >> 2) & 0xF8)
\r
42 #define PGREEN(x) ((x >> 7) & 0xF8)
\r
44 #define RED(x) (x & 0xff)
\r
45 #define BLUE(x) ((x>>16) & 0xff)
\r
46 #define GREEN(x) ((x>>8) & 0xff)
\r
47 #define COLOR(x) (x & 0xffffff)
\r
50 #include "gpuExternals.h"
\r
52 /////////////////////////////////////////////////////////////////////////////
\r
56 #define bool unsigned short
\r
59 unsigned int ulFreezeVersion;
\r
60 unsigned int ulStatus;
\r
61 unsigned int ulControl[256];
\r
62 unsigned char psxVRam[1024*1024*2];
\r
66 long CALLBACK GPUinit();
\r
67 long CALLBACK GPUshutdown();
\r
68 long CALLBACK GPUopen(int hwndGPU);
\r
69 long CALLBACK GPUclose();
\r
70 unsigned long CALLBACK GPUreadData(void);
\r
71 void CALLBACK GPUreadDataMem(unsigned long * pMem, int iSize);
\r
72 unsigned long CALLBACK GPUreadStatus(void);
\r
73 void CALLBACK GPUwriteData(unsigned long gdata);
\r
74 void CALLBACK GPUwriteDataMem(unsigned long * pMem, int iSize);
\r
75 void CALLBACK GPUwriteStatus(unsigned long gdata);
\r
76 long CALLBACK GPUdmaChain(unsigned long * baseAddrL, unsigned long addr);
\r
77 void CALLBACK GPUupdateLace(void);
\r
78 void CALLBACK GPUmakeSnapshot(void);
\r
79 long CALLBACK GPUfreeze(unsigned long ulGetFreezeData,GPUFreeze_t * pF);
\r
80 long CALLBACK GPUgetScreenPic(unsigned char * pMem);
\r
81 long CALLBACK GPUshowScreenPic(unsigned char * pMem);
\r
82 //void CALLBACK GPUkeypressed(int keycode);
\r
83 //void CALLBACK GPUdisplayText(s8 * pText);
\r
84 //void CALLBACK GPUclearDynarec(void (CALLBACK *callback)(void));
\r
85 long CALLBACK GPUconfigure(void);
\r
86 long CALLBACK GPUtest(void);
\r
87 void CALLBACK GPUabout(void);
\r
90 void DoSnapShot(void);
\r
91 void GPUvSinc(void);
\r
92 void updateDisplay(void);
\r
93 void updateFrontDisplay(void);
\r
94 void SetAutoFrameCap(void);
\r
95 void SetAspectRatio(void);
\r
96 void CheckVRamRead(int x, int y, int dx, int dy, bool bFront);
\r
97 void CheckVRamReadEx(int x, int y, int dx, int dy);
\r
98 void SetFixes(void);
\r
100 void PaintPicDot(unsigned char * p,unsigned char c);
\r
101 //void DrawNumBorPic(unsigned char *pMem, int lSelectedSlot);
\r
102 void ResizeWindow();
\r
104 ////////////////////////////////////////////////////////////////////////////
\r
110 #endif // _GPU_INTERNALS_H
\r