Previous 15994 Revisions Next

r14051 Sunday 15th January, 2012 at 22:56:24 UTC by Angelo Salese
Fixed corruption bug with FIFOs
[src]version.c
[src/mess/machine]isa_sblaster.c

src/version.c
r14050r14051
3838***************************************************************************/
3939
4040extern const char build_version[];
41const char build_version[] = "0.144u5 ("__DATE__")";
41const char build_version[] = "0.144u6 ("__DATE__")";
src/mess/machine/isa_sblaster.c
r14050r14051
5858   -1, -1,  1, -1, -1, -1, -1, -1,  1, -1, -1,   -1, -1, -1, -1, -1  /* Fx */
5959};
6060
61static const int protection_magic[4][9] =
61static const int protection_magic[4][9] =
6262{
6363    {  1, -2, -4,  8, -16,  32,  64, -128, -106 },
6464    { -1,  2, -4,  8,  16, -32,  64, -128,  165 },
r14050r14051
196196   if(data == 0 && m_dsp.reset_latch == 1)
197197   {
198198      // reset routine
199      m_dsp.fifo_ptr = 0;
200      m_dsp.fifo_r_ptr = 0;
201      for(int i=0;i < 15; i++)
202      {
203         m_dsp.fifo[i] = 0;
204         m_dsp.fifo_r[i] = 0;
205      }
199206      queue_r(0xaa); // reset OK ID
200207   }
201208
r14050r14051
252259
253260void sb8_device::process_fifo(UINT8 cmd)
254261{
262   printf("%02x\n",cmd);
263
255264   if (m_cmd_fifo_length[cmd] == -1)
256265   {
257266      printf("unemulated or undefined fifo command %02x\n",cmd);
r14050r14051
308317
309318                m_dsp.prot_value += protection_magic[m_dsp.prot_count % 4][8];
310319                m_dsp.prot_count++;
311               
320
312321                m_dack_out = (UINT8)(m_dsp.prot_value & 0xff);
313322                m_isa->drq1_w(1);
314323                break;
r14050r14051
337346
338347WRITE8_MEMBER(sb8_device::dsp_cmd_w)
339348{
340//    printf("%02x to DSP command @ %x\n", data, offset);
349//  printf("%02x to DSP command @ %x\n", data, offset);
341350
342351    if(offset)
343352      return;
r14050r14051
360369//-------------------------------------------------
361370
362371machine_config_constructor isa8_sblaster1_0_device::device_mconfig_additions() const
363{                                                         
372{
364373   return MACHINE_CONFIG_NAME( sblaster1_0_config );
365374}
366375
r14050r14051
438447    m_dsp.prot_value = 0xaa;
439448    m_dsp.prot_count = 0;
440449    m_dack_out = 0;
450    m_dsp.fifo_ptr = 0;
451    m_dsp.fifo_r_ptr = 0;
441452}
442453
443454bool sb8_device::have_dack(int line)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team