Previous 199869 Revisions Next

r21553 Monday 4th March, 2013 at 01:21:53 UTC by Angelo Salese
Work-around for VDP1 framebuffer clear, fixes Daisenryaku Strong Style regression
[src/emu/video]stvvdp1.c

trunk/src/emu/video/stvvdp1.c
r21552r21553
180180   return m_vdp1_regs[offset]; //TODO: write-only regs should return open bus or zero
181181}
182182
183/* TODO: TVM & 1 is just a kludgy work-around, the VDP1 actually needs to be rewritten from scratch. */
184/* Daisenryaku Strong Style (daisenss) uses it */
183185void saturn_state::stv_clear_framebuffer( int which_framebuffer )
184186{
185187   int start_x, end_x, start_y, end_y;
186188
187   start_x = STV_VDP1_EWLR_X1 * 8;
189   start_x = STV_VDP1_EWLR_X1 * ((STV_VDP1_TVM & 1) ? 16 : 8);
188190   start_y = STV_VDP1_EWLR_Y1 * (m_vdp1.framebuffer_double_interlace+1);
189   end_x = STV_VDP1_EWRR_X3 * 8;
191   end_x = STV_VDP1_EWRR_X3 * ((STV_VDP1_TVM & 1) ? 16 : 8);
190192   end_y = (STV_VDP1_EWRR_Y3+1) * (m_vdp1.framebuffer_double_interlace+1);
191//   popmessage("%d %d %d %d",STV_VDP1_EWLR_X1,STV_VDP1_EWLR_Y1,STV_VDP1_EWRR_X3,STV_VDP1_EWRR_Y3,m_vdp1.framebuffer_double_interlace);
193//   popmessage("%d %d %d %d %d",STV_VDP1_EWLR_X1,STV_VDP1_EWLR_Y1,STV_VDP1_EWRR_X3,STV_VDP1_EWRR_Y3,m_vdp1.framebuffer_double_interlace);
192194
193   for(int y=start_y;y<end_y;y++)
194      for(int x=start_x;x<end_x;x++)
195         m_vdp1.framebuffer[ which_framebuffer ][(x+y*512)] = m_vdp1.ewdr;
195   if(STV_VDP1_TVM & 1)
196   {
197      for(int y=start_y;y<end_y;y++)
198         for(int x=start_x;x<end_x;x++)
199            m_vdp1.framebuffer[ which_framebuffer ][(x+y*1024)] = m_vdp1.ewdr;
200   }
201   else
202   {
203      for(int y=start_y;y<end_y;y++)
204         for(int x=start_x;x<end_x;x++)
205            m_vdp1.framebuffer[ which_framebuffer ][(x+y*512)] = m_vdp1.ewdr;
206   }
196207
197208   if ( VDP1_LOG ) logerror( "Clearing %d framebuffer\n", m_vdp1.framebuffer_current_draw );
198209//   memset( m_vdp1.framebuffer[ which_framebuffer ], m_vdp1.ewdr, 1024 * 256 * sizeof(UINT16) * 2 );

Previous 199869 Revisions Next


© 1997-2024 The MAME Team