branches/alto2/src/emu/cpu/alto2/a2disk.c
| r26142 | r26143 | |
| 771 | 771 | |
| 772 | 772 | jkff_t alto2_cpu_device::update_jkff(UINT8 s0, UINT8 s1) |
| 773 | 773 | { |
| 774 | static const char* raise_lower[2] = {"↗","↘"}; |
| 774 | 775 | UINT8 result = jkff_lookup[s1 & 63][ s0 & 63]; |
| 775 | 776 | #if ALTO2_DEBUG |
| 776 | | LOG((LOG_DISK,8,"%s : ", jkff_name)); |
| 777 | LOG((LOG_DISK,8,"%s\t: ", jkff_name)); |
| 777 | 778 | if ((s0 ^ result) & JKFF_CLK) |
| 778 | | LOG((LOG_DISK,8," CLK:%d→%d", s0 & 1, result & 1)); |
| 779 | LOG((LOG_DISK,8," CLK%s", raise_lower[result & 1])); |
| 779 | 780 | if ((s0 ^ result) & JKFF_J) |
| 780 | | LOG((LOG_DISK,8," J:%d→%d", (s0 >> 1) & 1, (result >> 1) & 1)); |
| 781 | LOG((LOG_DISK,8," J%s", raise_lower[(result >> 1) & 1])); |
| 781 | 782 | if ((s0 ^ result) & JKFF_K) |
| 782 | | LOG((LOG_DISK,8," K:%d→%d", (s0 >> 2) & 1, (result >> 2) & 1)); |
| 783 | LOG((LOG_DISK,8," K'%s", raise_lower[(result >> 2) & 1])); |
| 783 | 784 | if ((s0 ^ result) & JKFF_S) |
| 784 | | LOG((LOG_DISK,8," S:%d→%d", (s0 >> 3) & 1, (result >> 3) & 1)); |
| 785 | LOG((LOG_DISK,8," S'%s", raise_lower[(result >> 3) & 1])); |
| 785 | 786 | if ((s0 ^ result) & JKFF_C) |
| 786 | | LOG((LOG_DISK,8," C:%d→%d", (s0 >> 4) & 1, (result >> 4) & 1)); |
| 787 | LOG((LOG_DISK,8," C'%s", raise_lower[(result >> 4) & 1])); |
| 787 | 788 | if ((s0 ^ result) & JKFF_Q) |
| 788 | | LOG((LOG_DISK,8," Q:%d→%d", (s0 >> 5) & 1, (result >> 5) & 1)); |
| 789 | LOG((LOG_DISK,8," Q%s", raise_lower[(result >> 5) & 1])); |
| 789 | 790 | if ((s0 ^ result) & JKFF_Q0) |
| 790 | | LOG((LOG_DISK,8," Q':%d→%d", (s0 >> 6) & 1, (result >> 6) & 1)); |
| 791 | LOG((LOG_DISK,8," Q'%s", raise_lower[(result >> 6) & 1])); |
| 791 | 792 | LOG((LOG_DISK,8,"\n")); |
| 792 | 793 | #endif |
| 793 | 794 | return static_cast<jkff_t>(result); |
| r26142 | r26143 | |
| 1943 | 1944 | m_dsk.ready_mf31a = dhd ? dhd->get_ready_0() : 1; |
| 1944 | 1945 | |
| 1945 | 1946 | /* start monoflop 31a, which resets ready_mf31a */ |
| 1946 | | if (!m_dsk.ready_timer) |
| 1947 | | m_dsk.ready_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(alto2_cpu_device::disk_ready_mf31a),this)); |
| 1948 | 1947 | m_dsk.ready_timer->adjust(TW_READY, 1); |
| 1949 | 1948 | m_dsk.ready_timer->enable(); |
| 1950 | 1949 | } |
| r26142 | r26143 | |
| 2337 | 2336 | m_dsk.bitclk_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(alto2_cpu_device::disk_bitclk),this)); |
| 2338 | 2337 | |
| 2339 | 2338 | m_dsk.seclate_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(alto2_cpu_device::disk_seclate),this)); |
| 2340 | | m_dsk.seclate_timer->set_param(1); |
| 2341 | 2339 | m_dsk.seclate_timer->adjust(attotime::from_nsec(TW_SECLATE), 1); |
| 2342 | 2340 | |
| 2343 | 2341 | m_dsk.ok_to_run_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(alto2_cpu_device::disk_ok_to_run),this)); |
| 2344 | | m_dsk.ok_to_run_timer->set_param(1); |
| 2345 | 2342 | m_dsk.ok_to_run_timer->adjust(attotime::from_nsec(15 * ALTO2_UCYCLE), 1); |
| 2346 | 2343 | |
| 2344 | m_dsk.ready_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(alto2_cpu_device::disk_ready_mf31a),this)); |
| 2345 | m_dsk.ready_timer->adjust(attotime::never, 0); |
| 2346 | |
| 2347 | 2347 | diablo_hd_device* dhd; |
| 2348 | 2348 | for (int unit = 0; unit < diablo_hd_device::DIABLO_UNIT_MAX; unit++) { |
| 2349 | 2349 | dhd = m_drive[unit]; |