trunk/src/mess/machine/isa.c
| r21436 | r21437 | |
| 533 | 533 | m_out_drq7_func.resolve(m_out_drq7_cb, *this); |
| 534 | 534 | } |
| 535 | 535 | |
| 536 | | void isa16_device::install16_device(device_t *dev, offs_t start, offs_t end, offs_t mask, offs_t mirror, read16_device_func rhandler, const char* rhandler_name, write16_device_func whandler, const char *whandler_name) |
| 537 | | { |
| 538 | | int buswidth = m_maincpu->space_config(AS_PROGRAM)->m_databus_width; |
| 539 | | switch(buswidth) |
| 540 | | { |
| 541 | | case 16: |
| 542 | | m_maincpu->space(AS_IO).install_legacy_readwrite_handler(*dev, start, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0); |
| 543 | | break; |
| 544 | | case 32: |
| 545 | | if ((start % 4) == 0) { |
| 546 | | if ((end-start)==1) { |
| 547 | | m_maincpu->space(AS_IO).install_legacy_readwrite_handler(*dev, start, end+2, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0x0000ffff); |
| 548 | | } else { |
| 549 | | m_maincpu->space(AS_IO).install_legacy_readwrite_handler(*dev, start, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0xffffffff); |
| 550 | | } |
| 551 | | } else { |
| 552 | | // we handle just misalligned by 2 |
| 553 | | m_maincpu->space(AS_IO).install_legacy_readwrite_handler(*dev, start-2, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0xffff0000); |
| 554 | | } |
| 555 | | |
| 556 | | break; |
| 557 | | default: |
| 558 | | fatalerror("ISA16: Bus width %d not supported\n", buswidth); |
| 559 | | break; |
| 560 | | } |
| 561 | | } |
| 562 | | |
| 563 | 536 | void isa16_device::install16_device(offs_t start, offs_t end, offs_t mask, offs_t mirror, read16_delegate rhandler, write16_delegate whandler) |
| 564 | 537 | { |
| 565 | 538 | int buswidth = m_maincpu->space_config(AS_PROGRAM)->m_databus_width; |
| r21436 | r21437 | |
| 588 | 561 | } |
| 589 | 562 | } |
| 590 | 563 | |
| 591 | | void isa16_device::install16_device(offs_t start, offs_t end, offs_t mask, offs_t mirror, read16_space_func rhandler, const char* rhandler_name, write16_space_func whandler, const char *whandler_name) |
| 592 | | { |
| 593 | | int buswidth = m_maincpu->space_config(AS_PROGRAM)->m_databus_width; |
| 594 | | switch(buswidth) |
| 595 | | { |
| 596 | | case 16: |
| 597 | | m_maincpu->space(AS_IO).install_legacy_readwrite_handler(start, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name, 0); |
| 598 | | break; |
| 599 | | case 32: |
| 600 | | m_maincpu->space(AS_IO).install_legacy_readwrite_handler(start, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name, 0xffffffff); |
| 601 | | if ((start % 4) == 0) { |
| 602 | | if ((end-start)==1) { |
| 603 | | m_maincpu->space(AS_IO).install_legacy_readwrite_handler(start, end+2, mask, mirror, rhandler, rhandler_name, whandler, whandler_name, 0x0000ffff); |
| 604 | | } else { |
| 605 | | m_maincpu->space(AS_IO).install_legacy_readwrite_handler(start, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name, 0xffffffff); |
| 606 | | } |
| 607 | | } else { |
| 608 | | // we handle just misalligned by 2 |
| 609 | | m_maincpu->space(AS_IO).install_legacy_readwrite_handler(start-2, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name, 0xffff0000); |
| 610 | | } |
| 611 | | |
| 612 | | break; |
| 613 | | default: |
| 614 | | fatalerror("ISA16: Bus width %d not supported\n", buswidth); |
| 615 | | break; |
| 616 | | } |
| 617 | | } |
| 618 | | |
| 619 | 564 | // interrupt request from isa card |
| 620 | 565 | WRITE_LINE_MEMBER( isa16_device::irq10_w ) { m_out_irq10_func(state); } |
| 621 | 566 | WRITE_LINE_MEMBER( isa16_device::irq11_w ) { m_out_irq11_func(state); } |
trunk/src/mess/machine/isa.h
| r21436 | r21437 | |
| 289 | 289 | // construction/destruction |
| 290 | 290 | isa16_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 291 | 291 | |
| 292 | | void install16_device(device_t *dev, offs_t start, offs_t end, offs_t mask, offs_t mirror, read16_device_func rhandler, const char* rhandler_name, write16_device_func whandler, const char *whandler_name); |
| 293 | 292 | void install16_device(offs_t start, offs_t end, offs_t mask, offs_t mirror, read16_delegate rhandler, write16_delegate whandler); |
| 294 | | void install16_device(offs_t start, offs_t end, offs_t mask, offs_t mirror, read16_space_func rhandler, const char* rhandler_name, write16_space_func whandler, const char *whandler_name); |
| 295 | 293 | |
| 296 | 294 | DECLARE_WRITE_LINE_MEMBER( irq10_w ); |
| 297 | 295 | DECLARE_WRITE_LINE_MEMBER( irq11_w ); |