trunk/src/emu/bus/dmv/dmvbus.c
| r242046 | r242047 | |
| 320 | 320 | m_cart->switch16_w(state); |
| 321 | 321 | } |
| 322 | 322 | |
| 323 | | void dmvcart_slot_device::irq0_w(int state) |
| 323 | void dmvcart_slot_device::timint_w(int state) |
| 324 | 324 | { |
| 325 | 325 | if (m_cart) |
| 326 | | m_cart->irq0_w(state); |
| 326 | m_cart->timint_w(state); |
| 327 | 327 | } |
| 328 | 328 | |
| 329 | | void dmvcart_slot_device::irq1_w(int state) |
| 329 | void dmvcart_slot_device::keyint_w(int state) |
| 330 | 330 | { |
| 331 | 331 | if (m_cart) |
| 332 | | m_cart->irq1_w(state); |
| 332 | m_cart->keyint_w(state); |
| 333 | 333 | } |
| 334 | 334 | |
| 335 | void dmvcart_slot_device::busint_w(int state) |
| 336 | { |
| 337 | if (m_cart) |
| 338 | m_cart->busint_w(state); |
| 339 | } |
| 340 | |
| 341 | void dmvcart_slot_device::flexint_w(int state) |
| 342 | { |
| 343 | if (m_cart) |
| 344 | m_cart->flexint_w(state); |
| 345 | } |
| 346 | |
| 335 | 347 | void dmvcart_slot_device::irq2_w(int state) |
| 336 | 348 | { |
| 337 | 349 | if (m_cart) |
| 338 | 350 | m_cart->irq2_w(state); |
| 339 | 351 | } |
| 340 | 352 | |
| 353 | void dmvcart_slot_device::irq2a_w(int state) |
| 354 | { |
| 355 | if (m_cart) |
| 356 | m_cart->irq2a_w(state); |
| 357 | } |
| 358 | |
| 341 | 359 | void dmvcart_slot_device::irq3_w(int state) |
| 342 | 360 | { |
| 343 | 361 | if (m_cart) |
| r242046 | r242047 | |
| 361 | 379 | if (m_cart) |
| 362 | 380 | m_cart->irq6_w(state); |
| 363 | 381 | } |
| 364 | | |
| 365 | | void dmvcart_slot_device::irq7_w(int state) |
| 366 | | { |
| 367 | | if (m_cart) |
| 368 | | m_cart->irq7_w(state); |
| 369 | | } |
trunk/src/emu/bus/dmv/dmvbus.h
| r242046 | r242047 | |
| 35 | 35 | virtual bool av16bit() { return false; } |
| 36 | 36 | virtual void hold_w(int state) { } |
| 37 | 37 | virtual void switch16_w(int state) { } |
| 38 | | virtual void irq0_w(int state) { } |
| 39 | | virtual void irq1_w(int state) { } |
| 38 | virtual void timint_w(int state) { } |
| 39 | virtual void keyint_w(int state) { } |
| 40 | virtual void busint_w(int state) { } |
| 41 | virtual void flexint_w(int state) { } |
| 40 | 42 | virtual void irq2_w(int state) { } |
| 43 | virtual void irq2a_w(int state) { } |
| 41 | 44 | virtual void irq3_w(int state) { } |
| 42 | 45 | virtual void irq4_w(int state) { } |
| 43 | 46 | virtual void irq5_w(int state) { } |
| 44 | 47 | virtual void irq6_w(int state) { } |
| 45 | | virtual void irq7_w(int state) { } |
| 46 | 48 | }; |
| 47 | 49 | |
| 48 | 50 | |
| r242046 | r242047 | |
| 74 | 76 | virtual void io_write(address_space &space, int ifsel, offs_t offset, UINT8 data); |
| 75 | 77 | virtual void hold_w(int state); |
| 76 | 78 | virtual void switch16_w(int state); |
| 77 | | virtual void irq0_w(int state); |
| 78 | | virtual void irq1_w(int state); |
| 79 | virtual void timint_w(int state); |
| 80 | virtual void keyint_w(int state); |
| 81 | virtual void busint_w(int state); |
| 82 | virtual void flexint_w(int state); |
| 79 | 83 | virtual void irq2_w(int state); |
| 84 | virtual void irq2a_w(int state); |
| 80 | 85 | virtual void irq3_w(int state); |
| 81 | 86 | virtual void irq4_w(int state); |
| 82 | 87 | virtual void irq5_w(int state); |
| 83 | 88 | virtual void irq6_w(int state); |
| 84 | | virtual void irq7_w(int state); |
| 85 | 89 | virtual bool av16bit(); |
| 86 | 90 | |
| 87 | 91 | // internal state |
trunk/src/emu/bus/dmv/k230.c
| r242046 | r242047 | |
| 78 | 78 | MACHINE_CONFIG_END |
| 79 | 79 | |
| 80 | 80 | |
| 81 | static INPUT_PORTS_START( dmv_k235 ) |
| 82 | PORT_START("DSW") |
| 83 | PORT_DIPNAME( 0x01, 0x00, "K235 INT7" ) PORT_DIPLOCATION("S:1") |
| 84 | PORT_DIPSETTING( 0x00, "Slot 5" ) |
| 85 | PORT_DIPSETTING( 0x01, "Slot 6" ) |
| 86 | PORT_DIPNAME( 0x02, 0x00, "K235 INT5" ) PORT_DIPLOCATION("S:2") |
| 87 | PORT_DIPSETTING( 0x00, "Slot 2a" ) |
| 88 | PORT_DIPSETTING( 0x02, "Slot 2" ) |
| 89 | INPUT_PORTS_END |
| 90 | |
| 91 | |
| 81 | 92 | //************************************************************************** |
| 82 | 93 | // GLOBAL VARIABLES |
| 83 | 94 | //************************************************************************** |
| r242046 | r242047 | |
| 135 | 146 | |
| 136 | 147 | dmv_k235_device::dmv_k235_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 137 | 148 | : dmv_k230_device(mconfig, DMV_K235, "K235 8088 with interrupt controller", tag, owner, clock, "dmv_k235", __FILE__), |
| 138 | | m_pic(*this, "pic8259") |
| 149 | m_pic(*this, "pic8259"), |
| 150 | m_dsw(*this, "DSW") |
| 139 | 151 | { |
| 140 | 152 | } |
| 141 | 153 | |
| r242046 | r242047 | |
| 216 | 228 | return ROM_NAME( dmv_k235 ); |
| 217 | 229 | } |
| 218 | 230 | |
| 231 | //------------------------------------------------- |
| 232 | // input_ports - device-specific input ports |
| 233 | //------------------------------------------------- |
| 234 | |
| 235 | ioport_constructor dmv_k235_device::device_input_ports() const |
| 236 | { |
| 237 | return INPUT_PORTS_NAME( dmv_k235 ); |
| 238 | } |
| 239 | |
| 219 | 240 | bool dmv_k230_device::av16bit() |
| 220 | 241 | { |
| 221 | 242 | return true; |
trunk/src/emu/bus/dmv/k230.h
| r242046 | r242047 | |
| 115 | 115 | // construction/destruction |
| 116 | 116 | dmv_k235_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 117 | 117 | |
| 118 | protected: |
| 118 | 119 | // optional information overrides |
| 119 | 120 | virtual const rom_entry *device_rom_region() const; |
| 120 | 121 | virtual machine_config_constructor device_mconfig_additions() const; |
| 122 | virtual ioport_constructor device_input_ports() const; |
| 121 | 123 | |
| 122 | | void irq0_w(int state) { m_pic->ir0_w(state); } |
| 123 | | void irq1_w(int state) { m_pic->ir1_w(state); } |
| 124 | | void irq2_w(int state) { m_pic->ir2_w(state); } |
| 125 | | void irq3_w(int state) { m_pic->ir3_w(state); } |
| 126 | | void irq4_w(int state) { m_pic->ir4_w(state); } |
| 127 | | void irq5_w(int state) { m_pic->ir5_w(state); } |
| 128 | | void irq6_w(int state) { m_pic->ir6_w(state); } |
| 129 | | void irq7_w(int state) { m_pic->ir7_w(state); } |
| 124 | void timint_w(int state) { m_pic->ir0_w(state); } |
| 125 | void keyint_w(int state) { m_pic->ir1_w(state); } |
| 126 | void busint_w(int state) { m_pic->ir2_w(state); } |
| 127 | void flexint_w(int state) { m_pic->ir6_w(state); } |
| 128 | void irq2a_w(int state) { if (!(m_dsw->read() & 0x02)) m_pic->ir5_w(state); } |
| 129 | void irq2_w(int state) { if ( (m_dsw->read() & 0x02)) m_pic->ir5_w(state); } |
| 130 | void irq3_w(int state) { m_pic->ir3_w(state); } |
| 131 | void irq4_w(int state) { m_pic->ir4_w(state); } |
| 132 | void irq5_w(int state) { if (!(m_dsw->read() & 0x01)) m_pic->ir7_w(state); } |
| 133 | void irq6_w(int state) { if ( (m_dsw->read() & 0x01)) m_pic->ir7_w(state); } |
| 130 | 134 | |
| 131 | 135 | private: |
| 132 | 136 | required_device<pic8259_device> m_pic; |
| 133 | | |
| 137 | required_ioport m_dsw; |
| 134 | 138 | }; |
| 135 | 139 | |
| 136 | 140 | // device type definition |
trunk/src/mess/drivers/dmv.c
| r242046 | r242047 | |
| 422 | 422 | break; |
| 423 | 423 | } |
| 424 | 424 | |
| 425 | | m_slot7a->irq2_w(new_state); |
| 426 | | m_slot7->irq2_w(new_state); |
| 425 | m_slot7a->busint_w(new_state); |
| 426 | m_slot7->busint_w(new_state); |
| 427 | 427 | m_maincpu->set_input_line(0, new_state); |
| 428 | 428 | } |
| 429 | 429 | |
| r242046 | r242047 | |
| 433 | 433 | |
| 434 | 434 | switch(slot) |
| 435 | 435 | { |
| 436 | case 0: // slot 2 |
| 437 | m_slot7->irq2_w(state); |
| 438 | m_slot7a->irq2_w(state); |
| 439 | break; |
| 436 | 440 | case 1: // slot 2a |
| 437 | | m_slot7->irq5_w(state); |
| 438 | | m_slot7a->irq5_w(state); |
| 441 | m_slot7->irq2a_w(state); |
| 442 | m_slot7a->irq2a_w(state); |
| 439 | 443 | break; |
| 440 | 444 | case 2: // slot 3 |
| 441 | 445 | m_slot7->irq3_w(state); |
| r242046 | r242047 | |
| 446 | 450 | m_slot7a->irq4_w(state); |
| 447 | 451 | break; |
| 448 | 452 | case 4: // slot 5 |
| 449 | | m_slot7->irq7_w(state); |
| 450 | | m_slot7a->irq7_w(state); |
| 453 | m_slot7->irq5_w(state); |
| 454 | m_slot7a->irq5_w(state); |
| 451 | 455 | break; |
| 456 | case 5: // slot 6 |
| 457 | m_slot7->irq6_w(state); |
| 458 | m_slot7a->irq6_w(state); |
| 459 | break; |
| 452 | 460 | } |
| 453 | 461 | } |
| 454 | 462 | |
| r242046 | r242047 | |
| 537 | 545 | WRITE8_MEMBER(dmv_state::kb_mcu_port2_w) |
| 538 | 546 | { |
| 539 | 547 | m_speaker->level_w(BIT(data, 0)); |
| 540 | | m_slot7a->irq1_w(BIT(data, 4)); |
| 541 | | m_slot7->irq1_w(BIT(data, 4)); |
| 548 | m_slot7a->keyint_w(BIT(data, 4)); |
| 549 | m_slot7->keyint_w(BIT(data, 4)); |
| 542 | 550 | } |
| 543 | 551 | |
| 544 | 552 | static ADDRESS_MAP_START( dmv_kb_ctrl_io, AS_IO, 8, dmv_state ) |
| r242046 | r242047 | |
| 652 | 660 | |
| 653 | 661 | WRITE_LINE_MEMBER( dmv_state::timint_w ) |
| 654 | 662 | { |
| 655 | | m_slot7a->irq0_w(state); |
| 656 | | m_slot7->irq0_w(state); |
| 663 | m_slot7a->timint_w(state); |
| 664 | m_slot7->timint_w(state); |
| 657 | 665 | } |
| 658 | 666 | |
| 659 | 667 | WRITE_LINE_MEMBER( dmv_state::fdc_irq ) |
| 660 | 668 | { |
| 661 | | m_slot7a->irq6_w(state); |
| 662 | | m_slot7->irq6_w(state); |
| 669 | m_slot7a->flexint_w(state); |
| 670 | m_slot7->flexint_w(state); |
| 663 | 671 | |
| 664 | 672 | if (state) |
| 665 | 673 | m_fdc->tc_w(false); |