Previous 199869 Revisions Next

r31173 Thursday 3rd July, 2014 at 05:54:05 UTC by Oliver Stöneberg
small optimization to c64h156_device::get_next_bit() (nw)
[src/emu/machine]64h156.c

trunk/src/emu/machine/64h156.c
r31172r31173
385385
386386int c64h156_device::get_next_bit(attotime &tm, const attotime &limit)
387387{
388   attotime next = tm + m_period;
388   int bit = 0;
389   if (!cur_live.edge.is_never())
390   {
391      attotime next = tm + m_period;
392      if (cur_live.edge < next)
393      {
394         bit = 1;
389395
390   int bit = (cur_live.edge.is_never() || cur_live.edge >= next) ? 0 : 1;
396         cur_live.zero_counter = 0;
397         cur_live.cycles_until_random_flux = (rand() % 31) + 289;
391398
392   if (bit) {
393      cur_live.zero_counter = 0;
394      cur_live.cycles_until_random_flux = (rand() % 31) + 289;
395
396      get_next_edge(next);
399         get_next_edge(next);
400      }
397401   }
398402
399403   if (cur_live.zero_counter >= cur_live.cycles_until_random_flux) {

Previous 199869 Revisions Next


© 1997-2024 The MAME Team