src/emu/machine/pic8259.c
| r14730 | r14731 | |
| 277 | 277 | pic8259->icw4_needed = (data & 0x01) ? 1 : 0; |
| 278 | 278 | pic8259->vector_addr_low = (data & 0xe0); |
| 279 | 279 | pic8259->state = STATE_ICW2; |
| 280 | pic8259->out_int_func(0); |
| 280 | 281 | } |
| 281 | 282 | else if (pic8259->state == STATE_READY) |
| 282 | 283 | { |
| r14730 | r14731 | |
| 308 | 309 | if (pic8259->isr & mask) |
| 309 | 310 | { |
| 310 | 311 | pic8259->isr &= ~mask; |
| 311 | | if (pic8259->level_trig_mode) |
| 312 | | pic8259->irr = pic8259->irq_lines; |
| 313 | | pic8259->irr &= ~mask; |
| 314 | 312 | break; |
| 315 | 313 | } |
| 316 | 314 | } |
| r14730 | r14731 | |
| 344 | 342 | if( pic8259->isr & mask ) |
| 345 | 343 | { |
| 346 | 344 | pic8259->isr &= ~mask; |
| 347 | | if (pic8259->level_trig_mode) |
| 348 | | pic8259->irr = pic8259->irq_lines; |
| 349 | | pic8259->irr &= ~mask; |
| 350 | 345 | pic8259->prio = (pic8259->prio + 1) & 7; |
| 351 | 346 | } |
| 352 | 347 | break; |
src/mess/drivers/fmtowns.c
| r14730 | r14731 | |
| 732 | 732 | |
| 733 | 733 | if(data & 0x80) |
| 734 | 734 | { |
| 735 | | towns_pic_irq(dev,0); |
| 735 | //towns_pic_irq(dev,0); |
| 736 | m_timer0 = 0; |
| 737 | pic8259_ir0_w(dev, m_timer0 || m_timer1); |
| 736 | 738 | } |
| 737 | 739 | m_towns_timer_mask = data & 0x07; |
| 738 | 740 | |
| r14730 | r14731 | |
| 2022 | 2024 | |
| 2023 | 2025 | if(tstate->m_towns_timer_mask & 0x01) |
| 2024 | 2026 | { |
| 2025 | | pic8259_ir0_w(dev, state); |
| 2027 | tstate->m_timer0 = state; |
| 2026 | 2028 | if(IRQ_LOG) logerror("PIC: IRQ0 (PIT Timer ch0) set to %i\n",state); |
| 2027 | 2029 | } |
| 2030 | else |
| 2031 | tstate->m_timer0 = 0; |
| 2032 | |
| 2033 | pic8259_ir0_w(dev, tstate->m_timer0 || tstate->m_timer1); |
| 2028 | 2034 | } |
| 2029 | 2035 | |
| 2030 | 2036 | static WRITE_LINE_DEVICE_HANDLER( towns_pit_out1_changed ) |
| r14730 | r14731 | |
| 2034 | 2040 | |
| 2035 | 2041 | if(tstate->m_towns_timer_mask & 0x02) |
| 2036 | 2042 | { |
| 2037 | | pic8259_ir0_w(dev, state); |
| 2043 | tstate->m_timer1 = state; |
| 2038 | 2044 | if(IRQ_LOG) logerror("PIC: IRQ0 (PIT Timer ch1) set to %i\n",state); |
| 2039 | 2045 | } |
| 2046 | else |
| 2047 | tstate->m_timer1 = 0; |
| 2048 | |
| 2049 | pic8259_ir0_w(dev, tstate->m_timer0 || tstate->m_timer1); |
| 2040 | 2050 | } |
| 2041 | 2051 | |
| 2042 | 2052 | WRITE_LINE_MEMBER( towns_state::pit_out2_changed ) |