trunk/src/emu/cpu/nec/v53.c
| r244919 | r244920 | |
| 447 | 447 | return 0; |
| 448 | 448 | } |
| 449 | 449 | |
| 450 | | WRITE_LINE_MEMBER( v53_base_device::upd71059_irq_w) |
| 450 | |
| 451 | |
| 452 | // the external interface provides no external access to the usual IRQ line of the V33, everything goes through the interrupt controller |
| 453 | void v53_base_device::execute_set_input(int irqline, int state) |
| 451 | 454 | { |
| 452 | | printf("upd71059_irq_w %d\n", state); |
| 455 | switch (irqline) |
| 456 | { |
| 457 | case INPUT_LINE_IRQ0: m_v53icu->ir0_w(state); break; |
| 458 | case INPUT_LINE_IRQ1: m_v53icu->ir1_w(state); break; |
| 459 | case INPUT_LINE_IRQ2: m_v53icu->ir2_w(state); break; |
| 460 | case INPUT_LINE_IRQ3: m_v53icu->ir3_w(state); break; |
| 461 | case INPUT_LINE_IRQ4: m_v53icu->ir4_w(state); break; |
| 462 | case INPUT_LINE_IRQ5: m_v53icu->ir5_w(state); break; |
| 463 | case INPUT_LINE_IRQ6: m_v53icu->ir6_w(state); break; |
| 464 | case INPUT_LINE_IRQ7: m_v53icu->ir7_w(state); break; |
| 465 | |
| 466 | case INPUT_LINE_NMI: nec_common_device::execute_set_input(irqline, state); break; |
| 467 | case NEC_INPUT_LINE_POLL: nec_common_device::execute_set_input(irqline, state); break; |
| 468 | } |
| 453 | 469 | } |
| 454 | 470 | |
| 471 | // for hooking the interrupt controller output up to the core |
| 472 | WRITE_LINE_MEMBER(v53_base_device::internal_irq_w) |
| 473 | { |
| 474 | nec_common_device::execute_set_input(0, state); |
| 475 | } |
| 476 | |
| 477 | |
| 455 | 478 | static MACHINE_CONFIG_FRAGMENT( v53 ) |
| 456 | 479 | |
| 457 | 480 | MCFG_DEVICE_ADD("pit", PIT8254, 0) // functionality identical to uPD71054 |
| r244919 | r244920 | |
| 481 | 504 | MCFG_AM9517A_OUT_DACK_3_CB(WRITELINE(v53_base_device, dma_dack3_trampoline_w)) |
| 482 | 505 | |
| 483 | 506 | |
| 484 | | MCFG_PIC8259_ADD( "upd71059pic", WRITELINE(v53_base_device, upd71059_irq_w), VCC, READ8(v53_base_device,get_pic_ack)) |
| 507 | MCFG_PIC8259_ADD( "upd71059pic", WRITELINE(v53_base_device, internal_irq_w), VCC, READ8(v53_base_device,get_pic_ack)) |
| 485 | 508 | |
| 486 | 509 | MCFG_DEVICE_ADD("v53scu", V53_SCU, 0) |
| 487 | 510 | MCFG_I8251_TXD_HANDLER(WRITELINE(v53_base_device, scu_txd_trampoline_cb)) |
trunk/src/emu/cpu/nec/v53.h
| r244919 | r244920 | |
| 235 | 235 | |
| 236 | 236 | |
| 237 | 237 | DECLARE_READ8_MEMBER(get_pic_ack); |
| 238 | | DECLARE_WRITE_LINE_MEMBER(upd71059_irq_w); |
| 238 | DECLARE_WRITE_LINE_MEMBER(internal_irq_w); |
| 239 | 239 | |
| 240 | |
| 240 | 241 | protected: |
| 241 | 242 | // device-level overrides |
| 242 | 243 | virtual machine_config_constructor device_mconfig_additions() const; |
| 243 | 244 | virtual void device_start(); |
| 244 | 245 | virtual void device_reset(); |
| 245 | | |
| 246 | virtual void execute_set_input(int inputnum, int state); |
| 247 | |
| 246 | 248 | required_device<pit8253_device> m_v53tcu; |
| 247 | 249 | required_device<upd71071_v53_device> m_v53dmau; |
| 248 | 250 | required_device<pic8259_device> m_v53icu; |
| r244919 | r244920 | |
| 286 | 288 | |
| 287 | 289 | |
| 288 | 290 | |
| 289 | | |
| 290 | 291 | }; |
| 291 | 292 | |
| 292 | 293 | |