diff options
author | 2016-06-05 23:41:13 +0200 | |
---|---|---|
committer | 2016-06-14 23:21:58 +0200 | |
commit | b82d7c4aef44eac0c4752b7db3c29306610a84ac (patch) | |
tree | 40c96f334c72d5dc4d5e1e27bee3616e5905c8ef /src | |
parent | 58ee7eb241f3f9458544df2f14be525cfc6a1810 (diff) |
Memory fun [O.Galibert]
- Added AM_SELECT/addrselect field. Replaces the old
AM_MIRROR/AM_MASK combo used to mirror a handler and get the mirrored
bits in the offset.
- Removed mask and/or mirror from where it didn't belong. Simplified
a lot of instances of mask that just weren't needed, especially in bus
handlers. Used the short forms of install handlers where possible.
- Replaced the 60s hippy, "It's cool man" range parameter handling in
map_range that tried to guess what was meant when the values passed
were not entirely sensible, by a cranky, diner waitress-turned IRS
auditor curmudgeon. Main control function has a series of 14 tests
just to find a reason to fatalerror out your requests. You have
been warned.
Some drivers, hopefully not many, will fail the gate-guarding
bureaucrat trials. Should be easy to fix actually, I worked on the
error messages. A full regression test would be welcome.
Diffstat (limited to 'src')
179 files changed, 1418 insertions, 1223 deletions
diff --git a/src/devices/bus/a1bus/a1bus.cpp b/src/devices/bus/a1bus/a1bus.cpp index 5b29e44049f..273452fd2c1 100644 --- a/src/devices/bus/a1bus/a1bus.cpp +++ b/src/devices/bus/a1bus/a1bus.cpp @@ -139,12 +139,12 @@ void a1bus_device::install_device(offs_t start, offs_t end, read8_delegate rhand m_maincpu->space(AS_PROGRAM).install_readwrite_handler(start, end, rhandler, whandler); } -void a1bus_device::install_bank(offs_t start, offs_t end, offs_t mask, offs_t mirror, const char *tag, UINT8 *data) +void a1bus_device::install_bank(offs_t start, offs_t end, const char *tag, UINT8 *data) { -// printf("install_bank: %s @ %x->%x mask %x mirror %x\n", tag, start, end, mask, mirror); +// printf("install_bank: %s @ %x->%x\n", tag, start, end); m_maincpu = machine().device<cpu_device>(m_cputag); address_space &space = m_maincpu->space(AS_PROGRAM); - space.install_readwrite_bank(start, end, mask, mirror, tag ); + space.install_readwrite_bank(start, end, tag ); machine().root_device().membank(siblingtag(tag).c_str())->set_base(data); } @@ -199,7 +199,7 @@ void device_a1bus_card_interface::install_device(offs_t start, offs_t end, read8 m_a1bus->install_device(start, end, rhandler, whandler); } -void device_a1bus_card_interface::install_bank(offs_t start, offs_t end, offs_t mask, offs_t mirror, char *tag, UINT8 *data) +void device_a1bus_card_interface::install_bank(offs_t start, offs_t end, char *tag, UINT8 *data) { - m_a1bus->install_bank(start, end, mask, mirror, tag, data); + m_a1bus->install_bank(start, end, tag, data); } diff --git a/src/devices/bus/a1bus/a1bus.h b/src/devices/bus/a1bus/a1bus.h index e9726073ddb..5bfe4b632a5 100644 --- a/src/devices/bus/a1bus/a1bus.h +++ b/src/devices/bus/a1bus/a1bus.h @@ -87,7 +87,7 @@ public: void set_nmi_line(int state); void install_device(offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler); - void install_bank(offs_t start, offs_t end, offs_t mask, offs_t mirror, const char *tag, UINT8 *data); + void install_bank(offs_t start, offs_t end, const char *tag, UINT8 *data); DECLARE_WRITE_LINE_MEMBER( irq_w ); DECLARE_WRITE_LINE_MEMBER( nmi_w ); @@ -132,7 +132,7 @@ public: void lower_slot_nmi() { m_a1bus->set_nmi_line(CLEAR_LINE); } void install_device(offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler); - void install_bank(offs_t start, offs_t end, offs_t mask, offs_t mirror, char *tag, UINT8 *data); + void install_bank(offs_t start, offs_t end, char *tag, UINT8 *data); // inline configuration static void static_set_a1bus_tag(device_t &device, const char *tag, const char *slottag); diff --git a/src/devices/bus/a1bus/a1cassette.cpp b/src/devices/bus/a1bus/a1cassette.cpp index 7168133647c..94eab958858 100644 --- a/src/devices/bus/a1bus/a1cassette.cpp +++ b/src/devices/bus/a1bus/a1cassette.cpp @@ -81,7 +81,7 @@ void a1bus_cassette_device::device_start() m_rom = device().machine().root_device().memregion(this->subtag(CASSETTE_ROM_REGION).c_str())->base(); install_device(0xc000, 0xc0ff, read8_delegate(FUNC(a1bus_cassette_device::cassette_r), this), write8_delegate(FUNC(a1bus_cassette_device::cassette_w), this)); - install_bank(0xc100, 0xc1ff, 0, 0, (char *)"bank_a1cas", m_rom); + install_bank(0xc100, 0xc1ff, (char *)"bank_a1cas", m_rom); save_item(NAME(m_cassette_output_flipflop)); } diff --git a/src/devices/bus/a1bus/a1cffa.cpp b/src/devices/bus/a1bus/a1cffa.cpp index 912401a0642..fc0ff3da3a1 100644 --- a/src/devices/bus/a1bus/a1cffa.cpp +++ b/src/devices/bus/a1bus/a1cffa.cpp @@ -76,7 +76,7 @@ void a1bus_cffa_device::device_start() m_rom = device().machine().root_device().memregion(this->subtag(CFFA_ROM_REGION).c_str())->base(); install_device(0xafe0, 0xafff, read8_delegate(FUNC(a1bus_cffa_device::cffa_r), this), write8_delegate(FUNC(a1bus_cffa_device::cffa_w), this)); - install_bank(0x9000, 0xafdf, 0, 0, (char *)"bank_cffa1", m_rom); + install_bank(0x9000, 0xafdf, (char *)"bank_cffa1", m_rom); save_item(NAME(m_lastdata)); save_item(NAME(m_writeprotect)); diff --git a/src/devices/bus/abcbus/lux21046.cpp b/src/devices/bus/abcbus/lux21046.cpp index 244c4be977f..7b303156cb0 100644 --- a/src/devices/bus/abcbus/lux21046.cpp +++ b/src/devices/bus/abcbus/lux21046.cpp @@ -155,7 +155,7 @@ static ADDRESS_MAP_START( luxor_55_21046_io, AS_IO, 8, luxor_55_21046_device ) AM_RANGE(0x2c, 0x2c) AM_MIRROR(0xff03) AM_WRITE(_4b_w) AM_RANGE(0x3c, 0x3c) AM_MIRROR(0xff03) AM_WRITE(_9b_w) AM_RANGE(0x4c, 0x4c) AM_MIRROR(0xff03) AM_WRITE(_8a_w) - AM_RANGE(0x5c, 0x5c) AM_MIRROR(0xff07) AM_MASK(0xff00) AM_READ(_9a_r) + AM_RANGE(0x58, 0x58) AM_MIRROR(0x0007) AM_SELECT(0xff00) AM_READ(_9a_r) AM_RANGE(0x68, 0x6b) AM_MIRROR(0xff00) AM_DEVREAD(SAB1793_TAG, fd1793_t, read) AM_RANGE(0x78, 0x7b) AM_MIRROR(0xff00) AM_DEVWRITE(SAB1793_TAG, fd1793_t, write) AM_RANGE(0x80, 0x80) AM_MIRROR(0xff77) AM_DEVREADWRITE(Z80DMA_TAG, z80dma_device, read, write) diff --git a/src/devices/bus/cpc/amdrum.cpp b/src/devices/bus/cpc/amdrum.cpp index 87e5af428ce..6f8453e3750 100644 --- a/src/devices/bus/cpc/amdrum.cpp +++ b/src/devices/bus/cpc/amdrum.cpp @@ -52,7 +52,7 @@ void cpc_amdrum_device::device_start() address_space& space = cpu->memory().space(AS_IO); m_slot = dynamic_cast<cpc_expansion_slot_device *>(owner()); - space.install_write_handler(0xff00,0xffff,0,0,write8_delegate(FUNC(cpc_amdrum_device::dac_w),this)); + space.install_write_handler(0xff00,0xffff,write8_delegate(FUNC(cpc_amdrum_device::dac_w),this)); } //------------------------------------------------- diff --git a/src/devices/bus/cpc/brunword4.cpp b/src/devices/bus/cpc/brunword4.cpp index c4cbc0b0b1f..278ef4ed183 100644 --- a/src/devices/bus/cpc/brunword4.cpp +++ b/src/devices/bus/cpc/brunword4.cpp @@ -74,7 +74,7 @@ void cpc_brunword4_device::device_start() address_space& space = cpu->memory().space(AS_IO); m_slot = dynamic_cast<cpc_expansion_slot_device *>(owner()); - space.install_write_handler(0xdf00,0xdfff,0,0,write8_delegate(FUNC(cpc_brunword4_device::rombank_w),this)); + space.install_write_handler(0xdf00,0xdfff,write8_delegate(FUNC(cpc_brunword4_device::rombank_w),this)); } void cpc_brunword4_device::device_reset() diff --git a/src/devices/bus/cpc/cpc_pds.cpp b/src/devices/bus/cpc/cpc_pds.cpp index 1bff1c869a0..292efd3f7cf 100644 --- a/src/devices/bus/cpc/cpc_pds.cpp +++ b/src/devices/bus/cpc/cpc_pds.cpp @@ -52,7 +52,7 @@ void cpc_pds_device::device_start() address_space& space = cpu->memory().space(AS_IO); m_slot = dynamic_cast<cpc_expansion_slot_device *>(owner()); - space.install_readwrite_handler(0xfbec,0xfbef,0,0,read8_delegate(FUNC(cpc_pds_device::pio_r),this),write8_delegate(FUNC(cpc_pds_device::pio_w),this)); + space.install_readwrite_handler(0xfbec,0xfbef,read8_delegate(FUNC(cpc_pds_device::pio_r),this),write8_delegate(FUNC(cpc_pds_device::pio_w),this)); } //------------------------------------------------- diff --git a/src/devices/bus/cpc/cpc_rs232.cpp b/src/devices/bus/cpc/cpc_rs232.cpp index ccf4165edf1..42e4b83221f 100644 --- a/src/devices/bus/cpc/cpc_rs232.cpp +++ b/src/devices/bus/cpc/cpc_rs232.cpp @@ -114,8 +114,8 @@ void cpc_rs232_device::device_start() address_space& space = cpu->memory().space(AS_IO); m_slot = dynamic_cast<cpc_expansion_slot_device *>(owner()); - space.install_readwrite_handler(0xfadc,0xfadf,0,0,read8_delegate(FUNC(cpc_rs232_device::dart_r),this),write8_delegate(FUNC(cpc_rs232_device::dart_w),this)); - space.install_readwrite_handler(0xfbdc,0xfbdf,0,0,read8_delegate(FUNC(cpc_rs232_device::pit_r),this),write8_delegate(FUNC(cpc_rs232_device::pit_w),this)); + space.install_readwrite_handler(0xfadc,0xfadf,read8_delegate(FUNC(cpc_rs232_device::dart_r),this),write8_delegate(FUNC(cpc_rs232_device::dart_w),this)); + space.install_readwrite_handler(0xfbdc,0xfbdf,read8_delegate(FUNC(cpc_rs232_device::pit_r),this),write8_delegate(FUNC(cpc_rs232_device::pit_w),this)); } //------------------------------------------------- diff --git a/src/devices/bus/cpc/cpc_ssa1.cpp b/src/devices/bus/cpc/cpc_ssa1.cpp index a86847d100c..a4a0836dfc4 100644 --- a/src/devices/bus/cpc/cpc_ssa1.cpp +++ b/src/devices/bus/cpc/cpc_ssa1.cpp @@ -188,8 +188,8 @@ void cpc_ssa1_device::device_start() // m_sp0256_device = subdevice("sp0256"); - space.install_readwrite_handler(0xfaee,0xfaee,0,0,read8_delegate(FUNC(cpc_ssa1_device::ssa1_r),this),write8_delegate(FUNC(cpc_ssa1_device::ssa1_w),this)); - space.install_readwrite_handler(0xfbee,0xfbee,0,0,read8_delegate(FUNC(cpc_ssa1_device::ssa1_r),this),write8_delegate(FUNC(cpc_ssa1_device::ssa1_w),this)); + space.install_readwrite_handler(0xfaee,0xfaee,read8_delegate(FUNC(cpc_ssa1_device::ssa1_r),this),write8_delegate(FUNC(cpc_ssa1_device::ssa1_w),this)); + space.install_readwrite_handler(0xfbee,0xfbee,read8_delegate(FUNC(cpc_ssa1_device::ssa1_r),this),write8_delegate(FUNC(cpc_ssa1_device::ssa1_w),this)); } void cpc_dkspeech_device::device_start() @@ -202,7 +202,7 @@ void cpc_dkspeech_device::device_start() // m_sp0256_device = subdevice("sp0256"); - space.install_readwrite_handler(0xfbfe,0xfbfe,0,0,read8_delegate(FUNC(cpc_dkspeech_device::dkspeech_r),this),write8_delegate(FUNC(cpc_dkspeech_device::dkspeech_w),this)); + space.install_readwrite_handler(0xfbfe,0xfbfe,read8_delegate(FUNC(cpc_dkspeech_device::dkspeech_r),this),write8_delegate(FUNC(cpc_dkspeech_device::dkspeech_w),this)); } //------------------------------------------------- diff --git a/src/devices/bus/cpc/ddi1.cpp b/src/devices/bus/cpc/ddi1.cpp index c9b4adb1a2d..de747473f7b 100644 --- a/src/devices/bus/cpc/ddi1.cpp +++ b/src/devices/bus/cpc/ddi1.cpp @@ -79,9 +79,9 @@ void cpc_ddi1_device::device_start() address_space& space = cpu->memory().space(AS_IO); m_slot = dynamic_cast<cpc_expansion_slot_device *>(owner()); - space.install_write_handler(0xfa7e,0xfa7f,0,0,write8_delegate(FUNC(cpc_ddi1_device::motor_w),this)); - space.install_readwrite_handler(0xfb7e,0xfb7f,0,0,read8_delegate(FUNC(cpc_ddi1_device::fdc_r),this),write8_delegate(FUNC(cpc_ddi1_device::fdc_w),this)); - space.install_write_handler(0xdf00,0xdfff,0,0,write8_delegate(FUNC(cpc_ddi1_device::rombank_w),this)); + space.install_write_handler(0xfa7e,0xfa7f,write8_delegate(FUNC(cpc_ddi1_device::motor_w),this)); + space.install_readwrite_handler(0xfb7e,0xfb7f,read8_delegate(FUNC(cpc_ddi1_device::fdc_r),this),write8_delegate(FUNC(cpc_ddi1_device::fdc_w),this)); + space.install_write_handler(0xdf00,0xdfff,write8_delegate(FUNC(cpc_ddi1_device::rombank_w),this)); } //------------------------------------------------- diff --git a/src/devices/bus/cpc/doubler.cpp b/src/devices/bus/cpc/doubler.cpp index 9876263c323..632130dc08f 100644 --- a/src/devices/bus/cpc/doubler.cpp +++ b/src/devices/bus/cpc/doubler.cpp @@ -53,7 +53,7 @@ void cpc_doubler_device::device_start() address_space& space = cpu->memory().space(AS_IO); m_slot = dynamic_cast<cpc_expansion_slot_device *>(owner()); - space.install_read_handler(0xf0e0,0xf0e0,0,0,read8_delegate(FUNC(cpc_doubler_device::ext_tape_r),this)); + space.install_read_handler(0xf0e0,0xf0e0,read8_delegate(FUNC(cpc_doubler_device::ext_tape_r),this)); } //------------------------------------------------- diff --git a/src/devices/bus/cpc/hd20.cpp b/src/devices/bus/cpc/hd20.cpp index 3e19640be8e..d10bf0cd828 100644 --- a/src/devices/bus/cpc/hd20.cpp +++ b/src/devices/bus/cpc/hd20.cpp @@ -65,8 +65,8 @@ void cpc_hd20_device::device_start() address_space& space = cpu->memory().space(AS_IO); m_slot = dynamic_cast<cpc_expansion_slot_device *>(owner()); - space.install_write_handler(0xfbe0,0xfbe4,0,0,write8_delegate(FUNC(cpc_hd20_device::hdc_w),this)); - space.install_read_handler(0xfbe0,0xfbe4,0,0,read8_delegate(FUNC(cpc_hd20_device::hdc_r),this)); + space.install_write_handler(0xfbe0,0xfbe4,write8_delegate(FUNC(cpc_hd20_device::hdc_w),this)); + space.install_read_handler(0xfbe0,0xfbe4,read8_delegate(FUNC(cpc_hd20_device::hdc_r),this)); } //------------------------------------------------- diff --git a/src/devices/bus/cpc/magicsound.cpp b/src/devices/bus/cpc/magicsound.cpp index c289db92ddd..6f9a6313a64 100644 --- a/src/devices/bus/cpc/magicsound.cpp +++ b/src/devices/bus/cpc/magicsound.cpp @@ -90,10 +90,10 @@ void al_magicsound_device::device_start() address_space& space = cpu->memory().space(AS_IO); m_slot = dynamic_cast<cpc_expansion_slot_device *>(owner()); - space.install_readwrite_handler(0xf8d0,0xf8df,0,0,read8_delegate(FUNC(al_magicsound_device::dmac_r),this),write8_delegate(FUNC(al_magicsound_device::dmac_w),this)); - space.install_write_handler(0xf9d0,0xf9df,0,0,write8_delegate(FUNC(al_magicsound_device::timer_w),this)); - space.install_write_handler(0xfad0,0xfadf,0,0,write8_delegate(FUNC(al_magicsound_device::volume_w),this)); - space.install_write_handler(0xfbd0,0xfbdf,0,0,write8_delegate(FUNC(al_magicsound_device::mapper_w),this)); + space.install_readwrite_handler(0xf8d0,0xf8df,read8_delegate(FUNC(al_magicsound_device::dmac_r),this),write8_delegate(FUNC(al_magicsound_device::dmac_w),this)); + space.install_write_handler(0xf9d0,0xf9df,write8_delegate(FUNC(al_magicsound_device::timer_w),this)); + space.install_write_handler(0xfad0,0xfadf,write8_delegate(FUNC(al_magicsound_device::volume_w),this)); + space.install_write_handler(0xfbd0,0xfbdf,write8_delegate(FUNC(al_magicsound_device::mapper_w),this)); m_ramptr = machine().device<ram_device>(":" RAM_TAG); diff --git a/src/devices/bus/cpc/playcity.cpp b/src/devices/bus/cpc/playcity.cpp index 8d6fd109453..181a8fb3b0b 100644 --- a/src/devices/bus/cpc/playcity.cpp +++ b/src/devices/bus/cpc/playcity.cpp @@ -71,11 +71,11 @@ void cpc_playcity_device::device_start() address_space& space = cpu->memory().space(AS_IO); m_slot = dynamic_cast<cpc_expansion_slot_device *>(owner()); - space.install_readwrite_handler(0xf880,0xf883,0,0,read8_delegate(FUNC(cpc_playcity_device::ctc_r),this),write8_delegate(FUNC(cpc_playcity_device::ctc_w),this)); - space.install_readwrite_handler(0xf884,0xf884,0,0,read8_delegate(FUNC(cpc_playcity_device::ymz1_data_r),this),write8_delegate(FUNC(cpc_playcity_device::ymz1_data_w),this)); - space.install_readwrite_handler(0xf888,0xf888,0,0,read8_delegate(FUNC(cpc_playcity_device::ymz2_data_r),this),write8_delegate(FUNC(cpc_playcity_device::ymz2_data_w),this)); - space.install_write_handler(0xf984,0xf984,0,0,write8_delegate(FUNC(cpc_playcity_device::ymz1_address_w),this)); - space.install_write_handler(0xf988,0xf988,0,0,write8_delegate(FUNC(cpc_playcity_device::ymz2_address_w),this)); + space.install_readwrite_handler(0xf880,0xf883,read8_delegate(FUNC(cpc_playcity_device::ctc_r),this),write8_delegate(FUNC(cpc_playcity_device::ctc_w),this)); + space.install_readwrite_handler(0xf884,0xf884,read8_delegate(FUNC(cpc_playcity_device::ymz1_data_r),this),write8_delegate(FUNC(cpc_playcity_device::ymz1_data_w),this)); + space.install_readwrite_handler(0xf888,0xf888,read8_delegate(FUNC(cpc_playcity_device::ymz2_data_r),this),write8_delegate(FUNC(cpc_playcity_device::ymz2_data_w),this)); + space.install_write_handler(0xf984,0xf984,write8_delegate(FUNC(cpc_playcity_device::ymz1_address_w),this)); + space.install_write_handler(0xf988,0xf988,write8_delegate(FUNC(cpc_playcity_device::ymz2_address_w),this)); } //------------------------------------------------- diff --git a/src/devices/bus/cpc/smartwatch.cpp b/src/devices/bus/cpc/smartwatch.cpp index e4304323932..4b5c1850fe2 100644 --- a/src/devices/bus/cpc/smartwatch.cpp +++ b/src/devices/bus/cpc/smartwatch.cpp @@ -69,8 +69,8 @@ void cpc_smartwatch_device::device_reset() { device_t* cpu = machine().device(":maincpu"); address_space& space = cpu->memory().space(AS_PROGRAM); - space.install_read_handler(0xc000,0xc001,0,0,read8_delegate(FUNC(cpc_smartwatch_device::rtc_w),this)); - space.install_read_handler(0xc004,0xc004,0,0,read8_delegate(FUNC(cpc_smartwatch_device::rtc_r),this)); + space.install_read_handler(0xc000,0xc001,read8_delegate(FUNC(cpc_smartwatch_device::rtc_w),this)); + space.install_read_handler(0xc004,0xc004,read8_delegate(FUNC(cpc_smartwatch_device::rtc_r),this)); m_bank = membank(":bank7"); } diff --git a/src/devices/bus/cpc/symbfac2.cpp b/src/devices/bus/cpc/symbfac2.cpp index f64b6cfa131..a1df95d48fd 100644 --- a/src/devices/bus/cpc/symbfac2.cpp +++ b/src/devices/bus/cpc/symbfac2.cpp @@ -94,11 +94,11 @@ void cpc_symbiface2_device::device_start() m_slot = dynamic_cast<cpc_expansion_slot_device *>(owner()); - space.install_readwrite_handler(0xfd00,0xfd07,0,0,read8_delegate(FUNC(cpc_symbiface2_device::ide_cs1_r),this),write8_delegate(FUNC(cpc_symbiface2_device::ide_cs1_w),this)); - space.install_readwrite_handler(0xfd08,0xfd0f,0,0,read8_delegate(FUNC(cpc_symbiface2_device::ide_cs0_r),this),write8_delegate(FUNC(cpc_symbiface2_device::ide_cs0_w),this)); - space.install_read_handler(0xfd10,0xfd10,0,0,read8_delegate(FUNC(cpc_symbiface2_device::mouse_r),this)); - space.install_readwrite_handler(0xfd14,0xfd15,0,0,read8_delegate(FUNC(cpc_symbiface2_device::rtc_r),this),write8_delegate(FUNC(cpc_symbiface2_device::rtc_w),this)); - space.install_readwrite_handler(0xfd17,0xfd17,0,0,read8_delegate(FUNC(cpc_symbiface2_device::rom_rewrite_r),this),write8_delegate(FUNC(cpc_symbiface2_device::rom_rewrite_w),this)); + space.install_readwrite_handler(0xfd00,0xfd07,read8_delegate(FUNC(cpc_symbiface2_device::ide_cs1_r),this),write8_delegate(FUNC(cpc_symbiface2_device::ide_cs1_w),this)); + space.install_readwrite_handler(0xfd08,0xfd0f,read8_delegate(FUNC(cpc_symbiface2_device::ide_cs0_r),this),write8_delegate(FUNC(cpc_symbiface2_device::ide_cs0_w),this)); + space.install_read_handler(0xfd10,0xfd10,read8_delegate(FUNC(cpc_symbiface2_device::mouse_r),this)); + space.install_readwrite_handler(0xfd14,0xfd15,read8_delegate(FUNC(cpc_symbiface2_device::rtc_r),this),write8_delegate(FUNC(cpc_symbiface2_device::rtc_w),this)); + space.install_readwrite_handler(0xfd17,0xfd17,read8_delegate(FUNC(cpc_symbiface2_device::rom_rewrite_r),this),write8_delegate(FUNC(cpc_symbiface2_device::rom_rewrite_w),this)); // set up ROM space (these can be writable, when mapped to &4000, or completely disabled, allowing the built-in ROMs to be visible) // 32 banks of 16kB (512kB) diff --git a/src/devices/bus/cpc/transtape.cpp b/src/devices/bus/cpc/transtape.cpp index 680a40890d4..b1892f3a31e 100644 --- a/src/devices/bus/cpc/transtape.cpp +++ b/src/devices/bus/cpc/transtape.cpp @@ -63,8 +63,8 @@ void cpc_transtape_device::device_start() m_ram = make_unique_clear<UINT8[]>(0x2000); - m_space->install_write_handler(0xfbf0,0xfbf0,0,0,write8_delegate(FUNC(cpc_transtape_device::output_w),this)); - m_space->install_read_handler(0xfbff,0xfbff,0,0,read8_delegate(FUNC(cpc_transtape_device::input_r),this)); + m_space->install_write_handler(0xfbf0,0xfbf0,write8_delegate(FUNC(cpc_transtape_device::output_w),this)); + m_space->install_read_handler(0xfbff,0xfbff,read8_delegate(FUNC(cpc_transtape_device::input_r),this)); } //------------------------------------------------- diff --git a/src/devices/bus/dmv/k220.cpp b/src/devices/bus/dmv/k220.cpp index cd1c55a39a6..b753e7aa20c 100644 --- a/src/devices/bus/dmv/k220.cpp +++ b/src/devices/bus/dmv/k220.cpp @@ -149,8 +149,8 @@ dmv_k220_device::dmv_k220_device(const machine_config &mconfig, const char *tag, void dmv_k220_device::device_start() { address_space &space = machine().device<cpu_device>("maincpu")->space(AS_IO); - space.install_readwrite_handler(0x08, 0x0b, 0, 0, read8_delegate(FUNC(pit8253_device::read), &(*m_pit)), write8_delegate(FUNC(pit8253_device::write), &(*m_pit)), 0); - space.install_readwrite_handler(0x0c, 0x0f, 0, 0, read8_delegate(FUNC(i8255_device::read), &(*m_ppi)), write8_delegate(FUNC(i8255_device::write), &(*m_ppi)), 0); + space.install_readwrite_handler(0x08, 0x0b, read8_delegate(FUNC(pit8253_device::read), &(*m_pit)), write8_delegate(FUNC(pit8253_device::write), &(*m_pit)), 0); + space.install_readwrite_handler(0x0c, 0x0f, read8_delegate(FUNC(i8255_device::read), &(*m_ppi)), write8_delegate(FUNC(i8255_device::write), &(*m_ppi)), 0); } //------------------------------------------------- diff --git a/src/devices/bus/dmv/k230.cpp b/src/devices/bus/dmv/k230.cpp index 33e2c917024..7ac9b984216 100644 --- a/src/devices/bus/dmv/k230.cpp +++ b/src/devices/bus/dmv/k230.cpp @@ -165,7 +165,7 @@ void dmv_k230_device::device_start() void dmv_k234_device::device_start() { dmv_k230_device::device_start(); - m_io->install_readwrite_handler(0xd8, 0xdf, 0, 0, read8_delegate(FUNC(dmv_k234_device::snr_r), this), write8_delegate(FUNC(dmv_k234_device::snr_w), this), 0); + m_io->install_readwrite_handler(0xd8, 0xdf, read8_delegate(FUNC(dmv_k234_device::snr_r), this), write8_delegate(FUNC(dmv_k234_device::snr_w), this), 0); } //------------------------------------------------- diff --git a/src/devices/bus/ep64/exdos.cpp b/src/devices/bus/ep64/exdos.cpp index d5910c07ee3..093499c401d 100644 --- a/src/devices/bus/ep64/exdos.cpp +++ b/src/devices/bus/ep64/exdos.cpp @@ -151,10 +151,10 @@ ep64_exdos_device::ep64_exdos_device(const machine_config &mconfig, const char * void ep64_exdos_device::device_start() { - m_slot->program().install_rom(0x080000, 0x087fff, 0, 0, m_rom->base()); + m_slot->program().install_rom(0x080000, 0x087fff, m_rom->base()); - m_slot->io().install_readwrite_handler(0x10, 0x13, 0, 0x04, READ8_DEVICE_DELEGATE(m_fdc, wd_fdc_t, read), WRITE8_DEVICE_DELEGATE(m_fdc, wd_fdc_t, write)); - m_slot->io().install_readwrite_handler(0x18, 0x18, 0, 0x04, READ8_DELEGATE(ep64_exdos_device, read), WRITE8_DELEGATE(ep64_exdos_device, write)); + m_slot->io().install_readwrite_handler(0x10, 0x13, 0, 0x04, 0, READ8_DEVICE_DELEGATE(m_fdc, wd_fdc_t, read), WRITE8_DEVICE_DELEGATE(m_fdc, wd_fdc_t, write)); + m_slot->io().install_readwrite_handler(0x18, 0x18, 0, 0x04, 0, READ8_DELEGATE(ep64_exdos_device, read), WRITE8_DELEGATE(ep64_exdos_device, write)); } diff --git a/src/devices/bus/epson_sio/tf20.cpp b/src/devices/bus/epson_sio/tf20.cpp index 07fdf31e858..3acb7ba28a8 100644 --- a/src/devices/bus/epson_sio/tf20.cpp +++ b/src/devices/bus/epson_sio/tf20.cpp @@ -174,7 +174,7 @@ void epson_tf20_device::device_reset() m_mpsc->rxb_w(1); // enable rom - m_cpu->space(AS_PROGRAM).install_rom(0x0000, 0x07ff, 0, 0x7800, memregion("rom")->base()); + m_cpu->space(AS_PROGRAM).install_rom(0x0000, 0x07ff, 0x7800, memregion("rom")->base()); } //------------------------------------------------- diff --git a/src/devices/bus/isa/3c503.cpp b/src/devices/bus/isa/3c503.cpp index f0522e7fdbd..e1f44cbe4d5 100644 --- a/src/devices/bus/isa/3c503.cpp +++ b/src/devices/bus/isa/3c503.cpp @@ -35,8 +35,8 @@ void el2_3c503_device::device_start() { memset(m_rom, 0, 8*1024); // empty m_dp8390->set_mac(mac); set_isa_device(); - m_isa->install_device(0x0300, 0x030f, 0, 0, read8_delegate(FUNC(el2_3c503_device::el2_3c503_loport_r), this), write8_delegate(FUNC(el2_3c503_device::el2_3c503_loport_w), this)); - m_isa->install_device(0x0700, 0x070f, 0, 0, read8_delegate(FUNC(el2_3c503_device::el2_3c503_hiport_r), this), write8_delegate(FUNC(el2_3c503_device::el2_3c503_hiport_w), this)); + m_isa->install_device(0x0300, 0x030f, read8_delegate(FUNC(el2_3c503_device::el2_3c503_loport_r), this), write8_delegate(FUNC(el2_3c503_device::el2_3c503_loport_w), this)); + m_isa->install_device(0x0700, 0x070f, read8_delegate(FUNC(el2_3c503_device::el2_3c503_hiport_r), this), write8_delegate(FUNC(el2_3c503_device::el2_3c503_hiport_w), this)); // TODO: This is wrong, fix if anything actually uses it // DMA can change in runtime @@ -57,8 +57,8 @@ void el2_3c503_device::device_reset() { m_regs.pcfr = 0x20; // address 0xcc000 m_regs.ctrl = 0x0a; m_irq_state = CLEAR_LINE; - m_isa->unmap_bank(SADDR, SADDR + 0x1fff, 0, 0); - m_isa->install_bank(SADDR, SADDR + 0x1fff, 0, 0, "3c503 rom", m_rom); + m_isa->unmap_bank(SADDR, SADDR + 0x1fff); + m_isa->install_bank(SADDR, SADDR + 0x1fff, "3c503 rom", m_rom); } void el2_3c503_device::set_irq(int state) { @@ -193,16 +193,16 @@ WRITE8_MEMBER(el2_3c503_device::el2_3c503_hiport_w) { return; case 5: if((m_regs.gacfr & 0xf) != (data & 0xf)) { - m_isa->unmap_bank(SADDR, SADDR + 0x1fff, 0, 0); + m_isa->unmap_bank(SADDR, SADDR + 0x1fff); switch(data & 0xf) { case 0: - m_isa->install_bank(SADDR, SADDR + 0x1fff, 0, 0, "3c503 rom", m_rom); + m_isa->install_bank(SADDR, SADDR + 0x1fff, "3c503 rom", m_rom); break; case 9: - m_isa->install_bank(SADDR, SADDR + 0x1fff, 0, 0, "3c503 ram", m_board_ram); + m_isa->install_bank(SADDR, SADDR + 0x1fff, "3c503 ram", m_board_ram); break; default: - m_isa->install_bank(SADDR, SADDR + 0x1fff, 0, 0, "3c503 no map", m_rom); + m_isa->install_bank(SADDR, SADDR + 0x1fff, "3c503 no map", m_rom); break; } } diff --git a/src/devices/bus/isa/3c505.cpp b/src/devices/bus/isa/3c505.cpp index 85c316a6452..6c4dcd234a5 100644 --- a/src/devices/bus/isa/3c505.cpp +++ b/src/devices/bus/isa/3c505.cpp @@ -400,14 +400,14 @@ void threecom3c505_device::device_reset() m_irq = m_irqdrq->read() & 0xf; m_drq = (m_irqdrq->read() >> 4) & 0x7; - m_isa->install16_device(base, base + ELP_IO_EXTENT - 1, 0, 0, read16_delegate(FUNC(threecom3c505_device::read), this), write16_delegate(FUNC(threecom3c505_device::write), this)); + m_isa->install16_device(base, base + ELP_IO_EXTENT - 1, read16_delegate(FUNC(threecom3c505_device::read), this), write16_delegate(FUNC(threecom3c505_device::write), this)); if (m_romopts->read() & 1) { // host ROM is enabled, get base address static const int rom_bases[4] = { 0x0000, 0x2000, 0x4000, 0x6000 }; int rom_base = rom_bases[(m_romopts->read() >> 1) & 3]; - m_isa->install_rom(this, rom_base, rom_base + 0x01fff, 0, 0, "threecom3c505", "threecom3c505"); + m_isa->install_rom(this, rom_base, rom_base + 0x01fff, "threecom3c505", "threecom3c505"); } m_installed = true; diff --git a/src/devices/bus/isa/adlib.cpp b/src/devices/bus/isa/adlib.cpp index 42e2afd9604..66e7bc29ca3 100644 --- a/src/devices/bus/isa/adlib.cpp +++ b/src/devices/bus/isa/adlib.cpp @@ -75,7 +75,7 @@ isa8_adlib_device::isa8_adlib_device(const machine_config &mconfig, const char * void isa8_adlib_device::device_start() { set_isa_device(); - m_isa->install_device(0x0388, 0x0389, 0, 0, read8_delegate( FUNC(isa8_adlib_device::ym3812_16_r), this ), write8_delegate( FUNC(isa8_adlib_device::ym3812_16_w), this ) ); + m_isa->install_device(0x0388, 0x0389, read8_delegate( FUNC(isa8_adlib_device::ym3812_16_r), this ), write8_delegate( FUNC(isa8_adlib_device::ym3812_16_w), this ) ); } //------------------------------------------------- diff --git a/src/devices/bus/isa/aga.cpp b/src/devices/bus/isa/aga.cpp index 9146f2ce581..6d065194978 100644 --- a/src/devices/bus/isa/aga.cpp +++ b/src/devices/bus/isa/aga.cpp @@ -110,9 +110,9 @@ void isa8_aga_device::device_start() m_videoram = std::make_unique<UINT8[]>(0x10000); set_isa_device(); - m_isa->install_memory(0xb0000, 0xbffff, 0, 0, read8_delegate(FUNC(isa8_aga_device::pc_aga_videoram_r),this), write8_delegate(FUNC(isa8_aga_device::pc_aga_videoram_w),this)); - m_isa->install_device(0x3b0, 0x3bf, 0, 0, read8_delegate( FUNC(isa8_aga_device::pc_aga_mda_r), this ), write8_delegate( FUNC(isa8_aga_device::pc_aga_mda_w), this ) ); - m_isa->install_device(0x3d0, 0x3df, 0, 0, read8_delegate( FUNC(isa8_aga_device::pc_aga_cga_r), this ), write8_delegate( FUNC(isa8_aga_device::pc_aga_cga_w), this ) ); + m_isa->install_memory(0xb0000, 0xbffff, read8_delegate(FUNC(isa8_aga_device::pc_aga_videoram_r),this), write8_delegate(FUNC(isa8_aga_device::pc_aga_videoram_w),this)); + m_isa->install_device(0x3b0, 0x3bf, read8_delegate( FUNC(isa8_aga_device::pc_aga_mda_r), this ), write8_delegate( FUNC(isa8_aga_device::pc_aga_mda_w), this ) ); + m_isa->install_device(0x3d0, 0x3df, read8_delegate( FUNC(isa8_aga_device::pc_aga_cga_r), this ), write8_delegate( FUNC(isa8_aga_device::pc_aga_cga_w), this ) ); /* Initialise the cga palette */ int i; @@ -197,9 +197,9 @@ void isa8_aga_pc200_device::device_start() m_videoram = std::make_unique<UINT8[]>(0x10000); set_isa_device(); - m_isa->install_memory(0xb0000, 0xbffff, 0, 0, read8_delegate(FUNC(isa8_aga_pc200_device::pc200_videoram_r),this), write8_delegate(FUNC(isa8_aga_pc200_device::pc200_videoram_w),this)); - m_isa->install_device(0x3b0, 0x3bf, 0, 0, read8_delegate( FUNC(isa8_aga_device::pc_aga_mda_r), this ), write8_delegate( FUNC(isa8_aga_device::pc_aga_mda_w), this ) ); - m_isa->install_device(0x3d0, 0x3df, 0, 0, read8_delegate( FUNC(isa8_aga_pc200_device::pc200_cga_r), this ), write8_delegate( FUNC(isa8_aga_pc200_device::pc200_cga_w), this ) ); + m_isa->install_memory(0xb0000, 0xbffff, read8_delegate(FUNC(isa8_aga_pc200_device::pc200_videoram_r),this), write8_delegate(FUNC(isa8_aga_pc200_device::pc200_videoram_w),this)); + m_isa->install_device(0x3b0, 0x3bf, read8_delegate( FUNC(isa8_aga_device::pc_aga_mda_r), this ), write8_delegate( FUNC(isa8_aga_device::pc_aga_mda_w), this ) ); + m_isa->install_device(0x3d0, 0x3df, read8_delegate( FUNC(isa8_aga_pc200_device::pc200_cga_r), this ), write8_delegate( FUNC(isa8_aga_pc200_device::pc200_cga_w), this ) ); /* Initialise the cga palette */ int i; diff --git a/src/devices/bus/isa/aha1542.cpp b/src/devices/bus/isa/aha1542.cpp index cc557c47eaa..b3394f1e25c 100644 --- a/src/devices/bus/isa/aha1542.cpp +++ b/src/devices/bus/isa/aha1542.cpp @@ -192,8 +192,8 @@ aha1542_device::aha1542_device(const machine_config &mconfig, const char *tag, d void aha1542_device::device_start() { set_isa_device(); - m_isa->install_rom(this, 0xdc000, 0xdffff, 0, 0, "aha1542", "aha1542"); - m_isa->install_device(0x330, 0x333, 0, 0, read8_delegate(FUNC( aha1542_device::aha1542_r ), this), + m_isa->install_rom(this, 0xdc000, 0xdffff, "aha1542", "aha1542"); + m_isa->install_device(0x330, 0x333, read8_delegate(FUNC( aha1542_device::aha1542_r ), this), write8_delegate(FUNC( aha1542_device::aha1542_w ), this) ); } diff --git a/src/devices/bus/isa/cga.cpp b/src/devices/bus/isa/cga.cpp index 888318f65d7..2dc3a5cd300 100644 --- a/src/devices/bus/isa/cga.cpp +++ b/src/devices/bus/isa/cga.cpp @@ -348,8 +348,10 @@ void isa8_cga_device::device_start() set_isa_device(); m_vram.resize(m_vram_size); - m_isa->install_device(0x3d0, 0x3df, 0, 0, read8_delegate( FUNC(isa8_cga_device::io_read), this ), write8_delegate( FUNC(isa8_cga_device::io_write), this ) ); - m_isa->install_bank(0xb8000, 0xb8000 + MIN(0x8000,m_vram_size) - 1, 0, m_vram_size & 0x4000, "bank_cga", &m_vram[0]); + m_isa->install_device(0x3d0, 0x3df, read8_delegate( FUNC(isa8_cga_device::io_read), this ), write8_delegate( FUNC(isa8_cga_device::io_write), this ) ); + m_isa->install_bank(0xb8000, 0xb8000 + MIN(0x8000,m_vram_size) - 1, "bank_cga", &m_vram[0]); + if(m_vram_size == 0x4000) + m_isa->install_bank(0xbc000, 0xbffff, "bank_cga", &m_vram[0]); /* Initialise the cga palette */ int i; @@ -1578,12 +1580,13 @@ void isa8_cga_pc1512_device::device_start() { isa8_cga_device::device_start(); - m_isa->install_device(0x3d0, 0x3df, 0, 0, read8_delegate( FUNC(isa8_cga_pc1512_device::io_read), this ), write8_delegate( FUNC(isa8_cga_pc1512_device::io_write), this ) ); - m_isa->install_bank(0xb8000, 0xbbfff, 0, 0, "bank1", &m_vram[0]); + m_isa->install_device(0x3d0, 0x3df, read8_delegate( FUNC(isa8_cga_pc1512_device::io_read), this ), write8_delegate( FUNC(isa8_cga_pc1512_device::io_write), this ) ); + m_isa->install_bank(0xb8000, 0xbbfff, "bank1", &m_vram[0]); address_space &space = machine().firstcpu->space( AS_PROGRAM ); - space.install_write_handler( 0xb8000, 0xbbfff, 0, 0x0C000, write8_delegate( FUNC(isa8_cga_pc1512_device::vram_w), this ) ); + space.install_write_handler( 0xb8000, 0xbbfff, write8_delegate( FUNC(isa8_cga_pc1512_device::vram_w), this ) ); + space.install_write_handler( 0xbc000, 0xbffff, write8_delegate( FUNC(isa8_cga_pc1512_device::vram_w), this ) ); } void isa8_cga_pc1512_device::device_reset() @@ -1716,9 +1719,9 @@ void isa8_wyse700_device::device_start() { isa8_cga_device::device_start(); - m_isa->install_device(0x3d0, 0x3df, 0, 0, read8_delegate( FUNC(isa8_wyse700_device::io_read), this ), write8_delegate( FUNC(isa8_wyse700_device::io_write), this ) ); - m_isa->install_bank(0xa0000, 0xaffff, 0, 0, "bank_wy1", &m_vram[0x00000]); - m_isa->install_bank(0xb0000, 0xbffff, 0, 0, "bank_cga", &m_vram[0x10000]); + m_isa->install_device(0x3d0, 0x3df, read8_delegate( FUNC(isa8_wyse700_device::io_read), this ), write8_delegate( FUNC(isa8_wyse700_device::io_write), this ) ); + m_isa->install_bank(0xa0000, 0xaffff, "bank_wy1", &m_vram[0x00000]); + m_isa->install_bank(0xb0000, 0xbffff, "bank_cga", &m_vram[0x10000]); } void isa8_wyse700_device::device_reset() @@ -1778,7 +1781,7 @@ void isa8_ec1841_0002_device::device_start() { isa8_cga_device::device_start(); - m_isa->install_device(0x3d0, 0x3df, 0, 0, read8_delegate( FUNC(isa8_ec1841_0002_device::io_read), this ), write8_delegate( FUNC(isa8_ec1841_0002_device::io_write), this ) ); + m_isa->install_device(0x3d0, 0x3df, read8_delegate( FUNC(isa8_ec1841_0002_device::io_read), this ), write8_delegate( FUNC(isa8_ec1841_0002_device::io_write), this ) ); } void isa8_ec1841_0002_device::device_reset() @@ -1810,11 +1813,17 @@ WRITE8_MEMBER( isa8_ec1841_0002_device::io_write ) case 0x0f: m_p3df = data; if (data & 1) { - m_isa->install_memory(0xb8000, 0xb9fff, 0, m_vram_size & 0x4000, - read8_delegate( FUNC(isa8_ec1841_0002_device::char_ram_read), this), - write8_delegate(FUNC(isa8_ec1841_0002_device::char_ram_write), this) ); + m_isa->install_memory(0xb8000, 0xb9fff, + read8_delegate( FUNC(isa8_ec1841_0002_device::char_ram_read), this), + write8_delegate(FUNC(isa8_ec1841_0002_device::char_ram_write), this) ); + if(m_vram_size == 0x4000) + m_isa->install_memory(0xbc000, 0xbdfff, + read8_delegate( FUNC(isa8_ec1841_0002_device::char_ram_read), this), + write8_delegate(FUNC(isa8_ec1841_0002_device::char_ram_write), this) ); } else { - m_isa->install_bank(0xb8000, 0xb8000 + MIN(0x8000,m_vram_size) - 1, 0, m_vram_size & 0x4000, "bank_cga", &m_vram[0]); + m_isa->install_bank(0xb8000, 0xb8000 + MIN(0x8000,m_vram_size) - 1, "bank_cga", &m_vram[0]); + if(m_vram_size == 0x4000) + m_isa->install_bank(0xbc000, 0xbffff, "bank_cga", &m_vram[0]); } break; default: diff --git a/src/devices/bus/isa/com.cpp b/src/devices/bus/isa/com.cpp index e61777c63c2..cd374756229 100644 --- a/src/devices/bus/isa/com.cpp +++ b/src/devices/bus/isa/com.cpp @@ -115,10 +115,10 @@ isa8_com_device::isa8_com_device(const machine_config &mconfig, device_type type void isa8_com_device::device_start() { set_isa_device(); - m_isa->install_device(0x03f8, 0x03ff, 0, 0, read8_delegate(FUNC(ins8250_device::ins8250_r), subdevice<ins8250_uart_device>("uart_0")), write8_delegate(FUNC(ins8250_device::ins8250_w), subdevice<ins8250_uart_device>("uart_0")) ); - m_isa->install_device(0x02f8, 0x02ff, 0, 0, read8_delegate(FUNC(ins8250_device::ins8250_r), subdevice<ins8250_uart_device>("uart_1")), write8_delegate(FUNC(ins8250_device::ins8250_w), subdevice<ins8250_uart_device>("uart_1")) ); -// m_isa->install_device(0x03e8, 0x03ef, 0, 0, read8_delegate(FUNC(ins8250_device::ins8250_r), subdevice<ins8250_uart_device>("uart_2")), write8_delegate(FUNC(ins8250_device::ins8250_w), subdevice<ins8250_uart_device>("uart_2")) ); -// m_isa->install_device(0x02e8, 0x02ef, 0, 0, read8_delegate(FUNC(ins8250_device::ins8250_r), subdevice<ins8250_uart_device>("uart_3")), write8_delegate(FUNC(ins8250_device::ins8250_w), subdevice<ins8250_uart_device>("uart_3")) ); + m_isa->install_device(0x03f8, 0x03ff, read8_delegate(FUNC(ins8250_device::ins8250_r), subdevice<ins8250_uart_device>("uart_0")), write8_delegate(FUNC(ins8250_device::ins8250_w), subdevice<ins8250_uart_device>("uart_0")) ); + m_isa->install_device(0x02f8, 0x02ff, read8_delegate(FUNC(ins8250_device::ins8250_r), subdevice<ins8250_uart_device>("uart_1")), write8_delegate(FUNC(ins8250_device::ins8250_w), subdevice<ins8250_uart_device>("uart_1")) ); +// m_isa->install_device(0x03e8, 0x03ef, read8_delegate(FUNC(ins8250_device::ins8250_r), subdevice<ins8250_uart_device>("uart_2")), write8_delegate(FUNC(ins8250_device::ins8250_w), subdevice<ins8250_uart_device>("uart_2")) ); +// m_isa->install_device(0x02e8, 0x02ef, read8_delegate(FUNC(ins8250_device::ins8250_r), subdevice<ins8250_uart_device>("uart_3")), write8_delegate(FUNC(ins8250_device::ins8250_w), subdevice<ins8250_uart_device>("uart_3")) ); } //------------------------------------------------- diff --git a/src/devices/bus/isa/dectalk.cpp b/src/devices/bus/isa/dectalk.cpp index 169748eeae6..cae8f8733f3 100644 --- a/src/devices/bus/isa/dectalk.cpp +++ b/src/devices/bus/isa/dectalk.cpp @@ -217,7 +217,7 @@ READ8_MEMBER(dectalk_isa_device::read) void dectalk_isa_device::device_start() { set_isa_device(); - m_isa->install_device(0x0250, 0x0257, 0, 0, read8_delegate(FUNC(dectalk_isa_device::read), this), write8_delegate(FUNC(dectalk_isa_device::write), this)); + m_isa->install_device(0x0250, 0x0257, read8_delegate(FUNC(dectalk_isa_device::read), this), write8_delegate(FUNC(dectalk_isa_device::write), this)); } void dectalk_isa_device::device_reset() diff --git a/src/devices/bus/isa/ega.cpp b/src/devices/bus/isa/ega.cpp index 85d943b92ac..bc57b61eb8f 100644 --- a/src/devices/bus/isa/ega.cpp +++ b/src/devices/bus/isa/ega.cpp @@ -636,10 +636,10 @@ void isa8_ega_device::device_start() m_crtc_ega = subdevice<crtc_ega_device>(EGA_CRTC_NAME); - m_isa->install_rom(this, 0xc0000, 0xc3fff, 0, 0, "ega", "user2"); - m_isa->install_device(0x3b0, 0x3bf, 0, 0, read8_delegate(FUNC(isa8_ega_device::pc_ega8_3b0_r), this), write8_delegate(FUNC(isa8_ega_device::pc_ega8_3b0_w), this)); - m_isa->install_device(0x3c0, 0x3cf, 0, 0, read8_delegate(FUNC(isa8_ega_device::pc_ega8_3c0_r), this), write8_delegate(FUNC(isa8_ega_device::pc_ega8_3c0_w), this)); - m_isa->install_device(0x3d0, 0x3df, 0, 0, read8_delegate(FUNC(isa8_ega_device::pc_ega8_3d0_r), this), write8_delegate(FUNC(isa8_ega_device::pc_ega8_3d0_w), this)); + m_isa->install_rom(this, 0xc0000, 0xc3fff, "ega", "user2"); + m_isa->install_device(0x3b0, 0x3bf, read8_delegate(FUNC(isa8_ega_device::pc_ega8_3b0_r), this), write8_delegate(FUNC(isa8_ega_device::pc_ega8_3b0_w), this)); + m_isa->install_device(0x3c0, 0x3cf, read8_delegate(FUNC(isa8_ega_device::pc_ega8_3c0_r), this), write8_delegate(FUNC(isa8_ega_device::pc_ega8_3c0_w), this)); + m_isa->install_device(0x3d0, 0x3df, read8_delegate(FUNC(isa8_ega_device::pc_ega8_3d0_r), this), write8_delegate(FUNC(isa8_ega_device::pc_ega8_3d0_w), this)); } //------------------------------------------------- @@ -693,53 +693,53 @@ void isa8_ega_device::install_banks() case 0x00: /* 0xA0000, 128KB */ if ( m_misc_output & 0x02 ) { - m_isa->install_memory(0xa0000, 0xbffff, 0, 0, read8_delegate(FUNC(isa8_ega_device::read), this), write8_delegate(FUNC(isa8_ega_device::write), this)); + m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(FUNC(isa8_ega_device::read), this), write8_delegate(FUNC(isa8_ega_device::write), this)); } else { - m_isa->unmap_bank(0xa0000, 0xaffff,0,0); - m_isa->unmap_bank(0xb0000, 0xb7fff,0,0); - m_isa->unmap_bank(0xb8000, 0xbffff,0,0); + m_isa->unmap_bank(0xa0000, 0xaffff); + m_isa->unmap_bank(0xb0000, 0xb7fff); + m_isa->unmap_bank(0xb8000, 0xbffff); } break; case 0x04: /* 0xA0000, 64KB */ if ( m_misc_output & 0x02 ) { - m_isa->install_memory(0xa0000, 0xaffff, 0, 0, read8_delegate(FUNC(isa8_ega_device::read), this), write8_delegate(FUNC(isa8_ega_device::write), this)); + m_isa->install_memory(0xa0000, 0xaffff, read8_delegate(FUNC(isa8_ega_device::read), this), write8_delegate(FUNC(isa8_ega_device::write), this)); } else { - m_isa->unmap_bank(0xa0000, 0xaffff,0,0); + m_isa->unmap_bank(0xa0000, 0xaffff); } /* These unmaps may break multi graphics card support */ - m_isa->unmap_bank(0xb0000, 0xb7fff,0,0); - m_isa->unmap_bank(0xb8000, 0xbffff,0,0); + m_isa->unmap_bank(0xb0000, 0xb7fff); + m_isa->unmap_bank(0xb8000, 0xbffff); break; case 0x08: /* 0xB0000, 32KB */ if ( m_misc_output & 0x02 ) { - m_isa->install_memory(0xb0000, 0xb7fff, 0, 0, read8_delegate(FUNC(isa8_ega_device::read), this), write8_delegate(FUNC(isa8_ega_device::write), this)); + m_isa->install_memory(0xb0000, 0xb7fff, read8_delegate(FUNC(isa8_ega_device::read), this), write8_delegate(FUNC(isa8_ega_device::write), this)); } else { - m_isa->unmap_bank(0xb0000, 0xb7fff,0,0); + m_isa->unmap_bank(0xb0000, 0xb7fff); } /* These unmaps may break multi graphics card support */ - m_isa->unmap_bank(0xa0000, 0xaffff,0,0); - m_isa->unmap_bank(0xb8000, 0xbffff,0,0); + m_isa->unmap_bank(0xa0000, 0xaffff); + m_isa->unmap_bank(0xb8000, 0xbffff); break; case 0x0c: /* 0xB8000, 32KB */ if ( m_misc_output & 0x02 ) { - m_isa->install_memory(0xb8000, 0xbffff, 0, 0, read8_delegate(FUNC(isa8_ega_device::read), this), write8_delegate(FUNC(isa8_ega_device::write), this)); + m_isa->install_memory(0xb8000, 0xbffff, read8_delegate(FUNC(isa8_ega_device::read), this), write8_delegate(FUNC(isa8_ega_device::write), this)); } else { - m_isa->unmap_bank(0xb8000, 0xbffff,0,0); + m_isa->unmap_bank(0xb8000, 0xbffff); } /* These unmaps may break multi graphics card support */ - m_isa->unmap_bank(0xa0000, 0xaffff,0,0); - m_isa->unmap_bank(0xb0000, 0xb7fff,0,0); + m_isa->unmap_bank(0xa0000, 0xaffff); + m_isa->unmap_bank(0xb0000, 0xb7fff); break; } } diff --git a/src/devices/bus/isa/finalchs.cpp b/src/devices/bus/isa/finalchs.cpp index c55414a62e1..222381d6435 100644 --- a/src/devices/bus/isa/finalchs.cpp +++ b/src/devices/bus/isa/finalchs.cpp @@ -104,7 +104,7 @@ void isa8_finalchs_device::device_start() set_isa_device(); //the included setup program allows any port from 0x100 to 0x1F0 to be selected, at increments of 0x10 //picked the following at random until we get dips hooked up - m_isa->install_device(0x160, 0x0161, 0, 0, read8_delegate(FUNC(isa8_finalchs_device::finalchs_r), this), write8_delegate(FUNC(isa8_finalchs_device::finalchs_w), this)); + m_isa->install_device(0x160, 0x0161, read8_delegate(FUNC(isa8_finalchs_device::finalchs_r), this), write8_delegate(FUNC(isa8_finalchs_device::finalchs_w), this)); // timer_pulse(machine, ATTOTIME_IN_HZ(1), nullptr, 0, cause_M6502_irq); } diff --git a/src/devices/bus/isa/gblaster.cpp b/src/devices/bus/isa/gblaster.cpp index 22cb5edd328..3f36f791c69 100644 --- a/src/devices/bus/isa/gblaster.cpp +++ b/src/devices/bus/isa/gblaster.cpp @@ -112,9 +112,9 @@ isa8_gblaster_device::isa8_gblaster_device(const machine_config &mconfig, const void isa8_gblaster_device::device_start() { set_isa_device(); - m_isa->install_device(0x0220, 0x0221, 0, 0, read8_delegate( FUNC(isa8_gblaster_device::saa1099_16_r), this ), write8_delegate( FUNC(isa8_gblaster_device::saa1099_1_16_w), this ) ); - m_isa->install_device(0x0222, 0x0223, 0, 0, read8_delegate( FUNC(isa8_gblaster_device::saa1099_16_r), this ), write8_delegate( FUNC(isa8_gblaster_device::saa1099_2_16_w), this ) ); - m_isa->install_device(0x0224, 0x022F, 0, 0, read8_delegate( FUNC(isa8_gblaster_device::detect_r), this ), write8_delegate( FUNC(isa8_gblaster_device::detect_w), this ) ); + m_isa->install_device(0x0220, 0x0221, read8_delegate( FUNC(isa8_gblaster_device::saa1099_16_r), this ), write8_delegate( FUNC(isa8_gblaster_device::saa1099_1_16_w), this ) ); + m_isa->install_device(0x0222, 0x0223, read8_delegate( FUNC(isa8_gblaster_device::saa1099_16_r), this ), write8_delegate( FUNC(isa8_gblaster_device::saa1099_2_16_w), this ) ); + m_isa->install_device(0x0224, 0x022F, read8_delegate( FUNC(isa8_gblaster_device::detect_r), this ), write8_delegate( FUNC(isa8_gblaster_device::detect_w), this ) ); } //------------------------------------------------- diff --git a/src/devices/bus/isa/gus.cpp b/src/devices/bus/isa/gus.cpp index 2928aaa252c..b4294d306ce 100644 --- a/src/devices/bus/isa/gus.cpp +++ b/src/devices/bus/isa/gus.cpp @@ -1283,10 +1283,10 @@ isa16_gus_device::isa16_gus_device(const machine_config &mconfig, const char *ta void isa16_gus_device::device_start() { set_isa_device(); - m_isa->install_device(0x0200, 0x0201, 0, 0, read8_delegate(FUNC(isa16_gus_device::joy_r),this), write8_delegate(FUNC(isa16_gus_device::joy_w),this) ); - m_isa->install_device(0x0220, 0x022f, 0, 0, read8_delegate(FUNC(isa16_gus_device::board_r),this), write8_delegate(FUNC(isa16_gus_device::board_w),this) ); - m_isa->install_device(0x0320, 0x0327, 0, 0, read8_delegate(FUNC(isa16_gus_device::synth_r),this), write8_delegate(FUNC(isa16_gus_device::synth_w),this) ); - m_isa->install_device(0x0388, 0x0389, 0, 0, read8_delegate(FUNC(isa16_gus_device::adlib_r),this), write8_delegate(FUNC(isa16_gus_device::adlib_w),this) ); + m_isa->install_device(0x0200, 0x0201, read8_delegate(FUNC(isa16_gus_device::joy_r),this), write8_delegate(FUNC(isa16_gus_device::joy_w),this) ); + m_isa->install_device(0x0220, 0x022f, read8_delegate(FUNC(isa16_gus_device::board_r),this), write8_delegate(FUNC(isa16_gus_device::board_w),this) ); + m_isa->install_device(0x0320, 0x0327, read8_delegate(FUNC(isa16_gus_device::synth_r),this), write8_delegate(FUNC(isa16_gus_device::synth_w),this) ); + m_isa->install_device(0x0388, 0x0389, read8_delegate(FUNC(isa16_gus_device::adlib_r),this), write8_delegate(FUNC(isa16_gus_device::adlib_w),this) ); } void isa16_gus_device::device_reset() diff --git a/src/devices/bus/isa/hdc.cpp b/src/devices/bus/isa/hdc.cpp index 7708d341abd..8c7f65c0c0d 100644 --- a/src/devices/bus/isa/hdc.cpp +++ b/src/devices/bus/isa/hdc.cpp @@ -945,7 +945,7 @@ isa8_hdc_ec1841_device::isa8_hdc_ec1841_device(const machine_config &mconfig, co void isa8_hdc_device::device_start() { set_isa_device(); - m_isa->install_device(0x0320, 0x0323, 0, 0, read8_delegate( FUNC(isa8_hdc_device::pc_hdc_r), this ), write8_delegate( FUNC(isa8_hdc_device::pc_hdc_w), this ) ); + m_isa->install_device(0x0320, 0x0323, read8_delegate( FUNC(isa8_hdc_device::pc_hdc_r), this ), write8_delegate( FUNC(isa8_hdc_device::pc_hdc_w), this ) ); m_isa->set_dma_channel(3, this, FALSE); } @@ -958,7 +958,7 @@ void isa8_hdc_device::device_reset() dip = ioport("HDD")->read(); if (ioport("ROM")->read() == 1) - m_isa->install_rom(this, 0xc8000, 0xc9fff, 0, 0, "hdc", "hdc"); + m_isa->install_rom(this, 0xc8000, 0xc9fff, "hdc", "hdc"); } /************************************************************************* diff --git a/src/devices/bus/isa/ibm_mfc.cpp b/src/devices/bus/isa/ibm_mfc.cpp index b6445c9385f..4a715ec797a 100644 --- a/src/devices/bus/isa/ibm_mfc.cpp +++ b/src/devices/bus/isa/ibm_mfc.cpp @@ -467,7 +467,7 @@ isa8_ibm_mfc_device::isa8_ibm_mfc_device(const machine_config &mconfig, const ch void isa8_ibm_mfc_device::device_start() { set_isa_device(); - m_isa->install_device(0x2a20, 0x2a20 + 15, 0, 0, read8_delegate(FUNC(isa8_ibm_mfc_device::ibm_mfc_r), this), write8_delegate(FUNC(isa8_ibm_mfc_device::ibm_mfc_w), this)); + m_isa->install_device(0x2a20, 0x2a20 + 15, read8_delegate(FUNC(isa8_ibm_mfc_device::ibm_mfc_r), this), write8_delegate(FUNC(isa8_ibm_mfc_device::ibm_mfc_w), this)); } diff --git a/src/devices/bus/isa/isa.cpp b/src/devices/bus/isa/isa.cpp index fb449c5815d..3bbb41b5589 100644 --- a/src/devices/bus/isa/isa.cpp +++ b/src/devices/bus/isa/isa.cpp @@ -262,7 +262,7 @@ void isa8_device::device_reset() } -void isa8_device::install_space(address_spacenum spacenum, offs_t start, offs_t end, offs_t mask, offs_t mirror, read8_delegate rhandler, write8_delegate whandler) +void isa8_device::install_space(address_spacenum spacenum, offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler) { int buswidth; address_space *space; @@ -285,21 +285,21 @@ void isa8_device::install_space(address_spacenum spacenum, offs_t start, offs_t switch(buswidth) { case 8: - space->install_readwrite_handler(start, end, mask, mirror, rhandler, whandler, 0); + space->install_readwrite_handler(start, end, rhandler, whandler, 0); break; case 16: - space->install_readwrite_handler(start, end, mask, mirror, rhandler, whandler, 0xffff); + space->install_readwrite_handler(start, end, rhandler, whandler, 0xffff); break; case 32: if ((start % 4) == 0) { if ((end-start)==1) { - space->install_readwrite_handler(start, end+2, mask, mirror, rhandler, whandler, 0x0000ffff); + space->install_readwrite_handler(start, end+2, rhandler, whandler, 0x0000ffff); } else { - space->install_readwrite_handler(start, end, mask, mirror, rhandler, whandler, 0xffffffff); + space->install_readwrite_handler(start, end, rhandler, whandler, 0xffffffff); } } else { - // we handle just misalligned by 2 - space->install_readwrite_handler(start-2, end, mask, mirror, rhandler, whandler, 0xffff0000); + // we handle just misaligned by 2 + space->install_readwrite_handler(start-2, end, rhandler, whandler, 0xffff0000); } break; default: @@ -308,44 +308,44 @@ void isa8_device::install_space(address_spacenum spacenum, offs_t start, offs_t } -void isa8_device::install_memory(offs_t start, offs_t end, offs_t mask, offs_t mirror, read8_delegate rhandler, write8_delegate whandler) +void isa8_device::install_memory(offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler) { - install_space(AS_PROGRAM, start, end, mask, mirror, rhandler, whandler); + install_space(AS_PROGRAM, start, end, rhandler, whandler); } -void isa8_device::install_device(offs_t start, offs_t end, offs_t mask, offs_t mirror, read8_delegate rhandler, write8_delegate whandler) +void isa8_device::install_device(offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler) { - install_space(AS_IO, start, end, mask, mirror, rhandler, whandler); + install_space(AS_IO, start, end, rhandler, whandler); } -void isa8_device::install_bank(offs_t start, offs_t end, offs_t mask, offs_t mirror, const char *tag, UINT8 *data) +void isa8_device::install_bank(offs_t start, offs_t end, const char *tag, UINT8 *data) { - m_prgspace->install_readwrite_bank(start, end, mask, mirror, tag ); + m_prgspace->install_readwrite_bank(start, end, 0, tag ); machine().root_device().membank(m_prgspace->device().siblingtag(tag).c_str())->set_base(data); } -void isa8_device::unmap_bank(offs_t start, offs_t end, offs_t mask, offs_t mirror) +void isa8_device::unmap_bank(offs_t start, offs_t end) { - m_prgspace->unmap_readwrite(start, end, mask, mirror); + m_prgspace->unmap_readwrite(start, end); } -void isa8_device::install_rom(device_t *dev, offs_t start, offs_t end, offs_t mask, offs_t mirror, const char *tag, const char *region) +void isa8_device::install_rom(device_t *dev, offs_t start, offs_t end, const char *tag, const char *region) { if (machine().root_device().memregion("isa")) { UINT8 *src = dev->memregion(region)->base(); UINT8 *dest = machine().root_device().memregion("isa")->base() + start - 0xc0000; memcpy(dest,src, end - start + 1); } else { - m_prgspace->install_read_bank(start, end, mask, mirror, tag); - m_prgspace->unmap_write(start, end, mask, mirror); + m_prgspace->install_read_bank(start, end, 0, tag); + m_prgspace->unmap_write(start, end); machine().root_device().membank(m_prgspace->device().siblingtag(tag).c_str())->set_base(machine().root_device().memregion(dev->subtag(region).c_str())->base()); } } -void isa8_device::unmap_rom(offs_t start, offs_t end, offs_t mask, offs_t mirror) +void isa8_device::unmap_rom(offs_t start, offs_t end) { - m_prgspace->unmap_read(start, end, mask, mirror); + m_prgspace->unmap_read(start, end); } bool isa8_device::is_option_rom_space_available(offs_t start, int size) @@ -507,25 +507,25 @@ void isa16_device::device_start() m_out_drq7_cb.resolve_safe(); } -void isa16_device::install16_device(offs_t start, offs_t end, offs_t mask, offs_t mirror, read16_delegate rhandler, write16_delegate whandler) +void isa16_device::install16_device(offs_t start, offs_t end, read16_delegate rhandler, write16_delegate whandler) { int buswidth = m_prgwidth; switch(buswidth) { case 16: - m_iospace->install_readwrite_handler(start, end, mask, mirror, rhandler, whandler, 0); + m_iospace->install_readwrite_handler(start, end, rhandler, whandler, 0); break; case 32: - m_iospace->install_readwrite_handler(start, end, mask, mirror, rhandler, whandler, 0xffffffff); + m_iospace->install_readwrite_handler(start, end, rhandler, whandler, 0xffffffff); if ((start % 4) == 0) { if ((end-start)==1) { - m_iospace->install_readwrite_handler(start, end+2, mask, mirror, rhandler, whandler, 0x0000ffff); + m_iospace->install_readwrite_handler(start, end+2, rhandler, whandler, 0x0000ffff); } else { - m_iospace->install_readwrite_handler(start, end, mask, mirror, rhandler, whandler, 0xffffffff); + m_iospace->install_readwrite_handler(start, end, rhandler, whandler, 0xffffffff); } } else { // we handle just misalligned by 2 - m_iospace->install_readwrite_handler(start-2, end, mask, mirror, rhandler, whandler, 0xffff0000); + m_iospace->install_readwrite_handler(start-2, end, rhandler, whandler, 0xffff0000); } break; diff --git a/src/devices/bus/isa/isa.h b/src/devices/bus/isa/isa.h index a93fddd6acb..3552b72dab0 100644 --- a/src/devices/bus/isa/isa.h +++ b/src/devices/bus/isa/isa.h @@ -215,17 +215,17 @@ public: } } - void install_device(offs_t start, offs_t end, offs_t mask, offs_t mirror, read8_delegate rhandler, write8_delegate whandler); + void install_device(offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler); template<typename T> void install_device(offs_t addrstart, offs_t addrend, T &device, void (T::*map)(class address_map &map, device_t &device), int bits = 8, UINT64 unitmask = U64(0xffffffffffffffff)) { m_iospace->install_device(addrstart, addrend, device, map, bits, unitmask); } - void install_bank(offs_t start, offs_t end, offs_t mask, offs_t mirror, const char *tag, UINT8 *data); - void install_rom(device_t *dev, offs_t start, offs_t end, offs_t mask, offs_t mirror, const char *tag, const char *region); - void install_memory(offs_t start, offs_t end, offs_t mask, offs_t mirror, read8_delegate rhandler, write8_delegate whandler); + void install_bank(offs_t start, offs_t end, const char *tag, UINT8 *data); + void install_rom(device_t *dev, offs_t start, offs_t end, const char *tag, const char *region); + void install_memory(offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler); - void unmap_bank(offs_t start, offs_t end, offs_t mask, offs_t mirror); - void unmap_rom(offs_t start, offs_t end, offs_t mask, offs_t mirror); + void unmap_bank(offs_t start, offs_t end); + void unmap_rom(offs_t start, offs_t end); bool is_option_rom_space_available(offs_t start, int size); DECLARE_WRITE_LINE_MEMBER( irq2_w ); @@ -257,7 +257,7 @@ public: const address_space_config m_program_config, m_io_config, m_program16_config, m_io16_config; protected: - void install_space(address_spacenum spacenum, offs_t start, offs_t end, offs_t mask, offs_t mirror, read8_delegate rhandler, write8_delegate whandler); + void install_space(address_spacenum spacenum, offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler); // device-level overrides virtual void device_start() override; @@ -357,7 +357,7 @@ public: template<class _Object> static devcb_base &set_out_drq6_callback(device_t &device, _Object object) { return downcast<isa16_device &>(device).m_out_drq6_cb.set_callback(object); } template<class _Object> static devcb_base &set_out_drq7_callback(device_t &device, _Object object) { return downcast<isa16_device &>(device).m_out_drq7_cb.set_callback(object); } - void install16_device(offs_t start, offs_t end, offs_t mask, offs_t mirror, read16_delegate rhandler, write16_delegate whandler); + void install16_device(offs_t start, offs_t end, read16_delegate rhandler, write16_delegate whandler); // for ISA16, put the 16-bit configs in the primary slots and the 8-bit configs in the secondary virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override diff --git a/src/devices/bus/isa/lpt.cpp b/src/devices/bus/isa/lpt.cpp index 1baa190b034..e6d2cea232e 100644 --- a/src/devices/bus/isa/lpt.cpp +++ b/src/devices/bus/isa/lpt.cpp @@ -51,11 +51,11 @@ void isa8_lpt_device::device_reset() m_is_primary = (ioport("DSW")->read() & 1) ? false : true; if (m_is_primary) { - m_isa->install_device(0x0378, 0x037b, 0, 0, read8_delegate(FUNC(pc_lpt_device::read), subdevice<pc_lpt_device>("lpt")), write8_delegate(FUNC(pc_lpt_device::write), subdevice<pc_lpt_device>("lpt"))); + m_isa->install_device(0x0378, 0x037b, read8_delegate(FUNC(pc_lpt_device::read), subdevice<pc_lpt_device>("lpt")), write8_delegate(FUNC(pc_lpt_device::write), subdevice<pc_lpt_device>("lpt"))); } else { - m_isa->install_device(0x0278, 0x027b, 0, 0, read8_delegate(FUNC(pc_lpt_device::read), subdevice<pc_lpt_device>("lpt")), write8_delegate(FUNC(pc_lpt_device::write), subdevice<pc_lpt_device>("lpt"))); + m_isa->install_device(0x0278, 0x027b, read8_delegate(FUNC(pc_lpt_device::read), subdevice<pc_lpt_device>("lpt")), write8_delegate(FUNC(pc_lpt_device::write), subdevice<pc_lpt_device>("lpt"))); } } diff --git a/src/devices/bus/isa/mc1502_fdc.cpp b/src/devices/bus/isa/mc1502_fdc.cpp index 0a482f3a3f9..3df26b862fe 100644 --- a/src/devices/bus/isa/mc1502_fdc.cpp +++ b/src/devices/bus/isa/mc1502_fdc.cpp @@ -205,16 +205,16 @@ void mc1502_fdc_device::device_start() set_isa_device(); // BIOS 5.0-5.2x - m_isa->install_device(0x010c, 0x010f, 0, 0, + m_isa->install_device(0x010c, 0x010f, READ8_DEVICE_DELEGATE(m_fdc, fd1793_t, read), WRITE8_DEVICE_DELEGATE(m_fdc, fd1793_t, write) ); - m_isa->install_device(0x0100, 0x010b, 0, 0, read8_delegate( FUNC(mc1502_fdc_device::mc1502_fdc_r), this ), write8_delegate( FUNC(mc1502_fdc_device::mc1502_fdc_w), this ) ); + m_isa->install_device(0x0100, 0x010b, read8_delegate( FUNC(mc1502_fdc_device::mc1502_fdc_r), this ), write8_delegate( FUNC(mc1502_fdc_device::mc1502_fdc_w), this ) ); // BIOS 5.3x - m_isa->install_device(0x0048, 0x004b, 0, 0, + m_isa->install_device(0x0048, 0x004b, READ8_DEVICE_DELEGATE(m_fdc, fd1793_t, read), WRITE8_DEVICE_DELEGATE(m_fdc, fd1793_t, write) ); - m_isa->install_device(0x004c, 0x004f, 0, 0, read8_delegate( FUNC(mc1502_fdc_device::mc1502_fdcv2_r), this ), write8_delegate( FUNC(mc1502_fdc_device::mc1502_fdc_w), this ) ); + m_isa->install_device(0x004c, 0x004f, read8_delegate( FUNC(mc1502_fdc_device::mc1502_fdcv2_r), this ), write8_delegate( FUNC(mc1502_fdc_device::mc1502_fdc_w), this ) ); motor_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(mc1502_fdc_device::motor_callback),this)); motor_on = 0; diff --git a/src/devices/bus/isa/mc1502_rom.cpp b/src/devices/bus/isa/mc1502_rom.cpp index 9a12c5ec712..bdf9dbc3d43 100644 --- a/src/devices/bus/isa/mc1502_rom.cpp +++ b/src/devices/bus/isa/mc1502_rom.cpp @@ -58,7 +58,7 @@ mc1502_rom_device::mc1502_rom_device(const machine_config &mconfig, const char * void mc1502_rom_device::device_start() { set_isa_device(); - m_isa->install_rom(this, 0xe8000, 0xeffff, 0, 0, "XXX", "mc1502_rom"); + m_isa->install_rom(this, 0xe8000, 0xeffff, "XXX", "mc1502_rom"); } diff --git a/src/devices/bus/isa/mda.cpp b/src/devices/bus/isa/mda.cpp index c8456886f02..739f6b677d7 100644 --- a/src/devices/bus/isa/mda.cpp +++ b/src/devices/bus/isa/mda.cpp @@ -177,8 +177,15 @@ void isa8_mda_device::device_start() set_isa_device(); m_videoram.resize(0x1000); - m_isa->install_device(0x3b0, 0x3bf, 0, 0, read8_delegate( FUNC(isa8_mda_device::io_read), this ), write8_delegate( FUNC(isa8_mda_device::io_write), this ) ); - m_isa->install_bank(0xb0000, 0xb0fff, 0, 0x07000, "bank_mda", &m_videoram[0]); + m_isa->install_device(0x3b0, 0x3bf, read8_delegate( FUNC(isa8_mda_device::io_read), this ), write8_delegate( FUNC(isa8_mda_device::io_write), this ) ); + m_isa->install_bank(0xb0000, 0xb0fff, "bank_mda", &m_videoram[0]); + m_isa->install_bank(0xb1000, 0xb1fff, "bank_mda", &m_videoram[0]); + m_isa->install_bank(0xb2000, 0xb2fff, "bank_mda", &m_videoram[0]); + m_isa->install_bank(0xb3000, 0xb3fff, "bank_mda", &m_videoram[0]); + m_isa->install_bank(0xb4000, 0xb4fff, "bank_mda", &m_videoram[0]); + m_isa->install_bank(0xb5000, 0xb5fff, "bank_mda", &m_videoram[0]); + m_isa->install_bank(0xb6000, 0xb6fff, "bank_mda", &m_videoram[0]); + m_isa->install_bank(0xb7000, 0xb7fff, "bank_mda", &m_videoram[0]); /* Initialise the mda palette */ for(int i = 0; i < 4; i++) @@ -596,8 +603,8 @@ void isa8_hercules_device::device_start() m_videoram.resize(0x10000); set_isa_device(); - m_isa->install_device(0x3b0, 0x3bf, 0, 0, read8_delegate( FUNC(isa8_hercules_device::io_read), this ), write8_delegate( FUNC(isa8_hercules_device::io_write), this ) ); - m_isa->install_bank(0xb0000, 0xbffff, 0, 0, "bank_hercules", &m_videoram[0]); + m_isa->install_device(0x3b0, 0x3bf, read8_delegate( FUNC(isa8_hercules_device::io_read), this ), write8_delegate( FUNC(isa8_hercules_device::io_write), this ) ); + m_isa->install_bank(0xb0000, 0xbffff, "bank_hercules", &m_videoram[0]); /* Initialise the mda palette */ for(int i = 0; i < (sizeof(mda_palette) / 3); i++) @@ -800,7 +807,8 @@ void isa8_ec1840_0002_device::device_start() isa8_mda_device::device_start(); m_soft_chr_gen = std::make_unique<UINT8[]>(0x2000); - m_isa->install_bank(0xdc000, 0xddfff, 0, 0x2000, "bank_chargen", m_soft_chr_gen.get()); + m_isa->install_bank(0xdc000, 0xddfff, "bank_chargen", m_soft_chr_gen.get()); + m_isa->install_bank(0xde000, 0xdffff, "bank_chargen", m_soft_chr_gen.get()); } void isa8_ec1840_0002_device::device_reset() diff --git a/src/devices/bus/isa/mpu401.cpp b/src/devices/bus/isa/mpu401.cpp index 420a753b750..df78f73b5c2 100644 --- a/src/devices/bus/isa/mpu401.cpp +++ b/src/devices/bus/isa/mpu401.cpp @@ -81,7 +81,7 @@ void isa8_mpu401_device::device_start() { set_isa_device(); - m_isa->install_device(0x330, 0x0331, 0, 0, READ8_DEVICE_DELEGATE(m_mpu401, mpu401_device, mpu_r), WRITE8_DEVICE_DELEGATE(m_mpu401, mpu401_device, mpu_w)); + m_isa->install_device(0x330, 0x0331, READ8_DEVICE_DELEGATE(m_mpu401, mpu401_device, mpu_r), WRITE8_DEVICE_DELEGATE(m_mpu401, mpu401_device, mpu_w)); } //------------------------------------------------- diff --git a/src/devices/bus/isa/mufdc.cpp b/src/devices/bus/isa/mufdc.cpp index bb1b6fc8af4..24c8c3d142b 100644 --- a/src/devices/bus/isa/mufdc.cpp +++ b/src/devices/bus/isa/mufdc.cpp @@ -162,7 +162,7 @@ void mufdc_device::device_start() void mufdc_device::device_reset() { - m_isa->install_rom(this, 0xc8000, 0xc9fff, 0, 0, m_shortname.c_str(), "option"); + m_isa->install_rom(this, 0xc8000, 0xc9fff, m_shortname.c_str(), "option"); m_isa->install_device(0x3f0, 0x3f7, *m_fdc, &pc_fdc_interface::map); m_isa->set_dma_channel(2, this, true); } diff --git a/src/devices/bus/isa/ne1000.cpp b/src/devices/bus/isa/ne1000.cpp index 65ee0019430..24b37985225 100644 --- a/src/devices/bus/isa/ne1000.cpp +++ b/src/devices/bus/isa/ne1000.cpp @@ -33,7 +33,7 @@ void ne1000_device::device_start() { memcpy(m_prom, mac, 6); m_dp8390->set_mac(mac); set_isa_device(); - m_isa->install_device(0x0300, 0x031f, 0, 0, read8_delegate(FUNC(ne1000_device::ne1000_port_r), this), write8_delegate(FUNC(ne1000_device::ne1000_port_w), this)); + m_isa->install_device(0x0300, 0x031f, read8_delegate(FUNC(ne1000_device::ne1000_port_r), this), write8_delegate(FUNC(ne1000_device::ne1000_port_w), this)); } void ne1000_device::device_reset() { diff --git a/src/devices/bus/isa/ne2000.cpp b/src/devices/bus/isa/ne2000.cpp index 3937e14a920..347ab280d7d 100644 --- a/src/devices/bus/isa/ne2000.cpp +++ b/src/devices/bus/isa/ne2000.cpp @@ -34,7 +34,7 @@ void ne2000_device::device_start() { memcpy(m_prom, mac, 6); m_dp8390->set_mac(mac); set_isa_device(); - m_isa->install16_device(0x0300, 0x031f, 0, 0, read16_delegate(FUNC(ne2000_device::ne2000_port_r), this), write16_delegate(FUNC(ne2000_device::ne2000_port_w), this)); + m_isa->install16_device(0x0300, 0x031f, read16_delegate(FUNC(ne2000_device::ne2000_port_r), this), write16_delegate(FUNC(ne2000_device::ne2000_port_w), this)); } void ne2000_device::device_reset() { diff --git a/src/devices/bus/isa/num9rev.cpp b/src/devices/bus/isa/num9rev.cpp index 3ed1967df06..b37db708490 100644 --- a/src/devices/bus/isa/num9rev.cpp +++ b/src/devices/bus/isa/num9rev.cpp @@ -95,13 +95,13 @@ void isa8_number_9_rev_device::device_start() { set_isa_device(); - m_isa->install_memory(0xc0000, 0xc0001, 0, 0, read8_delegate(FUNC(upd7220_device::read), (upd7220_device *)m_upd7220), write8_delegate(FUNC(upd7220_device::write), (upd7220_device *)m_upd7220)); - m_isa->install_memory(0xc0100, 0xc03ff, 0, 0, read8_delegate(FUNC(isa8_number_9_rev_device::pal8_r), this), write8_delegate(FUNC(isa8_number_9_rev_device::pal8_w), this)); - m_isa->install_memory(0xc0400, 0xc0401, 0, 0, read8_delegate(FUNC(isa8_number_9_rev_device::bank_r), this), write8_delegate(FUNC(isa8_number_9_rev_device::bank_w), this)); - m_isa->install_memory(0xc0500, 0xc06ff, 0, 0, read8_delegate(FUNC(isa8_number_9_rev_device::overlay_r), this), write8_delegate(FUNC(isa8_number_9_rev_device::overlay_w), this)); - m_isa->install_memory(0xc0700, 0xc070f, 0, 0, read8_delegate(FUNC(isa8_number_9_rev_device::ctrl_r), this), write8_delegate(FUNC(isa8_number_9_rev_device::ctrl_w), this)); - m_isa->install_memory(0xc1000, 0xc3fff, 0, 0, read8_delegate(FUNC(isa8_number_9_rev_device::pal12_r), this), write8_delegate(FUNC(isa8_number_9_rev_device::pal12_w), this)); - m_isa->install_memory(0xa0000, 0xaffff, 0, 0, read8_delegate(FUNC(isa8_number_9_rev_device::read8), this), write8_delegate(FUNC(isa8_number_9_rev_device::write8), this)); + m_isa->install_memory(0xc0000, 0xc0001, read8_delegate(FUNC(upd7220_device::read), (upd7220_device *)m_upd7220), write8_delegate(FUNC(upd7220_device::write), (upd7220_device *)m_upd7220)); + m_isa->install_memory(0xc0100, 0xc03ff, read8_delegate(FUNC(isa8_number_9_rev_device::pal8_r), this), write8_delegate(FUNC(isa8_number_9_rev_device::pal8_w), this)); + m_isa->install_memory(0xc0400, 0xc0401, read8_delegate(FUNC(isa8_number_9_rev_device::bank_r), this), write8_delegate(FUNC(isa8_number_9_rev_device::bank_w), this)); + m_isa->install_memory(0xc0500, 0xc06ff, read8_delegate(FUNC(isa8_number_9_rev_device::overlay_r), this), write8_delegate(FUNC(isa8_number_9_rev_device::overlay_w), this)); + m_isa->install_memory(0xc0700, 0xc070f, read8_delegate(FUNC(isa8_number_9_rev_device::ctrl_r), this), write8_delegate(FUNC(isa8_number_9_rev_device::ctrl_w), this)); + m_isa->install_memory(0xc1000, 0xc3fff, read8_delegate(FUNC(isa8_number_9_rev_device::pal12_r), this), write8_delegate(FUNC(isa8_number_9_rev_device::pal12_w), this)); + m_isa->install_memory(0xa0000, 0xaffff, read8_delegate(FUNC(isa8_number_9_rev_device::read8), this), write8_delegate(FUNC(isa8_number_9_rev_device::write8), this)); } //------------------------------------------------- diff --git a/src/devices/bus/isa/omti8621.cpp b/src/devices/bus/isa/omti8621.cpp index cb36cf50a3e..ad529b0b430 100644 --- a/src/devices/bus/isa/omti8621.cpp +++ b/src/devices/bus/isa/omti8621.cpp @@ -321,7 +321,7 @@ void omti8621_device::device_reset() int esdi_base = io_bases[m_iobase->read() & 7]; // install the ESDI ports - m_isa->install16_device(esdi_base, esdi_base + 7, 0, 0, read16_delegate(FUNC(omti8621_device::read), this), write16_delegate(FUNC(omti8621_device::write), this)); + m_isa->install16_device(esdi_base, esdi_base + 7, read16_delegate(FUNC(omti8621_device::read), this), write16_delegate(FUNC(omti8621_device::write), this)); // and the onboard AT FDC ports if (m_iobase->read() & 8) diff --git a/src/devices/bus/isa/p1_fdc.cpp b/src/devices/bus/isa/p1_fdc.cpp index 4ba01ed47da..27fe8657e26 100644 --- a/src/devices/bus/isa/p1_fdc.cpp +++ b/src/devices/bus/isa/p1_fdc.cpp @@ -186,11 +186,11 @@ p1_fdc_device::p1_fdc_device(const machine_config &mconfig, const char *tag, dev void p1_fdc_device::device_start() { set_isa_device(); - m_isa->install_rom(this, 0xe0000, 0xe07ff, 0, 0, "XXX", "p1_fdc"); - m_isa->install_device(0x00c0, 0x00c3, 0, 0, + m_isa->install_rom(this, 0xe0000, 0xe07ff, "XXX", "p1_fdc"); + m_isa->install_device(0x00c0, 0x00c3, READ8_DEVICE_DELEGATE(m_fdc, fd1793_t, read), WRITE8_DEVICE_DELEGATE(m_fdc, fd1793_t, write) ); - m_isa->install_device(0x00c4, 0x00c7, 0, 0, read8_delegate( FUNC(p1_fdc_device::p1_fdc_r), this ), write8_delegate( FUNC(p1_fdc_device::p1_fdc_w), this ) ); + m_isa->install_device(0x00c4, 0x00c7, read8_delegate( FUNC(p1_fdc_device::p1_fdc_r), this ), write8_delegate( FUNC(p1_fdc_device::p1_fdc_w), this ) ); } diff --git a/src/devices/bus/isa/p1_hdc.cpp b/src/devices/bus/isa/p1_hdc.cpp index eb8d68524eb..bb3192f287a 100644 --- a/src/devices/bus/isa/p1_hdc.cpp +++ b/src/devices/bus/isa/p1_hdc.cpp @@ -130,8 +130,8 @@ p1_hdc_device::p1_hdc_device(const machine_config &mconfig, const char *tag, dev void p1_hdc_device::device_start() { set_isa_device(); - m_isa->install_rom(this, 0xe2000, 0xe27ff, 0, 0, "XXX", "p1_hdc"); - m_isa->install_memory(0xd0000, 0xd0fff, 0, 0, + m_isa->install_rom(this, 0xe2000, 0xe27ff, "XXX", "p1_hdc"); + m_isa->install_memory(0xd0000, 0xd0fff, READ8_DELEGATE(p1_hdc_device, p1_HDC_r), WRITE8_DELEGATE(p1_hdc_device, p1_HDC_w) ); } diff --git a/src/devices/bus/isa/p1_rom.cpp b/src/devices/bus/isa/p1_rom.cpp index bd078972a04..96b860bc60e 100644 --- a/src/devices/bus/isa/p1_rom.cpp +++ b/src/devices/bus/isa/p1_rom.cpp @@ -63,7 +63,7 @@ p1_rom_device::p1_rom_device(const machine_config &mconfig, const char *tag, dev void p1_rom_device::device_start() { set_isa_device(); - m_isa->install_rom(this, 0xc0000, 0xc1fff, 0, 0, "XXX", "p1_rom"); + m_isa->install_rom(this, 0xc0000, 0xc1fff, "XXX", "p1_rom"); } diff --git a/src/devices/bus/isa/pc1640_iga.cpp b/src/devices/bus/isa/pc1640_iga.cpp index 05c989fcbe1..7304e96c26f 100644 --- a/src/devices/bus/isa/pc1640_iga.cpp +++ b/src/devices/bus/isa/pc1640_iga.cpp @@ -108,8 +108,8 @@ void isa8_pc1640_iga_device::device_start() m_crtc_ega = subdevice<crtc_ega_device>(EGA_CRTC_NAME); - m_isa->install_rom(this, 0xc0000, 0xc7fff, 0, 0, "ega", "iga"); - m_isa->install_device(0x3b0, 0x3bf, 0, 0, read8_delegate(FUNC(isa8_ega_device::pc_ega8_3b0_r), this), write8_delegate(FUNC(isa8_ega_device::pc_ega8_3b0_w), this)); - m_isa->install_device(0x3c0, 0x3cf, 0, 0, read8_delegate(FUNC(isa8_ega_device::pc_ega8_3c0_r), this), write8_delegate(FUNC(isa8_ega_device::pc_ega8_3c0_w), this)); - m_isa->install_device(0x3d0, 0x3df, 0, 0, read8_delegate(FUNC(isa8_ega_device::pc_ega8_3d0_r), this), write8_delegate(FUNC(isa8_ega_device::pc_ega8_3d0_w), this)); + m_isa->install_rom(this, 0xc0000, 0xc7fff, "ega", "iga"); + m_isa->install_device(0x3b0, 0x3bf, read8_delegate(FUNC(isa8_ega_device::pc_ega8_3b0_r), this), write8_delegate(FUNC(isa8_ega_device::pc_ega8_3b0_w), this)); + m_isa->install_device(0x3c0, 0x3cf, read8_delegate(FUNC(isa8_ega_device::pc_ega8_3c0_r), this), write8_delegate(FUNC(isa8_ega_device::pc_ega8_3c0_w), this)); + m_isa->install_device(0x3d0, 0x3df, read8_delegate(FUNC(isa8_ega_device::pc_ega8_3d0_r), this), write8_delegate(FUNC(isa8_ega_device::pc_ega8_3d0_w), this)); } diff --git a/src/devices/bus/isa/pds.cpp b/src/devices/bus/isa/pds.cpp index 235e0acdd02..f832de418de 100644 --- a/src/devices/bus/isa/pds.cpp +++ b/src/devices/bus/isa/pds.cpp @@ -44,7 +44,7 @@ WRITE8_MEMBER(isa8_pds_device::ppi_w) void isa8_pds_device::device_start() { set_isa_device(); - m_isa->install_device(0x0300, 0x0307, 0, 0, read8_delegate(FUNC(isa8_pds_device::ppi_r),this), write8_delegate(FUNC(isa8_pds_device::ppi_w),this) ); + m_isa->install_device(0x0300, 0x0307, read8_delegate(FUNC(isa8_pds_device::ppi_r),this), write8_delegate(FUNC(isa8_pds_device::ppi_w),this) ); } void isa8_pds_device::device_reset() diff --git a/src/devices/bus/isa/pgc.cpp b/src/devices/bus/isa/pgc.cpp index c22631d405b..bc5563cb19c 100644 --- a/src/devices/bus/isa/pgc.cpp +++ b/src/devices/bus/isa/pgc.cpp @@ -264,9 +264,9 @@ void isa8_pgc_device::device_reset() m_commarea = memregion("commarea")->base(); if (BIT(ioport("DSW")->read(), 1)) - m_isa->install_bank(0xc6400, 0xc67ff, 0, 0, "commarea", m_commarea); + m_isa->install_bank(0xc6400, 0xc67ff, "commarea", m_commarea); else - m_isa->install_bank(0xc6000, 0xc63ff, 0, 0, "commarea", m_commarea); + m_isa->install_bank(0xc6000, 0xc63ff, "commarea", m_commarea); } // diff --git a/src/devices/bus/isa/sb16.cpp b/src/devices/bus/isa/sb16.cpp index 87c09592b6d..2bc2d43c517 100644 --- a/src/devices/bus/isa/sb16.cpp +++ b/src/devices/bus/isa/sb16.cpp @@ -703,15 +703,15 @@ void sb16_lle_device::device_start() ymf262_device *ymf262 = subdevice<ymf262_device>("ymf262"); set_isa_device(); - m_isa->install_device(0x0200, 0x0207, 0, 0, read8_delegate(FUNC(pc_joy_device::joy_port_r), subdevice<pc_joy_device>("pc_joy")), write8_delegate(FUNC(pc_joy_device::joy_port_w), subdevice<pc_joy_device>("pc_joy"))); - m_isa->install_device(0x0226, 0x0227, 0, 0, read8_delegate(FUNC(sb16_lle_device::invalid_r), this), write8_delegate(FUNC(sb16_lle_device::dsp_reset_w), this)); - m_isa->install_device(0x022a, 0x022b, 0, 0, read8_delegate(FUNC(sb16_lle_device::host_data_r), this), write8_delegate(FUNC(sb16_lle_device::invalid_w), this) ); - m_isa->install_device(0x022c, 0x022d, 0, 0, read8_delegate(FUNC(sb16_lle_device::dsp_wbuf_status_r), this), write8_delegate(FUNC(sb16_lle_device::host_cmd_w), this) ); - m_isa->install_device(0x022e, 0x022f, 0, 0, read8_delegate(FUNC(sb16_lle_device::dsp_rbuf_status_r), this), write8_delegate(FUNC(sb16_lle_device::invalid_w), this) ); - m_isa->install_device(0x0330, 0x0331, 0, 0, read8_delegate(FUNC(sb16_lle_device::mpu401_r), this), write8_delegate(FUNC(sb16_lle_device::mpu401_w), this)); - m_isa->install_device(0x0388, 0x0389, 0, 0, read8_delegate(FUNC(ymf262_device::read), ymf262), write8_delegate(FUNC(ymf262_device::write), ymf262)); - m_isa->install_device(0x0220, 0x0223, 0, 0, read8_delegate(FUNC(ymf262_device::read), ymf262), write8_delegate(FUNC(ymf262_device::write), ymf262)); - m_isa->install_device(0x0228, 0x0229, 0, 0, read8_delegate(FUNC(ymf262_device::read), ymf262), write8_delegate(FUNC(ymf262_device::write), ymf262)); + m_isa->install_device(0x0200, 0x0207, read8_delegate(FUNC(pc_joy_device::joy_port_r), subdevice<pc_joy_device>("pc_joy")), write8_delegate(FUNC(pc_joy_device::joy_port_w), subdevice<pc_joy_device>("pc_joy"))); + m_isa->install_device(0x0226, 0x0227, read8_delegate(FUNC(sb16_lle_device::invalid_r), this), write8_delegate(FUNC(sb16_lle_device::dsp_reset_w), this)); + m_isa->install_device(0x022a, 0x022b, read8_delegate(FUNC(sb16_lle_device::host_data_r), this), write8_delegate(FUNC(sb16_lle_device::invalid_w), this) ); + m_isa->install_device(0x022c, 0x022d, read8_delegate(FUNC(sb16_lle_device::dsp_wbuf_status_r), this), write8_delegate(FUNC(sb16_lle_device::host_cmd_w), this) ); + m_isa->install_device(0x022e, 0x022f, read8_delegate(FUNC(sb16_lle_device::dsp_rbuf_status_r), this), write8_delegate(FUNC(sb16_lle_device::invalid_w), this) ); + m_isa->install_device(0x0330, 0x0331, read8_delegate(FUNC(sb16_lle_device::mpu401_r), this), write8_delegate(FUNC(sb16_lle_device::mpu401_w), this)); + m_isa->install_device(0x0388, 0x0389, read8_delegate(FUNC(ymf262_device::read), ymf262), write8_delegate(FUNC(ymf262_device::write), ymf262)); + m_isa->install_device(0x0220, 0x0223, read8_delegate(FUNC(ymf262_device::read), ymf262), write8_delegate(FUNC(ymf262_device::write), ymf262)); + m_isa->install_device(0x0228, 0x0229, read8_delegate(FUNC(ymf262_device::read), ymf262), write8_delegate(FUNC(ymf262_device::write), ymf262)); m_isa->set_dma_channel(1, this, FALSE); m_isa->set_dma_channel(5, this, FALSE); m_timer = timer_alloc(); diff --git a/src/devices/bus/isa/sblaster.cpp b/src/devices/bus/isa/sblaster.cpp index 20dd6c6b2ed..6e38b04ce81 100644 --- a/src/devices/bus/isa/sblaster.cpp +++ b/src/devices/bus/isa/sblaster.cpp @@ -1264,23 +1264,23 @@ isa16_sblaster16_device::isa16_sblaster16_device(const machine_config &mconfig, void sb8_device::device_start() { - m_isa->install_device(0x0200, 0x0207, 0, 0, read8_delegate(FUNC(pc_joy_device::joy_port_r), subdevice<pc_joy_device>("pc_joy")), write8_delegate(FUNC(pc_joy_device::joy_port_w), subdevice<pc_joy_device>("pc_joy"))); - m_isa->install_device(0x0226, 0x0227, 0, 0, read8_delegate(FUNC(sb_device::dsp_reset_r), this), write8_delegate(FUNC(sb_device::dsp_reset_w), this)); - m_isa->install_device(0x022a, 0x022b, 0, 0, read8_delegate(FUNC(sb_device::dsp_data_r), this), write8_delegate(FUNC(sb_device::dsp_data_w), this) ); - m_isa->install_device(0x022c, 0x022d, 0, 0, read8_delegate(FUNC(sb_device::dsp_wbuf_status_r), this), write8_delegate(FUNC(sb_device::dsp_cmd_w), this) ); - m_isa->install_device(0x022e, 0x022f, 0, 0, read8_delegate(FUNC(sb_device::dsp_rbuf_status_r), this), write8_delegate(FUNC(sb_device::dsp_rbuf_status_w), this) ); + m_isa->install_device(0x0200, 0x0207, read8_delegate(FUNC(pc_joy_device::joy_port_r), subdevice<pc_joy_device>("pc_joy")), write8_delegate(FUNC(pc_joy_device::joy_port_w), subdevice<pc_joy_device>("pc_joy"))); + m_isa->install_device(0x0226, 0x0227, read8_delegate(FUNC(sb_device::dsp_reset_r), this), write8_delegate(FUNC(sb_device::dsp_reset_w), this)); + m_isa->install_device(0x022a, 0x022b, read8_delegate(FUNC(sb_device::dsp_data_r), this), write8_delegate(FUNC(sb_device::dsp_data_w), this) ); + m_isa->install_device(0x022c, 0x022d, read8_delegate(FUNC(sb_device::dsp_wbuf_status_r), this), write8_delegate(FUNC(sb_device::dsp_cmd_w), this) ); + m_isa->install_device(0x022e, 0x022f, read8_delegate(FUNC(sb_device::dsp_rbuf_status_r), this), write8_delegate(FUNC(sb_device::dsp_rbuf_status_w), this) ); if(m_dsp.version >= 0x0301) { ymf262_device *ymf262 = subdevice<ymf262_device>("ymf262"); - m_isa->install_device(0x0388, 0x038b, 0, 0, read8_delegate(FUNC(ymf262_device::read), ymf262), write8_delegate(FUNC(ymf262_device::write), ymf262)); - m_isa->install_device(0x0220, 0x0223, 0, 0, read8_delegate(FUNC(ymf262_device::read), ymf262), write8_delegate(FUNC(ymf262_device::write), ymf262)); - m_isa->install_device(0x0228, 0x0229, 0, 0, read8_delegate(FUNC(ymf262_device::read), ymf262), write8_delegate(FUNC(ymf262_device::write), ymf262)); + m_isa->install_device(0x0388, 0x038b, read8_delegate(FUNC(ymf262_device::read), ymf262), write8_delegate(FUNC(ymf262_device::write), ymf262)); + m_isa->install_device(0x0220, 0x0223, read8_delegate(FUNC(ymf262_device::read), ymf262), write8_delegate(FUNC(ymf262_device::write), ymf262)); + m_isa->install_device(0x0228, 0x0229, read8_delegate(FUNC(ymf262_device::read), ymf262), write8_delegate(FUNC(ymf262_device::write), ymf262)); } else { - m_isa->install_device(0x0388, 0x0389, 0, 0, read8_delegate( FUNC(sb8_device::ym3812_16_r), this ), write8_delegate( FUNC(sb8_device::ym3812_16_w), this ) ); - m_isa->install_device(0x0228, 0x0229, 0, 0, read8_delegate( FUNC(sb8_device::ym3812_16_r), this ), write8_delegate( FUNC(sb8_device::ym3812_16_w), this ) ); + m_isa->install_device(0x0388, 0x0389, read8_delegate( FUNC(sb8_device::ym3812_16_r), this ), write8_delegate( FUNC(sb8_device::ym3812_16_w), this ) ); + m_isa->install_device(0x0228, 0x0229, read8_delegate( FUNC(sb8_device::ym3812_16_r), this ), write8_delegate( FUNC(sb8_device::ym3812_16_w), this ) ); } m_timer = timer_alloc(0, nullptr); @@ -1305,8 +1305,8 @@ void isa8_sblaster1_0_device::device_start() { set_isa_device(); // 1.0 always has the SAA1099s for CMS back-compatibility - m_isa->install_device(0x0220, 0x0221, 0, 0, read8_delegate( FUNC(isa8_sblaster1_0_device::saa1099_16_r), this ), write8_delegate( FUNC(isa8_sblaster1_0_device::saa1099_1_16_w), this ) ); - m_isa->install_device(0x0222, 0x0223, 0, 0, read8_delegate( FUNC(isa8_sblaster1_0_device::saa1099_16_r), this ), write8_delegate( FUNC(isa8_sblaster1_0_device::saa1099_2_16_w), this ) ); + m_isa->install_device(0x0220, 0x0221, read8_delegate( FUNC(isa8_sblaster1_0_device::saa1099_16_r), this ), write8_delegate( FUNC(isa8_sblaster1_0_device::saa1099_1_16_w), this ) ); + m_isa->install_device(0x0222, 0x0223, read8_delegate( FUNC(isa8_sblaster1_0_device::saa1099_16_r), this ), write8_delegate( FUNC(isa8_sblaster1_0_device::saa1099_2_16_w), this ) ); m_isa->set_dma_channel(1, this, FALSE); m_dsp.version = 0x0105; sb8_device::device_start(); @@ -1325,16 +1325,16 @@ void sb16_device::device_start() { ymf262_device *ymf262 = subdevice<ymf262_device>("ymf262"); - m_isa->install_device(0x0200, 0x0207, 0, 0, read8_delegate(FUNC(pc_joy_device::joy_port_r), subdevice<pc_joy_device>("pc_joy")), write8_delegate(FUNC(pc_joy_device::joy_port_w), subdevice<pc_joy_device>("pc_joy"))); - m_isa->install_device(0x0224, 0x0225, 0, 0, read8_delegate(FUNC(sb16_device::mixer_r), this), write8_delegate(FUNC(sb16_device::mixer_w), this)); - m_isa->install_device(0x0226, 0x0227, 0, 0, read8_delegate(FUNC(sb_device::dsp_reset_r), this), write8_delegate(FUNC(sb_device::dsp_reset_w), this)); - m_isa->install_device(0x022a, 0x022b, 0, 0, read8_delegate(FUNC(sb_device::dsp_data_r), this), write8_delegate(FUNC(sb_device::dsp_data_w), this) ); - m_isa->install_device(0x022c, 0x022d, 0, 0, read8_delegate(FUNC(sb_device::dsp_wbuf_status_r), this), write8_delegate(FUNC(sb_device::dsp_cmd_w), this) ); - m_isa->install_device(0x022e, 0x022f, 0, 0, read8_delegate(FUNC(sb_device::dsp_rbuf_status_r), this), write8_delegate(FUNC(sb_device::dsp_rbuf_status_w), this) ); - m_isa->install_device(0x0330, 0x0331, 0, 0, read8_delegate(FUNC(sb16_device::mpu401_r), this), write8_delegate(FUNC(sb16_device::mpu401_w), this)); - m_isa->install_device(0x0388, 0x038b, 0, 0, read8_delegate(FUNC(ymf262_device::read), ymf262), write8_delegate(FUNC(ymf262_device::write), ymf262)); - m_isa->install_device(0x0220, 0x0223, 0, 0, read8_delegate(FUNC(ymf262_device::read), ymf262), write8_delegate(FUNC(ymf262_device::write), ymf262)); - m_isa->install_device(0x0228, 0x0229, 0, 0, read8_delegate(FUNC(ymf262_device::read), ymf262), write8_delegate(FUNC(ymf262_device::write), ymf262)); + m_isa->install_device(0x0200, 0x0207, read8_delegate(FUNC(pc_joy_device::joy_port_r), subdevice<pc_joy_device>("pc_joy")), write8_delegate(FUNC(pc_joy_device::joy_port_w), subdevice<pc_joy_device>("pc_joy"))); + m_isa->install_device(0x0224, 0x0225, read8_delegate(FUNC(sb16_device::mixer_r), this), write8_delegate(FUNC(sb16_device::mixer_w), this)); + m_isa->install_device(0x0226, 0x0227, read8_delegate(FUNC(sb_device::dsp_reset_r), this), write8_delegate(FUNC(sb_device::dsp_reset_w), this)); + m_isa->install_device(0x022a, 0x022b, read8_delegate(FUNC(sb_device::dsp_data_r), this), write8_delegate(FUNC(sb_device::dsp_data_w), this) ); + m_isa->install_device(0x022c, 0x022d, read8_delegate(FUNC(sb_device::dsp_wbuf_status_r), this), write8_delegate(FUNC(sb_device::dsp_cmd_w), this) ); + m_isa->install_device(0x022e, 0x022f, read8_delegate(FUNC(sb_device::dsp_rbuf_status_r), this), write8_delegate(FUNC(sb_device::dsp_rbuf_status_w), this) ); + m_isa->install_device(0x0330, 0x0331, read8_delegate(FUNC(sb16_device::mpu401_r), this), write8_delegate(FUNC(sb16_device::mpu401_w), this)); + m_isa->install_device(0x0388, 0x038b, read8_delegate(FUNC(ymf262_device::read), ymf262), write8_delegate(FUNC(ymf262_device::write), ymf262)); + m_isa->install_device(0x0220, 0x0223, read8_delegate(FUNC(ymf262_device::read), ymf262), write8_delegate(FUNC(ymf262_device::write), ymf262)); + m_isa->install_device(0x0228, 0x0229, read8_delegate(FUNC(ymf262_device::read), ymf262), write8_delegate(FUNC(ymf262_device::write), ymf262)); m_timer = timer_alloc(0, nullptr); diff --git a/src/devices/bus/isa/sc499.cpp b/src/devices/bus/isa/sc499.cpp index 565b8a42b35..42316f000b6 100644 --- a/src/devices/bus/isa/sc499.cpp +++ b/src/devices/bus/isa/sc499.cpp @@ -394,7 +394,7 @@ void sc499_device::device_reset() m_irq = m_irqdrq->read() & 7; m_drq = m_irqdrq->read()>>4; - m_isa->install_device(base, base+7, 0, 0, read8_delegate(FUNC(sc499_device::read), this), write8_delegate(FUNC(sc499_device::write), this)); + m_isa->install_device(base, base+7, read8_delegate(FUNC(sc499_device::read), this), write8_delegate(FUNC(sc499_device::write), this)); m_isa->set_dma_channel(m_drq, this, true); m_installed = true; diff --git a/src/devices/bus/isa/side116.cpp b/src/devices/bus/isa/side116.cpp index 460ee5f54fd..6aeda746d5f 100644 --- a/src/devices/bus/isa/side116.cpp +++ b/src/devices/bus/isa/side116.cpp @@ -115,16 +115,16 @@ void side116_device::device_reset() { switch ((m_config->read() >> 1) & 0x03) { - case 0: m_isa->install_rom(this, 0xc8000, 0xc9fff, 0, 0, "side116", "option"); break; - case 1: m_isa->install_rom(this, 0xd8000, 0xd9fff, 0, 0, "side116", "option"); break; - case 2: m_isa->install_rom(this, 0xcc000, 0xcdfff, 0, 0, "side116", "option"); break; - case 3: m_isa->install_rom(this, 0xdc000, 0xddfff, 0, 0, "side116", "option"); break; + case 0: m_isa->install_rom(this, 0xc8000, 0xc9fff, "side116", "option"); break; + case 1: m_isa->install_rom(this, 0xd8000, 0xd9fff, "side116", "option"); break; + case 2: m_isa->install_rom(this, 0xcc000, 0xcdfff, "side116", "option"); break; + case 3: m_isa->install_rom(this, 0xdc000, 0xddfff, "side116", "option"); break; } } // install io access if ((m_config->read() & 0x20) == 0x20) - m_isa->install_device(0x360, 0x36f, 0, 0, read8_delegate(FUNC(side116_device::read), this), write8_delegate(FUNC(side116_device::write), this)); + m_isa->install_device(0x360, 0x36f, read8_delegate(FUNC(side116_device::read), this), write8_delegate(FUNC(side116_device::write), this)); } diff --git a/src/devices/bus/isa/ssi2001.cpp b/src/devices/bus/isa/ssi2001.cpp index 4a77e870190..dec6751f887 100644 --- a/src/devices/bus/isa/ssi2001.cpp +++ b/src/devices/bus/isa/ssi2001.cpp @@ -29,8 +29,8 @@ ssi2001_device::ssi2001_device(const machine_config &mconfig, const char *tag, d void ssi2001_device::device_start() { set_isa_device(); - m_isa->install_device(0x0200, 0x0207, 0, 0, read8_delegate(FUNC(pc_joy_device::joy_port_r), subdevice<pc_joy_device>("pc_joy")), write8_delegate(FUNC(pc_joy_device::joy_port_w), subdevice<pc_joy_device>("pc_joy"))); - m_isa->install_device(0x0280, 0x029F, 0, 0, read8_delegate(FUNC(mos6581_device::read), subdevice<mos6581_device>("sid6581")), write8_delegate(FUNC(mos6581_device::write), subdevice<mos6581_device>("sid6581"))); + m_isa->install_device(0x0200, 0x0207, read8_delegate(FUNC(pc_joy_device::joy_port_r), subdevice<pc_joy_device>("pc_joy")), write8_delegate(FUNC(pc_joy_device::joy_port_w), subdevice<pc_joy_device>("pc_joy"))); + m_isa->install_device(0x0280, 0x029F, read8_delegate(FUNC(mos6581_device::read), subdevice<mos6581_device>("sid6581")), write8_delegate(FUNC(mos6581_device::write), subdevice<mos6581_device>("sid6581"))); } diff --git a/src/devices/bus/isa/stereo_fx.cpp b/src/devices/bus/isa/stereo_fx.cpp index b730ad3a670..fc17f2acfea 100644 --- a/src/devices/bus/isa/stereo_fx.cpp +++ b/src/devices/bus/isa/stereo_fx.cpp @@ -202,13 +202,13 @@ void stereo_fx_device::device_start() ym3812_device *ym3812 = subdevice<ym3812_device>("ym3812"); set_isa_device(); - m_isa->install_device(0x0200, 0x0207, 0, 0, read8_delegate(FUNC(pc_joy_device::joy_port_r), subdevice<pc_joy_device>("pc_joy")), write8_delegate(FUNC(pc_joy_device::joy_port_w), subdevice<pc_joy_device>("pc_joy"))); - m_isa->install_device(0x0226, 0x0227, 0, 0, read8_delegate(FUNC(stereo_fx_device::invalid_r), this), write8_delegate(FUNC(stereo_fx_device::dsp_reset_w), this)); - m_isa->install_device(0x022a, 0x022b, 0, 0, read8_delegate(FUNC(stereo_fx_device::dsp_data_r), this), write8_delegate(FUNC(stereo_fx_device::invalid_w), this) ); - m_isa->install_device(0x022c, 0x022d, 0, 0, read8_delegate(FUNC(stereo_fx_device::dsp_wbuf_status_r), this), write8_delegate(FUNC(stereo_fx_device::dsp_cmd_w), this) ); - m_isa->install_device(0x022e, 0x022f, 0, 0, read8_delegate(FUNC(stereo_fx_device::dsp_rbuf_status_r), this), write8_delegate(FUNC(stereo_fx_device::invalid_w), this) ); - m_isa->install_device(0x0388, 0x0389, 0, 0, read8_delegate(FUNC(ym3812_device::read), ym3812), write8_delegate(FUNC(ym3812_device::write), ym3812)); - m_isa->install_device(0x0228, 0x0229, 0, 0, read8_delegate(FUNC(ym3812_device::read), ym3812), write8_delegate(FUNC(ym3812_device::write), ym3812)); + m_isa->install_device(0x0200, 0x0207, read8_delegate(FUNC(pc_joy_device::joy_port_r), subdevice<pc_joy_device>("pc_joy")), write8_delegate(FUNC(pc_joy_device::joy_port_w), subdevice<pc_joy_device>("pc_joy"))); + m_isa->install_device(0x0226, 0x0227, read8_delegate(FUNC(stereo_fx_device::invalid_r), this), write8_delegate(FUNC(stereo_fx_device::dsp_reset_w), this)); + m_isa->install_device(0x022a, 0x022b, read8_delegate(FUNC(stereo_fx_device::dsp_data_r), this), write8_delegate(FUNC(stereo_fx_device::invalid_w), this) ); + m_isa->install_device(0x022c, 0x022d, read8_delegate(FUNC(stereo_fx_device::dsp_wbuf_status_r), this), write8_delegate(FUNC(stereo_fx_device::dsp_cmd_w), this) ); + m_isa->install_device(0x022e, 0x022f, read8_delegate(FUNC(stereo_fx_device::dsp_rbuf_status_r), this), write8_delegate(FUNC(stereo_fx_device::invalid_w), this) ); + m_isa->install_device(0x0388, 0x0389, read8_delegate(FUNC(ym3812_device::read), ym3812), write8_delegate(FUNC(ym3812_device::write), ym3812)); + m_isa->install_device(0x0228, 0x0229, read8_delegate(FUNC(ym3812_device::read), ym3812), write8_delegate(FUNC(ym3812_device::write), ym3812)); m_timer = timer_alloc(); m_timer->adjust(attotime::from_hz(2000000), 0, attotime::from_hz(2000000)); m_isa->set_dma_channel(1, this, FALSE); diff --git a/src/devices/bus/isa/svga_cirrus.cpp b/src/devices/bus/isa/svga_cirrus.cpp index 3e6f6ca1196..ebe18325c26 100644 --- a/src/devices/bus/isa/svga_cirrus.cpp +++ b/src/devices/bus/isa/svga_cirrus.cpp @@ -76,13 +76,13 @@ void isa16_svga_cirrus_device::device_start() m_vga = subdevice<cirrus_gd5430_device>("vga"); - m_isa->install_rom(this, 0xc0000, 0xc7fff, 0, 0, "svga", "dm_clgd5430"); + m_isa->install_rom(this, 0xc0000, 0xc7fff, "svga", "dm_clgd5430"); - m_isa->install_device(0x03b0, 0x03bf, 0, 0, read8_delegate(FUNC(cirrus_gd5430_device::port_03b0_r),m_vga), write8_delegate(FUNC(cirrus_gd5430_device::port_03b0_w),m_vga)); - m_isa->install_device(0x03c0, 0x03cf, 0, 0, read8_delegate(FUNC(cirrus_gd5430_device::port_03c0_r),m_vga), write8_delegate(FUNC(cirrus_gd5430_device::port_03c0_w),m_vga)); - m_isa->install_device(0x03d0, 0x03df, 0, 0, read8_delegate(FUNC(cirrus_gd5430_device::port_03d0_r),m_vga), write8_delegate(FUNC(cirrus_gd5430_device::port_03d0_w),m_vga)); + m_isa->install_device(0x03b0, 0x03bf, read8_delegate(FUNC(cirrus_gd5430_device::port_03b0_r),m_vga), write8_delegate(FUNC(cirrus_gd5430_device::port_03b0_w),m_vga)); + m_isa->install_device(0x03c0, 0x03cf, read8_delegate(FUNC(cirrus_gd5430_device::port_03c0_r),m_vga), write8_delegate(FUNC(cirrus_gd5430_device::port_03c0_w),m_vga)); + m_isa->install_device(0x03d0, 0x03df, read8_delegate(FUNC(cirrus_gd5430_device::port_03d0_r),m_vga), write8_delegate(FUNC(cirrus_gd5430_device::port_03d0_w),m_vga)); - m_isa->install_memory(0xa0000, 0xbffff, 0, 0, read8_delegate(FUNC(cirrus_gd5430_device::mem_r),m_vga), write8_delegate(FUNC(cirrus_gd5430_device::mem_w),m_vga)); + m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(FUNC(cirrus_gd5430_device::mem_r),m_vga), write8_delegate(FUNC(cirrus_gd5430_device::mem_w),m_vga)); } //------------------------------------------------- @@ -162,13 +162,13 @@ void isa16_svga_cirrus_gd542x_device::device_start() m_vga = subdevice<cirrus_gd5428_device>("vga"); - m_isa->install_rom(this, 0xc0000, 0xc7fff, 0, 0, "svga", "clgd542x"); + m_isa->install_rom(this, 0xc0000, 0xc7fff, "svga", "clgd542x"); - m_isa->install_device(0x03b0, 0x03bf, 0, 0, read8_delegate(FUNC(cirrus_gd5428_device::port_03b0_r),m_vga), write8_delegate(FUNC(cirrus_gd5428_device::port_03b0_w),m_vga)); - m_isa->install_device(0x03c0, 0x03cf, 0, 0, read8_delegate(FUNC(cirrus_gd5428_device::port_03c0_r),m_vga), write8_delegate(FUNC(cirrus_gd5428_device::port_03c0_w),m_vga)); - m_isa->install_device(0x03d0, 0x03df, 0, 0, read8_delegate(FUNC(cirrus_gd5428_device::port_03d0_r),m_vga), write8_delegate(FUNC(cirrus_gd5428_device::port_03d0_w),m_vga)); + m_isa->install_device(0x03b0, 0x03bf, read8_delegate(FUNC(cirrus_gd5428_device::port_03b0_r),m_vga), write8_delegate(FUNC(cirrus_gd5428_device::port_03b0_w),m_vga)); + m_isa->install_device(0x03c0, 0x03cf, read8_delegate(FUNC(cirrus_gd5428_device::port_03c0_r),m_vga), write8_delegate(FUNC(cirrus_gd5428_device::port_03c0_w),m_vga)); + m_isa->install_device(0x03d0, 0x03df, read8_delegate(FUNC(cirrus_gd5428_device::port_03d0_r),m_vga), write8_delegate(FUNC(cirrus_gd5428_device::port_03d0_w),m_vga)); - m_isa->install_memory(0xa0000, 0xbffff, 0, 0, read8_delegate(FUNC(cirrus_gd5428_device::mem_r),m_vga), write8_delegate(FUNC(cirrus_gd5428_device::mem_w),m_vga)); + m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(FUNC(cirrus_gd5428_device::mem_r),m_vga), write8_delegate(FUNC(cirrus_gd5428_device::mem_w),m_vga)); } //------------------------------------------------- diff --git a/src/devices/bus/isa/svga_s3.cpp b/src/devices/bus/isa/svga_s3.cpp index f4874db3fc9..98668979d61 100644 --- a/src/devices/bus/isa/svga_s3.cpp +++ b/src/devices/bus/isa/svga_s3.cpp @@ -88,29 +88,29 @@ void isa16_svga_s3_device::device_start() m_vga = subdevice<s3_vga_device>("vga"); m_8514 = subdevice<ibm8514a_device>("vga:8514a"); - m_isa->install_rom(this, 0xc0000, 0xc7fff, 0, 0, "svga", "s3_764"); - - m_isa->install_device(0x03b0, 0x03bf, 0, 0, read8_delegate(FUNC(s3_vga_device::port_03b0_r),m_vga), write8_delegate(FUNC(s3_vga_device::port_03b0_w),m_vga)); - m_isa->install_device(0x03c0, 0x03cf, 0, 0, read8_delegate(FUNC(s3_vga_device::port_03c0_r),m_vga), write8_delegate(FUNC(s3_vga_device::port_03c0_w),m_vga)); - m_isa->install_device(0x03d0, 0x03df, 0, 0, read8_delegate(FUNC(s3_vga_device::port_03d0_r),m_vga), write8_delegate(FUNC(s3_vga_device::port_03d0_w),m_vga)); - m_isa->install16_device(0x82e8, 0x82eb, 0, 0, read16_delegate(FUNC(ibm8514a_device::ibm8514_currenty_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_currenty_w),m_8514)); - m_isa->install16_device(0x86e8, 0x86eb, 0, 0, read16_delegate(FUNC(ibm8514a_device::ibm8514_currentx_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_currentx_w),m_8514)); - m_isa->install16_device(0x8ae8, 0x8aeb, 0, 0, read16_delegate(FUNC(ibm8514a_device::ibm8514_desty_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_desty_w),m_8514)); - m_isa->install16_device(0x8ee8, 0x8eeb, 0, 0, read16_delegate(FUNC(ibm8514a_device::ibm8514_destx_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_destx_w),m_8514)); - m_isa->install16_device(0x92e8, 0x92eb, 0, 0, read16_delegate(FUNC(ibm8514a_device::ibm8514_line_error_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_line_error_w),m_8514)); - m_isa->install16_device(0x96e8, 0x96eb, 0, 0, read16_delegate(FUNC(ibm8514a_device::ibm8514_width_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_width_w),m_8514)); - m_isa->install16_device(0x9ae8, 0x9aeb, 0, 0, read16_delegate(FUNC(ibm8514a_device::ibm8514_gpstatus_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_cmd_w),m_8514)); - m_isa->install16_device(0x9ee8, 0x9eeb, 0, 0, read16_delegate(FUNC(ibm8514a_device::ibm8514_ssv_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_ssv_w),m_8514)); - m_isa->install16_device(0xa2e8, 0xa2eb, 0, 0, read16_delegate(FUNC(ibm8514a_device::ibm8514_bgcolour_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_bgcolour_w),m_8514)); - m_isa->install16_device(0xa6e8, 0xa6eb, 0, 0, read16_delegate(FUNC(ibm8514a_device::ibm8514_fgcolour_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_fgcolour_w),m_8514)); - m_isa->install16_device(0xaae8, 0xaaeb, 0, 0, read16_delegate(FUNC(ibm8514a_device::ibm8514_write_mask_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_write_mask_w),m_8514)); - m_isa->install16_device(0xaee8, 0xaeeb, 0, 0, read16_delegate(FUNC(ibm8514a_device::ibm8514_read_mask_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_read_mask_w),m_8514)); - m_isa->install16_device(0xb6e8, 0xb6eb, 0, 0, read16_delegate(FUNC(ibm8514a_device::ibm8514_backmix_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_backmix_w),m_8514)); - m_isa->install16_device(0xbae8, 0xbaeb, 0, 0, read16_delegate(FUNC(ibm8514a_device::ibm8514_foremix_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_foremix_w),m_8514)); - m_isa->install16_device(0xbee8, 0xbeeb, 0, 0, read16_delegate(FUNC(ibm8514a_device::ibm8514_multifunc_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_multifunc_w),m_8514)); - m_isa->install16_device(0xe2e8, 0xe2eb, 0, 0, read16_delegate(FUNC(ibm8514a_device::ibm8514_pixel_xfer_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_pixel_xfer_w),m_8514)); - - m_isa->install_memory(0xa0000, 0xbffff, 0, 0, read8_delegate(FUNC(s3_vga_device::mem_r),m_vga), write8_delegate(FUNC(s3_vga_device::mem_w),m_vga)); + m_isa->install_rom(this, 0xc0000, 0xc7fff, "svga", "s3_764"); + + m_isa->install_device(0x03b0, 0x03bf, read8_delegate(FUNC(s3_vga_device::port_03b0_r),m_vga), write8_delegate(FUNC(s3_vga_device::port_03b0_w),m_vga)); + m_isa->install_device(0x03c0, 0x03cf, read8_delegate(FUNC(s3_vga_device::port_03c0_r),m_vga), write8_delegate(FUNC(s3_vga_device::port_03c0_w),m_vga)); + m_isa->install_device(0x03d0, 0x03df, read8_delegate(FUNC(s3_vga_device::port_03d0_r),m_vga), write8_delegate(FUNC(s3_vga_device::port_03d0_w),m_vga)); + m_isa->install16_device(0x82e8, 0x82eb, read16_delegate(FUNC(ibm8514a_device::ibm8514_currenty_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_currenty_w),m_8514)); + m_isa->install16_device(0x86e8, 0x86eb, read16_delegate(FUNC(ibm8514a_device::ibm8514_currentx_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_currentx_w),m_8514)); + m_isa->install16_device(0x8ae8, 0x8aeb, read16_delegate(FUNC(ibm8514a_device::ibm8514_desty_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_desty_w),m_8514)); + m_isa->install16_device(0x8ee8, 0x8eeb, read16_delegate(FUNC(ibm8514a_device::ibm8514_destx_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_destx_w),m_8514)); + m_isa->install16_device(0x92e8, 0x92eb, read16_delegate(FUNC(ibm8514a_device::ibm8514_line_error_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_line_error_w),m_8514)); + m_isa->install16_device(0x96e8, 0x96eb, read16_delegate(FUNC(ibm8514a_device::ibm8514_width_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_width_w),m_8514)); + m_isa->install16_device(0x9ae8, 0x9aeb, read16_delegate(FUNC(ibm8514a_device::ibm8514_gpstatus_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_cmd_w),m_8514)); + m_isa->install16_device(0x9ee8, 0x9eeb, read16_delegate(FUNC(ibm8514a_device::ibm8514_ssv_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_ssv_w),m_8514)); + m_isa->install16_device(0xa2e8, 0xa2eb, read16_delegate(FUNC(ibm8514a_device::ibm8514_bgcolour_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_bgcolour_w),m_8514)); + m_isa->install16_device(0xa6e8, 0xa6eb, read16_delegate(FUNC(ibm8514a_device::ibm8514_fgcolour_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_fgcolour_w),m_8514)); + m_isa->install16_device(0xaae8, 0xaaeb, read16_delegate(FUNC(ibm8514a_device::ibm8514_write_mask_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_write_mask_w),m_8514)); + m_isa->install16_device(0xaee8, 0xaeeb, read16_delegate(FUNC(ibm8514a_device::ibm8514_read_mask_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_read_mask_w),m_8514)); + m_isa->install16_device(0xb6e8, 0xb6eb, read16_delegate(FUNC(ibm8514a_device::ibm8514_backmix_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_backmix_w),m_8514)); + m_isa->install16_device(0xbae8, 0xbaeb, read16_delegate(FUNC(ibm8514a_device::ibm8514_foremix_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_foremix_w),m_8514)); + m_isa->install16_device(0xbee8, 0xbeeb, read16_delegate(FUNC(ibm8514a_device::ibm8514_multifunc_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_multifunc_w),m_8514)); + m_isa->install16_device(0xe2e8, 0xe2eb, read16_delegate(FUNC(ibm8514a_device::ibm8514_pixel_xfer_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_pixel_xfer_w),m_8514)); + + m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(FUNC(s3_vga_device::mem_r),m_vga), write8_delegate(FUNC(s3_vga_device::mem_w),m_vga)); } //------------------------------------------------- @@ -199,13 +199,13 @@ void isa16_s3virge_device::device_start() m_vga = subdevice<s3virge_vga_device>("vga"); - m_isa->install_rom(this, 0xc0000, 0xc7fff, 0, 0, "svga", "s3virge"); + m_isa->install_rom(this, 0xc0000, 0xc7fff, "svga", "s3virge"); - m_isa->install_device(0x03b0, 0x03bf, 0, 0, read8_delegate(FUNC(s3virge_vga_device::port_03b0_r),m_vga), write8_delegate(FUNC(s3virge_vga_device::port_03b0_w),m_vga)); - m_isa->install_device(0x03c0, 0x03cf, 0, 0, read8_delegate(FUNC(s3virge_vga_device::port_03c0_r),m_vga), write8_delegate(FUNC(s3virge_vga_device::port_03c0_w),m_vga)); - m_isa->install_device(0x03d0, 0x03df, 0, 0, read8_delegate(FUNC(s3virge_vga_device::port_03d0_r),m_vga), write8_delegate(FUNC(s3virge_vga_device::port_03d0_w),m_vga)); + m_isa->install_device(0x03b0, 0x03bf, read8_delegate(FUNC(s3virge_vga_device::port_03b0_r),m_vga), write8_delegate(FUNC(s3virge_vga_device::port_03b0_w),m_vga)); + m_isa->install_device(0x03c0, 0x03cf, read8_delegate(FUNC(s3virge_vga_device::port_03c0_r),m_vga), write8_delegate(FUNC(s3virge_vga_device::port_03c0_w),m_vga)); + m_isa->install_device(0x03d0, 0x03df, read8_delegate(FUNC(s3virge_vga_device::port_03d0_r),m_vga), write8_delegate(FUNC(s3virge_vga_device::port_03d0_w),m_vga)); - m_isa->install_memory(0xa0000, 0xbffff, 0, 0, read8_delegate(FUNC(s3virge_vga_device::mem_r),m_vga), write8_delegate(FUNC(s3virge_vga_device::mem_w),m_vga)); + m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(FUNC(s3virge_vga_device::mem_r),m_vga), write8_delegate(FUNC(s3virge_vga_device::mem_w),m_vga)); } //------------------------------------------------- @@ -286,13 +286,13 @@ void isa16_s3virgedx_device::device_start() m_vga = subdevice<s3virgedx_vga_device>("vga"); - m_isa->install_rom(this, 0xc0000, 0xc7fff, 0, 0, "svga", "s3virgedx"); + m_isa->install_rom(this, 0xc0000, 0xc7fff, "svga", "s3virgedx"); - m_isa->install_device(0x03b0, 0x03bf, 0, 0, read8_delegate(FUNC(s3virge_vga_device::port_03b0_r),m_vga), write8_delegate(FUNC(s3virge_vga_device::port_03b0_w),m_vga)); - m_isa->install_device(0x03c0, 0x03cf, 0, 0, read8_delegate(FUNC(s3virge_vga_device::port_03c0_r),m_vga), write8_delegate(FUNC(s3virge_vga_device::port_03c0_w),m_vga)); - m_isa->install_device(0x03d0, 0x03df, 0, 0, read8_delegate(FUNC(s3virge_vga_device::port_03d0_r),m_vga), write8_delegate(FUNC(s3virge_vga_device::port_03d0_w),m_vga)); + m_isa->install_device(0x03b0, 0x03bf, read8_delegate(FUNC(s3virge_vga_device::port_03b0_r),m_vga), write8_delegate(FUNC(s3virge_vga_device::port_03b0_w),m_vga)); + m_isa->install_device(0x03c0, 0x03cf, read8_delegate(FUNC(s3virge_vga_device::port_03c0_r),m_vga), write8_delegate(FUNC(s3virge_vga_device::port_03c0_w),m_vga)); + m_isa->install_device(0x03d0, 0x03df, read8_delegate(FUNC(s3virge_vga_device::port_03d0_r),m_vga), write8_delegate(FUNC(s3virge_vga_device::port_03d0_w),m_vga)); - m_isa->install_memory(0xa0000, 0xbffff, 0, 0, read8_delegate(FUNC(s3virge_vga_device::mem_r),m_vga), write8_delegate(FUNC(s3virge_vga_device::mem_w),m_vga)); + m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(FUNC(s3virge_vga_device::mem_r),m_vga), write8_delegate(FUNC(s3virge_vga_device::mem_w),m_vga)); } //------------------------------------------------- @@ -374,13 +374,13 @@ void isa16_stealth3d2kpro_device::device_start() m_vga = subdevice<s3virgedx_vga_device>("vga"); - m_isa->install_rom(this, 0xc0000, 0xc7fff, 0, 0, "svga", "stealth3d"); + m_isa->install_rom(this, 0xc0000, 0xc7fff, "svga", "stealth3d"); - m_isa->install_device(0x03b0, 0x03bf, 0, 0, read8_delegate(FUNC(s3virge_vga_device::port_03b0_r),m_vga), write8_delegate(FUNC(s3virge_vga_device::port_03b0_w),m_vga)); - m_isa->install_device(0x03c0, 0x03cf, 0, 0, read8_delegate(FUNC(s3virge_vga_device::port_03c0_r),m_vga), write8_delegate(FUNC(s3virge_vga_device::port_03c0_w),m_vga)); - m_isa->install_device(0x03d0, 0x03df, 0, 0, read8_delegate(FUNC(s3virge_vga_device::port_03d0_r),m_vga), write8_delegate(FUNC(s3virge_vga_device::port_03d0_w),m_vga)); + m_isa->install_device(0x03b0, 0x03bf, read8_delegate(FUNC(s3virge_vga_device::port_03b0_r),m_vga), write8_delegate(FUNC(s3virge_vga_device::port_03b0_w),m_vga)); + m_isa->install_device(0x03c0, 0x03cf, read8_delegate(FUNC(s3virge_vga_device::port_03c0_r),m_vga), write8_delegate(FUNC(s3virge_vga_device::port_03c0_w),m_vga)); + m_isa->install_device(0x03d0, 0x03df, read8_delegate(FUNC(s3virge_vga_device::port_03d0_r),m_vga), write8_delegate(FUNC(s3virge_vga_device::port_03d0_w),m_vga)); - m_isa->install_memory(0xa0000, 0xbffff, 0, 0, read8_delegate(FUNC(s3virge_vga_device::mem_r),m_vga), write8_delegate(FUNC(s3virge_vga_device::mem_w),m_vga)); + m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(FUNC(s3virge_vga_device::mem_r),m_vga), write8_delegate(FUNC(s3virge_vga_device::mem_w),m_vga)); } //------------------------------------------------- diff --git a/src/devices/bus/isa/svga_trident.cpp b/src/devices/bus/isa/svga_trident.cpp index ded9d629fe3..6cf4d3d407a 100644 --- a/src/devices/bus/isa/svga_trident.cpp +++ b/src/devices/bus/isa/svga_trident.cpp @@ -78,24 +78,24 @@ void isa16_svga_tgui9680_device::device_start() m_vga = subdevice<trident_vga_device>("vga"); - m_isa->install_rom(this, 0xc0000, 0xc7fff, 0, 0, "tgui9680", "tgui9680"); + m_isa->install_rom(this, 0xc0000, 0xc7fff, "tgui9680", "tgui9680"); - m_isa->install_device(0x3b0, 0x3bf, 0, 0, read8_delegate(FUNC(trident_vga_device::port_03b0_r),m_vga), write8_delegate(FUNC(trident_vga_device::port_03b0_w),m_vga)); - m_isa->install_device(0x3c0, 0x3cf, 0, 0, read8_delegate(FUNC(trident_vga_device::port_03c0_r),m_vga), write8_delegate(FUNC(trident_vga_device::port_03c0_w),m_vga)); - m_isa->install_device(0x3d0, 0x3df, 0, 0, read8_delegate(FUNC(trident_vga_device::port_03d0_r),m_vga), write8_delegate(FUNC(trident_vga_device::port_03d0_w),m_vga)); - m_isa->install_device(0x43c4, 0x43cb, 0, 0, read8_delegate(FUNC(trident_vga_device::port_43c6_r),m_vga), write8_delegate(FUNC(trident_vga_device::port_43c6_w),m_vga)); - m_isa->install_device(0x83c4, 0x83cb, 0, 0, read8_delegate(FUNC(trident_vga_device::port_83c6_r),m_vga), write8_delegate(FUNC(trident_vga_device::port_83c6_w),m_vga)); + m_isa->install_device(0x3b0, 0x3bf, read8_delegate(FUNC(trident_vga_device::port_03b0_r),m_vga), write8_delegate(FUNC(trident_vga_device::port_03b0_w),m_vga)); + m_isa->install_device(0x3c0, 0x3cf, read8_delegate(FUNC(trident_vga_device::port_03c0_r),m_vga), write8_delegate(FUNC(trident_vga_device::port_03c0_w),m_vga)); + m_isa->install_device(0x3d0, 0x3df, read8_delegate(FUNC(trident_vga_device::port_03d0_r),m_vga), write8_delegate(FUNC(trident_vga_device::port_03d0_w),m_vga)); + m_isa->install_device(0x43c4, 0x43cb, read8_delegate(FUNC(trident_vga_device::port_43c6_r),m_vga), write8_delegate(FUNC(trident_vga_device::port_43c6_w),m_vga)); + m_isa->install_device(0x83c4, 0x83cb, read8_delegate(FUNC(trident_vga_device::port_83c6_r),m_vga), write8_delegate(FUNC(trident_vga_device::port_83c6_w),m_vga)); - m_isa->install_memory(0xa0000, 0xbffff, 0, 0, read8_delegate(FUNC(trident_vga_device::mem_r),m_vga), write8_delegate(FUNC(trident_vga_device::mem_w),m_vga)); + m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(FUNC(trident_vga_device::mem_r),m_vga), write8_delegate(FUNC(trident_vga_device::mem_w),m_vga)); // uncomment to test Windows 3.1 TGUI9440AGi driver -// m_isa->install_memory(0x4400000, 0x45fffff, 0, 0, read8_delegate(FUNC(trident_vga_device::vram_r),m_vga), write8_delegate(FUNC(trident_vga_device::vram_w),m_vga)); +// m_isa->install_memory(0x4400000, 0x45fffff, read8_delegate(FUNC(trident_vga_device::vram_r),m_vga), write8_delegate(FUNC(trident_vga_device::vram_w),m_vga)); // win95 drivers -// m_isa->install_memory(0x4000000, 0x41fffff, 0, 0, read8_delegate(FUNC(trident_vga_device::vram_r),m_vga), write8_delegate(FUNC(trident_vga_device::vram_w),m_vga)); +// m_isa->install_memory(0x4000000, 0x41fffff, read8_delegate(FUNC(trident_vga_device::vram_r),m_vga), write8_delegate(FUNC(trident_vga_device::vram_w),m_vga)); // acceleration ports - m_isa->install_device(0x2120, 0x21ff, 0, 0, read8_delegate(FUNC(trident_vga_device::accel_r),m_vga), write8_delegate(FUNC(trident_vga_device::accel_w),m_vga)); + m_isa->install_device(0x2120, 0x21ff, read8_delegate(FUNC(trident_vga_device::accel_r),m_vga), write8_delegate(FUNC(trident_vga_device::accel_w),m_vga)); } //------------------------------------------------- diff --git a/src/devices/bus/isa/svga_tseng.cpp b/src/devices/bus/isa/svga_tseng.cpp index 6fff06c78ad..ab0a4e9b5f7 100644 --- a/src/devices/bus/isa/svga_tseng.cpp +++ b/src/devices/bus/isa/svga_tseng.cpp @@ -76,13 +76,13 @@ void isa8_svga_et4k_device::device_start() m_vga = subdevice<tseng_vga_device>("vga"); - m_isa->install_rom(this, 0xc0000, 0xc7fff, 0, 0, "et4000", "et4000"); + m_isa->install_rom(this, 0xc0000, 0xc7fff, "et4000", "et4000"); - m_isa->install_device(0x3b0, 0x3bf, 0, 0, read8_delegate(FUNC(tseng_vga_device::port_03b0_r),m_vga), write8_delegate(FUNC(tseng_vga_device::port_03b0_w),m_vga)); - m_isa->install_device(0x3c0, 0x3cf, 0, 0, read8_delegate(FUNC(tseng_vga_device::port_03c0_r),m_vga), write8_delegate(FUNC(tseng_vga_device::port_03c0_w),m_vga)); - m_isa->install_device(0x3d0, 0x3df, 0, 0, read8_delegate(FUNC(tseng_vga_device::port_03d0_r),m_vga), write8_delegate(FUNC(tseng_vga_device::port_03d0_w),m_vga)); + m_isa->install_device(0x3b0, 0x3bf, read8_delegate(FUNC(tseng_vga_device::port_03b0_r),m_vga), write8_delegate(FUNC(tseng_vga_device::port_03b0_w),m_vga)); + m_isa->install_device(0x3c0, 0x3cf, read8_delegate(FUNC(tseng_vga_device::port_03c0_r),m_vga), write8_delegate(FUNC(tseng_vga_device::port_03c0_w),m_vga)); + m_isa->install_device(0x3d0, 0x3df, read8_delegate(FUNC(tseng_vga_device::port_03d0_r),m_vga), write8_delegate(FUNC(tseng_vga_device::port_03d0_w),m_vga)); - m_isa->install_memory(0xa0000, 0xbffff, 0, 0, read8_delegate(FUNC(tseng_vga_device::mem_r),m_vga), write8_delegate(FUNC(tseng_vga_device::mem_w),m_vga)); + m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(FUNC(tseng_vga_device::mem_r),m_vga), write8_delegate(FUNC(tseng_vga_device::mem_w),m_vga)); } //------------------------------------------------- diff --git a/src/devices/bus/isa/vga.cpp b/src/devices/bus/isa/vga.cpp index 390834c8d5b..306f1254eeb 100644 --- a/src/devices/bus/isa/vga.cpp +++ b/src/devices/bus/isa/vga.cpp @@ -66,13 +66,13 @@ void isa8_vga_device::device_start() m_vga = subdevice<vga_device>("vga"); - m_isa->install_rom(this, 0xc0000, 0xc7fff, 0, 0, "ibm_vga", "ibm_vga"); + m_isa->install_rom(this, 0xc0000, 0xc7fff, "ibm_vga", "ibm_vga"); - m_isa->install_device(0x3b0, 0x3bf, 0, 0, read8_delegate(FUNC(vga_device::port_03b0_r),m_vga), write8_delegate(FUNC(vga_device::port_03b0_w),m_vga)); - m_isa->install_device(0x3c0, 0x3cf, 0, 0, read8_delegate(FUNC(vga_device::port_03c0_r),m_vga), write8_delegate(FUNC(vga_device::port_03c0_w),m_vga)); - m_isa->install_device(0x3d0, 0x3df, 0, 0, read8_delegate(FUNC(vga_device::port_03d0_r),m_vga), write8_delegate(FUNC(vga_device::port_03d0_w),m_vga)); + m_isa->install_device(0x3b0, 0x3bf, read8_delegate(FUNC(vga_device::port_03b0_r),m_vga), write8_delegate(FUNC(vga_device::port_03b0_w),m_vga)); + m_isa->install_device(0x3c0, 0x3cf, read8_delegate(FUNC(vga_device::port_03c0_r),m_vga), write8_delegate(FUNC(vga_device::port_03c0_w),m_vga)); + m_isa->install_device(0x3d0, 0x3df, read8_delegate(FUNC(vga_device::port_03d0_r),m_vga), write8_delegate(FUNC(vga_device::port_03d0_w),m_vga)); - m_isa->install_memory(0xa0000, 0xbffff, 0, 0, read8_delegate(FUNC(vga_device::mem_r),m_vga), write8_delegate(FUNC(vga_device::mem_w),m_vga)); + m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(FUNC(vga_device::mem_r),m_vga), write8_delegate(FUNC(vga_device::mem_w),m_vga)); } //------------------------------------------------- diff --git a/src/devices/bus/isa/vga_ati.cpp b/src/devices/bus/isa/vga_ati.cpp index 490a26dc90c..a0f1a7f2f72 100644 --- a/src/devices/bus/isa/vga_ati.cpp +++ b/src/devices/bus/isa/vga_ati.cpp @@ -178,50 +178,50 @@ void isa16_vga_gfxultra_device::device_start() m_vga = subdevice<ati_vga_device>("vga"); m_8514 = subdevice<mach8_device>("vga:8514a"); - m_isa->install_rom(this, 0xc0000, 0xc7fff, 0, 0, "vga", "gfxultra"); - - m_isa->install_device(0x1ce, 0x1cf, 0, 0, read8_delegate(FUNC(ati_vga_device::ati_port_ext_r),m_vga), write8_delegate(FUNC(ati_vga_device::ati_port_ext_w),m_vga)); - m_isa->install16_device(0x2e8, 0x2eb, 0, 0, read16_delegate(FUNC(mach8_device::ibm8514_status_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_htotal_w),m_8514)); - m_isa->install_device(0x3b0, 0x3bf, 0, 0, read8_delegate(FUNC(ati_vga_device::port_03b0_r),m_vga), write8_delegate(FUNC(vga_device::port_03b0_w),m_vga)); - m_isa->install_device(0x3c0, 0x3cf, 0, 0, read8_delegate(FUNC(ati_vga_device::port_03c0_r),m_vga), write8_delegate(FUNC(vga_device::port_03c0_w),m_vga)); - m_isa->install_device(0x3d0, 0x3df, 0, 0, read8_delegate(FUNC(ati_vga_device::port_03d0_r),m_vga), write8_delegate(FUNC(vga_device::port_03d0_w),m_vga)); - m_isa->install16_device(0x12e8, 0x12eb, 0, 0, read16_delegate(FUNC(mach8_device::ibm8514_vtotal_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_vtotal_w),m_8514)); - m_isa->install16_device(0x12ec, 0x12ef, 0, 0, read16_delegate(FUNC(mach8_device::mach8_config1_r),m_8514), write16_delegate()); - m_isa->install16_device(0x16e8, 0x16eb, 0, 0, read16_delegate(FUNC(mach8_device::ibm8514_vdisp_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_vdisp_w),m_8514)); - m_isa->install16_device(0x16ec, 0x16ef, 0, 0, read16_delegate(FUNC(mach8_device::mach8_config2_r),m_8514), write16_delegate()); - m_isa->install16_device(0x1ae8, 0x1aeb, 0, 0, read16_delegate(FUNC(mach8_device::ibm8514_vsync_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_vsync_w),m_8514)); - m_isa->install16_device(0x26e8, 0x26eb, 0, 0, read16_delegate(FUNC(mach8_device::ibm8514_htotal_r),m_8514),write16_delegate()); - m_isa->install16_device(0x2ee8, 0x2eeb, 0, 0, read16_delegate(FUNC(mach8_device::ibm8514_subcontrol_r),m_8514),write16_delegate()); - m_isa->install16_device(0x42e8, 0x42eb, 0, 0, read16_delegate(FUNC(mach8_device::ibm8514_substatus_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_subcontrol_w),m_8514)); - m_isa->install16_device(0x52e8, 0x52eb, 0, 0, read16_delegate(FUNC(mach8_device::mach8_ec0_r),m_8514), write16_delegate(FUNC(mach8_device::mach8_ec0_w),m_8514)); - m_isa->install16_device(0x52ec, 0x52ef, 0, 0, read16_delegate(FUNC(mach8_device::mach8_scratch0_r),m_8514), write16_delegate(FUNC(mach8_device::mach8_scratch0_w),m_8514)); - m_isa->install16_device(0x56e8, 0x56eb, 0, 0, read16_delegate(FUNC(mach8_device::mach8_ec1_r),m_8514), write16_delegate(FUNC(mach8_device::mach8_ec1_w),m_8514)); - m_isa->install16_device(0x56ec, 0x56ef, 0, 0, read16_delegate(FUNC(mach8_device::mach8_scratch0_r),m_8514), write16_delegate(FUNC(mach8_device::mach8_scratch0_w),m_8514)); - m_isa->install16_device(0x5ae8, 0x5aeb, 0, 0, read16_delegate(FUNC(mach8_device::mach8_ec2_r),m_8514), write16_delegate(FUNC(mach8_device::mach8_ec2_w),m_8514)); - m_isa->install16_device(0x5ee8, 0x5eeb, 0, 0, read16_delegate(FUNC(mach8_device::mach8_ec3_r),m_8514), write16_delegate(FUNC(mach8_device::mach8_ec3_w),m_8514)); - m_isa->install16_device(0x82e8, 0x82eb, 0, 0, read16_delegate(FUNC(mach8_device::ibm8514_currenty_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_currenty_w),m_8514)); - m_isa->install16_device(0x86e8, 0x86eb, 0, 0, read16_delegate(FUNC(mach8_device::ibm8514_currentx_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_currentx_w),m_8514)); - m_isa->install16_device(0x8ae8, 0x8aeb, 0, 0, read16_delegate(FUNC(mach8_device::ibm8514_desty_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_desty_w),m_8514)); - m_isa->install16_device(0x8ee8, 0x8eeb, 0, 0, read16_delegate(FUNC(mach8_device::ibm8514_destx_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_destx_w),m_8514)); - m_isa->install16_device(0x92e8, 0x92eb, 0, 0, read16_delegate(FUNC(mach8_device::ibm8514_line_error_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_line_error_w),m_8514)); - m_isa->install16_device(0x96e8, 0x96eb, 0, 0, read16_delegate(FUNC(mach8_device::ibm8514_width_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_width_w),m_8514)); - m_isa->install16_device(0x96ec, 0x96ef, 0, 0, read16_delegate(FUNC(mach8_device::mach8_bresenham_count_r),m_8514), write16_delegate(FUNC(mach8_device::mach8_bresenham_count_w),m_8514)); - m_isa->install16_device(0x9ae8, 0x9aeb, 0, 0, read16_delegate(FUNC(mach8_device::ibm8514_gpstatus_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_cmd_w),m_8514)); - m_isa->install16_device(0x9aec, 0x9aef, 0, 0, read16_delegate(FUNC(mach8_device::mach8_ext_fifo_r),m_8514), write16_delegate(FUNC(mach8_device::mach8_linedraw_index_w),m_8514)); - m_isa->install16_device(0x9ee8, 0x9eeb, 0, 0, read16_delegate(FUNC(mach8_device::ibm8514_ssv_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_ssv_w),m_8514)); - m_isa->install16_device(0xa2e8, 0xa2eb, 0, 0, read16_delegate(FUNC(mach8_device::ibm8514_bgcolour_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_bgcolour_w),m_8514)); - m_isa->install16_device(0xa6e8, 0xa6eb, 0, 0, read16_delegate(FUNC(mach8_device::ibm8514_fgcolour_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_fgcolour_w),m_8514)); - m_isa->install16_device(0xaae8, 0xaaeb, 0, 0, read16_delegate(FUNC(ibm8514a_device::ibm8514_write_mask_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_write_mask_w),m_8514)); - m_isa->install16_device(0xaee8, 0xaeeb, 0, 0, read16_delegate(FUNC(ibm8514a_device::ibm8514_read_mask_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_read_mask_w),m_8514)); - m_isa->install16_device(0xb6e8, 0xb6eb, 0, 0, read16_delegate(FUNC(mach8_device::ibm8514_backmix_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_backmix_w),m_8514)); - m_isa->install16_device(0xbae8, 0xbaeb, 0, 0, read16_delegate(FUNC(mach8_device::ibm8514_foremix_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_foremix_w),m_8514)); - m_isa->install16_device(0xbee8, 0xbeeb, 0, 0, read16_delegate(FUNC(mach8_device::ibm8514_multifunc_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_multifunc_w),m_8514)); - m_isa->install16_device(0xe2e8, 0xe2eb, 0, 0, read16_delegate(FUNC(mach8_device::ibm8514_pixel_xfer_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_pixel_xfer_w),m_8514)); - m_isa->install16_device(0xdaec, 0xdaef, 0, 0, read16_delegate(FUNC(mach8_device::mach8_sourcex_r),m_8514), write16_delegate(FUNC(mach8_device::mach8_ext_leftscissor_w),m_8514)); - m_isa->install16_device(0xdeec, 0xdeef, 0, 0, read16_delegate(FUNC(mach8_device::mach8_sourcey_r),m_8514), write16_delegate(FUNC(mach8_device::mach8_ext_topscissor_w),m_8514)); - m_isa->install16_device(0xfeec, 0xfeef, 0, 0, read16_delegate(FUNC(mach8_device::mach8_linedraw_r),m_8514), write16_delegate(FUNC(mach8_device::mach8_linedraw_w),m_8514)); - - m_isa->install_memory(0xa0000, 0xbffff, 0, 0, read8_delegate(FUNC(ati_vga_device::mem_r),m_vga), write8_delegate(FUNC(ati_vga_device::mem_w),m_vga)); + m_isa->install_rom(this, 0xc0000, 0xc7fff, "vga", "gfxultra"); + + m_isa->install_device(0x1ce, 0x1cf, read8_delegate(FUNC(ati_vga_device::ati_port_ext_r),m_vga), write8_delegate(FUNC(ati_vga_device::ati_port_ext_w),m_vga)); + m_isa->install16_device(0x2e8, 0x2eb, read16_delegate(FUNC(mach8_device::ibm8514_status_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_htotal_w),m_8514)); + m_isa->install_device(0x3b0, 0x3bf, read8_delegate(FUNC(ati_vga_device::port_03b0_r),m_vga), write8_delegate(FUNC(vga_device::port_03b0_w),m_vga)); + m_isa->install_device(0x3c0, 0x3cf, read8_delegate(FUNC(ati_vga_device::port_03c0_r),m_vga), write8_delegate(FUNC(vga_device::port_03c0_w),m_vga)); + m_isa->install_device(0x3d0, 0x3df, read8_delegate(FUNC(ati_vga_device::port_03d0_r),m_vga), write8_delegate(FUNC(vga_device::port_03d0_w),m_vga)); + m_isa->install16_device(0x12e8, 0x12eb, read16_delegate(FUNC(mach8_device::ibm8514_vtotal_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_vtotal_w),m_8514)); + m_isa->install16_device(0x12ec, 0x12ef, read16_delegate(FUNC(mach8_device::mach8_config1_r),m_8514), write16_delegate()); + m_isa->install16_device(0x16e8, 0x16eb, read16_delegate(FUNC(mach8_device::ibm8514_vdisp_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_vdisp_w),m_8514)); + m_isa->install16_device(0x16ec, 0x16ef, read16_delegate(FUNC(mach8_device::mach8_config2_r),m_8514), write16_delegate()); + m_isa->install16_device(0x1ae8, 0x1aeb, read16_delegate(FUNC(mach8_device::ibm8514_vsync_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_vsync_w),m_8514)); + m_isa->install16_device(0x26e8, 0x26eb, read16_delegate(FUNC(mach8_device::ibm8514_htotal_r),m_8514),write16_delegate()); + m_isa->install16_device(0x2ee8, 0x2eeb, read16_delegate(FUNC(mach8_device::ibm8514_subcontrol_r),m_8514),write16_delegate()); + m_isa->install16_device(0x42e8, 0x42eb, read16_delegate(FUNC(mach8_device::ibm8514_substatus_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_subcontrol_w),m_8514)); + m_isa->install16_device(0x52e8, 0x52eb, read16_delegate(FUNC(mach8_device::mach8_ec0_r),m_8514), write16_delegate(FUNC(mach8_device::mach8_ec0_w),m_8514)); + m_isa->install16_device(0x52ec, 0x52ef, read16_delegate(FUNC(mach8_device::mach8_scratch0_r),m_8514), write16_delegate(FUNC(mach8_device::mach8_scratch0_w),m_8514)); + m_isa->install16_device(0x56e8, 0x56eb, read16_delegate(FUNC(mach8_device::mach8_ec1_r),m_8514), write16_delegate(FUNC(mach8_device::mach8_ec1_w),m_8514)); + m_isa->install16_device(0x56ec, 0x56ef, read16_delegate(FUNC(mach8_device::mach8_scratch0_r),m_8514), write16_delegate(FUNC(mach8_device::mach8_scratch0_w),m_8514)); + m_isa->install16_device(0x5ae8, 0x5aeb, read16_delegate(FUNC(mach8_device::mach8_ec2_r),m_8514), write16_delegate(FUNC(mach8_device::mach8_ec2_w),m_8514)); + m_isa->install16_device(0x5ee8, 0x5eeb, read16_delegate(FUNC(mach8_device::mach8_ec3_r),m_8514), write16_delegate(FUNC(mach8_device::mach8_ec3_w),m_8514)); + m_isa->install16_device(0x82e8, 0x82eb, read16_delegate(FUNC(mach8_device::ibm8514_currenty_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_currenty_w),m_8514)); + m_isa->install16_device(0x86e8, 0x86eb, read16_delegate(FUNC(mach8_device::ibm8514_currentx_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_currentx_w),m_8514)); + m_isa->install16_device(0x8ae8, 0x8aeb, read16_delegate(FUNC(mach8_device::ibm8514_desty_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_desty_w),m_8514)); + m_isa->install16_device(0x8ee8, 0x8eeb, read16_delegate(FUNC(mach8_device::ibm8514_destx_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_destx_w),m_8514)); + m_isa->install16_device(0x92e8, 0x92eb, read16_delegate(FUNC(mach8_device::ibm8514_line_error_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_line_error_w),m_8514)); + m_isa->install16_device(0x96e8, 0x96eb, read16_delegate(FUNC(mach8_device::ibm8514_width_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_width_w),m_8514)); + m_isa->install16_device(0x96ec, 0x96ef, read16_delegate(FUNC(mach8_device::mach8_bresenham_count_r),m_8514), write16_delegate(FUNC(mach8_device::mach8_bresenham_count_w),m_8514)); + m_isa->install16_device(0x9ae8, 0x9aeb, read16_delegate(FUNC(mach8_device::ibm8514_gpstatus_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_cmd_w),m_8514)); + m_isa->install16_device(0x9aec, 0x9aef, read16_delegate(FUNC(mach8_device::mach8_ext_fifo_r),m_8514), write16_delegate(FUNC(mach8_device::mach8_linedraw_index_w),m_8514)); + m_isa->install16_device(0x9ee8, 0x9eeb, read16_delegate(FUNC(mach8_device::ibm8514_ssv_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_ssv_w),m_8514)); + m_isa->install16_device(0xa2e8, 0xa2eb, read16_delegate(FUNC(mach8_device::ibm8514_bgcolour_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_bgcolour_w),m_8514)); + m_isa->install16_device(0xa6e8, 0xa6eb, read16_delegate(FUNC(mach8_device::ibm8514_fgcolour_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_fgcolour_w),m_8514)); + m_isa->install16_device(0xaae8, 0xaaeb, read16_delegate(FUNC(ibm8514a_device::ibm8514_write_mask_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_write_mask_w),m_8514)); + m_isa->install16_device(0xaee8, 0xaeeb, read16_delegate(FUNC(ibm8514a_device::ibm8514_read_mask_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_read_mask_w),m_8514)); + m_isa->install16_device(0xb6e8, 0xb6eb, read16_delegate(FUNC(mach8_device::ibm8514_backmix_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_backmix_w),m_8514)); + m_isa->install16_device(0xbae8, 0xbaeb, read16_delegate(FUNC(mach8_device::ibm8514_foremix_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_foremix_w),m_8514)); + m_isa->install16_device(0xbee8, 0xbeeb, read16_delegate(FUNC(mach8_device::ibm8514_multifunc_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_multifunc_w),m_8514)); + m_isa->install16_device(0xe2e8, 0xe2eb, read16_delegate(FUNC(mach8_device::ibm8514_pixel_xfer_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_pixel_xfer_w),m_8514)); + m_isa->install16_device(0xdaec, 0xdaef, read16_delegate(FUNC(mach8_device::mach8_sourcex_r),m_8514), write16_delegate(FUNC(mach8_device::mach8_ext_leftscissor_w),m_8514)); + m_isa->install16_device(0xdeec, 0xdeef, read16_delegate(FUNC(mach8_device::mach8_sourcey_r),m_8514), write16_delegate(FUNC(mach8_device::mach8_ext_topscissor_w),m_8514)); + m_isa->install16_device(0xfeec, 0xfeef, read16_delegate(FUNC(mach8_device::mach8_linedraw_r),m_8514), write16_delegate(FUNC(mach8_device::mach8_linedraw_w),m_8514)); + + m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(FUNC(ati_vga_device::mem_r),m_vga), write8_delegate(FUNC(ati_vga_device::mem_w),m_vga)); } void isa16_vga_gfxultrapro_device::device_start() @@ -230,53 +230,53 @@ void isa16_vga_gfxultrapro_device::device_start() m_vga = subdevice<mach32_device>("vga"); - m_isa->install_rom(this, 0xc0000, 0xc7fff, 0, 0, "vga", "gfxultrapro"); - - m_isa->install_device(0x1ce, 0x1cf, 0, 0, read8_delegate(FUNC(mach32_device::ati_port_ext_r),m_vga), write8_delegate(FUNC(mach32_device::ati_port_ext_w),m_vga)); - m_isa->install16_device(0x2e8, 0x2eb, 0, 0, read16_delegate(FUNC(mach32_device::mach32_status_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_htotal_w),m_vga)); - m_isa->install_device(0x3b0, 0x3bf, 0, 0, read8_delegate(FUNC(mach32_device::port_03b0_r),m_vga), write8_delegate(FUNC(mach32_device::port_03b0_w),m_vga)); - m_isa->install_device(0x3c0, 0x3cf, 0, 0, read8_delegate(FUNC(mach32_device::port_03c0_r),m_vga), write8_delegate(FUNC(mach32_device::port_03c0_w),m_vga)); - m_isa->install_device(0x3d0, 0x3df, 0, 0, read8_delegate(FUNC(mach32_device::port_03d0_r),m_vga), write8_delegate(FUNC(mach32_device::port_03d0_w),m_vga)); - m_isa->install16_device(0x12e8, 0x12eb, 0, 0, read16_delegate(FUNC(mach32_device::ibm8514_vtotal_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_vtotal_w),m_vga)); - m_isa->install16_device(0x12ec, 0x12ef, 0, 0, read16_delegate(FUNC(mach32_device::mach8_config1_r),m_vga), write16_delegate()); - m_isa->install16_device(0x16e8, 0x16eb, 0, 0, read16_delegate(FUNC(mach32_device::ibm8514_vdisp_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_vdisp_w),m_vga)); - m_isa->install16_device(0x16ec, 0x16ef, 0, 0, read16_delegate(FUNC(mach32_device::mach8_config2_r),m_vga), write16_delegate()); - m_isa->install16_device(0x1ae8, 0x1aeb, 0, 0, read16_delegate(FUNC(mach32_device::ibm8514_vsync_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_vsync_w),m_vga)); - m_isa->install16_device(0x26e8, 0x26eb, 0, 0, read16_delegate(FUNC(mach32_device::ibm8514_htotal_r),m_vga),write16_delegate()); - m_isa->install16_device(0x2ee8, 0x2eeb, 0, 0, read16_delegate(FUNC(mach32_device::ibm8514_subcontrol_r),m_vga),write16_delegate()); - m_isa->install16_device(0x42e8, 0x42eb, 0, 0, read16_delegate(FUNC(mach32_device::ibm8514_substatus_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_subcontrol_w),m_vga)); - m_isa->install16_device(0x42ec, 0x42ef, 0, 0, read16_delegate(FUNC(mach32_device::mach32_mem_boundary_r),m_vga), write16_delegate(FUNC(mach32_device::mach32_mem_boundary_w),m_vga)); - m_isa->install16_device(0x4aec, 0x4aef, 0, 0, read16_delegate(FUNC(mach32_device::mach8_clksel_r),m_vga), write16_delegate(FUNC(mach32_device::mach32_clksel_w),m_vga)); - m_isa->install16_device(0x52e8, 0x52eb, 0, 0, read16_delegate(FUNC(mach32_device::mach8_ec0_r),m_vga), write16_delegate(FUNC(mach32_device::mach8_ec0_w),m_vga)); - m_isa->install16_device(0x52ec, 0x52ef, 0, 0, read16_delegate(FUNC(mach32_device::mach8_scratch0_r),m_vga), write16_delegate(FUNC(mach32_device::mach8_scratch0_w),m_vga)); - m_isa->install16_device(0x56e8, 0x56eb, 0, 0, read16_delegate(FUNC(mach32_device::mach8_ec1_r),m_vga), write16_delegate(FUNC(mach32_device::mach8_ec1_w),m_vga)); - m_isa->install16_device(0x56ec, 0x56ef, 0, 0, read16_delegate(FUNC(mach32_device::mach8_scratch0_r),m_vga), write16_delegate(FUNC(mach32_device::mach8_scratch0_w),m_vga)); - m_isa->install16_device(0x5ae8, 0x5aeb, 0, 0, read16_delegate(FUNC(mach32_device::mach8_ec2_r),m_vga), write16_delegate(FUNC(mach32_device::mach8_ec2_w),m_vga)); - m_isa->install16_device(0x5ee8, 0x5eeb, 0, 0, read16_delegate(FUNC(mach32_device::mach8_ec3_r),m_vga), write16_delegate(FUNC(mach32_device::mach8_ec3_w),m_vga)); - m_isa->install16_device(0x82e8, 0x82eb, 0, 0, read16_delegate(FUNC(mach32_device::ibm8514_currenty_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_currenty_w),m_vga)); - m_isa->install16_device(0x86e8, 0x86eb, 0, 0, read16_delegate(FUNC(mach32_device::ibm8514_currentx_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_currentx_w),m_vga)); - m_isa->install16_device(0x8ae8, 0x8aeb, 0, 0, read16_delegate(FUNC(mach32_device::ibm8514_desty_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_desty_w),m_vga)); - m_isa->install16_device(0x8ee8, 0x8eeb, 0, 0, read16_delegate(FUNC(mach32_device::ibm8514_destx_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_destx_w),m_vga)); - m_isa->install16_device(0x92e8, 0x92eb, 0, 0, read16_delegate(FUNC(mach32_device::ibm8514_line_error_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_line_error_w),m_vga)); - m_isa->install16_device(0x96e8, 0x96eb, 0, 0, read16_delegate(FUNC(mach32_device::ibm8514_width_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_width_w),m_vga)); - m_isa->install16_device(0x96ec, 0x96ef, 0, 0, read16_delegate(FUNC(mach32_device::mach8_bresenham_count_r),m_vga), write16_delegate(FUNC(mach32_device::mach8_bresenham_count_w),m_vga)); - m_isa->install16_device(0x9ae8, 0x9aeb, 0, 0, read16_delegate(FUNC(mach32_device::ibm8514_gpstatus_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_cmd_w),m_vga)); - m_isa->install16_device(0x9aec, 0x9aef, 0, 0, read16_delegate(FUNC(mach32_device::mach8_ext_fifo_r),m_vga), write16_delegate(FUNC(mach32_device::mach8_linedraw_index_w),m_vga)); - m_isa->install16_device(0x9ee8, 0x9eeb, 0, 0, read16_delegate(FUNC(mach32_device::ibm8514_ssv_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_ssv_w),m_vga)); - m_isa->install16_device(0xa2e8, 0xa2eb, 0, 0, read16_delegate(FUNC(mach32_device::ibm8514_bgcolour_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_bgcolour_w),m_vga)); - m_isa->install16_device(0xa6e8, 0xa6eb, 0, 0, read16_delegate(FUNC(mach32_device::ibm8514_fgcolour_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_fgcolour_w),m_vga)); - m_isa->install16_device(0xaae8, 0xaaeb, 0, 0, read16_delegate(FUNC(mach32_device::ibm8514_write_mask_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_write_mask_w),m_vga)); - m_isa->install16_device(0xaee8, 0xaeeb, 0, 0, read16_delegate(FUNC(mach32_device::ibm8514_read_mask_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_read_mask_w),m_vga)); - m_isa->install16_device(0xb6e8, 0xb6eb, 0, 0, read16_delegate(FUNC(mach32_device::ibm8514_backmix_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_backmix_w),m_vga)); - m_isa->install16_device(0xbae8, 0xbaeb, 0, 0, read16_delegate(FUNC(mach32_device::ibm8514_foremix_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_foremix_w),m_vga)); - m_isa->install16_device(0xbee8, 0xbeeb, 0, 0, read16_delegate(FUNC(mach32_device::ibm8514_multifunc_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_multifunc_w),m_vga)); - m_isa->install16_device(0xe2e8, 0xe2eb, 0, 0, read16_delegate(FUNC(mach32_device::ibm8514_pixel_xfer_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_pixel_xfer_w),m_vga)); - m_isa->install16_device(0xdaec, 0xdaef, 0, 0, read16_delegate(FUNC(mach32_device::mach8_sourcex_r),m_vga), write16_delegate(FUNC(mach32_device::mach8_ext_leftscissor_w),m_vga)); - m_isa->install16_device(0xdeec, 0xdeef, 0, 0, read16_delegate(FUNC(mach32_device::mach8_sourcey_r),m_vga), write16_delegate(FUNC(mach32_device::mach8_ext_topscissor_w),m_vga)); - m_isa->install16_device(0xfaec, 0xfaef, 0, 0, read16_delegate(FUNC(mach32_device::mach32_chipid_r),m_vga), write16_delegate()); - m_isa->install16_device(0xfeec, 0xfeef, 0, 0, read16_delegate(FUNC(mach32_device::mach8_linedraw_r),m_vga), write16_delegate(FUNC(mach32_device::mach8_linedraw_w),m_vga)); - - m_isa->install_memory(0xa0000, 0xbffff, 0, 0, read8_delegate(FUNC(mach32_device::mem_r),m_vga), write8_delegate(FUNC(mach32_device::mem_w),m_vga)); + m_isa->install_rom(this, 0xc0000, 0xc7fff, "vga", "gfxultrapro"); + + m_isa->install_device(0x1ce, 0x1cf, read8_delegate(FUNC(mach32_device::ati_port_ext_r),m_vga), write8_delegate(FUNC(mach32_device::ati_port_ext_w),m_vga)); + m_isa->install16_device(0x2e8, 0x2eb, read16_delegate(FUNC(mach32_device::mach32_status_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_htotal_w),m_vga)); + m_isa->install_device(0x3b0, 0x3bf, read8_delegate(FUNC(mach32_device::port_03b0_r),m_vga), write8_delegate(FUNC(mach32_device::port_03b0_w),m_vga)); + m_isa->install_device(0x3c0, 0x3cf, read8_delegate(FUNC(mach32_device::port_03c0_r),m_vga), write8_delegate(FUNC(mach32_device::port_03c0_w),m_vga)); + m_isa->install_device(0x3d0, 0x3df, read8_delegate(FUNC(mach32_device::port_03d0_r),m_vga), write8_delegate(FUNC(mach32_device::port_03d0_w),m_vga)); + m_isa->install16_device(0x12e8, 0x12eb, read16_delegate(FUNC(mach32_device::ibm8514_vtotal_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_vtotal_w),m_vga)); + m_isa->install16_device(0x12ec, 0x12ef, read16_delegate(FUNC(mach32_device::mach8_config1_r),m_vga), write16_delegate()); + m_isa->install16_device(0x16e8, 0x16eb, read16_delegate(FUNC(mach32_device::ibm8514_vdisp_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_vdisp_w),m_vga)); + m_isa->install16_device(0x16ec, 0x16ef, read16_delegate(FUNC(mach32_device::mach8_config2_r),m_vga), write16_delegate()); + m_isa->install16_device(0x1ae8, 0x1aeb, read16_delegate(FUNC(mach32_device::ibm8514_vsync_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_vsync_w),m_vga)); + m_isa->install16_device(0x26e8, 0x26eb, read16_delegate(FUNC(mach32_device::ibm8514_htotal_r),m_vga),write16_delegate()); + m_isa->install16_device(0x2ee8, 0x2eeb, read16_delegate(FUNC(mach32_device::ibm8514_subcontrol_r),m_vga),write16_delegate()); + m_isa->install16_device(0x42e8, 0x42eb, read16_delegate(FUNC(mach32_device::ibm8514_substatus_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_subcontrol_w),m_vga)); + m_isa->install16_device(0x42ec, 0x42ef, read16_delegate(FUNC(mach32_device::mach32_mem_boundary_r),m_vga), write16_delegate(FUNC(mach32_device::mach32_mem_boundary_w),m_vga)); + m_isa->install16_device(0x4aec, 0x4aef, read16_delegate(FUNC(mach32_device::mach8_clksel_r),m_vga), write16_delegate(FUNC(mach32_device::mach32_clksel_w),m_vga)); + m_isa->install16_device(0x52e8, 0x52eb, read16_delegate(FUNC(mach32_device::mach8_ec0_r),m_vga), write16_delegate(FUNC(mach32_device::mach8_ec0_w),m_vga)); + m_isa->install16_device(0x52ec, 0x52ef, read16_delegate(FUNC(mach32_device::mach8_scratch0_r),m_vga), write16_delegate(FUNC(mach32_device::mach8_scratch0_w),m_vga)); + m_isa->install16_device(0x56e8, 0x56eb, read16_delegate(FUNC(mach32_device::mach8_ec1_r),m_vga), write16_delegate(FUNC(mach32_device::mach8_ec1_w),m_vga)); + m_isa->install16_device(0x56ec, 0x56ef, read16_delegate(FUNC(mach32_device::mach8_scratch0_r),m_vga), write16_delegate(FUNC(mach32_device::mach8_scratch0_w),m_vga)); + m_isa->install16_device(0x5ae8, 0x5aeb, read16_delegate(FUNC(mach32_device::mach8_ec2_r),m_vga), write16_delegate(FUNC(mach32_device::mach8_ec2_w),m_vga)); + m_isa->install16_device(0x5ee8, 0x5eeb, read16_delegate(FUNC(mach32_device::mach8_ec3_r),m_vga), write16_delegate(FUNC(mach32_device::mach8_ec3_w),m_vga)); + m_isa->install16_device(0x82e8, 0x82eb, read16_delegate(FUNC(mach32_device::ibm8514_currenty_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_currenty_w),m_vga)); + m_isa->install16_device(0x86e8, 0x86eb, read16_delegate(FUNC(mach32_device::ibm8514_currentx_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_currentx_w),m_vga)); + m_isa->install16_device(0x8ae8, 0x8aeb, read16_delegate(FUNC(mach32_device::ibm8514_desty_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_desty_w),m_vga)); + m_isa->install16_device(0x8ee8, 0x8eeb, read16_delegate(FUNC(mach32_device::ibm8514_destx_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_destx_w),m_vga)); + m_isa->install16_device(0x92e8, 0x92eb, read16_delegate(FUNC(mach32_device::ibm8514_line_error_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_line_error_w),m_vga)); + m_isa->install16_device(0x96e8, 0x96eb, read16_delegate(FUNC(mach32_device::ibm8514_width_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_width_w),m_vga)); + m_isa->install16_device(0x96ec, 0x96ef, read16_delegate(FUNC(mach32_device::mach8_bresenham_count_r),m_vga), write16_delegate(FUNC(mach32_device::mach8_bresenham_count_w),m_vga)); + m_isa->install16_device(0x9ae8, 0x9aeb, read16_delegate(FUNC(mach32_device::ibm8514_gpstatus_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_cmd_w),m_vga)); + m_isa->install16_device(0x9aec, 0x9aef, read16_delegate(FUNC(mach32_device::mach8_ext_fifo_r),m_vga), write16_delegate(FUNC(mach32_device::mach8_linedraw_index_w),m_vga)); + m_isa->install16_device(0x9ee8, 0x9eeb, read16_delegate(FUNC(mach32_device::ibm8514_ssv_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_ssv_w),m_vga)); + m_isa->install16_device(0xa2e8, 0xa2eb, read16_delegate(FUNC(mach32_device::ibm8514_bgcolour_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_bgcolour_w),m_vga)); + m_isa->install16_device(0xa6e8, 0xa6eb, read16_delegate(FUNC(mach32_device::ibm8514_fgcolour_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_fgcolour_w),m_vga)); + m_isa->install16_device(0xaae8, 0xaaeb, read16_delegate(FUNC(mach32_device::ibm8514_write_mask_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_write_mask_w),m_vga)); + m_isa->install16_device(0xaee8, 0xaeeb, read16_delegate(FUNC(mach32_device::ibm8514_read_mask_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_read_mask_w),m_vga)); + m_isa->install16_device(0xb6e8, 0xb6eb, read16_delegate(FUNC(mach32_device::ibm8514_backmix_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_backmix_w),m_vga)); + m_isa->install16_device(0xbae8, 0xbaeb, read16_delegate(FUNC(mach32_device::ibm8514_foremix_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_foremix_w),m_vga)); + m_isa->install16_device(0xbee8, 0xbeeb, read16_delegate(FUNC(mach32_device::ibm8514_multifunc_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_multifunc_w),m_vga)); + m_isa->install16_device(0xe2e8, 0xe2eb, read16_delegate(FUNC(mach32_device::ibm8514_pixel_xfer_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_pixel_xfer_w),m_vga)); + m_isa->install16_device(0xdaec, 0xdaef, read16_delegate(FUNC(mach32_device::mach8_sourcex_r),m_vga), write16_delegate(FUNC(mach32_device::mach8_ext_leftscissor_w),m_vga)); + m_isa->install16_device(0xdeec, 0xdeef, read16_delegate(FUNC(mach32_device::mach8_sourcey_r),m_vga), write16_delegate(FUNC(mach32_device::mach8_ext_topscissor_w),m_vga)); + m_isa->install16_device(0xfaec, 0xfaef, read16_delegate(FUNC(mach32_device::mach32_chipid_r),m_vga), write16_delegate()); + m_isa->install16_device(0xfeec, 0xfeef, read16_delegate(FUNC(mach32_device::mach8_linedraw_r),m_vga), write16_delegate(FUNC(mach32_device::mach8_linedraw_w),m_vga)); + + m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(FUNC(mach32_device::mem_r),m_vga), write8_delegate(FUNC(mach32_device::mem_w),m_vga)); } void isa16_vga_mach64_device::device_start() @@ -285,53 +285,53 @@ void isa16_vga_mach64_device::device_start() m_vga = subdevice<mach64_device>("vga"); - m_isa->install_rom(this, 0xc0000, 0xc7fff, 0, 0, "vga", "mach64"); - - m_isa->install_device(0x1ce, 0x1cf, 0, 0, read8_delegate(FUNC(mach64_device::ati_port_ext_r),m_vga), write8_delegate(FUNC(mach64_device::ati_port_ext_w),m_vga)); - m_isa->install16_device(0x2e8, 0x2eb, 0, 0, read16_delegate(FUNC(mach64_device::mach32_status_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_htotal_w),m_vga)); - m_isa->install_device(0x3b0, 0x3bf, 0, 0, read8_delegate(FUNC(mach64_device::port_03b0_r),m_vga), write8_delegate(FUNC(mach64_device::port_03b0_w),m_vga)); - m_isa->install_device(0x3c0, 0x3cf, 0, 0, read8_delegate(FUNC(mach64_device::port_03c0_r),m_vga), write8_delegate(FUNC(mach64_device::port_03c0_w),m_vga)); - m_isa->install_device(0x3d0, 0x3df, 0, 0, read8_delegate(FUNC(mach64_device::port_03d0_r),m_vga), write8_delegate(FUNC(mach64_device::port_03d0_w),m_vga)); - m_isa->install16_device(0x12e8, 0x12eb, 0, 0, read16_delegate(FUNC(mach64_device::ibm8514_vtotal_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_vtotal_w),m_vga)); - m_isa->install16_device(0x12ec, 0x12ef, 0, 0, read16_delegate(FUNC(mach64_device::mach8_config1_r),m_vga), write16_delegate(FUNC(mach64_device::mach64_config1_w),m_vga)); - m_isa->install16_device(0x16e8, 0x16eb, 0, 0, read16_delegate(FUNC(mach64_device::ibm8514_vdisp_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_vdisp_w),m_vga)); - m_isa->install16_device(0x16ec, 0x16ef, 0, 0, read16_delegate(FUNC(mach64_device::mach8_config2_r),m_vga), write16_delegate(FUNC(mach64_device::mach64_config2_w),m_vga)); - m_isa->install16_device(0x1ae8, 0x1aeb, 0, 0, read16_delegate(FUNC(mach64_device::ibm8514_vsync_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_vsync_w),m_vga)); - m_isa->install16_device(0x26e8, 0x26eb, 0, 0, read16_delegate(FUNC(mach64_device::ibm8514_htotal_r),m_vga),write16_delegate()); - m_isa->install16_device(0x2ee8, 0x2eeb, 0, 0, read16_delegate(FUNC(mach64_device::ibm8514_subcontrol_r),m_vga),write16_delegate()); - m_isa->install16_device(0x42e8, 0x42eb, 0, 0, read16_delegate(FUNC(mach64_device::ibm8514_substatus_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_subcontrol_w),m_vga)); - m_isa->install16_device(0x42ec, 0x42ef, 0, 0, read16_delegate(FUNC(mach64_device::mach32_mem_boundary_r),m_vga), write16_delegate(FUNC(mach64_device::mach32_mem_boundary_w),m_vga)); - m_isa->install16_device(0x4aec, 0x4aef, 0, 0, read16_delegate(FUNC(mach64_device::mach8_clksel_r),m_vga), write16_delegate(FUNC(mach64_device::mach32_clksel_w),m_vga)); - m_isa->install16_device(0x52e8, 0x52eb, 0, 0, read16_delegate(FUNC(mach64_device::mach8_ec0_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_ec0_w),m_vga)); - m_isa->install16_device(0x52ec, 0x52ef, 0, 0, read16_delegate(FUNC(mach64_device::mach8_scratch0_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_scratch0_w),m_vga)); - m_isa->install16_device(0x56e8, 0x56eb, 0, 0, read16_delegate(FUNC(mach64_device::mach8_ec1_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_ec1_w),m_vga)); - m_isa->install16_device(0x56ec, 0x56ef, 0, 0, read16_delegate(FUNC(mach64_device::mach8_scratch0_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_scratch0_w),m_vga)); - m_isa->install16_device(0x5ae8, 0x5aeb, 0, 0, read16_delegate(FUNC(mach64_device::mach8_ec2_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_ec2_w),m_vga)); - m_isa->install16_device(0x5ee8, 0x5eeb, 0, 0, read16_delegate(FUNC(mach64_device::mach8_ec3_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_ec3_w),m_vga)); - m_isa->install16_device(0x82e8, 0x82eb, 0, 0, read16_delegate(FUNC(mach64_device::ibm8514_currenty_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_currenty_w),m_vga)); - m_isa->install16_device(0x86e8, 0x86eb, 0, 0, read16_delegate(FUNC(mach64_device::ibm8514_currentx_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_currentx_w),m_vga)); - m_isa->install16_device(0x8ae8, 0x8aeb, 0, 0, read16_delegate(FUNC(mach64_device::ibm8514_desty_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_desty_w),m_vga)); - m_isa->install16_device(0x8ee8, 0x8eeb, 0, 0, read16_delegate(FUNC(mach64_device::ibm8514_destx_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_destx_w),m_vga)); - m_isa->install16_device(0x92e8, 0x92eb, 0, 0, read16_delegate(FUNC(mach64_device::ibm8514_line_error_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_line_error_w),m_vga)); - m_isa->install16_device(0x96e8, 0x96eb, 0, 0, read16_delegate(FUNC(mach64_device::ibm8514_width_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_width_w),m_vga)); - m_isa->install16_device(0x96ec, 0x96ef, 0, 0, read16_delegate(FUNC(mach64_device::mach8_bresenham_count_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_bresenham_count_w),m_vga)); - m_isa->install16_device(0x9ae8, 0x9aeb, 0, 0, read16_delegate(FUNC(mach64_device::ibm8514_gpstatus_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_cmd_w),m_vga)); - m_isa->install16_device(0x9aec, 0x9aef, 0, 0, read16_delegate(FUNC(mach64_device::mach8_ext_fifo_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_linedraw_index_w),m_vga)); - m_isa->install16_device(0x9ee8, 0x9eeb, 0, 0, read16_delegate(FUNC(mach64_device::ibm8514_ssv_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_ssv_w),m_vga)); - m_isa->install16_device(0xa2e8, 0xa2eb, 0, 0, read16_delegate(FUNC(mach64_device::ibm8514_bgcolour_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_bgcolour_w),m_vga)); - m_isa->install16_device(0xa6e8, 0xa6eb, 0, 0, read16_delegate(FUNC(mach64_device::ibm8514_fgcolour_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_fgcolour_w),m_vga)); - m_isa->install16_device(0xaae8, 0xaaeb, 0, 0, read16_delegate(FUNC(mach64_device::ibm8514_write_mask_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_write_mask_w),m_vga)); - m_isa->install16_device(0xaee8, 0xaeeb, 0, 0, read16_delegate(FUNC(mach64_device::ibm8514_read_mask_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_read_mask_w),m_vga)); - m_isa->install16_device(0xb6e8, 0xb6eb, 0, 0, read16_delegate(FUNC(mach64_device::ibm8514_backmix_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_backmix_w),m_vga)); - m_isa->install16_device(0xbae8, 0xbaeb, 0, 0, read16_delegate(FUNC(mach64_device::ibm8514_foremix_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_foremix_w),m_vga)); - m_isa->install16_device(0xbee8, 0xbeeb, 0, 0, read16_delegate(FUNC(mach64_device::ibm8514_multifunc_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_multifunc_w),m_vga)); - m_isa->install16_device(0xe2e8, 0xe2eb, 0, 0, read16_delegate(FUNC(mach64_device::ibm8514_pixel_xfer_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_pixel_xfer_w),m_vga)); - m_isa->install16_device(0xdaec, 0xdaef, 0, 0, read16_delegate(FUNC(mach64_device::mach8_sourcex_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_ext_leftscissor_w),m_vga)); - m_isa->install16_device(0xdeec, 0xdeef, 0, 0, read16_delegate(FUNC(mach64_device::mach8_sourcey_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_ext_topscissor_w),m_vga)); - m_isa->install16_device(0xfaec, 0xfaef, 0, 0, read16_delegate(FUNC(mach64_device::mach32_chipid_r),m_vga), write16_delegate()); - m_isa->install16_device(0xfeec, 0xfeef, 0, 0, read16_delegate(FUNC(mach64_device::mach8_linedraw_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_linedraw_w),m_vga)); - - m_isa->install_memory(0xa0000, 0xbffff, 0, 0, read8_delegate(FUNC(mach64_device::mem_r),m_vga), write8_delegate(FUNC(mach64_device::mem_w),m_vga)); + m_isa->install_rom(this, 0xc0000, 0xc7fff, "vga", "mach64"); + + m_isa->install_device(0x1ce, 0x1cf, read8_delegate(FUNC(mach64_device::ati_port_ext_r),m_vga), write8_delegate(FUNC(mach64_device::ati_port_ext_w),m_vga)); + m_isa->install16_device(0x2e8, 0x2eb, read16_delegate(FUNC(mach64_device::mach32_status_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_htotal_w),m_vga)); + m_isa->install_device(0x3b0, 0x3bf, read8_delegate(FUNC(mach64_device::port_03b0_r),m_vga), write8_delegate(FUNC(mach64_device::port_03b0_w),m_vga)); + m_isa->install_device(0x3c0, 0x3cf, read8_delegate(FUNC(mach64_device::port_03c0_r),m_vga), write8_delegate(FUNC(mach64_device::port_03c0_w),m_vga)); + m_isa->install_device(0x3d0, 0x3df, read8_delegate(FUNC(mach64_device::port_03d0_r),m_vga), write8_delegate(FUNC(mach64_device::port_03d0_w),m_vga)); + m_isa->install16_device(0x12e8, 0x12eb, read16_delegate(FUNC(mach64_device::ibm8514_vtotal_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_vtotal_w),m_vga)); + m_isa->install16_device(0x12ec, 0x12ef, read16_delegate(FUNC(mach64_device::mach8_config1_r),m_vga), write16_delegate(FUNC(mach64_device::mach64_config1_w),m_vga)); + m_isa->install16_device(0x16e8, 0x16eb, read16_delegate(FUNC(mach64_device::ibm8514_vdisp_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_vdisp_w),m_vga)); + m_isa->install16_device(0x16ec, 0x16ef, read16_delegate(FUNC(mach64_device::mach8_config2_r),m_vga), write16_delegate(FUNC(mach64_device::mach64_config2_w),m_vga)); + m_isa->install16_device(0x1ae8, 0x1aeb, read16_delegate(FUNC(mach64_device::ibm8514_vsync_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_vsync_w),m_vga)); + m_isa->install16_device(0x26e8, 0x26eb, read16_delegate(FUNC(mach64_device::ibm8514_htotal_r),m_vga),write16_delegate()); + m_isa->install16_device(0x2ee8, 0x2eeb, read16_delegate(FUNC(mach64_device::ibm8514_subcontrol_r),m_vga),write16_delegate()); + m_isa->install16_device(0x42e8, 0x42eb, read16_delegate(FUNC(mach64_device::ibm8514_substatus_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_subcontrol_w),m_vga)); + m_isa->install16_device(0x42ec, 0x42ef, read16_delegate(FUNC(mach64_device::mach32_mem_boundary_r),m_vga), write16_delegate(FUNC(mach64_device::mach32_mem_boundary_w),m_vga)); + m_isa->install16_device(0x4aec, 0x4aef, read16_delegate(FUNC(mach64_device::mach8_clksel_r),m_vga), write16_delegate(FUNC(mach64_device::mach32_clksel_w),m_vga)); + m_isa->install16_device(0x52e8, 0x52eb, read16_delegate(FUNC(mach64_device::mach8_ec0_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_ec0_w),m_vga)); + m_isa->install16_device(0x52ec, 0x52ef, read16_delegate(FUNC(mach64_device::mach8_scratch0_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_scratch0_w),m_vga)); + m_isa->install16_device(0x56e8, 0x56eb, read16_delegate(FUNC(mach64_device::mach8_ec1_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_ec1_w),m_vga)); + m_isa->install16_device(0x56ec, 0x56ef, read16_delegate(FUNC(mach64_device::mach8_scratch0_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_scratch0_w),m_vga)); + m_isa->install16_device(0x5ae8, 0x5aeb, read16_delegate(FUNC(mach64_device::mach8_ec2_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_ec2_w),m_vga)); + m_isa->install16_device(0x5ee8, 0x5eeb, read16_delegate(FUNC(mach64_device::mach8_ec3_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_ec3_w),m_vga)); + m_isa->install16_device(0x82e8, 0x82eb, read16_delegate(FUNC(mach64_device::ibm8514_currenty_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_currenty_w),m_vga)); + m_isa->install16_device(0x86e8, 0x86eb, read16_delegate(FUNC(mach64_device::ibm8514_currentx_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_currentx_w),m_vga)); + m_isa->install16_device(0x8ae8, 0x8aeb, read16_delegate(FUNC(mach64_device::ibm8514_desty_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_desty_w),m_vga)); + m_isa->install16_device(0x8ee8, 0x8eeb, read16_delegate(FUNC(mach64_device::ibm8514_destx_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_destx_w),m_vga)); + m_isa->install16_device(0x92e8, 0x92eb, read16_delegate(FUNC(mach64_device::ibm8514_line_error_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_line_error_w),m_vga)); + m_isa->install16_device(0x96e8, 0x96eb, read16_delegate(FUNC(mach64_device::ibm8514_width_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_width_w),m_vga)); + m_isa->install16_device(0x96ec, 0x96ef, read16_delegate(FUNC(mach64_device::mach8_bresenham_count_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_bresenham_count_w),m_vga)); + m_isa->install16_device(0x9ae8, 0x9aeb, read16_delegate(FUNC(mach64_device::ibm8514_gpstatus_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_cmd_w),m_vga)); + m_isa->install16_device(0x9aec, 0x9aef, read16_delegate(FUNC(mach64_device::mach8_ext_fifo_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_linedraw_index_w),m_vga)); + m_isa->install16_device(0x9ee8, 0x9eeb, read16_delegate(FUNC(mach64_device::ibm8514_ssv_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_ssv_w),m_vga)); + m_isa->install16_device(0xa2e8, 0xa2eb, read16_delegate(FUNC(mach64_device::ibm8514_bgcolour_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_bgcolour_w),m_vga)); + m_isa->install16_device(0xa6e8, 0xa6eb, read16_delegate(FUNC(mach64_device::ibm8514_fgcolour_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_fgcolour_w),m_vga)); + m_isa->install16_device(0xaae8, 0xaaeb, read16_delegate(FUNC(mach64_device::ibm8514_write_mask_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_write_mask_w),m_vga)); + m_isa->install16_device(0xaee8, 0xaeeb, read16_delegate(FUNC(mach64_device::ibm8514_read_mask_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_read_mask_w),m_vga)); + m_isa->install16_device(0xb6e8, 0xb6eb, read16_delegate(FUNC(mach64_device::ibm8514_backmix_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_backmix_w),m_vga)); + m_isa->install16_device(0xbae8, 0xbaeb, read16_delegate(FUNC(mach64_device::ibm8514_foremix_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_foremix_w),m_vga)); + m_isa->install16_device(0xbee8, 0xbeeb, read16_delegate(FUNC(mach64_device::ibm8514_multifunc_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_multifunc_w),m_vga)); + m_isa->install16_device(0xe2e8, 0xe2eb, read16_delegate(FUNC(mach64_device::ibm8514_pixel_xfer_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_pixel_xfer_w),m_vga)); + m_isa->install16_device(0xdaec, 0xdaef, read16_delegate(FUNC(mach64_device::mach8_sourcex_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_ext_leftscissor_w),m_vga)); + m_isa->install16_device(0xdeec, 0xdeef, read16_delegate(FUNC(mach64_device::mach8_sourcey_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_ext_topscissor_w),m_vga)); + m_isa->install16_device(0xfaec, 0xfaef, read16_delegate(FUNC(mach64_device::mach32_chipid_r),m_vga), write16_delegate()); + m_isa->install16_device(0xfeec, 0xfeef, read16_delegate(FUNC(mach64_device::mach8_linedraw_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_linedraw_w),m_vga)); + + m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(FUNC(mach64_device::mem_r),m_vga), write8_delegate(FUNC(mach64_device::mem_w),m_vga)); } //------------------------------------------------- diff --git a/src/devices/bus/isa/wdxt_gen.cpp b/src/devices/bus/isa/wdxt_gen.cpp index abd262cd918..dd2e28202ce 100644 --- a/src/devices/bus/isa/wdxt_gen.cpp +++ b/src/devices/bus/isa/wdxt_gen.cpp @@ -206,8 +206,8 @@ wdxt_gen_device::wdxt_gen_device(const machine_config &mconfig, const char *tag, void wdxt_gen_device::device_start() { set_isa_device(); - m_isa->install_rom(this, 0xc8000, 0xc9fff, 0, 0, "hdc", "hdc"); - m_isa->install_device(0x0320, 0x0323, 0, 0, READ8_DEVICE_DELEGATE(m_host, wd11c00_17_device, io_r), WRITE8_DEVICE_DELEGATE(m_host, wd11c00_17_device, io_w)); + m_isa->install_rom(this, 0xc8000, 0xc9fff, "hdc", "hdc"); + m_isa->install_device(0x0320, 0x0323, READ8_DEVICE_DELEGATE(m_host, wd11c00_17_device, io_r), WRITE8_DEVICE_DELEGATE(m_host, wd11c00_17_device, io_w)); m_isa->set_dma_channel(3, this, FALSE); } diff --git a/src/devices/bus/isa/xtide.cpp b/src/devices/bus/isa/xtide.cpp index fcd0750e5a3..ef5fd332f47 100644 --- a/src/devices/bus/isa/xtide.cpp +++ b/src/devices/bus/isa/xtide.cpp @@ -326,8 +326,8 @@ void xtide_device::device_reset() int io_address = ((ioport("IO_ADDRESS")->read() & 0x0F) * 0x20) + 0x200; m_irq_number = (ioport("IRQ")->read() & 0x07); - m_isa->install_memory(base_address, base_address + 0x1fff, 0, 0, read8_delegate(FUNC(eeprom_parallel_28xx_device::read), &(*m_eeprom)), write8_delegate(FUNC(eeprom_parallel_28xx_device::write), &(*m_eeprom))); - m_isa->install_device(io_address, io_address + 0xf, 0, 0, read8_delegate(FUNC(xtide_device::read), this), write8_delegate(FUNC(xtide_device::write), this)); + m_isa->install_memory(base_address, base_address + 0x1fff, read8_delegate(FUNC(eeprom_parallel_28xx_device::read), &(*m_eeprom)), write8_delegate(FUNC(eeprom_parallel_28xx_device::write), &(*m_eeprom))); + m_isa->install_device(io_address, io_address + 0xf, read8_delegate(FUNC(xtide_device::read), this), write8_delegate(FUNC(xtide_device::write), this)); //logerror("xtide_device::device_reset(), bios_base=0x%5X to 0x%5X, I/O=0x%3X, IRQ=%d\n",base_address,base_address + (16*1024) -1 ,io_address,irq); } diff --git a/src/devices/bus/macpds/macpds.cpp b/src/devices/bus/macpds/macpds.cpp index bc626ac1831..956a0bb95ed 100644 --- a/src/devices/bus/macpds/macpds.cpp +++ b/src/devices/bus/macpds/macpds.cpp @@ -120,12 +120,12 @@ void macpds_device::install_device(offs_t start, offs_t end, read16_delegate rha m_maincpu->space(AS_PROGRAM).install_readwrite_handler(start, end, rhandler, whandler, mask); } -void macpds_device::install_bank(offs_t start, offs_t end, offs_t mask, offs_t mirror, const char *tag, UINT8 *data) +void macpds_device::install_bank(offs_t start, offs_t end, const char *tag, UINT8 *data) { -// printf("install_bank: %s @ %x->%x mask %x mirror %x\n", tag, start, end, mask, mirror); +// printf("install_bank: %s @ %x->%x\n", tag, start, end); m_maincpu = machine().device<cpu_device>(m_cputag); address_space &space = m_maincpu->space(AS_PROGRAM); - space.install_readwrite_bank(start, end, mask, mirror, tag ); + space.install_readwrite_bank(start, end, 0, tag ); machine().root_device().membank(siblingtag(tag).c_str())->set_base(data); } @@ -176,7 +176,7 @@ void device_macpds_card_interface::set_macpds_device() m_macpds->add_macpds_card(this); } -void device_macpds_card_interface::install_bank(offs_t start, offs_t end, offs_t mask, offs_t mirror, const char *tag, UINT8 *data) +void device_macpds_card_interface::install_bank(offs_t start, offs_t end, const char *tag, UINT8 *data) { char bank[256]; @@ -185,7 +185,7 @@ void device_macpds_card_interface::install_bank(offs_t start, offs_t end, offs_t strcat(bank, "_"); strcat(bank, m_macpds_slottag); - m_macpds->install_bank(start, end, mask, mirror, bank, data); + m_macpds->install_bank(start, end, bank, data); } void device_macpds_card_interface::install_rom(device_t *dev, const char *romregion, UINT32 addr) @@ -195,5 +195,5 @@ void device_macpds_card_interface::install_rom(device_t *dev, const char *romreg char bankname[128]; sprintf(bankname, "rom_%x", addr); - m_macpds->install_bank(addr, addr+romlen-1, 0, 0, bankname, rom); + m_macpds->install_bank(addr, addr+romlen-1, bankname, rom); } diff --git a/src/devices/bus/macpds/macpds.h b/src/devices/bus/macpds/macpds.h index db572d553f2..511355f6e42 100644 --- a/src/devices/bus/macpds/macpds.h +++ b/src/devices/bus/macpds/macpds.h @@ -83,7 +83,7 @@ public: void add_macpds_card(device_macpds_card_interface *card); void install_device(offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler, UINT32 mask=0xffffffff); void install_device(offs_t start, offs_t end, read16_delegate rhandler, write16_delegate whandler, UINT32 mask=0xffffffff); - void install_bank(offs_t start, offs_t end, offs_t mask, offs_t mirror, const char *tag, UINT8 *data); + void install_bank(offs_t start, offs_t end, const char *tag, UINT8 *data); void set_irq_line(int line, int state); protected: @@ -118,7 +118,7 @@ public: void set_macpds_device(); // helper functions for card devices - void install_bank(offs_t start, offs_t end, offs_t mask, offs_t mirror, const char *tag, UINT8 *data); + void install_bank(offs_t start, offs_t end, const char *tag, UINT8 *data); void install_rom(device_t *dev, const char *romregion, UINT32 addr); // inline configuration diff --git a/src/devices/bus/macpds/pds_tpdfpd.cpp b/src/devices/bus/macpds/pds_tpdfpd.cpp index f89a210888f..a28577bfc99 100644 --- a/src/devices/bus/macpds/pds_tpdfpd.cpp +++ b/src/devices/bus/macpds/pds_tpdfpd.cpp @@ -118,7 +118,7 @@ void macpds_sedisplay_device::device_start() m_vram = std::make_unique<UINT8[]>(VRAM_SIZE); static const char bankname[] = { "radpds_ram" }; - m_macpds->install_bank(0xc40000, 0xc40000+VRAM_SIZE-1, 0, 0, bankname, m_vram.get()); + m_macpds->install_bank(0xc40000, 0xc40000+VRAM_SIZE-1, bankname, m_vram.get()); m_macpds->install_device(0x770000, 0x77000f, read16_delegate(FUNC(macpds_sedisplay_device::ramdac_r), this), write16_delegate(FUNC(macpds_sedisplay_device::ramdac_w), this)); m_macpds->install_device(0xc10000, 0xc2ffff, read16_delegate(FUNC(macpds_sedisplay_device::sedisplay_r), this), write16_delegate(FUNC(macpds_sedisplay_device::sedisplay_w), this)); diff --git a/src/devices/bus/nubus/nubus.cpp b/src/devices/bus/nubus/nubus.cpp index 50206fe1422..cf73062f82b 100644 --- a/src/devices/bus/nubus/nubus.cpp +++ b/src/devices/bus/nubus/nubus.cpp @@ -212,12 +212,12 @@ void nubus_device::install_writeonly_device(offs_t start, offs_t end, write32_de } } -void nubus_device::install_bank(offs_t start, offs_t end, offs_t mask, offs_t mirror, const char *tag, UINT8 *data) +void nubus_device::install_bank(offs_t start, offs_t end, const char *tag, UINT8 *data) { -// printf("install_bank: %s @ %x->%x mask %x mirror %x\n", tag, start, end, mask, mirror); +// printf("install_bank: %s @ %x->%x\n", tag, start, end); m_maincpu = machine().device<cpu_device>(m_cputag); address_space &space = m_maincpu->space(AS_PROGRAM); - space.install_readwrite_bank(start, end, mask, mirror, tag ); + space.install_readwrite_bank(start, end, 0, tag ); machine().root_device().membank(siblingtag(tag).c_str())->set_base(data); } @@ -312,7 +312,7 @@ void device_nubus_card_interface::set_nubus_device() m_nubus->add_nubus_card(this); } -void device_nubus_card_interface::install_bank(offs_t start, offs_t end, offs_t mask, offs_t mirror, const char *tag, UINT8 *data) +void device_nubus_card_interface::install_bank(offs_t start, offs_t end, const char *tag, UINT8 *data) { char bank[256]; @@ -321,7 +321,7 @@ void device_nubus_card_interface::install_bank(offs_t start, offs_t end, offs_t strcat(bank, "_"); strcat(bank, m_nubus_slottag); - m_nubus->install_bank(start, end, mask, mirror, bank, data); + m_nubus->install_bank(start, end, bank, data); } void device_nubus_card_interface::install_declaration_rom(device_t *dev, const char *romregion, bool mirror_all_mb, bool reverse_rom) @@ -467,10 +467,14 @@ void device_nubus_card_interface::install_declaration_rom(device_t *dev, const c // printf("Installing ROM at %x, length %x\n", addr, romlen); if (mirror_all_mb) // mirror the declaration ROM across all 16 megs of the slot space { - m_nubus->install_bank(addr, addr+romlen-1, 0, 0x00f00000, bankname, &m_declaration_rom[0]); + UINT32 off = 0; + while(off < 0x1000000) { + m_nubus->install_bank(addr + off, addr+off+romlen-1, bankname, &m_declaration_rom[0]); + off += romlen; + } } else { - m_nubus->install_bank(addr, addr+romlen-1, 0, 0, bankname, &m_declaration_rom[0]); + m_nubus->install_bank(addr, addr+romlen-1, bankname, &m_declaration_rom[0]); } } diff --git a/src/devices/bus/nubus/nubus.h b/src/devices/bus/nubus/nubus.h index 4bb736f1eb7..b7f5bed0646 100644 --- a/src/devices/bus/nubus/nubus.h +++ b/src/devices/bus/nubus/nubus.h @@ -106,7 +106,7 @@ public: void install_device(offs_t start, offs_t end, read32_delegate rhandler, write32_delegate whandler, UINT32 mask=0xffffffff); void install_readonly_device(offs_t start, offs_t end, read32_delegate rhandler, UINT32 mask=0xffffffff); void install_writeonly_device(offs_t start, offs_t end, write32_delegate whandler, UINT32 mask=0xffffffff); - void install_bank(offs_t start, offs_t end, offs_t mask, offs_t mirror, const char *tag, UINT8 *data); + void install_bank(offs_t start, offs_t end, const char *tag, UINT8 *data); void set_irq_line(int slot, int state); DECLARE_WRITE_LINE_MEMBER( irq9_w ); @@ -156,7 +156,7 @@ public: // helper functions for card devices void install_declaration_rom(device_t *dev, const char *romregion, bool mirror_all_mb = false, bool reverse_rom = false); - void install_bank(offs_t start, offs_t end, offs_t mask, offs_t mirror, const char *tag, UINT8 *data); + void install_bank(offs_t start, offs_t end, const char *tag, UINT8 *data); UINT32 get_slotspace() { return 0xf0000000 | (m_slot<<24); } UINT32 get_super_slotspace() { return m_slot<<28; } diff --git a/src/devices/bus/nubus/nubus_48gc.cpp b/src/devices/bus/nubus/nubus_48gc.cpp index 2021def0a5d..74110534d93 100644 --- a/src/devices/bus/nubus/nubus_48gc.cpp +++ b/src/devices/bus/nubus/nubus_48gc.cpp @@ -114,7 +114,7 @@ void jmfb_device::device_start() // printf("[JMFB %p] slotspace = %x\n", this, slotspace); m_vram.resize(VRAM_SIZE); - install_bank(slotspace, slotspace+VRAM_SIZE-1, 0, 0, "bank_48gc", &m_vram[0]); + install_bank(slotspace, slotspace+VRAM_SIZE-1, "bank_48gc", &m_vram[0]); m_nubus->install_device(slotspace+0x200000, slotspace+0x2003ff, read32_delegate(FUNC(jmfb_device::mac_48gc_r), this), write32_delegate(FUNC(jmfb_device::mac_48gc_w), this)); diff --git a/src/devices/bus/nubus/nubus_cb264.cpp b/src/devices/bus/nubus/nubus_cb264.cpp index 29889da8a46..bdc7cba85c7 100644 --- a/src/devices/bus/nubus/nubus_cb264.cpp +++ b/src/devices/bus/nubus/nubus_cb264.cpp @@ -98,7 +98,7 @@ void nubus_cb264_device::device_start() // printf("[cb264 %p] slotspace = %x\n", this, slotspace); m_vram.resize(VRAM_SIZE); - install_bank(slotspace, slotspace+VRAM_SIZE-1, 0, 0, "bank_cb264", &m_vram[0]); + install_bank(slotspace, slotspace+VRAM_SIZE-1, "bank_cb264", &m_vram[0]); m_nubus->install_device(slotspace+0xff6000, slotspace+0xff60ff, read32_delegate(FUNC(nubus_cb264_device::cb264_r), this), write32_delegate(FUNC(nubus_cb264_device::cb264_w), this)); m_nubus->install_device(slotspace+0xff7000, slotspace+0xff70ff, read32_delegate(FUNC(nubus_cb264_device::cb264_ramdac_r), this), write32_delegate(FUNC(nubus_cb264_device::cb264_ramdac_w), this)); diff --git a/src/devices/bus/nubus/nubus_vikbw.cpp b/src/devices/bus/nubus/nubus_vikbw.cpp index 532e9b66145..63b81446251 100644 --- a/src/devices/bus/nubus/nubus_vikbw.cpp +++ b/src/devices/bus/nubus/nubus_vikbw.cpp @@ -94,8 +94,8 @@ void nubus_vikbw_device::device_start() // printf("[vikbw %p] slotspace = %x\n", this, slotspace); m_vram.resize(VRAM_SIZE); - install_bank(slotspace+0x40000, slotspace+0x40000+VRAM_SIZE-1, 0, 0, "bank_vikbw", &m_vram[0]); - install_bank(slotspace+0x940000, slotspace+0x940000+VRAM_SIZE-1, 0, 0, "bank_vikbw2", &m_vram[0]); + install_bank(slotspace+0x40000, slotspace+0x40000+VRAM_SIZE-1, "bank_vikbw", &m_vram[0]); + install_bank(slotspace+0x940000, slotspace+0x940000+VRAM_SIZE-1, "bank_vikbw2", &m_vram[0]); m_nubus->install_device(slotspace, slotspace+3, read32_delegate(FUNC(nubus_vikbw_device::viking_enable_r), this), write32_delegate(FUNC(nubus_vikbw_device::viking_disable_w), this)); m_nubus->install_device(slotspace+0x80000, slotspace+0x80000+3, read32_delegate(FUNC(nubus_vikbw_device::viking_ack_r), this), write32_delegate(FUNC(nubus_vikbw_device::viking_ack_w), this)); diff --git a/src/devices/bus/spc1000/fdd.cpp b/src/devices/bus/spc1000/fdd.cpp index 504a13ec0be..e04308ee0e4 100644 --- a/src/devices/bus/spc1000/fdd.cpp +++ b/src/devices/bus/spc1000/fdd.cpp @@ -166,7 +166,7 @@ void spc1000_fdd_exp_device::device_reset() m_cpu->set_input_line_vector(0, 0); // enable rom (is this really needed? it does not seem necessary for FDD to work) - m_cpu->space(AS_PROGRAM).install_rom(0x0000, 0x0fff, 0, 0x2000, device().machine().root_device().memregion("fdccpu")->base()); + m_cpu->space(AS_PROGRAM).install_rom(0x0000, 0x0fff, 0x2000, device().machine().root_device().memregion("fdccpu")->base()); } void spc1000_fdd_exp_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) diff --git a/src/devices/bus/vtech/memexp/rs232.cpp b/src/devices/bus/vtech/memexp/rs232.cpp index ead9ac0a904..188f473514b 100644 --- a/src/devices/bus/vtech/memexp/rs232.cpp +++ b/src/devices/bus/vtech/memexp/rs232.cpp @@ -76,7 +76,7 @@ void rs232_interface_device::device_start() void rs232_interface_device::device_reset() { // program - m_slot->m_program->install_rom(0x4000, 0x47ff, 0, 0x800, memregion("software")->base()); + m_slot->m_program->install_rom(0x4000, 0x47ff, 0x800, memregion("software")->base()); // data m_slot->m_program->install_read_handler(0x5000, 0x57ff, read8_delegate(FUNC(rs232_interface_device::receive_data_r), this)); diff --git a/src/devices/bus/vtech/memexp/rtty.cpp b/src/devices/bus/vtech/memexp/rtty.cpp index bf9930c3dcf..fa1438461f3 100644 --- a/src/devices/bus/vtech/memexp/rtty.cpp +++ b/src/devices/bus/vtech/memexp/rtty.cpp @@ -59,7 +59,7 @@ void rtty_interface_device::device_start() void rtty_interface_device::device_reset() { // program - m_slot->m_program->install_rom(0x4000, 0x4fff, 0, 0x1000, memregion("software")->base()); + m_slot->m_program->install_rom(0x4000, 0x4fff, 0x1000, memregion("software")->base()); // data m_slot->m_program->install_read_handler(0x5000, 0x57ff, read8_delegate(FUNC(rtty_interface_device::receive_data_r), this)); diff --git a/src/devices/bus/x68k/x68k_scsiext.cpp b/src/devices/bus/x68k/x68k_scsiext.cpp index fce3c4a89ca..960721458f0 100644 --- a/src/devices/bus/x68k/x68k_scsiext.cpp +++ b/src/devices/bus/x68k/x68k_scsiext.cpp @@ -69,11 +69,11 @@ void x68k_scsiext_device::device_start() UINT8* ROM; address_space& space = cpu->memory().space(AS_PROGRAM); m_slot = dynamic_cast<x68k_expansion_slot_device *>(owner()); - space.install_read_bank(0xea0020,0xea1fff,0,0,"scsi_ext"); - space.unmap_write(0xea0020,0xea1fff,0,0); + space.install_read_bank(0xea0020,0xea1fff,"scsi_ext"); + space.unmap_write(0xea0020,0xea1fff); ROM = machine().root_device().memregion(subtag("scsiexrom").c_str())->base(); machine().root_device().membank("scsi_ext")->set_base(ROM); - space.install_readwrite_handler(0xea0000,0xea001f,0,0,read8_delegate(FUNC(x68k_scsiext_device::register_r),this),write8_delegate(FUNC(x68k_scsiext_device::register_w),this),0x00ff00ff); + space.install_readwrite_handler(0xea0000,0xea001f,read8_delegate(FUNC(x68k_scsiext_device::register_r),this),write8_delegate(FUNC(x68k_scsiext_device::register_w),this),0x00ff00ff); } void x68k_scsiext_device::device_reset() diff --git a/src/devices/cpu/g65816/g65816.cpp b/src/devices/cpu/g65816/g65816.cpp index 0d538e93616..a98a822849d 100644 --- a/src/devices/cpu/g65816/g65816.cpp +++ b/src/devices/cpu/g65816/g65816.cpp @@ -1116,18 +1116,18 @@ READ8_MEMBER( _5a22_device::rdmpyh_r ) void _5a22_device::set_5a22_map() { - space(AS_PROGRAM).install_write_handler(0x4202, 0x4202, 0, 0xbf0000, write8_delegate(FUNC(_5a22_device::wrmpya_w),this)); - space(AS_PROGRAM).install_write_handler(0x4203, 0x4203, 0, 0xbf0000, write8_delegate(FUNC(_5a22_device::wrmpyb_w),this)); - space(AS_PROGRAM).install_write_handler(0x4204, 0x4204, 0, 0xbf0000, write8_delegate(FUNC(_5a22_device::wrdivl_w),this)); - space(AS_PROGRAM).install_write_handler(0x4205, 0x4205, 0, 0xbf0000, write8_delegate(FUNC(_5a22_device::wrdivh_w),this)); - space(AS_PROGRAM).install_write_handler(0x4206, 0x4206, 0, 0xbf0000, write8_delegate(FUNC(_5a22_device::wrdvdd_w),this)); - - space(AS_PROGRAM).install_write_handler(0x420d, 0x420d, 0, 0xbf0000, write8_delegate(FUNC(_5a22_device::memsel_w),this)); - - space(AS_PROGRAM).install_read_handler(0x4214, 0x4214, 0, 0xbf0000, read8_delegate(FUNC(_5a22_device::rddivl_r),this)); - space(AS_PROGRAM).install_read_handler(0x4215, 0x4215, 0, 0xbf0000, read8_delegate(FUNC(_5a22_device::rddivh_r),this)); - space(AS_PROGRAM).install_read_handler(0x4216, 0x4216, 0, 0xbf0000, read8_delegate(FUNC(_5a22_device::rdmpyl_r),this)); - space(AS_PROGRAM).install_read_handler(0x4217, 0x4217, 0, 0xbf0000, read8_delegate(FUNC(_5a22_device::rdmpyh_r),this)); + space(AS_PROGRAM).install_write_handler(0x4202, 0x4202, 0, 0xbf0000, 0, write8_delegate(FUNC(_5a22_device::wrmpya_w),this)); + space(AS_PROGRAM).install_write_handler(0x4203, 0x4203, 0, 0xbf0000, 0, write8_delegate(FUNC(_5a22_device::wrmpyb_w),this)); + space(AS_PROGRAM).install_write_handler(0x4204, 0x4204, 0, 0xbf0000, 0, write8_delegate(FUNC(_5a22_device::wrdivl_w),this)); + space(AS_PROGRAM).install_write_handler(0x4205, 0x4205, 0, 0xbf0000, 0, write8_delegate(FUNC(_5a22_device::wrdivh_w),this)); + space(AS_PROGRAM).install_write_handler(0x4206, 0x4206, 0, 0xbf0000, 0, write8_delegate(FUNC(_5a22_device::wrdvdd_w),this)); + + space(AS_PROGRAM).install_write_handler(0x420d, 0x420d, 0, 0xbf0000, 0, write8_delegate(FUNC(_5a22_device::memsel_w),this)); + + space(AS_PROGRAM).install_read_handler(0x4214, 0x4214, 0, 0xbf0000, 0, read8_delegate(FUNC(_5a22_device::rddivl_r),this)); + space(AS_PROGRAM).install_read_handler(0x4215, 0x4215, 0, 0xbf0000, 0, read8_delegate(FUNC(_5a22_device::rddivh_r),this)); + space(AS_PROGRAM).install_read_handler(0x4216, 0x4216, 0, 0xbf0000, 0, read8_delegate(FUNC(_5a22_device::rdmpyl_r),this)); + space(AS_PROGRAM).install_read_handler(0x4217, 0x4217, 0, 0xbf0000, 0, read8_delegate(FUNC(_5a22_device::rdmpyh_r),this)); } diff --git a/src/devices/machine/gt64xxx.cpp b/src/devices/machine/gt64xxx.cpp index 51bf9dbc2f7..d1b0f15e61a 100644 --- a/src/devices/machine/gt64xxx.cpp +++ b/src/devices/machine/gt64xxx.cpp @@ -206,24 +206,24 @@ void gt64xxx_device::map_cpu_space() // PCI IO Window winStart = m_reg[GREG_PCI_IO_LO]<<21; winEnd = (m_reg[GREG_PCI_IO_LO]<<21) | (m_reg[GREG_PCI_IO_HI]<<21) | 0x1fffff; - m_cpu_space->install_read_handler(winStart, winEnd, 0, 0, read32_delegate(FUNC(gt64xxx_device::master_io_r), this)); - m_cpu_space->install_write_handler(winStart, winEnd, 0, 0, write32_delegate(FUNC(gt64xxx_device::master_io_w), this)); + m_cpu_space->install_read_handler(winStart, winEnd, read32_delegate(FUNC(gt64xxx_device::master_io_r), this)); + m_cpu_space->install_write_handler(winStart, winEnd, write32_delegate(FUNC(gt64xxx_device::master_io_w), this)); if (LOG_GALILEO) logerror("%s: map_cpu_space pci_io start: %08X end: %08X\n", tag(), winStart, winEnd); // PCI MEM0 Window winStart = m_reg[GREG_PCI_MEM0_LO]<<21; winEnd = (m_reg[GREG_PCI_MEM0_LO]<<21) | (m_reg[GREG_PCI_MEM0_HI]<<21) | 0x1fffff; - m_cpu_space->install_read_handler(winStart, winEnd, 0, 0, read32_delegate(FUNC(gt64xxx_device::master_mem0_r), this)); - m_cpu_space->install_write_handler(winStart, winEnd, 0, 0, write32_delegate(FUNC(gt64xxx_device::master_mem0_w), this)); + m_cpu_space->install_read_handler(winStart, winEnd, read32_delegate(FUNC(gt64xxx_device::master_mem0_r), this)); + m_cpu_space->install_write_handler(winStart, winEnd, write32_delegate(FUNC(gt64xxx_device::master_mem0_w), this)); if (LOG_GALILEO) logerror("%s: map_cpu_space pci_mem0 start: %08X end: %08X\n", tag(), winStart, winEnd); // PCI MEM1 Window winStart = m_reg[GREG_PCI_MEM1_LO]<<21; winEnd = (m_reg[GREG_PCI_MEM1_LO]<<21) | (m_reg[GREG_PCI_MEM1_HI]<<21) | 0x1fffff; - m_cpu_space->install_read_handler(winStart, winEnd, 0, 0, read32_delegate(FUNC(gt64xxx_device::master_mem1_r), this)); - m_cpu_space->install_write_handler(winStart, winEnd, 0, 0, write32_delegate(FUNC(gt64xxx_device::master_mem1_w), this)); + m_cpu_space->install_read_handler(winStart, winEnd, read32_delegate(FUNC(gt64xxx_device::master_mem1_r), this)); + m_cpu_space->install_write_handler(winStart, winEnd, write32_delegate(FUNC(gt64xxx_device::master_mem1_w), this)); if (LOG_GALILEO) logerror("%s: map_cpu_space pci_mem1 start: %08X end: %08X\n", tag(), winStart, winEnd); @@ -266,8 +266,8 @@ void gt64xxx_device::map_extra(UINT64 memory_window_start, UINT64 memory_window_ winStart = (m_reg[GREG_RAS_1_0_LO + 0x10 / 4 * (ramIndex / 2)] << 21) | (m_reg[GREG_RAS0_LO + 0x8 / 4 * ramIndex] << 20); winEnd = (m_reg[GREG_RAS_1_0_LO + 0x10 / 4 * (ramIndex / 2)] << 21) | (m_reg[GREG_RAS0_HI + 0x8 / 4 * ramIndex] << 20) | 0xfffff; winSize = winEnd - winStart + 1; - memory_space->install_read_handler(winStart, winEnd, 0, 0, read32_delegate(FUNC(gt64xxx_device::ras_0_r), this)); - memory_space->install_write_handler(winStart, winEnd, 0, 0, write32_delegate(FUNC(gt64xxx_device::ras_0_w), this)); + memory_space->install_read_handler(winStart, winEnd, read32_delegate(FUNC(gt64xxx_device::ras_0_r), this)); + memory_space->install_write_handler(winStart, winEnd, write32_delegate(FUNC(gt64xxx_device::ras_0_w), this)); if (LOG_GALILEO) logerror("%s: map_extra RAS0 start=%08X end=%08X size=%08X\n", tag(), winStart, winEnd, winSize); @@ -276,8 +276,8 @@ void gt64xxx_device::map_extra(UINT64 memory_window_start, UINT64 memory_window_ winStart = (m_reg[GREG_RAS_1_0_LO + 0x10 / 4 * (ramIndex / 2)] << 21) | (m_reg[GREG_RAS0_LO + 0x8 / 4 * ramIndex] << 20); winEnd = (m_reg[GREG_RAS_1_0_LO + 0x10 / 4 * (ramIndex / 2)] << 21) | (m_reg[GREG_RAS0_HI + 0x8 / 4 * ramIndex] << 20) | 0xfffff; winSize = winEnd - winStart + 1; - memory_space->install_read_handler(winStart, winEnd, 0, 0, read32_delegate(FUNC(gt64xxx_device::ras_1_r), this)); - memory_space->install_write_handler(winStart, winEnd, 0, 0, write32_delegate(FUNC(gt64xxx_device::ras_1_w), this)); + memory_space->install_read_handler(winStart, winEnd, read32_delegate(FUNC(gt64xxx_device::ras_1_r), this)); + memory_space->install_write_handler(winStart, winEnd, write32_delegate(FUNC(gt64xxx_device::ras_1_w), this)); if (LOG_GALILEO) logerror("%s: map_extra RAS1 start=%08X end=%08X size=%08X\n", tag(), winStart, winEnd, winSize); @@ -286,8 +286,8 @@ void gt64xxx_device::map_extra(UINT64 memory_window_start, UINT64 memory_window_ winStart = (m_reg[GREG_RAS_1_0_LO + 0x10 / 4 * (ramIndex / 2)] << 21) | (m_reg[GREG_RAS0_LO + 0x8 / 4 * ramIndex] << 20); winEnd = (m_reg[GREG_RAS_1_0_LO + 0x10 / 4 * (ramIndex / 2)] << 21) | (m_reg[GREG_RAS0_HI + 0x8 / 4 * ramIndex] << 20) | 0xfffff; winSize = winEnd - winStart + 1; - memory_space->install_read_handler(winStart, winEnd, 0, 0, read32_delegate(FUNC(gt64xxx_device::ras_2_r), this)); - memory_space->install_write_handler(winStart, winEnd, 0, 0, write32_delegate(FUNC(gt64xxx_device::ras_2_w), this)); + memory_space->install_read_handler(winStart, winEnd, read32_delegate(FUNC(gt64xxx_device::ras_2_r), this)); + memory_space->install_write_handler(winStart, winEnd, write32_delegate(FUNC(gt64xxx_device::ras_2_w), this)); if (LOG_GALILEO) logerror("%s: map_extra RAS2 start=%08X end=%08X size=%08X\n", tag(), winStart, winEnd, winSize); @@ -296,8 +296,8 @@ void gt64xxx_device::map_extra(UINT64 memory_window_start, UINT64 memory_window_ winStart = (m_reg[GREG_RAS_1_0_LO + 0x10 / 4 * (ramIndex / 2)] << 21) | (m_reg[GREG_RAS0_LO + 0x8 / 4 * ramIndex] << 20); winEnd = (m_reg[GREG_RAS_1_0_LO + 0x10 / 4 * (ramIndex / 2)] << 21) | (m_reg[GREG_RAS0_HI + 0x8 / 4 * ramIndex] << 20) | 0xfffff; winSize = winEnd - winStart + 1; - memory_space->install_read_handler(winStart, winEnd, 0, 0, read32_delegate(FUNC(gt64xxx_device::ras_3_r), this)); - memory_space->install_write_handler(winStart, winEnd, 0, 0, write32_delegate(FUNC(gt64xxx_device::ras_3_w), this)); + memory_space->install_read_handler(winStart, winEnd, read32_delegate(FUNC(gt64xxx_device::ras_3_r), this)); + memory_space->install_write_handler(winStart, winEnd, write32_delegate(FUNC(gt64xxx_device::ras_3_w), this)); if (LOG_GALILEO) logerror("%s: map_extra RAS3 start=%08X end=%08X size=%08X\n", tag(), winStart, winEnd, winSize); } diff --git a/src/devices/machine/pci.cpp b/src/devices/machine/pci.cpp index 859b44dc939..54e9ddf7112 100644 --- a/src/devices/machine/pci.cpp +++ b/src/devices/machine/pci.cpp @@ -276,12 +276,12 @@ void pci_device::map_device(UINT64 memory_window_start, UINT64 memory_window_end } UINT64 end = start + bi.size-1; switch(i) { - case 0: space->install_readwrite_handler(start, end, 0, 0, read32_delegate(FUNC(pci_device::unmapped0_r), this), write32_delegate(FUNC(pci_device::unmapped0_w), this)); break; - case 1: space->install_readwrite_handler(start, end, 0, 0, read32_delegate(FUNC(pci_device::unmapped1_r), this), write32_delegate(FUNC(pci_device::unmapped1_w), this)); break; - case 2: space->install_readwrite_handler(start, end, 0, 0, read32_delegate(FUNC(pci_device::unmapped2_r), this), write32_delegate(FUNC(pci_device::unmapped2_w), this)); break; - case 3: space->install_readwrite_handler(start, end, 0, 0, read32_delegate(FUNC(pci_device::unmapped3_r), this), write32_delegate(FUNC(pci_device::unmapped3_w), this)); break; - case 4: space->install_readwrite_handler(start, end, 0, 0, read32_delegate(FUNC(pci_device::unmapped4_r), this), write32_delegate(FUNC(pci_device::unmapped4_w), this)); break; - case 5: space->install_readwrite_handler(start, end, 0, 0, read32_delegate(FUNC(pci_device::unmapped5_r), this), write32_delegate(FUNC(pci_device::unmapped5_w), this)); break; + case 0: space->install_readwrite_handler(start, end, read32_delegate(FUNC(pci_device::unmapped0_r), this), write32_delegate(FUNC(pci_device::unmapped0_w), this)); break; + case 1: space->install_readwrite_handler(start, end, read32_delegate(FUNC(pci_device::unmapped1_r), this), write32_delegate(FUNC(pci_device::unmapped1_w), this)); break; + case 2: space->install_readwrite_handler(start, end, read32_delegate(FUNC(pci_device::unmapped2_r), this), write32_delegate(FUNC(pci_device::unmapped2_w), this)); break; + case 3: space->install_readwrite_handler(start, end, read32_delegate(FUNC(pci_device::unmapped3_r), this), write32_delegate(FUNC(pci_device::unmapped3_w), this)); break; + case 4: space->install_readwrite_handler(start, end, read32_delegate(FUNC(pci_device::unmapped4_r), this), write32_delegate(FUNC(pci_device::unmapped4_w), this)); break; + case 5: space->install_readwrite_handler(start, end, read32_delegate(FUNC(pci_device::unmapped5_r), this), write32_delegate(FUNC(pci_device::unmapped5_w), this)); break; } space->install_device_delegate(start, end, *this, bi.map); diff --git a/src/devices/machine/vrc4373.cpp b/src/devices/machine/vrc4373.cpp index 60c1124e4ef..c750d2fb580 100644 --- a/src/devices/machine/vrc4373.cpp +++ b/src/devices/machine/vrc4373.cpp @@ -144,8 +144,8 @@ void vrc4373_device::map_cpu_space() winStart = m_cpu_regs[NREG_PCIMW1]&0xff000000; winEnd = winStart | (~(0x80000000 | (((m_cpu_regs[NREG_PCIMW1]>>13)&0x7f)<<24))); winSize = winEnd - winStart + 1; - m_cpu_space->install_read_handler(winStart, winEnd, 0, 0, read32_delegate(FUNC(vrc4373_device::master1_r), this)); - m_cpu_space->install_write_handler(winStart, winEnd, 0, 0, write32_delegate(FUNC(vrc4373_device::master1_w), this)); + m_cpu_space->install_read_handler(winStart, winEnd, read32_delegate(FUNC(vrc4373_device::master1_r), this)); + m_cpu_space->install_write_handler(winStart, winEnd, write32_delegate(FUNC(vrc4373_device::master1_w), this)); if (LOG_NILE) logerror("%s: map_cpu_space Master Window 1 start=%08X end=%08X size=%08X laddr=%08X\n", tag(), winStart, winEnd, winSize, m_pci1_laddr); } @@ -154,8 +154,8 @@ void vrc4373_device::map_cpu_space() winStart = m_cpu_regs[NREG_PCIMW2]&0xff000000; winEnd = winStart | (~(0x80000000 | (((m_cpu_regs[NREG_PCIMW2]>>13)&0x7f)<<24))); winSize = winEnd - winStart + 1; - m_cpu_space->install_read_handler(winStart, winEnd, 0, 0, read32_delegate(FUNC(vrc4373_device::master2_r), this)); - m_cpu_space->install_write_handler(winStart, winEnd, 0, 0, write32_delegate(FUNC(vrc4373_device::master2_w), this)); + m_cpu_space->install_read_handler(winStart, winEnd, read32_delegate(FUNC(vrc4373_device::master2_r), this)); + m_cpu_space->install_write_handler(winStart, winEnd, write32_delegate(FUNC(vrc4373_device::master2_w), this)); if (LOG_NILE) logerror("%s: map_cpu_space Master Window 2 start=%08X end=%08X size=%08X laddr=%08X\n", tag(), winStart, winEnd, winSize, m_pci2_laddr); } @@ -164,8 +164,8 @@ void vrc4373_device::map_cpu_space() winStart = m_cpu_regs[NREG_PCIMIOW]&0xff000000; winEnd = winStart | (~(0x80000000 | (((m_cpu_regs[NREG_PCIMIOW]>>13)&0x7f)<<24))); winSize = winEnd - winStart + 1; - m_cpu_space->install_read_handler(winStart, winEnd, 0, 0, read32_delegate(FUNC(vrc4373_device::master_io_r), this)); - m_cpu_space->install_write_handler(winStart, winEnd, 0, 0, write32_delegate(FUNC(vrc4373_device::master_io_w), this)); + m_cpu_space->install_read_handler(winStart, winEnd, read32_delegate(FUNC(vrc4373_device::master_io_r), this)); + m_cpu_space->install_write_handler(winStart, winEnd, write32_delegate(FUNC(vrc4373_device::master_io_w), this)); if (LOG_NILE) logerror("%s: map_cpu_space IO Window start=%08X end=%08X size=%08X laddr=%08X\n", tag(), winStart, winEnd, winSize, m_pci_io_laddr); } @@ -181,8 +181,8 @@ void vrc4373_device::map_extra(UINT64 memory_window_start, UINT64 memory_window_ winStart = m_cpu_regs[NREG_PCITW1]&0xffe00000; winEnd = winStart | (~(0xf0000000 | (((m_cpu_regs[NREG_PCITW1]>>13)&0x7f)<<21))); winSize = winEnd - winStart + 1; - memory_space->install_read_handler(winStart, winEnd, 0, 0, read32_delegate(FUNC(vrc4373_device::target1_r), this)); - memory_space->install_write_handler(winStart, winEnd, 0, 0, write32_delegate(FUNC(vrc4373_device::target1_w), this)); + memory_space->install_read_handler(winStart, winEnd, read32_delegate(FUNC(vrc4373_device::target1_r), this)); + memory_space->install_write_handler(winStart, winEnd, write32_delegate(FUNC(vrc4373_device::target1_w), this)); if (LOG_NILE) logerror("%s: map_extra Target Window 1 start=%08X end=%08X size=%08X laddr=%08X\n", tag(), winStart, winEnd, winSize, m_target1_laddr); } @@ -191,8 +191,8 @@ void vrc4373_device::map_extra(UINT64 memory_window_start, UINT64 memory_window_ winStart = m_cpu_regs[NREG_PCITW2]&0xffe00000; winEnd = winStart | (~(0xf0000000 | (((m_cpu_regs[NREG_PCITW2]>>13)&0x7f)<<21))); winSize = winEnd - winStart + 1; - memory_space->install_read_handler(winStart, winEnd, 0, 0, read32_delegate(FUNC(vrc4373_device::target2_r), this)); - memory_space->install_write_handler(winStart, winEnd, 0, 0, write32_delegate(FUNC(vrc4373_device::target2_w), this)); + memory_space->install_read_handler(winStart, winEnd, read32_delegate(FUNC(vrc4373_device::target2_r), this)); + memory_space->install_write_handler(winStart, winEnd, write32_delegate(FUNC(vrc4373_device::target2_w), this)); if (LOG_NILE) logerror("%s: map_extra Target Window 2 start=%08X end=%08X size=%08X laddr=%08X\n", tag(), winStart, winEnd, winSize, m_target2_laddr); } diff --git a/src/devices/machine/vt82c496.cpp b/src/devices/machine/vt82c496.cpp index 8f24e2338fd..eb2fff4e564 100644 --- a/src/devices/machine/vt82c496.cpp +++ b/src/devices/machine/vt82c496.cpp @@ -41,17 +41,17 @@ void vt82c496_device::device_reset() memset(m_reg,0,0x100); // set up default ROM banking - m_space->install_read_bank(0xc0000,0xc3fff,0,0,"bios_c0_r"); - m_space->install_read_bank(0xc4000,0xc7fff,0,0,"bios_c4_r"); - m_space->install_read_bank(0xc8000,0xcbfff,0,0,"bios_c8_r"); - m_space->install_read_bank(0xcc000,0xcffff,0,0,"bios_cc_r"); - m_space->install_read_bank(0xd0000,0xd3fff,0,0,"bios_d0_r"); - m_space->install_read_bank(0xd4000,0xd7fff,0,0,"bios_d4_r"); - m_space->install_read_bank(0xd8000,0xdbfff,0,0,"bios_d8_r"); - m_space->install_read_bank(0xdc000,0xdffff,0,0,"bios_dc_r"); - m_space->install_read_bank(0xe0000,0xeffff,0,0,"bios_e0_r"); - m_space->install_read_bank(0xf0000,0xfffff,0,0,"bios_f0_r"); - m_space->nop_write(0xc0000,0xfffff,0,0); + m_space->install_read_bank(0xc0000,0xc3fff,0,"bios_c0_r"); + m_space->install_read_bank(0xc4000,0xc7fff,0,"bios_c4_r"); + m_space->install_read_bank(0xc8000,0xcbfff,0,"bios_c8_r"); + m_space->install_read_bank(0xcc000,0xcffff,0,"bios_cc_r"); + m_space->install_read_bank(0xd0000,0xd3fff,0,"bios_d0_r"); + m_space->install_read_bank(0xd4000,0xd7fff,0,"bios_d4_r"); + m_space->install_read_bank(0xd8000,0xdbfff,0,"bios_d8_r"); + m_space->install_read_bank(0xdc000,0xdffff,0,"bios_dc_r"); + m_space->install_read_bank(0xe0000,0xeffff,0,"bios_e0_r"); + m_space->install_read_bank(0xf0000,0xfffff,0,"bios_f0_r"); + m_space->nop_write(0xc0000,0xfffff); machine().root_device().membank("bios_c0_r")->set_base(m_rom); machine().root_device().membank("bios_c4_r")->set_base(m_rom+0x4000); machine().root_device().membank("bios_c8_r")->set_base(m_rom+0x8000); @@ -101,11 +101,11 @@ void vt82c496_device::update_mem_c0(UINT8 data) machine().root_device().membank("bios_cc_r")->set_base(m_rom+0xc000); if(data & 0x40) { - m_space->install_write_bank(0xcc000,0xcffff,0,0,"bios_cc_w"); + m_space->install_write_bank(0xcc000,0xcffff,0,"bios_cc_w"); machine().root_device().membank("bios_cc_w")->set_base(m_ram->pointer()+0xcc000); } else - m_space->nop_write(0xcc000,0xcffff,0,0); + m_space->nop_write(0xcc000,0xcffff); if(data & 0x20) machine().root_device().membank("bios_c8_r")->set_base(m_ram->pointer()+0xc8000); @@ -113,11 +113,11 @@ void vt82c496_device::update_mem_c0(UINT8 data) machine().root_device().membank("bios_c8_r")->set_base(m_rom+0x8000); if(data & 0x10) { - m_space->install_write_bank(0xc8000,0xcbfff,0,0,"bios_c8_w"); + m_space->install_write_bank(0xc8000,0xcbfff,0,"bios_c8_w"); machine().root_device().membank("bios_c8_w")->set_base(m_ram->pointer()+0xc8000); } else - m_space->nop_write(0xc8000,0xcbfff,0,0); + m_space->nop_write(0xc8000,0xcbfff); if(data & 0x08) machine().root_device().membank("bios_c4_r")->set_base(m_ram->pointer()+0xc4000); @@ -125,11 +125,11 @@ void vt82c496_device::update_mem_c0(UINT8 data) machine().root_device().membank("bios_c4_r")->set_base(m_rom+0x4000); if(data & 0x04) { - m_space->install_write_bank(0xc4000,0xc7fff,0,0,"bios_c4_w"); + m_space->install_write_bank(0xc4000,0xc7fff,0,"bios_c4_w"); machine().root_device().membank("bios_c4_w")->set_base(m_ram->pointer()+0xc4000); } else - m_space->nop_write(0xc4000,0xc7fff,0,0); + m_space->nop_write(0xc4000,0xc7fff); if(data & 0x02) machine().root_device().membank("bios_c0_r")->set_base(m_ram->pointer()+0xc0000); @@ -137,11 +137,11 @@ void vt82c496_device::update_mem_c0(UINT8 data) machine().root_device().membank("bios_c0_r")->set_base(m_rom+0); if(data & 0x01) { - m_space->install_write_bank(0xc0000,0xc3fff,0,0,"bios_c0_w"); + m_space->install_write_bank(0xc0000,0xc3fff,0,"bios_c0_w"); machine().root_device().membank("bios_c0_w")->set_base(m_ram->pointer()+0xc0000); } else - m_space->nop_write(0xc0000,0xc3fff,0,0); + m_space->nop_write(0xc0000,0xc3fff); } void vt82c496_device::update_mem_d0(UINT8 data) @@ -152,11 +152,11 @@ void vt82c496_device::update_mem_d0(UINT8 data) machine().root_device().membank("bios_dc_r")->set_base(m_rom+0x1c000); if(data & 0x40) { - m_space->install_write_bank(0xdc000,0xdffff,0,0,"bios_dc_w"); + m_space->install_write_bank(0xdc000,0xdffff,0,"bios_dc_w"); machine().root_device().membank("bios_dc_w")->set_base(m_ram->pointer()+0xdc000); } else - m_space->nop_write(0xdc000,0xdffff,0,0); + m_space->nop_write(0xdc000,0xdffff); if(data & 0x20) machine().root_device().membank("bios_d8_r")->set_base(m_ram->pointer()+0xd8000); @@ -164,11 +164,11 @@ void vt82c496_device::update_mem_d0(UINT8 data) machine().root_device().membank("bios_d8_r")->set_base(m_rom+0x18000); if(data & 0x10) { - m_space->install_write_bank(0xd8000,0xdbfff,0,0,"bios_d8_w"); + m_space->install_write_bank(0xd8000,0xdbfff,0,"bios_d8_w"); machine().root_device().membank("bios_d8_w")->set_base(m_ram->pointer()+0xd8000); } else - m_space->nop_write(0xd8000,0xdbfff,0,0); + m_space->nop_write(0xd8000,0xdbfff); if(data & 0x08) machine().root_device().membank("bios_d4_r")->set_base(m_ram->pointer()+0xd4000); @@ -176,11 +176,11 @@ void vt82c496_device::update_mem_d0(UINT8 data) machine().root_device().membank("bios_d4_r")->set_base(m_rom+0x14000); if(data & 0x04) { - m_space->install_write_bank(0xd4000,0xd7fff,0,0,"bios_d4_w"); + m_space->install_write_bank(0xd4000,0xd7fff,0,"bios_d4_w"); machine().root_device().membank("bios_d4_w")->set_base(m_ram->pointer()+0xd4000); } else - m_space->nop_write(0xd4000,0xd7fff,0,0); + m_space->nop_write(0xd4000,0xd7fff); if(data & 0x02) machine().root_device().membank("bios_d0_r")->set_base(m_ram->pointer()+0xd0000); @@ -188,11 +188,11 @@ void vt82c496_device::update_mem_d0(UINT8 data) machine().root_device().membank("bios_d0_r")->set_base(m_rom+0x10000); if(data & 0x01) { - m_space->install_write_bank(0xd0000,0xd3fff,0,0,"bios_d0_w"); + m_space->install_write_bank(0xd0000,0xd3fff,0,"bios_d0_w"); machine().root_device().membank("bios_d0_w")->set_base(m_ram->pointer()+0xd0000); } else - m_space->nop_write(0xd0000,0xd3fff,0,0); + m_space->nop_write(0xd0000,0xd3fff); } void vt82c496_device::update_mem_e0(UINT8 data) @@ -204,11 +204,11 @@ void vt82c496_device::update_mem_e0(UINT8 data) if(data & 0x40) { - m_space->install_write_bank(0xe0000,0xeffff,0,0,"bios_e0_w"); + m_space->install_write_bank(0xe0000,0xeffff,0,"bios_e0_w"); machine().root_device().membank("bios_e0_w")->set_base(m_ram->pointer()+0xe0000); } else - m_space->nop_write(0xe0000,0xeffff,0,0); + m_space->nop_write(0xe0000,0xeffff); if(data & 0x20) machine().root_device().membank("bios_f0_r")->set_base(m_ram->pointer()+0xf0000); @@ -217,9 +217,9 @@ void vt82c496_device::update_mem_e0(UINT8 data) if(data & 0x10) { - m_space->install_write_bank(0xf0000,0xfffff,0,0,"bios_f0_w"); + m_space->install_write_bank(0xf0000,0xfffff,0,"bios_f0_w"); machine().root_device().membank("bios_f0_w")->set_base(m_ram->pointer()+0xf0000); } else - m_space->nop_write(0xf0000,0xfffff,0,0); + m_space->nop_write(0xf0000,0xfffff); } diff --git a/src/devices/video/voodoo_pci.cpp b/src/devices/video/voodoo_pci.cpp index 5ca7b700569..9aa3b39eba9 100644 --- a/src/devices/video/voodoo_pci.cpp +++ b/src/devices/video/voodoo_pci.cpp @@ -136,7 +136,7 @@ void voodoo_pci_device::map_extra(UINT64 memory_window_start, UINT64 memory_wind if (m_type>=TYPE_VOODOO_BANSHEE) { UINT64 start = io_offset + 0x3b0; UINT64 end = io_offset + 0x3df; - io_space->install_readwrite_handler(start, end, 0, 0, read32_delegate(FUNC(voodoo_pci_device::vga_r), this), write32_delegate(FUNC(voodoo_pci_device::vga_w), this)); + io_space->install_readwrite_handler(start, end, read32_delegate(FUNC(voodoo_pci_device::vga_r), this), write32_delegate(FUNC(voodoo_pci_device::vga_w), this)); logerror("%s: map %s at %0*x-%0*x\n", this->tag(), "vga_r/w", 4, UINT32(start), 4, UINT32(end)); } } diff --git a/src/emu/addrmap.cpp b/src/emu/addrmap.cpp index a7a510b56f7..e3c6810e867 100644 --- a/src/emu/addrmap.cpp +++ b/src/emu/addrmap.cpp @@ -36,6 +36,7 @@ address_map_entry::address_map_entry(device_t &device, address_map &map, offs_t m_addrend((map.m_globalmask == 0) ? end : end & map.m_globalmask), m_addrmirror(0), m_addrmask(0), + m_addrselect(0), m_share(nullptr), m_region(nullptr), m_rgnoffs(0), @@ -578,6 +579,9 @@ void address_map::uplift_submaps(running_machine &machine, device_t &device, dev if (entry->m_addrmask || subentry->m_addrmask) throw emu_fatalerror("uplift_submaps unhandled case: address masks.\n"); + if (entry->m_addrselect || subentry->m_addrselect) + throw emu_fatalerror("uplift_submaps unhandled case: select masks.\n"); + if (subentry->m_addrmirror & mirror_address_mask) throw emu_fatalerror("uplift_submaps unhandled case: address mirror bit within subentry.\n"); diff --git a/src/emu/addrmap.h b/src/emu/addrmap.h index e4386d68365..b9c1be94941 100644 --- a/src/emu/addrmap.h +++ b/src/emu/addrmap.h @@ -81,6 +81,7 @@ public: // simple inline setters void set_mirror(offs_t _mirror) { m_addrmirror = _mirror; } + void set_select(offs_t _select) { m_addrselect = _select; } void set_read_type(map_handler_type _type) { m_read.m_type = _type; } void set_write_type(map_handler_type _type) { m_write.m_type = _type; } void set_region(const char *tag, offs_t offset) { m_region = tag; m_rgnoffs = offset; } @@ -115,6 +116,7 @@ public: offs_t m_addrend; // end address offs_t m_addrmirror; // mirror bits offs_t m_addrmask; // mask bits + offs_t m_addrselect; // select bits map_handler_data m_read; // data for read handler map_handler_data m_write; // data for write handler map_handler_data m_setoffsethd; // data for setoffset handler @@ -362,6 +364,8 @@ void _class :: _name(::address_map &map, device_t &device) \ curentry->set_mask(_mask); #define AM_MIRROR(_mirror) \ curentry->set_mirror(_mirror); +#define AM_SELECT(_select) \ + curentry->set_select(_select); // driver data reads #define AM_READ(_handler) \ diff --git a/src/emu/emumem.cpp b/src/emu/emumem.cpp index 0f530ecd712..ecd950201e0 100644 --- a/src/emu/emumem.cpp +++ b/src/emu/emumem.cpp @@ -67,9 +67,9 @@ Specifies a mask for the addresses in the current bucket. This mask is applied after a positive hit in the bucket specified by AM_RANGE or AM_SPACE, and is computed before accessing the RAM or calling - through to the read/write handler. If you use AM_MIRROR, below, the - mask is ANDed implicitly with the logical NOT of the mirror. The - mask specified by this macro is ANDed against any implicit masks. + through to the read/write handler. If you use AM_MIRROR, below, there + should not be any bits in common between mask and mirror. Same for + select. AM_MIRROR(mirror) Specifies mirror addresses for the given bucket. The current bucket @@ -78,6 +78,12 @@ value of 0x14000 would map the bucket at 0x00000, 0x04000, 0x10000, and 0x14000. + AM_SELECT(select) + Mirrors the addresses for the given bucket and pass the corresponding + address bits to the handler. Very useful for devices with multiple + slots/channels/etc were each slot is on a series of consecutive + addresses regrouping all its registers. + AM_ROM Specifies that this bucket contains ROM data by attaching an internal read handler. If this address space describes the first @@ -1841,6 +1847,133 @@ inline void address_space::adjust_addresses(offs_t &start, offs_t &end, offs_t & mirror = address_to_byte(mirror); } +void address_space::check_optimize_all(const char *function, offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, offs_t addrselect, offs_t &nstart, offs_t &nend, offs_t &nmask, offs_t &nmirror) +{ + if (addrstart > addrend) + fatalerror("%s: In range %x-%x mask %x mirror %x select %x, start address is after the end address.\n", function, addrstart, addrend, addrmask, addrmirror, addrselect); + if (addrstart & ~m_bytemask) + fatalerror("%s: In range %x-%x mask %x mirror %x select %x, start address is outside of the global address mask %x, did you mean %x ?\n", function, addrstart, addrend, addrmask, addrmirror, addrselect, m_bytemask, addrstart & m_bytemask); + if (addrend & ~m_bytemask) + fatalerror("%s: In range %x-%x mask %x mirror %x select %x, end address is outside of the global address mask %x, did you mean %x ?\n", function, addrstart, addrend, addrmask, addrmirror, addrselect, m_bytemask, addrend & m_bytemask); + + offs_t lowbits_mask = (m_config.data_width() >> (3 - m_config.m_addrbus_shift)) - 1; + if (addrstart & lowbits_mask) + fatalerror("%s: In range %x-%x mask %x mirror %x select %x, start address has low bits set, did you mean %x ?\n", function, addrstart, addrend, addrmask, addrmirror, addrselect, addrstart & ~lowbits_mask); + if ((~addrend) & lowbits_mask) + fatalerror("%s: In range %x-%x mask %x mirror %x select %x, end address has low bits unset, did you mean %x ?\n", function, addrstart, addrend, addrmask, addrmirror, addrselect, addrend | lowbits_mask); + + offs_t set_bits = addrstart | addrend; + offs_t changing_bits = addrstart ^ addrend; + // Round up to the nearest power-of-two-minus-one + changing_bits |= changing_bits >> 1; + changing_bits |= changing_bits >> 2; + changing_bits |= changing_bits >> 4; + changing_bits |= changing_bits >> 8; + changing_bits |= changing_bits >> 16; + + if (addrmask & ~m_bytemask) + fatalerror("%s: In range %x-%x mask %x mirror %x select %x, mask is outside of the global address mask %x, did you mean %x ?\n", function, addrstart, addrend, addrmask, addrmirror, addrselect, m_bytemask, addrmask & m_bytemask); + if (addrmirror & ~m_bytemask) + fatalerror("%s: In range %x-%x mask %x mirror %x select %x, mirror is outside of the global address mask %x, did you mean %x ?\n", function, addrstart, addrend, addrmask, addrmirror, addrselect, m_bytemask, addrmirror & m_bytemask); + if (addrselect & ~m_bytemask) + fatalerror("%s: In range %x-%x mask %x mirror %x select %x, select is outside of the global address mask %x, did you mean %x ?\n", function, addrstart, addrend, addrmask, addrmirror, addrselect, m_bytemask, addrselect & m_bytemask); + if (addrmask & ~changing_bits) + fatalerror("%s: In range %x-%x mask %x mirror %x select %x, mask is trying to unmask an unchanging address bit, did you mean %x ?\n", function, addrstart, addrend, addrmask, addrmirror, addrselect, addrmask & changing_bits); + if (addrmirror & changing_bits) + fatalerror("%s: In range %x-%x mask %x mirror %x select %x, mirror touches a changing address bit, did you mean %x ?\n", function, addrstart, addrend, addrmask, addrmirror, addrselect, addrmirror & ~changing_bits); + if (addrselect & changing_bits) + fatalerror("%s: In range %x-%x mask %x mirror %x select %x, select touches a changing address bit, did you mean %x ?\n", function, addrstart, addrend, addrmask, addrmirror, addrselect, addrselect & ~changing_bits); + if (addrmirror & set_bits) + fatalerror("%s: In range %x-%x mask %x mirror %x select %x, mirror touches a set address bit, did you mean %x ?\n", function, addrstart, addrend, addrmask, addrmirror, addrselect, addrmirror & ~set_bits); + if (addrselect & set_bits) + fatalerror("%s: In range %x-%x mask %x mirror %x select %x, select touches a set address bit, did you mean %x ?\n", function, addrstart, addrend, addrmask, addrmirror, addrselect, addrselect & ~set_bits); + if (addrmirror & addrselect) + fatalerror("%s: In range %x-%x mask %x mirror %x select %x, mirror touches a select bit, did you mean %x ?\n", function, addrstart, addrend, addrmask, addrmirror, addrselect, addrmirror & ~addrselect); + + nstart = addrstart; + nend = addrend; + nmask = (addrmask ? addrmask : changing_bits) | addrselect; + nmirror = addrmirror | addrselect; + if(nmirror && !(nstart & changing_bits) && !((~nend) & changing_bits)) { + // If the range covers the a complete power-of-two zone, it is + // possible to remove 1 bits from the mirror, pushing the end + // address. The mask will clamp, and installing the range + // will be faster. + while(nmirror & (changing_bits+1)) { + offs_t bit = nmirror & (changing_bits+1); + nmirror &= ~bit; + nend |= bit; + changing_bits |= bit; + } + } +} + +void address_space::check_optimize_mirror(const char *function, offs_t addrstart, offs_t addrend, offs_t addrmirror, offs_t &nstart, offs_t &nend, offs_t &nmask, offs_t &nmirror) +{ + if (addrstart > addrend) + fatalerror("%s: In range %x-%x mirror %x, start address is after the end address.\n", function, addrstart, addrend, addrmirror); + if (addrstart & ~m_bytemask) + fatalerror("%s: In range %x-%x mirror %x, start address is outside of the global address mask %x, did you mean %x ?\n", function, addrstart, addrend, addrmirror, m_bytemask, addrstart & m_bytemask); + if (addrend & ~m_bytemask) + fatalerror("%s: In range %x-%x mirror %x, end address is outside of the global address mask %x, did you mean %x ?\n", function, addrstart, addrend, addrmirror, m_bytemask, addrend & m_bytemask); + + offs_t lowbits_mask = (m_config.data_width() >> (3 - m_config.m_addrbus_shift)) - 1; + if (addrstart & lowbits_mask) + fatalerror("%s: In range %x-%x mirror %x, start address has low bits set, did you mean %x ?\n", function, addrstart, addrend, addrmirror, addrstart & ~lowbits_mask); + if ((~addrend) & lowbits_mask) + fatalerror("%s: In range %x-%x mirror %x, end address has low bits unset, did you mean %x ?\n", function, addrstart, addrend, addrmirror, addrend | lowbits_mask); + + offs_t set_bits = addrstart | addrend; + offs_t changing_bits = addrstart ^ addrend; + // Round up to the nearest power-of-two-minus-one + changing_bits |= changing_bits >> 1; + changing_bits |= changing_bits >> 2; + changing_bits |= changing_bits >> 4; + changing_bits |= changing_bits >> 8; + changing_bits |= changing_bits >> 16; + + if (addrmirror & ~m_bytemask) + fatalerror("%s: In range %x-%x mirror %x, mirror is outside of the global address mask %x, did you mean %x ?\n", function, addrstart, addrend, addrmirror, m_bytemask, addrmirror & m_bytemask); + if (addrmirror & changing_bits) + fatalerror("%s: In range %x-%x mirror %x, mirror touches a changing address bit, did you mean %x ?\n", function, addrstart, addrend, addrmirror, addrmirror & ~changing_bits); + if (addrmirror & set_bits) + fatalerror("%s: In range %x-%x mirror %x, mirror touches a set address bit, did you mean %x ?\n", function, addrstart, addrend, addrmirror, addrmirror & ~set_bits); + + nstart = addrstart; + nend = addrend; + nmask = changing_bits; + nmirror = addrmirror; + + if(nmirror && !(nstart & changing_bits) && !((~nend) & changing_bits)) { + // If the range covers the a complete power-of-two zone, it is + // possible to remove 1 bits from the mirror, pushing the end + // address. The mask will clamp, and installing the range + // will be faster. + while(nmirror & (changing_bits+1)) { + offs_t bit = nmirror & (changing_bits+1); + nmirror &= ~bit; + nend |= bit; + changing_bits |= bit; + } + } +} + +void address_space::check_address(const char *function, offs_t addrstart, offs_t addrend) +{ + if (addrstart > addrend) + fatalerror("%s: In range %x-%x, start address is after the end address.\n", function, addrstart, addrend); + if (addrstart & ~m_bytemask) + fatalerror("%s: In range %x-%x, start address is outside of the global address mask %x, did you mean %x ?\n", function, addrstart, addrend, m_bytemask, addrstart & m_bytemask); + if (addrend & ~m_bytemask) + fatalerror("%s: In range %x-%x, end address is outside of the global address mask %x, did you mean %x ?\n", function, addrstart, addrend, m_bytemask, addrend & m_bytemask); + + offs_t lowbits_mask = (m_config.data_width() >> (3 - m_config.m_addrbus_shift)) - 1; + if (addrstart & lowbits_mask) + fatalerror("%s: In range %x-%x, start address has low bits set, did you mean %x ?\n", function, addrstart, addrend, addrstart & ~lowbits_mask); + if ((~addrend) & lowbits_mask) + fatalerror("%s: In range %x-%x, end address has low bits unset, did you mean %x ?\n", function, addrstart, addrend, addrend | lowbits_mask); +} + //------------------------------------------------- // prepare_map - allocate the address map and @@ -1989,44 +2122,44 @@ void address_space::populate_map_entry(const address_map_entry &entry, read_or_w // fall through to the RAM case otherwise case AMH_RAM: - install_ram_generic(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror, readorwrite, nullptr); + install_ram_generic(entry.m_addrstart, entry.m_addrend, entry.m_addrmirror, readorwrite, nullptr); break; case AMH_NOP: - unmap_generic(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror, readorwrite, true); + unmap_generic(entry.m_addrstart, entry.m_addrend, entry.m_addrmirror, readorwrite, true); break; case AMH_UNMAP: - unmap_generic(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror, readorwrite, false); + unmap_generic(entry.m_addrstart, entry.m_addrend, entry.m_addrmirror, readorwrite, false); break; case AMH_DEVICE_DELEGATE: if (readorwrite == ROW_READ) switch (data.m_bits) { - case 8: install_read_handler(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror, read8_delegate(entry.m_rproto8, entry.m_devbase), data.m_mask); break; - case 16: install_read_handler(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror, read16_delegate(entry.m_rproto16, entry.m_devbase), data.m_mask); break; - case 32: install_read_handler(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror, read32_delegate(entry.m_rproto32, entry.m_devbase), data.m_mask); break; - case 64: install_read_handler(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror, read64_delegate(entry.m_rproto64, entry.m_devbase), data.m_mask); break; + case 8: install_read_handler(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror, entry.m_addrselect, read8_delegate(entry.m_rproto8, entry.m_devbase), data.m_mask); break; + case 16: install_read_handler(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror, entry.m_addrselect, read16_delegate(entry.m_rproto16, entry.m_devbase), data.m_mask); break; + case 32: install_read_handler(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror, entry.m_addrselect, read32_delegate(entry.m_rproto32, entry.m_devbase), data.m_mask); break; + case 64: install_read_handler(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror, entry.m_addrselect, read64_delegate(entry.m_rproto64, entry.m_devbase), data.m_mask); break; } else switch (data.m_bits) { - case 8: install_write_handler(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror, write8_delegate(entry.m_wproto8, entry.m_devbase), data.m_mask); break; - case 16: install_write_handler(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror, write16_delegate(entry.m_wproto16, entry.m_devbase), data.m_mask); break; - case 32: install_write_handler(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror, write32_delegate(entry.m_wproto32, entry.m_devbase), data.m_mask); break; - case 64: install_write_handler(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror, write64_delegate(entry.m_wproto64, entry.m_devbase), data.m_mask); break; + case 8: install_write_handler(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror, entry.m_addrselect, write8_delegate(entry.m_wproto8, entry.m_devbase), data.m_mask); break; + case 16: install_write_handler(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror, entry.m_addrselect, write16_delegate(entry.m_wproto16, entry.m_devbase), data.m_mask); break; + case 32: install_write_handler(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror, entry.m_addrselect, write32_delegate(entry.m_wproto32, entry.m_devbase), data.m_mask); break; + case 64: install_write_handler(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror, entry.m_addrselect, write64_delegate(entry.m_wproto64, entry.m_devbase), data.m_mask); break; } break; case AMH_PORT: - install_readwrite_port(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror, + install_readwrite_port(entry.m_addrstart, entry.m_addrend, entry.m_addrmirror, (readorwrite == ROW_READ) ? data.m_tag : nullptr, (readorwrite == ROW_WRITE) ? data.m_tag : nullptr); break; case AMH_BANK: - install_bank_generic(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror, + install_bank_generic(entry.m_addrstart, entry.m_addrend, entry.m_addrmirror, (readorwrite == ROW_READ) ? data.m_tag : nullptr, (readorwrite == ROW_WRITE) ? data.m_tag : nullptr); break; @@ -2043,7 +2176,7 @@ void address_space::populate_map_entry(const address_map_entry &entry, read_or_w void address_space::populate_map_entry_setoffset(const address_map_entry &entry) { install_setoffset_handler(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, - entry.m_addrmirror, setoffset_delegate(entry.m_soproto, entry.m_devbase), entry.m_setoffsethd.m_mask); + entry.m_addrmirror, entry.m_addrselect, setoffset_delegate(entry.m_soproto, entry.m_devbase), entry.m_setoffsethd.m_mask); } //------------------------------------------------- @@ -2251,21 +2384,24 @@ void address_space::dump_map(FILE *file, read_or_write readorwrite) // unmap - unmap a section of address space //------------------------------------------------- -void address_space::unmap_generic(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read_or_write readorwrite, bool quiet) +void address_space::unmap_generic(offs_t addrstart, offs_t addrend, offs_t addrmirror, read_or_write readorwrite, bool quiet) { - VPRINTF(("address_space::unmap(%s-%s mask=%s mirror=%s, %s, %s)\n", + VPRINTF(("address_space::unmap(%s-%s mirror=%s, %s, %s)\n", core_i64_hex_format(addrstart, m_addrchars), core_i64_hex_format(addrend, m_addrchars), - core_i64_hex_format(addrmask, m_addrchars), core_i64_hex_format(addrmirror, m_addrchars), + core_i64_hex_format(addrmirror, m_addrchars), (readorwrite == ROW_READ) ? "read" : (readorwrite == ROW_WRITE) ? "write" : (readorwrite == ROW_READWRITE) ? "read/write" : "??", quiet ? "quiet" : "normal")); + offs_t nstart, nend, nmask, nmirror; + check_optimize_mirror("unmap_generic", addrstart, addrend, addrmirror, nstart, nend, nmask, nmirror); + // read space if (readorwrite == ROW_READ || readorwrite == ROW_READWRITE) - read().map_range(addrstart, addrend, addrmask, addrmirror, quiet ? STATIC_NOP : STATIC_UNMAP); + read().map_range(nstart, nend, nmask, nmirror, quiet ? STATIC_NOP : STATIC_UNMAP); // write space if (readorwrite == ROW_WRITE || readorwrite == ROW_READWRITE) - write().map_range(addrstart, addrend, addrmask, addrmirror, quiet ? STATIC_NOP : STATIC_UNMAP); + write().map_range(nstart, nend, nmask, nmirror, quiet ? STATIC_NOP : STATIC_UNMAP); } @@ -2276,6 +2412,7 @@ void address_space::unmap_generic(offs_t addrstart, offs_t addrend, offs_t addrm void address_space::install_device_delegate(offs_t addrstart, offs_t addrend, device_t &device, address_map_delegate &delegate, int bits, UINT64 unitmask) { + check_address("install_device_delegate", addrstart, addrend); address_map map(*this, addrstart, addrend, bits, unitmask, device, delegate); map.uplift_submaps(machine(), m_device, device, endianness()); populate_from_map(&map); @@ -2288,13 +2425,16 @@ void address_space::install_device_delegate(offs_t addrstart, offs_t addrend, de // handler into this address space //------------------------------------------------- -void address_space::install_readwrite_port(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, const char *rtag, const char *wtag) +void address_space::install_readwrite_port(offs_t addrstart, offs_t addrend, offs_t addrmirror, const char *rtag, const char *wtag) { - VPRINTF(("address_space::install_readwrite_port(%s-%s mask=%s mirror=%s, read=\"%s\" / write=\"%s\")\n", + VPRINTF(("address_space::install_readwrite_port(%s-%s mirror=%s, read=\"%s\" / write=\"%s\")\n", core_i64_hex_format(addrstart, m_addrchars), core_i64_hex_format(addrend, m_addrchars), - core_i64_hex_format(addrmask, m_addrchars), core_i64_hex_format(addrmirror, m_addrchars), + core_i64_hex_format(addrmirror, m_addrchars), (rtag != nullptr) ? rtag : "(none)", (wtag != nullptr) ? wtag : "(none)")); + offs_t nstart, nend, nmask, nmirror; + check_optimize_mirror("install_readwrite_port", addrstart, addrend, addrmirror, nstart, nend, nmask, nmirror); + // read handler if (rtag != nullptr) { @@ -2304,7 +2444,7 @@ void address_space::install_readwrite_port(offs_t addrstart, offs_t addrend, off throw emu_fatalerror("Attempted to map non-existent port '%s' for read in space %s of device '%s'\n", rtag, m_name, m_device.tag()); // map the range and set the ioport - read().handler_map_range(addrstart, addrend, addrmask, addrmirror).set_ioport(*port); + read().handler_map_range(nstart, nend, nmask, nmirror).set_ioport(*port); } if (wtag != nullptr) @@ -2315,7 +2455,7 @@ void address_space::install_readwrite_port(offs_t addrstart, offs_t addrend, off fatalerror("Attempted to map non-existent port '%s' for write in space %s of device '%s'\n", wtag, m_name, m_device.tag()); // map the range and set the ioport - write().handler_map_range(addrstart, addrend, addrmask, addrmirror).set_ioport(*port); + write().handler_map_range(nstart, nend, nmask, nmirror).set_ioport(*port); } // update the memory dump @@ -2328,27 +2468,30 @@ void address_space::install_readwrite_port(offs_t addrstart, offs_t addrend, off // mapping to a particular bank //------------------------------------------------- -void address_space::install_bank_generic(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, const char *rtag, const char *wtag) +void address_space::install_bank_generic(offs_t addrstart, offs_t addrend, offs_t addrmirror, const char *rtag, const char *wtag) { - VPRINTF(("address_space::install_readwrite_bank(%s-%s mask=%s mirror=%s, read=\"%s\" / write=\"%s\")\n", + VPRINTF(("address_space::install_readwrite_bank(%s-%s mirror=%s, read=\"%s\" / write=\"%s\")\n", core_i64_hex_format(addrstart, m_addrchars), core_i64_hex_format(addrend, m_addrchars), - core_i64_hex_format(addrmask, m_addrchars), core_i64_hex_format(addrmirror, m_addrchars), + core_i64_hex_format(addrmirror, m_addrchars), (rtag != nullptr) ? rtag : "(none)", (wtag != nullptr) ? wtag : "(none)")); + offs_t nstart, nend, nmask, nmirror; + check_optimize_mirror("install_bank_generic", addrstart, addrend, addrmirror, nstart, nend, nmask, nmirror); + // map the read bank if (rtag != nullptr) { std::string fulltag = device().siblingtag(rtag); - memory_bank &bank = bank_find_or_allocate(fulltag.c_str(), addrstart, addrend, addrmask, addrmirror, ROW_READ); - read().map_range(addrstart, addrend, addrmask, addrmirror, bank.index()); + memory_bank &bank = bank_find_or_allocate(fulltag.c_str(), addrstart, addrend, addrmirror, ROW_READ); + read().map_range(nstart, nend, nmask, nmirror, bank.index()); } // map the write bank if (wtag != nullptr) { std::string fulltag = device().siblingtag(wtag); - memory_bank &bank = bank_find_or_allocate(fulltag.c_str(), addrstart, addrend, addrmask, addrmirror, ROW_WRITE); - write().map_range(addrstart, addrend, addrmask, addrmirror, bank.index()); + memory_bank &bank = bank_find_or_allocate(fulltag.c_str(), addrstart, addrend, addrmirror, ROW_WRITE); + write().map_range(nstart, nend, nmask, nmirror, bank.index()); } // update the memory dump @@ -2356,23 +2499,26 @@ void address_space::install_bank_generic(offs_t addrstart, offs_t addrend, offs_ } -void address_space::install_bank_generic(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, memory_bank *rbank, memory_bank *wbank) +void address_space::install_bank_generic(offs_t addrstart, offs_t addrend, offs_t addrmirror, memory_bank *rbank, memory_bank *wbank) { - VPRINTF(("address_space::install_readwrite_bank(%s-%s mask=%s mirror=%s, read=\"%s\" / write=\"%s\")\n", + VPRINTF(("address_space::install_readwrite_bank(%s-%s mirror=%s, read=\"%s\" / write=\"%s\")\n", core_i64_hex_format(addrstart, m_addrchars), core_i64_hex_format(addrend, m_addrchars), - core_i64_hex_format(addrmask, m_addrchars), core_i64_hex_format(addrmirror, m_addrchars), + core_i64_hex_format(addrmirror, m_addrchars), (rbank != nullptr) ? rbank->tag() : "(none)", (wbank != nullptr) ? wbank->tag() : "(none)")); + offs_t nstart, nend, nmask, nmirror; + check_optimize_mirror("install_bank_generic", addrstart, addrend, addrmirror, nstart, nend, nmask, nmirror); + // map the read bank if (rbank != nullptr) { - read().map_range(addrstart, addrend, addrmask, addrmirror, rbank->index()); + read().map_range(nstart, nend, nmask, nmirror, rbank->index()); } // map the write bank if (wbank != nullptr) { - write().map_range(addrstart, addrend, addrmask, addrmirror, wbank->index()); + write().map_range(nstart, nend, nmask, nmirror, wbank->index()); } // update the memory dump @@ -2385,20 +2531,23 @@ void address_space::install_bank_generic(offs_t addrstart, offs_t addrend, offs_ // RAM region into the given address space //------------------------------------------------- -void address_space::install_ram_generic(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read_or_write readorwrite, void *baseptr) +void address_space::install_ram_generic(offs_t addrstart, offs_t addrend, offs_t addrmirror, read_or_write readorwrite, void *baseptr) { - VPRINTF(("address_space::install_ram_generic(%s-%s mask=%s mirror=%s, %s, %p)\n", + VPRINTF(("address_space::install_ram_generic(%s-%s mirror=%s, %s, %p)\n", core_i64_hex_format(addrstart, m_addrchars), core_i64_hex_format(addrend, m_addrchars), - core_i64_hex_format(addrmask, m_addrchars), core_i64_hex_format(addrmirror, m_addrchars), + core_i64_hex_format(addrmirror, m_addrchars), (readorwrite == ROW_READ) ? "read" : (readorwrite == ROW_WRITE) ? "write" : (readorwrite == ROW_READWRITE) ? "read/write" : "??", baseptr)); + offs_t nstart, nend, nmask, nmirror; + check_optimize_mirror("install_ram_generic", addrstart, addrend, addrmirror, nstart, nend, nmask, nmirror); + // map for read if (readorwrite == ROW_READ || readorwrite == ROW_READWRITE) { // find a bank and map it - memory_bank &bank = bank_find_or_allocate(nullptr, addrstart, addrend, addrmask, addrmirror, ROW_READ); - read().map_range(addrstart, addrend, addrmask, addrmirror, bank.index()); + memory_bank &bank = bank_find_or_allocate(nullptr, addrstart, addrend, addrmirror, ROW_READ); + read().map_range(nstart, nend, nmask, nmirror, bank.index()); // if we are provided a pointer, set it if (baseptr != nullptr) @@ -2426,8 +2575,8 @@ void address_space::install_ram_generic(offs_t addrstart, offs_t addrend, offs_t if (readorwrite == ROW_WRITE || readorwrite == ROW_READWRITE) { // find a bank and map it - memory_bank &bank = bank_find_or_allocate(nullptr, addrstart, addrend, addrmask, addrmirror, ROW_WRITE); - write().map_range(addrstart, addrend, addrmask, addrmirror, bank.index()); + memory_bank &bank = bank_find_or_allocate(nullptr, addrstart, addrend, addrmirror, ROW_WRITE); + write().map_range(nstart, nend, nmask, nmirror, bank.index()); // if we are provided a pointer, set it if (baseptr != nullptr) @@ -2458,32 +2607,38 @@ void address_space::install_ram_generic(offs_t addrstart, offs_t addrend, offs_t // delegate handlers for the space //------------------------------------------------- -void address_space::install_read_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read8_delegate handler, UINT64 unitmask) +void address_space::install_read_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, offs_t addrselect, read8_delegate handler, UINT64 unitmask) { VPRINTF(("address_space::install_read_handler(%s-%s mask=%s mirror=%s, %s, %s)\n", core_i64_hex_format(addrstart, m_addrchars), core_i64_hex_format(addrend, m_addrchars), core_i64_hex_format(addrmask, m_addrchars), core_i64_hex_format(addrmirror, m_addrchars), handler.name(), core_i64_hex_format(unitmask, data_width() / 4))); - read().handler_map_range(addrstart, addrend, addrmask, addrmirror, unitmask).set_delegate(handler); + offs_t nstart, nend, nmask, nmirror; + check_optimize_all("install_read_handler", addrstart, addrend, addrmask, addrmirror, addrselect, nstart, nend, nmask, nmirror); + + read().handler_map_range(nstart, nend, nmask, nmirror, unitmask).set_delegate(handler); generate_memdump(machine()); } -void address_space::install_write_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, write8_delegate handler, UINT64 unitmask) +void address_space::install_write_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, offs_t addrselect, write8_delegate handler, UINT64 unitmask) { VPRINTF(("address_space::install_write_handler(%s-%s mask=%s mirror=%s, %s, %s)\n", core_i64_hex_format(addrstart, m_addrchars), core_i64_hex_format(addrend, m_addrchars), core_i64_hex_format(addrmask, m_addrchars), core_i64_hex_format(addrmirror, m_addrchars), handler.name(), core_i64_hex_format(unitmask, data_width() / 4))); - write().handler_map_range(addrstart, addrend, addrmask, addrmirror, unitmask).set_delegate(handler); + offs_t nstart, nend, nmask, nmirror; + check_optimize_all("install_write_handler", addrstart, addrend, addrmask, addrmirror, addrselect, nstart, nend, nmask, nmirror); + + write().handler_map_range(nstart, nend, nmask, nmirror, unitmask).set_delegate(handler); generate_memdump(machine()); } -void address_space::install_readwrite_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read8_delegate rhandler, write8_delegate whandler, UINT64 unitmask) +void address_space::install_readwrite_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, offs_t addrselect, read8_delegate rhandler, write8_delegate whandler, UINT64 unitmask) { - install_read_handler(addrstart, addrend, addrmask, addrmirror, rhandler, unitmask); - install_write_handler(addrstart, addrend, addrmask, addrmirror, whandler, unitmask); + install_read_handler(addrstart, addrend, addrmask, addrmirror, addrselect, rhandler, unitmask); + install_write_handler(addrstart, addrend, addrmask, addrmirror, addrselect, whandler, unitmask); } @@ -2492,22 +2647,26 @@ void address_space::install_readwrite_handler(offs_t addrstart, offs_t addrend, // delegate handlers for the space //------------------------------------------------- -void address_space::install_read_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read16_delegate handler, UINT64 unitmask) +void address_space::install_read_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, offs_t addrselect, read16_delegate handler, UINT64 unitmask) { - read().handler_map_range(addrstart, addrend, addrmask, addrmirror, unitmask).set_delegate(handler); + offs_t nstart, nend, nmask, nmirror; + check_optimize_all("install_read_handler", addrstart, addrend, addrmask, addrmirror, addrselect, nstart, nend, nmask, nmirror); + read().handler_map_range(nstart, nend, nmask, nmirror, unitmask).set_delegate(handler); generate_memdump(machine()); } -void address_space::install_write_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, write16_delegate handler, UINT64 unitmask) +void address_space::install_write_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, offs_t addrselect, write16_delegate handler, UINT64 unitmask) { - write().handler_map_range(addrstart, addrend, addrmask, addrmirror, unitmask).set_delegate(handler); + offs_t nstart, nend, nmask, nmirror; + check_optimize_all("install_write_handler", addrstart, addrend, addrmask, addrmirror, addrselect, nstart, nend, nmask, nmirror); + write().handler_map_range(nstart, nend, nmask, addrmirror, unitmask).set_delegate(handler); generate_memdump(machine()); } -void address_space::install_readwrite_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read16_delegate rhandler, write16_delegate whandler, UINT64 unitmask) +void address_space::install_readwrite_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, offs_t addrselect, read16_delegate rhandler, write16_delegate whandler, UINT64 unitmask) { - install_read_handler(addrstart, addrend, addrmask, addrmirror, rhandler, unitmask); - install_write_handler(addrstart, addrend, addrmask, addrmirror, whandler, unitmask); + install_read_handler(addrstart, addrend, addrmask, addrmirror, addrselect, rhandler, unitmask); + install_write_handler(addrstart, addrend, addrmask, addrmirror, addrselect, whandler, unitmask); } @@ -2516,22 +2675,26 @@ void address_space::install_readwrite_handler(offs_t addrstart, offs_t addrend, // delegate handlers for the space //------------------------------------------------- -void address_space::install_read_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read32_delegate handler, UINT64 unitmask) +void address_space::install_read_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, offs_t addrselect, read32_delegate handler, UINT64 unitmask) { - read().handler_map_range(addrstart, addrend, addrmask, addrmirror, unitmask).set_delegate(handler); + offs_t nstart, nend, nmask, nmirror; + check_optimize_all("install_read_handler", addrstart, addrend, addrmask, addrmirror, addrselect, nstart, nend, nmask, nmirror); + read().handler_map_range(nstart, nend, nmask, nmirror, unitmask).set_delegate(handler); generate_memdump(machine()); } -void address_space::install_write_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, write32_delegate handler, UINT64 unitmask) +void address_space::install_write_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, offs_t addrselect, write32_delegate handler, UINT64 unitmask) { - write().handler_map_range(addrstart, addrend, addrmask, addrmirror, unitmask).set_delegate(handler); + offs_t nstart, nend, nmask, nmirror; + check_optimize_all("install_write_handler", addrstart, addrend, addrmask, addrmirror, addrselect, nstart, nend, nmask, nmirror); + write().handler_map_range(nstart, nend, nmask, nmirror, unitmask).set_delegate(handler); generate_memdump(machine()); } -void address_space::install_readwrite_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read32_delegate rhandler, write32_delegate whandler, UINT64 unitmask) +void address_space::install_readwrite_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, offs_t addrselect, read32_delegate rhandler, write32_delegate whandler, UINT64 unitmask) { - install_read_handler(addrstart, addrend, addrmask, addrmirror, rhandler, unitmask); - install_write_handler(addrstart, addrend, addrmask, addrmirror, whandler, unitmask); + install_read_handler(addrstart, addrend, addrmask, addrmirror, addrselect, rhandler, unitmask); + install_write_handler(addrstart, addrend, addrmask, addrmirror, addrselect, whandler, unitmask); } @@ -2540,22 +2703,26 @@ void address_space::install_readwrite_handler(offs_t addrstart, offs_t addrend, // delegate handlers for the space //------------------------------------------------- -void address_space::install_read_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read64_delegate handler, UINT64 unitmask) +void address_space::install_read_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, offs_t addrselect, read64_delegate handler, UINT64 unitmask) { - read().handler_map_range(addrstart, addrend, addrmask, addrmirror, unitmask).set_delegate(handler); + offs_t nstart, nend, nmask, nmirror; + check_optimize_all("install_read_handler", addrstart, addrend, addrmask, addrmirror, addrselect, nstart, nend, nmask, nmirror); + read().handler_map_range(nstart, nend, nmask, nmirror, unitmask).set_delegate(handler); generate_memdump(machine()); } -void address_space::install_write_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, write64_delegate handler, UINT64 unitmask) +void address_space::install_write_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, offs_t addrselect, write64_delegate handler, UINT64 unitmask) { - write().handler_map_range(addrstart, addrend, addrmask, addrmirror, unitmask).set_delegate(handler); + offs_t nstart, nend, nmask, nmirror; + check_optimize_all("install_write_handler", addrstart, addrend, addrmask, addrmirror, addrselect, nstart, nend, nmask, nmirror); + write().handler_map_range(nstart, nend, nmask, nmirror, unitmask).set_delegate(handler); generate_memdump(machine()); } -void address_space::install_readwrite_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read64_delegate rhandler, write64_delegate whandler, UINT64 unitmask) +void address_space::install_readwrite_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, offs_t addrselect, read64_delegate rhandler, write64_delegate whandler, UINT64 unitmask) { - install_read_handler(addrstart, addrend, addrmask, addrmirror, rhandler, unitmask); - install_write_handler(addrstart, addrend, addrmask, addrmirror, whandler, unitmask); + install_read_handler(addrstart, addrend, addrmask, addrmirror, addrselect, rhandler, unitmask); + install_write_handler(addrstart, addrend, addrmask, addrmirror, addrselect, whandler, unitmask); } @@ -2563,14 +2730,16 @@ void address_space::install_readwrite_handler(offs_t addrstart, offs_t addrend, // install_setoffset_handler - install set_offset delegate handlers for the space //----------------------------------------------------------------------- -void address_space::install_setoffset_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, setoffset_delegate handler, UINT64 unitmask) +void address_space::install_setoffset_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, offs_t addrselect, setoffset_delegate handler, UINT64 unitmask) { VPRINTF(("address_space::install_setoffset_handler(%s-%s mask=%s mirror=%s, %s, %s)\n", core_i64_hex_format(addrstart, m_addrchars), core_i64_hex_format(addrend, m_addrchars), core_i64_hex_format(addrmask, m_addrchars), core_i64_hex_format(addrmirror, m_addrchars), handler.name(), core_i64_hex_format(unitmask, data_width() / 4))); - setoffset().handler_map_range(addrstart, addrend, addrmask, addrmirror, unitmask).set_delegate(handler); + offs_t nstart, nend, nmask, nmirror; + check_optimize_all("install_setoffset_handler", addrstart, addrend, addrmask, addrmirror, addrselect, nstart, nend, nmask, nmirror); + setoffset().handler_map_range(nstart, nend, nmask, nmirror, unitmask).set_delegate(handler); } //************************************************************************** @@ -2661,12 +2830,12 @@ bool address_space::needs_backing_store(const address_map_entry &entry) // read/write handler //------------------------------------------------- -memory_bank &address_space::bank_find_or_allocate(const char *tag, offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read_or_write readorwrite) +memory_bank &address_space::bank_find_or_allocate(const char *tag, offs_t addrstart, offs_t addrend, offs_t addrmirror, read_or_write readorwrite) { // adjust the addresses, handling mirrors and such offs_t bytemirror = addrmirror; offs_t bytestart = addrstart; - offs_t bytemask = addrmask; + offs_t bytemask = 0; offs_t byteend = addrend; adjust_addresses(bytestart, byteend, bytemask, bytemirror); diff --git a/src/emu/emumem.h b/src/emu/emumem.h index 25d9e7c80c8..3e8ed500dea 100644 --- a/src/emu/emumem.h +++ b/src/emu/emumem.h @@ -354,48 +354,40 @@ public: direct_update_delegate set_direct_update_handler(direct_update_delegate function) { return m_direct->set_direct_update(function); } // umap ranges (short form) - void unmap_read(offs_t addrstart, offs_t addrend) { unmap_read(addrstart, addrend, 0, 0); } - void unmap_write(offs_t addrstart, offs_t addrend) { unmap_write(addrstart, addrend, 0, 0); } - void unmap_readwrite(offs_t addrstart, offs_t addrend) { unmap_readwrite(addrstart, addrend, 0, 0); } - void nop_read(offs_t addrstart, offs_t addrend) { nop_read(addrstart, addrend, 0, 0); } - void nop_write(offs_t addrstart, offs_t addrend) { nop_write(addrstart, addrend, 0, 0); } - void nop_readwrite(offs_t addrstart, offs_t addrend) { nop_readwrite(addrstart, addrend, 0, 0); } - - // umap ranges (with mirror/mask) - void unmap_read(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror) { unmap_generic(addrstart, addrend, addrmask, addrmirror, ROW_READ, false); } - void unmap_write(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror) { unmap_generic(addrstart, addrend, addrmask, addrmirror, ROW_WRITE, false); } - void unmap_readwrite(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror) { unmap_generic(addrstart, addrend, addrmask, addrmirror, ROW_READWRITE, false); } - void nop_read(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror) { unmap_generic(addrstart, addrend, addrmask, addrmirror, ROW_READ, true); } - void nop_write(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror) { unmap_generic(addrstart, addrend, addrmask, addrmirror, ROW_WRITE, true); } - void nop_readwrite(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror) { unmap_generic(addrstart, addrend, addrmask, addrmirror, ROW_READWRITE, true); } + void unmap_read(offs_t addrstart, offs_t addrend, offs_t addrmirror = 0) { unmap_generic(addrstart, addrend, addrmirror, ROW_READ, false); } + void unmap_write(offs_t addrstart, offs_t addrend, offs_t addrmirror = 0) { unmap_generic(addrstart, addrend, addrmirror, ROW_WRITE, false); } + void unmap_readwrite(offs_t addrstart, offs_t addrend, offs_t addrmirror = 0) { unmap_generic(addrstart, addrend, addrmirror, ROW_READWRITE, false); } + void nop_read(offs_t addrstart, offs_t addrend, offs_t addrmirror = 0) { unmap_generic(addrstart, addrend, addrmirror, ROW_READ, true); } + void nop_write(offs_t addrstart, offs_t addrend, offs_t addrmirror = 0) { unmap_generic(addrstart, addrend, addrmirror, ROW_WRITE, true); } + void nop_readwrite(offs_t addrstart, offs_t addrend, offs_t addrmirror = 0) { unmap_generic(addrstart, addrend, addrmirror, ROW_READWRITE, true); } // install ports, banks, RAM (short form) - void install_read_port(offs_t addrstart, offs_t addrend, const char *rtag) { install_read_port(addrstart, addrend, 0, 0, rtag); } - void install_write_port(offs_t addrstart, offs_t addrend, const char *wtag) { install_write_port(addrstart, addrend, 0, 0, wtag); } - void install_readwrite_port(offs_t addrstart, offs_t addrend, const char *rtag, const char *wtag) { install_readwrite_port(addrstart, addrend, 0, 0, rtag, wtag); } - void install_read_bank(offs_t addrstart, offs_t addrend, const char *tag) { install_read_bank(addrstart, addrend, 0, 0, tag); } - void install_write_bank(offs_t addrstart, offs_t addrend, const char *tag) { install_write_bank(addrstart, addrend, 0, 0, tag); } - void install_readwrite_bank(offs_t addrstart, offs_t addrend, const char *tag) { install_readwrite_bank(addrstart, addrend, 0, 0, tag); } - void install_read_bank(offs_t addrstart, offs_t addrend, memory_bank *bank) { install_read_bank(addrstart, addrend, 0, 0, bank); } - void install_write_bank(offs_t addrstart, offs_t addrend, memory_bank *bank) { install_write_bank(addrstart, addrend, 0, 0, bank); } - void install_readwrite_bank(offs_t addrstart, offs_t addrend, memory_bank *bank) { install_readwrite_bank(addrstart, addrend, 0, 0, bank); } - void install_rom(offs_t addrstart, offs_t addrend, void *baseptr = nullptr) { install_rom(addrstart, addrend, 0, 0, baseptr); } - void install_writeonly(offs_t addrstart, offs_t addrend, void *baseptr = nullptr) { install_writeonly(addrstart, addrend, 0, 0, baseptr); } - void install_ram(offs_t addrstart, offs_t addrend, void *baseptr = nullptr) { install_ram(addrstart, addrend, 0, 0, baseptr); } + void install_read_port(offs_t addrstart, offs_t addrend, const char *rtag) { install_read_port(addrstart, addrend, 0, rtag); } + void install_write_port(offs_t addrstart, offs_t addrend, const char *wtag) { install_write_port(addrstart, addrend, 0, wtag); } + void install_readwrite_port(offs_t addrstart, offs_t addrend, const char *rtag, const char *wtag) { install_readwrite_port(addrstart, addrend, 0, rtag, wtag); } + void install_read_bank(offs_t addrstart, offs_t addrend, const char *tag) { install_read_bank(addrstart, addrend, 0, tag); } + void install_write_bank(offs_t addrstart, offs_t addrend, const char *tag) { install_write_bank(addrstart, addrend, 0, tag); } + void install_readwrite_bank(offs_t addrstart, offs_t addrend, const char *tag) { install_readwrite_bank(addrstart, addrend, 0, tag); } + void install_read_bank(offs_t addrstart, offs_t addrend, memory_bank *bank) { install_read_bank(addrstart, addrend, 0, bank); } + void install_write_bank(offs_t addrstart, offs_t addrend, memory_bank *bank) { install_write_bank(addrstart, addrend, 0, bank); } + void install_readwrite_bank(offs_t addrstart, offs_t addrend, memory_bank *bank) { install_readwrite_bank(addrstart, addrend, 0, bank); } + void install_rom(offs_t addrstart, offs_t addrend, void *baseptr = nullptr) { install_rom(addrstart, addrend, 0, baseptr); } + void install_writeonly(offs_t addrstart, offs_t addrend, void *baseptr = nullptr) { install_writeonly(addrstart, addrend, 0, baseptr); } + void install_ram(offs_t addrstart, offs_t addrend, void *baseptr = nullptr) { install_ram(addrstart, addrend, 0, baseptr); } // install ports, banks, RAM (with mirror/mask) - void install_read_port(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, const char *rtag) { install_readwrite_port(addrstart, addrend, addrmask, addrmirror, rtag, nullptr); } - void install_write_port(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, const char *wtag) { install_readwrite_port(addrstart, addrend, addrmask, addrmirror, nullptr, wtag); } - void install_readwrite_port(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, const char *rtag, const char *wtag); - void install_read_bank(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, const char *tag) { install_bank_generic(addrstart, addrend, addrmask, addrmirror, tag, nullptr); } - void install_write_bank(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, const char *tag) { install_bank_generic(addrstart, addrend, addrmask, addrmirror, nullptr, tag); } - void install_readwrite_bank(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, const char *tag) { install_bank_generic(addrstart, addrend, addrmask, addrmirror, tag, tag); } - void install_read_bank(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, memory_bank *bank) { install_bank_generic(addrstart, addrend, addrmask, addrmirror, bank, nullptr); } - void install_write_bank(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, memory_bank *bank) { install_bank_generic(addrstart, addrend, addrmask, addrmirror, nullptr, bank); } - void install_readwrite_bank(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, memory_bank *bank) { install_bank_generic(addrstart, addrend, addrmask, addrmirror, bank, bank); } - void install_rom(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, void *baseptr = nullptr) { install_ram_generic(addrstart, addrend, addrmask, addrmirror, ROW_READ, baseptr); } - void install_writeonly(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, void *baseptr = nullptr) { install_ram_generic(addrstart, addrend, addrmask, addrmirror, ROW_WRITE, baseptr); } - void install_ram(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, void *baseptr = nullptr) { install_ram_generic(addrstart, addrend, addrmask, addrmirror, ROW_READWRITE, baseptr); } + void install_read_port(offs_t addrstart, offs_t addrend, offs_t addrmirror, const char *rtag) { install_readwrite_port(addrstart, addrend, addrmirror, rtag, nullptr); } + void install_write_port(offs_t addrstart, offs_t addrend, offs_t addrmirror, const char *wtag) { install_readwrite_port(addrstart, addrend, addrmirror, nullptr, wtag); } + void install_readwrite_port(offs_t addrstart, offs_t addrend, offs_t addrmirror, const char *rtag, const char *wtag); + void install_read_bank(offs_t addrstart, offs_t addrend, offs_t addrmirror, const char *tag) { install_bank_generic(addrstart, addrend, addrmirror, tag, nullptr); } + void install_write_bank(offs_t addrstart, offs_t addrend, offs_t addrmirror, const char *tag) { install_bank_generic(addrstart, addrend, addrmirror, nullptr, tag); } + void install_readwrite_bank(offs_t addrstart, offs_t addrend, offs_t addrmirror, const char *tag) { install_bank_generic(addrstart, addrend, addrmirror, tag, tag); } + void install_read_bank(offs_t addrstart, offs_t addrend, offs_t addrmirror, memory_bank *bank) { install_bank_generic(addrstart, addrend, addrmirror, bank, nullptr); } + void install_write_bank(offs_t addrstart, offs_t addrend, offs_t addrmirror, memory_bank *bank) { install_bank_generic(addrstart, addrend, addrmirror, nullptr, bank); } + void install_readwrite_bank(offs_t addrstart, offs_t addrend, offs_t addrmirror, memory_bank *bank) { install_bank_generic(addrstart, addrend, addrmirror, bank, bank); } + void install_rom(offs_t addrstart, offs_t addrend, offs_t addrmirror, void *baseptr = nullptr) { install_ram_generic(addrstart, addrend, addrmirror, ROW_READ, baseptr); } + void install_writeonly(offs_t addrstart, offs_t addrend, offs_t addrmirror, void *baseptr = nullptr) { install_ram_generic(addrstart, addrend, addrmirror, ROW_WRITE, baseptr); } + void install_ram(offs_t addrstart, offs_t addrend, offs_t addrmirror, void *baseptr = nullptr) { install_ram_generic(addrstart, addrend, addrmirror, ROW_READWRITE, baseptr); } // install device memory maps template <typename T> void install_device(offs_t addrstart, offs_t addrend, T &device, void (T::*map)(address_map &map, device_t &device), int bits = 0, UINT64 unitmask = 0) { @@ -406,36 +398,36 @@ public: void install_device_delegate(offs_t addrstart, offs_t addrend, device_t &device, address_map_delegate &map, int bits = 0, UINT64 unitmask = 0); // install setoffset handler - void install_setoffset_handler(offs_t addrstart, offs_t addrend, setoffset_delegate sohandler, UINT64 unitmask = 0) { install_setoffset_handler(addrstart, addrend, 0, 0, sohandler, unitmask); } - void install_setoffset_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, setoffset_delegate sohandler, UINT64 unitmask = 0); + void install_setoffset_handler(offs_t addrstart, offs_t addrend, setoffset_delegate sohandler, UINT64 unitmask = 0) { install_setoffset_handler(addrstart, addrend, 0, 0, 0, sohandler, unitmask); } + void install_setoffset_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, offs_t addrselect, setoffset_delegate sohandler, UINT64 unitmask = 0); // install new-style delegate handlers (short form) - void install_read_handler(offs_t addrstart, offs_t addrend, read8_delegate rhandler, UINT64 unitmask = 0) { install_read_handler(addrstart, addrend, 0, 0, rhandler, unitmask); } - void install_write_handler(offs_t addrstart, offs_t addrend, write8_delegate whandler, UINT64 unitmask = 0) { install_write_handler(addrstart, addrend, 0, 0, whandler, unitmask); } - void install_readwrite_handler(offs_t addrstart, offs_t addrend, read8_delegate rhandler, write8_delegate whandler, UINT64 unitmask = 0) { return install_readwrite_handler(addrstart, addrend, 0, 0, rhandler, whandler, unitmask); } - void install_read_handler(offs_t addrstart, offs_t addrend, read16_delegate rhandler, UINT64 unitmask = 0) { install_read_handler(addrstart, addrend, 0, 0, rhandler, unitmask); } - void install_write_handler(offs_t addrstart, offs_t addrend, write16_delegate whandler, UINT64 unitmask = 0) { install_write_handler(addrstart, addrend, 0, 0, whandler, unitmask); } - void install_readwrite_handler(offs_t addrstart, offs_t addrend, read16_delegate rhandler, write16_delegate whandler, UINT64 unitmask = 0) { return install_readwrite_handler(addrstart, addrend, 0, 0, rhandler, whandler, unitmask); } - void install_read_handler(offs_t addrstart, offs_t addrend, read32_delegate rhandler, UINT64 unitmask = 0) { install_read_handler(addrstart, addrend, 0, 0, rhandler, unitmask); } - void install_write_handler(offs_t addrstart, offs_t addrend, write32_delegate whandler, UINT64 unitmask = 0) { install_write_handler(addrstart, addrend, 0, 0, whandler, unitmask); } - void install_readwrite_handler(offs_t addrstart, offs_t addrend, read32_delegate rhandler, write32_delegate whandler, UINT64 unitmask = 0) { return install_readwrite_handler(addrstart, addrend, 0, 0, rhandler, whandler, unitmask); } - void install_read_handler(offs_t addrstart, offs_t addrend, read64_delegate rhandler, UINT64 unitmask = 0) { install_read_handler(addrstart, addrend, 0, 0, rhandler, unitmask); } - void install_write_handler(offs_t addrstart, offs_t addrend, write64_delegate whandler, UINT64 unitmask = 0) { install_write_handler(addrstart, addrend, 0, 0, whandler, unitmask); } - void install_readwrite_handler(offs_t addrstart, offs_t addrend, read64_delegate rhandler, write64_delegate whandler, UINT64 unitmask = 0) { install_readwrite_handler(addrstart, addrend, 0, 0, rhandler, whandler, unitmask); } + void install_read_handler(offs_t addrstart, offs_t addrend, read8_delegate rhandler, UINT64 unitmask = 0) { install_read_handler(addrstart, addrend, 0, 0, 0, rhandler, unitmask); } + void install_write_handler(offs_t addrstart, offs_t addrend, write8_delegate whandler, UINT64 unitmask = 0) { install_write_handler(addrstart, addrend, 0, 0, 0, whandler, unitmask); } + void install_readwrite_handler(offs_t addrstart, offs_t addrend, read8_delegate rhandler, write8_delegate whandler, UINT64 unitmask = 0) { return install_readwrite_handler(addrstart, addrend, 0, 0, 0, rhandler, whandler, unitmask); } + void install_read_handler(offs_t addrstart, offs_t addrend, read16_delegate rhandler, UINT64 unitmask = 0) { install_read_handler(addrstart, addrend, 0, 0, 0, rhandler, unitmask); } + void install_write_handler(offs_t addrstart, offs_t addrend, write16_delegate whandler, UINT64 unitmask = 0) { install_write_handler(addrstart, addrend, 0, 0, 0, whandler, unitmask); } + void install_readwrite_handler(offs_t addrstart, offs_t addrend, read16_delegate rhandler, write16_delegate whandler, UINT64 unitmask = 0) { return install_readwrite_handler(addrstart, addrend, 0, 0, 0, rhandler, whandler, unitmask); } + void install_read_handler(offs_t addrstart, offs_t addrend, read32_delegate rhandler, UINT64 unitmask = 0) { install_read_handler(addrstart, addrend, 0, 0, 0, rhandler, unitmask); } + void install_write_handler(offs_t addrstart, offs_t addrend, write32_delegate whandler, UINT64 unitmask = 0) { install_write_handler(addrstart, addrend, 0, 0, 0, whandler, unitmask); } + void install_readwrite_handler(offs_t addrstart, offs_t addrend, read32_delegate rhandler, write32_delegate whandler, UINT64 unitmask = 0) { return install_readwrite_handler(addrstart, addrend, 0, 0, 0, rhandler, whandler, unitmask); } + void install_read_handler(offs_t addrstart, offs_t addrend, read64_delegate rhandler, UINT64 unitmask = 0) { install_read_handler(addrstart, addrend, 0, 0, 0, rhandler, unitmask); } + void install_write_handler(offs_t addrstart, offs_t addrend, write64_delegate whandler, UINT64 unitmask = 0) { install_write_handler(addrstart, addrend, 0, 0, 0, whandler, unitmask); } + void install_readwrite_handler(offs_t addrstart, offs_t addrend, read64_delegate rhandler, write64_delegate whandler, UINT64 unitmask = 0) { install_readwrite_handler(addrstart, addrend, 0, 0, 0, rhandler, whandler, unitmask); } // install new-style delegate handlers (with mirror/mask) - void install_read_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read8_delegate rhandler, UINT64 unitmask = 0); - void install_write_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, write8_delegate whandler, UINT64 unitmask = 0); - void install_readwrite_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read8_delegate rhandler, write8_delegate whandler, UINT64 unitmask = 0); - void install_read_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read16_delegate rhandler, UINT64 unitmask = 0); - void install_write_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, write16_delegate whandler, UINT64 unitmask = 0); - void install_readwrite_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read16_delegate rhandler, write16_delegate whandler, UINT64 unitmask = 0); - void install_read_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read32_delegate rhandler, UINT64 unitmask = 0); - void install_write_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, write32_delegate whandler, UINT64 unitmask = 0); - void install_readwrite_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read32_delegate rhandler, write32_delegate whandler, UINT64 unitmask = 0); - void install_read_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read64_delegate rhandler, UINT64 unitmask = 0); - void install_write_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, write64_delegate whandler, UINT64 unitmask = 0); - void install_readwrite_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read64_delegate rhandler, write64_delegate whandler, UINT64 unitmask = 0); + void install_read_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, offs_t addrselect, read8_delegate rhandler, UINT64 unitmask = 0); + void install_write_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, offs_t addrselect, write8_delegate whandler, UINT64 unitmask = 0); + void install_readwrite_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, offs_t addrselect, read8_delegate rhandler, write8_delegate whandler, UINT64 unitmask = 0); + void install_read_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, offs_t addrselect, read16_delegate rhandler, UINT64 unitmask = 0); + void install_write_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, offs_t addrselect, write16_delegate whandler, UINT64 unitmask = 0); + void install_readwrite_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, offs_t addrselect, read16_delegate rhandler, write16_delegate whandler, UINT64 unitmask = 0); + void install_read_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, offs_t addrselect, read32_delegate rhandler, UINT64 unitmask = 0); + void install_write_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, offs_t addrselect, write32_delegate whandler, UINT64 unitmask = 0); + void install_readwrite_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, offs_t addrselect, read32_delegate rhandler, write32_delegate whandler, UINT64 unitmask = 0); + void install_read_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, offs_t addrselect, read64_delegate rhandler, UINT64 unitmask = 0); + void install_write_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, offs_t addrselect, write64_delegate whandler, UINT64 unitmask = 0); + void install_readwrite_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, offs_t addrselect, read64_delegate rhandler, write64_delegate whandler, UINT64 unitmask = 0); // setup void prepare_map(); @@ -451,16 +443,19 @@ private: void populate_map_entry(const address_map_entry &entry, read_or_write readorwrite); void populate_map_entry_setoffset(const address_map_entry &entry); - void unmap_generic(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read_or_write readorwrite, bool quiet); - void install_ram_generic(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read_or_write readorwrite, void *baseptr); - void install_bank_generic(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, const char *rtag, const char *wtag); - void install_bank_generic(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, memory_bank *rbank, memory_bank *wbank); + void unmap_generic(offs_t addrstart, offs_t addrend, offs_t addrmirror, read_or_write readorwrite, bool quiet); + void install_ram_generic(offs_t addrstart, offs_t addrend, offs_t addrmirror, read_or_write readorwrite, void *baseptr); + void install_bank_generic(offs_t addrstart, offs_t addrend, offs_t addrmirror, const char *rtag, const char *wtag); + void install_bank_generic(offs_t addrstart, offs_t addrend, offs_t addrmirror, memory_bank *rbank, memory_bank *wbank); void adjust_addresses(offs_t &start, offs_t &end, offs_t &mask, offs_t &mirror); void *find_backing_memory(offs_t addrstart, offs_t addrend); bool needs_backing_store(const address_map_entry &entry); - memory_bank &bank_find_or_allocate(const char *tag, offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read_or_write readorwrite); + memory_bank &bank_find_or_allocate(const char *tag, offs_t addrstart, offs_t addrend, offs_t addrmirror, read_or_write readorwrite); memory_bank *bank_find_anonymous(offs_t bytestart, offs_t byteend) const; address_map_entry *block_assign_intersecting(offs_t bytestart, offs_t byteend, UINT8 *base); + void check_optimize_all(const char *function, offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, offs_t addrselect, offs_t &nstart, offs_t &nend, offs_t &nmask, offs_t &nmirror); + void check_optimize_mirror(const char *function, offs_t addrstart, offs_t addrend, offs_t addrmirror, offs_t &nstart, offs_t &nend, offs_t &nmask, offs_t &nmirror); + void check_address(const char *function, offs_t addrstart, offs_t addrend); protected: // private state diff --git a/src/mame/drivers/4enlinea.cpp b/src/mame/drivers/4enlinea.cpp index f2ad0702acf..eb1072550bb 100644 --- a/src/mame/drivers/4enlinea.cpp +++ b/src/mame/drivers/4enlinea.cpp @@ -298,8 +298,8 @@ void isa8_cga_4enlinea_device::device_start() m_vram.resize(m_vram_size); //m_isa->install_device(0x3bf, 0x3bf, 0, 0, nullptr, write8_delegate( FUNC(isa8_cga_4enlinea_device::_4enlinea_mode_control_w), this ) ); - m_isa->install_device(0x3d0, 0x3df, 0, 0, read8_delegate( FUNC(isa8_cga_4enlinea_device::_4enlinea_io_read), this ), write8_delegate( FUNC(isa8_cga_device::io_write), this ) ); - m_isa->install_bank(0x8000, 0xbfff, 0, 0, "bank1", &m_vram[0]); + m_isa->install_device(0x3d0, 0x3df, read8_delegate( FUNC(isa8_cga_4enlinea_device::_4enlinea_io_read), this ), write8_delegate( FUNC(isa8_cga_device::io_write), this ) ); + m_isa->install_bank(0x8000, 0xbfff, "bank1", &m_vram[0]); /* Initialise the cga palette */ int i; diff --git a/src/mame/drivers/abc80x.cpp b/src/mame/drivers/abc80x.cpp index 07a99b37bfb..2d777083290 100644 --- a/src/mame/drivers/abc80x.cpp +++ b/src/mame/drivers/abc80x.cpp @@ -330,7 +330,7 @@ void abc806_state::bankswitch() program.install_read_bank(0x7000, 0x77ff, bank_name); program.unmap_write(0x7000, 0x77ff); - program.install_readwrite_handler(0x7800, 0x7fff, 0, 0, READ8_DELEGATE(abc806_state, charram_r), WRITE8_DELEGATE(abc806_state, charram_w)); + program.install_readwrite_handler(0x7800, 0x7fff, READ8_DELEGATE(abc806_state, charram_r), WRITE8_DELEGATE(abc806_state, charram_w)); membank(bank_name)->set_entry(0); break; @@ -365,7 +365,7 @@ void abc806_state::bankswitch() if (start_addr == 0x7000) { program.install_readwrite_bank(0x7000, 0x77ff, bank_name); - program.install_readwrite_handler(0x7800, 0x7fff, 0, 0, READ8_DELEGATE(abc806_state, charram_r), WRITE8_DELEGATE(abc806_state, charram_w)); + program.install_readwrite_handler(0x7800, 0x7fff, READ8_DELEGATE(abc806_state, charram_r), WRITE8_DELEGATE(abc806_state, charram_w)); } else { @@ -562,10 +562,10 @@ static ADDRESS_MAP_START( abc806_io, AS_IO, 8, abc806_state ) AM_RANGE(0x07, 0x07) AM_MIRROR(0xff18) AM_DEVREAD(ABCBUS_TAG, abcbus_slot_t, rst_r) AM_WRITE(hrc_w) AM_RANGE(0x20, 0x23) AM_MIRROR(0xff0c) AM_DEVREADWRITE(Z80DART_TAG, z80dart_device, ba_cd_r, ba_cd_w) AM_RANGE(0x31, 0x31) AM_MIRROR(0xff00) AM_DEVREAD(MC6845_TAG, mc6845_device, register_r) - AM_RANGE(0x34, 0x34) AM_MIRROR(0xff00) AM_MASK(0xff00) AM_READWRITE(mai_r, mao_w) + AM_RANGE(0x34, 0x34) AM_SELECT(0xff00) AM_READWRITE(mai_r, mao_w) AM_RANGE(0x35, 0x35) AM_MIRROR(0xff00) AM_READWRITE(ami_r, amo_w) AM_RANGE(0x36, 0x36) AM_MIRROR(0xff00) AM_READWRITE(sti_r, sto_w) - AM_RANGE(0x37, 0x37) AM_MIRROR(0xff00) AM_MASK(0xff00) AM_READWRITE(cli_r, sso_w) + AM_RANGE(0x37, 0x37) AM_SELECT(0xff00) AM_READWRITE(cli_r, sso_w) AM_RANGE(0x38, 0x38) AM_MIRROR(0xff00) AM_DEVWRITE(MC6845_TAG, mc6845_device, address_w) AM_RANGE(0x39, 0x39) AM_MIRROR(0xff00) AM_DEVWRITE(MC6845_TAG, mc6845_device, register_w) AM_RANGE(0x40, 0x43) AM_MIRROR(0xff1c) AM_DEVREADWRITE(Z80SIO_TAG, z80sio2_device, ba_cd_r, ba_cd_w) diff --git a/src/mame/drivers/apollo.cpp b/src/mame/drivers/apollo.cpp index 01a1d524c2f..741b105ed03 100644 --- a/src/mame/drivers/apollo.cpp +++ b/src/mame/drivers/apollo.cpp @@ -443,8 +443,8 @@ WRITE32_MEMBER(apollo_state::ram_with_parity_w){ // no more than 192 read/write handlers may be used // see table_assign_handler in memory.c if (parity_error_handler_install_counter < 40) { - //memory_install_read32_handler(space, ram_base_address+offset*4, ram_base_address+offset*4+3, 0xffffffff, 0, ram_with_parity_r); - space.install_read_handler(ram_base_address+offset*4, ram_base_address+offset*4+3, 0xffffffff,0,read32_delegate(FUNC(apollo_state::ram_with_parity_r),this)); + //memory_install_read32_handler(space, ram_base_address+offset*4, ram_base_address+offset*4+3, ram_with_parity_r); + space.install_read_handler(ram_base_address+offset*4, ram_base_address+offset*4+3, read32_delegate(FUNC(apollo_state::ram_with_parity_r),this)); parity_error_handler_is_installed = 1; parity_error_handler_install_counter++; } @@ -455,8 +455,8 @@ WRITE32_MEMBER(apollo_state::ram_with_parity_w){ // uninstall not supported, reinstall previous read handler instead - // memory_install_rom(space, ram_base_address, ram_end_address, 0xffffffff, 0, messram_ptr.v); - space.install_rom(ram_base_address,ram_end_address,0xffffffff,0,&m_messram_ptr[0]); + // memory_install_rom(space, ram_base_address, ram_end_address, messram_ptr.v); + space.install_rom(ram_base_address,ram_end_address,&m_messram_ptr[0]); parity_error_handler_is_installed = 0; parity_error_byte_mask = 0; @@ -950,8 +950,8 @@ void apollo_state::machine_start(){ MACHINE_START_CALL_MEMBER(apollo); // install nop handlers for unmapped ISA bus addresses - m_isa->install16_device(0, ATBUS_IO_END, 0, 0, read16_delegate(FUNC(apollo_state::apollo_atbus_unmap_io_r), this), write16_delegate(FUNC(apollo_state::apollo_atbus_unmap_io_w), this)); - m_isa->install_memory(0, ATBUS_MEMORY_END, 0, 0, read8_delegate(FUNC(apollo_state::apollo_atbus_unmap_r), this), write8_delegate(FUNC(apollo_state::apollo_atbus_unmap_w), this)); + m_isa->install16_device(0, ATBUS_IO_END, read16_delegate(FUNC(apollo_state::apollo_atbus_unmap_io_r), this), write16_delegate(FUNC(apollo_state::apollo_atbus_unmap_io_w), this)); + m_isa->install_memory(0, ATBUS_MEMORY_END, read8_delegate(FUNC(apollo_state::apollo_atbus_unmap_r), this), write8_delegate(FUNC(apollo_state::apollo_atbus_unmap_w), this)); } /*************************************************************************** diff --git a/src/mame/drivers/aquarius.cpp b/src/mame/drivers/aquarius.cpp index ecf84ec762f..6d491ffe290 100644 --- a/src/mame/drivers/aquarius.cpp +++ b/src/mame/drivers/aquarius.cpp @@ -219,7 +219,7 @@ static ADDRESS_MAP_START( aquarius_io, AS_IO, 8, aquarius_state ) AM_RANGE(0xfc, 0xfc) AM_MIRROR(0xff00) AM_READWRITE(cassette_r, cassette_w) AM_RANGE(0xfd, 0xfd) AM_MIRROR(0xff00) AM_READWRITE(vsync_r, mapper_w) AM_RANGE(0xfe, 0xfe) AM_MIRROR(0xff00) AM_READWRITE(printer_r, printer_w) - AM_RANGE(0xff, 0xff) AM_MIRROR(0xff00) AM_MASK(0xff00) AM_READWRITE(keyboard_r, scrambler_w) + AM_RANGE(0xff, 0xff) AM_SELECT(0xff00) AM_READWRITE(keyboard_r, scrambler_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/astrocde.cpp b/src/mame/drivers/astrocde.cpp index 89bb2b7e725..b0a4c2bcab0 100644 --- a/src/mame/drivers/astrocde.cpp +++ b/src/mame/drivers/astrocde.cpp @@ -615,28 +615,28 @@ ADDRESS_MAP_END *************************************/ static ADDRESS_MAP_START( port_map, AS_IO, 8, astrocde_state ) - AM_RANGE(0x0000, 0x0019) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_READWRITE(astrocade_data_chip_register_r, astrocade_data_chip_register_w) + AM_RANGE(0x0000, 0x0019) AM_SELECT(0xff00) AM_READWRITE(astrocade_data_chip_register_r, astrocade_data_chip_register_w) ADDRESS_MAP_END static ADDRESS_MAP_START( port_map_mono_pattern, AS_IO, 8, astrocde_state ) - AM_RANGE(0x0000, 0x0019) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_READWRITE(astrocade_data_chip_register_r, astrocade_data_chip_register_w) + AM_RANGE(0x0000, 0x0019) AM_SELECT(0xff00) AM_READWRITE(astrocade_data_chip_register_r, astrocade_data_chip_register_w) AM_RANGE(0x0078, 0x007e) AM_MIRROR(0xff00) AM_WRITE(astrocade_pattern_board_w) AM_RANGE(0xa55b, 0xa55b) AM_WRITE(protected_ram_enable_w) ADDRESS_MAP_END static ADDRESS_MAP_START( port_map_stereo_pattern, AS_IO, 8, astrocde_state ) - AM_RANGE(0x0000, 0x0019) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_READWRITE(astrocade_data_chip_register_r, astrocade_data_chip_register_w) - AM_RANGE(0x0050, 0x0058) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_DEVWRITE("astrocade2", astrocade_device, astrocade_sound_w) + AM_RANGE(0x0000, 0x0019) AM_SELECT(0xff00) AM_READWRITE(astrocade_data_chip_register_r, astrocade_data_chip_register_w) + AM_RANGE(0x0050, 0x0058) AM_SELECT(0xff00) AM_DEVWRITE("astrocade2", astrocade_device, astrocade_sound_w) AM_RANGE(0x0078, 0x007e) AM_MIRROR(0xff00) AM_WRITE(astrocade_pattern_board_w) AM_RANGE(0xa55b, 0xa55b) AM_WRITE(protected_ram_enable_w) ADDRESS_MAP_END static ADDRESS_MAP_START( port_map_16col_pattern, AS_IO, 8, astrocde_state ) - AM_RANGE(0x0000, 0x0019) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_READWRITE(astrocade_data_chip_register_r, astrocade_data_chip_register_w) - AM_RANGE(0x0050, 0x0058) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_DEVWRITE("astrocade2", astrocade_device, astrocade_sound_w) + AM_RANGE(0x0000, 0x0019) AM_SELECT(0xff00) AM_READWRITE(astrocade_data_chip_register_r, astrocade_data_chip_register_w) + AM_RANGE(0x0050, 0x0058) AM_SELECT(0xff00) AM_DEVWRITE("astrocade2", astrocade_device, astrocade_sound_w) AM_RANGE(0x0078, 0x007e) AM_MIRROR(0xff00) AM_WRITE(astrocade_pattern_board_w) AM_RANGE(0x00bf, 0x00bf) AM_MIRROR(0xff00) AM_WRITE(profpac_page_select_w) AM_RANGE(0x00c3, 0x00c3) AM_MIRROR(0xff00) AM_READ(profpac_intercept_r) @@ -647,7 +647,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( port_map_16col_pattern_nosound, AS_IO, 8, astrocde_state ) - AM_RANGE(0x0000, 0x0019) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_READWRITE(astrocade_data_chip_register_r, astrocade_data_chip_register_w) + AM_RANGE(0x0000, 0x0019) AM_SELECT(0xff00) AM_READWRITE(astrocade_data_chip_register_r, astrocade_data_chip_register_w) AM_RANGE(0x0078, 0x007e) AM_MIRROR(0xff00) AM_WRITE(astrocade_pattern_board_w) AM_RANGE(0x00bf, 0x00bf) AM_MIRROR(0xff00) AM_WRITE(profpac_page_select_w) AM_RANGE(0x00c3, 0x00c3) AM_MIRROR(0xff00) AM_READ(profpac_intercept_r) @@ -1688,48 +1688,48 @@ ROM_END DRIVER_INIT_MEMBER(astrocde_state,seawolf2) { m_video_config = 0x00; - m_maincpu->space(AS_IO).install_write_handler(0x40, 0x40, 0, 0xff18, write8_delegate(FUNC(astrocde_state::seawolf2_sound_1_w), this)); - m_maincpu->space(AS_IO).install_write_handler(0x41, 0x41, 0, 0xff18, write8_delegate(FUNC(astrocde_state::seawolf2_sound_2_w), this)); - m_maincpu->space(AS_IO).install_write_handler(0x42, 0x43, 0, 0xff18, write8_delegate(FUNC(astrocde_state::seawolf2_lamps_w), this)); + m_maincpu->space(AS_IO).install_write_handler(0x40, 0x40, 0, 0xff18, 0, write8_delegate(FUNC(astrocde_state::seawolf2_sound_1_w), this)); + m_maincpu->space(AS_IO).install_write_handler(0x41, 0x41, 0, 0xff18, 0, write8_delegate(FUNC(astrocde_state::seawolf2_sound_2_w), this)); + m_maincpu->space(AS_IO).install_write_handler(0x42, 0x43, 0, 0xff18, 0, write8_delegate(FUNC(astrocde_state::seawolf2_lamps_w), this)); } DRIVER_INIT_MEMBER(astrocde_state,ebases) { m_video_config = AC_SOUND_PRESENT | AC_MONITOR_BW; - m_maincpu->space(AS_IO).install_write_handler(0x20, 0x20, 0, 0xff07, write8_delegate(FUNC(astrocde_state::ebases_coin_w), this)); - m_maincpu->space(AS_IO).install_write_handler(0x28, 0x28, 0, 0xff07, write8_delegate(FUNC(astrocde_state::ebases_trackball_select_w), this)); + m_maincpu->space(AS_IO).install_write_handler(0x20, 0x20, 0, 0xff07, 0, write8_delegate(FUNC(astrocde_state::ebases_coin_w), this)); + m_maincpu->space(AS_IO).install_write_handler(0x28, 0x28, 0, 0xff07, 0, write8_delegate(FUNC(astrocde_state::ebases_trackball_select_w), this)); } DRIVER_INIT_MEMBER(astrocde_state,spacezap) { m_video_config = AC_SOUND_PRESENT | AC_MONITOR_BW; - m_maincpu->space(AS_IO).install_read_handler(0x13, 0x13, 0x03ff, 0xff00, read8_delegate(FUNC(astrocde_state::spacezap_io_r), this)); + m_maincpu->space(AS_IO).install_read_handler(0x13, 0x13, 0, 0xfc00, 0x0300, read8_delegate(FUNC(astrocde_state::spacezap_io_r), this)); } DRIVER_INIT_MEMBER(astrocde_state,wow) { m_video_config = AC_SOUND_PRESENT | AC_LIGHTPEN_INTS | AC_STARS; - m_maincpu->space(AS_IO).install_read_handler(0x15, 0x15, 0x0fff, 0xff00, read8_delegate(FUNC(astrocde_state::wow_io_r), this)); - m_maincpu->space(AS_IO).install_read_handler(0x17, 0x17, 0xffff, 0xff00, read8_delegate(FUNC(astrocde_state::wow_speech_r), this)); + m_maincpu->space(AS_IO).install_read_handler(0x15, 0x15, 0, 0xf000, 0x0f00, read8_delegate(FUNC(astrocde_state::wow_io_r), this)); + m_maincpu->space(AS_IO).install_read_handler(0x17, 0x17, 0, 0x0000, 0xff00, read8_delegate(FUNC(astrocde_state::wow_speech_r), this)); } DRIVER_INIT_MEMBER(astrocde_state,gorf) { m_video_config = AC_SOUND_PRESENT | AC_LIGHTPEN_INTS | AC_STARS; - m_maincpu->space(AS_IO).install_read_handler(0x15, 0x15, 0x0fff, 0xff00, read8_delegate(FUNC(astrocde_state::gorf_io_1_r), this)); - m_maincpu->space(AS_IO).install_read_handler(0x16, 0x16, 0x0fff, 0xff00, read8_delegate(FUNC(astrocde_state::gorf_io_2_r), this)); - m_maincpu->space(AS_IO).install_read_handler(0x17, 0x17, 0xffff, 0xff00, read8_delegate(FUNC(astrocde_state::gorf_speech_r), this)); + m_maincpu->space(AS_IO).install_read_handler(0x15, 0x15, 0, 0xf000, 0x0f00, read8_delegate(FUNC(astrocde_state::gorf_io_1_r), this)); + m_maincpu->space(AS_IO).install_read_handler(0x16, 0x16, 0, 0xf000, 0xff00, read8_delegate(FUNC(astrocde_state::gorf_io_2_r), this)); + m_maincpu->space(AS_IO).install_read_handler(0x17, 0x17, 0, 0x0000, 0xff00, read8_delegate(FUNC(astrocde_state::gorf_speech_r), this)); } DRIVER_INIT_MEMBER(astrocde_state,robby) { m_video_config = AC_SOUND_PRESENT; - m_maincpu->space(AS_IO).install_read_handler(0x15, 0x15, 0x0fff, 0xff00, read8_delegate(FUNC(astrocde_state::robby_io_r), this)); + m_maincpu->space(AS_IO).install_read_handler(0x15, 0x15, 0, 0xf000, 0x0f00, read8_delegate(FUNC(astrocde_state::robby_io_r), this)); } @@ -1738,8 +1738,8 @@ DRIVER_INIT_MEMBER(astrocde_state,profpac) address_space &iospace = m_maincpu->space(AS_IO); m_video_config = AC_SOUND_PRESENT; - iospace.install_read_handler(0x14, 0x14, 0x0fff, 0xff00, read8_delegate(FUNC(astrocde_state::profpac_io_1_r), this)); - iospace.install_read_handler(0x15, 0x15, 0x77ff, 0xff00, read8_delegate(FUNC(astrocde_state::profpac_io_2_r), this)); + iospace.install_read_handler(0x14, 0x14, 0, 0xf000, 0x0f00, read8_delegate(FUNC(astrocde_state::profpac_io_1_r), this)); + iospace.install_read_handler(0x15, 0x15, 0, 0x8800, 0x7700, read8_delegate(FUNC(astrocde_state::profpac_io_2_r), this)); /* configure banking */ m_bank8000->configure_entries(0, 4, memregion("banks")->base() + 0x4000, 0x8000); @@ -1752,10 +1752,10 @@ DRIVER_INIT_MEMBER(astrocde_state,demndrgn) address_space &iospace = m_maincpu->space(AS_IO); m_video_config = 0x00; - iospace.install_read_handler(0x14, 0x14, 0x1fff, 0xff00, read8_delegate(FUNC(astrocde_state::demndrgn_io_r), this)); - iospace.install_read_port(0x1c, 0x1c, 0x0000, 0xff00, "FIREX"); - iospace.install_read_port(0x1d, 0x1d, 0x0000, 0xff00, "FIREY"); - iospace.install_write_handler(0x97, 0x97, 0x0000, 0xff00, write8_delegate(FUNC(astrocde_state::demndrgn_sound_w), this)); + iospace.install_read_handler(0x14, 0x14, 0, 0xe000, 0x1f00, read8_delegate(FUNC(astrocde_state::demndrgn_io_r), this)); + iospace.install_read_port(0x1c, 0x1c, 0xff00, "FIREX"); + iospace.install_read_port(0x1d, 0x1d, 0xff00, "FIREY"); + iospace.install_write_handler(0x97, 0x97, 0, 0xff00, 0x0000, write8_delegate(FUNC(astrocde_state::demndrgn_sound_w), this)); /* configure banking */ m_bank8000->configure_entries(0, 4, memregion("banks")->base() + 0x4000, 0x8000); @@ -1768,15 +1768,15 @@ DRIVER_INIT_MEMBER(astrocde_state,tenpindx) address_space &iospace = m_maincpu->space(AS_IO); m_video_config = 0x00; - iospace.install_read_port(0x60, 0x60, 0x0000, 0xff00, "P60"); - iospace.install_read_port(0x61, 0x61, 0x0000, 0xff00, "P61"); - iospace.install_read_port(0x62, 0x62, 0x0000, 0xff00, "P62"); - iospace.install_read_port(0x63, 0x63, 0x0000, 0xff00, "P63"); - iospace.install_read_port(0x64, 0x64, 0x0000, 0xff00, "P64"); - iospace.install_write_handler(0x65, 0x66, 0x0000, 0xff00, write8_delegate(FUNC(astrocde_state::tenpindx_lamp_w), this)); - iospace.install_write_handler(0x67, 0x67, 0x0000, 0xff00, write8_delegate(FUNC(astrocde_state::tenpindx_counter_w), this)); - iospace.install_write_handler(0x68, 0x68, 0x0000, 0xff00, write8_delegate(FUNC(astrocde_state::tenpindx_lights_w), this)); - iospace.install_write_handler(0x97, 0x97, 0x0000, 0xff00, write8_delegate(FUNC(astrocde_state::tenpindx_sound_w), this)); + iospace.install_read_port(0x60, 0x60, 0xff00, "P60"); + iospace.install_read_port(0x61, 0x61, 0xff00, "P61"); + iospace.install_read_port(0x62, 0x62, 0xff00, "P62"); + iospace.install_read_port(0x63, 0x63, 0xff00, "P63"); + iospace.install_read_port(0x64, 0x64, 0xff00, "P64"); + iospace.install_write_handler(0x65, 0x66, 0, 0xff00, 0x0000, write8_delegate(FUNC(astrocde_state::tenpindx_lamp_w), this)); + iospace.install_write_handler(0x67, 0x67, 0, 0xff00, 0x0000, write8_delegate(FUNC(astrocde_state::tenpindx_counter_w), this)); + iospace.install_write_handler(0x68, 0x68, 0, 0xff00, 0x0000, write8_delegate(FUNC(astrocde_state::tenpindx_lights_w), this)); + iospace.install_write_handler(0x97, 0x97, 0, 0xff00, 0x0000, write8_delegate(FUNC(astrocde_state::tenpindx_sound_w), this)); /* configure banking */ m_bank8000->configure_entries(0, 4, memregion("banks")->base() + 0x4000, 0x8000); diff --git a/src/mame/drivers/astrohome.cpp b/src/mame/drivers/astrohome.cpp index 7b08a693956..6881bd86ed6 100644 --- a/src/mame/drivers/astrohome.cpp +++ b/src/mame/drivers/astrohome.cpp @@ -54,7 +54,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( astrocade_io, AS_IO, 8, astrocde_mess_state ) - AM_RANGE(0x00, 0x1f) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_READWRITE(astrocade_data_chip_register_r, astrocade_data_chip_register_w) + AM_RANGE(0x00, 0x1f) AM_SELECT(0xff00) AM_READWRITE(astrocade_data_chip_register_r, astrocade_data_chip_register_w) ADDRESS_MAP_END /************************************* diff --git a/src/mame/drivers/atm.cpp b/src/mame/drivers/atm.cpp index 2f94d00ac3a..130e801e17a 100644 --- a/src/mame/drivers/atm.cpp +++ b/src/mame/drivers/atm.cpp @@ -127,7 +127,7 @@ static ADDRESS_MAP_START (atm_io, AS_IO, 8, atm_state ) AM_RANGE(0x003f, 0x003f) AM_DEVREADWRITE(BETA_DISK_TAG, beta_disk_device, track_r, track_w) AM_MIRROR(0xff00) AM_RANGE(0x005f, 0x005f) AM_DEVREADWRITE(BETA_DISK_TAG, beta_disk_device, sector_r, sector_w) AM_MIRROR(0xff00) AM_RANGE(0x007f, 0x007f) AM_DEVREADWRITE(BETA_DISK_TAG, beta_disk_device, data_r, data_w) AM_MIRROR(0xff00) - AM_RANGE(0x00fe, 0x00fe) AM_READWRITE(spectrum_port_fe_r,spectrum_port_fe_w) AM_MIRROR(0xff00) AM_MASK(0xffff) + AM_RANGE(0x00fe, 0x00fe) AM_READWRITE(spectrum_port_fe_r,spectrum_port_fe_w) AM_SELECT(0xff00) AM_RANGE(0x00ff, 0x00ff) AM_DEVREADWRITE(BETA_DISK_TAG, beta_disk_device, state_r, param_w) AM_MIRROR(0xff00) AM_RANGE(0x4000, 0x4000) AM_WRITE(atm_port_7ffd_w) AM_MIRROR(0x3ffd) AM_RANGE(0x8000, 0x8000) AM_DEVWRITE("ay8912", ay8910_device, data_w) AM_MIRROR(0x3ffd) diff --git a/src/mame/drivers/attache.cpp b/src/mame/drivers/attache.cpp index 64649910a4f..00db1fcc689 100644 --- a/src/mame/drivers/attache.cpp +++ b/src/mame/drivers/attache.cpp @@ -773,7 +773,7 @@ static ADDRESS_MAP_START( attache_io , AS_IO, 8, attache_state) AM_RANGE(0xf4, 0xf7) AM_DEVREADWRITE("ctc",z80ctc_device,read,write) AM_MIRROR(0xff00) AM_RANGE(0xf8, 0xfb) AM_DEVREADWRITE("pio",z80pio_device,read_alt,write_alt) AM_MIRROR(0xff00) AM_RANGE(0xfc, 0xfd) AM_DEVICE("fdc",upd765a_device,map) AM_MIRROR(0xff00) - AM_RANGE(0xfe, 0xfe) AM_READWRITE(display_data_r, display_data_w) AM_MIRROR(0xff00) AM_MASK(0xffff) + AM_RANGE(0xfe, 0xfe) AM_READWRITE(display_data_r, display_data_w) AM_SELECT(0xff00) AM_RANGE(0xff, 0xff) AM_READWRITE(memmap_r, memmap_w) AM_MIRROR(0xff00) ADDRESS_MAP_END diff --git a/src/mame/drivers/beathead.cpp b/src/mame/drivers/beathead.cpp index d39b84cd861..dff737a925c 100644 --- a/src/mame/drivers/beathead.cpp +++ b/src/mame/drivers/beathead.cpp @@ -468,8 +468,8 @@ READ32_MEMBER( beathead_state::movie_speedup_r ) DRIVER_INIT_MEMBER(beathead_state,beathead) { /* prepare the speedups */ - m_maincpu->space(AS_PROGRAM).install_read_handler(0x00000ae8, 0x00000aeb, 0, 0, read32_delegate(FUNC(beathead_state::speedup_r), this)); - m_maincpu->space(AS_PROGRAM).install_read_handler(0x00000804, 0x00000807, 0, 0, read32_delegate(FUNC(beathead_state::movie_speedup_r), this)); + m_maincpu->space(AS_PROGRAM).install_read_handler(0x00000ae8, 0x00000aeb, read32_delegate(FUNC(beathead_state::speedup_r), this)); + m_maincpu->space(AS_PROGRAM).install_read_handler(0x00000804, 0x00000807, read32_delegate(FUNC(beathead_state::movie_speedup_r), this)); m_speedup_data = m_ram_base + 0xae8/4; m_movie_speedup_data = m_ram_base + 0x804/4; diff --git a/src/mame/drivers/bfm_sc2.cpp b/src/mame/drivers/bfm_sc2.cpp index c1af8bb6e2c..d6a94b0e87e 100644 --- a/src/mame/drivers/bfm_sc2.cpp +++ b/src/mame/drivers/bfm_sc2.cpp @@ -3616,8 +3616,8 @@ MACHINE_START_MEMBER(bfm_sc2_state,sc2dmd) { MACHINE_START_CALL_MEMBER(bfm_sc2); address_space &space = m_maincpu->space(AS_PROGRAM); - space.install_write_handler(0x2800, 0x2800, 0, 0, write8_delegate(FUNC(bfm_sc2_state::vfd1_dmd_w),this)); - space.install_write_handler(0x2900, 0x2900, 0, 0, write8_delegate(FUNC(bfm_sc2_state::dmd_reset_w),this)); + space.install_write_handler(0x2800, 0x2800, write8_delegate(FUNC(bfm_sc2_state::vfd1_dmd_w),this)); + space.install_write_handler(0x2900, 0x2900, write8_delegate(FUNC(bfm_sc2_state::dmd_reset_w),this)); } /* machine driver for scorpion2 board */ diff --git a/src/mame/drivers/bml3.cpp b/src/mame/drivers/bml3.cpp index 9b93e8f734c..26cba28ea3c 100644 --- a/src/mame/drivers/bml3.cpp +++ b/src/mame/drivers/bml3.cpp @@ -789,11 +789,11 @@ void bml3_state::machine_reset() /* defaults */ mem.install_rom(0xa000, 0xfeff,memregion("maincpu")->base() + 0xa000); mem.install_rom(0xfff0, 0xffff,memregion("maincpu")->base() + 0xfff0); - mem.install_write_handler(0xa000, 0xbfff, 0, 0,write8_delegate(FUNC(bml3_state::bml3_a000_w), this),0); - mem.install_write_handler(0xc000, 0xdfff, 0, 0,write8_delegate(FUNC(bml3_state::bml3_c000_w), this),0); - mem.install_write_handler(0xe000, 0xefff, 0, 0,write8_delegate(FUNC(bml3_state::bml3_e000_w), this),0); - mem.install_write_handler(0xf000, 0xfeff, 0, 0,write8_delegate(FUNC(bml3_state::bml3_f000_w), this),0); - mem.install_write_handler(0xfff0, 0xffff, 0, 0,write8_delegate(FUNC(bml3_state::bml3_fff0_w), this),0); + mem.install_write_handler(0xa000, 0xbfff, write8_delegate(FUNC(bml3_state::bml3_a000_w), this),0); + mem.install_write_handler(0xc000, 0xdfff, write8_delegate(FUNC(bml3_state::bml3_c000_w), this),0); + mem.install_write_handler(0xe000, 0xefff, write8_delegate(FUNC(bml3_state::bml3_e000_w), this),0); + mem.install_write_handler(0xf000, 0xfeff, write8_delegate(FUNC(bml3_state::bml3_f000_w), this),0); + mem.install_write_handler(0xfff0, 0xffff, write8_delegate(FUNC(bml3_state::bml3_fff0_w), this),0); m_firq_mask = -1; // disable firq } @@ -820,7 +820,7 @@ WRITE8_MEMBER(bml3_state::bml3_piaA_w) { if(data & 0x40) { - mem.install_readwrite_handler(0xa000, 0xbfff, 0, 0, + mem.install_readwrite_handler(0xa000, 0xbfff, read8_delegate(FUNC(bml3_state::bml3_a000_r), this), write8_delegate(FUNC(bml3_state::bml3_a000_w), this), 0); } @@ -828,7 +828,7 @@ WRITE8_MEMBER(bml3_state::bml3_piaA_w) { mem.install_rom(0xa000, 0xbfff, memregion("maincpu")->base() + 0xa000); - mem.install_write_handler(0xa000, 0xbfff, 0, 0, + mem.install_write_handler(0xa000, 0xbfff, write8_delegate(FUNC(bml3_state::bml3_a000_w), this), 0); } @@ -838,7 +838,7 @@ WRITE8_MEMBER(bml3_state::bml3_piaA_w) { if(data & 0x40) { - mem.install_readwrite_handler(0xc000, 0xdfff, 0, 0, + mem.install_readwrite_handler(0xc000, 0xdfff, read8_delegate(FUNC(bml3_state::bml3_c000_r), this), write8_delegate(FUNC(bml3_state::bml3_c000_w), this), 0); } @@ -846,7 +846,7 @@ WRITE8_MEMBER(bml3_state::bml3_piaA_w) { mem.install_rom(0xc000, 0xdfff, memregion("maincpu")->base() + 0xc000); - mem.install_write_handler(0xc000, 0xdfff, 0, 0, + mem.install_write_handler(0xc000, 0xdfff, write8_delegate(FUNC(bml3_state::bml3_c000_w), this), 0); } @@ -856,7 +856,7 @@ WRITE8_MEMBER(bml3_state::bml3_piaA_w) { if(data & 0x80) { - mem.install_readwrite_handler(0xe000, 0xefff, 0, 0, + mem.install_readwrite_handler(0xe000, 0xefff, read8_delegate(FUNC(bml3_state::bml3_e000_r), this), write8_delegate(FUNC(bml3_state::bml3_e000_w), this), 0); } @@ -864,7 +864,7 @@ WRITE8_MEMBER(bml3_state::bml3_piaA_w) { mem.install_rom(0xe000, 0xefff, memregion("maincpu")->base() + 0xe000); - mem.install_write_handler(0xe000, 0xefff, 0, 0, + mem.install_write_handler(0xe000, 0xefff, write8_delegate(FUNC(bml3_state::bml3_e000_w), this), 0); } @@ -872,7 +872,7 @@ WRITE8_MEMBER(bml3_state::bml3_piaA_w) if(data & 1) { - mem.install_readwrite_handler(0xf000, 0xfeff, 0, 0, + mem.install_readwrite_handler(0xf000, 0xfeff, read8_delegate(FUNC(bml3_state::bml3_f000_r), this), write8_delegate(FUNC(bml3_state::bml3_f000_w), this), 0); } @@ -880,14 +880,14 @@ WRITE8_MEMBER(bml3_state::bml3_piaA_w) { mem.install_rom(0xf000, 0xfeff, memregion("maincpu")->base() + 0xf000); - mem.install_write_handler(0xf000, 0xfeff, 0, 0, + mem.install_write_handler(0xf000, 0xfeff, write8_delegate(FUNC(bml3_state::bml3_f000_w), this), 0); } if(data & 2) { - mem.install_readwrite_handler(0xfff0, 0xffff, 0, 0, + mem.install_readwrite_handler(0xfff0, 0xffff, read8_delegate(FUNC(bml3_state::bml3_fff0_r), this), write8_delegate(FUNC(bml3_state::bml3_fff0_w), this), 0); } @@ -895,7 +895,7 @@ WRITE8_MEMBER(bml3_state::bml3_piaA_w) { mem.install_rom(0xfff0, 0xffff, memregion("maincpu")->base() + 0xfff0); - mem.install_write_handler(0xfff0, 0xffff, 0, 0, + mem.install_write_handler(0xfff0, 0xffff, write8_delegate(FUNC(bml3_state::bml3_fff0_w), this), 0); } diff --git a/src/mame/drivers/crbaloon.cpp b/src/mame/drivers/crbaloon.cpp index 93716951d09..f304755f7a0 100644 --- a/src/mame/drivers/crbaloon.cpp +++ b/src/mame/drivers/crbaloon.cpp @@ -211,7 +211,7 @@ static ADDRESS_MAP_START( main_io_map, AS_IO, 8, crbaloon_state ) ADDRESS_MAP_GLOBAL_MASK(0xf) AM_RANGE(0x00, 0x00) AM_MIRROR(0x0c) AM_READ_PORT("DSW0") AM_RANGE(0x01, 0x01) AM_MIRROR(0x0c) AM_READ_PORT("IN0") - AM_RANGE(0x02, 0x02) AM_MIRROR(0x0c) AM_MASK(0x0c) AM_READ(pc3259_r) + AM_RANGE(0x02, 0x02) AM_SELECT(0x0c) AM_READ(pc3259_r) AM_RANGE(0x03, 0x03) AM_MIRROR(0x0c) AM_READ_PORT("IN1") AM_RANGE(0x00, 0x00) AM_WRITENOP /* not connected */ diff --git a/src/mame/drivers/ddenlovr.cpp b/src/mame/drivers/ddenlovr.cpp index 725411052d8..f95e11765f5 100644 --- a/src/mame/drivers/ddenlovr.cpp +++ b/src/mame/drivers/ddenlovr.cpp @@ -3029,8 +3029,8 @@ static ADDRESS_MAP_START( mjchuuka_portmap, AS_IO, 8, ddenlovr_state ) // 16 AM_RANGE(0x13, 0x13) AM_MIRROR(0xff00) AM_READ(hanakanz_rand_r) AM_RANGE(0x1c, 0x1c) AM_MIRROR(0xff00) AM_WRITE(hanakanz_rombank_w) AM_RANGE(0x1e, 0x1e) AM_MIRROR(0xff00) AM_WRITE(mjchuuka_oki_bank_w) - AM_RANGE(0x20, 0x20) AM_MIRROR(0xff00) AM_MASK(0xff00) AM_WRITE(mjchuuka_blitter_w) - AM_RANGE(0x21, 0x21) AM_MIRROR(0xff00) AM_MASK(0xff00) AM_WRITE(mjchuuka_palette_w) + AM_RANGE(0x20, 0x20) AM_SELECT(0xff00) AM_WRITE(mjchuuka_blitter_w) + AM_RANGE(0x21, 0x21) AM_SELECT(0xff00) AM_WRITE(mjchuuka_palette_w) AM_RANGE(0x23, 0x23) AM_MIRROR(0xff00) AM_READ(mjchuuka_gfxrom_0_r) AM_RANGE(0x40, 0x40) AM_MIRROR(0xff00) AM_WRITE(mjchuuka_coincounter_w) AM_RANGE(0x41, 0x41) AM_MIRROR(0xff00) AM_WRITE(hanakanz_keyb_w) diff --git a/src/mame/drivers/docastle.cpp b/src/mame/drivers/docastle.cpp index e5e18c8a1bb..7af24557142 100644 --- a/src/mame/drivers/docastle.cpp +++ b/src/mame/drivers/docastle.cpp @@ -232,7 +232,7 @@ static ADDRESS_MAP_START( docastle_map2, AS_PROGRAM, 8, docastle_state ) AM_RANGE(0xc001, 0xc001) AM_MIRROR(0x0080) AM_READ_PORT("DSW2") AM_RANGE(0xc002, 0xc002) AM_MIRROR(0x0080) AM_READ_PORT("DSW1") AM_RANGE(0xc003, 0xc003) AM_MIRROR(0x0080) AM_READ_PORT("JOYS") - AM_RANGE(0xc004, 0xc004) AM_MIRROR(0x0080) AM_MASK(0x0080) AM_READWRITE(flipscreen_r, flipscreen_w) + AM_RANGE(0xc004, 0xc004) AM_SELECT(0x0080) AM_READWRITE(flipscreen_r, flipscreen_w) AM_RANGE(0xc005, 0xc005) AM_MIRROR(0x0080) AM_READ_PORT("BUTTONS") AM_RANGE(0xc007, 0xc007) AM_MIRROR(0x0080) AM_READ_PORT("SYSTEM") AM_RANGE(0xe000, 0xe000) AM_DEVWRITE("sn1", sn76489a_device, write) @@ -278,7 +278,7 @@ static ADDRESS_MAP_START( dorunrun_map2, AS_PROGRAM, 8, docastle_state ) AM_RANGE(0xc001, 0xc001) AM_MIRROR(0x0080) AM_READ_PORT("DSW2") AM_RANGE(0xc002, 0xc002) AM_MIRROR(0x0080) AM_READ_PORT("DSW1") AM_RANGE(0xc003, 0xc003) AM_MIRROR(0x0080) AM_READ_PORT("JOYS") - AM_RANGE(0xc004, 0xc004) AM_MIRROR(0x0080) AM_MASK(0x0080) AM_READWRITE(flipscreen_r, flipscreen_w) + AM_RANGE(0xc004, 0xc004) AM_SELECT(0x0080) AM_READWRITE(flipscreen_r, flipscreen_w) AM_RANGE(0xc005, 0xc005) AM_MIRROR(0x0080) AM_READ_PORT("BUTTONS") AM_RANGE(0xc007, 0xc007) AM_MIRROR(0x0080) AM_READ_PORT("SYSTEM") AM_RANGE(0xe000, 0xe008) AM_READWRITE(docastle_shared1_r, docastle_shared0_w) @@ -305,7 +305,7 @@ static ADDRESS_MAP_START( idsoccer_map2, AS_PROGRAM, 8, docastle_state ) AM_RANGE(0xc001, 0xc001) AM_MIRROR(0x0080) AM_READ_PORT("DSW2") AM_RANGE(0xc002, 0xc002) AM_MIRROR(0x0080) AM_READ_PORT("DSW1") AM_RANGE(0xc003, 0xc003) AM_MIRROR(0x0080) AM_READ_PORT("JOYS") - AM_RANGE(0xc004, 0xc004) AM_MIRROR(0x0080) AM_MASK(0x0080) AM_READ_PORT("JOYS_RIGHT") AM_WRITE(flipscreen_w) + AM_RANGE(0xc004, 0xc004) AM_SELECT(0x0080) AM_READ_PORT("JOYS_RIGHT") AM_WRITE(flipscreen_w) AM_RANGE(0xc005, 0xc005) AM_MIRROR(0x0080) AM_READ_PORT("BUTTONS") AM_RANGE(0xc007, 0xc007) AM_MIRROR(0x0080) AM_READ_PORT("SYSTEM") AM_RANGE(0xe000, 0xe000) AM_DEVWRITE("sn1", sn76489a_device, write) diff --git a/src/mame/drivers/einstein.cpp b/src/mame/drivers/einstein.cpp index d0f5bb73a05..67b2edf0e36 100644 --- a/src/mame/drivers/einstein.cpp +++ b/src/mame/drivers/einstein.cpp @@ -505,7 +505,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( einstein2_io, AS_IO, 8, einstein_state ) AM_IMPORT_FROM(einstein_io) - AM_RANGE(0x40, 0x47) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_READWRITE(einstein_80col_ram_r, einstein_80col_ram_w) + AM_RANGE(0x40, 0x47) AM_SELECT(0xff00) AM_READWRITE(einstein_80col_ram_r, einstein_80col_ram_w) AM_RANGE(0x48, 0x48) AM_MIRROR(0xff00) AM_DEVWRITE("crtc", mc6845_device, address_w) AM_RANGE(0x49, 0x49) AM_MIRROR(0xff00) AM_DEVWRITE("crtc", mc6845_device, register_w) AM_RANGE(0x4c, 0x4c) AM_MIRROR(0xff00) AM_READ(einstein_80col_state_r) diff --git a/src/mame/drivers/equites.cpp b/src/mame/drivers/equites.cpp index 98e58f261d3..b8b4baef9c9 100644 --- a/src/mame/drivers/equites.cpp +++ b/src/mame/drivers/equites.cpp @@ -663,9 +663,9 @@ static ADDRESS_MAP_START( equites_map, AS_PROGRAM, 16, equites_state ) AM_RANGE(0x100000, 0x1001ff) AM_RAM AM_SHARE("spriteram") AM_RANGE(0x140000, 0x1407ff) AM_READWRITE8(mcu_ram_r, mcu_ram_w, 0x00ff) AM_RANGE(0x180000, 0x180001) AM_READ_PORT("IN1") AM_DEVWRITE8("soundlatch", generic_latch_8_device, write, 0x00ff) - AM_RANGE(0x184000, 0x184001) AM_MIRROR(0x020000) AM_MASK(0x020000) AM_WRITE(equites_flipw_w) - AM_RANGE(0x188000, 0x188001) AM_MIRROR(0x020000) AM_MASK(0x020000) AM_WRITE(mcu_start_w) - AM_RANGE(0x18c000, 0x18c001) AM_MIRROR(0x020000) AM_MASK(0x020000) AM_WRITE(mcu_switch_w) + AM_RANGE(0x184000, 0x184001) AM_SELECT(0x020000) AM_WRITE(equites_flipw_w) + AM_RANGE(0x188000, 0x188001) AM_SELECT(0x020000) AM_WRITE(mcu_start_w) + AM_RANGE(0x18c000, 0x18c001) AM_SELECT(0x020000) AM_WRITE(mcu_switch_w) AM_RANGE(0x1c0000, 0x1c0001) AM_READ_PORT("IN0") AM_WRITE(equites_scrollreg_w) AM_RANGE(0x380000, 0x380001) AM_WRITE8(equites_bgcolor_w, 0xff00) AM_RANGE(0x780000, 0x780001) AM_DEVWRITE("watchdog", watchdog_timer_device, reset16_w) @@ -673,7 +673,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( gekisou_map, AS_PROGRAM, 16, equites_state ) AM_RANGE(0x040000, 0x040fff) AM_RAM AM_SHARE("nvram") // mainram is battery-backed - AM_RANGE(0x580000, 0x580001) AM_MIRROR(0x020000) AM_MASK(0x020000) AM_WRITE(gekisou_unknown_bit_w) + AM_RANGE(0x580000, 0x580001) AM_SELECT(0x020000) AM_WRITE(gekisou_unknown_bit_w) AM_IMPORT_FROM( equites_map ) ADDRESS_MAP_END @@ -684,11 +684,11 @@ static ADDRESS_MAP_START( splndrbt_map, AS_PROGRAM, 16, equites_state ) AM_RANGE(0x040000, 0x040fff) AM_RAM AM_RANGE(0x080000, 0x080001) AM_READ_PORT("IN0") AM_RANGE(0x0c0000, 0x0c0001) AM_READ_PORT("IN1") - AM_RANGE(0x0c0000, 0x0c0001) AM_MIRROR(0x020000) AM_MASK(0x020000) AM_WRITE8(equites_bgcolor_w, 0xff00) // note: addressmask does not apply here - AM_RANGE(0x0c0000, 0x0c0001) AM_MIRROR(0x020000) AM_MASK(0x020000) AM_WRITE8(equites_flipb_w, 0x00ff) - AM_RANGE(0x0c4000, 0x0c4001) AM_MIRROR(0x020000) AM_MASK(0x020000) AM_WRITE(mcu_start_w) - AM_RANGE(0x0c8000, 0x0c8001) AM_MIRROR(0x020000) AM_MASK(0x020000) AM_WRITE(mcu_switch_w) - AM_RANGE(0x0cc000, 0x0cc001) AM_MIRROR(0x020000) AM_MASK(0x020000) AM_WRITE(splndrbt_selchar_w) + AM_RANGE(0x0c0000, 0x0c0001) AM_SELECT(0x020000) AM_WRITE8(equites_bgcolor_w, 0xff00) // note: addressmask does not apply here + AM_RANGE(0x0c0000, 0x0c0001) AM_SELECT(0x020000) AM_WRITE8(equites_flipb_w, 0x00ff) + AM_RANGE(0x0c4000, 0x0c4001) AM_SELECT(0x020000) AM_WRITE(mcu_start_w) + AM_RANGE(0x0c8000, 0x0c8001) AM_SELECT(0x020000) AM_WRITE(mcu_switch_w) + AM_RANGE(0x0cc000, 0x0cc001) AM_SELECT(0x020000) AM_WRITE(splndrbt_selchar_w) AM_RANGE(0x100000, 0x100001) AM_WRITE(splndrbt_bg_scrollx_w) AM_RANGE(0x140000, 0x140001) AM_DEVWRITE8("soundlatch", generic_latch_8_device, write, 0x00ff) AM_RANGE(0x1c0000, 0x1c0001) AM_WRITE(splndrbt_bg_scrolly_w) diff --git a/src/mame/drivers/fitfight.cpp b/src/mame/drivers/fitfight.cpp index 97ba31d9a7b..d0d35212f14 100644 --- a/src/mame/drivers/fitfight.cpp +++ b/src/mame/drivers/fitfight.cpp @@ -1012,7 +1012,7 @@ DRIVER_INIT_MEMBER(fitfight_state,bbprot) DRIVER_INIT_MEMBER(fitfight_state,hotmindff) { - m_maincpu->space(AS_PROGRAM).install_read_handler(0x200000, 0x200001, 0, 0, read16_delegate(FUNC(fitfight_state::hotmindff_unk_r),this)); + m_maincpu->space(AS_PROGRAM).install_read_handler(0x200000, 0x200001, read16_delegate(FUNC(fitfight_state::hotmindff_unk_r),this)); DRIVER_INIT_CALL(fitfight); } diff --git a/src/mame/drivers/fmtowns.cpp b/src/mame/drivers/fmtowns.cpp index 79dadc04917..2ce04abd0c9 100644 --- a/src/mame/drivers/fmtowns.cpp +++ b/src/mame/drivers/fmtowns.cpp @@ -2584,7 +2584,7 @@ void towns_state::driver_start() // CD-ROM init m_towns_cd.read_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(towns_state::towns_cdrom_read_byte),this), (void*)machine().device("dma_1")); - m_maincpu->space(AS_PROGRAM).install_ram(0x100000,m_ram->size()-1,0xffffffff,0,nullptr); + m_maincpu->space(AS_PROGRAM).install_ram(0x100000,m_ram->size()-1,nullptr); } void marty_state::driver_start() diff --git a/src/mame/drivers/galaxian.cpp b/src/mame/drivers/galaxian.cpp index a7823bd7dda..3272ebe2cfd 100644 --- a/src/mame/drivers/galaxian.cpp +++ b/src/mame/drivers/galaxian.cpp @@ -6382,9 +6382,9 @@ void galaxian_state::unmap_galaxian_sound(offs_t base) { address_space &space = m_maincpu->space(AS_PROGRAM); - space.unmap_write(base + 0x0004, base + 0x0007, 0, 0x07f8); - space.unmap_write(base + 0x0800, base + 0x0807, 0, 0x07f8); - space.unmap_write(base + 0x1800, base + 0x1800, 0, 0x07ff); + space.unmap_write(base + 0x0004, base + 0x0007, 0x07f8); + space.unmap_write(base + 0x0800, base + 0x0fff); + space.unmap_write(base + 0x1800, base + 0x1fff); } @@ -6409,7 +6409,7 @@ DRIVER_INIT_MEMBER(galaxian_state,nolock) DRIVER_INIT_CALL(galaxian); /* ...but coin lockout disabled/disconnected */ - space.unmap_write(0x6002, 0x6002, 0, 0x7f8); + space.unmap_write(0x6002, 0x6002, 0x7f8); } DRIVER_INIT_MEMBER(galaxian_state, warofbugg) @@ -6436,7 +6436,7 @@ DRIVER_INIT_MEMBER(galaxian_state,azurian) common_init(&galaxian_state::scramble_draw_bullet, &galaxian_state::galaxian_draw_background, nullptr, nullptr); /* coin lockout disabled */ - space.unmap_write(0x6002, 0x6002, 0, 0x7f8); + space.unmap_write(0x6002, 0x6002, 0x7f8); } @@ -6465,7 +6465,7 @@ DRIVER_INIT_MEMBER(galaxian_state,pisces) common_init(&galaxian_state::galaxian_draw_bullet, &galaxian_state::galaxian_draw_background, &galaxian_state::pisces_extend_tile_info, &galaxian_state::pisces_extend_sprite_info); /* coin lockout replaced by graphics bank */ - space.install_write_handler(0x6002, 0x6002, 0, 0x7f8, write8_delegate(FUNC(galaxian_state::galaxian_gfxbank_w),this)); + space.install_write_handler(0x6002, 0x6002, 0, 0x7f8, 0, write8_delegate(FUNC(galaxian_state::galaxian_gfxbank_w),this)); } @@ -6477,7 +6477,7 @@ DRIVER_INIT_MEMBER(galaxian_state,batman2) common_init(&galaxian_state::galaxian_draw_bullet, &galaxian_state::galaxian_draw_background, &galaxian_state::batman2_extend_tile_info, &galaxian_state::upper_extend_sprite_info); /* coin lockout replaced by graphics bank */ - space.install_write_handler(0x6002, 0x6002, 0, 0x7f8, write8_delegate(FUNC(galaxian_state::galaxian_gfxbank_w),this)); + space.install_write_handler(0x6002, 0x6002, 0, 0x7f8, 0, write8_delegate(FUNC(galaxian_state::galaxian_gfxbank_w),this)); } @@ -6525,7 +6525,7 @@ DRIVER_INIT_MEMBER(galaxian_state,mooncrgx) common_init(&galaxian_state::galaxian_draw_bullet, &galaxian_state::galaxian_draw_background, &galaxian_state::mooncrst_extend_tile_info, &galaxian_state::mooncrst_extend_sprite_info); /* LEDs and coin lockout replaced by graphics banking */ - space.install_write_handler(0x6000, 0x6002, 0, 0x7f8, write8_delegate(FUNC(galaxian_state::galaxian_gfxbank_w),this)); + space.install_write_handler(0x6000, 0x6002, 0, 0x7f8, 0, write8_delegate(FUNC(galaxian_state::galaxian_gfxbank_w),this)); } @@ -6551,7 +6551,7 @@ DRIVER_INIT_MEMBER(galaxian_state,pacmanbl) DRIVER_INIT_CALL(galaxian); /* ...but coin lockout disabled/disconnected */ - space.install_write_handler(0x6002, 0x6002, 0, 0x7f8, write8_delegate(FUNC(galaxian_state::artic_gfxbank_w),this)); + space.install_write_handler(0x6002, 0x6002, 0, 0x7f8, 0, write8_delegate(FUNC(galaxian_state::artic_gfxbank_w),this)); } READ8_MEMBER(galaxian_state::tenspot_dsw_read) @@ -6613,12 +6613,12 @@ DRIVER_INIT_MEMBER(galaxian_state,tenspot) //common_init(&galaxian_state::galaxian_draw_bullet, &galaxian_state::galaxian_draw_background, &galaxian_state::batman2_extend_tile_info, &galaxian_state::upper_extend_sprite_info); /* coin lockout replaced by graphics bank */ - //space.install_write_handler(0x6002, 0x6002, 0, 0x7f8, write8_delegate(FUNC(galaxian_state::galaxian_gfxbank_w),this)); + //space.install_write_handler(0x6002, 0x6002, 0, 0x7f8, 0, write8_delegate(FUNC(galaxian_state::galaxian_gfxbank_w),this)); DRIVER_INIT_CALL(galaxian); - space.install_write_handler(0x6002, 0x6002, 0, 0x7f8, write8_delegate(FUNC(galaxian_state::artic_gfxbank_w),this)); + space.install_write_handler(0x6002, 0x6002, 0, 0x7f8, 0, write8_delegate(FUNC(galaxian_state::artic_gfxbank_w),this)); m_tenspot_current_game = 0; @@ -6662,11 +6662,11 @@ DRIVER_INIT_MEMBER(galaxian_state,zigzag) membank("bank3")->set_base(memregion("maincpu")->base() + 0x0000); /* handler for doing the swaps */ - space.install_write_handler(0x7002, 0x7002, 0, 0x07f8, write8_delegate(FUNC(galaxian_state::zigzag_bankswap_w),this)); + space.install_write_handler(0x7002, 0x7002, 0, 0x07f8, 0, write8_delegate(FUNC(galaxian_state::zigzag_bankswap_w),this)); zigzag_bankswap_w(space, 0, 0); /* coin lockout disabled */ - space.unmap_write(0x6002, 0x6002, 0, 0x7f8); + space.unmap_write(0x6002, 0x6002, 0x7f8); /* remove the galaxian sound hardware */ unmap_galaxian_sound( 0x6000); @@ -6692,11 +6692,11 @@ DRIVER_INIT_MEMBER(galaxian_state,checkman) common_init(&galaxian_state::galaxian_draw_bullet, &galaxian_state::galaxian_draw_background, &galaxian_state::mooncrst_extend_tile_info, &galaxian_state::mooncrst_extend_sprite_info); /* move the interrupt enable from $b000 to $b001 */ - space.unmap_write(0xb000, 0xb000, 0, 0x7f8); - space.install_write_handler(0xb001, 0xb001, 0, 0x7f8, write8_delegate(FUNC(galaxian_state::irq_enable_w),this)); + space.unmap_write(0xb000, 0xb000, 0x7f8); + space.install_write_handler(0xb001, 0xb001, 0, 0x7f8, 0, write8_delegate(FUNC(galaxian_state::irq_enable_w),this)); /* attach the sound command handler */ - iospace.install_write_handler(0x00, 0x00, 0, 0xffff, write8_delegate(FUNC(galaxian_state::checkman_sound_command_w),this)); + iospace.install_write_handler(0x00, 0x00, 0, 0xffff, 0, write8_delegate(FUNC(galaxian_state::checkman_sound_command_w),this)); /* decrypt program code */ decode_checkman(); @@ -6711,7 +6711,7 @@ DRIVER_INIT_MEMBER(galaxian_state,checkmaj) common_init(&galaxian_state::galaxian_draw_bullet, &galaxian_state::galaxian_draw_background, nullptr, nullptr); /* attach the sound command handler */ - space.install_write_handler(0x7800, 0x7800, 0, 0x7ff, write8_delegate(FUNC(galaxian_state::checkman_sound_command_w),this)); + space.install_write_handler(0x7800, 0x7800, 0, 0x7ff, 0, write8_delegate(FUNC(galaxian_state::checkman_sound_command_w),this)); /* for the title screen */ space.install_read_handler(0x3800, 0x3800, read8_delegate(FUNC(galaxian_state::checkmaj_protection_r),this)); @@ -6726,7 +6726,7 @@ DRIVER_INIT_MEMBER(galaxian_state,dingo) common_init(&galaxian_state::galaxian_draw_bullet, &galaxian_state::galaxian_draw_background, nullptr, nullptr); /* attach the sound command handler */ - space.install_write_handler(0x7800, 0x7800, 0, 0x7ff, write8_delegate(FUNC(galaxian_state::checkman_sound_command_w),this)); + space.install_write_handler(0x7800, 0x7800, 0, 0x7ff, 0, write8_delegate(FUNC(galaxian_state::checkman_sound_command_w),this)); space.install_read_handler(0x3000, 0x3000, read8_delegate(FUNC(galaxian_state::dingo_3000_r),this)); space.install_read_handler(0x3035, 0x3035, read8_delegate(FUNC(galaxian_state::dingo_3035_r),this)); @@ -6742,11 +6742,11 @@ DRIVER_INIT_MEMBER(galaxian_state,dingoe) common_init(&galaxian_state::galaxian_draw_bullet, &galaxian_state::galaxian_draw_background, &galaxian_state::mooncrst_extend_tile_info, &galaxian_state::mooncrst_extend_sprite_info); /* move the interrupt enable from $b000 to $b001 */ - space.unmap_write(0xb000, 0xb000, 0, 0x7f8); - space.install_write_handler(0xb001, 0xb001, 0, 0x7f8, write8_delegate(FUNC(galaxian_state::irq_enable_w),this)); + space.unmap_write(0xb000, 0xb000, 0x7f8); + space.install_write_handler(0xb001, 0xb001, 0, 0x7f8, 0, write8_delegate(FUNC(galaxian_state::irq_enable_w),this)); /* attach the sound command handler */ - iospace.install_write_handler(0x00, 0x00, 0, 0xffff, write8_delegate(FUNC(galaxian_state::checkman_sound_command_w),this)); + iospace.install_write_handler(0x00, 0x00, 0, 0xffff, 0, write8_delegate(FUNC(galaxian_state::checkman_sound_command_w),this)); space.install_read_handler(0x3001, 0x3001, read8_delegate(FUNC(galaxian_state::dingoe_3001_r),this)); /* Protection check */ @@ -6763,7 +6763,7 @@ DRIVER_INIT_MEMBER(galaxian_state,skybase) common_init(&galaxian_state::galaxian_draw_bullet, &galaxian_state::galaxian_draw_background, &galaxian_state::pisces_extend_tile_info, &galaxian_state::pisces_extend_sprite_info); /* coin lockout replaced by graphics bank */ - space.install_write_handler(0xa002, 0xa002, 0, 0x7f8, write8_delegate(FUNC(galaxian_state::galaxian_gfxbank_w),this)); + space.install_write_handler(0xa002, 0xa002, 0, 0x7f8, 0, write8_delegate(FUNC(galaxian_state::galaxian_gfxbank_w),this)); /* needs a full 2k of RAM */ space.install_ram(0x8000, 0x87ff); @@ -6915,12 +6915,12 @@ DRIVER_INIT_MEMBER(galaxian_state,kingball) common_init(&galaxian_state::galaxian_draw_bullet, &galaxian_state::galaxian_draw_background, nullptr, nullptr); /* disable the stars */ - space.unmap_write(0xb004, 0xb004, 0, 0x07f8); + space.unmap_write(0xb004, 0xb004, 0x7f8); - space.install_write_handler(0xb000, 0xb000, 0, 0x7f8, write8_delegate(FUNC(galaxian_state::kingball_sound1_w),this)); - space.install_write_handler(0xb001, 0xb001, 0, 0x7f8, write8_delegate(FUNC(galaxian_state::irq_enable_w),this)); - space.install_write_handler(0xb002, 0xb002, 0, 0x7f8, write8_delegate(FUNC(galaxian_state::kingball_sound2_w),this)); - space.install_write_handler(0xb003, 0xb003, 0, 0x7f8, write8_delegate(FUNC(galaxian_state::kingball_speech_dip_w),this)); + space.install_write_handler(0xb000, 0xb000, 0, 0x7f8, 0, write8_delegate(FUNC(galaxian_state::kingball_sound1_w),this)); + space.install_write_handler(0xb001, 0xb001, 0, 0x7f8, 0, write8_delegate(FUNC(galaxian_state::irq_enable_w),this)); + space.install_write_handler(0xb002, 0xb002, 0, 0x7f8, 0, write8_delegate(FUNC(galaxian_state::kingball_sound2_w),this)); + space.install_write_handler(0xb003, 0xb003, 0, 0x7f8, 0, write8_delegate(FUNC(galaxian_state::kingball_speech_dip_w),this)); save_item(NAME(m_kingball_speech_dip)); save_item(NAME(m_kingball_sound)); @@ -6935,8 +6935,8 @@ DRIVER_INIT_MEMBER(galaxian_state,scorpnmc) common_init(&galaxian_state::galaxian_draw_bullet, &galaxian_state::galaxian_draw_background, &galaxian_state::batman2_extend_tile_info, &galaxian_state::upper_extend_sprite_info); /* move the interrupt enable from $b000 to $b001 */ - space.unmap_write(0xb000, 0xb000, 0, 0x7f8); - space.install_write_handler(0xb001, 0xb001, 0, 0x7f8, write8_delegate(FUNC(galaxian_state::irq_enable_w),this)); + space.unmap_write(0xb000, 0xb000, 0x7f8); + space.install_write_handler(0xb001, 0xb001, 0, 0x7f8, 0, write8_delegate(FUNC(galaxian_state::irq_enable_w),this)); /* extra ROM */ space.install_rom(0x5000, 0x67ff, memregion("maincpu")->base() + 0x5000); @@ -6956,11 +6956,11 @@ DRIVER_INIT_MEMBER(galaxian_state,thepitm) common_init(&galaxian_state::galaxian_draw_bullet, &galaxian_state::galaxian_draw_background, &galaxian_state::mooncrst_extend_tile_info, &galaxian_state::mooncrst_extend_sprite_info); /* move the interrupt enable from $b000 to $b001 */ - space.unmap_write(0xb000, 0xb000, 0, 0x7f8); - space.install_write_handler(0xb001, 0xb001, 0, 0x7f8, write8_delegate(FUNC(galaxian_state::irq_enable_w),this)); + space.unmap_write(0xb000, 0xb000, 0x7f8); + space.install_write_handler(0xb001, 0xb001, 0, 0x7f8, 0, write8_delegate(FUNC(galaxian_state::irq_enable_w),this)); /* disable the stars */ - space.unmap_write(0xb004, 0xb004, 0, 0x07f8); + space.unmap_write(0xb004, 0xb004, 0x7f8); /* extend ROM */ space.install_rom(0x0000, 0x47ff, memregion("maincpu")->base()); @@ -6980,7 +6980,7 @@ DRIVER_INIT_MEMBER(galaxian_state,theend) common_init(&galaxian_state::theend_draw_bullet, &galaxian_state::galaxian_draw_background, nullptr, nullptr); /* coin counter on the upper bit of port C */ - space.unmap_write(0x6802, 0x6802, 0, 0x7f8); + space.unmap_write(0x6802, 0x6802, 0x7f8); } @@ -7012,8 +7012,8 @@ DRIVER_INIT_MEMBER(galaxian_state,atlantis) /* watchdog is at $7800? (or is it just disabled?) */ watchdog_timer_device *wdog = subdevice<watchdog_timer_device>("watchdog"); - space.unmap_read(0x7000, 0x7000, 0, 0x7ff); - space.install_read_handler(0x7800, 0x7800, 0, 0x7ff, read8_delegate(FUNC(watchdog_timer_device::reset_r), wdog)); + space.unmap_read(0x7000, 0x77ff); + space.install_read_handler(0x7800, 0x7800, 0, 0x7ff, 0, read8_delegate(FUNC(watchdog_timer_device::reset_r), wdog)); } @@ -7092,8 +7092,8 @@ DRIVER_INIT_MEMBER(galaxian_state,froggermc) /* video extensions */ common_init(nullptr, &galaxian_state::frogger_draw_background, &galaxian_state::frogger_extend_tile_info, &galaxian_state::frogger_extend_sprite_info); - space.install_write_handler(0xa800, 0xa800, 0, 0x7ff, write8_delegate(FUNC(generic_latch_8_device::write), (generic_latch_8_device*)m_soundlatch)); - space.install_write_handler(0xb001, 0xb001, 0, 0x7f8, write8_delegate(FUNC(galaxian_state::froggermc_sound_control_w),this)); + space.install_write_handler(0xa800, 0xa800, 0, 0x7ff, 0, write8_delegate(FUNC(generic_latch_8_device::write), (generic_latch_8_device*)m_soundlatch)); + space.install_write_handler(0xb001, 0xb001, 0, 0x7f8, 0, write8_delegate(FUNC(galaxian_state::froggermc_sound_control_w),this)); /* actually needs 2k of RAM */ space.install_ram(0x8000, 0x87ff); diff --git a/src/mame/drivers/galaxold.cpp b/src/mame/drivers/galaxold.cpp index b66bdceb980..371e6b4c6be 100644 --- a/src/mame/drivers/galaxold.cpp +++ b/src/mame/drivers/galaxold.cpp @@ -3485,7 +3485,7 @@ ROM_END DRIVER_INIT_MEMBER(galaxold_state,guttangt) { address_space &space = m_maincpu->space(AS_PROGRAM); - space.install_read_bank( 0x2000, 0x27ff, 0, 0, "cpubank" ); + space.install_read_bank( 0x2000, 0x27ff, "cpubank" ); UINT8 *rom = memregion("maincpu")->base(); membank("cpubank")->set_base(rom + 0x2000); } diff --git a/src/mame/drivers/gba.cpp b/src/mame/drivers/gba.cpp index 9270c520b43..54a2ca5527f 100644 --- a/src/mame/drivers/gba.cpp +++ b/src/mame/drivers/gba.cpp @@ -2106,9 +2106,9 @@ void gba_state::machine_start() // install the cart ROM & SRAM into the address map, if present if (m_cart->exists()) { - m_maincpu->space(AS_PROGRAM).install_read_bank(0x08000000, 0x09ffffff, 0, 0, "rom1"); - m_maincpu->space(AS_PROGRAM).install_read_bank(0x0a000000, 0x0bffffff, 0, 0, "rom2"); - m_maincpu->space(AS_PROGRAM).install_read_bank(0x0c000000, 0x0cffffff, 0, 0, "rom3"); + m_maincpu->space(AS_PROGRAM).install_read_bank(0x08000000, 0x09ffffff, "rom1"); + m_maincpu->space(AS_PROGRAM).install_read_bank(0x0a000000, 0x0bffffff, "rom2"); + m_maincpu->space(AS_PROGRAM).install_read_bank(0x0c000000, 0x0cffffff, "rom3"); std::string region_tag; memory_region *cart_rom = memregion(region_tag.assign(m_cart->tag()).append(GBASLOT_ROM_REGION_TAG).c_str()); diff --git a/src/mame/drivers/gimix.cpp b/src/mame/drivers/gimix.cpp index 4b61c81521c..23684f53b9b 100644 --- a/src/mame/drivers/gimix.cpp +++ b/src/mame/drivers/gimix.cpp @@ -508,22 +508,22 @@ void gimix_state::machine_start() // install any extra RAM if(m_ram->size() > 65536) { - m_bank1->space(AS_PROGRAM).install_readwrite_bank(0x10000,m_ram->size()-1,0xffff,0,"upper_ram"); - m_bank2->space(AS_PROGRAM).install_readwrite_bank(0x10000,m_ram->size()-1,0xffff,0,"upper_ram"); - m_bank3->space(AS_PROGRAM).install_readwrite_bank(0x10000,m_ram->size()-1,0xffff,0,"upper_ram"); - m_bank4->space(AS_PROGRAM).install_readwrite_bank(0x10000,m_ram->size()-1,0xffff,0,"upper_ram"); - m_bank5->space(AS_PROGRAM).install_readwrite_bank(0x10000,m_ram->size()-1,0xffff,0,"upper_ram"); - m_bank6->space(AS_PROGRAM).install_readwrite_bank(0x10000,m_ram->size()-1,0xffff,0,"upper_ram"); - m_bank7->space(AS_PROGRAM).install_readwrite_bank(0x10000,m_ram->size()-1,0xffff,0,"upper_ram"); - m_bank8->space(AS_PROGRAM).install_readwrite_bank(0x10000,m_ram->size()-1,0xffff,0,"upper_ram"); - m_bank9->space(AS_PROGRAM).install_readwrite_bank(0x10000,m_ram->size()-1,0xffff,0,"upper_ram"); - m_bank10->space(AS_PROGRAM).install_readwrite_bank(0x10000,m_ram->size()-1,0xffff,0,"upper_ram"); - m_bank11->space(AS_PROGRAM).install_readwrite_bank(0x10000,m_ram->size()-1,0xffff,0,"upper_ram"); - m_bank12->space(AS_PROGRAM).install_readwrite_bank(0x10000,m_ram->size()-1,0xffff,0,"upper_ram"); - m_bank13->space(AS_PROGRAM).install_readwrite_bank(0x10000,m_ram->size()-1,0xffff,0,"upper_ram"); - m_bank14->space(AS_PROGRAM).install_readwrite_bank(0x10000,m_ram->size()-1,0xffff,0,"upper_ram"); - m_bank15->space(AS_PROGRAM).install_readwrite_bank(0x10000,m_ram->size()-1,0xffff,0,"upper_ram"); - m_bank16->space(AS_PROGRAM).install_readwrite_bank(0x10000,m_ram->size()-1,0xffff,0,"upper_ram"); + m_bank1->space(AS_PROGRAM).install_readwrite_bank(0x10000,m_ram->size()-1,"upper_ram"); + m_bank2->space(AS_PROGRAM).install_readwrite_bank(0x10000,m_ram->size()-1,"upper_ram"); + m_bank3->space(AS_PROGRAM).install_readwrite_bank(0x10000,m_ram->size()-1,"upper_ram"); + m_bank4->space(AS_PROGRAM).install_readwrite_bank(0x10000,m_ram->size()-1,"upper_ram"); + m_bank5->space(AS_PROGRAM).install_readwrite_bank(0x10000,m_ram->size()-1,"upper_ram"); + m_bank6->space(AS_PROGRAM).install_readwrite_bank(0x10000,m_ram->size()-1,"upper_ram"); + m_bank7->space(AS_PROGRAM).install_readwrite_bank(0x10000,m_ram->size()-1,"upper_ram"); + m_bank8->space(AS_PROGRAM).install_readwrite_bank(0x10000,m_ram->size()-1,"upper_ram"); + m_bank9->space(AS_PROGRAM).install_readwrite_bank(0x10000,m_ram->size()-1,"upper_ram"); + m_bank10->space(AS_PROGRAM).install_readwrite_bank(0x10000,m_ram->size()-1,"upper_ram"); + m_bank11->space(AS_PROGRAM).install_readwrite_bank(0x10000,m_ram->size()-1,"upper_ram"); + m_bank12->space(AS_PROGRAM).install_readwrite_bank(0x10000,m_ram->size()-1,"upper_ram"); + m_bank13->space(AS_PROGRAM).install_readwrite_bank(0x10000,m_ram->size()-1,"upper_ram"); + m_bank14->space(AS_PROGRAM).install_readwrite_bank(0x10000,m_ram->size()-1,"upper_ram"); + m_bank15->space(AS_PROGRAM).install_readwrite_bank(0x10000,m_ram->size()-1,"upper_ram"); + m_bank16->space(AS_PROGRAM).install_readwrite_bank(0x10000,m_ram->size()-1,"upper_ram"); } m_floppy0->get_device()->set_rpm(300); m_floppy1->get_device()->set_rpm(300); diff --git a/src/mame/drivers/gottlieb.cpp b/src/mame/drivers/gottlieb.cpp index fcc00892148..d3006f73d9e 100644 --- a/src/mame/drivers/gottlieb.cpp +++ b/src/mame/drivers/gottlieb.cpp @@ -228,9 +228,9 @@ void gottlieb_state::machine_start() if (m_laserdisc != nullptr) { /* attach to the I/O ports */ - m_maincpu->space(AS_PROGRAM).install_read_handler(0x05805, 0x05807, 0, 0x07f8, read8_delegate(FUNC(gottlieb_state::laserdisc_status_r),this)); - m_maincpu->space(AS_PROGRAM).install_write_handler(0x05805, 0x05805, 0, 0x07f8, write8_delegate(FUNC(gottlieb_state::laserdisc_command_w),this)); /* command for the player */ - m_maincpu->space(AS_PROGRAM).install_write_handler(0x05806, 0x05806, 0, 0x07f8, write8_delegate(FUNC(gottlieb_state::laserdisc_select_w),this)); + m_maincpu->space(AS_PROGRAM).install_read_handler(0x05805, 0x05807, 0, 0x07f8, 0, read8_delegate(FUNC(gottlieb_state::laserdisc_status_r),this)); + m_maincpu->space(AS_PROGRAM).install_write_handler(0x05805, 0x05805, 0, 0x07f8, 0, write8_delegate(FUNC(gottlieb_state::laserdisc_command_w),this)); /* command for the player */ + m_maincpu->space(AS_PROGRAM).install_write_handler(0x05806, 0x05806, 0, 0x07f8, 0, write8_delegate(FUNC(gottlieb_state::laserdisc_select_w),this)); /* allocate a timer for serial transmission, and one for philips code processing */ m_laserdisc_bit_timer = timer_alloc(TIMER_LASERDISC_BIT); @@ -2604,21 +2604,21 @@ DRIVER_INIT_MEMBER(gottlieb_state,romtiles) DRIVER_INIT_MEMBER(gottlieb_state,qbert) { DRIVER_INIT_CALL(romtiles); - m_maincpu->space(AS_PROGRAM).install_write_handler(0x5803, 0x5803, 0, 0x07f8, write8_delegate(FUNC(gottlieb_state::qbert_output_w),this)); + m_maincpu->space(AS_PROGRAM).install_write_handler(0x5803, 0x5803, 0, 0x07f8, 0, write8_delegate(FUNC(gottlieb_state::qbert_output_w),this)); } DRIVER_INIT_MEMBER(gottlieb_state,qbertqub) { DRIVER_INIT_CALL(romtiles); - m_maincpu->space(AS_PROGRAM).install_write_handler(0x5803, 0x5803, 0, 0x07f8, write8_delegate(FUNC(gottlieb_state::qbertqub_output_w),this)); + m_maincpu->space(AS_PROGRAM).install_write_handler(0x5803, 0x5803, 0, 0x07f8, 0, write8_delegate(FUNC(gottlieb_state::qbertqub_output_w),this)); } DRIVER_INIT_MEMBER(gottlieb_state,stooges) { DRIVER_INIT_CALL(ramtiles); - m_maincpu->space(AS_PROGRAM).install_write_handler(0x5803, 0x5803, 0, 0x07f8, write8_delegate(FUNC(gottlieb_state::stooges_output_w),this)); + m_maincpu->space(AS_PROGRAM).install_write_handler(0x5803, 0x5803, 0, 0x07f8, 0, write8_delegate(FUNC(gottlieb_state::stooges_output_w),this)); } diff --git a/src/mame/drivers/juicebox.cpp b/src/mame/drivers/juicebox.cpp index cb9d4fa068b..f0e58b3138c 100644 --- a/src/mame/drivers/juicebox.cpp +++ b/src/mame/drivers/juicebox.cpp @@ -262,23 +262,23 @@ void juicebox_state::machine_start() smc_init(); - space.install_readwrite_handler(0x01c00000, 0x01c0000b, 0, 0, read32_delegate(FUNC(s3c44b0_device::cpuwrap_r), &(*m_s3c44b0)), write32_delegate(FUNC(s3c44b0_device::cpuwrap_w), &(*m_s3c44b0))); - space.install_readwrite_handler(0x01d00000, 0x01d0002b, 0, 0, read32_delegate(FUNC(s3c44b0_device::uart_0_r), &(*m_s3c44b0)), write32_delegate(FUNC(s3c44b0_device::uart_0_w), &(*m_s3c44b0))); - space.install_readwrite_handler(0x01d04000, 0x01d0402b, 0, 0, read32_delegate(FUNC(s3c44b0_device::uart_1_r), &(*m_s3c44b0)), write32_delegate(FUNC(s3c44b0_device::uart_1_w), &(*m_s3c44b0))); - space.install_readwrite_handler(0x01d14000, 0x01d14013, 0, 0, read32_delegate(FUNC(s3c44b0_device::sio_r), &(*m_s3c44b0)), write32_delegate(FUNC(s3c44b0_device::sio_w), &(*m_s3c44b0))); - space.install_readwrite_handler(0x01d18000, 0x01d18013, 0, 0, read32_delegate(FUNC(s3c44b0_device::iis_r), &(*m_s3c44b0)), write32_delegate(FUNC(s3c44b0_device::iis_w), &(*m_s3c44b0))); - space.install_readwrite_handler(0x01d20000, 0x01d20057, 0, 0, read32_delegate(FUNC(s3c44b0_device::gpio_r), &(*m_s3c44b0)), write32_delegate(FUNC(s3c44b0_device::gpio_w), &(*m_s3c44b0))); - space.install_readwrite_handler(0x01d30000, 0x01d3000b, 0, 0, read32_delegate(FUNC(s3c44b0_device::wdt_r), &(*m_s3c44b0)), write32_delegate(FUNC(s3c44b0_device::wdt_w), &(*m_s3c44b0))); - space.install_readwrite_handler(0x01d40000, 0x01d4000b, 0, 0, read32_delegate(FUNC(s3c44b0_device::adc_r), &(*m_s3c44b0)), write32_delegate(FUNC(s3c44b0_device::adc_w), &(*m_s3c44b0))); - space.install_readwrite_handler(0x01d50000, 0x01d5004f, 0, 0, read32_delegate(FUNC(s3c44b0_device::pwm_r), &(*m_s3c44b0)), write32_delegate(FUNC(s3c44b0_device::pwm_w), &(*m_s3c44b0))); - space.install_readwrite_handler(0x01d60000, 0x01d6000f, 0, 0, read32_delegate(FUNC(s3c44b0_device::iic_r), &(*m_s3c44b0)), write32_delegate(FUNC(s3c44b0_device::iic_w), &(*m_s3c44b0))); - space.install_readwrite_handler(0x01d80000, 0x01d8000f, 0, 0, read32_delegate(FUNC(s3c44b0_device::clkpow_r), &(*m_s3c44b0)), write32_delegate(FUNC(s3c44b0_device::clkpow_w), &(*m_s3c44b0))); - space.install_readwrite_handler(0x01e00000, 0x01e0003f, 0, 0, read32_delegate(FUNC(s3c44b0_device::irq_r), &(*m_s3c44b0)), write32_delegate(FUNC(s3c44b0_device::irq_w), &(*m_s3c44b0))); - space.install_readwrite_handler(0x01e80000, 0x01e8001b, 0, 0, read32_delegate(FUNC(s3c44b0_device::zdma_0_r), &(*m_s3c44b0)), write32_delegate(FUNC(s3c44b0_device::zdma_0_w), &(*m_s3c44b0))); - space.install_readwrite_handler(0x01e80020, 0x01e8003b, 0, 0, read32_delegate(FUNC(s3c44b0_device::zdma_1_r), &(*m_s3c44b0)), write32_delegate(FUNC(s3c44b0_device::zdma_1_w), &(*m_s3c44b0))); - space.install_readwrite_handler(0x01f00000, 0x01f00047, 0, 0, read32_delegate(FUNC(s3c44b0_device::lcd_r), &(*m_s3c44b0)), write32_delegate(FUNC(s3c44b0_device::lcd_w), &(*m_s3c44b0))); - space.install_readwrite_handler(0x01f80000, 0x01f8001b, 0, 0, read32_delegate(FUNC(s3c44b0_device::bdma_0_r), &(*m_s3c44b0)), write32_delegate(FUNC(s3c44b0_device::bdma_0_w), &(*m_s3c44b0))); - space.install_readwrite_handler(0x01f80020, 0x01f8003b, 0, 0, read32_delegate(FUNC(s3c44b0_device::bdma_1_r), &(*m_s3c44b0)), write32_delegate(FUNC(s3c44b0_device::bdma_1_w), &(*m_s3c44b0))); + space.install_readwrite_handler(0x01c00000, 0x01c0000b, read32_delegate(FUNC(s3c44b0_device::cpuwrap_r), &(*m_s3c44b0)), write32_delegate(FUNC(s3c44b0_device::cpuwrap_w), &(*m_s3c44b0))); + space.install_readwrite_handler(0x01d00000, 0x01d0002b, read32_delegate(FUNC(s3c44b0_device::uart_0_r), &(*m_s3c44b0)), write32_delegate(FUNC(s3c44b0_device::uart_0_w), &(*m_s3c44b0))); + space.install_readwrite_handler(0x01d04000, 0x01d0402b, read32_delegate(FUNC(s3c44b0_device::uart_1_r), &(*m_s3c44b0)), write32_delegate(FUNC(s3c44b0_device::uart_1_w), &(*m_s3c44b0))); + space.install_readwrite_handler(0x01d14000, 0x01d14013, read32_delegate(FUNC(s3c44b0_device::sio_r), &(*m_s3c44b0)), write32_delegate(FUNC(s3c44b0_device::sio_w), &(*m_s3c44b0))); + space.install_readwrite_handler(0x01d18000, 0x01d18013, read32_delegate(FUNC(s3c44b0_device::iis_r), &(*m_s3c44b0)), write32_delegate(FUNC(s3c44b0_device::iis_w), &(*m_s3c44b0))); + space.install_readwrite_handler(0x01d20000, 0x01d20057, read32_delegate(FUNC(s3c44b0_device::gpio_r), &(*m_s3c44b0)), write32_delegate(FUNC(s3c44b0_device::gpio_w), &(*m_s3c44b0))); + space.install_readwrite_handler(0x01d30000, 0x01d3000b, read32_delegate(FUNC(s3c44b0_device::wdt_r), &(*m_s3c44b0)), write32_delegate(FUNC(s3c44b0_device::wdt_w), &(*m_s3c44b0))); + space.install_readwrite_handler(0x01d40000, 0x01d4000b, read32_delegate(FUNC(s3c44b0_device::adc_r), &(*m_s3c44b0)), write32_delegate(FUNC(s3c44b0_device::adc_w), &(*m_s3c44b0))); + space.install_readwrite_handler(0x01d50000, 0x01d5004f, read32_delegate(FUNC(s3c44b0_device::pwm_r), &(*m_s3c44b0)), write32_delegate(FUNC(s3c44b0_device::pwm_w), &(*m_s3c44b0))); + space.install_readwrite_handler(0x01d60000, 0x01d6000f, read32_delegate(FUNC(s3c44b0_device::iic_r), &(*m_s3c44b0)), write32_delegate(FUNC(s3c44b0_device::iic_w), &(*m_s3c44b0))); + space.install_readwrite_handler(0x01d80000, 0x01d8000f, read32_delegate(FUNC(s3c44b0_device::clkpow_r), &(*m_s3c44b0)), write32_delegate(FUNC(s3c44b0_device::clkpow_w), &(*m_s3c44b0))); + space.install_readwrite_handler(0x01e00000, 0x01e0003f, read32_delegate(FUNC(s3c44b0_device::irq_r), &(*m_s3c44b0)), write32_delegate(FUNC(s3c44b0_device::irq_w), &(*m_s3c44b0))); + space.install_readwrite_handler(0x01e80000, 0x01e8001b, read32_delegate(FUNC(s3c44b0_device::zdma_0_r), &(*m_s3c44b0)), write32_delegate(FUNC(s3c44b0_device::zdma_0_w), &(*m_s3c44b0))); + space.install_readwrite_handler(0x01e80020, 0x01e8003b, read32_delegate(FUNC(s3c44b0_device::zdma_1_r), &(*m_s3c44b0)), write32_delegate(FUNC(s3c44b0_device::zdma_1_w), &(*m_s3c44b0))); + space.install_readwrite_handler(0x01f00000, 0x01f00047, read32_delegate(FUNC(s3c44b0_device::lcd_r), &(*m_s3c44b0)), write32_delegate(FUNC(s3c44b0_device::lcd_w), &(*m_s3c44b0))); + space.install_readwrite_handler(0x01f80000, 0x01f8001b, read32_delegate(FUNC(s3c44b0_device::bdma_0_r), &(*m_s3c44b0)), write32_delegate(FUNC(s3c44b0_device::bdma_0_w), &(*m_s3c44b0))); + space.install_readwrite_handler(0x01f80020, 0x01f8003b, read32_delegate(FUNC(s3c44b0_device::bdma_1_r), &(*m_s3c44b0)), write32_delegate(FUNC(s3c44b0_device::bdma_1_w), &(*m_s3c44b0))); } void juicebox_state::machine_reset() diff --git a/src/mame/drivers/jupace.cpp b/src/mame/drivers/jupace.cpp index 802b0c68530..2809fcc0daa 100644 --- a/src/mame/drivers/jupace.cpp +++ b/src/mame/drivers/jupace.cpp @@ -418,7 +418,7 @@ ADDRESS_MAP_END //------------------------------------------------- static ADDRESS_MAP_START( ace_io, AS_IO, 8, ace_state ) - AM_RANGE(0x00, 0x00) AM_MIRROR(0xfffe) AM_MASK(0xff00) AM_READWRITE(io_r, io_w) + AM_RANGE(0x00, 0x00) AM_MIRROR(0x00fe) AM_SELECT(0xff00) AM_READWRITE(io_r, io_w) AM_RANGE(0x01, 0x01) AM_MIRROR(0xff00) AM_READ_PORT("JOY") AM_RANGE(0x41, 0x41) AM_MIRROR(0xff80) AM_READWRITE(ppi_pa_r, ppi_pa_w) AM_RANGE(0x43, 0x43) AM_MIRROR(0xff80) AM_READWRITE(ppi_pb_r, ppi_pb_w) diff --git a/src/mame/drivers/m20.cpp b/src/mame/drivers/m20.cpp index 4fc27f81f58..de0799b5fe0 100644 --- a/src/mame/drivers/m20.cpp +++ b/src/mame/drivers/m20.cpp @@ -333,75 +333,75 @@ void m20_state::install_memory() /* install mainboard memory (aka DRAM0) */ /* <0>0000 */ - pspace.install_readwrite_bank(0x0000, 0x3fff, 0x3fff, 0, "dram0_4000"); - dspace.install_readwrite_bank(0x0000, 0x3fff, 0x3fff, 0, "dram0_4000"); + pspace.install_readwrite_bank(0x0000, 0x3fff, 0x3fff, "dram0_4000"); + dspace.install_readwrite_bank(0x0000, 0x3fff, 0x3fff, "dram0_4000"); /* <0>4000 */ - pspace.install_readwrite_bank(0x4000, 0x7fff, 0x3fff, 0, "dram0_8000"); + pspace.install_readwrite_bank(0x4000, 0x7fff, 0x3fff, "dram0_8000"); /* <0>8000 */ - pspace.install_readwrite_bank(0x8000, 0xbfff, 0x3fff, 0, "dram0_c000"); + pspace.install_readwrite_bank(0x8000, 0xbfff, 0x3fff, "dram0_c000"); /* <0>C000 */ - pspace.install_readwrite_bank(0xc000, 0xcfff, 0x3fff, 0, "dram0_10000"); + pspace.install_readwrite_bank(0xc000, 0xcfff, 0x3fff, "dram0_10000"); /* <1>0000 */ - pspace.install_readwrite_bank(0x10000, 0x13fff, 0x3fff, 0, "dram0_8000"); - dspace.install_readwrite_bank(0x10000, 0x13fff, 0x3fff, 0, "dram0_14000"); + pspace.install_readwrite_bank(0x10000, 0x13fff, 0x3fff, "dram0_8000"); + dspace.install_readwrite_bank(0x10000, 0x13fff, 0x3fff, "dram0_14000"); /* <1>4000 */ - pspace.install_readwrite_bank(0x14000, 0x17fff, 0x3fff, 0, "dram0_c000"); - dspace.install_readwrite_bank(0x14000, 0x17fff, 0x3fff, 0, "dram0_18000"); + pspace.install_readwrite_bank(0x14000, 0x17fff, 0x3fff, "dram0_c000"); + dspace.install_readwrite_bank(0x14000, 0x17fff, 0x3fff, "dram0_18000"); /* <1>8000 */ - pspace.install_readwrite_bank(0x18000, 0x1bfff, 0x3fff, 0, "dram0_10000"); - dspace.install_readwrite_bank(0x18000, 0x1bfff, 0x3fff, 0, "dram0_1c000"); + pspace.install_readwrite_bank(0x18000, 0x1bfff, 0x3fff, "dram0_10000"); + dspace.install_readwrite_bank(0x18000, 0x1bfff, 0x3fff, "dram0_1c000"); /* <1>c000 empty*/ /* <2>0000 */ - pspace.install_readwrite_bank(0x20000, 0x23fff, 0x3fff, 0, "dram0_14000"); - dspace.install_readwrite_bank(0x20000, 0x23fff, 0x3fff, 0, "dram0_14000"); + pspace.install_readwrite_bank(0x20000, 0x23fff, 0x3fff, "dram0_14000"); + dspace.install_readwrite_bank(0x20000, 0x23fff, 0x3fff, "dram0_14000"); /* <2>4000 */ - pspace.install_readwrite_bank(0x24000, 0x27fff, 0x3fff, 0, "dram0_18000"); - dspace.install_readwrite_bank(0x24000, 0x27fff, 0x3fff, 0, "dram0_18000"); + pspace.install_readwrite_bank(0x24000, 0x27fff, 0x3fff, "dram0_18000"); + dspace.install_readwrite_bank(0x24000, 0x27fff, 0x3fff, "dram0_18000"); /* <2>8000 */ - pspace.install_readwrite_bank(0x28000, 0x2bfff, 0x3fff, 0, "dram0_1c000"); - dspace.install_readwrite_bank(0x28000, 0x2bfff, 0x3fff, 0, "dram0_1c000"); + pspace.install_readwrite_bank(0x28000, 0x2bfff, 0x3fff, "dram0_1c000"); + dspace.install_readwrite_bank(0x28000, 0x2bfff, 0x3fff, "dram0_1c000"); /* <2>c000 empty*/ /* <3>0000 (video buffer) - pspace.install_readwrite_bank(0x30000, 0x33fff, 0x3fff, 0, "dram0_0000"); - dspace.install_readwrite_bank(0x30000, 0x33fff, 0x3fff, 0, "dram0_0000"); + pspace.install_readwrite_bank(0x30000, 0x33fff, 0x3fff, "dram0_0000"); + dspace.install_readwrite_bank(0x30000, 0x33fff, 0x3fff, "dram0_0000"); */ /* <5>0000 */ - dspace.install_readwrite_bank(0x50000, 0x53fff, 0x3fff, 0, "dram0_8000"); + dspace.install_readwrite_bank(0x50000, 0x53fff, 0x3fff, "dram0_8000"); /* <5>4000 */ - dspace.install_readwrite_bank(0x54000, 0x57fff, 0x3fff, 0, "dram0_c000"); + dspace.install_readwrite_bank(0x54000, 0x57fff, 0x3fff, "dram0_c000"); /* <5>8000 */ - dspace.install_readwrite_bank(0x58000, 0x5bfff, 0x3fff, 0, "dram0_10000"); + dspace.install_readwrite_bank(0x58000, 0x5bfff, 0x3fff, "dram0_10000"); /* <5>c000 expansion bus */ /* <6>0000 */ - pspace.install_readwrite_bank(0x60000, 0x63fff, 0x3fff, 0, "dram0_8000"); - dspace.install_readwrite_bank(0x60000, 0x63fff, 0x3fff, 0, "dram0_8000"); + pspace.install_readwrite_bank(0x60000, 0x63fff, 0x3fff, "dram0_8000"); + dspace.install_readwrite_bank(0x60000, 0x63fff, 0x3fff, "dram0_8000"); /* <6>4000 */ - pspace.install_readwrite_bank(0x64000, 0x67fff, 0x3fff, 0, "dram0_c000"); - dspace.install_readwrite_bank(0x64000, 0x67fff, 0x3fff, 0, "dram0_c000"); + pspace.install_readwrite_bank(0x64000, 0x67fff, 0x3fff, "dram0_c000"); + dspace.install_readwrite_bank(0x64000, 0x67fff, 0x3fff, "dram0_c000"); /* <6>8000 */ - pspace.install_readwrite_bank(0x68000, 0x6bfff, 0x3fff, 0, "dram0_10000"); - dspace.install_readwrite_bank(0x68000, 0x6bfff, 0x3fff, 0, "dram0_10000"); + pspace.install_readwrite_bank(0x68000, 0x6bfff, 0x3fff, "dram0_10000"); + dspace.install_readwrite_bank(0x68000, 0x6bfff, 0x3fff, "dram0_10000"); /* <6>c000 empty*/ /* segment <7> expansion ROM? */ /* <8>0000 */ - pspace.install_readwrite_bank(0x80000, 0x83fff, 0x3fff, 0, "dram0_8000"); - dspace.install_readwrite_bank(0x80000, 0x83fff, 0x3fff, 0, "dram0_18000"); + pspace.install_readwrite_bank(0x80000, 0x83fff, 0x3fff, "dram0_8000"); + dspace.install_readwrite_bank(0x80000, 0x83fff, 0x3fff, "dram0_18000"); /* <8>4000 */ - pspace.install_readwrite_bank(0x84000, 0x87fff, 0x3fff, 0, "dram0_c000"); - dspace.install_readwrite_bank(0x84000, 0x87fff, 0x3fff, 0, "dram0_1c000"); + pspace.install_readwrite_bank(0x84000, 0x87fff, 0x3fff, "dram0_c000"); + dspace.install_readwrite_bank(0x84000, 0x87fff, 0x3fff, "dram0_1c000"); /* <9>0000 */ - pspace.install_readwrite_bank(0x90000, 0x93fff, 0x3fff, 0, "dram0_18000"); - dspace.install_readwrite_bank(0x90000, 0x93fff, 0x3fff, 0, "dram0_18000"); + pspace.install_readwrite_bank(0x90000, 0x93fff, 0x3fff, "dram0_18000"); + dspace.install_readwrite_bank(0x90000, 0x93fff, 0x3fff, "dram0_18000"); /* <9>4000 */ - pspace.install_readwrite_bank(0x94000, 0x97fff, 0x3fff, 0, "dram0_1c000"); - dspace.install_readwrite_bank(0x94000, 0x97fff, 0x3fff, 0, "dram0_1c000"); + pspace.install_readwrite_bank(0x94000, 0x97fff, 0x3fff, "dram0_1c000"); + dspace.install_readwrite_bank(0x94000, 0x97fff, 0x3fff, "dram0_1c000"); /* <A>0000 */ - pspace.install_readwrite_bank(0xa0000, 0xa3fff, 0x3fff, 0, "dram0_8000"); - dspace.install_readwrite_bank(0xa0000, 0xa3fff, 0x3fff, 0, "dram0_8000"); + pspace.install_readwrite_bank(0xa0000, 0xa3fff, 0x3fff, "dram0_8000"); + dspace.install_readwrite_bank(0xa0000, 0xa3fff, 0x3fff, "dram0_8000"); /* <A>4000 */ - pspace.install_readwrite_bank(0xa4000, 0xa7fff, 0x3fff, 0, "dram0_c000"); - dspace.install_readwrite_bank(0xa4000, 0xa7fff, 0x3fff, 0, "dram0_c000"); + pspace.install_readwrite_bank(0xa4000, 0xa7fff, 0x3fff, "dram0_c000"); + dspace.install_readwrite_bank(0xa4000, 0xa7fff, 0x3fff, "dram0_c000"); //membank("dram0_0000")->set_base(memptr); membank("dram0_4000")->set_base(memptr + 0x4000); @@ -425,9 +425,9 @@ void m20_state::install_memory() AM_RANGE( 0x88000, 0x8bfff ) AM_RAM AM_SHARE("dram1_4000") AM_RANGE( 0xa8000, 0xabfff ) AM_RAM AM_SHARE("dram1_4000") */ - pspace.install_readwrite_bank(0x2c000, 0x2ffff, 0x3fff, 0, "dram1_0000"); - pspace.install_readwrite_bank(0x88000, 0x8bfff, 0x3fff, 0, "dram1_4000"); - pspace.install_readwrite_bank(0xa8000, 0xabfff, 0x3fff, 0, "dram1_4000"); + pspace.install_readwrite_bank(0x2c000, 0x2ffff, 0x3fff, "dram1_0000"); + pspace.install_readwrite_bank(0x88000, 0x8bfff, 0x3fff, "dram1_4000"); + pspace.install_readwrite_bank(0xa8000, 0xabfff, 0x3fff, "dram1_4000"); /* data @@ -436,10 +436,10 @@ void m20_state::install_memory() AM_RANGE( 0x2c000, 0x2ffff ) AM_RAM AM_SHARE("dram1_0000") AM_RANGE( 0xa8000, 0xabfff ) AM_RAM AM_SHARE("dram1_4000") */ - dspace.install_readwrite_bank(0x4000, 0x7fff, 0x3fff, 0, "dram1_4000"); - dspace.install_readwrite_bank(0x1c000, 0x1ffff, 0x3fff, 0, "dram1_0000"); - dspace.install_readwrite_bank(0x2c000, 0x2ffff, 0x3fff, 0, "dram1_0000"); - dspace.install_readwrite_bank(0xa8000, 0xabfff, 0x3fff, 0, "dram1_4000"); + dspace.install_readwrite_bank(0x4000, 0x7fff, 0x3fff, "dram1_4000"); + dspace.install_readwrite_bank(0x1c000, 0x1ffff, 0x3fff, "dram1_0000"); + dspace.install_readwrite_bank(0x2c000, 0x2ffff, 0x3fff, "dram1_0000"); + dspace.install_readwrite_bank(0xa8000, 0xabfff, 0x3fff, "dram1_4000"); membank("dram1_0000")->set_base(memptr + 0x20000); membank("dram1_4000")->set_base(memptr + 0x24000); @@ -452,9 +452,9 @@ void m20_state::install_memory() AM_RANGE( 0x98000, 0x9bfff ) AM_RAM AM_SHARE("dram2_4000") AM_RANGE( 0xac000, 0xaffff ) AM_RAM AM_SHARE("dram2_0000") */ - pspace.install_readwrite_bank(0x8c000, 0x8ffff, 0x3fff, 0, "dram2_0000"); - pspace.install_readwrite_bank(0x98000, 0x9bfff, 0x3fff, 0, "dram2_4000"); - pspace.install_readwrite_bank(0xac000, 0xaffff, 0x3fff, 0, "dram2_0000"); + pspace.install_readwrite_bank(0x8c000, 0x8ffff, 0x3fff, "dram2_0000"); + pspace.install_readwrite_bank(0x98000, 0x9bfff, 0x3fff, "dram2_4000"); + pspace.install_readwrite_bank(0xac000, 0xaffff, 0x3fff, "dram2_0000"); /* data AM_RANGE( 0x08000, 0x0bfff ) AM_RAM AM_SHARE("dram2_0000") @@ -463,11 +463,11 @@ void m20_state::install_memory() AM_RANGE( 0x98000, 0x9bfff ) AM_RAM AM_SHARE("dram2_4000") AM_RANGE( 0xac000, 0xaffff ) AM_RAM AM_SHARE("dram2_0000") */ - dspace.install_readwrite_bank(0x8000, 0xbfff, 0x3fff, 0, "dram2_0000"); - dspace.install_readwrite_bank(0xc000, 0xffff, 0x3fff, 0, "dram2_4000"); - dspace.install_readwrite_bank(0x88000, 0x8bfff, 0x3fff, 0, "dram2_4000"); - dspace.install_readwrite_bank(0x98000, 0x9bfff, 0x3fff, 0, "dram2_4000"); - dspace.install_readwrite_bank(0xac000, 0xaffff, 0x3fff, 0, "dram2_0000"); + dspace.install_readwrite_bank(0x8000, 0xbfff, 0x3fff, "dram2_0000"); + dspace.install_readwrite_bank(0xc000, 0xffff, 0x3fff, "dram2_4000"); + dspace.install_readwrite_bank(0x88000, 0x8bfff, 0x3fff, "dram2_4000"); + dspace.install_readwrite_bank(0x98000, 0x9bfff, 0x3fff, "dram2_4000"); + dspace.install_readwrite_bank(0xac000, 0xaffff, 0x3fff, "dram2_0000"); membank("dram2_0000")->set_base(memptr + 0x28000); membank("dram2_4000")->set_base(memptr + 0x2c000); @@ -479,8 +479,8 @@ void m20_state::install_memory() AM_RANGE( 0x9c000, 0x9ffff ) AM_RAM AM_SHARE("dram3_0000") AM_RANGE( 0xb0000, 0xb3fff ) AM_RAM AM_SHARE("dram3_4000") */ - pspace.install_readwrite_bank(0x9c000, 0x9ffff, 0x3fff, 0, "dram3_0000"); - pspace.install_readwrite_bank(0xb0000, 0xb3fff, 0x3fff, 0, "dram3_4000"); + pspace.install_readwrite_bank(0x9c000, 0x9ffff, 0x3fff, "dram3_0000"); + pspace.install_readwrite_bank(0xb0000, 0xb3fff, 0x3fff, "dram3_4000"); /* data AM_RANGE( 0x44000, 0x47fff ) AM_RAM AM_SHARE("dram3_0000") @@ -490,12 +490,12 @@ void m20_state::install_memory() AM_RANGE( 0xb0000, 0xb3fff ) AM_RAM AM_SHARE("dram3_4000") AM_RANGE( 0xc0000, 0xc3fff ) AM_RAM AM_SHARE("dram3_4000") */ - dspace.install_readwrite_bank(0x44000, 0x47fff, 0x3fff, 0, "dram3_0000"); - dspace.install_readwrite_bank(0x48000, 0x4bfff, 0x3fff, 0, "dram3_4000"); - dspace.install_readwrite_bank(0x8c000, 0x8ffff, 0x3fff, 0, "dram3_0000"); - dspace.install_readwrite_bank(0x9c000, 0x9ffff, 0x3fff, 0, "dram3_0000"); - dspace.install_readwrite_bank(0xb0000, 0xb3fff, 0x3fff, 0, "dram3_4000"); - dspace.install_readwrite_bank(0xc0000, 0xc3fff, 0x3fff, 0, "dram3_4000"); + dspace.install_readwrite_bank(0x44000, 0x47fff, 0x3fff, "dram3_0000"); + dspace.install_readwrite_bank(0x48000, 0x4bfff, 0x3fff, "dram3_4000"); + dspace.install_readwrite_bank(0x8c000, 0x8ffff, 0x3fff, "dram3_0000"); + dspace.install_readwrite_bank(0x9c000, 0x9ffff, 0x3fff, "dram3_0000"); + dspace.install_readwrite_bank(0xb0000, 0xb3fff, 0x3fff, "dram3_4000"); + dspace.install_readwrite_bank(0xc0000, 0xc3fff, 0x3fff, "dram3_4000"); membank("dram3_0000")->set_base(memptr + 0x30000); membank("dram3_4000")->set_base(memptr + 0x34000); @@ -518,16 +518,16 @@ void m20_state::install_memory() AM_RANGE( 0xb4000, 0xb7fff ) AM_RAM AM_SHARE("dram1_18000") AM_RANGE( 0xb8000, 0xbbfff ) AM_RAM AM_SHARE("dram1_1c000") */ - pspace.install_readwrite_bank(0x2c000, 0x2ffff, 0x3fff, 0, "dram1_0000"); - pspace.install_readwrite_bank(0x88000, 0x8bfff, 0x3fff, 0, "dram1_4000"); - pspace.install_readwrite_bank(0x8c000, 0x8ffff, 0x3fff, 0, "dram1_8000"); - pspace.install_readwrite_bank(0x98000, 0x9bfff, 0x3fff, 0, "dram1_c000"); - pspace.install_readwrite_bank(0x9c000, 0x9ffff, 0x3fff, 0, "dram1_10000"); - pspace.install_readwrite_bank(0xa8000, 0xabfff, 0x3fff, 0, "dram1_4000"); - pspace.install_readwrite_bank(0xac000, 0xaffff, 0x3fff, 0, "dram1_8000"); - pspace.install_readwrite_bank(0xb0000, 0xb3fff, 0x3fff, 0, "dram1_14000"); - pspace.install_readwrite_bank(0xb4000, 0xb7fff, 0x3fff, 0, "dram1_18000"); - pspace.install_readwrite_bank(0xb8000, 0xbbfff, 0x3fff, 0, "dram1_1c000"); + pspace.install_readwrite_bank(0x2c000, 0x2ffff, 0x3fff, "dram1_0000"); + pspace.install_readwrite_bank(0x88000, 0x8bfff, 0x3fff, "dram1_4000"); + pspace.install_readwrite_bank(0x8c000, 0x8ffff, 0x3fff, "dram1_8000"); + pspace.install_readwrite_bank(0x98000, 0x9bfff, 0x3fff, "dram1_c000"); + pspace.install_readwrite_bank(0x9c000, 0x9ffff, 0x3fff, "dram1_10000"); + pspace.install_readwrite_bank(0xa8000, 0xabfff, 0x3fff, "dram1_4000"); + pspace.install_readwrite_bank(0xac000, 0xaffff, 0x3fff, "dram1_8000"); + pspace.install_readwrite_bank(0xb0000, 0xb3fff, 0x3fff, "dram1_14000"); + pspace.install_readwrite_bank(0xb4000, 0xb7fff, 0x3fff, "dram1_18000"); + pspace.install_readwrite_bank(0xb8000, 0xbbfff, 0x3fff, "dram1_1c000"); /* data AM_RANGE( 0x04000, 0x07fff ) AM_RAM AM_SHARE("dram1_4000") @@ -543,18 +543,18 @@ void m20_state::install_memory() AM_RANGE( 0xb4000, 0xb7fff ) AM_RAM AM_SHARE("dram1_18000") AM_RANGE( 0xb8000, 0xbbfff ) AM_RAM AM_SHARE("dram1_1c000") */ - dspace.install_readwrite_bank(0x4000, 0x7fff, 0x3fff, 0, "dram1_4000"); - dspace.install_readwrite_bank(0x1c000, 0x1ffff, 0x3fff, 0, "dram1_0000"); - dspace.install_readwrite_bank(0x2c000, 0x2ffff, 0x3fff, 0, "dram1_0000"); - dspace.install_readwrite_bank(0x88000, 0x8bfff, 0x3fff, 0, "dram1_c000"); - dspace.install_readwrite_bank(0x8c000, 0x8ffff, 0x3fff, 0, "dram1_10000"); - dspace.install_readwrite_bank(0x98000, 0x9bfff, 0x3fff, 0, "dram1_c000"); - dspace.install_readwrite_bank(0x9c000, 0x9ffff, 0x3fff, 0, "dram1_10000"); - dspace.install_readwrite_bank(0xa8000, 0xabfff, 0x3fff, 0, "dram1_4000"); - dspace.install_readwrite_bank(0xac000, 0xaffff, 0x3fff, 0, "dram1_8000"); - dspace.install_readwrite_bank(0xb0000, 0xb3fff, 0x3fff, 0, "dram1_14000"); - dspace.install_readwrite_bank(0xb4000, 0xb7fff, 0x3fff, 0, "dram1_18000"); - dspace.install_readwrite_bank(0xb8000, 0xbbfff, 0x3fff, 0, "dram1_1c000"); + dspace.install_readwrite_bank(0x4000, 0x7fff, 0x3fff, "dram1_4000"); + dspace.install_readwrite_bank(0x1c000, 0x1ffff, 0x3fff, "dram1_0000"); + dspace.install_readwrite_bank(0x2c000, 0x2ffff, 0x3fff, "dram1_0000"); + dspace.install_readwrite_bank(0x88000, 0x8bfff, 0x3fff, "dram1_c000"); + dspace.install_readwrite_bank(0x8c000, 0x8ffff, 0x3fff, "dram1_10000"); + dspace.install_readwrite_bank(0x98000, 0x9bfff, 0x3fff, "dram1_c000"); + dspace.install_readwrite_bank(0x9c000, 0x9ffff, 0x3fff, "dram1_10000"); + dspace.install_readwrite_bank(0xa8000, 0xabfff, 0x3fff, "dram1_4000"); + dspace.install_readwrite_bank(0xac000, 0xaffff, 0x3fff, "dram1_8000"); + dspace.install_readwrite_bank(0xb0000, 0xb3fff, 0x3fff, "dram1_14000"); + dspace.install_readwrite_bank(0xb4000, 0xb7fff, 0x3fff, "dram1_18000"); + dspace.install_readwrite_bank(0xb8000, 0xbbfff, 0x3fff, "dram1_1c000"); membank("dram1_0000")->set_base(memptr + 0x20000); membank("dram1_4000")->set_base(memptr + 0x24000); @@ -580,14 +580,14 @@ void m20_state::install_memory() AM_RANGE( 0xd4000, 0xd7fff ) AM_RAM AM_SHARE("dram2_18000") AM_RANGE( 0xd8000, 0xdbfff ) AM_RAM AM_SHARE("dram2_1c000") */ - pspace.install_readwrite_bank(0xbc000, 0xbffff, 0x3fff, 0, "dram2_0000"); - pspace.install_readwrite_bank(0xc0000, 0xc3fff, 0x3fff, 0, "dram2_4000"); - pspace.install_readwrite_bank(0xc4000, 0xc7fff, 0x3fff, 0, "dram2_8000"); - pspace.install_readwrite_bank(0xc8000, 0xcbfff, 0x3fff, 0, "dram2_c000"); - pspace.install_readwrite_bank(0xcc000, 0xcffff, 0x3fff, 0, "dram2_10000"); - pspace.install_readwrite_bank(0xd0000, 0xd3fff, 0x3fff, 0, "dram2_14000"); - pspace.install_readwrite_bank(0xd4000, 0xd7fff, 0x3fff, 0, "dram2_18000"); - pspace.install_readwrite_bank(0xd8000, 0xdbfff, 0x3fff, 0, "dram2_1c000"); + pspace.install_readwrite_bank(0xbc000, 0xbffff, 0x3fff, "dram2_0000"); + pspace.install_readwrite_bank(0xc0000, 0xc3fff, 0x3fff, "dram2_4000"); + pspace.install_readwrite_bank(0xc4000, 0xc7fff, 0x3fff, "dram2_8000"); + pspace.install_readwrite_bank(0xc8000, 0xcbfff, 0x3fff, "dram2_c000"); + pspace.install_readwrite_bank(0xcc000, 0xcffff, 0x3fff, "dram2_10000"); + pspace.install_readwrite_bank(0xd0000, 0xd3fff, 0x3fff, "dram2_14000"); + pspace.install_readwrite_bank(0xd4000, 0xd7fff, 0x3fff, "dram2_18000"); + pspace.install_readwrite_bank(0xd8000, 0xdbfff, 0x3fff, "dram2_1c000"); /* data AM_RANGE( 0x08000, 0x0bfff ) AM_RAM AM_SHARE("dram2_0000") @@ -604,16 +604,16 @@ void m20_state::install_memory() AM_RANGE( 0xd4000, 0xd7fff ) AM_RAM AM_SHARE("dram2_18000") AM_RANGE( 0xd8000, 0xdbfff ) AM_RAM AM_SHARE("dram2_1c000") */ - dspace.install_readwrite_bank(0x8000, 0xbfff, 0x3fff, 0, "dram2_0000"); - dspace.install_readwrite_bank(0xc000, 0xffff, 0x3fff, 0, "dram2_4000"); - dspace.install_readwrite_bank(0xbc000, 0xbffff, 0x3fff, 0, "dram2_0000"); - dspace.install_readwrite_bank(0xc0000, 0xc3fff, 0x3fff, 0, "dram2_4000"); - dspace.install_readwrite_bank(0xc4000, 0xc7fff, 0x3fff, 0, "dram2_8000"); - dspace.install_readwrite_bank(0xc8000, 0xcbfff, 0x3fff, 0, "dram2_c000"); - dspace.install_readwrite_bank(0xcc000, 0xcffff, 0x3fff, 0, "dram2_10000"); - dspace.install_readwrite_bank(0xd0000, 0xd3fff, 0x3fff, 0, "dram2_14000"); - dspace.install_readwrite_bank(0xd4000, 0xd7fff, 0x3fff, 0, "dram2_18000"); - dspace.install_readwrite_bank(0xd8000, 0xdbfff, 0x3fff, 0, "dram2_1c000"); + dspace.install_readwrite_bank(0x8000, 0xbfff, 0x3fff, "dram2_0000"); + dspace.install_readwrite_bank(0xc000, 0xffff, 0x3fff, "dram2_4000"); + dspace.install_readwrite_bank(0xbc000, 0xbffff, 0x3fff, "dram2_0000"); + dspace.install_readwrite_bank(0xc0000, 0xc3fff, 0x3fff, "dram2_4000"); + dspace.install_readwrite_bank(0xc4000, 0xc7fff, 0x3fff, "dram2_8000"); + dspace.install_readwrite_bank(0xc8000, 0xcbfff, 0x3fff, "dram2_c000"); + dspace.install_readwrite_bank(0xcc000, 0xcffff, 0x3fff, "dram2_10000"); + dspace.install_readwrite_bank(0xd0000, 0xd3fff, 0x3fff, "dram2_14000"); + dspace.install_readwrite_bank(0xd4000, 0xd7fff, 0x3fff, "dram2_18000"); + dspace.install_readwrite_bank(0xd8000, 0xdbfff, 0x3fff, "dram2_1c000"); membank("dram2_0000")->set_base(memptr + 0x40000); membank("dram2_4000")->set_base(memptr + 0x44000); @@ -640,15 +640,15 @@ void m20_state::install_memory() AM_RANGE( 0xf8000, 0xfbfff ) AM_RAM AM_SHARE("dram3_1c000") AM_RANGE( 0xfc000, 0xfffff ) AM_RAM AM_SHARE("dram3_0000") */ - pspace.install_readwrite_bank(0xdc000, 0xdffff, 0x3fff, 0, "dram3_0000"); - pspace.install_readwrite_bank(0xe0000, 0xe3fff, 0x3fff, 0, "dram3_4000"); - pspace.install_readwrite_bank(0xe4000, 0xe7fff, 0x3fff, 0, "dram3_8000"); - pspace.install_readwrite_bank(0xe8000, 0xebfff, 0x3fff, 0, "dram3_c000"); - pspace.install_readwrite_bank(0xec000, 0xeffff, 0x3fff, 0, "dram3_10000"); - pspace.install_readwrite_bank(0xf0000, 0xf3fff, 0x3fff, 0, "dram3_14000"); - pspace.install_readwrite_bank(0xf4000, 0xf7fff, 0x3fff, 0, "dram3_18000"); - pspace.install_readwrite_bank(0xf8000, 0xfbfff, 0x3fff, 0, "dram3_1c000"); - pspace.install_readwrite_bank(0xfc000, 0xfffff, 0x3fff, 0, "dram3_0000"); + pspace.install_readwrite_bank(0xdc000, 0xdffff, 0x3fff, "dram3_0000"); + pspace.install_readwrite_bank(0xe0000, 0xe3fff, 0x3fff, "dram3_4000"); + pspace.install_readwrite_bank(0xe4000, 0xe7fff, 0x3fff, "dram3_8000"); + pspace.install_readwrite_bank(0xe8000, 0xebfff, 0x3fff, "dram3_c000"); + pspace.install_readwrite_bank(0xec000, 0xeffff, 0x3fff, "dram3_10000"); + pspace.install_readwrite_bank(0xf0000, 0xf3fff, 0x3fff, "dram3_14000"); + pspace.install_readwrite_bank(0xf4000, 0xf7fff, 0x3fff, "dram3_18000"); + pspace.install_readwrite_bank(0xf8000, 0xfbfff, 0x3fff, "dram3_1c000"); + pspace.install_readwrite_bank(0xfc000, 0xfffff, 0x3fff, "dram3_0000"); /* data AM_RANGE( 0x44000, 0x47fff ) AM_RAM AM_SHARE("dram3_0000") @@ -665,17 +665,17 @@ void m20_state::install_memory() AM_RANGE( 0xf8000, 0xfbfff ) AM_RAM AM_SHARE("dram3_1c000") AM_RANGE( 0xfc000, 0xfffff ) AM_RAM AM_SHARE("dram3_0000") */ - dspace.install_readwrite_bank(0x44000, 0x47fff, 0x3fff, 0, "dram3_0000"); - dspace.install_readwrite_bank(0x48000, 0x4bfff, 0x3fff, 0, "dram3_4000"); - dspace.install_readwrite_bank(0xdc000, 0xdffff, 0x3fff, 0, "dram3_0000"); - dspace.install_readwrite_bank(0xe0000, 0xe3fff, 0x3fff, 0, "dram3_4000"); - dspace.install_readwrite_bank(0xe4000, 0xe7fff, 0x3fff, 0, "dram3_8000"); - dspace.install_readwrite_bank(0xe8000, 0xebfff, 0x3fff, 0, "dram3_c000"); - dspace.install_readwrite_bank(0xec000, 0xeffff, 0x3fff, 0, "dram3_10000"); - dspace.install_readwrite_bank(0xf0000, 0xf3fff, 0x3fff, 0, "dram3_14000"); - dspace.install_readwrite_bank(0xf4000, 0xf7fff, 0x3fff, 0, "dram3_18000"); - dspace.install_readwrite_bank(0xf8000, 0xfbfff, 0x3fff, 0, "dram3_1c000"); - dspace.install_readwrite_bank(0xfc000, 0xfffff, 0x3fff, 0, "dram3_0000"); + dspace.install_readwrite_bank(0x44000, 0x47fff, 0x3fff, "dram3_0000"); + dspace.install_readwrite_bank(0x48000, 0x4bfff, 0x3fff, "dram3_4000"); + dspace.install_readwrite_bank(0xdc000, 0xdffff, 0x3fff, "dram3_0000"); + dspace.install_readwrite_bank(0xe0000, 0xe3fff, 0x3fff, "dram3_4000"); + dspace.install_readwrite_bank(0xe4000, 0xe7fff, 0x3fff, "dram3_8000"); + dspace.install_readwrite_bank(0xe8000, 0xebfff, 0x3fff, "dram3_c000"); + dspace.install_readwrite_bank(0xec000, 0xeffff, 0x3fff, "dram3_10000"); + dspace.install_readwrite_bank(0xf0000, 0xf3fff, 0x3fff, "dram3_14000"); + dspace.install_readwrite_bank(0xf4000, 0xf7fff, 0x3fff, "dram3_18000"); + dspace.install_readwrite_bank(0xf8000, 0xfbfff, 0x3fff, "dram3_1c000"); + dspace.install_readwrite_bank(0xfc000, 0xfffff, 0x3fff, "dram3_0000"); membank("dram3_0000")->set_base(memptr + 0x60000); membank("dram3_4000")->set_base(memptr + 0x64000); diff --git a/src/mame/drivers/m72.cpp b/src/mame/drivers/m72.cpp index acab1dcb3e6..84e51098f57 100644 --- a/src/mame/drivers/m72.cpp +++ b/src/mame/drivers/m72.cpp @@ -480,8 +480,8 @@ DRIVER_INIT_MEMBER(m72_state,m72_8751) io.install_write_handler(0xc0, 0xc1, write16_delegate(FUNC(m72_state::main_mcu_sound_w),this)); /* sound cpu */ - sndio.install_write_handler(0x82, 0x82, 0xff, 0, write8_delegate(FUNC(dac_device::write_unsigned8),(dac_device*)m_dac)); - sndio.install_read_handler (0x84, 0x84, 0xff, 0, read8_delegate(FUNC(m72_state::snd_cpu_sample_r),this)); + sndio.install_write_handler(0x82, 0x82, write8_delegate(FUNC(dac_device::write_unsigned8),(dac_device*)m_dac)); + sndio.install_read_handler (0x84, 0x84, read8_delegate(FUNC(m72_state::snd_cpu_sample_r),this)); /* lohtb2 */ #if 0 diff --git a/src/mame/drivers/mc80.cpp b/src/mame/drivers/mc80.cpp index d9eff85385d..a84fae0b6bb 100644 --- a/src/mame/drivers/mc80.cpp +++ b/src/mame/drivers/mc80.cpp @@ -52,7 +52,7 @@ static ADDRESS_MAP_START(mc8030_io, AS_IO, 8, mc80_state) AM_RANGE(0x80, 0x83) AM_MIRROR(0xff00) AM_DEVREADWRITE("zve_ctc", z80ctc_device, read, write) // user CTC AM_RANGE(0x84, 0x87) AM_MIRROR(0xff00) AM_DEVREADWRITE("zve_pio", z80pio_device, read, write) // PIO unknown usage AM_RANGE(0x88, 0x8f) AM_MIRROR(0xff00) AM_WRITE(mc8030_zve_write_protect_w) - AM_RANGE(0xc0, 0xcf) AM_MIRROR(0xff00) AM_WRITE(mc8030_vis_w) AM_MASK(0xffff) + AM_RANGE(0xc0, 0xcf) AM_SELECT(0xff00) AM_WRITE(mc8030_vis_w) AM_RANGE(0xd0, 0xd3) AM_MIRROR(0xff00) AM_DEVREADWRITE("asp_sio", z80sio0_device, cd_ba_r, cd_ba_w) // keyboard & IFSS? AM_RANGE(0xd4, 0xd7) AM_MIRROR(0xff00) AM_DEVREADWRITE("asp_ctc", z80ctc_device, read, write) // sio bauds, KMBG? and kbd AM_RANGE(0xd8, 0xdb) AM_MIRROR(0xff00) AM_DEVREADWRITE("asp_pio", z80pio_device, read, write) // external bus diff --git a/src/mame/drivers/mcr.cpp b/src/mame/drivers/mcr.cpp index 1080f96513f..f95392d9bc3 100644 --- a/src/mame/drivers/mcr.cpp +++ b/src/mame/drivers/mcr.cpp @@ -2858,7 +2858,7 @@ DRIVER_INIT_MEMBER(mcr_state,twotiger) mcr_init(90010, 91399, 90913); machine().device<midway_ssio_device>("ssio")->set_custom_output(4, 0xff, write8_delegate(FUNC(mcr_state::twotiger_op4_w),this)); - m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xe800, 0xefff, 0, 0x1000, read8_delegate(FUNC(mcr_state::twotiger_videoram_r),this), write8_delegate(FUNC(mcr_state::twotiger_videoram_w),this)); + m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xe800, 0xefff, 0, 0x1000, 0, read8_delegate(FUNC(mcr_state::twotiger_videoram_r),this), write8_delegate(FUNC(mcr_state::twotiger_videoram_w),this)); } diff --git a/src/mame/drivers/megatech.cpp b/src/mame/drivers/megatech.cpp index 1690d333b39..891032718ae 100644 --- a/src/mame/drivers/megatech.cpp +++ b/src/mame/drivers/megatech.cpp @@ -366,7 +366,7 @@ void mtech_state::set_genz80_as_sms() // main ram area sms_mainram = std::make_unique<UINT8[]>(0x2000); - prg.install_ram(0xc000, 0xdfff, 0, 0x2000, sms_mainram.get()); + prg.install_ram(0xc000, 0xdfff, 0x2000, sms_mainram.get()); memset(sms_mainram.get(), 0x00, 0x2000); // fixed rom bank area @@ -378,10 +378,10 @@ void mtech_state::set_genz80_as_sms() prg.install_write_handler(0xfffc, 0xffff, write8_delegate(FUNC(mtech_state::mt_sms_standard_rom_bank_w),this)); // ports - io.install_read_handler (0x40, 0x41, 0xff, 0x3e, read8_delegate(FUNC(mtech_state::sms_count_r),this)); - io.install_write_handler (0x40, 0x41, 0xff, 0x3e, write8_delegate(FUNC(sn76496_device::write),(sn76496_base_device *)m_snsnd)); - io.install_readwrite_handler (0x80, 0x80, 0xff, 0x3e, read8_delegate(FUNC(sega315_5124_device::vram_read),(sega315_5124_device *)m_vdp), write8_delegate(FUNC(sega315_5124_device::vram_write),(sega315_5124_device *)m_vdp)); - io.install_readwrite_handler (0x81, 0x81, 0xff, 0x3e, read8_delegate(FUNC(sega315_5124_device::register_read),(sega315_5124_device *)m_vdp), write8_delegate(FUNC(sega315_5124_device::register_write),(sega315_5124_device *)m_vdp)); + io.install_read_handler (0x40, 0x41, 0, 0x3e, 0, read8_delegate(FUNC(mtech_state::sms_count_r),this)); + io.install_write_handler (0x40, 0x41, 0, 0x3e, 0, write8_delegate(FUNC(sn76496_device::write),(sn76496_base_device *)m_snsnd)); + io.install_readwrite_handler (0x80, 0x80, 0, 0x3e, 0, read8_delegate(FUNC(sega315_5124_device::vram_read),(sega315_5124_device *)m_vdp), write8_delegate(FUNC(sega315_5124_device::vram_write),(sega315_5124_device *)m_vdp)); + io.install_readwrite_handler (0x81, 0x81, 0, 0x3e, 0, read8_delegate(FUNC(sega315_5124_device::register_read),(sega315_5124_device *)m_vdp), write8_delegate(FUNC(sega315_5124_device::register_write),(sega315_5124_device *)m_vdp)); io.install_read_handler (0x10, 0x10, read8_delegate(FUNC(mtech_state::sms_ioport_dd_r),this)); // super tetris diff --git a/src/mame/drivers/model3.cpp b/src/mame/drivers/model3.cpp index 70673ba93ea..ad81aa4ef73 100644 --- a/src/mame/drivers/model3.cpp +++ b/src/mame/drivers/model3.cpp @@ -5701,9 +5701,9 @@ DRIVER_INIT_MEMBER(model3_state, genprot) { // std::string key = parameter(":315_5881:key"); - m_maincpu->space(AS_PROGRAM).install_ram(0xf0180000, 0xf019ffff, 0, 0x0e000000); + m_maincpu->space(AS_PROGRAM).install_ram(0xf0180000, 0xf019ffff, 0x0e000000); - m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xf01a0000, 0xf01a003f, 0, 0x0e000000, read64_delegate(FUNC(model3_state::model3_5881prot_r), this), write64_delegate(FUNC(model3_state::model3_5881prot_w), this) ); + m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xf01a0000, 0xf01a003f, 0, 0x0e000000, 0, read64_delegate(FUNC(model3_state::model3_5881prot_r), this), write64_delegate(FUNC(model3_state::model3_5881prot_w), this) ); } diff --git a/src/mame/drivers/mpu4.cpp b/src/mame/drivers/mpu4.cpp index 72091506257..ea9465e7298 100644 --- a/src/mame/drivers/mpu4.cpp +++ b/src/mame/drivers/mpu4.cpp @@ -2113,14 +2113,14 @@ void mpu4_state::mpu4_install_mod4oki_space(address_space &space) pia6821_device *pia_ic4ss = space.machine().device<pia6821_device>("pia_ic4ss"); ptm6840_device *ptm_ic3ss = space.machine().device<ptm6840_device>("ptm_ic3ss"); - space.install_readwrite_handler(0x0880, 0x0883, 0, 0, read8_delegate(FUNC(pia6821_device::read), pia_ic4ss), write8_delegate(FUNC(pia6821_device::write), pia_ic4ss)); - space.install_read_handler(0x08c0, 0x08c7, 0, 0, read8_delegate(FUNC(ptm6840_device::read), ptm_ic3ss)); - space.install_write_handler(0x08c0, 0x08c7, 0, 0, write8_delegate(FUNC(mpu4_state::ic3ss_w),this)); + space.install_readwrite_handler(0x0880, 0x0883, read8_delegate(FUNC(pia6821_device::read), pia_ic4ss), write8_delegate(FUNC(pia6821_device::write), pia_ic4ss)); + space.install_read_handler(0x08c0, 0x08c7, read8_delegate(FUNC(ptm6840_device::read), ptm_ic3ss)); + space.install_write_handler(0x08c0, 0x08c7, write8_delegate(FUNC(mpu4_state::ic3ss_w),this)); } void mpu4_state::mpu4_install_mod4bwb_space(address_space &space) { - space.install_readwrite_handler(0x0810, 0x0810, 0, 0, read8_delegate(FUNC(mpu4_state::bwb_characteriser_r),this),write8_delegate(FUNC(mpu4_state::bwb_characteriser_w),this)); + space.install_readwrite_handler(0x0810, 0x0810, read8_delegate(FUNC(mpu4_state::bwb_characteriser_r),this),write8_delegate(FUNC(mpu4_state::bwb_characteriser_w),this)); mpu4_install_mod4oki_space(space); } @@ -2376,8 +2376,8 @@ DRIVER_INIT_MEMBER(mpu4_state,m4default_big) else { m_bwb_bank=1; - space.install_write_handler(0x0858, 0x0858, 0, 0, write8_delegate(FUNC(mpu4_state::bankswitch_w),this)); - space.install_write_handler(0x0878, 0x0878, 0, 0, write8_delegate(FUNC(mpu4_state::bankset_w),this)); + space.install_write_handler(0x0858, 0x0858, write8_delegate(FUNC(mpu4_state::bankswitch_w),this)); + space.install_write_handler(0x0878, 0x0878, write8_delegate(FUNC(mpu4_state::bankset_w),this)); UINT8 *rom = memregion("maincpu")->base(); m_numbanks = size / 0x10000; @@ -2412,8 +2412,8 @@ DRIVER_INIT_MEMBER(mpu4_state,m_frkstn) { address_space &space = m_maincpu->space(AS_PROGRAM); DRIVER_INIT_CALL(m4default_big); - space.install_read_handler(0x0880, 0x0880, 0, 0, read8_delegate(FUNC(mpu4_state::crystal_sound_r),this)); - space.install_write_handler(0x0881, 0x0881, 0, 0, write8_delegate(FUNC(mpu4_state::crystal_sound_w),this)); + space.install_read_handler(0x0880, 0x0880, read8_delegate(FUNC(mpu4_state::crystal_sound_r),this)); + space.install_write_handler(0x0881, 0x0881, write8_delegate(FUNC(mpu4_state::crystal_sound_w),this)); } // thanks to Project Amber for descramble information diff --git a/src/mame/drivers/nemesis.cpp b/src/mame/drivers/nemesis.cpp index f76f2f92c33..ee481f5040e 100644 --- a/src/mame/drivers/nemesis.cpp +++ b/src/mame/drivers/nemesis.cpp @@ -406,7 +406,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, nemesis_state ) AM_RANGE(0xe004, 0xe004) AM_DEVWRITE("k005289", k005289_device, tg2_w) AM_RANGE(0xe005, 0xe005) AM_DEVWRITE("ay2", ay8910_device, address_w) AM_RANGE(0xe006, 0xe006) AM_DEVWRITE("ay1", ay8910_device, address_w) - AM_RANGE(0xe007, 0xe007) AM_MIRROR(0x1ff8) AM_MASK(0x1ff8) AM_WRITE(nemesis_filter_w) + AM_RANGE(0xe007, 0xe007) AM_SELECT(0x1ff8) AM_WRITE(nemesis_filter_w) AM_RANGE(0xe086, 0xe086) AM_DEVREAD("ay1", ay8910_device, data_r) AM_RANGE(0xe106, 0xe106) AM_DEVWRITE("ay1", ay8910_device, data_w) AM_RANGE(0xe205, 0xe205) AM_DEVREAD("ay2", ay8910_device, data_r) @@ -425,7 +425,7 @@ static ADDRESS_MAP_START( gx400_sound_map, AS_PROGRAM, 8, nemesis_state ) AM_RANGE(0xe004, 0xe004) AM_DEVWRITE("k005289", k005289_device, tg2_w) AM_RANGE(0xe005, 0xe005) AM_DEVWRITE("ay2", ay8910_device, address_w) AM_RANGE(0xe006, 0xe006) AM_DEVWRITE("ay1", ay8910_device, address_w) - AM_RANGE(0xe007, 0xe007) AM_MIRROR(0x1ff8) AM_MASK(0x1ff8) AM_WRITE(nemesis_filter_w) + AM_RANGE(0xe007, 0xe007) AM_SELECT(0x1ff8) AM_WRITE(nemesis_filter_w) AM_RANGE(0xe030, 0xe030) AM_WRITE(gx400_speech_start_w) AM_RANGE(0xe086, 0xe086) AM_DEVREAD("ay1", ay8910_device, data_r) AM_RANGE(0xe106, 0xe106) AM_DEVWRITE("ay1", ay8910_device, data_w) diff --git a/src/mame/drivers/neogeo.cpp b/src/mame/drivers/neogeo.cpp index ad5757cf0b6..a88d6d11d26 100644 --- a/src/mame/drivers/neogeo.cpp +++ b/src/mame/drivers/neogeo.cpp @@ -1172,12 +1172,12 @@ void neogeo_state::set_slot_idx(int slot) space.unmap_readwrite(0x000080, 0x0fffff); space.unmap_readwrite(0x200000, 0x2fffff); if (!m_slots[m_curr_slot] || m_slots[m_curr_slot]->get_rom_size() == 0) - space.install_rom(0x000080, 0x0fffff, 0, 0, (UINT16 *)m_region_maincpu->base() + 0x80/2); + space.install_rom(0x000080, 0x0fffff, (UINT16 *)m_region_maincpu->base() + 0x80/2); else - space.install_rom(0x000080, 0x0fffff, 0, 0, (UINT16 *)m_slots[m_curr_slot]->get_rom_base() + 0x80/2); + space.install_rom(0x000080, 0x0fffff, (UINT16 *)m_slots[m_curr_slot]->get_rom_base() + 0x80/2); - space.install_read_bank(0x200000, 0x2fffff, 0, 0, "cartridge"); + space.install_read_bank(0x200000, 0x2fffff, "cartridge"); space.install_write_handler(0x2ffff0, 0x2fffff, write16_delegate(FUNC(neogeo_state::write_banksel),this)); m_bank_cartridge = membank("cartridge"); @@ -1289,7 +1289,7 @@ void neogeo_state::set_slot_idx(int slot) case NEOGEO_VLINER: space.install_readwrite_handler(0x200000, 0x201fff, read16_delegate(FUNC(neogeo_cart_slot_device::ram_r),(neogeo_cart_slot_device*)m_slots[m_curr_slot]), write16_delegate(FUNC(neogeo_cart_slot_device::ram_w),(neogeo_cart_slot_device*)m_slots[m_curr_slot])); // custom input handling... install it here for the moment. - space.install_read_port(0x300000, 0x300001, 0, 0x01ff7e, "DSW"); + space.install_read_port(0x300000, 0x300001, 0x01ff7e, "DSW"); space.install_read_port(0x280000, 0x280001, "IN5"); space.install_read_port(0x2c0000, 0x2c0001, "IN6"); break; @@ -1524,8 +1524,8 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( audio_io_map, AS_IO, 8, neogeo_state ) AM_RANGE(0x00, 0x00) AM_MIRROR(0xff00) AM_READ(audio_command_r) AM_DEVWRITE("soundlatch", generic_latch_8_device, clear_w) AM_RANGE(0x04, 0x07) AM_MIRROR(0xff00) AM_DEVREADWRITE("ymsnd", ym2610_device, read, write) - AM_RANGE(0x08, 0x08) AM_MIRROR(0xff10) AM_MASK(0x0010) AM_WRITE(audio_cpu_enable_nmi_w) - AM_RANGE(0x08, 0x0b) AM_MIRROR(0xfff0) AM_MASK(0xff03) AM_READ(audio_cpu_bank_select_r) + AM_RANGE(0x08, 0x08) AM_MIRROR(0xff00) AM_SELECT(0x0010) AM_WRITE(audio_cpu_enable_nmi_w) + AM_RANGE(0x08, 0x0b) AM_MIRROR(0x00f0) AM_SELECT(0xff00) AM_READ(audio_cpu_bank_select_r) AM_RANGE(0x0c, 0x0c) AM_MIRROR(0xff00) AM_DEVWRITE("soundlatch2", generic_latch_8_device, write) ADDRESS_MAP_END @@ -2026,9 +2026,9 @@ DRIVER_INIT_MEMBER(neogeo_state, neogeo) { // install controllers if (m_ctrl1) - m_maincpu->space(AS_PROGRAM).install_read_handler(0x300000, 0x300001, 0, 0x01ff7e, read16_delegate(FUNC(neogeo_state::in0_r), this)); + m_maincpu->space(AS_PROGRAM).install_read_handler(0x300000, 0x300001, 0, 0x01ff7e, 0, read16_delegate(FUNC(neogeo_state::in0_r), this)); if (m_ctrl2) - m_maincpu->space(AS_PROGRAM).install_read_handler(0x340000, 0x340001, 0, 0x01fffe, read16_delegate(FUNC(neogeo_state::in1_r), this)); + m_maincpu->space(AS_PROGRAM).install_read_handler(0x340000, 0x340001, 0, 0x01fffe, 0, read16_delegate(FUNC(neogeo_state::in1_r), this)); } diff --git a/src/mame/drivers/neogeocd.cpp b/src/mame/drivers/neogeocd.cpp index 9aadcb830b4..1e2890a2be3 100644 --- a/src/mame/drivers/neogeocd.cpp +++ b/src/mame/drivers/neogeocd.cpp @@ -926,9 +926,9 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( neocd_audio_io_map, AS_IO, 8, ngcd_state ) AM_RANGE(0x00, 0x00) AM_MIRROR(0xff00) AM_READ(audio_command_r) AM_DEVWRITE("soundlatch", generic_latch_8_device, clear_w) AM_RANGE(0x04, 0x07) AM_MIRROR(0xff00) AM_DEVREADWRITE("ymsnd", ym2610_device, read, write) - AM_RANGE(0x08, 0x08) AM_MIRROR(0xff10) AM_MASK(0x0010) AM_WRITE(audio_cpu_enable_nmi_w) + AM_RANGE(0x08, 0x08) AM_MIRROR(0xff00) AM_SELECT(0x0010) AM_WRITE(audio_cpu_enable_nmi_w) // banking reads are actually NOP on NeoCD? but some games still access them -// AM_RANGE(0x08, 0x0b) AM_MIRROR(0xfff0) AM_MASK(0xff03) AM_READ(audio_cpu_bank_select_r) +// AM_RANGE(0x08, 0x0b) AM_MIRROR(0x00f0) AM_SELECT(0xff00) AM_READ(audio_cpu_bank_select_r) AM_RANGE(0x0c, 0x0c) AM_MIRROR(0xff00) AM_DEVWRITE("soundlatch2", generic_latch_8_device, write) // ?? diff --git a/src/mame/drivers/neopcb.cpp b/src/mame/drivers/neopcb.cpp index e33e82c9113..f2802a5070b 100644 --- a/src/mame/drivers/neopcb.cpp +++ b/src/mame/drivers/neopcb.cpp @@ -418,8 +418,8 @@ WRITE16_MEMBER(neopcb_state::write_bankpvc) void neopcb_state::install_common() { // install memory bank - m_maincpu->space(AS_PROGRAM).install_rom(0x000080, 0x0fffff, 0, 0, (UINT16 *)m_region_maincpu->base() + 0x80/2); - m_maincpu->space(AS_PROGRAM).install_read_bank(0x200000, 0x2fffff, 0, 0, "cpu_bank"); + m_maincpu->space(AS_PROGRAM).install_rom(0x000080, 0x0fffff, (UINT16 *)m_region_maincpu->base() + 0x80/2); + m_maincpu->space(AS_PROGRAM).install_read_bank(0x200000, 0x2fffff, "cpu_bank"); membank("cpu_bank")->set_base(m_region_maincpu->base() + 0x100000); // install protection handlers + bankswitch handler @@ -436,7 +436,7 @@ void neopcb_state::install_common() void neopcb_state::install_banked_bios() { - m_maincpu->space(AS_PROGRAM).install_read_bank(0xc00000, 0xc1ffff, 0, 0x0e0000, "bios_bank"); + m_maincpu->space(AS_PROGRAM).install_read_bank(0xc00000, 0xc1ffff, 0x0e0000, "bios_bank"); membank("bios_bank")->configure_entries(0, 2, memregion("mainbios")->base(), 0x20000); membank("bios_bank")->set_entry(1); @@ -505,7 +505,7 @@ DRIVER_INIT_MEMBER(neopcb_state, kf2k3pcb) m_cmc_prot->sfix_decrypt(spr_region, spr_region_size, fix_region, fix_region_size); kf2k3pcb_decrypt_s1data(); - m_maincpu->space(AS_PROGRAM).install_rom(0xc00000, 0xc7ffff, 0, 0x080000, memregion("mainbios")->base()); // 512k bios + m_maincpu->space(AS_PROGRAM).install_rom(0xc00000, 0xc7ffff, 0x080000, memregion("mainbios")->base()); // 512k bios } diff --git a/src/mame/drivers/neoprint.cpp b/src/mame/drivers/neoprint.cpp index 587a9d25d0c..9078f3e1d51 100644 --- a/src/mame/drivers/neoprint.cpp +++ b/src/mame/drivers/neoprint.cpp @@ -349,10 +349,10 @@ static ADDRESS_MAP_START( neoprint_audio_io_map, AS_IO, 8, neoprint_state ) AM_RANGE(0x00, 0x00) AM_MIRROR(0xff00) AM_READ(audio_command_r) AM_WRITENOP AM_RANGE(0x04, 0x07) AM_MIRROR(0xff00) AM_DEVREADWRITE("ymsnd", ym2610_device, read, write) // AM_RANGE(0x08, 0x08) AM_MIRROR(0xff00) /* write - NMI enable / acknowledge? (the data written doesn't matter) */ -// AM_RANGE(0x08, 0x08) AM_MIRROR(0xfff0) AM_MASK(0xfff0) AM_READ(audio_cpu_bank_select_f000_f7ff_r) -// AM_RANGE(0x09, 0x09) AM_MIRROR(0xfff0) AM_MASK(0xfff0) AM_READ(audio_cpu_bank_select_e000_efff_r) -// AM_RANGE(0x0a, 0x0a) AM_MIRROR(0xfff0) AM_MASK(0xfff0) AM_READ(audio_cpu_bank_select_c000_dfff_r) -// AM_RANGE(0x0b, 0x0b) AM_MIRROR(0xfff0) AM_MASK(0xfff0) AM_READ(audio_cpu_bank_select_8000_bfff_r) +// AM_RANGE(0x08, 0x08) AM_SELECT(0xfff0) AM_READ(audio_cpu_bank_select_f000_f7ff_r) +// AM_RANGE(0x09, 0x09) AM_SELECT(0xfff0) AM_READ(audio_cpu_bank_select_e000_efff_r) +// AM_RANGE(0x0a, 0x0a) AM_SELECT(0xfff0) AM_READ(audio_cpu_bank_select_c000_dfff_r) +// AM_RANGE(0x0b, 0x0b) AM_SELECT(0xfff0) AM_READ(audio_cpu_bank_select_8000_bfff_r) AM_RANGE(0x0c, 0x0c) AM_MIRROR(0xff00) AM_WRITE(audio_result_w) // AM_RANGE(0x18, 0x18) AM_MIRROR(0xff00) /* write - NMI disable? (the data written doesn't matter) */ ADDRESS_MAP_END diff --git a/src/mame/drivers/osbexec.cpp b/src/mame/drivers/osbexec.cpp index e9542df1ff9..b2c73cf2462 100644 --- a/src/mame/drivers/osbexec.cpp +++ b/src/mame/drivers/osbexec.cpp @@ -219,7 +219,7 @@ static ADDRESS_MAP_START( osbexec_io, AS_IO, 8, osbexec_state ) AM_RANGE( 0x08, 0x0B ) AM_MIRROR( 0xff00 ) AM_DEVREADWRITE("mb8877", wd_fdc_t, read, write ) /* MB8877 @ UB17 input clock = 1MHz */ AM_RANGE( 0x0C, 0x0F ) AM_MIRROR( 0xff00 ) AM_DEVREADWRITE("sio", z80sio2_device, ba_cd_r, ba_cd_w ) /* SIO @ UD4 */ AM_RANGE( 0x10, 0x13 ) AM_MIRROR( 0xff00 ) AM_DEVREADWRITE( "pia_1", pia6821_device, read, write) /* 6821 PIA @ UD8 */ - AM_RANGE( 0x14, 0x17 ) AM_MIRROR( 0xff00 ) AM_MASK( 0xff00 ) AM_READ(osbexec_kbd_r ) /* KBD */ + AM_RANGE( 0x14, 0x17 ) AM_SELECT( 0xff00 ) AM_READ(osbexec_kbd_r ) /* KBD */ AM_RANGE( 0x18, 0x1b ) AM_MIRROR( 0xff00 ) AM_READ(osbexec_rtc_r ) /* "RTC" @ UE13/UF13 */ /* ?? - vid ? */ ADDRESS_MAP_END diff --git a/src/mame/drivers/palm.cpp b/src/mame/drivers/palm.cpp index da0eca4c26d..f00bf63e44d 100644 --- a/src/mame/drivers/palm.cpp +++ b/src/mame/drivers/palm.cpp @@ -135,8 +135,8 @@ WRITE_LINE_MEMBER(palm_state::palm_spim_exchange) void palm_state::machine_start() { address_space &space = m_maincpu->space(AS_PROGRAM); - space.install_read_bank (0x000000, m_ram->size() - 1, m_ram->size() - 1, 0, "bank1"); - space.install_write_bank(0x000000, m_ram->size() - 1, m_ram->size() - 1, 0, "bank1"); + space.install_read_bank (0x000000, m_ram->size() - 1, "bank1"); + space.install_write_bank(0x000000, m_ram->size() - 1, "bank1"); membank("bank1")->set_base(m_ram->pointer()); save_item(NAME(m_port_f_latch)); diff --git a/src/mame/drivers/pcxt.cpp b/src/mame/drivers/pcxt.cpp index 00c618c2f17..30ea12866e9 100644 --- a/src/mame/drivers/pcxt.cpp +++ b/src/mame/drivers/pcxt.cpp @@ -161,7 +161,7 @@ void isa8_cga_tetriskr_device::device_start() { m_bg_bank = 0; isa8_cga_superimpose_device::device_start(); - m_isa->install_device(0x3c0, 0x3c0, 0, 0, read8_delegate( FUNC(isa8_cga_tetriskr_device::bg_bank_r), this ), write8_delegate( FUNC(isa8_cga_tetriskr_device::bg_bank_w), this ) ); + m_isa->install_device(0x3c0, 0x3c0, read8_delegate( FUNC(isa8_cga_tetriskr_device::bg_bank_r), this ), write8_delegate( FUNC(isa8_cga_tetriskr_device::bg_bank_w), this ) ); } WRITE8_MEMBER(isa8_cga_tetriskr_device::bg_bank_w) diff --git a/src/mame/drivers/pentagon.cpp b/src/mame/drivers/pentagon.cpp index 7b3a5e4bd9c..454fb5b7380 100644 --- a/src/mame/drivers/pentagon.cpp +++ b/src/mame/drivers/pentagon.cpp @@ -189,7 +189,7 @@ static ADDRESS_MAP_START (pentagon_io, AS_IO, 8, pentagon_state ) AM_RANGE(0x003f, 0x003f) AM_DEVREADWRITE(BETA_DISK_TAG, beta_disk_device, track_r, track_w) AM_MIRROR(0xff00) AM_RANGE(0x005f, 0x005f) AM_DEVREADWRITE(BETA_DISK_TAG, beta_disk_device, sector_r, sector_w) AM_MIRROR(0xff00) AM_RANGE(0x007f, 0x007f) AM_DEVREADWRITE(BETA_DISK_TAG, beta_disk_device, data_r, data_w) AM_MIRROR(0xff00) - AM_RANGE(0x00fe, 0x00fe) AM_READWRITE(spectrum_port_fe_r,spectrum_port_fe_w) AM_MIRROR(0xff00) AM_MASK(0xffff) + AM_RANGE(0x00fe, 0x00fe) AM_READWRITE(spectrum_port_fe_r,spectrum_port_fe_w) AM_SELECT(0xff00) AM_RANGE(0x00ff, 0x00ff) AM_DEVREADWRITE(BETA_DISK_TAG, beta_disk_device, state_r, param_w) AM_MIRROR(0xff00) AM_RANGE(0x8000, 0x8000) AM_DEVWRITE("ay8912", ay8910_device, data_w) AM_MIRROR(0x3ffd) AM_RANGE(0xc000, 0xc000) AM_DEVREADWRITE("ay8912", ay8910_device, data_r, address_w) AM_MIRROR(0x3ffd) diff --git a/src/mame/drivers/prof80.cpp b/src/mame/drivers/prof80.cpp index 19f7fdeeec1..7dea1756b37 100644 --- a/src/mame/drivers/prof80.cpp +++ b/src/mame/drivers/prof80.cpp @@ -348,7 +348,7 @@ static ADDRESS_MAP_START( prof80_io, AS_IO, 8, prof80_state ) AM_RANGE(0xda, 0xda) AM_MIRROR(0xff00) AM_READ(status_r) AM_RANGE(0xdb, 0xdb) AM_MIRROR(0xff00) AM_READ(status2_r) AM_RANGE(0xdc, 0xdd) AM_MIRROR(0xff00) AM_DEVICE(UPD765_TAG, upd765a_device, map) - AM_RANGE(0xde, 0xde) AM_MIRROR(0xff01) AM_MASK(0xff00) AM_DEVWRITE(MMU_TAG, prof80_mmu_device, par_w) + AM_RANGE(0xde, 0xde) AM_MIRROR(0x0001) AM_SELECT(0xff00) AM_DEVWRITE(MMU_TAG, prof80_mmu_device, par_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/punchout.cpp b/src/mame/drivers/punchout.cpp index 777cc13f30b..48619c32e3a 100644 --- a/src/mame/drivers/punchout.cpp +++ b/src/mame/drivers/punchout.cpp @@ -255,7 +255,7 @@ WRITE8_MEMBER(punchout_state::spunchout_rp5h01_clock_w) static ADDRESS_MAP_START( spnchout_io_map, AS_IO, 8, punchout_state ) AM_RANGE(0x05, 0x05) AM_MIRROR(0xf0) AM_WRITE(spunchout_rp5h01_reset_w) AM_RANGE(0x06, 0x06) AM_MIRROR(0xf0) AM_WRITE(spunchout_rp5h01_clock_w) - AM_RANGE(0x07, 0x07) AM_MIRROR(0xf0) AM_MASK(0xf0) AM_READWRITE(spunchout_exp_r, spunchout_exp_w) // protection ports + AM_RANGE(0x07, 0x07) AM_SELECT(0xf0) AM_READWRITE(spunchout_exp_r, spunchout_exp_w) // protection ports AM_IMPORT_FROM( punchout_io_map ) ADDRESS_MAP_END diff --git a/src/mame/drivers/px4.cpp b/src/mame/drivers/px4.cpp index 64c5d769861..2d0f10e592d 100644 --- a/src/mame/drivers/px4.cpp +++ b/src/mame/drivers/px4.cpp @@ -492,18 +492,18 @@ READ8_MEMBER( px4_state::str_r ) void px4_state::install_rom_capsule(address_space &space, int size, memory_region *mem) { // ram, part 1 - space.install_ram(0x0000, 0xdfff - size, 0, 0, m_ram->pointer()); + space.install_ram(0x0000, 0xdfff - size, m_ram->pointer()); // actual rom data, part 1 if (mem) - space.install_rom(0xe000 - size, 0xffff, 0, 0, mem->base() + (size - 0x2000)); + space.install_rom(0xe000 - size, 0xffff, mem->base() + (size - 0x2000)); // rom data, part 2 if (mem && size != 0x2000) - space.install_rom(0x10000 - size, 0xdfff, 0, 0, mem->base()); + space.install_rom(0x10000 - size, 0xdfff, mem->base()); // ram, continued - space.install_ram(0xe000, 0xffff, 0, 0, m_ram->pointer() + 0xe000); + space.install_ram(0xe000, 0xffff, m_ram->pointer() + 0xe000); } // bank register @@ -521,13 +521,13 @@ WRITE8_MEMBER( px4_state::bankr_w ) { case 0x00: // system bank - space_program.install_rom(0x0000, 0x7fff, 0, 0, memregion("os")->base()); - space_program.install_ram(0x8000, 0xffff, 0, 0, m_ram->pointer() + 0x8000); + space_program.install_rom(0x0000, 0x7fff, memregion("os")->base()); + space_program.install_ram(0x8000, 0xffff, m_ram->pointer() + 0x8000); break; case 0x04: // memory - space_program.install_ram(0x0000, 0xffff, 0, 0, m_ram->pointer()); + space_program.install_ram(0x0000, 0xffff, m_ram->pointer()); break; case 0x08: install_rom_capsule(space_program, 0x2000, m_caps1_rom); break; diff --git a/src/mame/drivers/rainbow.cpp b/src/mame/drivers/rainbow.cpp index ae8033b4ecf..e8b24396c29 100644 --- a/src/mame/drivers/rainbow.cpp +++ b/src/mame/drivers/rainbow.cpp @@ -782,25 +782,25 @@ void rainbow_state::machine_reset() // * Reset RTC to a defined state * #define RTC_RESET 0xFC104 // read $FC104 or mirror $FE104 - program.install_read_handler(RTC_RESET, RTC_RESET, 0, 0, read8_delegate(FUNC(rainbow_state::rtc_reset), this)); - program.install_read_handler(RTC_RESET + 0x2000, RTC_RESET + 0x2000, 0, 0, read8_delegate(FUNC(rainbow_state::rtc_reset2), this)); + program.install_read_handler(RTC_RESET, RTC_RESET, read8_delegate(FUNC(rainbow_state::rtc_reset), this)); + program.install_read_handler(RTC_RESET + 0x2000, RTC_RESET + 0x2000, read8_delegate(FUNC(rainbow_state::rtc_reset2), this)); // A magic pattern enables reads or writes (-> RTC_WRITE_DATA_0 / RTC_WRITE_DATA_1) // 64 bits read from two alternating addresses (see DS1315.C) #define RTC_PATTERN_0 0xFC100 // MIRROR: FE100 #define RTC_PATTERN_1 0xFC101 // MIRROR: FE101 - program.install_read_handler(RTC_PATTERN_0, RTC_PATTERN_1, 0, 0, read8_delegate(FUNC(rainbow_state::rtc_enable), this)); - program.install_read_handler(RTC_PATTERN_0 + 0x2000, RTC_PATTERN_1 + 0x2000, 0, 0, read8_delegate(FUNC(rainbow_state::rtc_enable2), this)); + program.install_read_handler(RTC_PATTERN_0, RTC_PATTERN_1, read8_delegate(FUNC(rainbow_state::rtc_enable), this)); + program.install_read_handler(RTC_PATTERN_0 + 0x2000, RTC_PATTERN_1 + 0x2000, read8_delegate(FUNC(rainbow_state::rtc_enable2), this)); // * Read actual time/date from ClikClok * #define RTC_READ_DATA 0xFC004 // Single byte - delivers one bit (if RTC enabled). MIRROR: FE004 - program.install_read_handler(RTC_READ_DATA, RTC_READ_DATA, 0, 0, read8_delegate(FUNC(rainbow_state::rtc_r), this)); - program.install_read_handler(RTC_READ_DATA + 0x2000, RTC_READ_DATA + 0x2000, 0, 0, read8_delegate(FUNC(rainbow_state::rtc_r2), this)); + program.install_read_handler(RTC_READ_DATA, RTC_READ_DATA, read8_delegate(FUNC(rainbow_state::rtc_r), this)); + program.install_read_handler(RTC_READ_DATA + 0x2000, RTC_READ_DATA + 0x2000, read8_delegate(FUNC(rainbow_state::rtc_r2), this)); // * Secretly transmit data to RTC (set time / date) * Works only if magic pattern enabled RTC. Look ma, no writes! #define RTC_WRITE_DATA_0 0xFE000 #define RTC_WRITE_DATA_1 0xFE001 - program.install_read_handler(RTC_WRITE_DATA_0, RTC_WRITE_DATA_1, 0, 0, read8_delegate(FUNC(rainbow_state::rtc_w), this)); + program.install_read_handler(RTC_WRITE_DATA_0, RTC_WRITE_DATA_1, read8_delegate(FUNC(rainbow_state::rtc_w), this)); m_rtc->chip_reset(); // *********************************** / DS1315 'PHANTOM CLOCK' IMPLEMENTATION FOR 'DEC-100-B' *************************************** diff --git a/src/mame/drivers/samcoupe.cpp b/src/mame/drivers/samcoupe.cpp index 743c76a58cf..945d02e64f1 100644 --- a/src/mame/drivers/samcoupe.cpp +++ b/src/mame/drivers/samcoupe.cpp @@ -311,22 +311,22 @@ static ADDRESS_MAP_START( samcoupe_mem, AS_PROGRAM, 8, samcoupe_state ) ADDRESS_MAP_END static ADDRESS_MAP_START( samcoupe_io, AS_IO, 8, samcoupe_state ) - AM_RANGE(0x0080, 0x0081) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_WRITE(samcoupe_ext_mem_w) - AM_RANGE(0x00e0, 0x00e7) AM_MIRROR(0xff10) AM_MASK(0xffff) AM_READWRITE(samcoupe_disk_r, samcoupe_disk_w) - AM_RANGE(0x00e8, 0x00e8) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_DEVWRITE("lpt1_data_out", output_latch_device, write) - AM_RANGE(0x00e9, 0x00e9) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_READWRITE(samcoupe_lpt1_busy_r, samcoupe_lpt1_strobe_w) - AM_RANGE(0x00ea, 0x00ea) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_DEVWRITE("lpt2_data_out", output_latch_device, write) - AM_RANGE(0x00eb, 0x00eb) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_READWRITE(samcoupe_lpt2_busy_r, samcoupe_lpt2_strobe_w) - AM_RANGE(0x00f8, 0x00f8) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_READWRITE(samcoupe_pen_r, samcoupe_clut_w) - AM_RANGE(0x00f9, 0x00f9) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_READWRITE(samcoupe_status_r, samcoupe_line_int_w) - AM_RANGE(0x00fa, 0x00fa) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_READWRITE(samcoupe_lmpr_r, samcoupe_lmpr_w) - AM_RANGE(0x00fb, 0x00fb) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_READWRITE(samcoupe_hmpr_r, samcoupe_hmpr_w) - AM_RANGE(0x00fc, 0x00fc) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_READWRITE(samcoupe_vmpr_r, samcoupe_vmpr_w) - AM_RANGE(0x00fd, 0x00fd) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_READWRITE(samcoupe_midi_r, samcoupe_midi_w) - AM_RANGE(0x00fe, 0x00fe) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_READWRITE(samcoupe_keyboard_r, samcoupe_border_w) - AM_RANGE(0x00ff, 0x00ff) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_READ(samcoupe_attributes_r) - AM_RANGE(0x00ff, 0x00ff) AM_MIRROR(0xfe00) AM_MASK(0xffff) AM_DEVWRITE("saa1099", saa1099_device, data_w) - AM_RANGE(0x01ff, 0x01ff) AM_MIRROR(0xfe00) AM_MASK(0xffff) AM_DEVWRITE("saa1099", saa1099_device, control_w) + AM_RANGE(0x0080, 0x0081) AM_SELECT(0xff00) AM_WRITE(samcoupe_ext_mem_w) + AM_RANGE(0x00e0, 0x00e7) AM_SELECT(0xff10) AM_READWRITE(samcoupe_disk_r, samcoupe_disk_w) + AM_RANGE(0x00e8, 0x00e8) AM_SELECT(0xff00) AM_DEVWRITE("lpt1_data_out", output_latch_device, write) + AM_RANGE(0x00e9, 0x00e9) AM_SELECT(0xff00) AM_READWRITE(samcoupe_lpt1_busy_r, samcoupe_lpt1_strobe_w) + AM_RANGE(0x00ea, 0x00ea) AM_SELECT(0xff00) AM_DEVWRITE("lpt2_data_out", output_latch_device, write) + AM_RANGE(0x00eb, 0x00eb) AM_SELECT(0xff00) AM_READWRITE(samcoupe_lpt2_busy_r, samcoupe_lpt2_strobe_w) + AM_RANGE(0x00f8, 0x00f8) AM_SELECT(0xff00) AM_READWRITE(samcoupe_pen_r, samcoupe_clut_w) + AM_RANGE(0x00f9, 0x00f9) AM_SELECT(0xff00) AM_READWRITE(samcoupe_status_r, samcoupe_line_int_w) + AM_RANGE(0x00fa, 0x00fa) AM_SELECT(0xff00) AM_READWRITE(samcoupe_lmpr_r, samcoupe_lmpr_w) + AM_RANGE(0x00fb, 0x00fb) AM_SELECT(0xff00) AM_READWRITE(samcoupe_hmpr_r, samcoupe_hmpr_w) + AM_RANGE(0x00fc, 0x00fc) AM_SELECT(0xff00) AM_READWRITE(samcoupe_vmpr_r, samcoupe_vmpr_w) + AM_RANGE(0x00fd, 0x00fd) AM_SELECT(0xff00) AM_READWRITE(samcoupe_midi_r, samcoupe_midi_w) + AM_RANGE(0x00fe, 0x00fe) AM_SELECT(0xff00) AM_READWRITE(samcoupe_keyboard_r, samcoupe_border_w) + AM_RANGE(0x00ff, 0x00ff) AM_SELECT(0xff00) AM_READ(samcoupe_attributes_r) + AM_RANGE(0x00ff, 0x00ff) AM_SELECT(0xfe00) AM_DEVWRITE("saa1099", saa1099_device, data_w) + AM_RANGE(0x01ff, 0x01ff) AM_SELECT(0xfe00) AM_DEVWRITE("saa1099", saa1099_device, control_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/scorpion.cpp b/src/mame/drivers/scorpion.cpp index 9de1d420c18..0eda0e24da8 100644 --- a/src/mame/drivers/scorpion.cpp +++ b/src/mame/drivers/scorpion.cpp @@ -176,7 +176,7 @@ static ADDRESS_MAP_START (scorpion_io, AS_IO, 8, scorpion_state ) AM_RANGE(0x003f, 0x003f) AM_DEVREADWRITE(BETA_DISK_TAG, beta_disk_device, track_r, track_w) AM_MIRROR(0xff00) AM_RANGE(0x005f, 0x005f) AM_DEVREADWRITE(BETA_DISK_TAG, beta_disk_device, sector_r, sector_w) AM_MIRROR(0xff00) AM_RANGE(0x007f, 0x007f) AM_DEVREADWRITE(BETA_DISK_TAG, beta_disk_device, data_r, data_w) AM_MIRROR(0xff00) - AM_RANGE(0x00fe, 0x00fe) AM_READWRITE(spectrum_port_fe_r,spectrum_port_fe_w) AM_MIRROR(0xff00) AM_MASK(0xffff) + AM_RANGE(0x00fe, 0x00fe) AM_READWRITE(spectrum_port_fe_r,spectrum_port_fe_w) AM_SELECT(0xff00) AM_RANGE(0x00ff, 0x00ff) AM_DEVREADWRITE(BETA_DISK_TAG, beta_disk_device, state_r, param_w) AM_MIRROR(0xff00) AM_RANGE(0x4021, 0x4021) AM_WRITE(scorpion_port_7ffd_w) AM_MIRROR(0x3fdc) AM_RANGE(0x8021, 0x8021) AM_DEVWRITE("ay8912", ay8910_device, data_w) AM_MIRROR(0x3fdc) diff --git a/src/mame/drivers/segac2.cpp b/src/mame/drivers/segac2.cpp index 2074655f3b6..723153270ad 100644 --- a/src/mame/drivers/segac2.cpp +++ b/src/mame/drivers/segac2.cpp @@ -2064,7 +2064,7 @@ void segac2_state::segac2_common_init(segac2_prot_delegate prot_func) m_prot_func = prot_func; if (m_upd7759 != nullptr) - m_maincpu->space(AS_PROGRAM).install_write_handler(0x880000, 0x880001, 0, 0x13fefe, write16_delegate(FUNC(segac2_state::segac2_upd7759_w),this)); + m_maincpu->space(AS_PROGRAM).install_write_handler(0x880000, 0x880001, 0, 0x13fefe, 0, write16_delegate(FUNC(segac2_state::segac2_upd7759_w),this)); } int segac2_state::prot_func_dummy(int in) diff --git a/src/mame/drivers/sg1000.cpp b/src/mame/drivers/sg1000.cpp index 23790083a21..e860f5537e6 100644 --- a/src/mame/drivers/sg1000.cpp +++ b/src/mame/drivers/sg1000.cpp @@ -635,8 +635,8 @@ void sg1000_state::machine_start() { if (m_cart->get_type() == SEGA8_DAHJEE_TYPEA || m_cart->get_type() == SEGA8_DAHJEE_TYPEB) { - m_maincpu->space(AS_PROGRAM).install_read_handler(0xc000, 0xffff, 0, 0, read8_delegate(FUNC(sega8_cart_slot_device::read_ram),(sega8_cart_slot_device*)m_cart)); - m_maincpu->space(AS_PROGRAM).install_write_handler(0xc000, 0xffff, 0, 0, write8_delegate(FUNC(sega8_cart_slot_device::write_ram),(sega8_cart_slot_device*)m_cart)); + m_maincpu->space(AS_PROGRAM).install_read_handler(0xc000, 0xffff, read8_delegate(FUNC(sega8_cart_slot_device::read_ram),(sega8_cart_slot_device*)m_cart)); + m_maincpu->space(AS_PROGRAM).install_write_handler(0xc000, 0xffff, write8_delegate(FUNC(sega8_cart_slot_device::write_ram),(sega8_cart_slot_device*)m_cart)); } if (m_cart) @@ -676,8 +676,8 @@ void sc3000_state::machine_start() if (m_cart && m_cart->exists() && (m_cart->get_type() == SEGA8_BASIC_L3 || m_cart->get_type() == SEGA8_MUSIC_EDITOR || m_cart->get_type() == SEGA8_DAHJEE_TYPEA || m_cart->get_type() == SEGA8_DAHJEE_TYPEB)) { - m_maincpu->space(AS_PROGRAM).install_read_handler(0xc000, 0xffff, 0, 0, read8_delegate(FUNC(sega8_cart_slot_device::read_ram),(sega8_cart_slot_device*)m_cart)); - m_maincpu->space(AS_PROGRAM).install_write_handler(0xc000, 0xffff, 0, 0, write8_delegate(FUNC(sega8_cart_slot_device::write_ram),(sega8_cart_slot_device*)m_cart)); + m_maincpu->space(AS_PROGRAM).install_read_handler(0xc000, 0xffff, read8_delegate(FUNC(sega8_cart_slot_device::read_ram),(sega8_cart_slot_device*)m_cart)); + m_maincpu->space(AS_PROGRAM).install_write_handler(0xc000, 0xffff, write8_delegate(FUNC(sega8_cart_slot_device::write_ram),(sega8_cart_slot_device*)m_cart)); } if (m_cart) diff --git a/src/mame/drivers/slapfght.cpp b/src/mame/drivers/slapfght.cpp index 79562e9a396..4a7be1ddf08 100644 --- a/src/mame/drivers/slapfght.cpp +++ b/src/mame/drivers/slapfght.cpp @@ -463,7 +463,7 @@ static ADDRESS_MAP_START( perfrman_sound_map, AS_PROGRAM, 8, slapfght_state ) AM_RANGE(0xa090, 0xa090) AM_DEVWRITE("ay2", ay8910_device, address_w) AM_RANGE(0xa091, 0xa091) AM_DEVREAD("ay2", ay8910_device, data_r) AM_RANGE(0xa092, 0xa092) AM_DEVWRITE("ay2", ay8910_device, data_w) - AM_RANGE(0xa0e0, 0xa0e0) AM_MIRROR(0x0010) AM_MASK(0x0010) AM_WRITE(sound_nmi_enable_w) + AM_RANGE(0xa0e0, 0xa0e0) AM_SELECT(0x0010) AM_WRITE(sound_nmi_enable_w) ADDRESS_MAP_END static ADDRESS_MAP_START( tigerh_sound_map, AS_PROGRAM, 8, slapfght_state ) @@ -474,7 +474,7 @@ static ADDRESS_MAP_START( tigerh_sound_map, AS_PROGRAM, 8, slapfght_state ) AM_RANGE(0xa090, 0xa090) AM_DEVWRITE("ay2", ay8910_device, address_w) AM_RANGE(0xa091, 0xa091) AM_DEVREAD("ay2", ay8910_device, data_r) AM_RANGE(0xa092, 0xa092) AM_DEVWRITE("ay2", ay8910_device, data_w) - AM_RANGE(0xa0e0, 0xa0e0) AM_MIRROR(0x0010) AM_MASK(0x0010) AM_WRITE(sound_nmi_enable_w) + AM_RANGE(0xa0e0, 0xa0e0) AM_SELECT(0x0010) AM_WRITE(sound_nmi_enable_w) AM_RANGE(0xc800, 0xcfff) AM_RAM AM_SHARE("share1") AM_RANGE(0xd000, 0xffff) AM_RAM ADDRESS_MAP_END diff --git a/src/mame/drivers/smc777.cpp b/src/mame/drivers/smc777.cpp index 627f850559a..13d93a20afc 100644 --- a/src/mame/drivers/smc777.cpp +++ b/src/mame/drivers/smc777.cpp @@ -608,9 +608,9 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( smc777_io, AS_IO, 8, smc777_state ) ADDRESS_MAP_UNMAP_HIGH - AM_RANGE(0x00, 0x07) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_READWRITE(vram_r, vram_w) - AM_RANGE(0x08, 0x0f) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_READWRITE(attr_r, attr_w) - AM_RANGE(0x10, 0x17) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_READWRITE(pcg_r, pcg_w) + AM_RANGE(0x00, 0x07) AM_SELECT(0xff00) AM_READWRITE(vram_r, vram_w) + AM_RANGE(0x08, 0x0f) AM_SELECT(0xff00) AM_READWRITE(attr_r, attr_w) + AM_RANGE(0x10, 0x17) AM_SELECT(0xff00) AM_READWRITE(pcg_r, pcg_w) AM_RANGE(0x18, 0x19) AM_MIRROR(0xff00) AM_WRITE(mc6845_w) AM_RANGE(0x1a, 0x1b) AM_MIRROR(0xff00) AM_READWRITE(key_r, key_w) AM_RANGE(0x1c, 0x1c) AM_MIRROR(0xff00) AM_READWRITE(system_input_r, system_output_w) @@ -633,7 +633,7 @@ static ADDRESS_MAP_START( smc777_io, AS_IO, 8, smc777_state ) // AM_RANGE(0x40, 0x47) ieee-488 // AM_RANGE(0x48, 0x4f) hdd (winchester) AM_RANGE(0x51, 0x51) AM_MIRROR(0xff00) AM_READ_PORT("JOY_1P") AM_WRITE(color_mode_w) - AM_RANGE(0x52, 0x52) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_WRITE(ramdac_w) + AM_RANGE(0x52, 0x52) AM_SELECT(0xff00) AM_WRITE(ramdac_w) AM_RANGE(0x53, 0x53) AM_MIRROR(0xff00) AM_DEVWRITE("sn1", sn76489a_device, write) // AM_RANGE(0x54, 0x59) vrt controller // AM_RANGE(0x5a, 0x5b) ram banking @@ -641,7 +641,7 @@ static ADDRESS_MAP_START( smc777_io, AS_IO, 8, smc777_state ) // AM_RANGE(0x74, 0x74) ieee-488 rom // AM_RANGE(0x75, 0x75) vrt controller rom // AM_RANGE(0x7e, 0x7f) kanji rom - AM_RANGE(0x80, 0xff) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_READWRITE(fbuf_r, fbuf_w) + AM_RANGE(0x80, 0xff) AM_SELECT(0xff00) AM_READWRITE(fbuf_r, fbuf_w) ADDRESS_MAP_END /* Input ports */ diff --git a/src/mame/drivers/snes.cpp b/src/mame/drivers/snes.cpp index 55f81e89d75..4309c594e36 100644 --- a/src/mame/drivers/snes.cpp +++ b/src/mame/drivers/snes.cpp @@ -1221,20 +1221,20 @@ void snes_console_state::machine_start() m_maincpu->set_5a22_map(); break; case SNES_DSP: - m_maincpu->space(AS_PROGRAM).install_read_handler(0x208000, 0x20ffff, 0, 0x9f0000, read8_delegate(FUNC(base_sns_cart_slot_device::chip_read),(base_sns_cart_slot_device*)m_cartslot)); - m_maincpu->space(AS_PROGRAM).install_write_handler(0x208000, 0x20ffff, 0, 0x9f0000, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)m_cartslot)); + m_maincpu->space(AS_PROGRAM).install_read_handler(0x208000, 0x20ffff, 0, 0x9f0000, 0, read8_delegate(FUNC(base_sns_cart_slot_device::chip_read),(base_sns_cart_slot_device*)m_cartslot)); + m_maincpu->space(AS_PROGRAM).install_write_handler(0x208000, 0x20ffff, 0, 0x9f0000, 0, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)m_cartslot)); break; case SNES_DSP_2MB: - m_maincpu->space(AS_PROGRAM).install_read_handler(0x600000, 0x607fff, 0, 0x8f0000, read8_delegate(FUNC(base_sns_cart_slot_device::chip_read),(base_sns_cart_slot_device*)m_cartslot)); - m_maincpu->space(AS_PROGRAM).install_write_handler(0x600000, 0x607fff, 0, 0x8f0000, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)m_cartslot)); + m_maincpu->space(AS_PROGRAM).install_read_handler(0x600000, 0x607fff, 0, 0x8f0000, 0, read8_delegate(FUNC(base_sns_cart_slot_device::chip_read),(base_sns_cart_slot_device*)m_cartslot)); + m_maincpu->space(AS_PROGRAM).install_write_handler(0x600000, 0x607fff, 0, 0x8f0000, 0, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)m_cartslot)); break; case SNES_DSP4: - m_maincpu->space(AS_PROGRAM).install_read_handler(0x308000, 0x30ffff, 0, 0x8f0000, read8_delegate(FUNC(base_sns_cart_slot_device::chip_read),(base_sns_cart_slot_device*)m_cartslot)); - m_maincpu->space(AS_PROGRAM).install_write_handler(0x308000, 0x30ffff, 0, 0x8f0000, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)m_cartslot)); + m_maincpu->space(AS_PROGRAM).install_read_handler(0x308000, 0x30ffff, 0, 0x8f0000, 0, read8_delegate(FUNC(base_sns_cart_slot_device::chip_read),(base_sns_cart_slot_device*)m_cartslot)); + m_maincpu->space(AS_PROGRAM).install_write_handler(0x308000, 0x30ffff, 0, 0x8f0000, 0, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)m_cartslot)); break; case SNES_OBC1: - m_maincpu->space(AS_PROGRAM).install_read_handler(0x006000, 0x007fff, 0, 0xbf0000, read8_delegate(FUNC(base_sns_cart_slot_device::chip_read),(base_sns_cart_slot_device*)m_cartslot)); - m_maincpu->space(AS_PROGRAM).install_write_handler(0x006000, 0x007fff, 0, 0xbf0000, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)m_cartslot)); + m_maincpu->space(AS_PROGRAM).install_read_handler(0x006000, 0x007fff, 0, 0xbf0000, 0, read8_delegate(FUNC(base_sns_cart_slot_device::chip_read),(base_sns_cart_slot_device*)m_cartslot)); + m_maincpu->space(AS_PROGRAM).install_write_handler(0x006000, 0x007fff, 0, 0xbf0000, 0, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)m_cartslot)); break; case SNES_SFX: m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x000000, 0x7dffff, read8_delegate(FUNC(snes_console_state::snessfx_lo_r),this), write8_delegate(FUNC(snes_console_state::snessfx_lo_w),this)); @@ -1261,15 +1261,15 @@ void snes_console_state::machine_start() case SNES_DSP_MODE21: m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x000000, 0x7dffff, read8_delegate(FUNC(snes_console_state::snes21_lo_r),this), write8_delegate(FUNC(snes_console_state::snes21_lo_w),this)); m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x800000, 0xffffff, read8_delegate(FUNC(snes_console_state::snes21_hi_r),this), write8_delegate(FUNC(snes_console_state::snes21_hi_w),this)); - m_maincpu->space(AS_PROGRAM).install_read_handler(0x006000, 0x007fff, 0, 0x9f0000, read8_delegate(FUNC(base_sns_cart_slot_device::chip_read),(base_sns_cart_slot_device*)m_cartslot)); - m_maincpu->space(AS_PROGRAM).install_write_handler(0x006000, 0x007fff, 0, 0x9f0000, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)m_cartslot)); + m_maincpu->space(AS_PROGRAM).install_read_handler(0x006000, 0x007fff, 0, 0x9f0000, 0, read8_delegate(FUNC(base_sns_cart_slot_device::chip_read),(base_sns_cart_slot_device*)m_cartslot)); + m_maincpu->space(AS_PROGRAM).install_write_handler(0x006000, 0x007fff, 0, 0x9f0000, 0, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)m_cartslot)); m_maincpu->set_5a22_map(); break; case SNES_SRTC: m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x000000, 0x7dffff, read8_delegate(FUNC(snes_console_state::snes21_lo_r),this), write8_delegate(FUNC(snes_console_state::snes21_lo_w),this)); m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x800000, 0xffffff, read8_delegate(FUNC(snes_console_state::snes21_hi_r),this), write8_delegate(FUNC(snes_console_state::snes21_hi_w),this)); - m_maincpu->space(AS_PROGRAM).install_read_handler(0x002800, 0x002800, 0, 0xbf0000, read8_delegate(FUNC(base_sns_cart_slot_device::chip_read),(base_sns_cart_slot_device*)m_cartslot)); - m_maincpu->space(AS_PROGRAM).install_write_handler(0x002801, 0x002801, 0, 0xbf0000, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)m_cartslot)); + m_maincpu->space(AS_PROGRAM).install_read_handler(0x002800, 0x002800, 0, 0xbf0000, 0, read8_delegate(FUNC(base_sns_cart_slot_device::chip_read),(base_sns_cart_slot_device*)m_cartslot)); + m_maincpu->space(AS_PROGRAM).install_write_handler(0x002801, 0x002801, 0, 0xbf0000, 0, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)m_cartslot)); m_maincpu->set_5a22_map(); break; case SNES_SPC7110: @@ -1285,12 +1285,12 @@ void snes_console_state::machine_start() break; // pirate 'mappers' case SNES_POKEMON: - m_maincpu->space(AS_PROGRAM).install_read_handler(0x800000, 0x80ffff, 0, 0x780000, read8_delegate(FUNC(base_sns_cart_slot_device::chip_read),(base_sns_cart_slot_device*)m_cartslot)); - m_maincpu->space(AS_PROGRAM).install_write_handler(0x800000, 0x80ffff, 0, 0x780000, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)m_cartslot)); + m_maincpu->space(AS_PROGRAM).install_read_handler(0x800000, 0x80ffff, 0, 0x780000, 0, read8_delegate(FUNC(base_sns_cart_slot_device::chip_read),(base_sns_cart_slot_device*)m_cartslot)); + m_maincpu->space(AS_PROGRAM).install_write_handler(0x800000, 0x80ffff, 0, 0x780000, 0, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)m_cartslot)); break; case SNES_TEKKEN2: - m_maincpu->space(AS_PROGRAM).install_read_handler(0x808000, 0x8087ff, 0, 0x3f0000, read8_delegate(FUNC(base_sns_cart_slot_device::chip_read),(base_sns_cart_slot_device*)m_cartslot)); - m_maincpu->space(AS_PROGRAM).install_write_handler(0x808000, 0x8087ff, 0, 0x3f0000, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)m_cartslot)); + m_maincpu->space(AS_PROGRAM).install_read_handler(0x808000, 0x8087ff, 0, 0x3f0000, 0, read8_delegate(FUNC(base_sns_cart_slot_device::chip_read),(base_sns_cart_slot_device*)m_cartslot)); + m_maincpu->space(AS_PROGRAM).install_write_handler(0x808000, 0x8087ff, 0, 0x3f0000, 0, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)m_cartslot)); break; case SNES_MCPIR1: case SNES_MCPIR2: @@ -1301,13 +1301,13 @@ void snes_console_state::machine_start() break; case SNES_SOULBLAD: // reads from xxx0-xxx3in range [80-bf] return a fixed sequence of 4bits; reads in range [c0-ff] return open bus - m_maincpu->space(AS_PROGRAM).install_read_handler(0x808000, 0x808003, 0, 0x3f7ff0, read8_delegate(FUNC(base_sns_cart_slot_device::chip_read),(base_sns_cart_slot_device*)m_cartslot)); + m_maincpu->space(AS_PROGRAM).install_read_handler(0x808000, 0x808003, 0, 0x3f7ff0, 0, read8_delegate(FUNC(base_sns_cart_slot_device::chip_read),(base_sns_cart_slot_device*)m_cartslot)); m_maincpu->space(AS_PROGRAM).install_read_handler(0xc00000, 0xffffff, read8_delegate(FUNC(snes_console_state::snes_open_bus_r),this)); break; case SNES_BUGS: case SNES_BANANA: -// m_maincpu->space(AS_PROGRAM).install_read_handler(0x808000, 0x80ffff, 0, 0x780000, read8_delegate(FUNC(base_sns_cart_slot_device::chip_read),(base_sns_cart_slot_device*)m_cartslot)); -// m_maincpu->space(AS_PROGRAM).install_write_handler(0x808000, 0x80ffff, 0, 0x780000, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)m_cartslot)); +// m_maincpu->space(AS_PROGRAM).install_read_handler(0x808000, 0x80ffff, 0, 0x780000, 0, read8_delegate(FUNC(base_sns_cart_slot_device::chip_read),(base_sns_cart_slot_device*)m_cartslot)); +// m_maincpu->space(AS_PROGRAM).install_write_handler(0x808000, 0x80ffff, 0, 0x780000, 0, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)m_cartslot)); // m_maincpu->set_5a22_map(); break; } diff --git a/src/mame/drivers/spec128.cpp b/src/mame/drivers/spec128.cpp index 16003d48206..5d86a379929 100644 --- a/src/mame/drivers/spec128.cpp +++ b/src/mame/drivers/spec128.cpp @@ -219,7 +219,7 @@ READ8_MEMBER( spectrum_state::spectrum_128_ula_r ) } static ADDRESS_MAP_START (spectrum_128_io, AS_IO, 8, spectrum_state ) - AM_RANGE(0x0000, 0x0000) AM_READWRITE(spectrum_port_fe_r,spectrum_port_fe_w) AM_MIRROR(0xfffe) AM_MASK(0xffff) + AM_RANGE(0x0000, 0x0000) AM_READWRITE(spectrum_port_fe_r,spectrum_port_fe_w) AM_SELECT(0xfffe) AM_RANGE(0x001f, 0x001f) AM_READ(spectrum_port_1f_r) AM_MIRROR(0xff00) AM_RANGE(0x007f, 0x007f) AM_READ(spectrum_port_7f_r) AM_MIRROR(0xff00) AM_RANGE(0x00df, 0x00df) AM_READ(spectrum_port_df_r) AM_MIRROR(0xff00) diff --git a/src/mame/drivers/specpls3.cpp b/src/mame/drivers/specpls3.cpp index fd28574892e..de3d15072ed 100644 --- a/src/mame/drivers/specpls3.cpp +++ b/src/mame/drivers/specpls3.cpp @@ -312,7 +312,7 @@ WRITE8_MEMBER( spectrum_state::spectrum_plus3_port_1ffd_w ) The function decodes the ports appropriately */ static ADDRESS_MAP_START (spectrum_plus3_io, AS_IO, 8, spectrum_state ) ADDRESS_MAP_UNMAP_HIGH - AM_RANGE(0x0000, 0x0000) AM_READWRITE(spectrum_port_fe_r,spectrum_port_fe_w) AM_MIRROR(0xfffe) AM_MASK(0xffff) + AM_RANGE(0x0000, 0x0000) AM_READWRITE(spectrum_port_fe_r,spectrum_port_fe_w) AM_SELECT(0xfffe) AM_RANGE(0x001f, 0x001f) AM_READ(spectrum_port_1f_r) AM_MIRROR(0xff00) AM_RANGE(0x4000, 0x4000) AM_WRITE(spectrum_plus3_port_7ffd_w) AM_MIRROR(0x3ffd) AM_RANGE(0x8000, 0x8000) AM_DEVWRITE("ay8912", ay8910_device, data_w) AM_MIRROR(0x3ffd) diff --git a/src/mame/drivers/spectrum.cpp b/src/mame/drivers/spectrum.cpp index e47a9ab6e75..6cbcbe96642 100644 --- a/src/mame/drivers/spectrum.cpp +++ b/src/mame/drivers/spectrum.cpp @@ -430,7 +430,7 @@ ADDRESS_MAP_END /* ports are not decoded full. The function decodes the ports appropriately */ static ADDRESS_MAP_START (spectrum_io, AS_IO, 8, spectrum_state ) - AM_RANGE(0x00, 0x00) AM_READWRITE(spectrum_port_fe_r,spectrum_port_fe_w) AM_MIRROR(0xfffe) AM_MASK(0xffff) + AM_RANGE(0x00, 0x00) AM_READWRITE(spectrum_port_fe_r,spectrum_port_fe_w) AM_SELECT(0xfffe) AM_RANGE(0x1f, 0x1f) AM_READ(spectrum_port_1f_r) AM_MIRROR(0xff00) AM_RANGE(0x7f, 0x7f) AM_READ(spectrum_port_7f_r) AM_MIRROR(0xff00) AM_RANGE(0xdf, 0xdf) AM_READ(spectrum_port_df_r) AM_MIRROR(0xff00) diff --git a/src/mame/drivers/super6.cpp b/src/mame/drivers/super6.cpp index 34958f31edb..0fd20f534ad 100644 --- a/src/mame/drivers/super6.cpp +++ b/src/mame/drivers/super6.cpp @@ -29,7 +29,7 @@ void super6_state::bankswitch() UINT8 *ram = m_ram->pointer(); // power on jump - if (!BIT(m_bank0, 6)) { program.install_rom(0x0000, 0x07ff, 0, 0xf800, m_rom); return; } + if (!BIT(m_bank0, 6)) { program.install_rom(0x0000, 0x07ff, 0xf800, m_rom); return; } // first 64KB of memory program.install_ram(0x0000, 0xffff, ram); @@ -82,7 +82,7 @@ void super6_state::bankswitch() if (BIT(m_bank0, 3)) program.install_ram(0xc000, 0xffff, ram + 0xc000); // PROM enabled - if (!BIT(m_bank0, 5)) program.install_rom(0xf000, 0xf7ff, 0, 0x800, m_rom); + if (!BIT(m_bank0, 5)) program.install_rom(0xf000, 0xf7ff, 0x800, m_rom); } diff --git a/src/mame/drivers/system1.cpp b/src/mame/drivers/system1.cpp index cbbf982a3a1..95e8486aec0 100644 --- a/src/mame/drivers/system1.cpp +++ b/src/mame/drivers/system1.cpp @@ -5261,7 +5261,7 @@ DRIVER_INIT_MEMBER(system1_state,nob) space.install_read_handler(0x0001, 0x0001, read8_delegate(FUNC(system1_state::nob_start_r),this)); /* install MCU communications */ - iospace.install_readwrite_handler(0x18, 0x18, 0x00, 0x00, read8_delegate(FUNC(system1_state::nob_maincpu_latch_r),this), write8_delegate(FUNC(system1_state::nob_maincpu_latch_w),this)); + iospace.install_readwrite_handler(0x18, 0x18, read8_delegate(FUNC(system1_state::nob_maincpu_latch_r),this), write8_delegate(FUNC(system1_state::nob_maincpu_latch_w),this)); iospace.install_read_handler(0x1c, 0x1c, read8_delegate(FUNC(system1_state::nob_mcu_status_r),this)); } @@ -5333,10 +5333,10 @@ DRIVER_INIT_MEMBER(system1_state,choplift) DRIVER_INIT_MEMBER(system1_state,shtngmst) { address_space &iospace = m_maincpu->space(AS_IO); - iospace.install_read_port(0x12, 0x12, 0x00, 0x00, "TRIGGER"); - iospace.install_read_port(0x18, 0x18, 0x00, 0x03, "18"); - iospace.install_read_handler(0x1c, 0x1c, 0x00, 0x02, read8_delegate(FUNC(system1_state::shtngmst_gunx_r),this)); - iospace.install_read_port(0x1d, 0x1d, 0x00, 0x02, "GUNY"); + iospace.install_read_port(0x12, 0x12, "TRIGGER"); + iospace.install_read_port(0x18, 0x18, 0x03, "18"); + iospace.install_read_handler(0x1c, 0x1c, 0, 0x02, 0, read8_delegate(FUNC(system1_state::shtngmst_gunx_r),this)); + iospace.install_read_port(0x1d, 0x1d, 0x02, "GUNY"); DRIVER_INIT_CALL(bank0c); } diff --git a/src/mame/drivers/ti89.cpp b/src/mame/drivers/ti89.cpp index 16fe0503e6b..5638d5f3c4c 100644 --- a/src/mame/drivers/ti89.cpp +++ b/src/mame/drivers/ti89.cpp @@ -455,11 +455,11 @@ void ti68k_state::machine_start() if (m_initial_pc > 0x400000) { - m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x400000, 0x5fffff, 0, 0, read16_delegate(FUNC(ti68k_state::flash_r), this),write16_delegate(FUNC(ti68k_state::flash_w), this)); + m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x400000, 0x5fffff, read16_delegate(FUNC(ti68k_state::flash_r), this),write16_delegate(FUNC(ti68k_state::flash_w), this)); } else { - m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x200000, 0x3fffff, 0, 0, read16_delegate(FUNC(ti68k_state::flash_r), this), write16_delegate(FUNC(ti68k_state::flash_w), this)); + m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x200000, 0x3fffff, read16_delegate(FUNC(ti68k_state::flash_r), this), write16_delegate(FUNC(ti68k_state::flash_w), this)); } } diff --git a/src/mame/drivers/timex.cpp b/src/mame/drivers/timex.cpp index 97f0eba89e9..e90e38a008e 100644 --- a/src/mame/drivers/timex.cpp +++ b/src/mame/drivers/timex.cpp @@ -533,7 +533,7 @@ static ADDRESS_MAP_START(ts2068_io, AS_IO, 8, spectrum_state ) AM_RANGE(0xf4, 0xf4) AM_READWRITE(ts2068_port_f4_r,ts2068_port_f4_w ) AM_MIRROR(0xff00) AM_RANGE(0xf5, 0xf5) AM_DEVWRITE("ay8912", ay8910_device, address_w ) AM_MIRROR(0xff00) AM_RANGE(0xf6, 0xf6) AM_DEVREADWRITE("ay8912", ay8910_device, data_r, data_w ) AM_MIRROR(0xff00) - AM_RANGE(0xfe, 0xfe) AM_READWRITE(spectrum_port_fe_r,spectrum_port_fe_w ) AM_MIRROR(0xff00) AM_MASK(0xffff) + AM_RANGE(0xfe, 0xfe) AM_READWRITE(spectrum_port_fe_r,spectrum_port_fe_w ) AM_SELECT(0xff00) AM_RANGE(0xff, 0xff) AM_READWRITE(ts2068_port_ff_r,ts2068_port_ff_w ) AM_MIRROR(0xff00) ADDRESS_MAP_END @@ -574,7 +574,7 @@ WRITE8_MEMBER( spectrum_state::tc2048_port_ff_w ) } static ADDRESS_MAP_START(tc2048_io, AS_IO, 8, spectrum_state ) - AM_RANGE(0x00, 0x00) AM_READWRITE(spectrum_port_fe_r,spectrum_port_fe_w) AM_MIRROR(0xfffe) AM_MASK(0xffff) + AM_RANGE(0x00, 0x00) AM_READWRITE(spectrum_port_fe_r,spectrum_port_fe_w) AM_SELECT(0xfffe) AM_RANGE(0x1f, 0x1f) AM_READ(spectrum_port_1f_r) AM_MIRROR(0xff00) AM_RANGE(0x7f, 0x7f) AM_READ(spectrum_port_7f_r) AM_MIRROR(0xff00) AM_RANGE(0xdf, 0xdf) AM_READ(spectrum_port_df_r) AM_MIRROR(0xff00) diff --git a/src/mame/drivers/tmc1800.cpp b/src/mame/drivers/tmc1800.cpp index 8cf47eed402..3b3133f090f 100644 --- a/src/mame/drivers/tmc1800.cpp +++ b/src/mame/drivers/tmc1800.cpp @@ -177,7 +177,7 @@ void tmc2000_state::bankswitch() if (m_roc) { // monitor ROM - program.install_rom(0x0000, 0x01ff, 0, 0x7e00, rom); + program.install_rom(0x0000, 0x01ff, 0x7e00, rom); } else { @@ -185,11 +185,11 @@ void tmc2000_state::bankswitch() switch (m_ram->size()) { case 4 * 1024: - program.install_ram(0x0000, 0x0fff, 0, 0x7000, ram); + program.install_ram(0x0000, 0x0fff, 0x7000, ram); break; case 16 * 1024: - program.install_ram(0x0000, 0x3fff, 0, 0x4000, ram); + program.install_ram(0x0000, 0x3fff, 0x4000, ram); break; case 32 * 1024: @@ -201,13 +201,13 @@ void tmc2000_state::bankswitch() if (m_rac) { // color RAM - program.install_ram(0x8000, 0x81ff, 0, 0x7e00, m_colorram); - program.unmap_read(0x8000, 0x81ff, 0, 0x7e00); + program.install_ram(0x8000, 0x81ff, 0x7e00, m_colorram); + program.unmap_read(0x8000, 0xffff); } else { // monitor ROM - program.install_rom(0x8000, 0x81ff, 0, 0x7e00, rom); + program.install_rom(0x8000, 0x81ff, 0x7e00, rom); } } @@ -225,7 +225,7 @@ WRITE8_MEMBER( nano_state::bankswitch_w ) /* enable RAM */ address_space &program = m_maincpu->space(AS_PROGRAM); UINT8 *ram = m_ram->pointer(); - program.install_ram(0x0000, 0x0fff, 0, 0x7000, ram); + program.install_ram(0x0000, 0x0fff, 0x7000, ram); /* write to CDP1864 tone latch */ m_cti->tone_latch_w(space, 0, data); @@ -690,7 +690,7 @@ void nano_state::machine_reset() /* enable ROM */ address_space &program = m_maincpu->space(AS_PROGRAM); UINT8 *rom = m_rom->base(); - program.install_rom(0x0000, 0x01ff, 0, 0x7e00, rom); + program.install_rom(0x0000, 0x01ff, 0x7e00, rom); } /* Machine Drivers */ diff --git a/src/mame/drivers/trackfld.cpp b/src/mame/drivers/trackfld.cpp index 2767f24530e..b3175552f4d 100644 --- a/src/mame/drivers/trackfld.cpp +++ b/src/mame/drivers/trackfld.cpp @@ -409,7 +409,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, trackfld_state ) AM_RANGE(0xe000, 0xe000) AM_MIRROR(0x1ff8) AM_DEVWRITE("dac", dac_device, write_unsigned8) AM_RANGE(0xe001, 0xe001) AM_MIRROR(0x1ff8) AM_NOP /* watch dog ?; reaktor reads here */ AM_RANGE(0xe002, 0xe002) AM_MIRROR(0x1ff8) AM_DEVREAD("trackfld_audio", trackfld_audio_device, trackfld_speech_r) - AM_RANGE(0xe003, 0xe003) AM_MIRROR(0x1ff8) AM_MASK(0x0380) AM_DEVWRITE("trackfld_audio", trackfld_audio_device, trackfld_sound_w) + AM_RANGE(0xe003, 0xe003) AM_MIRROR(0x1c78) AM_SELECT(0x0380) AM_DEVWRITE("trackfld_audio", trackfld_audio_device, trackfld_sound_w) AM_RANGE(0xe004, 0xe004) AM_MIRROR(0x1ff8) AM_DEVWRITE("vlm", vlm5030_device, data_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/travrusa.cpp b/src/mame/drivers/travrusa.cpp index dbecd5d3a59..53d32598de5 100644 --- a/src/mame/drivers/travrusa.cpp +++ b/src/mame/drivers/travrusa.cpp @@ -610,7 +610,7 @@ READ8_MEMBER(travrusa_state::shtridrb_port11_r) DRIVER_INIT_MEMBER(travrusa_state, shtridrb) { - m_maincpu->space(AS_IO).install_read_handler(0x11, 0x11, 0x0000, 0xff00, read8_delegate(FUNC(travrusa_state::shtridrb_port11_r),this)); + m_maincpu->space(AS_IO).install_read_handler(0x11, 0x11, 0, 0xff00, 0, read8_delegate(FUNC(travrusa_state::shtridrb_port11_r),this)); } diff --git a/src/mame/drivers/tvc.cpp b/src/mame/drivers/tvc.cpp index 123cb402371..6550c4b3866 100644 --- a/src/mame/drivers/tvc.cpp +++ b/src/mame/drivers/tvc.cpp @@ -204,7 +204,7 @@ void tvc_state::set_mem_page(UINT8 data) case 0xc0 : // External ROM selected TVC_INSTALL_ROM_BANK(3, "bank4", 0xc000, 0xffff); membank("bank4")->set_base(m_ext->base()); - space.install_readwrite_handler (0xc000, 0xdfff, 0, 0, read8_delegate(FUNC(tvc_state::expansion_r), this), write8_delegate(FUNC(tvc_state::expansion_w), this), 0); + space.install_readwrite_handler (0xc000, 0xdfff, read8_delegate(FUNC(tvc_state::expansion_r), this), write8_delegate(FUNC(tvc_state::expansion_w), this), 0); m_bank_type[3] = -1; break; } diff --git a/src/mame/drivers/vboy.cpp b/src/mame/drivers/vboy.cpp index 1524849c555..da565f1de60 100644 --- a/src/mame/drivers/vboy.cpp +++ b/src/mame/drivers/vboy.cpp @@ -1175,8 +1175,8 @@ void vboy_state::machine_start() std::string region_tag; m_cart_rom = memregion(region_tag.assign(m_cart->tag()).append(VBOYSLOT_ROM_REGION_TAG).c_str()); - m_maincpu->space(AS_PROGRAM).install_read_bank(0x07000000, 0x071fffff, 0, 0x0e00000, "prog_cart_bank"); - m_maincpu->space(AS_IO).install_read_bank(0x07000000, 0x071fffff, 0, 0x0e00000, "io_cart_bank"); + m_maincpu->space(AS_PROGRAM).install_read_bank(0x07000000, 0x071fffff, 0x0e00000, "prog_cart_bank"); + m_maincpu->space(AS_IO).install_read_bank(0x07000000, 0x071fffff, 0x0e00000, "io_cart_bank"); membank("prog_cart_bank")->set_base(m_cart_rom->base()); membank("io_cart_bank")->set_base(m_cart_rom->base()); diff --git a/src/mame/drivers/vegas.cpp b/src/mame/drivers/vegas.cpp index 032449ad319..aa3b43d4d25 100644 --- a/src/mame/drivers/vegas.cpp +++ b/src/mame/drivers/vegas.cpp @@ -1722,9 +1722,9 @@ void vegas_state::remap_dynamic_addresses() if (dynamic[addr].read == NOP_HANDLER) space.nop_read(dynamic[addr].start, dynamic[addr].end); else if (!dynamic[addr].read.isnull()) - space.install_read_handler(dynamic[addr].start, dynamic[addr].end, 0, 0, dynamic[addr].read); + space.install_read_handler(dynamic[addr].start, dynamic[addr].end, dynamic[addr].read); if (!dynamic[addr].write.isnull()) - space.install_write_handler(dynamic[addr].start, dynamic[addr].end, 0, 0, dynamic[addr].write); + space.install_write_handler(dynamic[addr].start, dynamic[addr].end, dynamic[addr].write); } if (LOG_DYNAMIC) diff --git a/src/mame/drivers/wmg.cpp b/src/mame/drivers/wmg.cpp index ebaf3905833..ecdf27c241e 100644 --- a/src/mame/drivers/wmg.cpp +++ b/src/mame/drivers/wmg.cpp @@ -167,7 +167,7 @@ void wmg_state::wmg_def_install_io_space(address_space &space) pia6821_device *pia_1 = space.machine().device<pia6821_device>("pia_1"); /* this routine dynamically installs the memory mapped above from c000-cfff */ - space.install_write_bank (0xc000, 0xc00f, 0, 0, "bank4"); + space.install_write_bank (0xc000, 0xc00f, "bank4"); space.install_write_handler (0xc010, 0xc01f, write8_delegate(FUNC(williams_state::defender_video_control_w),this)); space.install_write_handler (0xc400, 0xc400, write8_delegate(FUNC(wmg_state::wmg_rombank_w),this)); space.install_write_handler (0xc401, 0xc401, write8_delegate(FUNC(wmg_state::wmg_sound_reset_w),this)); @@ -197,13 +197,13 @@ WRITE8_MEMBER( wmg_state::wmg_def_rombank_w ) case 1: case 2: case 3: - space1.install_read_bank(0xc000, 0xcfff, 0, 0, "bank7"); + space1.install_read_bank(0xc000, 0xcfff, "bank7"); space1.unmap_write(0xc000, 0xcfff); membank("bank7")->set_entry(data); break; case 7: - space1.install_read_bank(0xc000, 0xcfff, 0, 0, "bank7"); + space1.install_read_bank(0xc000, 0xcfff, "bank7"); space1.unmap_write(0xc000, 0xcfff); membank("bank7")->set_entry(4); break; diff --git a/src/mame/drivers/x68k.cpp b/src/mame/drivers/x68k.cpp index 0ddfc818afe..9b2703c0863 100644 --- a/src/mame/drivers/x68k.cpp +++ b/src/mame/drivers/x68k.cpp @@ -1546,7 +1546,7 @@ MACHINE_START_MEMBER(x68k_state,x68000) address_space &space = m_maincpu->space(AS_PROGRAM); /* Install RAM handlers */ m_spriteram = (UINT16*)(memregion("user1")->base()); - space.install_readwrite_bank(0x000000,m_ram->size()-1,0xffffffff,0,"bank1"); + space.install_readwrite_bank(0x000000,m_ram->size()-1,"bank1"); membank("bank1")->set_base(m_ram->pointer()); // start mouse timer diff --git a/src/mame/drivers/xerox820.cpp b/src/mame/drivers/xerox820.cpp index 744d57a57b4..855b7b4f034 100644 --- a/src/mame/drivers/xerox820.cpp +++ b/src/mame/drivers/xerox820.cpp @@ -171,7 +171,7 @@ static ADDRESS_MAP_START( xerox820_io, AS_IO, 8, xerox820_state ) AM_RANGE(0x08, 0x0b) AM_MIRROR(0xff00) AM_DEVREADWRITE(Z80PIO_GP_TAG, z80pio_device, read_alt, write_alt) AM_RANGE(0x0c, 0x0c) AM_MIRROR(0xff03) AM_DEVWRITE(COM8116_TAG, com8116_device, stt_w) AM_RANGE(0x10, 0x13) AM_MIRROR(0xff00) AM_READWRITE(fdc_r, fdc_w) - AM_RANGE(0x14, 0x14) AM_MIRROR(0xff03) AM_MASK(0xff00) AM_WRITE(scroll_w) + AM_RANGE(0x14, 0x14) AM_MIRROR(0x0003) AM_SELECT(0xff00) AM_WRITE(scroll_w) AM_RANGE(0x18, 0x1b) AM_MIRROR(0xff00) AM_DEVREADWRITE(Z80CTC_TAG, z80ctc_device, read, write) AM_RANGE(0x1c, 0x1f) AM_MIRROR(0xff00) AM_DEVREADWRITE(Z80PIO_KB_TAG, z80pio_device, read_alt, write_alt) ADDRESS_MAP_END diff --git a/src/mame/drivers/xor100.cpp b/src/mame/drivers/xor100.cpp index 05b81f316ac..71e0a9d1407 100644 --- a/src/mame/drivers/xor100.cpp +++ b/src/mame/drivers/xor100.cpp @@ -65,7 +65,7 @@ void xor100_state::bankswitch() program.unmap_write(0x0000, 0xffff); } - program.install_read_bank(0x0000, 0xf7ff, 0x07ff, 0, "bank2"); + program.install_read_bank(0x0000, 0x07ff, 0xf000, "bank2"); program.install_read_bank(0xf800, 0xffff, "bank3"); membank("bank2")->set_entry(0); membank("bank3")->set_entry(0); diff --git a/src/mame/drivers/z88.cpp b/src/mame/drivers/z88.cpp index a5ac22c648d..7abcc157620 100644 --- a/src/mame/drivers/z88.cpp +++ b/src/mame/drivers/z88.cpp @@ -109,16 +109,16 @@ UPD65031_MEMORY_UPDATE(z88_state::bankswitch_update) switch (bank) { case 0: - m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x0000, 0x3fff, 0, 0, read8_delegate(FUNC(z88_state::bank0_cart_r), this), write8_delegate(FUNC(z88_state::bank0_cart_w), this)); + m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x0000, 0x3fff, read8_delegate(FUNC(z88_state::bank0_cart_r), this), write8_delegate(FUNC(z88_state::bank0_cart_w), this)); break; case 1: - m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x4000, 0x7fff, 0, 0, read8_delegate(FUNC(z88_state::bank1_cart_r), this), write8_delegate(FUNC(z88_state::bank1_cart_w), this)); + m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x4000, 0x7fff, read8_delegate(FUNC(z88_state::bank1_cart_r), this), write8_delegate(FUNC(z88_state::bank1_cart_w), this)); break; case 2: - m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x8000, 0xbfff, 0, 0, read8_delegate(FUNC(z88_state::bank2_cart_r), this), write8_delegate(FUNC(z88_state::bank2_cart_w), this)); + m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x8000, 0xbfff, read8_delegate(FUNC(z88_state::bank2_cart_r), this), write8_delegate(FUNC(z88_state::bank2_cart_w), this)); break; case 3: - m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xc000, 0xffff, 0, 0, read8_delegate(FUNC(z88_state::bank3_cart_r), this), write8_delegate(FUNC(z88_state::bank3_cart_w), this)); + m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xc000, 0xffff, read8_delegate(FUNC(z88_state::bank3_cart_r), this), write8_delegate(FUNC(z88_state::bank3_cart_w), this)); break; } diff --git a/src/mame/drivers/zaxxon.cpp b/src/mame/drivers/zaxxon.cpp index 11eff72f6a6..3da5c7365af 100644 --- a/src/mame/drivers/zaxxon.cpp +++ b/src/mame/drivers/zaxxon.cpp @@ -1558,9 +1558,9 @@ DRIVER_INIT_MEMBER(zaxxon_state,razmataz) address_space &pgmspace = m_maincpu->space(AS_PROGRAM); /* additional input ports are wired */ - pgmspace.install_read_port(0xc004, 0xc004, 0, 0x18f3, "SW04"); - pgmspace.install_read_port(0xc008, 0xc008, 0, 0x18f3, "SW08"); - pgmspace.install_read_port(0xc00c, 0xc00c, 0, 0x18f3, "SW0C"); + pgmspace.install_read_port(0xc004, 0xc004, 0x18f3, "SW04"); + pgmspace.install_read_port(0xc008, 0xc008, 0x18f3, "SW08"); + pgmspace.install_read_port(0xc00c, 0xc00c, 0x18f3, "SW0C"); /* unknown behavior expected here */ pgmspace.install_read_handler(0xc80a, 0xc80a, read8_delegate(FUNC(zaxxon_state::razmataz_counter_r),this)); diff --git a/src/mame/machine/6883sam.cpp b/src/mame/machine/6883sam.cpp index c3ce94e0fc6..bc9a913f0e6 100644 --- a/src/mame/machine/6883sam.cpp +++ b/src/mame/machine/6883sam.cpp @@ -103,8 +103,8 @@ void sam6883_device::device_start() m_read_res.resolve_safe(0); // install SAM handlers - m_cpu_space->install_read_handler(0xFFC0, 0xFFDF, 0, 0, read8_delegate(FUNC(sam6883_device::read), this)); - m_cpu_space->install_write_handler(0xFFC0, 0xFFDF, 0, 0, write8_delegate(FUNC(sam6883_device::write), this)); + m_cpu_space->install_read_handler(0xFFC0, 0xFFDF, read8_delegate(FUNC(sam6883_device::read), this)); + m_cpu_space->install_write_handler(0xFFC0, 0xFFDF, write8_delegate(FUNC(sam6883_device::write), this)); // save state support save_item(NAME(m_sam_state)); @@ -511,6 +511,8 @@ void sam6883_device::sam_space<_addrstart, _addrend>::point_specific_bank(const if (mask != 0) offset &= mask; + UINT32 mirror = (addrend - addrstart) ^ mask; + // this bank is a memory bank - first ensure that we have a bank if (!memory_bank || !memory_bank->matches_exactly(addrstart, addrend) || (mask != m_mask)) { @@ -519,9 +521,9 @@ void sam6883_device::sam_space<_addrstart, _addrend>::point_specific_bank(const // install it if (is_write) - cpu_space().install_write_bank(addrstart, addrend, mask, 0, buffer); + cpu_space().install_write_bank(addrstart, addrend, mirror, buffer); else - cpu_space().install_read_bank(addrstart, addrend, mask, 0, buffer); + cpu_space().install_read_bank(addrstart, addrend, mirror, buffer); m_mask = mask; // and get it @@ -545,12 +547,12 @@ void sam6883_device::sam_space<_addrstart, _addrend>::point_specific_bank(const if (is_write) { if (!bank->m_whandler.isnull()) - cpu_space().install_write_handler(addrstart, addrend, 0, 0, bank->m_whandler); + cpu_space().install_write_handler(addrstart, addrend, bank->m_whandler); } else { if (!bank->m_rhandler.isnull()) - cpu_space().install_read_handler(addrstart, addrend, 0, 0, bank->m_rhandler); + cpu_space().install_read_handler(addrstart, addrend, bank->m_rhandler); } } } diff --git a/src/mame/machine/atarigen.cpp b/src/mame/machine/atarigen.cpp index 6c22710e0d3..ab9a2117bc1 100644 --- a/src/mame/machine/atarigen.cpp +++ b/src/mame/machine/atarigen.cpp @@ -1201,7 +1201,7 @@ void atarigen_state::slapstic_configure(cpu_device &device, offs_t base, offs_t // install the memory handlers address_space &program = device.space(AS_PROGRAM); - program.install_readwrite_handler(base, base + 0x7fff, 0, mirror, read16_delegate(FUNC(atarigen_state::slapstic_r), this), write16_delegate(FUNC(atarigen_state::slapstic_w), this)); + program.install_readwrite_handler(base, base + 0x7fff, 0, mirror, 0, read16_delegate(FUNC(atarigen_state::slapstic_r), this), write16_delegate(FUNC(atarigen_state::slapstic_w), this)); m_slapstic = (UINT16 *)mem; // allocate memory for a copy of bank 0 diff --git a/src/mame/machine/bebox.cpp b/src/mame/machine/bebox.cpp index 4b89b4b6871..4f98bce00ef 100644 --- a/src/mame/machine/bebox.cpp +++ b/src/mame/machine/bebox.cpp @@ -786,8 +786,8 @@ DRIVER_INIT_MEMBER(bebox_state,bebox) membank("bank2")->set_base(memregion("user2")->base()); /* install MESS managed RAM */ - space_0.install_readwrite_bank(0, m_ram->size() - 1, 0, 0x02000000, "bank3"); - space_1.install_readwrite_bank(0, m_ram->size() - 1, 0, 0x02000000, "bank3"); + space_0.install_readwrite_bank(0, m_ram->size() - 1, 0x02000000, "bank3"); + space_1.install_readwrite_bank(0, m_ram->size() - 1, 0x02000000, "bank3"); membank("bank3")->set_base(m_ram->pointer()); /* The following is a verrrry ugly hack put in to support NetBSD for diff --git a/src/mame/machine/hp48.cpp b/src/mame/machine/hp48.cpp index 71bb4b656ff..c7674751b16 100644 --- a/src/mame/machine/hp48.cpp +++ b/src/mame/machine/hp48.cpp @@ -644,15 +644,15 @@ void hp48_state::hp48_apply_modules() m_io_addr = 0x100000; /* NCE1 (ROM) is a bit special, so treat it separately */ - space.unmap_readwrite( 0, 0xfffff, 0, 0 ); + space.unmap_readwrite( 0, 0xfffff ); if ( HP49_G_MODEL ) { int bank_lo = (m_bank_switch >> 5) & 3; int bank_hi = (m_bank_switch >> 1) & 15; LOG(( "hp48_apply_modules: low ROM bank is %i\n", bank_lo )); LOG(( "hp48_apply_modules: high ROM bank is %i\n", bank_hi )); - space.install_read_bank( 0x00000, 0x3ffff, 0, 0x80000, "bank5" ); - space.install_read_bank( 0x40000, 0x7ffff, 0, 0x80000, "bank6" ); + space.install_read_bank( 0x00000, 0x3ffff, 0x80000, "bank5" ); + space.install_read_bank( 0x40000, 0x7ffff, 0x80000, "bank6" ); if ( m_rom ) { membank("bank5")->set_base( m_rom + bank_lo * 0x40000 ); @@ -675,21 +675,21 @@ void hp48_state::hp48_apply_modules() /* A19 */ LOG(( "hp48_apply_modules: A19 enabled, NCE3 disabled\n" )); nce3_enable = 0; - space.install_read_bank( 0, 0xfffff, 0, 0, "bank5" ); + space.install_read_bank( 0, 0xfffff, "bank5" ); } else { /* NCE3 */ nce3_enable = m_bank_switch >> 6; LOG(( "hp48_apply_modules: A19 disabled, NCE3 %s\n", nce3_enable ? "enabled" : "disabled" )); - space.install_read_bank( 0, 0x7ffff, 0, 0x80000, "bank5" ); + space.install_read_bank( 0, 0x7ffff, 0x80000, "bank5" ); } if ( m_rom ) membank("bank5")->set_base( m_rom ); } else { - space.install_read_bank( 0, 0x7ffff, 0, 0x80000, "bank5" ); + space.install_read_bank( 0, 0x7ffff, 0x80000, "bank5" ); if ( m_rom ) membank("bank5")->set_base( m_rom ); } @@ -720,25 +720,25 @@ void hp48_state::hp48_apply_modules() } if (m_modules[i].data) - space.install_read_bank( base, end, 0, mirror, bank ); + space.install_read_bank( base, end, mirror, bank ); else { if (!m_modules[i].read.isnull()) - space.install_read_handler( base, end, 0, mirror, m_modules[i].read ); + space.install_read_handler( base, end, 0, mirror, 0, m_modules[i].read ); } if (m_modules[i].isnop) - space.nop_write(base, end, 0, mirror); + space.nop_write(base, end | mirror); else { if (m_modules[i].data) { - space.install_write_bank( base, end, 0, mirror, bank ); + space.install_write_bank( base, end, mirror, bank ); } else { if (!m_modules[i].write.isnull()) - space.install_write_handler( base, end, 0, mirror, m_modules[i].write ); + space.install_write_handler( base, end, 0, mirror, 0, m_modules[i].write ); } } diff --git a/src/mame/machine/kc.cpp b/src/mame/machine/kc.cpp index b324f334751..92e379b0eb4 100644 --- a/src/mame/machine/kc.cpp +++ b/src/mame/machine/kc.cpp @@ -309,8 +309,8 @@ void kc_state::update_0x00000() { LOG(("Module at 0x0000\n")); - space.install_read_handler (0x0000, 0x3fff, 0, 0, read8_delegate(FUNC(kc_state::expansion_read), this), 0); - space.install_write_handler(0x0000, 0x3fff, 0, 0, write8_delegate(FUNC(kc_state::expansion_write), this), 0); + space.install_read_handler (0x0000, 0x3fff, read8_delegate(FUNC(kc_state::expansion_read), this), 0); + space.install_write_handler(0x0000, 0x3fff, write8_delegate(FUNC(kc_state::expansion_write), this), 0); } } @@ -321,8 +321,8 @@ void kc_state::update_0x04000() LOG(("Module at 0x4000\n")); - space.install_read_handler (0x4000, 0x7fff, 0, 0, read8_delegate(FUNC(kc_state::expansion_4000_r), this), 0); - space.install_write_handler(0x4000, 0x7fff, 0, 0, write8_delegate(FUNC(kc_state::expansion_4000_w), this), 0); + space.install_read_handler (0x4000, 0x7fff, read8_delegate(FUNC(kc_state::expansion_4000_r), this), 0); + space.install_write_handler(0x4000, 0x7fff, write8_delegate(FUNC(kc_state::expansion_4000_w), this), 0); } @@ -345,8 +345,8 @@ void kc_state::update_0x0c000() { LOG(("Module at 0x0c000\n")); - space.install_read_handler (0xc000, 0xdfff, 0, 0, read8_delegate(FUNC(kc_state::expansion_c000_r), this), 0); - space.install_write_handler(0xc000, 0xdfff, 0, 0, write8_delegate(FUNC(kc_state::expansion_c000_w), this), 0); + space.install_read_handler (0xc000, 0xdfff, read8_delegate(FUNC(kc_state::expansion_c000_r), this), 0); + space.install_write_handler(0xc000, 0xdfff, write8_delegate(FUNC(kc_state::expansion_c000_w), this), 0); } } @@ -368,8 +368,8 @@ void kc_state::update_0x0e000() { LOG(("Module at 0x0e000\n")); - space.install_read_handler (0xe000, 0xffff, 0, 0, read8_delegate(FUNC(kc_state::expansion_e000_r), this), 0); - space.install_write_handler(0xe000, 0xffff, 0, 0, write8_delegate(FUNC(kc_state::expansion_e000_w), this), 0); + space.install_read_handler (0xe000, 0xffff, read8_delegate(FUNC(kc_state::expansion_e000_r), this), 0); + space.install_write_handler(0xe000, 0xffff, write8_delegate(FUNC(kc_state::expansion_e000_w), this), 0); } } @@ -391,8 +391,8 @@ void kc_state::update_0x08000() { LOG(("Module at 0x8000!\n")); - space.install_read_handler(0x8000, 0xbfff, 0, 0, read8_delegate(FUNC(kc_state::expansion_8000_r), this), 0); - space.install_write_handler(0x8000, 0xbfff, 0, 0, write8_delegate(FUNC(kc_state::expansion_8000_w), this), 0); + space.install_read_handler(0x8000, 0xbfff, read8_delegate(FUNC(kc_state::expansion_8000_r), this), 0); + space.install_write_handler(0x8000, 0xbfff, write8_delegate(FUNC(kc_state::expansion_8000_w), this), 0); } } @@ -433,8 +433,8 @@ void kc85_4_state::update_0x04000() { LOG(("Module at 0x4000\n")); - space.install_read_handler (0x4000, 0x7fff, 0, 0, read8_delegate(FUNC(kc_state::expansion_4000_r), this), 0); - space.install_write_handler(0x4000, 0x7fff, 0, 0, write8_delegate(FUNC(kc_state::expansion_4000_w), this), 0); + space.install_read_handler (0x4000, 0x7fff, read8_delegate(FUNC(kc_state::expansion_4000_r), this), 0); + space.install_write_handler(0x4000, 0x7fff, write8_delegate(FUNC(kc_state::expansion_4000_w), this), 0); } } @@ -470,8 +470,8 @@ void kc85_4_state::update_0x0c000() { LOG(("Module at 0x0c000\n")); - space.install_read_handler (0xc000, 0xdfff, 0, 0, read8_delegate(FUNC(kc_state::expansion_c000_r), this), 0); - space.install_write_handler(0xc000, 0xdfff, 0, 0, write8_delegate(FUNC(kc_state::expansion_c000_w), this), 0); + space.install_read_handler (0xc000, 0xdfff, read8_delegate(FUNC(kc_state::expansion_c000_r), this), 0); + space.install_write_handler(0xc000, 0xdfff, write8_delegate(FUNC(kc_state::expansion_c000_w), this), 0); } } } @@ -542,8 +542,8 @@ void kc85_4_state::update_0x08000() { LOG(("Module at 0x8000\n")); - space.install_read_handler(0x8000, 0xbfff, 0, 0, read8_delegate(FUNC(kc_state::expansion_8000_r), this), 0); - space.install_write_handler(0x8000, 0xbfff, 0, 0, write8_delegate(FUNC(kc_state::expansion_8000_w), this), 0); + space.install_read_handler(0x8000, 0xbfff, read8_delegate(FUNC(kc_state::expansion_8000_r), this), 0); + space.install_write_handler(0x8000, 0xbfff, write8_delegate(FUNC(kc_state::expansion_8000_w), this), 0); } } diff --git a/src/mame/machine/mac.cpp b/src/mame/machine/mac.cpp index a5c1409cbbb..5e1f70bb7c1 100644 --- a/src/mame/machine/mac.cpp +++ b/src/mame/machine/mac.cpp @@ -152,27 +152,27 @@ void mac_state::mac_install_memory(offs_t memory_begin, offs_t memory_end, offs_t memory_size, void *memory_data, int is_rom, const char *bank) { address_space& space = m_maincpu->space(AS_PROGRAM); - offs_t memory_mask; + offs_t memory_mirror; memory_size = MIN(memory_size, (memory_end + 1 - memory_begin)); - memory_mask = memory_size - 1; + memory_mirror = (memory_end - memory_begin) ^ (memory_size - 1); if (!is_rom) { - space.install_readwrite_bank(memory_begin, memory_end, memory_mask, 0, bank); + space.install_readwrite_bank(memory_begin, memory_end, memory_mirror, bank); } else { - space.unmap_write(memory_begin, memory_end, memory_mask, 0); - space.install_read_bank(memory_begin, memory_end, memory_mask, 0, bank); + space.unmap_write(memory_begin, memory_end); + space.install_read_bank(memory_begin, memory_end, memory_mirror, bank); } membank(bank)->set_base(memory_data); if (LOG_MEMORY) { - printf("mac_install_memory(): bank=%s range=[0x%06x...0x%06x] mask=0x%06x ptr=0x%p\n", - bank, memory_begin, memory_end, memory_mask, memory_data); + printf("mac_install_memory(): bank=%s range=[0x%06x...0x%06x] mirror=0x%06x ptr=0x%p\n", + bank, memory_begin, memory_end, memory_mirror, memory_data); } } @@ -355,12 +355,12 @@ void mac_state::v8_resize() static const UINT32 simm_sizes[4] = { 0, 2*1024*1024, 4*1024*1024, 8*1024*1024 }; // re-install ROM in its normal place - size_t rom_mask = memregion("bootrom")->bytes() - 1; - m_maincpu->space(AS_PROGRAM).install_read_bank(0xa00000, 0xafffff, rom_mask, 0, "bankR"); + size_t rom_mirror = 0xfffff ^ (memregion("bootrom")->bytes() - 1); + m_maincpu->space(AS_PROGRAM).install_read_bank(0xa00000, 0xafffff, rom_mirror, "bankR"); membank("bankR")->set_base((void *)memregion("bootrom")->base()); // force unmap of entire RAM region - space.unmap_write(0, 0x9fffff, 0x9fffff, 0); + space.unmap_write(0, 0x9fffff); // LC and Classic II have 2 MB built-in, all other V8-style machines have 4 MB // we reserve the first 2 or 4 MB of mess_ram for the onboard, @@ -447,13 +447,13 @@ void mac_state::set_memory_overlay(int overlay) else if ((m_model == MODEL_MAC_PORTABLE) || (m_model == MODEL_MAC_PB100) || (m_model == MODEL_MAC_IIVX) || (m_model == MODEL_MAC_IIFX)) { address_space& space = m_maincpu->space(AS_PROGRAM); - space.unmap_write(0x000000, 0x9fffff, 0x9fffff, 0); + space.unmap_write(0x000000, 0x9fffff); mac_install_memory(0x000000, memory_size-1, memory_size, memory_data, is_rom, "bank1"); } else if ((m_model == MODEL_MAC_PB140) || (m_model == MODEL_MAC_PB160) || ((m_model >= MODEL_MAC_PBDUO_210) && (m_model <= MODEL_MAC_PBDUO_270c))) { address_space& space = m_maincpu->space(AS_PROGRAM); - space.unmap_write(0x000000, 0xffffff, 0xffffff, 0); + space.unmap_write(0x000000, 0xffffff); mac_install_memory(0x000000, memory_size-1, memory_size, memory_data, is_rom, "bank1"); } else if ((m_model >= MODEL_MAC_II) && (m_model <= MODEL_MAC_SE30)) @@ -470,8 +470,8 @@ void mac_state::set_memory_overlay(int overlay) } else { - size_t rom_mask = memregion("bootrom")->bytes() - 1; - m_maincpu->space(AS_PROGRAM).install_read_bank(0x40000000, 0x4fffffff, rom_mask, 0, "bankR"); + size_t rom_mirror = 0xfffffff ^ (memregion("bootrom")->bytes() - 1); + m_maincpu->space(AS_PROGRAM).install_read_bank(0x40000000, 0x4fffffff, rom_mirror, "bankR"); membank("bankR")->set_base((void *)memregion("bootrom")->base()); } } diff --git a/src/mame/machine/pc9801_118.cpp b/src/mame/machine/pc9801_118.cpp index 9b7191c40da..adac1a4ea0b 100644 --- a/src/mame/machine/pc9801_118.cpp +++ b/src/mame/machine/pc9801_118.cpp @@ -138,19 +138,19 @@ void pc9801_118_device::device_validity_check(validity_checker &valid) const // device_start - device-specific startup //------------------------------------------------- -void pc9801_118_device::install_device(offs_t start, offs_t end, offs_t mask, offs_t mirror, read8_delegate rhandler, write8_delegate whandler) +void pc9801_118_device::install_device(offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler) { int buswidth = machine().firstcpu->space_config(AS_IO)->m_databus_width; switch(buswidth) { case 8: - machine().firstcpu->space(AS_IO).install_readwrite_handler(start, end, mask, mirror, rhandler, whandler, 0); + machine().firstcpu->space(AS_IO).install_readwrite_handler(start, end, rhandler, whandler, 0); break; case 16: - machine().firstcpu->space(AS_IO).install_readwrite_handler(start, end, mask, mirror, rhandler, whandler, 0xffff); + machine().firstcpu->space(AS_IO).install_readwrite_handler(start, end, rhandler, whandler, 0xffff); break; case 32: - machine().firstcpu->space(AS_IO).install_readwrite_handler(start, end, mask, mirror, rhandler, whandler, 0xffffffff); + machine().firstcpu->space(AS_IO).install_readwrite_handler(start, end, rhandler, whandler, 0xffffffff); break; default: fatalerror("PC-9801-118: Bus width %d not supported\n", buswidth); @@ -170,8 +170,8 @@ void pc9801_118_device::device_start() void pc9801_118_device::device_reset() { UINT16 port_base = (ioport("OPN3_DSW")->read() & 1) << 8; - install_device(port_base + 0x0088, port_base + 0x008f, 0, 0, read8_delegate(FUNC(pc9801_118_device::pc9801_118_r), this), write8_delegate(FUNC(pc9801_118_device::pc9801_118_w), this) ); - install_device(0xa460, 0xa463, 0, 0, read8_delegate(FUNC(pc9801_118_device::pc9801_118_ext_r), this), write8_delegate(FUNC(pc9801_118_device::pc9801_118_ext_w), this) ); + install_device(port_base + 0x0088, port_base + 0x008f, read8_delegate(FUNC(pc9801_118_device::pc9801_118_r), this), write8_delegate(FUNC(pc9801_118_device::pc9801_118_w), this) ); + install_device(0xa460, 0xa463, read8_delegate(FUNC(pc9801_118_device::pc9801_118_ext_r), this), write8_delegate(FUNC(pc9801_118_device::pc9801_118_ext_w), this) ); m_ext_reg = 1; // TODO: enabled or disabled? } diff --git a/src/mame/machine/pc9801_118.h b/src/mame/machine/pc9801_118.h index 83e4cb4b284..fb009163cf0 100644 --- a/src/mame/machine/pc9801_118.h +++ b/src/mame/machine/pc9801_118.h @@ -48,7 +48,7 @@ protected: virtual void device_validity_check(validity_checker &valid) const override; virtual void device_start() override; virtual void device_reset() override; - void install_device(offs_t start, offs_t end, offs_t mask, offs_t mirror, read8_delegate rhandler, write8_delegate whandler); + void install_device(offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler); private: UINT8 m_joy_sel; diff --git a/src/mame/machine/pc9801_26.cpp b/src/mame/machine/pc9801_26.cpp index 8eb8e0f7413..d421e0f40ce 100644 --- a/src/mame/machine/pc9801_26.cpp +++ b/src/mame/machine/pc9801_26.cpp @@ -130,19 +130,19 @@ void pc9801_26_device::device_validity_check(validity_checker &valid) const // device_start - device-specific startup //------------------------------------------------- -void pc9801_26_device::install_device(offs_t start, offs_t end, offs_t mask, offs_t mirror, read8_delegate rhandler, write8_delegate whandler) +void pc9801_26_device::install_device(offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler) { int buswidth = machine().firstcpu->space_config(AS_IO)->m_databus_width; switch(buswidth) { case 8: - machine().firstcpu->space(AS_IO).install_readwrite_handler(start, end, mask, mirror, rhandler, whandler, 0); + machine().firstcpu->space(AS_IO).install_readwrite_handler(start, end, rhandler, whandler, 0); break; case 16: - machine().firstcpu->space(AS_IO).install_readwrite_handler(start, end, mask, mirror, rhandler, whandler, 0xffff); + machine().firstcpu->space(AS_IO).install_readwrite_handler(start, end, rhandler, whandler, 0xffff); break; case 32: - machine().firstcpu->space(AS_IO).install_readwrite_handler(start, end, mask, mirror, rhandler, whandler, 0xffffffff); + machine().firstcpu->space(AS_IO).install_readwrite_handler(start, end, rhandler, whandler, 0xffffffff); break; default: fatalerror("PC-9801-26: Bus width %d not supported\n", buswidth); @@ -162,7 +162,7 @@ void pc9801_26_device::device_start() void pc9801_26_device::device_reset() { UINT16 port_base = (ioport("OPN_DSW")->read() & 1) << 8; - install_device(port_base + 0x0088, port_base + 0x008b, 0, 0, read8_delegate(FUNC(pc9801_26_device::pc9801_26_r), this), write8_delegate(FUNC(pc9801_26_device::pc9801_26_w), this) ); + install_device(port_base + 0x0088, port_base + 0x008b, read8_delegate(FUNC(pc9801_26_device::pc9801_26_r), this), write8_delegate(FUNC(pc9801_26_device::pc9801_26_w), this) ); } diff --git a/src/mame/machine/pc9801_26.h b/src/mame/machine/pc9801_26.h index cf87298347a..d48596c8834 100644 --- a/src/mame/machine/pc9801_26.h +++ b/src/mame/machine/pc9801_26.h @@ -45,7 +45,7 @@ protected: virtual void device_validity_check(validity_checker &valid) const override; virtual void device_start() override; virtual void device_reset() override; - void install_device(offs_t start, offs_t end, offs_t mask, offs_t mirror, read8_delegate rhandler, write8_delegate whandler); + void install_device(offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler); private: UINT8 m_joy_sel; diff --git a/src/mame/machine/pc9801_86.cpp b/src/mame/machine/pc9801_86.cpp index db40adbcaa4..8dd0af5a1cf 100644 --- a/src/mame/machine/pc9801_86.cpp +++ b/src/mame/machine/pc9801_86.cpp @@ -148,19 +148,19 @@ void pc9801_86_device::device_validity_check(validity_checker &valid) const // device_start - device-specific startup //------------------------------------------------- -void pc9801_86_device::install_device(offs_t start, offs_t end, offs_t mask, offs_t mirror, read8_delegate rhandler, write8_delegate whandler) +void pc9801_86_device::install_device(offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler) { int buswidth = machine().firstcpu->space_config(AS_IO)->m_databus_width; switch(buswidth) { case 8: - machine().firstcpu->space(AS_IO).install_readwrite_handler(start, end, mask, mirror, rhandler, whandler, 0); + machine().firstcpu->space(AS_IO).install_readwrite_handler(start, end, rhandler, whandler, 0); break; case 16: - machine().firstcpu->space(AS_IO).install_readwrite_handler(start, end, mask, mirror, rhandler, whandler, 0xffff); + machine().firstcpu->space(AS_IO).install_readwrite_handler(start, end, rhandler, whandler, 0xffff); break; case 32: - machine().firstcpu->space(AS_IO).install_readwrite_handler(start, end, mask, mirror, rhandler, whandler, 0xffffffff); + machine().firstcpu->space(AS_IO).install_readwrite_handler(start, end, rhandler, whandler, 0xffffffff); break; default: fatalerror("PC-9801-86: Bus width %d not supported\n", buswidth); @@ -181,9 +181,9 @@ void pc9801_86_device::device_start() void pc9801_86_device::device_reset() { UINT16 port_base = (ioport("OPNA_DSW")->read() & 1) << 8; - install_device(port_base + 0x0088, port_base + 0x008f, 0, 0, read8_delegate(FUNC(pc9801_86_device::opn_r), this), write8_delegate(FUNC(pc9801_86_device::opn_w), this) ); - install_device(0xa460, 0xa463, 0, 0, read8_delegate(FUNC(pc9801_86_device::id_r), this), write8_delegate(FUNC(pc9801_86_device::mask_w), this)); - install_device(0xa464, 0xa46f, 0, 0, read8_delegate(FUNC(pc9801_86_device::pcm_r), this), write8_delegate(FUNC(pc9801_86_device::pcm_w), this)); + install_device(port_base + 0x0088, port_base + 0x008f, read8_delegate(FUNC(pc9801_86_device::opn_r), this), write8_delegate(FUNC(pc9801_86_device::opn_w), this) ); + install_device(0xa460, 0xa463, read8_delegate(FUNC(pc9801_86_device::id_r), this), write8_delegate(FUNC(pc9801_86_device::mask_w), this)); + install_device(0xa464, 0xa46f, read8_delegate(FUNC(pc9801_86_device::pcm_r), this), write8_delegate(FUNC(pc9801_86_device::pcm_w), this)); m_mask = 0; m_head = m_tail = m_count = 0; m_fmirq = m_pcmirq = false; diff --git a/src/mame/machine/pc9801_86.h b/src/mame/machine/pc9801_86.h index 61b48dcabb9..36e109e2eee 100644 --- a/src/mame/machine/pc9801_86.h +++ b/src/mame/machine/pc9801_86.h @@ -47,7 +47,7 @@ protected: virtual void device_validity_check(validity_checker &valid) const override; virtual void device_start() override; virtual void device_reset() override; - void install_device(offs_t start, offs_t end, offs_t mask, offs_t mirror, read8_delegate rhandler, write8_delegate whandler); + void install_device(offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler); virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; private: diff --git a/src/mame/machine/samcoupe.cpp b/src/mame/machine/samcoupe.cpp index 0f326879a31..f538a4909b9 100644 --- a/src/mame/machine/samcoupe.cpp +++ b/src/mame/machine/samcoupe.cpp @@ -323,12 +323,12 @@ void samcoupe_state::machine_reset() if (m_config->read() & 0x01) { /* install RTC */ - spaceio.install_readwrite_handler(0xef, 0xef, 0xffff, 0xff00, read8_delegate(FUNC(samcoupe_state::samcoupe_rtc_r),this), write8_delegate(FUNC(samcoupe_state::samcoupe_rtc_w),this)); + spaceio.install_readwrite_handler(0xef, 0xef, 0, 0, 0xff00, read8_delegate(FUNC(samcoupe_state::samcoupe_rtc_r),this), write8_delegate(FUNC(samcoupe_state::samcoupe_rtc_w),this)); } else { /* no RTC support */ - spaceio.unmap_readwrite(0xef, 0xef, 0xffff, 0xff00); + spaceio.unmap_readwrite(0xef, 0xef, 0xff00); } /* initialize memory */ diff --git a/src/mame/machine/segaic16.cpp b/src/mame/machine/segaic16.cpp index 611d8568a96..bef1aed63e9 100644 --- a/src/mame/machine/segaic16.cpp +++ b/src/mame/machine/segaic16.cpp @@ -402,9 +402,9 @@ void sega_315_5195_mapper_device::map_as_rom(UINT32 offset, UINT32 length, offs_ romend = romsize - 1 - rgnoffset + info.start; // map now - m_space->install_read_bank(info.start, romend, 0, info.mirror, bank_name); + m_space->install_read_bank(info.start, romend, info.mirror, bank_name); if (m_decrypted_space) - m_decrypted_space->install_read_bank(info.start, romend, 0, info.mirror, decrypted_bank_name); + m_decrypted_space->install_read_bank(info.start, romend, info.mirror, decrypted_bank_name); // configure the bank memory_bank *bank = owner()->membank(bank_name); @@ -422,9 +422,9 @@ void sega_315_5195_mapper_device::map_as_rom(UINT32 offset, UINT32 length, offs_ // falling through to the memory-mapping registers and crashing the // game during stage 2-4 (see PC:$18a98). Protection maybe? if (!whandler.isnull()) - m_space->install_write_handler(info.start, info.end, 0, info.mirror, whandler); + m_space->install_write_handler(info.start, info.end, 0, info.mirror, 0, whandler); else - m_space->unmap_write(info.start, info.end, 0, info.mirror); + m_space->unmap_write(info.start, info.end | info.mirror); } @@ -446,13 +446,13 @@ void sega_315_5195_mapper_device::map_as_ram(UINT32 offset, UINT32 length, offs_ } // map now - m_space->install_read_bank(info.start, info.end, 0, info.mirror, bank_share_name); + m_space->install_read_bank(info.start, info.end, info.mirror, bank_share_name); // either install a write handler or a write bank, as appropriate if (!whandler.isnull()) - m_space->install_write_handler(info.start, info.end, 0, info.mirror, whandler); + m_space->install_write_handler(info.start, info.end, 0, info.mirror, 0, whandler); else - m_space->install_write_bank(info.start, info.end, 0, info.mirror, bank_share_name); + m_space->install_write_bank(info.start, info.end, info.mirror, bank_share_name); // configure the bank memory_bank *bank = owner()->membank(bank_share_name); @@ -483,9 +483,9 @@ void sega_315_5195_mapper_device::map_as_handler(UINT32 offset, UINT32 length, o // install read/write handlers if (!rhandler.isnull()) - m_space->install_read_handler(info.start, info.end, 0, info.mirror, rhandler); + m_space->install_read_handler(info.start, info.end, 0, info.mirror, 0, rhandler); if (!whandler.isnull()) - m_space->install_write_handler(info.start, info.end, 0, info.mirror, whandler); + m_space->install_write_handler(info.start, info.end, 0, info.mirror, 0, whandler); // clear this rom bank reference m_banks[m_curregion].clear(); diff --git a/src/mame/machine/special.cpp b/src/mame/machine/special.cpp index bb1c7f64f31..9f53397438e 100644 --- a/src/mame/machine/special.cpp +++ b/src/mame/machine/special.cpp @@ -337,7 +337,7 @@ void special_state::erik_set_bank() m_bank4->set_base(mem + 0x1c000); space.unmap_write(0xf000, 0xf7ff); space.nop_read(0xf000, 0xf7ff); - space.install_readwrite_handler(0xf800, 0xf803, 0, 0x7fc, read8_delegate(FUNC(i8255_device::read), (i8255_device*)m_ppi), write8_delegate(FUNC(i8255_device::write), (i8255_device*)m_ppi)); + space.install_readwrite_handler(0xf800, 0xf803, 0, 0x7fc, 0, read8_delegate(FUNC(i8255_device::read), (i8255_device*)m_ppi), write8_delegate(FUNC(i8255_device::write), (i8255_device*)m_ppi)); break; } } diff --git a/src/mame/machine/swtpc09.cpp b/src/mame/machine/swtpc09.cpp index 71613a8b8ac..d3edb885d60 100644 --- a/src/mame/machine/swtpc09.cpp +++ b/src/mame/machine/swtpc09.cpp @@ -551,8 +551,8 @@ WRITE8_MEMBER(swtpc09_state::dat_w) } else if (offset==0x0f) // then we need to leave in top part of ram and dat write { - mem.install_ram(logical_address, logical_address+0x0eff, 0, 0, &RAM[physical_address]); - mem.install_rom(logical_address+0xf00, logical_address+0xfff, 0, 0, &RAM[0xff00]); + mem.install_ram(logical_address, logical_address+0x0eff, &RAM[physical_address]); + mem.install_rom(logical_address+0xf00, logical_address+0xfff, &RAM[0xff00]); mem.install_write_handler(logical_address+0xff0, logical_address+0xfff, write8_delegate(FUNC(swtpc09_state::dat_w),this)); } diff --git a/src/mame/machine/trs80.cpp b/src/mame/machine/trs80.cpp index 999a086d466..30c1afc76fe 100644 --- a/src/mame/machine/trs80.cpp +++ b/src/mame/machine/trs80.cpp @@ -570,7 +570,7 @@ WRITE8_MEMBER( trs80_state::lnw80_fe_w ) mem.install_readwrite_handler (0x37ed, 0x37ed, read8_delegate(FUNC(fd1793_t::track_r),(fd1793_t*)m_fdc), write8_delegate(FUNC(fd1793_t::track_w),(fd1793_t*)m_fdc)); mem.install_readwrite_handler (0x37ee, 0x37ee, read8_delegate(FUNC(fd1793_t::sector_r),(fd1793_t*)m_fdc), write8_delegate(FUNC(fd1793_t::sector_w),(fd1793_t*)m_fdc)); mem.install_readwrite_handler (0x37ef, 0x37ef, read8_delegate(FUNC(fd1793_t::data_r),(fd1793_t*)m_fdc),write8_delegate( FUNC(fd1793_t::data_w),(fd1793_t*)m_fdc)); - mem.install_read_handler (0x3800, 0x38ff, 0, 0x0300, read8_delegate(FUNC(trs80_state::trs80_keyboard_r), this)); + mem.install_read_handler (0x3800, 0x38ff, 0, 0x0300, 0, read8_delegate(FUNC(trs80_state::trs80_keyboard_r), this)); mem.install_readwrite_handler (0x3c00, 0x3fff, read8_delegate(FUNC(trs80_state::trs80_videoram_r), this), write8_delegate(FUNC(trs80_state::trs80_videoram_w), this)); } } diff --git a/src/mame/video/pcd.cpp b/src/mame/video/pcd.cpp index da20168f390..9c9354bd569 100644 --- a/src/mame/video/pcd.cpp +++ b/src/mame/video/pcd.cpp @@ -405,8 +405,8 @@ WRITE8_MEMBER(pcx_video_device::p1_w) void pcd_video_device::device_start() { - m_maincpu->space(AS_IO).install_readwrite_handler(0xfb00, 0xfb01, 0, 0, read8_delegate(FUNC(pcdx_video_device::detect_r), this), write8_delegate(FUNC(pcdx_video_device::detect_w), this), 0xff00); - m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xf0000, 0xf7fff, 0, 0, read8_delegate(FUNC(pcd_video_device::vram_r), this), write8_delegate(FUNC(pcd_video_device::vram_w), this), 0xffff); + m_maincpu->space(AS_IO).install_readwrite_handler(0xfb00, 0xfb01, read8_delegate(FUNC(pcdx_video_device::detect_r), this), write8_delegate(FUNC(pcdx_video_device::detect_w), this), 0xff00); + m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xf0000, 0xf7fff, read8_delegate(FUNC(pcd_video_device::vram_r), this), write8_delegate(FUNC(pcd_video_device::vram_w), this), 0xffff); set_gfx(0, std::make_unique<gfx_element>(palette(), pcd_charlayout, &m_charram[0], 0, 1, 0)); } @@ -431,7 +431,7 @@ ADDRESS_MAP_END void pcx_video_device::device_start() { mcs51_cpu_device *mcu = downcast<mcs51_cpu_device *>(m_mcu.target()); - m_maincpu->space(AS_IO).install_readwrite_handler(0xfb00, 0xfb01, 0, 0, read8_delegate(FUNC(pcdx_video_device::detect_r), this), write8_delegate(FUNC(pcdx_video_device::detect_w), this), 0x00ff); + m_maincpu->space(AS_IO).install_readwrite_handler(0xfb00, 0xfb01, read8_delegate(FUNC(pcdx_video_device::detect_r), this), write8_delegate(FUNC(pcdx_video_device::detect_w), this), 0x00ff); m_txd_handler.resolve_safe(); // set serial callbacks |