src/emu/machine/6522via.c
| r8898 | r8899 | |
| 374 | 374 | |
| 375 | 375 | void via6522_device::shift() |
| 376 | 376 | { |
| 377 | | if (SO_O2_CONTROL(m_acr)) |
| 377 | if (SO_O2_CONTROL(m_acr) || SO_T2_CONTROL(m_acr)) |
| 378 | 378 | { |
| 379 | 379 | m_out_cb2 = (m_sr >> 7) & 1; |
| 380 | 380 | m_sr = (m_sr << 1) | m_out_cb2; |
| r8898 | r8899 | |
| 391 | 391 | |
| 392 | 392 | if (m_shift_counter) |
| 393 | 393 | { |
| 394 | | timer_adjust_oneshot(m_shift_timer, cycles_to_time(2), 0); |
| 394 | if (SO_O2_CONTROL(m_acr)) { |
| 395 | timer_adjust_oneshot(m_shift_timer, cycles_to_time(2), 0); |
| 396 | } else { |
| 397 | timer_adjust_oneshot(m_shift_timer, cycles_to_time((m_t2ll + 2)*2), 0); |
| 398 | } |
| 395 | 399 | } |
| 396 | 400 | else |
| 397 | 401 | { |
| r8898 | r8899 | |
| 683 | 687 | m_shift_counter=0; |
| 684 | 688 | timer_adjust_oneshot(m_shift_timer, cycles_to_time(2), 0); |
| 685 | 689 | } |
| 690 | if (SO_T2_CONTROL(m_acr)) |
| 691 | { |
| 692 | m_shift_counter=0; |
| 693 | timer_adjust_oneshot(m_shift_timer, cycles_to_time((m_t2ll + 2)*2), 0); |
| 694 | } |
| 686 | 695 | break; |
| 687 | 696 | |
| 688 | 697 | case VIA_PCR: |
| r8898 | r8899 | |
| 880 | 889 | { |
| 881 | 890 | timer_set(&m_machine, cycles_to_time(2), (void *)this, 0, shift_callback); |
| 882 | 891 | } |
| 892 | if (SO_T2_CONTROL(m_acr)) |
| 893 | { |
| 894 | timer_set(&m_machine, cycles_to_time((m_t2ll + 2)*2), (void *)this, 0, shift_callback); |
| 895 | } |
| 883 | 896 | break; |
| 884 | 897 | |
| 885 | 898 | case VIA_PCR: |
src/mess/drivers/jr100.c
| r8898 | r8899 | |
| 179 | 179 | jr100_speaker = data>>7; |
| 180 | 180 | } |
| 181 | 181 | |
| 182 | static WRITE_LINE_DEVICE_HANDLER(jr100_via_write_cb2) |
| 183 | { |
| 184 | cassette_output(device->machine->device("cassette"), state ? -1.0 : +1.0); |
| 185 | } |
| 182 | 186 | static const via6522_interface jr100_via_intf = |
| 183 | 187 | { |
| 184 | 188 | DEVCB_NULL, /* in_a_func */ |
| r8898 | r8899 | |
| 190 | 194 | DEVCB_HANDLER(jr100_via_write_a), /* out_a_func */ |
| 191 | 195 | DEVCB_HANDLER(jr100_via_write_b), /* out_b_func */ |
| 192 | 196 | DEVCB_NULL, /* out_ca1_func */ |
| 193 | | DEVCB_NULL, /* out_cb1_func */ |
| 197 | DEVCB_NULL, /* out_cb1_func */ |
| 194 | 198 | DEVCB_NULL, /* out_ca2_func */ |
| 195 | | DEVCB_NULL, /* out_cb2_func */ |
| 196 | | DEVCB_CPU_INPUT_LINE("maincpu", INPUT_LINE_IRQ0) /* irq_func */ |
| 199 | DEVCB_LINE(jr100_via_write_cb2), /* out_cb2_func */ |
| 200 | DEVCB_NULL /* irq_func */ |
| 197 | 201 | }; |
| 198 | 202 | static const cassette_config jr100_cassette_config = |
| 199 | 203 | { |