trunk/src/emu/cpu/nec/v53.c
| r244855 | r244856 | |
| 2 | 2 | |
| 3 | 3 | // V33 / V33A cores with onboard peripherals |
| 4 | 4 | |
| 5 | | // Interrupt Controller is uPD71059 equivalent |
| 6 | | // DMA Controller can operate in modes providing a subset of the uPD71071 or uPD71037 functionality (some modes unavailable / settings ignored) |
| 7 | | // Serial Controller is based on the uPD71051 but with some changes |
| 5 | // Interrupt Controller is uPD71059 equivalent (a PIC8259 clone?) |
| 6 | // DMA Controller can operate in modes providing a subset of the uPD71071 or uPD71037 functionality (some modes unavailable / settings ignored) (uPD71071 mode is an extended am9517a, uPD71037 mode is ??) |
| 7 | // Serial Controller is based on the uPD71051 but with some changes (i8251 clone?) |
| 8 | 8 | // Timer Unit is functionally identical to uPD71054 (which in turn is said to be the same as a pit8253) |
| 9 | 9 | |
| 10 | 10 | #include "emu.h" |
| r244855 | r244856 | |
| 474 | 474 | return ret; |
| 475 | 475 | } |
| 476 | 476 | |
| 477 | READ8_MEMBER(v53_base_device::get_pic_ack) |
| 478 | { |
| 479 | return 0; |
| 480 | } |
| 477 | 481 | |
| 482 | WRITE_LINE_MEMBER( v53_base_device::upd71059_irq_w) |
| 483 | { |
| 484 | printf("upd71059_irq_w %d", state); |
| 485 | } |
| 486 | |
| 478 | 487 | static MACHINE_CONFIG_FRAGMENT( v53 ) |
| 479 | 488 | MCFG_DEVICE_ADD("pit", PIT8254, 0) // functionality identical to uPD71054 |
| 480 | 489 | MCFG_PIT8253_CLK0(16000000/2/8) |
| r244855 | r244856 | |
| 486 | 495 | MCFG_I8237_IN_MEMR_CB(READ8(v53_base_device, dma_memin_r)) |
| 487 | 496 | |
| 488 | 497 | |
| 498 | MCFG_PIC8259_ADD( "upd71059pic", WRITELINE(v53_base_device, upd71059_irq_w), VCC, READ8(v53_base_device,get_pic_ack)) |
| 489 | 499 | |
| 500 | MCFG_DEVICE_ADD("upd71051", I8251, 0) |
| 501 | |
| 490 | 502 | MACHINE_CONFIG_END |
| 491 | 503 | |
| 492 | 504 | machine_config_constructor v53_base_device::device_mconfig_additions() const |
| r244855 | r244856 | |
| 499 | 511 | : nec_common_device(mconfig, type, name, tag, owner, clock, shortname, true, fetch_xor, prefetch_size, prefetch_cycles, chip_type), |
| 500 | 512 | m_io_space_config( "io", ENDIANNESS_LITTLE, 16, 16, 0, ADDRESS_MAP_NAME( v53_internal_port_map ) ), |
| 501 | 513 | m_pit(*this, "pit"), |
| 502 | | m_dma_71071mode(*this, "upd71071dma") |
| 514 | m_dma_71071mode(*this, "upd71071dma"), |
| 515 | m_upd71059(*this, "upd71059pic"), |
| 516 | m_upd71051(*this, "upd71051") |
| 503 | 517 | { |
| 504 | 518 | } |
| 505 | 519 | |
trunk/src/emu/cpu/nec/v53.h
| r244855 | r244856 | |
| 5 | 5 | |
| 6 | 6 | #include "machine/pit8253.h" |
| 7 | 7 | #include "machine/am9517a.h" |
| 8 | #include "machine/pic8259.h" |
| 9 | #include "machine/i8251.h" |
| 8 | 10 | |
| 9 | 11 | class v53_base_device : public nec_common_device |
| 10 | 12 | { |
| r244855 | r244856 | |
| 81 | 83 | |
| 82 | 84 | required_device<pit8253_device> m_pit; |
| 83 | 85 | required_device<upd71071_v53_device> m_dma_71071mode; |
| 84 | | |
| 86 | required_device<pic8259_device> m_upd71059; |
| 87 | required_device<i8251_device> m_upd71051; |
| 88 | |
| 85 | 89 | DECLARE_WRITE_LINE_MEMBER(dreq0_trampoline_w); |
| 86 | 90 | DECLARE_WRITE_LINE_MEMBER(dreq1_trampoline_w); |
| 87 | 91 | DECLARE_WRITE_LINE_MEMBER(dreq2_trampoline_w); |
| r244855 | r244856 | |
| 92 | 96 | DECLARE_WRITE8_MEMBER(dma_io_3_w); |
| 93 | 97 | DECLARE_READ8_MEMBER(dma_memin_r); |
| 94 | 98 | |
| 99 | DECLARE_READ8_MEMBER(get_pic_ack); |
| 100 | DECLARE_WRITE_LINE_MEMBER(upd71059_irq_w); |
| 101 | |
| 95 | 102 | protected: |
| 96 | 103 | // device-level overrides |
| 97 | 104 | virtual machine_config_constructor device_mconfig_additions() const; |