trunk/src/emu/cpu/m6809/m6809inl.h
| r31618 | r31619 | |
| 302 | 302 | |
| 303 | 303 | inline UINT16 m6809_base_device::get_pending_interrupt() |
| 304 | 304 | { |
| 305 | | UINT16 result; |
| 306 | 305 | if (m_nmi_asserted) |
| 307 | | result = VECTOR_NMI; |
| 306 | return VECTOR_NMI; |
| 308 | 307 | else if (!(m_cc & CC_F) && m_firq_line) |
| 309 | | result = VECTOR_FIRQ; |
| 308 | return VECTOR_FIRQ; |
| 310 | 309 | else if (!(m_cc & CC_I) && m_irq_line) |
| 311 | | result = VECTOR_IRQ; |
| 310 | return VECTOR_IRQ; |
| 312 | 311 | else |
| 313 | | result = 0; |
| 314 | | return result; |
| 312 | return 0; |
| 315 | 313 | } |
| 316 | | |
| 317 | | |
| 318 | | |
| 319 | | //------------------------------------------------- |
| 320 | | // check_pending_interrupt |
| 321 | | //------------------------------------------------- |
| 322 | | |
| 323 | | inline UINT16 m6809_base_device::check_pending_interrupt() |
| 324 | | { |
| 325 | | UINT16 result = get_pending_interrupt(); |
| 326 | | |
| 327 | | // check_pending_interrupt() will also invoke the IRQ |
| 328 | | // callback for FIRQ and IRQ interrupts |
| 329 | | // |
| 330 | | // I'm not sure why this is necessary; neither the 6809, 6309 |
| 331 | | // nor (presumably) Konami had any interrupt acknowledge lines so |
| 332 | | // it isn't clear what this is reflecting |
| 333 | | switch(result) |
| 334 | | { |
| 335 | | case VECTOR_FIRQ: |
| 336 | | standard_irq_callback(M6809_FIRQ_LINE); |
| 337 | | break; |
| 338 | | case VECTOR_IRQ: |
| 339 | | standard_irq_callback(M6809_IRQ_LINE); |
| 340 | | break; |
| 341 | | } |
| 342 | | |
| 343 | | return result; |
| 344 | | } |
trunk/src/emu/cpu/m6809/base6x09.ops
| r31618 | r31619 | |
| 7 | 7 | m_cc |= CC_I | CC_F; |
| 8 | 8 | set_ea(VECTOR_NMI); |
| 9 | 9 | eat(1); |
| 10 | standard_irq_callback(INPUT_LINE_NMI); |
| 10 | 11 | goto INTERRUPT_VECTOR; |
| 11 | 12 | |
| 12 | 13 | FIRQ: |
| r31618 | r31619 | |
| 25 | 26 | m_cc |= CC_I | CC_F; |
| 26 | 27 | set_ea(VECTOR_FIRQ); |
| 27 | 28 | eat(1); |
| 29 | standard_irq_callback(M6809_FIRQ_LINE); |
| 28 | 30 | goto INTERRUPT_VECTOR; |
| 29 | 31 | |
| 30 | 32 | IRQ: |
| r31618 | r31619 | |
| 35 | 37 | m_cc |= CC_I; |
| 36 | 38 | set_ea(VECTOR_IRQ); |
| 37 | 39 | eat(1); |
| 40 | standard_irq_callback(M6809_IRQ_LINE); |
| 38 | 41 | goto INTERRUPT_VECTOR; |
| 39 | 42 | |
| 40 | 43 | INTERRUPT_VECTOR: |
| r31618 | r31619 | |
| 447 | 450 | |
| 448 | 451 | set_ea(m_ea.w); // need to do this to set the addressing mode |
| 449 | 452 | m_cc |= CC_I | (m_ea.w != VECTOR_IRQ ? CC_F : 0); |
| 453 | |
| 454 | // invoke standard interrupt callback for MAME core |
| 455 | switch (m_ea.w) |
| 456 | { |
| 457 | case VECTOR_NMI: standard_irq_callback(INPUT_LINE_NMI); break; |
| 458 | case VECTOR_FIRQ: standard_irq_callback(M6809_FIRQ_LINE); break; |
| 459 | case VECTOR_IRQ: standard_irq_callback(M6809_IRQ_LINE); break; |
| 460 | default: break; |
| 461 | } |
| 462 | |
| 450 | 463 | goto INTERRUPT_VECTOR; |
| 451 | 464 | |
| 452 | 465 | LEA_xy: |