trunk/src/emu/machine/64h156.c
| r31172 | r31173 | |
| 385 | 385 | |
| 386 | 386 | int c64h156_device::get_next_bit(attotime &tm, const attotime &limit) |
| 387 | 387 | { |
| 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; |
| 389 | 395 | |
| 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; |
| 391 | 398 | |
| 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 | } |
| 397 | 401 | } |
| 398 | 402 | |
| 399 | 403 | if (cur_live.zero_counter >= cur_live.cycles_until_random_flux) { |