src/mess/drivers/abc1600.c
| r15793 | r15794 | |
| 55 | 55 | */ |
| 56 | 56 | |
| 57 | 57 | #include "includes/abc1600.h" |
| 58 | | #include "machine/scsihd.h" |
| 59 | 58 | |
| 60 | 59 | |
| 61 | 60 | |
| r15793 | r15794 | |
| 657 | 656 | |
| 658 | 657 | int abc1600_state::get_current_task(offs_t offset) |
| 659 | 658 | { |
| 660 | | int force_task0 = !(m_ifc2 | A19); |
| 661 | | int t0 = !(BIT(m_task, 0) | force_task0); |
| 662 | | int t1 = !(BIT(m_task, 1) | force_task0); |
| 663 | | int t2 = !(BIT(m_task, 2) | force_task0); |
| 664 | | int t3 = !(BIT(m_task, 3) | force_task0); |
| 659 | int force_task0 = !(m_ifc2 || A19); |
| 660 | int t0 = !(BIT(m_task, 0) || force_task0); |
| 661 | int t1 = !(BIT(m_task, 1) || force_task0); |
| 662 | int t2 = !(BIT(m_task, 2) || force_task0); |
| 663 | int t3 = !(BIT(m_task, 3) || force_task0); |
| 665 | 664 | |
| 666 | 665 | return (t3 << 3) | (t2 << 2) | (t1 << 1) | t0; |
| 667 | 666 | } |
| r15793 | r15794 | |
| 673 | 672 | |
| 674 | 673 | offs_t abc1600_state::get_segment_address(offs_t offset) |
| 675 | 674 | { |
| 676 | | int sega19 = !(!(A8 | m_ifc2) | !A19); |
| 675 | int sega19 = !(!(A8 || m_ifc2) || !A19); |
| 677 | 676 | int task = get_current_task(offset); |
| 678 | 677 | |
| 679 | 678 | return (task << 5) | (sega19 << 4) | ((offset >> 15) & 0x0f); |
| r15793 | r15794 | |
| 1046 | 1045 | { |
| 1047 | 1046 | int x20 = BIT(pgd, 9); |
| 1048 | 1047 | |
| 1049 | | data = (pgd >> 8) | x20 << 2 | x20 << 3 | x20 << 4 | x20 << 5; |
| 1048 | data = (pgd >> 8) | (x20 << 2) | (x20 << 3) | (x20 << 4) | (x20 << 5); |
| 1050 | 1049 | } |
| 1051 | 1050 | |
| 1052 | 1051 | return data; |
| r15793 | r15794 | |
| 1122 | 1121 | else |
| 1123 | 1122 | { |
| 1124 | 1123 | // BUS0I/BUS0X |
| 1125 | | int trrq0 = m_bus0i->trrq_r() & m_bus0x->trrq_r(); |
| 1124 | int trrq0 = m_bus0i->trrq_r() && m_bus0x->trrq_r(); |
| 1126 | 1125 | |
| 1127 | 1126 | m_dma0->rdy_w(trrq0); |
| 1128 | 1127 | } |
| r15793 | r15794 | |
| 1413 | 1412 | |
| 1414 | 1413 | WRITE_LINE_MEMBER( abc1600_state::dbrq_w ) |
| 1415 | 1414 | { |
| 1416 | | m_maincpu->set_input_line(INPUT_LINE_HALT, state & m_dmadis); |
| 1415 | m_maincpu->set_input_line(INPUT_LINE_HALT, state && m_dmadis); |
| 1417 | 1416 | } |
| 1418 | 1417 | |
| 1419 | 1418 | READ8_MEMBER( abc1600_state::dma0_mreq_r ) |
| r15793 | r15794 | |
| 1659 | 1658 | UINT8 data = 0x0d; |
| 1660 | 1659 | |
| 1661 | 1660 | // data in |
| 1662 | | data |= (m_rtc->dio_r() | m_nvram->do_r()) << 1; |
| 1661 | data |= (m_rtc->dio_r() || m_nvram->do_r()) << 1; |
| 1663 | 1662 | |
| 1664 | 1663 | return data; |
| 1665 | 1664 | } |