src/mess/video/nubus_vikbw.c
| r12449 | r12450 | |
| 4 | 4 | |
| 5 | 5 | Apparently incompatible with System 7.0 and later(!) |
| 6 | 6 | |
| 7 | VRAM from Fs040000 to Fs0517FF |
| 8 | Read from Fs000000 enables VBL, write to Fs000000 disables VBL |
| 9 | Write to Fs080000 acks VBL |
| 10 | |
| 7 | 11 | ***************************************************************************/ |
| 8 | 12 | |
| 9 | 13 | #include "emu.h" |
| r12449 | r12450 | |
| 97 | 101 | // printf("[vikbw %p] slotspace = %x\n", this, slotspace); |
| 98 | 102 | |
| 99 | 103 | m_vram = auto_alloc_array(machine(), UINT8, VRAM_SIZE); |
| 100 | | install_bank(slotspace, slotspace+VRAM_SIZE-1, 0, 0, "bank_vikbw1", m_vram); |
| 101 | 104 | install_bank(slotspace+0x40000, slotspace+0x40000+VRAM_SIZE-1, 0, 0, "bank_vikbw", m_vram); |
| 102 | 105 | |
| 103 | | m_nubus->install_device(slotspace+0x40000+VRAM_SIZE, slotspace+0x40000+VRAM_SIZE+0x3ffff, read32_delegate(FUNC(nubus_vikbw_device::viking_r), this), write32_delegate(FUNC(nubus_vikbw_device::viking_w), this)); |
| 106 | m_nubus->install_device(slotspace, slotspace+3, read32_delegate(FUNC(nubus_vikbw_device::viking_enable_r), this), write32_delegate(FUNC(nubus_vikbw_device::viking_disable_w), this)); |
| 107 | m_nubus->install_device(slotspace+0x80000, slotspace+0x80000+3, read32_delegate(FUNC(nubus_vikbw_device::viking_ack_r), this), write32_delegate(FUNC(nubus_vikbw_device::viking_ack_w), this)); |
| 104 | 108 | } |
| 105 | 109 | |
| 106 | | //------------------------------------------------- |
| 110 | //------------------------------------------------- |
| 107 | 111 | // device_reset - device-specific reset |
| 108 | 112 | //------------------------------------------------- |
| 109 | 113 | |
| r12449 | r12450 | |
| 155 | 159 | return 0; |
| 156 | 160 | } |
| 157 | 161 | |
| 158 | | WRITE32_MEMBER( nubus_vikbw_device::viking_w ) |
| 162 | WRITE32_MEMBER( nubus_vikbw_device::viking_ack_w ) |
| 159 | 163 | { |
| 160 | | // printf("viking_w: %08x @ %x (mask %08x)\n", data, offset, mem_mask); |
| 164 | m_nubus->set_irq_line(m_slot, CLEAR_LINE); |
| 165 | } |
| 161 | 166 | |
| 162 | | if (offset == 0 && data == 0) |
| 163 | | { |
| 164 | | m_vbl_disable = 0; |
| 165 | | } |
| 166 | | else if (offset == 0xa000) |
| 167 | | { |
| 168 | | m_nubus->set_irq_line(m_slot, CLEAR_LINE); |
| 169 | | } |
| 167 | READ32_MEMBER( nubus_vikbw_device::viking_ack_r ) |
| 168 | { |
| 169 | return 0; |
| 170 | 170 | } |
| 171 | 171 | |
| 172 | | READ32_MEMBER( nubus_vikbw_device::viking_r ) |
| 172 | WRITE32_MEMBER( nubus_vikbw_device::viking_disable_w ) |
| 173 | 173 | { |
| 174 | | // printf("viking_r: @ %x (mask %08x)\n", offset, mem_mask); |
| 174 | m_vbl_disable = 1; |
| 175 | } |
| 176 | |
| 177 | READ32_MEMBER( nubus_vikbw_device::viking_enable_r ) |
| 178 | { |
| 179 | m_vbl_disable = 0; |
| 175 | 180 | return 0; |
| 176 | 181 | } |
| 177 | 182 | |