model2.cpp: hookup polygon count (nw)

This commit is contained in:
angelosa 2018-02-19 16:28:54 +01:00
parent c65b903ed2
commit a649377289
2 changed files with 10 additions and 8 deletions

View File

@ -1447,12 +1447,6 @@ READ8_MEMBER(model2_state::tgpid_r)
return ID[offset];
}
/* Sky Target, TODO */
READ32_MEMBER(model2_state::polygon_count_r)
{
return 0;
}
/* common map for all Model 2 versions */
ADDRESS_MAP_START(model2_state::model2_base_mem)
AM_RANGE(0x00000000, 0x001fffff) AM_ROM AM_WRITENOP

View File

@ -293,6 +293,14 @@ WRITE32_MEMBER(model2_state::model2_3d_zclip_w)
m_raster->master_z_clip = data;
}
// TODO: only Sky Target seems to use this for unknown purpose
READ32_MEMBER(model2_state::polygon_count_r)
{
// printf("%08x\n",m_raster->tri_list_index);
return m_raster->tri_list_index;
}
/*******************************************
*
* Hardware 3D Rasterizer Processing
@ -794,7 +802,7 @@ void model2_renderer::model2_3d_render(triangle *tri, const rectangle &cliprect)
// TODO: this seems to be more accurate but it breaks in some cases
//rectangle vp(tri->viewport[0] - 8, tri->viewport[2] - tri->viewport[0], tri->viewport[1] - 90, tri->viewport[3] - tri->viewport[1]);
vp &= cliprect;
extra.state = &m_state;
extra.lumabase = ((tri->texheader[1] & 0xFF) << 7) + ((tri->luma >> 5) ^ 0x7);
extra.colorbase = (tri->texheader[3] >> 6) & 0x3FF;
@ -2510,7 +2518,7 @@ static uint32_t * geo_code_jump( geo_state *geo, uint32_t opcode, uint32_t *inpu
}
static uint32_t * geo_process_command( geo_state *geo, uint32_t opcode, uint32_t *input, bool *end_code )
{
{
switch( (opcode >> 23) & 0x1f )
{
case 0x00: input = geo_nop( geo, opcode, input ); break;