Fixed rendering issue in psyaria and raycris attract. [smf]

This commit is contained in:
smf- 2014-02-22 15:41:59 +00:00
parent b1d3fefd54
commit 76d688c411
2 changed files with 91 additions and 89 deletions

View File

@ -7,6 +7,8 @@
*
*/
#define DEBUG_VIEWER ( 0 )
#include "emu.h"
#include "video/psx.h"
@ -84,10 +86,6 @@ static const UINT16 m_p_n_prevpointlist3[] = { 2, 0, 1 };
#define SINT11( x ) ( ( (INT32)( x ) << 21 ) >> 21 )
#define ADJUST_COORD( a ) \
a.w.l = SINT11( COORD_X( a ) ); \
a.w.h = SINT11( COORD_Y( a ) );
#define COORD_X( a ) ( (INT16)a.w.l )
#define COORD_Y( a ) ( (INT16)a.w.h )
#define SIZE_W( a ) ( a.w.l )
@ -112,7 +110,7 @@ INLINE void ATTR_PRINTF(3,4) verboselog( running_machine& machine, int n_level,
}
}
#if defined( MAME_DEBUG )
#if defined( DEBUG_VIEWER )
void psxgpu_device::DebugMeshInit( void )
{
@ -204,8 +202,8 @@ void psxgpu_device::DebugMesh( int n_coordx, int n_coordy )
n_len = n_ylen;
}
n_x.w.h = n_xstart; n_x.w.l = 0;
n_y.w.h = n_ystart; n_y.w.l = 0;
n_x.sw.h = n_xstart; n_x.sw.l = 0;
n_y.sw.h = n_ystart; n_y.sw.l = 0;
if( n_len == 0 )
{
@ -435,7 +433,7 @@ void psxgpu_device::updatevisiblearea()
break;
}
#if defined( MAME_DEBUG )
#if defined( DEBUG_VIEWER )
if( m_debug.b_mesh || m_debug.b_texture )
{
n_screenheight = 1024;
@ -459,7 +457,7 @@ void psxgpu_device::psx_gpu_init( int n_gputype )
m_n_gputype = n_gputype;
#if defined( MAME_DEBUG )
#if defined( DEBUG_VIEWER )
DebugMeshInit();
#endif
@ -620,7 +618,7 @@ UINT32 psxgpu_device::update_screen(screen_device &screen, bitmap_ind16 &bitmap,
int n_overscantop;
int n_overscanleft;
#if defined( MAME_DEBUG )
#if defined( DEBUG_VIEWER )
if( DebugMeshDisplay( bitmap, cliprect ) )
{
return 0;
@ -967,6 +965,7 @@ void psxgpu_device::decode_tpage( UINT32 tpage )
} \
break; \
}
#define FLATTEXTUREDPOLYGONUPDATE \
n_u.d += n_du; \
n_v.d += n_dv;
@ -1278,6 +1277,10 @@ void psxgpu_device::decode_tpage( UINT32 tpage )
} \
}
#define GET_COORD( a ) \
a.sw.l = SINT11( COORD_X( a ) ); \
a.sw.h = SINT11( COORD_Y( a ) );
INLINE int CullVertex( int a, int b )
{
int d = a - b;
@ -1289,21 +1292,21 @@ INLINE int CullVertex( int a, int b )
return 0;
}
#define CULLTRIANGLE( PacketType, start ) \
( \
CULLPOINT( PacketType, start, start + 1 ) || CULLPOINT( PacketType, start + 1, start + 2 ) || CULLPOINT( PacketType, start + 2, start ) \
)
#define CULLPOINT( PacketType, p1, p2 ) \
( \
CullVertex( COORD_Y( m_packet.PacketType.vertex[ p1 ].n_coord ), COORD_Y( m_packet.PacketType.vertex[ p2 ].n_coord ) ) || \
CullVertex( COORD_X( m_packet.PacketType.vertex[ p1 ].n_coord ), COORD_X( m_packet.PacketType.vertex[ p2 ].n_coord ) ) \
)
#define CULLTRIANGLE( PacketType, start ) \
( \
CULLPOINT( PacketType, start, start + 1 ) || CULLPOINT( PacketType, start + 1, start + 2 ) || CULLPOINT( PacketType, start + 2, start ) \
)
#define FINDTOPLEFT( PacketType ) \
for( n_point = 0; n_point < n_points; n_point++ ) \
{ \
ADJUST_COORD( m_packet.PacketType.vertex[ n_point ].n_coord ); \
GET_COORD( m_packet.PacketType.vertex[ n_point ].n_coord ); \
} \
\
n_leftpoint = 0; \
@ -1352,6 +1355,7 @@ INLINE int CullVertex( int a, int b )
} \
} \
n_rightpoint = n_leftpoint;
void psxgpu_device::FlatPolygon( int n_points )
{
INT16 n_y;
@ -1385,7 +1389,7 @@ void psxgpu_device::FlatPolygon( int n_points )
UINT16 *p_vram;
#if defined( MAME_DEBUG )
#if defined( DEBUG_VIEWER )
if( m_debug.n_skip == 1 )
{
return;
@ -1427,7 +1431,7 @@ void psxgpu_device::FlatPolygon( int n_points )
break;
}
}
n_cx1.w.h = COORD_X( m_packet.FlatPolygon.vertex[ n_leftpoint ].n_coord ); n_cx1.w.l = 0;
n_cx1.sw.h = COORD_X( m_packet.FlatPolygon.vertex[ n_leftpoint ].n_coord ); n_cx1.sw.l = 0;
n_leftpoint = p_n_leftpointlist[ n_leftpoint ];
n_distance = COORD_Y( m_packet.FlatPolygon.vertex[ n_leftpoint ].n_coord ) - n_y;
if( n_distance < 1 )
@ -1446,7 +1450,7 @@ void psxgpu_device::FlatPolygon( int n_points )
break;
}
}
n_cx2.w.h = COORD_X( m_packet.FlatPolygon.vertex[ n_rightpoint ].n_coord ); n_cx2.w.l = 0;
n_cx2.sw.h = COORD_X( m_packet.FlatPolygon.vertex[ n_rightpoint ].n_coord ); n_cx2.sw.l = 0;
n_rightpoint = p_n_rightpointlist[ n_rightpoint ];
n_distance = COORD_Y( m_packet.FlatPolygon.vertex[ n_rightpoint ].n_coord ) - n_y;
if( n_distance < 1 )
@ -1458,17 +1462,17 @@ void psxgpu_device::FlatPolygon( int n_points )
int drawy = n_y + n_drawoffset_y;
if( (INT16)n_cx1.w.h != (INT16)n_cx2.w.h && drawy >= (INT32)n_drawarea_y1 && drawy <= (INT32)n_drawarea_y2 )
if( (INT16)n_cx1.sw.h != (INT16)n_cx2.sw.h && drawy >= (INT32)n_drawarea_y1 && drawy <= (INT32)n_drawarea_y2 )
{
if( (INT16)n_cx1.w.h < (INT16)n_cx2.w.h )
if( (INT16)n_cx1.sw.h < (INT16)n_cx2.sw.h )
{
n_x = n_cx1.w.h;
n_distance = (INT16)n_cx2.w.h - n_x;
n_x = n_cx1.sw.h;
n_distance = (INT16)n_cx2.sw.h - n_x;
}
else
{
n_x = n_cx2.w.h;
n_distance = (INT16)n_cx1.w.h - n_x;
n_x = n_cx2.sw.h;
n_distance = (INT16)n_cx1.sw.h - n_x;
}
int drawx = n_x + n_drawoffset_x;
@ -1538,7 +1542,7 @@ void psxgpu_device::FlatTexturedPolygon( int n_points )
UINT16 *p_vram;
UINT32 n_bgr;
#if defined( MAME_DEBUG )
#if defined( DEBUG_VIEWER )
if( m_debug.n_skip == 2 )
{
return;
@ -1605,7 +1609,7 @@ void psxgpu_device::FlatTexturedPolygon( int n_points )
break;
}
}
n_cx1.w.h = COORD_X( m_packet.FlatTexturedPolygon.vertex[ n_leftpoint ].n_coord ); n_cx1.w.l = 0;
n_cx1.sw.h = COORD_X( m_packet.FlatTexturedPolygon.vertex[ n_leftpoint ].n_coord ); n_cx1.sw.l = 0;
n_cu1.w.h = TEXTURE_U( m_packet.FlatTexturedPolygon.vertex[ n_leftpoint ].n_texture ); n_cu1.w.l = 0;
n_cv1.w.h = TEXTURE_V( m_packet.FlatTexturedPolygon.vertex[ n_leftpoint ].n_texture ); n_cv1.w.l = 0;
n_leftpoint = p_n_leftpointlist[ n_leftpoint ];
@ -1628,7 +1632,7 @@ void psxgpu_device::FlatTexturedPolygon( int n_points )
break;
}
}
n_cx2.w.h = COORD_X( m_packet.FlatTexturedPolygon.vertex[ n_rightpoint ].n_coord ); n_cx2.w.l = 0;
n_cx2.sw.h = COORD_X( m_packet.FlatTexturedPolygon.vertex[ n_rightpoint ].n_coord ); n_cx2.sw.l = 0;
n_cu2.w.h = TEXTURE_U( m_packet.FlatTexturedPolygon.vertex[ n_rightpoint ].n_texture ); n_cu2.w.l = 0;
n_cv2.w.h = TEXTURE_V( m_packet.FlatTexturedPolygon.vertex[ n_rightpoint ].n_texture ); n_cv2.w.l = 0;
n_rightpoint = p_n_rightpointlist[ n_rightpoint ];
@ -1644,12 +1648,12 @@ void psxgpu_device::FlatTexturedPolygon( int n_points )
int drawy = n_y + n_drawoffset_y;
if( (INT16)n_cx1.w.h != (INT16)n_cx2.w.h && drawy >= (INT32)n_drawarea_y1 && drawy <= (INT32)n_drawarea_y2 )
if( (INT16)n_cx1.sw.h != (INT16)n_cx2.sw.h && drawy >= (INT32)n_drawarea_y1 && drawy <= (INT32)n_drawarea_y2 )
{
if( (INT16)n_cx1.w.h < (INT16)n_cx2.w.h )
if( (INT16)n_cx1.sw.h < (INT16)n_cx2.sw.h )
{
n_x = n_cx1.w.h;
n_distance = (INT16)n_cx2.w.h - n_x;
n_x = n_cx1.sw.h;
n_distance = (INT16)n_cx2.sw.h - n_x;
n_u.d = n_cu1.d;
n_v.d = n_cv1.d;
@ -1658,8 +1662,8 @@ void psxgpu_device::FlatTexturedPolygon( int n_points )
}
else
{
n_x = n_cx2.w.h;
n_distance = (INT16)n_cx1.w.h - n_x;
n_x = n_cx2.sw.h;
n_distance = (INT16)n_cx1.sw.h - n_x;
n_u.d = n_cu2.d;
n_v.d = n_cv2.d;
@ -1737,7 +1741,7 @@ void psxgpu_device::GouraudPolygon( int n_points )
UINT16 *p_vram;
#if defined( MAME_DEBUG )
#if defined( DEBUG_VIEWER )
if( m_debug.n_skip == 3 )
{
return;
@ -1787,7 +1791,7 @@ void psxgpu_device::GouraudPolygon( int n_points )
break;
}
}
n_cx1.w.h = COORD_X( m_packet.GouraudPolygon.vertex[ n_leftpoint ].n_coord ); n_cx1.w.l = 0;
n_cx1.sw.h = COORD_X( m_packet.GouraudPolygon.vertex[ n_leftpoint ].n_coord ); n_cx1.sw.l = 0;
n_cr1.w.h = BGR_R( m_packet.GouraudPolygon.vertex[ n_leftpoint ].n_bgr ); n_cr1.w.l = 0;
n_cg1.w.h = BGR_G( m_packet.GouraudPolygon.vertex[ n_leftpoint ].n_bgr ); n_cg1.w.l = 0;
n_cb1.w.h = BGR_B( m_packet.GouraudPolygon.vertex[ n_leftpoint ].n_bgr ); n_cb1.w.l = 0;
@ -1812,7 +1816,7 @@ void psxgpu_device::GouraudPolygon( int n_points )
break;
}
}
n_cx2.w.h = COORD_X( m_packet.GouraudPolygon.vertex[ n_rightpoint ].n_coord ); n_cx2.w.l = 0;
n_cx2.sw.h = COORD_X( m_packet.GouraudPolygon.vertex[ n_rightpoint ].n_coord ); n_cx2.sw.l = 0;
n_cr2.w.h = BGR_R( m_packet.GouraudPolygon.vertex[ n_rightpoint ].n_bgr ); n_cr2.w.l = 0;
n_cg2.w.h = BGR_G( m_packet.GouraudPolygon.vertex[ n_rightpoint ].n_bgr ); n_cg2.w.l = 0;
n_cb2.w.h = BGR_B( m_packet.GouraudPolygon.vertex[ n_rightpoint ].n_bgr ); n_cb2.w.l = 0;
@ -1830,12 +1834,12 @@ void psxgpu_device::GouraudPolygon( int n_points )
int drawy = n_y + n_drawoffset_y;
if( (INT16)n_cx1.w.h != (INT16)n_cx2.w.h && drawy >= (INT32)n_drawarea_y1 && drawy <= (INT32)n_drawarea_y2 )
if( (INT16)n_cx1.sw.h != (INT16)n_cx2.sw.h && drawy >= (INT32)n_drawarea_y1 && drawy <= (INT32)n_drawarea_y2 )
{
if( (INT16)n_cx1.w.h < (INT16)n_cx2.w.h )
if( (INT16)n_cx1.sw.h < (INT16)n_cx2.sw.h )
{
n_x = n_cx1.w.h;
n_distance = (INT16)n_cx2.w.h - n_x;
n_x = n_cx1.sw.h;
n_distance = (INT16)n_cx2.sw.h - n_x;
n_r.d = n_cr1.d;
n_g.d = n_cg1.d;
@ -1846,8 +1850,8 @@ void psxgpu_device::GouraudPolygon( int n_points )
}
else
{
n_x = n_cx2.w.h;
n_distance = (INT16)n_cx1.w.h - n_x;
n_x = n_cx2.sw.h;
n_distance = (INT16)n_cx1.sw.h - n_x;
n_r.d = n_cr2.d;
n_g.d = n_cg2.d;
@ -1948,7 +1952,7 @@ void psxgpu_device::GouraudTexturedPolygon( int n_points )
UINT16 *p_vram;
UINT32 n_bgr;
#if defined( MAME_DEBUG )
#if defined( DEBUG_VIEWER )
if( m_debug.n_skip == 4 )
{
return;
@ -2010,7 +2014,7 @@ void psxgpu_device::GouraudTexturedPolygon( int n_points )
break;
}
}
n_cx1.w.h = COORD_X( m_packet.GouraudTexturedPolygon.vertex[ n_leftpoint ].n_coord ); n_cx1.w.l = 0;
n_cx1.sw.h = COORD_X( m_packet.GouraudTexturedPolygon.vertex[ n_leftpoint ].n_coord ); n_cx1.sw.l = 0;
switch( n_cmd & 0x01 )
{
case 0x00:
@ -2059,7 +2063,7 @@ void psxgpu_device::GouraudTexturedPolygon( int n_points )
break;
}
}
n_cx2.w.h = COORD_X( m_packet.GouraudTexturedPolygon.vertex[ n_rightpoint ].n_coord ); n_cx2.w.l = 0;
n_cx2.sw.h = COORD_X( m_packet.GouraudTexturedPolygon.vertex[ n_rightpoint ].n_coord ); n_cx2.sw.l = 0;
switch( n_cmd & 0x01 )
{
case 0x00:
@ -2101,12 +2105,12 @@ void psxgpu_device::GouraudTexturedPolygon( int n_points )
int drawy = n_y + n_drawoffset_y;
if( (INT16)n_cx1.w.h != (INT16)n_cx2.w.h && drawy >= (INT32)n_drawarea_y1 && drawy <= (INT32)n_drawarea_y2 )
if( (INT16)n_cx1.sw.h != (INT16)n_cx2.sw.h && drawy >= (INT32)n_drawarea_y1 && drawy <= (INT32)n_drawarea_y2 )
{
if( (INT16)n_cx1.w.h < (INT16)n_cx2.w.h )
if( (INT16)n_cx1.sw.h < (INT16)n_cx2.sw.h )
{
n_x = n_cx1.w.h;
n_distance = (INT16)n_cx2.w.h - n_x;
n_x = n_cx1.sw.h;
n_distance = (INT16)n_cx2.sw.h - n_x;
n_r.d = n_cr1.d;
n_g.d = n_cg1.d;
@ -2121,8 +2125,8 @@ void psxgpu_device::GouraudTexturedPolygon( int n_points )
}
else
{
n_x = n_cx2.w.h;
n_distance = (INT16)n_cx1.w.h - n_x;
n_x = n_cx2.sw.h;
n_distance = (INT16)n_cx1.sw.h - n_x;
n_r.d = n_cr2.d;
n_g.d = n_cg2.d;
@ -2185,7 +2189,7 @@ void psxgpu_device::MonochromeLine( void )
UINT32 n_b;
UINT16 *p_vram;
#if defined( MAME_DEBUG )
#if defined( DEBUG_VIEWER )
if( m_debug.n_skip == 5 )
{
return;
@ -2236,16 +2240,16 @@ void psxgpu_device::MonochromeLine( void )
n_len = 1;
}
n_x.w.h = n_xstart; n_x.w.l = 0;
n_y.w.h = n_ystart; n_y.w.l = 0;
n_x.sw.h = n_xstart; n_x.sw.l = 0;
n_y.sw.h = n_ystart; n_y.sw.l = 0;
n_dx = (INT32)( ( n_xend << 16 ) - n_x.d ) / n_len;
n_dy = (INT32)( ( n_yend << 16 ) - n_y.d ) / n_len;
while( n_len > 0 )
{
int drawx = n_x.w.h + n_drawoffset_x;
int drawy = n_y.w.h + n_drawoffset_y;
int drawx = n_x.sw.h + n_drawoffset_x;
int drawy = n_y.sw.h + n_drawoffset_y;
if( drawx >= (INT32)n_drawarea_x1 && drawy >= (INT32)n_drawarea_y1 &&
drawx <= (INT32)n_drawarea_x2 && drawy <= (INT32)n_drawarea_y2 )
@ -2289,7 +2293,7 @@ void psxgpu_device::GouraudLine( void )
PAIR n_cb2;
UINT16 *p_vram;
#if defined( MAME_DEBUG )
#if defined( DEBUG_VIEWER )
if( m_debug.n_skip == 6 )
{
return;
@ -2311,8 +2315,8 @@ void psxgpu_device::GouraudLine( void )
n_cg2.w.h = BGR_G( m_packet.GouraudLine.vertex[ 1 ].n_bgr ); n_cg1.w.l = 0;
n_cb2.w.h = BGR_B( m_packet.GouraudLine.vertex[ 1 ].n_bgr ); n_cb1.w.l = 0;
n_x.w.h = n_xstart; n_x.w.l = 0;
n_y.w.h = n_ystart; n_y.w.l = 0;
n_x.sw.h = n_xstart; n_x.sw.l = 0;
n_y.sw.h = n_ystart; n_y.sw.l = 0;
n_r.d = n_cr1.d;
n_g.d = n_cg1.d;
n_b.d = n_cb1.d;
@ -2349,16 +2353,16 @@ void psxgpu_device::GouraudLine( void )
n_distance = 1;
}
n_dx = (INT32)( ( n_xend << 16 ) - n_x.d ) / n_distance;
n_dy = (INT32)( ( n_yend << 16 ) - n_y.d ) / n_distance;
n_dx = (INT32)( ( n_xend << 16 ) - n_x.sd ) / n_distance;
n_dy = (INT32)( ( n_yend << 16 ) - n_y.sd ) / n_distance;
n_dr = (INT32)( n_cr2.d - n_cr1.d ) / n_distance;
n_dg = (INT32)( n_cg2.d - n_cg1.d ) / n_distance;
n_db = (INT32)( n_cb2.d - n_cb1.d ) / n_distance;
while( n_distance > 0 )
{
int drawx = n_x.w.h + n_drawoffset_x;
int drawy = n_y.w.h + n_drawoffset_y;
int drawx = n_x.sw.h + n_drawoffset_x;
int drawy = n_y.sw.h + n_drawoffset_y;
if( drawx >= (INT32)n_drawarea_x1 && drawy >= (INT32)n_drawarea_y1 &&
drawx <= (INT32)n_drawarea_x2 && drawy <= (INT32)n_drawarea_y2 )
@ -2369,8 +2373,8 @@ void psxgpu_device::GouraudLine( void )
p_n_greenshade[ MID_LEVEL | n_g.w.h ] |
p_n_blueshade[ MID_LEVEL | n_b.w.h ] );
}
n_x.d += n_dx;
n_y.d += n_dy;
n_x.sd += n_dx;
n_y.sd += n_dy;
n_r.d += n_dr;
n_g.d += n_dg;
n_b.d += n_db;
@ -2389,7 +2393,7 @@ void psxgpu_device::FrameBufferRectangleDraw( void )
INT16 n_x;
UINT16 *p_vram;
#if defined( MAME_DEBUG )
#if defined( DEBUG_VIEWER )
if( m_debug.n_skip == 7 )
{
return;
@ -2451,7 +2455,7 @@ void psxgpu_device::FlatRectangle( void )
INT32 n_h;
UINT16 *p_vram;
#if defined( MAME_DEBUG )
#if defined( DEBUG_VIEWER )
if( m_debug.n_skip == 8 )
{
return;
@ -2521,7 +2525,7 @@ void psxgpu_device::FlatRectangle8x8( void )
INT32 n_h;
UINT16 *p_vram;
#if defined( MAME_DEBUG )
#if defined( DEBUG_VIEWER )
if( m_debug.n_skip == 9 )
{
return;
@ -2591,7 +2595,7 @@ void psxgpu_device::FlatRectangle16x16( void )
INT32 n_h;
UINT16 *p_vram;
#if defined( MAME_DEBUG )
#if defined( DEBUG_VIEWER )
if( m_debug.n_skip == 10 )
{
return;
@ -2672,7 +2676,7 @@ void psxgpu_device::FlatTexturedRectangle( void )
UINT16 *p_clut;
UINT16 n_bgr;
#if defined( MAME_DEBUG )
#if defined( DEBUG_VIEWER )
if( m_debug.n_skip == 11 )
{
return;
@ -2775,7 +2779,7 @@ void psxgpu_device::Sprite8x8( void )
UINT16 *p_clut;
UINT16 n_bgr;
#if defined( MAME_DEBUG )
#if defined( DEBUG_VIEWER )
if( m_debug.n_skip == 12 )
{
return;
@ -2878,7 +2882,7 @@ void psxgpu_device::Sprite16x16( void )
UINT16 *p_clut;
UINT16 n_bgr;
#if defined( MAME_DEBUG )
#if defined( DEBUG_VIEWER )
if( m_debug.n_skip == 13 )
{
return;
@ -2956,7 +2960,7 @@ void psxgpu_device::Dot( void )
UINT32 n_b;
UINT16 *p_vram;
#if defined( MAME_DEBUG )
#if defined( DEBUG_VIEWER )
if( m_debug.n_skip == 14 )
{
return;
@ -2995,7 +2999,7 @@ void psxgpu_device::MoveImage( void )
INT16 n_dstx;
UINT16 *p_vram;
#if defined( MAME_DEBUG )
#if defined( DEBUG_VIEWER )
if( m_debug.n_skip == 15 )
{
return;
@ -3741,7 +3745,7 @@ void psxgpu_device::vblank(screen_device &screen, bool vblank_state)
{
if( vblank_state )
{
#if defined( MAME_DEBUG )
#if defined( DEBUG_VIEWER )
DebugCheckKeys();
#endif

View File

@ -232,15 +232,6 @@ private:
void gpu_read( UINT32 *p_ram, INT32 n_size );
void gpu_write( UINT32 *p_ram, INT32 n_size );
#if defined( MAME_DEBUG )
void DebugMeshInit( void );
void DebugMesh( int n_coordx, int n_coordy );
void DebugMeshEnd( void );
void DebugCheckKeys( void );
int DebugMeshDisplay( bitmap_ind16 &bitmap, const rectangle &cliprect );
int DebugTextureDisplay( bitmap_ind16 &bitmap );
#endif
INT32 m_n_tx;
INT32 m_n_ty;
INT32 n_abr;
@ -280,10 +271,6 @@ private:
PACKET m_packet;
#if defined( MAME_DEBUG )
psx_gpu_debug m_debug;
#endif
UINT16 *p_p_vram[ 1024 ];
UINT16 p_n_redshade[ MAX_LEVEL * MAX_SHADE ];
@ -315,6 +302,17 @@ private:
UINT16 p_n_b1g1[ 0x10000 ];
devcb2_write_line m_vblank_handler;
#if defined( DEBUG_VIEWER )
void DebugMeshInit( void );
void DebugMesh( int n_coordx, int n_coordy );
void DebugMeshEnd( void );
void DebugCheckKeys( void );
int DebugMeshDisplay( bitmap_ind16 &bitmap, const rectangle &cliprect );
int DebugTextureDisplay( bitmap_ind16 &bitmap );
psx_gpu_debug m_debug;
#endif
};
class cxd8514q_device : public psxgpu_device