From 47ccf152b24557040b593c60ccf7896da88726a0 Mon Sep 17 00:00:00 2001 From: Olivier Galibert Date: Thu, 19 Apr 2018 18:51:35 +0200 Subject: maps: Finish map.m() (nw) --- src/devices/cpu/alto2/alto2cpu.cpp | 103 +++++++++-------- src/devices/machine/6522via.cpp | 7 +- src/devices/machine/atmel_arm_aic.cpp | 41 +++---- src/devices/machine/cs8221.cpp | 9 +- src/devices/machine/genpc.cpp | 32 +++--- src/devices/machine/i80130.cpp | 12 +- src/devices/machine/i8271.cpp | 11 +- src/devices/machine/k054321.cpp | 34 +++--- src/devices/machine/mb8795.cpp | 23 ++-- src/devices/machine/mos6530n.cpp | 87 +++++++------- src/devices/machine/ncr5390.cpp | 27 ++--- src/devices/machine/pc_fdc.cpp | 15 +-- src/devices/machine/sega_scu.cpp | 35 +++--- src/devices/machine/tms5501.cpp | 25 ++-- src/devices/machine/upd765.cpp | 118 ++++++++++--------- src/devices/sound/cdp1869.cpp | 14 ++- src/devices/sound/dave.cpp | 14 ++- src/devices/video/huc6271.cpp | 17 +-- src/devices/video/imagetek_i4100.cpp | 207 +++++++++++++++++----------------- src/devices/video/jangou_blitter.cpp | 38 ++++--- src/devices/video/msm6255.cpp | 9 +- src/mame/machine/315-5881_crypt.cpp | 32 +++--- src/mame/machine/abc1600mac.cpp | 7 +- src/mame/machine/at.cpp | 25 ++-- src/mame/machine/awboard.cpp | 19 ++-- src/mame/machine/cammu.cpp | 34 +++--- src/mame/machine/deco_irq.cpp | 13 ++- src/mame/machine/interpro_arbga.cpp | 60 +++++----- src/mame/machine/interpro_ioga.cpp | 59 +++++----- src/mame/machine/interpro_mcga.cpp | 46 ++++---- src/mame/machine/interpro_sga.cpp | 91 +++++++-------- src/mame/machine/isbc_208.cpp | 11 +- src/mame/machine/k573dio.cpp | 65 +++++------ src/mame/machine/m3comm.cpp | 11 +- src/mame/machine/maple-dc.cpp | 17 +-- src/mame/machine/namco_c139.cpp | 9 +- src/mame/machine/namco_c148.cpp | 39 +++---- src/mame/machine/naomibd.cpp | 25 ++-- src/mame/machine/naomig1.cpp | 41 +++---- src/mame/machine/nextkbd.cpp | 17 +-- src/mame/machine/nextmo.cpp | 23 ++-- src/mame/machine/prof80mmu.cpp | 7 +- src/mame/machine/wpc_shift.cpp | 13 ++- 43 files changed, 805 insertions(+), 737 deletions(-) diff --git a/src/devices/cpu/alto2/alto2cpu.cpp b/src/devices/cpu/alto2/alto2cpu.cpp index 07c836e72ee..9fd32090a07 100644 --- a/src/devices/cpu/alto2/alto2cpu.cpp +++ b/src/devices/cpu/alto2/alto2cpu.cpp @@ -61,62 +61,65 @@ alto2_log_t logprintf; // LIVE DEVICE //************************************************************************** -ADDRESS_MAP_START(alto2_cpu_device::ucode_map) - AM_RANGE(0, 4*ALTO2_UCODE_PAGE_SIZE - 1) AM_READWRITE( crom_cram_r, crom_cram_w ) -ADDRESS_MAP_END +void alto2_cpu_device::ucode_map(address_map &map) +{ + map(0, 4*ALTO2_UCODE_PAGE_SIZE - 1).rw(this, FUNC(alto2_cpu_device::crom_cram_r), FUNC(alto2_cpu_device::crom_cram_w)); +} -ADDRESS_MAP_START(alto2_cpu_device::const_map) - AM_RANGE(0, ALTO2_CONST_SIZE - 1) AM_READ ( const_r ) -ADDRESS_MAP_END +void alto2_cpu_device::const_map(address_map &map) +{ + map(0, ALTO2_CONST_SIZE - 1).r(this, FUNC(alto2_cpu_device::const_r)); +} -ADDRESS_MAP_START(alto2_cpu_device::iomem_map) - AM_RANGE(0, ALTO2_IO_PAGE_BASE - 1) AM_READWRITE( ioram_r, ioram_w ) +void alto2_cpu_device::iomem_map(address_map &map) +{ + map(0, ALTO2_IO_PAGE_BASE - 1).rw(this, FUNC(alto2_cpu_device::ioram_r), FUNC(alto2_cpu_device::ioram_w)); // page 0376 - AM_RANGE(0177000, 0177015) AM_READWRITE( noop_r, noop_w ) // UNUSED RANGE - AM_RANGE(0177016, 0177016) AM_READWRITE( utilout_r, utilout_w ) // UTILOUT register - AM_RANGE(0177017, 0177017) AM_READWRITE( noop_r, noop_w ) // unused range - AM_RANGE(0177020, 0177023) AM_READWRITE( xbus_r, xbus_w ) // XBUS[0-3] registers - AM_RANGE(0177024, 0177024) AM_READ ( mear_r ) // MEAR (memory error address register) - AM_RANGE(0177025, 0177025) AM_READWRITE( mesr_r, mesr_w ) // MESR (memory error status register) - AM_RANGE(0177026, 0177026) AM_READWRITE( mecr_r, mecr_w ) // MECR (memory error control register) - AM_RANGE(0177027, 0177027) AM_READWRITE( noop_r, noop_w ) // UNUSED RANGE - AM_RANGE(0177030, 0177033) AM_READ ( utilin_r ) // UTILIN register - AM_RANGE(0177034, 0177037) AM_READ ( kbd_ad_r ) // KBD_AD[0-3] matrix - AM_RANGE(0177040, 0177057) AM_READWRITE( bank_reg_r, bank_reg_w ) // BANK[0-17] registers (4 bit) - AM_RANGE(0177060, 0177077) AM_READWRITE( noop_r, noop_w ) // UNUSED RANGE - AM_RANGE(0177100, 0177101) AM_READWRITE( noop_r, noop_w ) // { Summagraphics tablet X, Y } - AM_RANGE(0177102, 0177137) AM_READWRITE( noop_r, noop_w ) // UNUSED RANGE - AM_RANGE(0177140, 0177157) AM_READWRITE( noop_r, noop_w ) // { Organ keyboard } - AM_RANGE(0177160, 0177177) AM_READWRITE( noop_r, noop_w ) // UNUSED RANGE - AM_RANGE(0177200, 0177204) AM_READWRITE( noop_r, noop_w ) // { PROM programmer } - AM_RANGE(0177205, 0177233) AM_READWRITE( noop_r, noop_w ) // UNUSED RANGE - AM_RANGE(0177234, 0177237) AM_READWRITE( noop_r, noop_w ) // { Experimental cursor control } - AM_RANGE(0177240, 0177257) AM_READWRITE( noop_r, noop_w ) // { Alto-II debugger } + map(0177000, 0177015).rw(this, FUNC(alto2_cpu_device::noop_r), FUNC(alto2_cpu_device::noop_w)); // UNUSED RANGE + map(0177016, 0177016).rw(this, FUNC(alto2_cpu_device::utilout_r), FUNC(alto2_cpu_device::utilout_w)); // UTILOUT register + map(0177017, 0177017).rw(this, FUNC(alto2_cpu_device::noop_r), FUNC(alto2_cpu_device::noop_w)); // unused range + map(0177020, 0177023).rw(this, FUNC(alto2_cpu_device::xbus_r), FUNC(alto2_cpu_device::xbus_w)); // XBUS[0-3] registers + map(0177024, 0177024).r(this, FUNC(alto2_cpu_device::mear_r)); // MEAR (memory error address register) + map(0177025, 0177025).rw(this, FUNC(alto2_cpu_device::mesr_r), FUNC(alto2_cpu_device::mesr_w)); // MESR (memory error status register) + map(0177026, 0177026).rw(this, FUNC(alto2_cpu_device::mecr_r), FUNC(alto2_cpu_device::mecr_w)); // MECR (memory error control register) + map(0177027, 0177027).rw(this, FUNC(alto2_cpu_device::noop_r), FUNC(alto2_cpu_device::noop_w)); // UNUSED RANGE + map(0177030, 0177033).r(this, FUNC(alto2_cpu_device::utilin_r)); // UTILIN register + map(0177034, 0177037).r(this, FUNC(alto2_cpu_device::kbd_ad_r)); // KBD_AD[0-3] matrix + map(0177040, 0177057).rw(this, FUNC(alto2_cpu_device::bank_reg_r), FUNC(alto2_cpu_device::bank_reg_w)); // BANK[0-17] registers (4 bit) + map(0177060, 0177077).rw(this, FUNC(alto2_cpu_device::noop_r), FUNC(alto2_cpu_device::noop_w)); // UNUSED RANGE + map(0177100, 0177101).rw(this, FUNC(alto2_cpu_device::noop_r), FUNC(alto2_cpu_device::noop_w)); // { Summagraphics tablet X, Y } + map(0177102, 0177137).rw(this, FUNC(alto2_cpu_device::noop_r), FUNC(alto2_cpu_device::noop_w)); // UNUSED RANGE + map(0177140, 0177157).rw(this, FUNC(alto2_cpu_device::noop_r), FUNC(alto2_cpu_device::noop_w)); // { Organ keyboard } + map(0177160, 0177177).rw(this, FUNC(alto2_cpu_device::noop_r), FUNC(alto2_cpu_device::noop_w)); // UNUSED RANGE + map(0177200, 0177204).rw(this, FUNC(alto2_cpu_device::noop_r), FUNC(alto2_cpu_device::noop_w)); // { PROM programmer } + map(0177205, 0177233).rw(this, FUNC(alto2_cpu_device::noop_r), FUNC(alto2_cpu_device::noop_w)); // UNUSED RANGE + map(0177234, 0177237).rw(this, FUNC(alto2_cpu_device::noop_r), FUNC(alto2_cpu_device::noop_w)); // { Experimental cursor control } + map(0177240, 0177257).rw(this, FUNC(alto2_cpu_device::noop_r), FUNC(alto2_cpu_device::noop_w)); // { Alto-II debugger } // AM_RANGE(0177244, 0177247) AM_READWRITE( noop_r, noop_w ) // { Graphics keyboard } - AM_RANGE(0177260, 0177377) AM_READWRITE( noop_r, noop_w ) // UNUSED RANGE + map(0177260, 0177377).rw(this, FUNC(alto2_cpu_device::noop_r), FUNC(alto2_cpu_device::noop_w)); // UNUSED RANGE // page 0377 // AM_RANGE(0177400, 0177405) AM_READWRITE( noop_r, noop_w ) // { Maxc2 maintenance interface } - AM_RANGE(0177400, 0177400) AM_READWRITE( noop_r, noop_w ) // { Alto DLS input } - AM_RANGE(0177401, 0177417) AM_READWRITE( noop_r, noop_w ) // UNUSED RANGE - AM_RANGE(0177420, 0177420) AM_READWRITE( noop_r, noop_w ) // { "" } - AM_RANGE(0177421, 0177437) AM_READWRITE( noop_r, noop_w ) // UNUSED RANGE - AM_RANGE(0177440, 0177440) AM_READWRITE( noop_r, noop_w ) // { "" } - AM_RANGE(0177441, 0177457) AM_READWRITE( noop_r, noop_w ) // UNUSED RANGE - AM_RANGE(0177460, 0177460) AM_READWRITE( noop_r, noop_w ) // { "" } - AM_RANGE(0177461, 0177577) AM_READWRITE( noop_r, noop_w ) // UNUSED RANGE - AM_RANGE(0177600, 0177677) AM_READWRITE( noop_r, noop_w ) // { Alto DLS output } - AM_RANGE(0177700, 0177700) AM_READWRITE( noop_r, noop_w ) // { EIA interface output bit } - AM_RANGE(0177701, 0177701) AM_READWRITE( noop_r, noop_w ) // { EIA interface input bit } - AM_RANGE(0177702, 0177717) AM_READWRITE( noop_r, noop_w ) // UNUSED RANGE - AM_RANGE(0177720, 0177737) AM_READWRITE( noop_r, noop_w ) // { TV camera interface } - AM_RANGE(0177740, 0177763) AM_READWRITE( noop_r, noop_w ) // UNUSED RANGE - AM_RANGE(0177764, 0177773) AM_READWRITE( noop_r, noop_w ) // { Redactron tape drive } - AM_RANGE(0177774, 0177775) AM_READWRITE( noop_r, noop_w ) // UNUSED RANGE - AM_RANGE(0177776, 0177776) AM_READWRITE( noop_r, noop_w ) // { Digital-Analog Converter, Joystick } - AM_RANGE(0177777, 0177777) AM_READWRITE( noop_r, noop_w ) // { Digital-Analog Converter, Joystick } - - AM_RANGE(0200000, 0377777) AM_READWRITE( ioram_r, ioram_w ) -ADDRESS_MAP_END + map(0177400, 0177400).rw(this, FUNC(alto2_cpu_device::noop_r), FUNC(alto2_cpu_device::noop_w)); // { Alto DLS input } + map(0177401, 0177417).rw(this, FUNC(alto2_cpu_device::noop_r), FUNC(alto2_cpu_device::noop_w)); // UNUSED RANGE + map(0177420, 0177420).rw(this, FUNC(alto2_cpu_device::noop_r), FUNC(alto2_cpu_device::noop_w)); // { "" } + map(0177421, 0177437).rw(this, FUNC(alto2_cpu_device::noop_r), FUNC(alto2_cpu_device::noop_w)); // UNUSED RANGE + map(0177440, 0177440).rw(this, FUNC(alto2_cpu_device::noop_r), FUNC(alto2_cpu_device::noop_w)); // { "" } + map(0177441, 0177457).rw(this, FUNC(alto2_cpu_device::noop_r), FUNC(alto2_cpu_device::noop_w)); // UNUSED RANGE + map(0177460, 0177460).rw(this, FUNC(alto2_cpu_device::noop_r), FUNC(alto2_cpu_device::noop_w)); // { "" } + map(0177461, 0177577).rw(this, FUNC(alto2_cpu_device::noop_r), FUNC(alto2_cpu_device::noop_w)); // UNUSED RANGE + map(0177600, 0177677).rw(this, FUNC(alto2_cpu_device::noop_r), FUNC(alto2_cpu_device::noop_w)); // { Alto DLS output } + map(0177700, 0177700).rw(this, FUNC(alto2_cpu_device::noop_r), FUNC(alto2_cpu_device::noop_w)); // { EIA interface output bit } + map(0177701, 0177701).rw(this, FUNC(alto2_cpu_device::noop_r), FUNC(alto2_cpu_device::noop_w)); // { EIA interface input bit } + map(0177702, 0177717).rw(this, FUNC(alto2_cpu_device::noop_r), FUNC(alto2_cpu_device::noop_w)); // UNUSED RANGE + map(0177720, 0177737).rw(this, FUNC(alto2_cpu_device::noop_r), FUNC(alto2_cpu_device::noop_w)); // { TV camera interface } + map(0177740, 0177763).rw(this, FUNC(alto2_cpu_device::noop_r), FUNC(alto2_cpu_device::noop_w)); // UNUSED RANGE + map(0177764, 0177773).rw(this, FUNC(alto2_cpu_device::noop_r), FUNC(alto2_cpu_device::noop_w)); // { Redactron tape drive } + map(0177774, 0177775).rw(this, FUNC(alto2_cpu_device::noop_r), FUNC(alto2_cpu_device::noop_w)); // UNUSED RANGE + map(0177776, 0177776).rw(this, FUNC(alto2_cpu_device::noop_r), FUNC(alto2_cpu_device::noop_w)); // { Digital-Analog Converter, Joystick } + map(0177777, 0177777).rw(this, FUNC(alto2_cpu_device::noop_r), FUNC(alto2_cpu_device::noop_w)); // { Digital-Analog Converter, Joystick } + + map(0200000, 0377777).rw(this, FUNC(alto2_cpu_device::ioram_r), FUNC(alto2_cpu_device::ioram_w)); +} //------------------------------------------------- // alto2_cpu_device - constructor diff --git a/src/devices/machine/6522via.cpp b/src/devices/machine/6522via.cpp index 93f1f056b3f..28b322850ad 100644 --- a/src/devices/machine/6522via.cpp +++ b/src/devices/machine/6522via.cpp @@ -147,9 +147,10 @@ uint16_t via6522_device::get_counter1_value() // device type definition DEFINE_DEVICE_TYPE(VIA6522, via6522_device, "via6522", "6522 VIA") -ADDRESS_MAP_START(via6522_device::map) - AM_RANGE(0x00, 0x0f) AM_READWRITE(read, write) -ADDRESS_MAP_END +void via6522_device::map(address_map &map) +{ + map(0x00, 0x0f).rw(this, FUNC(via6522_device::read), FUNC(via6522_device::write)); +} //------------------------------------------------- // via6522_device - constructor diff --git a/src/devices/machine/atmel_arm_aic.cpp b/src/devices/machine/atmel_arm_aic.cpp index de18da3b132..d7e666c10ed 100644 --- a/src/devices/machine/atmel_arm_aic.cpp +++ b/src/devices/machine/atmel_arm_aic.cpp @@ -20,26 +20,27 @@ DEFINE_DEVICE_TYPE(ARM_AIC, arm_aic_device, "arm_aic", "ARM Advanced Interrupt Controller") -ADDRESS_MAP_START(arm_aic_device::regs_map) - AM_RANGE(0x000, 0x07f) AM_READWRITE(aic_smr_r, aic_smr_w) // AIC_SMR[32] (AIC_SMR) Source Mode Register - AM_RANGE(0x080, 0x0ff) AM_READWRITE(aic_svr_r, aic_svr_w) // AIC_SVR[32] (AIC_SVR) Source Vector Register - AM_RANGE(0x100, 0x103) AM_READ(irq_vector_r) // AIC_IVR IRQ Vector Register - AM_RANGE(0x104, 0x107) AM_READ(firq_vector_r) // AIC_FVR FIQ Vector Register - AM_RANGE(0x108, 0x10b) AM_READ(aic_isr_r) // AIC_ISR Interrupt Status Register - AM_RANGE(0x10c, 0x10f) AM_READ(aic_ipr_r) // AIC_IPR Interrupt Pending Register - AM_RANGE(0x110, 0x113) AM_READ(aic_imr_r) // AIC_IMR Interrupt Mask Register - AM_RANGE(0x114, 0x117) AM_READ(aic_cisr_r) // AIC_CISR Core Interrupt Status Register - AM_RANGE(0x120, 0x123) AM_WRITE(aic_iecr_w) // AIC_IECR Interrupt Enable Command Register - AM_RANGE(0x124, 0x127) AM_WRITE(aic_idcr_w) // AIC_IDCR Interrupt Disable Command Register - AM_RANGE(0x128, 0x12b) AM_WRITE(aic_iccr_w) // AIC_ICCR Interrupt Clear Command Register - AM_RANGE(0x12c, 0x12f) AM_WRITE(aic_iscr_w) // AIC_ISCR Interrupt Set Command Register - AM_RANGE(0x130, 0x133) AM_WRITE(aic_eoicr_w) // AIC_EOICR End of Interrupt Command Register - AM_RANGE(0x134, 0x137) AM_WRITE(aic_spu_w) // AIC_SPU Spurious Vector Register - AM_RANGE(0x138, 0x13b) AM_WRITE(aic_dcr_w) // AIC_DCR Debug Control Register (Protect) - AM_RANGE(0x140, 0x143) AM_WRITE(aic_ffer_w) // AIC_FFER Fast Forcing Enable Register - AM_RANGE(0x144, 0x147) AM_WRITE(aic_ffdr_w) // AIC_FFDR Fast Forcing Disable Register - AM_RANGE(0x148, 0x14b) AM_READ(aic_ffsr_r) // AIC_FFSR Fast Forcing Status Register -ADDRESS_MAP_END +void arm_aic_device::regs_map(address_map &map) +{ + map(0x000, 0x07f).rw(this, FUNC(arm_aic_device::aic_smr_r), FUNC(arm_aic_device::aic_smr_w)); // AIC_SMR[32] (AIC_SMR) Source Mode Register + map(0x080, 0x0ff).rw(this, FUNC(arm_aic_device::aic_svr_r), FUNC(arm_aic_device::aic_svr_w)); // AIC_SVR[32] (AIC_SVR) Source Vector Register + map(0x100, 0x103).r(this, FUNC(arm_aic_device::irq_vector_r)); // AIC_IVR IRQ Vector Register + map(0x104, 0x107).r(this, FUNC(arm_aic_device::firq_vector_r)); // AIC_FVR FIQ Vector Register + map(0x108, 0x10b).r(this, FUNC(arm_aic_device::aic_isr_r)); // AIC_ISR Interrupt Status Register + map(0x10c, 0x10f).r(this, FUNC(arm_aic_device::aic_ipr_r)); // AIC_IPR Interrupt Pending Register + map(0x110, 0x113).r(this, FUNC(arm_aic_device::aic_imr_r)); // AIC_IMR Interrupt Mask Register + map(0x114, 0x117).r(this, FUNC(arm_aic_device::aic_cisr_r)); // AIC_CISR Core Interrupt Status Register + map(0x120, 0x123).w(this, FUNC(arm_aic_device::aic_iecr_w)); // AIC_IECR Interrupt Enable Command Register + map(0x124, 0x127).w(this, FUNC(arm_aic_device::aic_idcr_w)); // AIC_IDCR Interrupt Disable Command Register + map(0x128, 0x12b).w(this, FUNC(arm_aic_device::aic_iccr_w)); // AIC_ICCR Interrupt Clear Command Register + map(0x12c, 0x12f).w(this, FUNC(arm_aic_device::aic_iscr_w)); // AIC_ISCR Interrupt Set Command Register + map(0x130, 0x133).w(this, FUNC(arm_aic_device::aic_eoicr_w)); // AIC_EOICR End of Interrupt Command Register + map(0x134, 0x137).w(this, FUNC(arm_aic_device::aic_spu_w)); // AIC_SPU Spurious Vector Register + map(0x138, 0x13b).w(this, FUNC(arm_aic_device::aic_dcr_w)); // AIC_DCR Debug Control Register (Protect) + map(0x140, 0x143).w(this, FUNC(arm_aic_device::aic_ffer_w)); // AIC_FFER Fast Forcing Enable Register + map(0x144, 0x147).w(this, FUNC(arm_aic_device::aic_ffdr_w)); // AIC_FFDR Fast Forcing Disable Register + map(0x148, 0x14b).r(this, FUNC(arm_aic_device::aic_ffsr_r)); // AIC_FFSR Fast Forcing Status Register +} READ32_MEMBER(arm_aic_device::irq_vector_r) { diff --git a/src/devices/machine/cs8221.cpp b/src/devices/machine/cs8221.cpp index 6e6cfb44545..9177a758340 100644 --- a/src/devices/machine/cs8221.cpp +++ b/src/devices/machine/cs8221.cpp @@ -90,10 +90,11 @@ void cs8221_device::device_reset() //************************************************************************** // READ/WRITE HANDLERS //************************************************************************** -ADDRESS_MAP_START(cs8221_device::map) - AM_RANGE(0x0022, 0x0023) AM_DEVWRITE8("cs8221", cs8221_device, address_w, 0x00ff) - AM_RANGE(0x0022, 0x0023) AM_DEVREADWRITE8("cs8221", cs8221_device, data_r, data_w, 0xff00) -ADDRESS_MAP_END +void cs8221_device::map(address_map &map) +{ + map(0x0022, 0x0022).w("cs8221", FUNC(cs8221_device::address_w)); + map(0x0023, 0x0023).rw("cs8221", FUNC(cs8221_device::data_r), FUNC(cs8221_device::data_w)); +} WRITE8_MEMBER( cs8221_device::address_w ) { diff --git a/src/devices/machine/genpc.cpp b/src/devices/machine/genpc.cpp index 65a25896392..132656b287e 100644 --- a/src/devices/machine/genpc.cpp +++ b/src/devices/machine/genpc.cpp @@ -528,14 +528,15 @@ ibm5160_mb_device::ibm5160_mb_device( { } -ADDRESS_MAP_START(ibm5160_mb_device::map) - AM_RANGE(0x0000, 0x000f) AM_DEVREADWRITE("dma8237", am9517a_device, read, write) - AM_RANGE(0x0020, 0x002f) AM_DEVREADWRITE("pic8259", pic8259_device, read, write) - AM_RANGE(0x0040, 0x004f) AM_DEVREADWRITE("pit8253", pit8253_device, read, write) - AM_RANGE(0x0060, 0x006f) AM_DEVREADWRITE("ppi8255", i8255_device, read, write) - AM_RANGE(0x0080, 0x008f) AM_WRITE(pc_page_w) - AM_RANGE(0x00a0, 0x00a1) AM_WRITE(nmi_enable_w) -ADDRESS_MAP_END +void ibm5160_mb_device::map(address_map &map) +{ + map(0x0000, 0x000f).rw("dma8237", FUNC(am9517a_device::read), FUNC(am9517a_device::write)); + map(0x0020, 0x002f).rw("pic8259", FUNC(pic8259_device::read), FUNC(pic8259_device::write)); + map(0x0040, 0x004f).rw("pit8253", FUNC(pit8253_device::read), FUNC(pit8253_device::write)); + map(0x0060, 0x006f).rw("ppi8255", FUNC(i8255_device::read), FUNC(i8255_device::write)); + map(0x0080, 0x008f).w(this, FUNC(ibm5160_mb_device::pc_page_w)); + map(0x00a0, 0x00a1).w(this, FUNC(ibm5160_mb_device::nmi_enable_w)); +} //------------------------------------------------- // device_start - device-specific startup @@ -910,12 +911,13 @@ ioport_constructor pc_noppi_mb_device::device_input_ports() const return INPUT_PORTS_NAME( pc_noppi_mb ); } -ADDRESS_MAP_START(pc_noppi_mb_device::map) - AM_RANGE(0x0000, 0x000f) AM_DEVREADWRITE("dma8237", am9517a_device, read, write) - AM_RANGE(0x0020, 0x002f) AM_DEVREADWRITE("pic8259", pic8259_device, read, write) - AM_RANGE(0x0040, 0x004f) AM_DEVREADWRITE("pit8253", pit8253_device, read, write) - AM_RANGE(0x0080, 0x008f) AM_WRITE(pc_page_w) - AM_RANGE(0x00a0, 0x00a1) AM_WRITE(nmi_enable_w) -ADDRESS_MAP_END +void pc_noppi_mb_device::map(address_map &map) +{ + map(0x0000, 0x000f).rw("dma8237", FUNC(am9517a_device::read), FUNC(am9517a_device::write)); + map(0x0020, 0x002f).rw("pic8259", FUNC(pic8259_device::read), FUNC(pic8259_device::write)); + map(0x0040, 0x004f).rw("pit8253", FUNC(pit8253_device::read), FUNC(pit8253_device::write)); + map(0x0080, 0x008f).w(this, FUNC(pc_noppi_mb_device::pc_page_w)); + map(0x00a0, 0x00a1).w(this, FUNC(pc_noppi_mb_device::nmi_enable_w)); +} DEFINE_DEVICE_TYPE(PCNOPPI_MOTHERBOARD, pc_noppi_mb_device, "pcnoppi_mb", "PCNOPPI_MOTHERBOARD") diff --git a/src/devices/machine/i80130.cpp b/src/devices/machine/i80130.cpp index a74aa577482..880c2c2d50c 100644 --- a/src/devices/machine/i80130.cpp +++ b/src/devices/machine/i80130.cpp @@ -19,15 +19,17 @@ DEFINE_DEVICE_TYPE(I80130, i80130_device, "i80130", "I80130") -ADDRESS_MAP_START(i80130_device::rom_map) +void i80130_device::rom_map(address_map &map) +{ //AM_RANGE(0x0000, 0x3fff) AM_ROM AM_REGION("rom", 0) -ADDRESS_MAP_END +} -ADDRESS_MAP_START(i80130_device::io_map) - AM_RANGE(0x00, 0x0f) AM_READWRITE(io_r, io_w) +void i80130_device::io_map(address_map &map) +{ + map(0x00, 0x0f).rw(this, FUNC(i80130_device::io_r), FUNC(i80130_device::io_w)); //AM_RANGE(0x00, 0x01) AM_MIRROR(0x2) AM_DEVREADWRITE8("pic", pic8259_device, read, write, 0x00ff) //AM_RANGE(0x08, 0x0f) AM_DEVREADWRITE8("pit", pit8254_device, read, write, 0x00ff) -ADDRESS_MAP_END +} READ16_MEMBER( i80130_device::io_r ) { diff --git a/src/devices/machine/i8271.cpp b/src/devices/machine/i8271.cpp index 45902ee0f9d..eac2f47c0de 100644 --- a/src/devices/machine/i8271.cpp +++ b/src/devices/machine/i8271.cpp @@ -18,11 +18,12 @@ i8271_device::i8271_device(const machine_config &mconfig, const char *tag, devic external_ready = false; } -ADDRESS_MAP_START(i8271_device::map) - AM_RANGE(0x0, 0x0) AM_READWRITE(sr_r, cmd_w) - AM_RANGE(0x1, 0x1) AM_READWRITE(rr_r, param_w) - AM_RANGE(0x2, 0x2) AM_WRITE(reset_w) -ADDRESS_MAP_END +void i8271_device::map(address_map &map) +{ + map(0x0, 0x0).rw(this, FUNC(i8271_device::sr_r), FUNC(i8271_device::cmd_w)); + map(0x1, 0x1).rw(this, FUNC(i8271_device::rr_r), FUNC(i8271_device::param_w)); + map(0x2, 0x2).w(this, FUNC(i8271_device::reset_w)); +} void i8271_device::set_ready_line_connected(bool _ready) { diff --git a/src/devices/machine/k054321.cpp b/src/devices/machine/k054321.cpp index 82da72097e2..12c9e23fe07 100644 --- a/src/devices/machine/k054321.cpp +++ b/src/devices/machine/k054321.cpp @@ -37,22 +37,24 @@ DEFINE_DEVICE_TYPE(K054321, k054321_device, "k054321", "K054321 Maincpu-Soundcpu interface") -ADDRESS_MAP_START(k054321_device::main_map) - AM_RANGE(0x0, 0x0) AM_WRITE(active_w) - AM_RANGE(0x2, 0x2) AM_WRITE(volume_reset_w) - AM_RANGE(0x3, 0x3) AM_WRITE(volume_up_w) - AM_RANGE(0x4, 0x4) AM_WRITE(dummy_w) - AM_RANGE(0x6, 0x6) AM_WRITE(main1_w) - AM_RANGE(0x7, 0x7) AM_WRITE(main2_w) - AM_RANGE(0x8, 0x8) AM_READ(busy_r) - AM_RANGE(0xa, 0xa) AM_READ(sound1_r) -ADDRESS_MAP_END - -ADDRESS_MAP_START(k054321_device::sound_map) - AM_RANGE(0x0, 0x0) AM_WRITE(sound1_w) - AM_RANGE(0x2, 0x2) AM_READ(main1_r) - AM_RANGE(0x3, 0x3) AM_READ(main2_r) -ADDRESS_MAP_END +void k054321_device::main_map(address_map &map) +{ + map(0x0, 0x0).w(this, FUNC(k054321_device::active_w)); + map(0x2, 0x2).w(this, FUNC(k054321_device::volume_reset_w)); + map(0x3, 0x3).w(this, FUNC(k054321_device::volume_up_w)); + map(0x4, 0x4).w(this, FUNC(k054321_device::dummy_w)); + map(0x6, 0x6).w(this, FUNC(k054321_device::main1_w)); + map(0x7, 0x7).w(this, FUNC(k054321_device::main2_w)); + map(0x8, 0x8).r(this, FUNC(k054321_device::busy_r)); + map(0xa, 0xa).r(this, FUNC(k054321_device::sound1_r)); +} + +void k054321_device::sound_map(address_map &map) +{ + map(0x0, 0x0).w(this, FUNC(k054321_device::sound1_w)); + map(0x2, 0x2).r(this, FUNC(k054321_device::main1_r)); + map(0x3, 0x3).r(this, FUNC(k054321_device::main2_r)); +} k054321_device::k054321_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, K054321, tag, owner, clock), diff --git a/src/devices/machine/mb8795.cpp b/src/devices/machine/mb8795.cpp index c0cfb7157a5..b3b817c3cab 100644 --- a/src/devices/machine/mb8795.cpp +++ b/src/devices/machine/mb8795.cpp @@ -6,17 +6,18 @@ DEFINE_DEVICE_TYPE(MB8795, mb8795_device, "mb8795", "Fujitsu MB8795") -ADDRESS_MAP_START(mb8795_device::map) - AM_RANGE(0x0, 0x0) AM_READWRITE(txstat_r, txstat_w) - AM_RANGE(0x1, 0x1) AM_READWRITE(txmask_r, txmask_w) - AM_RANGE(0x2, 0x2) AM_READWRITE(rxstat_r, rxstat_w) - AM_RANGE(0x3, 0x3) AM_READWRITE(rxmask_r, rxmask_w) - AM_RANGE(0x4, 0x4) AM_READWRITE(txmode_r, txmode_w) - AM_RANGE(0x5, 0x5) AM_READWRITE(rxmode_r, rxmode_w) - AM_RANGE(0x6, 0x6) AM_WRITE(reset_w) - AM_RANGE(0x7, 0x7) AM_READ(tdc_lsb_r) - AM_RANGE(0x8, 0xf) AM_READWRITE(mac_r, mac_w) // Mapping limitation, real is up to 0xd -ADDRESS_MAP_END +void mb8795_device::map(address_map &map) +{ + map(0x0, 0x0).rw(this, FUNC(mb8795_device::txstat_r), FUNC(mb8795_device::txstat_w)); + map(0x1, 0x1).rw(this, FUNC(mb8795_device::txmask_r), FUNC(mb8795_device::txmask_w)); + map(0x2, 0x2).rw(this, FUNC(mb8795_device::rxstat_r), FUNC(mb8795_device::rxstat_w)); + map(0x3, 0x3).rw(this, FUNC(mb8795_device::rxmask_r), FUNC(mb8795_device::rxmask_w)); + map(0x4, 0x4).rw(this, FUNC(mb8795_device::txmode_r), FUNC(mb8795_device::txmode_w)); + map(0x5, 0x5).rw(this, FUNC(mb8795_device::rxmode_r), FUNC(mb8795_device::rxmode_w)); + map(0x6, 0x6).w(this, FUNC(mb8795_device::reset_w)); + map(0x7, 0x7).r(this, FUNC(mb8795_device::tdc_lsb_r)); + map(0x8, 0xf).rw(this, FUNC(mb8795_device::mac_r), FUNC(mb8795_device::mac_w)); // Mapping limitation, real is up to 0xd +} mb8795_device::mb8795_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, MB8795, tag, owner, clock), diff --git a/src/devices/machine/mos6530n.cpp b/src/devices/machine/mos6530n.cpp index 834d9513db4..8e42eb35428 100644 --- a/src/devices/machine/mos6530n.cpp +++ b/src/devices/machine/mos6530n.cpp @@ -28,47 +28,52 @@ DEFINE_DEVICE_TYPE(MOS6530_NEW, mos6530_new_device, "mos6530_new", "MOS 6530 (ne DEFINE_DEVICE_TYPE(MOS6532_NEW, mos6532_new_device, "mos6532_new", "MOS 6532 (new)") -ADDRESS_MAP_START(mos6530_new_device::rom_map) - ADDRESS_MAP_GLOBAL_MASK(0x3ff) - AM_RANGE(0x000, 0x3ff) AM_READ(rom_r) -ADDRESS_MAP_END - -ADDRESS_MAP_START(mos6530_new_device::ram_map) - ADDRESS_MAP_GLOBAL_MASK(0x3f) - AM_RANGE(0x00, 0x3f) AM_READWRITE(ram_r, ram_w) -ADDRESS_MAP_END - -ADDRESS_MAP_START(mos6530_new_device::io_map) - ADDRESS_MAP_GLOBAL_MASK(0xf) - AM_RANGE(0x00, 0x00) AM_MIRROR(0x8) AM_READWRITE(pa_data_r, pa_data_w) - AM_RANGE(0x01, 0x01) AM_MIRROR(0x8) AM_READWRITE(pa_ddr_r, pa_ddr_w) - AM_RANGE(0x02, 0x02) AM_MIRROR(0x8) AM_READWRITE(pb_data_r, pb_data_w) - AM_RANGE(0x03, 0x03) AM_MIRROR(0x8) AM_READWRITE(pb_ddr_r, pb_ddr_w) - AM_RANGE(0x04, 0x07) AM_WRITE(timer_off_w) - AM_RANGE(0x0c, 0x0f) AM_WRITE(timer_on_w) - AM_RANGE(0x04, 0x04) AM_MIRROR(0x2) AM_READ(timer_off_r) - AM_RANGE(0x0c, 0x0c) AM_MIRROR(0x2) AM_READ(timer_on_r) - AM_RANGE(0x05, 0x05) AM_MIRROR(0xa) AM_READ(irq_r) -ADDRESS_MAP_END - -ADDRESS_MAP_START(mos6532_new_device::ram_map) - ADDRESS_MAP_GLOBAL_MASK(0x7f) - AM_RANGE(0x00, 0x7f) AM_READWRITE(ram_r, ram_w) -ADDRESS_MAP_END - -ADDRESS_MAP_START(mos6532_new_device::io_map) - ADDRESS_MAP_GLOBAL_MASK(0x1f) - AM_RANGE(0x00, 0x00) AM_MIRROR(0x18) AM_READWRITE(pa_data_r, pa_data_w) // SWCHA - AM_RANGE(0x01, 0x01) AM_MIRROR(0x18) AM_READWRITE(pa_ddr_r, pa_ddr_w) // SWACNT - AM_RANGE(0x02, 0x02) AM_MIRROR(0x18) AM_READWRITE(pb_data_r, pb_data_w) // SWCHB - AM_RANGE(0x03, 0x03) AM_MIRROR(0x18) AM_READWRITE(pb_ddr_r, pb_ddr_w) // SWBCNT - AM_RANGE(0x14, 0x17) AM_WRITE(timer_off_w) - AM_RANGE(0x1c, 0x1f) AM_WRITE(timer_on_w) - AM_RANGE(0x04, 0x04) AM_MIRROR(0x12) AM_READ(timer_off_r) - AM_RANGE(0x0c, 0x0c) AM_MIRROR(0x12) AM_READ(timer_on_r) - AM_RANGE(0x05, 0x05) AM_MIRROR(0x1a) AM_READ(irq_r) - AM_RANGE(0x04, 0x07) AM_MIRROR(0x8) AM_WRITE(edge_w) -ADDRESS_MAP_END +void mos6530_new_device::rom_map(address_map &map) +{ + map.global_mask(0x3ff); + map(0x000, 0x3ff).r(this, FUNC(mos6530_new_device::rom_r)); +} + +void mos6530_new_device::ram_map(address_map &map) +{ + map.global_mask(0x3f); + map(0x00, 0x3f).rw(this, FUNC(mos6530_new_device::ram_r), FUNC(mos6530_new_device::ram_w)); +} + +void mos6530_new_device::io_map(address_map &map) +{ + map.global_mask(0xf); + map(0x00, 0x00).mirror(0x8).rw(this, FUNC(mos6530_new_device::pa_data_r), FUNC(mos6530_new_device::pa_data_w)); + map(0x01, 0x01).mirror(0x8).rw(this, FUNC(mos6530_new_device::pa_ddr_r), FUNC(mos6530_new_device::pa_ddr_w)); + map(0x02, 0x02).mirror(0x8).rw(this, FUNC(mos6530_new_device::pb_data_r), FUNC(mos6530_new_device::pb_data_w)); + map(0x03, 0x03).mirror(0x8).rw(this, FUNC(mos6530_new_device::pb_ddr_r), FUNC(mos6530_new_device::pb_ddr_w)); + map(0x04, 0x07).w(this, FUNC(mos6530_new_device::timer_off_w)); + map(0x0c, 0x0f).w(this, FUNC(mos6530_new_device::timer_on_w)); + map(0x04, 0x04).mirror(0x2).r(this, FUNC(mos6530_new_device::timer_off_r)); + map(0x0c, 0x0c).mirror(0x2).r(this, FUNC(mos6530_new_device::timer_on_r)); + map(0x05, 0x05).mirror(0xa).r(this, FUNC(mos6530_new_device::irq_r)); +} + +void mos6532_new_device::ram_map(address_map &map) +{ + map.global_mask(0x7f); + map(0x00, 0x7f).rw(this, FUNC(mos6532_new_device::ram_r), FUNC(mos6532_new_device::ram_w)); +} + +void mos6532_new_device::io_map(address_map &map) +{ + map.global_mask(0x1f); + map(0x00, 0x00).mirror(0x18).rw(this, FUNC(mos6532_new_device::pa_data_r), FUNC(mos6532_new_device::pa_data_w)); // SWCHA + map(0x01, 0x01).mirror(0x18).rw(this, FUNC(mos6532_new_device::pa_ddr_r), FUNC(mos6532_new_device::pa_ddr_w)); // SWACNT + map(0x02, 0x02).mirror(0x18).rw(this, FUNC(mos6532_new_device::pb_data_r), FUNC(mos6532_new_device::pb_data_w)); // SWCHB + map(0x03, 0x03).mirror(0x18).rw(this, FUNC(mos6532_new_device::pb_ddr_r), FUNC(mos6532_new_device::pb_ddr_w)); // SWBCNT + map(0x14, 0x17).w(this, FUNC(mos6532_new_device::timer_off_w)); + map(0x1c, 0x1f).w(this, FUNC(mos6532_new_device::timer_on_w)); + map(0x04, 0x04).mirror(0x12).r(this, FUNC(mos6532_new_device::timer_off_r)); + map(0x0c, 0x0c).mirror(0x12).r(this, FUNC(mos6532_new_device::timer_on_r)); + map(0x05, 0x05).mirror(0x1a).r(this, FUNC(mos6532_new_device::irq_r)); + map(0x04, 0x07).mirror(0x8).w(this, FUNC(mos6532_new_device::edge_w)); +} READ8_MEMBER(mos6532_new_device::io_r) { diff --git a/src/devices/machine/ncr5390.cpp b/src/devices/machine/ncr5390.cpp index 576bb5e4ced..16c3e8071ec 100644 --- a/src/devices/machine/ncr5390.cpp +++ b/src/devices/machine/ncr5390.cpp @@ -10,19 +10,20 @@ DEFINE_DEVICE_TYPE(NCR5390, ncr5390_device, "ncr5390", "NCR 5390 SCSI") DEFINE_DEVICE_TYPE(NCR53C90A, ncr53c90a_device, "ncr53c90a", "NCR 53C90A SCSI") DEFINE_DEVICE_TYPE(NCR53C94, ncr53c94_device, "ncr53c94", "NCR 53C94 SCSI") -ADDRESS_MAP_START(ncr5390_device::map) - AM_RANGE(0x0, 0x0) AM_READWRITE(tcounter_lo_r, tcount_lo_w) - AM_RANGE(0x1, 0x1) AM_READWRITE(tcounter_hi_r, tcount_hi_w) - AM_RANGE(0x2, 0x2) AM_READWRITE(fifo_r, fifo_w) - AM_RANGE(0x3, 0x3) AM_READWRITE(command_r, command_w) - AM_RANGE(0x4, 0x4) AM_READWRITE(status_r, bus_id_w) - AM_RANGE(0x5, 0x5) AM_READWRITE(istatus_r, timeout_w) - AM_RANGE(0x6, 0x6) AM_READWRITE(seq_step_r, sync_period_w) - AM_RANGE(0x7, 0x7) AM_READWRITE(fifo_flags_r, sync_offset_w) - AM_RANGE(0x8, 0x8) AM_READWRITE(conf_r, conf_w) - AM_RANGE(0xa, 0xa) AM_WRITE(test_w) - AM_RANGE(0x9, 0x9) AM_WRITE(clock_w) -ADDRESS_MAP_END +void ncr5390_device::map(address_map &map) +{ + map(0x0, 0x0).rw(this, FUNC(ncr5390_device::tcounter_lo_r), FUNC(ncr5390_device::tcount_lo_w)); + map(0x1, 0x1).rw(this, FUNC(ncr5390_device::tcounter_hi_r), FUNC(ncr5390_device::tcount_hi_w)); + map(0x2, 0x2).rw(this, FUNC(ncr5390_device::fifo_r), FUNC(ncr5390_device::fifo_w)); + map(0x3, 0x3).rw(this, FUNC(ncr5390_device::command_r), FUNC(ncr5390_device::command_w)); + map(0x4, 0x4).rw(this, FUNC(ncr5390_device::status_r), FUNC(ncr5390_device::bus_id_w)); + map(0x5, 0x5).rw(this, FUNC(ncr5390_device::istatus_r), FUNC(ncr5390_device::timeout_w)); + map(0x6, 0x6).rw(this, FUNC(ncr5390_device::seq_step_r), FUNC(ncr5390_device::sync_period_w)); + map(0x7, 0x7).rw(this, FUNC(ncr5390_device::fifo_flags_r), FUNC(ncr5390_device::sync_offset_w)); + map(0x8, 0x8).rw(this, FUNC(ncr5390_device::conf_r), FUNC(ncr5390_device::conf_w)); + map(0xa, 0xa).w(this, FUNC(ncr5390_device::test_w)); + map(0x9, 0x9).w(this, FUNC(ncr5390_device::clock_w)); +} ADDRESS_MAP_START(ncr53c90a_device::map) AM_IMPORT_FROM(ncr5390_device::map) diff --git a/src/devices/machine/pc_fdc.cpp b/src/devices/machine/pc_fdc.cpp index f59d8af4bc3..cd3f6b41590 100644 --- a/src/devices/machine/pc_fdc.cpp +++ b/src/devices/machine/pc_fdc.cpp @@ -23,13 +23,14 @@ ADDRESS_MAP_START(pc_fdc_family_device::map) ADDRESS_MAP_END // The schematics show address decoding is minimal -ADDRESS_MAP_START(pc_fdc_xt_device::map) - AM_RANGE(0x0, 0x0) AM_DEVREAD("upd765", upd765a_device, msr_r) AM_WRITE(dor_w) - AM_RANGE(0x1, 0x1) AM_DEVREAD("upd765", upd765a_device, fifo_r) AM_WRITE(dor_fifo_w) - AM_RANGE(0x2, 0x2) AM_WRITE(dor_w) - AM_RANGE(0x3, 0x3) AM_WRITE(dor_w) - AM_RANGE(0x4, 0x5) AM_DEVICE("upd765", upd765a_device, map) -ADDRESS_MAP_END +void pc_fdc_xt_device::map(address_map &map) +{ + map(0x0, 0x0).r("upd765", FUNC(upd765a_device::msr_r)).w(this, FUNC(pc_fdc_xt_device::dor_w)); + map(0x1, 0x1).r("upd765", FUNC(upd765a_device::fifo_r)).w(this, FUNC(pc_fdc_xt_device::dor_fifo_w)); + map(0x2, 0x2).w(this, FUNC(pc_fdc_xt_device::dor_w)); + map(0x3, 0x3).w(this, FUNC(pc_fdc_xt_device::dor_w)); + map(0x4, 0x5).m("upd765", FUNC(upd765a_device::map)); +} // Decoding is through a PAL, so presumably complete diff --git a/src/devices/machine/sega_scu.cpp b/src/devices/machine/sega_scu.cpp index 37bad76416b..553469baa2a 100644 --- a/src/devices/machine/sega_scu.cpp +++ b/src/devices/machine/sega_scu.cpp @@ -116,29 +116,30 @@ DEFINE_DEVICE_TYPE(SEGA_SCU, sega_scu_device, "sega_scu", "Sega System Control U //AM_RANGE(0x0010, 0x0013) DMA enable //AM_RANGE(0x0014, 0x0017) DMA start factor -ADDRESS_MAP_START(sega_scu_device::regs_map) - AM_RANGE(0x0000, 0x0017) AM_READWRITE(dma_lv0_r,dma_lv0_w) - AM_RANGE(0x0020, 0x0037) AM_READWRITE(dma_lv1_r,dma_lv1_w) - AM_RANGE(0x0040, 0x0057) AM_READWRITE(dma_lv2_r,dma_lv2_w) +void sega_scu_device::regs_map(address_map &map) +{ + map(0x0000, 0x0017).rw(this, FUNC(sega_scu_device::dma_lv0_r), FUNC(sega_scu_device::dma_lv0_w)); + map(0x0020, 0x0037).rw(this, FUNC(sega_scu_device::dma_lv1_r), FUNC(sega_scu_device::dma_lv1_w)); + map(0x0040, 0x0057).rw(this, FUNC(sega_scu_device::dma_lv2_r), FUNC(sega_scu_device::dma_lv2_w)); // Super Major League and Shin Megami Tensei - Akuma Zensho reads from there (undocumented), DMA status mirror? - AM_RANGE(0x005c, 0x005f) AM_READ(dma_status_r) + map(0x005c, 0x005f).r(this, FUNC(sega_scu_device::dma_status_r)); // AM_RANGE(0x0060, 0x0063) AM_WRITE(dma_force_stop_w) - AM_RANGE(0x007c, 0x007f) AM_READ(dma_status_r) - AM_RANGE(0x0080, 0x0083) AM_DEVREADWRITE("scudsp",scudsp_cpu_device, program_control_r,program_control_w) - AM_RANGE(0x0084, 0x0087) AM_DEVWRITE("scudsp", scudsp_cpu_device, program_w) - AM_RANGE(0x0088, 0x008b) AM_DEVWRITE("scudsp", scudsp_cpu_device, ram_address_control_w) - AM_RANGE(0x008c, 0x008f) AM_DEVREADWRITE("scudsp", scudsp_cpu_device, ram_address_r, ram_address_w) - AM_RANGE(0x0090, 0x0093) AM_WRITE(t0_compare_w) - AM_RANGE(0x0094, 0x0097) AM_WRITE(t1_setdata_w) - AM_RANGE(0x0098, 0x009b) AM_WRITE16(t1_mode_w,0x0000ffff) - AM_RANGE(0x00a0, 0x00a3) AM_READWRITE(irq_mask_r,irq_mask_w) - AM_RANGE(0x00a4, 0x00a7) AM_READWRITE(irq_status_r,irq_status_w) + map(0x007c, 0x007f).r(this, FUNC(sega_scu_device::dma_status_r)); + map(0x0080, 0x0083).rw("scudsp", FUNC(scudsp_cpu_device::program_control_r), FUNC(scudsp_cpu_device::program_control_w)); + map(0x0084, 0x0087).w("scudsp", FUNC(scudsp_cpu_device::program_w)); + map(0x0088, 0x008b).w("scudsp", FUNC(scudsp_cpu_device::ram_address_control_w)); + map(0x008c, 0x008f).rw("scudsp", FUNC(scudsp_cpu_device::ram_address_r), FUNC(scudsp_cpu_device::ram_address_w)); + map(0x0090, 0x0093).w(this, FUNC(sega_scu_device::t0_compare_w)); + map(0x0094, 0x0097).w(this, FUNC(sega_scu_device::t1_setdata_w)); + map(0x009b, 0x009a).w(this, FUNC(sega_scu_device::t1_mode_w)); + map(0x00a0, 0x00a3).rw(this, FUNC(sega_scu_device::irq_mask_r), FUNC(sega_scu_device::irq_mask_w)); + map(0x00a4, 0x00a7).rw(this, FUNC(sega_scu_device::irq_status_r), FUNC(sega_scu_device::irq_status_w)); // AM_RANGE(0x00a8, 0x00ab) AM_WRITE(abus_irqack_w) // AM_RANGE(0x00b0, 0x00b7) AM_READWRITE(abus_set_r,abus_set_w) // AM_RANGE(0x00b8, 0x00bb) AM_READWRITE(abus_refresh_r,abus_refresh_w) // AM_RANGE(0x00c4, 0x00c7) AM_READWRITE(sdram_r,sdram_w) - AM_RANGE(0x00c8, 0x00cb) AM_READ(version_r) // returns 4 for stock Saturn -ADDRESS_MAP_END + map(0x00c8, 0x00cb).r(this, FUNC(sega_scu_device::version_r)); // returns 4 for stock Saturn +} //------------------------------------------------- // sega_scu_device - constructor diff --git a/src/devices/machine/tms5501.cpp b/src/devices/machine/tms5501.cpp index ed770be8cfb..22afb2fd6b7 100644 --- a/src/devices/machine/tms5501.cpp +++ b/src/devices/machine/tms5501.cpp @@ -31,18 +31,19 @@ DEFINE_DEVICE_TYPE(TMS5501, tms5501_device, "tms5501", "TMS5501 Multifunction I/ // I/O address map -ADDRESS_MAP_START(tms5501_device::io_map) - AM_RANGE(0x00, 0x00) AM_READ(rb_r) - AM_RANGE(0x01, 0x01) AM_READ(xi_r) - AM_RANGE(0x02, 0x02) AM_READ(rst_r) - AM_RANGE(0x03, 0x03) AM_READ(sta_r) - AM_RANGE(0x04, 0x04) AM_WRITE(cmd_w) - AM_RANGE(0x05, 0x05) AM_WRITE(rr_w) - AM_RANGE(0x06, 0x06) AM_WRITE(tb_w) - AM_RANGE(0x07, 0x07) AM_WRITE(xo_w) - AM_RANGE(0x08, 0x08) AM_WRITE(mr_w) - AM_RANGE(0x09, 0x0d) AM_WRITE(tmr_w) -ADDRESS_MAP_END +void tms5501_device::io_map(address_map &map) +{ + map(0x00, 0x00).r(this, FUNC(tms5501_device::rb_r)); + map(0x01, 0x01).r(this, FUNC(tms5501_device::xi_r)); + map(0x02, 0x02).r(this, FUNC(tms5501_device::rst_r)); + map(0x03, 0x03).r(this, FUNC(tms5501_device::sta_r)); + map(0x04, 0x04).w(this, FUNC(tms5501_device::cmd_w)); + map(0x05, 0x05).w(this, FUNC(tms5501_device::rr_w)); + map(0x06, 0x06).w(this, FUNC(tms5501_device::tb_w)); + map(0x07, 0x07).w(this, FUNC(tms5501_device::xo_w)); + map(0x08, 0x08).w(this, FUNC(tms5501_device::mr_w)); + map(0x09, 0x0d).w(this, FUNC(tms5501_device::tmr_w)); +} diff --git a/src/devices/machine/upd765.cpp b/src/devices/machine/upd765.cpp index 28ce1cd8126..d8ae17ecd31 100644 --- a/src/devices/machine/upd765.cpp +++ b/src/devices/machine/upd765.cpp @@ -22,78 +22,86 @@ DEFINE_DEVICE_TYPE(WD37C65C, wd37c65c_device, "wd37c65c", "Wes DEFINE_DEVICE_TYPE(MCS3201, mcs3201_device, "mcs3201", "Motorola MCS3201 FDC") DEFINE_DEVICE_TYPE(TC8566AF, tc8566af_device, "tc8566af", "Toshiba TC8566AF FDC") -ADDRESS_MAP_START(upd765a_device::map) - AM_RANGE(0x0, 0x0) AM_READ(msr_r) - AM_RANGE(0x1, 0x1) AM_READWRITE(fifo_r, fifo_w) -ADDRESS_MAP_END +void upd765a_device::map(address_map &map) +{ + map(0x0, 0x0).r(this, FUNC(upd765a_device::msr_r)); + map(0x1, 0x1).rw(this, FUNC(upd765a_device::fifo_r), FUNC(upd765a_device::fifo_w)); +} ADDRESS_MAP_START(upd765b_device::map) AM_RANGE(0x0, 0x0) AM_READ(msr_r) AM_RANGE(0x1, 0x1) AM_READWRITE(fifo_r, fifo_w) ADDRESS_MAP_END -ADDRESS_MAP_START(i8272a_device::map) - AM_RANGE(0x0, 0x0) AM_READ(msr_r) - AM_RANGE(0x1, 0x1) AM_READWRITE(fifo_r, fifo_w) -ADDRESS_MAP_END +void i8272a_device::map(address_map &map) +{ + map(0x0, 0x0).r(this, FUNC(i8272a_device::msr_r)); + map(0x1, 0x1).rw(this, FUNC(i8272a_device::fifo_r), FUNC(i8272a_device::fifo_w)); +} -ADDRESS_MAP_START(upd72065_device::map) - AM_RANGE(0x0, 0x0) AM_READ(msr_r) - AM_RANGE(0x1, 0x1) AM_READWRITE(fifo_r, fifo_w) -ADDRESS_MAP_END +void upd72065_device::map(address_map &map) +{ + map(0x0, 0x0).r(this, FUNC(upd72065_device::msr_r)); + map(0x1, 0x1).rw(this, FUNC(upd72065_device::fifo_r), FUNC(upd72065_device::fifo_w)); +} ADDRESS_MAP_START(i82072_device::map) AM_RANGE(0x0, 0x0) AM_READWRITE(msr_r, dsr_w) AM_RANGE(0x1, 0x1) AM_READWRITE(fifo_r, fifo_w) ADDRESS_MAP_END -ADDRESS_MAP_START(smc37c78_device::map) - AM_RANGE(0x2, 0x2) AM_READWRITE(dor_r, dor_w) - AM_RANGE(0x3, 0x3) AM_READWRITE(tdr_r, tdr_w) - AM_RANGE(0x4, 0x4) AM_READWRITE(msr_r, dsr_w) - AM_RANGE(0x5, 0x5) AM_READWRITE(fifo_r, fifo_w) - AM_RANGE(0x7, 0x7) AM_READWRITE(dir_r, ccr_w) -ADDRESS_MAP_END +void smc37c78_device::map(address_map &map) +{ + map(0x2, 0x2).rw(this, FUNC(smc37c78_device::dor_r), FUNC(smc37c78_device::dor_w)); + map(0x3, 0x3).rw(this, FUNC(smc37c78_device::tdr_r), FUNC(smc37c78_device::tdr_w)); + map(0x4, 0x4).rw(this, FUNC(smc37c78_device::msr_r), FUNC(smc37c78_device::dsr_w)); + map(0x5, 0x5).rw(this, FUNC(smc37c78_device::fifo_r), FUNC(smc37c78_device::fifo_w)); + map(0x7, 0x7).rw(this, FUNC(smc37c78_device::dir_r), FUNC(smc37c78_device::ccr_w)); +} -ADDRESS_MAP_START(n82077aa_device::map) - AM_RANGE(0x0, 0x0) AM_READ(sra_r) - AM_RANGE(0x1, 0x1) AM_READ(srb_r) - AM_RANGE(0x2, 0x2) AM_READWRITE(dor_r, dor_w) - AM_RANGE(0x3, 0x3) AM_READWRITE(tdr_r, tdr_w) - AM_RANGE(0x4, 0x4) AM_READWRITE(msr_r, dsr_w) - AM_RANGE(0x5, 0x5) AM_READWRITE(fifo_r, fifo_w) - AM_RANGE(0x7, 0x7) AM_READWRITE(dir_r, ccr_w) -ADDRESS_MAP_END +void n82077aa_device::map(address_map &map) +{ + map(0x0, 0x0).r(this, FUNC(n82077aa_device::sra_r)); + map(0x1, 0x1).r(this, FUNC(n82077aa_device::srb_r)); + map(0x2, 0x2).rw(this, FUNC(n82077aa_device::dor_r), FUNC(n82077aa_device::dor_w)); + map(0x3, 0x3).rw(this, FUNC(n82077aa_device::tdr_r), FUNC(n82077aa_device::tdr_w)); + map(0x4, 0x4).rw(this, FUNC(n82077aa_device::msr_r), FUNC(n82077aa_device::dsr_w)); + map(0x5, 0x5).rw(this, FUNC(n82077aa_device::fifo_r), FUNC(n82077aa_device::fifo_w)); + map(0x7, 0x7).rw(this, FUNC(n82077aa_device::dir_r), FUNC(n82077aa_device::ccr_w)); +} -ADDRESS_MAP_START(pc_fdc_superio_device::map) - AM_RANGE(0x0, 0x0) AM_READ(sra_r) - AM_RANGE(0x1, 0x1) AM_READ(srb_r) - AM_RANGE(0x2, 0x2) AM_READWRITE(dor_r, dor_w) - AM_RANGE(0x3, 0x3) AM_READWRITE(tdr_r, tdr_w) - AM_RANGE(0x4, 0x4) AM_READWRITE(msr_r, dsr_w) - AM_RANGE(0x5, 0x5) AM_READWRITE(fifo_r, fifo_w) - AM_RANGE(0x7, 0x7) AM_READWRITE(dir_r, ccr_w) -ADDRESS_MAP_END +void pc_fdc_superio_device::map(address_map &map) +{ + map(0x0, 0x0).r(this, FUNC(pc_fdc_superio_device::sra_r)); + map(0x1, 0x1).r(this, FUNC(pc_fdc_superio_device::srb_r)); + map(0x2, 0x2).rw(this, FUNC(pc_fdc_superio_device::dor_r), FUNC(pc_fdc_superio_device::dor_w)); + map(0x3, 0x3).rw(this, FUNC(pc_fdc_superio_device::tdr_r), FUNC(pc_fdc_superio_device::tdr_w)); + map(0x4, 0x4).rw(this, FUNC(pc_fdc_superio_device::msr_r), FUNC(pc_fdc_superio_device::dsr_w)); + map(0x5, 0x5).rw(this, FUNC(pc_fdc_superio_device::fifo_r), FUNC(pc_fdc_superio_device::fifo_w)); + map(0x7, 0x7).rw(this, FUNC(pc_fdc_superio_device::dir_r), FUNC(pc_fdc_superio_device::ccr_w)); +} -ADDRESS_MAP_START(dp8473_device::map) - AM_RANGE(0x0, 0x0) AM_READ(sra_r) - AM_RANGE(0x1, 0x1) AM_READ(srb_r) - AM_RANGE(0x2, 0x2) AM_READWRITE(dor_r, dor_w) - AM_RANGE(0x3, 0x3) AM_READWRITE(tdr_r, tdr_w) - AM_RANGE(0x4, 0x4) AM_READWRITE(msr_r, dsr_w) - AM_RANGE(0x5, 0x5) AM_READWRITE(fifo_r, fifo_w) - AM_RANGE(0x7, 0x7) AM_READWRITE(dir_r, ccr_w) -ADDRESS_MAP_END +void dp8473_device::map(address_map &map) +{ + map(0x0, 0x0).r(this, FUNC(dp8473_device::sra_r)); + map(0x1, 0x1).r(this, FUNC(dp8473_device::srb_r)); + map(0x2, 0x2).rw(this, FUNC(dp8473_device::dor_r), FUNC(dp8473_device::dor_w)); + map(0x3, 0x3).rw(this, FUNC(dp8473_device::tdr_r), FUNC(dp8473_device::tdr_w)); + map(0x4, 0x4).rw(this, FUNC(dp8473_device::msr_r), FUNC(dp8473_device::dsr_w)); + map(0x5, 0x5).rw(this, FUNC(dp8473_device::fifo_r), FUNC(dp8473_device::fifo_w)); + map(0x7, 0x7).rw(this, FUNC(dp8473_device::dir_r), FUNC(dp8473_device::ccr_w)); +} -ADDRESS_MAP_START(pc8477a_device::map) - AM_RANGE(0x0, 0x0) AM_READ(sra_r) - AM_RANGE(0x1, 0x1) AM_READ(srb_r) - AM_RANGE(0x2, 0x2) AM_READWRITE(dor_r, dor_w) - AM_RANGE(0x3, 0x3) AM_READWRITE(tdr_r, tdr_w) - AM_RANGE(0x4, 0x4) AM_READWRITE(msr_r, dsr_w) - AM_RANGE(0x5, 0x5) AM_READWRITE(fifo_r, fifo_w) - AM_RANGE(0x7, 0x7) AM_READWRITE(dir_r, ccr_w) -ADDRESS_MAP_END +void pc8477a_device::map(address_map &map) +{ + map(0x0, 0x0).r(this, FUNC(pc8477a_device::sra_r)); + map(0x1, 0x1).r(this, FUNC(pc8477a_device::srb_r)); + map(0x2, 0x2).rw(this, FUNC(pc8477a_device::dor_r), FUNC(pc8477a_device::dor_w)); + map(0x3, 0x3).rw(this, FUNC(pc8477a_device::tdr_r), FUNC(pc8477a_device::tdr_w)); + map(0x4, 0x4).rw(this, FUNC(pc8477a_device::msr_r), FUNC(pc8477a_device::dsr_w)); + map(0x5, 0x5).rw(this, FUNC(pc8477a_device::fifo_r), FUNC(pc8477a_device::fifo_w)); + map(0x7, 0x7).rw(this, FUNC(pc8477a_device::dir_r), FUNC(pc8477a_device::ccr_w)); +} ADDRESS_MAP_START(wd37c65c_device::map) AM_RANGE(0x0, 0x0) AM_READ(msr_r) diff --git a/src/devices/sound/cdp1869.cpp b/src/devices/sound/cdp1869.cpp index 3821d0fd7ef..e94e69f9202 100644 --- a/src/devices/sound/cdp1869.cpp +++ b/src/devices/sound/cdp1869.cpp @@ -73,14 +73,16 @@ ADDRESS_MAP_START(cdp1869_device::io_map) ADDRESS_MAP_END // character RAM map -ADDRESS_MAP_START(cdp1869_device::char_map) - AM_RANGE(0x000, 0x3ff) AM_READWRITE(char_ram_r, char_ram_w) -ADDRESS_MAP_END +void cdp1869_device::char_map(address_map &map) +{ + map(0x000, 0x3ff).rw(this, FUNC(cdp1869_device::char_ram_r), FUNC(cdp1869_device::char_ram_w)); +} // page RAM map -ADDRESS_MAP_START(cdp1869_device::page_map) - AM_RANGE(0x000, 0x7ff) AM_READWRITE(page_ram_r, page_ram_w) -ADDRESS_MAP_END +void cdp1869_device::page_map(address_map &map) +{ + map(0x000, 0x7ff).rw(this, FUNC(cdp1869_device::page_ram_r), FUNC(cdp1869_device::page_ram_w)); +} // default address map ADDRESS_MAP_START(cdp1869_device::cdp1869) diff --git a/src/devices/sound/dave.cpp b/src/devices/sound/dave.cpp index 20f0ef828e6..16ee02f5b60 100644 --- a/src/devices/sound/dave.cpp +++ b/src/devices/sound/dave.cpp @@ -28,13 +28,15 @@ DEFINE_DEVICE_TYPE(DAVE, dave_device, "dave", "Inteligent Designs DAVE") -ADDRESS_MAP_START(dave_device::z80_program_map) - AM_RANGE(0x0000, 0xffff) AM_READWRITE(program_r, program_w) -ADDRESS_MAP_END +void dave_device::z80_program_map(address_map &map) +{ + map(0x0000, 0xffff).rw(this, FUNC(dave_device::program_r), FUNC(dave_device::program_w)); +} -ADDRESS_MAP_START(dave_device::z80_io_map) - AM_RANGE(0x0000, 0xffff) AM_READWRITE(io_r, io_w) -ADDRESS_MAP_END +void dave_device::z80_io_map(address_map &map) +{ + map(0x0000, 0xffff).rw(this, FUNC(dave_device::io_r), FUNC(dave_device::io_w)); +} ADDRESS_MAP_START(dave_device::program_map) diff --git a/src/devices/video/huc6271.cpp b/src/devices/video/huc6271.cpp index e6a1efde754..8f4b3102f97 100644 --- a/src/devices/video/huc6271.cpp +++ b/src/devices/video/huc6271.cpp @@ -40,14 +40,15 @@ huc6271_device::huc6271_device(const machine_config &mconfig, const char *tag, d -ADDRESS_MAP_START(huc6271_device::regs) - AM_RANGE(0x00, 0x01) AM_WRITENOP // hscroll - AM_RANGE(0x02, 0x03) AM_WRITENOP // control - AM_RANGE(0x04, 0x05) AM_WRITENOP // hsync - AM_RANGE(0x06, 0x07) AM_WRITENOP // base Y - AM_RANGE(0x08, 0x09) AM_WRITENOP // base U - AM_RANGE(0x0a, 0x0b) AM_WRITENOP // base V -ADDRESS_MAP_END +void huc6271_device::regs(address_map &map) +{ + map(0x00, 0x01).nopw(); // hscroll + map(0x02, 0x03).nopw(); // control + map(0x04, 0x05).nopw(); // hsync + map(0x06, 0x07).nopw(); // base Y + map(0x08, 0x09).nopw(); // base U + map(0x0a, 0x0b).nopw(); // base V +} //------------------------------------------------- // device_start - device-specific startup diff --git a/src/devices/video/imagetek_i4100.cpp b/src/devices/video/imagetek_i4100.cpp index 763b1413e1d..91a05b41a99 100644 --- a/src/devices/video/imagetek_i4100.cpp +++ b/src/devices/video/imagetek_i4100.cpp @@ -77,120 +77,123 @@ DEFINE_DEVICE_TYPE(I4100, imagetek_i4100_device, "i4100", "Imagetek I4100 052 VD DEFINE_DEVICE_TYPE(I4220, imagetek_i4220_device, "i4220", "Imagetek I4220 071 VDP") DEFINE_DEVICE_TYPE(I4300, imagetek_i4300_device, "i4300", "Imagetek I4300 095 VDP") -ADDRESS_MAP_START(imagetek_i4100_device::map) - AM_RANGE(0x00000, 0x1ffff) AM_READWRITE(vram_0_r, vram_0_w) AM_SHARE("vram_0") - AM_RANGE(0x20000, 0x3ffff) AM_READWRITE(vram_1_r, vram_1_w) AM_SHARE("vram_1") - AM_RANGE(0x40000, 0x5ffff) AM_READWRITE(vram_2_r, vram_2_w) AM_SHARE("vram_2") - AM_RANGE(0x60000, 0x6ffff) AM_READ(gfxrom_r) - AM_RANGE(0x70000, 0x71fff) AM_READWRITE(scratchram_r, scratchram_w) AM_SHARE("scratchram") // unknown, maybe palette - AM_RANGE(0x72000, 0x73fff) AM_DEVREADWRITE("palette", palette_device, read16, write16) AM_SHARE("palette") - AM_RANGE(0x74000, 0x74fff) AM_READWRITE(spriteram_r, spriteram_w) AM_SHARE("spriteram") - AM_RANGE(0x75000, 0x75fff) AM_READWRITE(rmw_vram_0_r, rmw_vram_0_w) - AM_RANGE(0x76000, 0x76fff) AM_READWRITE(rmw_vram_1_r, rmw_vram_1_w) - AM_RANGE(0x77000, 0x77fff) AM_READWRITE(rmw_vram_2_r, rmw_vram_2_w) - AM_RANGE(0x78000, 0x787ff) AM_READWRITE(tiletable_r, tiletable_w) AM_SHARE("tiletable") +void imagetek_i4100_device::map(address_map &map) +{ + map(0x00000, 0x1ffff).rw(this, FUNC(imagetek_i4100_device::vram_0_r), FUNC(imagetek_i4100_device::vram_0_w)).share("vram_0"); + map(0x20000, 0x3ffff).rw(this, FUNC(imagetek_i4100_device::vram_1_r), FUNC(imagetek_i4100_device::vram_1_w)).share("vram_1"); + map(0x40000, 0x5ffff).rw(this, FUNC(imagetek_i4100_device::vram_2_r), FUNC(imagetek_i4100_device::vram_2_w)).share("vram_2"); + map(0x60000, 0x6ffff).r(this, FUNC(imagetek_i4100_device::gfxrom_r)); + map(0x70000, 0x71fff).rw(this, FUNC(imagetek_i4100_device::scratchram_r), FUNC(imagetek_i4100_device::scratchram_w)).share("scratchram"); // unknown, maybe palette + map(0x72000, 0x73fff).rw("palette", FUNC(palette_device::read16), FUNC(palette_device::write16)).share("palette"); + map(0x74000, 0x74fff).rw(this, FUNC(imagetek_i4100_device::spriteram_r), FUNC(imagetek_i4100_device::spriteram_w)).share("spriteram"); + map(0x75000, 0x75fff).rw(this, FUNC(imagetek_i4100_device::rmw_vram_0_r), FUNC(imagetek_i4100_device::rmw_vram_0_w)); + map(0x76000, 0x76fff).rw(this, FUNC(imagetek_i4100_device::rmw_vram_1_r), FUNC(imagetek_i4100_device::rmw_vram_1_w)); + map(0x77000, 0x77fff).rw(this, FUNC(imagetek_i4100_device::rmw_vram_2_r), FUNC(imagetek_i4100_device::rmw_vram_2_w)); + map(0x78000, 0x787ff).rw(this, FUNC(imagetek_i4100_device::tiletable_r), FUNC(imagetek_i4100_device::tiletable_w)).share("tiletable"); // video registers - AM_RANGE(0x78800, 0x78801) AM_READWRITE(sprite_count_r, sprite_count_w) - AM_RANGE(0x78802, 0x78803) AM_READWRITE(sprite_priority_r, sprite_priority_w) - AM_RANGE(0x78804, 0x78805) AM_READWRITE(sprite_yoffset_r, sprite_yoffset_w) - AM_RANGE(0x78806, 0x78807) AM_READWRITE(sprite_xoffset_r, sprite_xoffset_w) - AM_RANGE(0x78808, 0x78809) AM_READWRITE(sprite_color_code_r, sprite_color_code_w) - AM_RANGE(0x78810, 0x78811) AM_READWRITE(layer_priority_r, layer_priority_w) - AM_RANGE(0x78812, 0x78813) AM_READWRITE(background_color_r, background_color_w) - - AM_RANGE(0x78840, 0x7884d) AM_WRITE(blitter_w) AM_SHARE("blitter_regs") - AM_RANGE(0x78850, 0x78851) AM_READWRITE(screen_yoffset_r, screen_yoffset_w) - AM_RANGE(0x78852, 0x78853) AM_READWRITE(screen_xoffset_r, screen_xoffset_w) - AM_RANGE(0x78860, 0x7886b) AM_READWRITE(window_r, window_w) AM_SHARE("windowregs") - AM_RANGE(0x78870, 0x7887b) AM_READWRITE(scroll_r, scroll_w) AM_SHARE("scrollregs") - - AM_RANGE(0x78880, 0x78881) AM_WRITE(crtc_vert_w) - AM_RANGE(0x78890, 0x78891) AM_WRITE(crtc_horz_w) - AM_RANGE(0x788a0, 0x788a1) AM_WRITE(crtc_unlock_w) - AM_RANGE(0x788aa, 0x788ab) AM_WRITE(rombank_w) - AM_RANGE(0x788ac, 0x788ad) AM_WRITE(screen_ctrl_w) -ADDRESS_MAP_END + map(0x78800, 0x78801).rw(this, FUNC(imagetek_i4100_device::sprite_count_r), FUNC(imagetek_i4100_device::sprite_count_w)); + map(0x78802, 0x78803).rw(this, FUNC(imagetek_i4100_device::sprite_priority_r), FUNC(imagetek_i4100_device::sprite_priority_w)); + map(0x78804, 0x78805).rw(this, FUNC(imagetek_i4100_device::sprite_yoffset_r), FUNC(imagetek_i4100_device::sprite_yoffset_w)); + map(0x78806, 0x78807).rw(this, FUNC(imagetek_i4100_device::sprite_xoffset_r), FUNC(imagetek_i4100_device::sprite_xoffset_w)); + map(0x78808, 0x78809).rw(this, FUNC(imagetek_i4100_device::sprite_color_code_r), FUNC(imagetek_i4100_device::sprite_color_code_w)); + map(0x78810, 0x78811).rw(this, FUNC(imagetek_i4100_device::layer_priority_r), FUNC(imagetek_i4100_device::layer_priority_w)); + map(0x78812, 0x78813).rw(this, FUNC(imagetek_i4100_device::background_color_r), FUNC(imagetek_i4100_device::background_color_w)); + + map(0x78840, 0x7884d).w(this, FUNC(imagetek_i4100_device::blitter_w)).share("blitter_regs"); + map(0x78850, 0x78851).rw(this, FUNC(imagetek_i4100_device::screen_yoffset_r), FUNC(imagetek_i4100_device::screen_yoffset_w)); + map(0x78852, 0x78853).rw(this, FUNC(imagetek_i4100_device::screen_xoffset_r), FUNC(imagetek_i4100_device::screen_xoffset_w)); + map(0x78860, 0x7886b).rw(this, FUNC(imagetek_i4100_device::window_r), FUNC(imagetek_i4100_device::window_w)).share("windowregs"); + map(0x78870, 0x7887b).rw(this, FUNC(imagetek_i4100_device::scroll_r), FUNC(imagetek_i4100_device::scroll_w)).share("scrollregs"); + + map(0x78880, 0x78881).w(this, FUNC(imagetek_i4100_device::crtc_vert_w)); + map(0x78890, 0x78891).w(this, FUNC(imagetek_i4100_device::crtc_horz_w)); + map(0x788a0, 0x788a1).w(this, FUNC(imagetek_i4100_device::crtc_unlock_w)); + map(0x788aa, 0x788ab).w(this, FUNC(imagetek_i4100_device::rombank_w)); + map(0x788ac, 0x788ad).w(this, FUNC(imagetek_i4100_device::screen_ctrl_w)); +} // same as above but with moved video registers (now at 0x797**) -ADDRESS_MAP_START(imagetek_i4220_device::v2_map) - AM_RANGE(0x00000, 0x1ffff) AM_READWRITE(vram_0_r, vram_0_w) AM_SHARE("vram_0") - AM_RANGE(0x20000, 0x3ffff) AM_READWRITE(vram_1_r, vram_1_w) AM_SHARE("vram_1") - AM_RANGE(0x40000, 0x5ffff) AM_READWRITE(vram_2_r, vram_2_w) AM_SHARE("vram_2") - AM_RANGE(0x60000, 0x6ffff) AM_READ(gfxrom_r) - AM_RANGE(0x70000, 0x71fff) AM_READWRITE(scratchram_r, scratchram_w) AM_SHARE("scratchram") // unknown, maybe palette - AM_RANGE(0x72000, 0x73fff) AM_DEVREADWRITE("palette", palette_device, read16, write16) AM_SHARE("palette") - AM_RANGE(0x74000, 0x74fff) AM_READWRITE(spriteram_r, spriteram_w) AM_SHARE("spriteram") - AM_RANGE(0x75000, 0x75fff) AM_READWRITE(rmw_vram_0_r, rmw_vram_0_w) - AM_RANGE(0x76000, 0x76fff) AM_READWRITE(rmw_vram_1_r, rmw_vram_1_w) - AM_RANGE(0x77000, 0x77fff) AM_READWRITE(rmw_vram_2_r, rmw_vram_2_w) - AM_RANGE(0x78000, 0x787ff) AM_READWRITE(tiletable_r, tiletable_w) AM_SHARE("tiletable") - - AM_RANGE(0x78840, 0x7884d) AM_WRITE(blitter_w) AM_SHARE("blitter_regs") - AM_RANGE(0x78850, 0x78851) AM_READWRITE(screen_yoffset_r, screen_yoffset_w) - AM_RANGE(0x78852, 0x78853) AM_READWRITE(screen_xoffset_r, screen_xoffset_w) - AM_RANGE(0x78860, 0x7886b) AM_READWRITE(window_r, window_w) AM_SHARE("windowregs") - AM_RANGE(0x78870, 0x7887b) AM_READWRITE(scroll_r, scroll_w) AM_SHARE("scrollregs") - - AM_RANGE(0x78880, 0x78881) AM_WRITE(crtc_vert_w) - AM_RANGE(0x78890, 0x78891) AM_WRITE(crtc_horz_w) - AM_RANGE(0x788a0, 0x788a1) AM_WRITE(crtc_unlock_w) - AM_RANGE(0x788aa, 0x788ab) AM_WRITE(rombank_w) - AM_RANGE(0x788ac, 0x788ad) AM_WRITE(screen_ctrl_w) +void imagetek_i4220_device::v2_map(address_map &map) +{ + map(0x00000, 0x1ffff).rw(this, FUNC(imagetek_i4220_device::vram_0_r), FUNC(imagetek_i4220_device::vram_0_w)).share("vram_0"); + map(0x20000, 0x3ffff).rw(this, FUNC(imagetek_i4220_device::vram_1_r), FUNC(imagetek_i4220_device::vram_1_w)).share("vram_1"); + map(0x40000, 0x5ffff).rw(this, FUNC(imagetek_i4220_device::vram_2_r), FUNC(imagetek_i4220_device::vram_2_w)).share("vram_2"); + map(0x60000, 0x6ffff).r(this, FUNC(imagetek_i4220_device::gfxrom_r)); + map(0x70000, 0x71fff).rw(this, FUNC(imagetek_i4220_device::scratchram_r), FUNC(imagetek_i4220_device::scratchram_w)).share("scratchram"); // unknown, maybe palette + map(0x72000, 0x73fff).rw("palette", FUNC(palette_device::read16), FUNC(palette_device::write16)).share("palette"); + map(0x74000, 0x74fff).rw(this, FUNC(imagetek_i4220_device::spriteram_r), FUNC(imagetek_i4220_device::spriteram_w)).share("spriteram"); + map(0x75000, 0x75fff).rw(this, FUNC(imagetek_i4220_device::rmw_vram_0_r), FUNC(imagetek_i4220_device::rmw_vram_0_w)); + map(0x76000, 0x76fff).rw(this, FUNC(imagetek_i4220_device::rmw_vram_1_r), FUNC(imagetek_i4220_device::rmw_vram_1_w)); + map(0x77000, 0x77fff).rw(this, FUNC(imagetek_i4220_device::rmw_vram_2_r), FUNC(imagetek_i4220_device::rmw_vram_2_w)); + map(0x78000, 0x787ff).rw(this, FUNC(imagetek_i4220_device::tiletable_r), FUNC(imagetek_i4220_device::tiletable_w)).share("tiletable"); + + map(0x78840, 0x7884d).w(this, FUNC(imagetek_i4220_device::blitter_w)).share("blitter_regs"); + map(0x78850, 0x78851).rw(this, FUNC(imagetek_i4220_device::screen_yoffset_r), FUNC(imagetek_i4220_device::screen_yoffset_w)); + map(0x78852, 0x78853).rw(this, FUNC(imagetek_i4220_device::screen_xoffset_r), FUNC(imagetek_i4220_device::screen_xoffset_w)); + map(0x78860, 0x7886b).rw(this, FUNC(imagetek_i4220_device::window_r), FUNC(imagetek_i4220_device::window_w)).share("windowregs"); + map(0x78870, 0x7887b).rw(this, FUNC(imagetek_i4220_device::scroll_r), FUNC(imagetek_i4220_device::scroll_w)).share("scrollregs"); + + map(0x78880, 0x78881).w(this, FUNC(imagetek_i4220_device::crtc_vert_w)); + map(0x78890, 0x78891).w(this, FUNC(imagetek_i4220_device::crtc_horz_w)); + map(0x788a0, 0x788a1).w(this, FUNC(imagetek_i4220_device::crtc_unlock_w)); + map(0x788aa, 0x788ab).w(this, FUNC(imagetek_i4220_device::rombank_w)); + map(0x788ac, 0x788ad).w(this, FUNC(imagetek_i4220_device::screen_ctrl_w)); // video registers - AM_RANGE(0x79700, 0x79701) AM_READWRITE(sprite_count_r, sprite_count_w) - AM_RANGE(0x79702, 0x79703) AM_READWRITE(sprite_priority_r, sprite_priority_w) - AM_RANGE(0x79704, 0x79705) AM_READWRITE(sprite_yoffset_r, sprite_yoffset_w) - AM_RANGE(0x79706, 0x79707) AM_READWRITE(sprite_xoffset_r, sprite_xoffset_w) - AM_RANGE(0x79708, 0x79709) AM_READWRITE(sprite_color_code_r, sprite_color_code_w) - AM_RANGE(0x79710, 0x79711) AM_READWRITE(layer_priority_r, layer_priority_w) - AM_RANGE(0x79712, 0x79713) AM_READWRITE(background_color_r, background_color_w) + map(0x79700, 0x79701).rw(this, FUNC(imagetek_i4220_device::sprite_count_r), FUNC(imagetek_i4220_device::sprite_count_w)); + map(0x79702, 0x79703).rw(this, FUNC(imagetek_i4220_device::sprite_priority_r), FUNC(imagetek_i4220_device::sprite_priority_w)); + map(0x79704, 0x79705).rw(this, FUNC(imagetek_i4220_device::sprite_yoffset_r), FUNC(imagetek_i4220_device::sprite_yoffset_w)); + map(0x79706, 0x79707).rw(this, FUNC(imagetek_i4220_device::sprite_xoffset_r), FUNC(imagetek_i4220_device::sprite_xoffset_w)); + map(0x79708, 0x79709).rw(this, FUNC(imagetek_i4220_device::sprite_color_code_r), FUNC(imagetek_i4220_device::sprite_color_code_w)); + map(0x79710, 0x79711).rw(this, FUNC(imagetek_i4220_device::layer_priority_r), FUNC(imagetek_i4220_device::layer_priority_w)); + map(0x79712, 0x79713).rw(this, FUNC(imagetek_i4220_device::background_color_r), FUNC(imagetek_i4220_device::background_color_w)); // repeated here in Puzzlet compatibility mode - AM_RANGE(0x78800, 0x78801) AM_READWRITE(sprite_count_r, sprite_count_w) + map(0x78800, 0x78801).rw(this, FUNC(imagetek_i4220_device::sprite_count_r), FUNC(imagetek_i4220_device::sprite_count_w)); // ... this one breaks Blazing Tornado tho // AM_RANGE(0x78802, 0x78803) AM_READWRITE(sprite_priority_r, sprite_priority_w) - AM_RANGE(0x78804, 0x78805) AM_READWRITE(sprite_yoffset_r, sprite_yoffset_w) - AM_RANGE(0x78806, 0x78807) AM_READWRITE(sprite_xoffset_r, sprite_xoffset_w) - AM_RANGE(0x78808, 0x78809) AM_READWRITE(sprite_color_code_r, sprite_color_code_w) - AM_RANGE(0x78810, 0x78811) AM_READWRITE(layer_priority_r, layer_priority_w) - AM_RANGE(0x78812, 0x78813) AM_READWRITE(background_color_r, background_color_w) -ADDRESS_MAP_END + map(0x78804, 0x78805).rw(this, FUNC(imagetek_i4220_device::sprite_yoffset_r), FUNC(imagetek_i4220_device::sprite_yoffset_w)); + map(0x78806, 0x78807).rw(this, FUNC(imagetek_i4220_device::sprite_xoffset_r), FUNC(imagetek_i4220_device::sprite_xoffset_w)); + map(0x78808, 0x78809).rw(this, FUNC(imagetek_i4220_device::sprite_color_code_r), FUNC(imagetek_i4220_device::sprite_color_code_w)); + map(0x78810, 0x78811).rw(this, FUNC(imagetek_i4220_device::layer_priority_r), FUNC(imagetek_i4220_device::layer_priority_w)); + map(0x78812, 0x78813).rw(this, FUNC(imagetek_i4220_device::background_color_r), FUNC(imagetek_i4220_device::background_color_w)); +} // more changes around, namely the screen offsets being reversed here -ADDRESS_MAP_START(imagetek_i4300_device::v3_map) - AM_RANGE(0x00000, 0x1ffff) AM_READWRITE(vram_0_r, vram_0_w) AM_SHARE("vram_0") - AM_RANGE(0x20000, 0x3ffff) AM_READWRITE(vram_1_r, vram_1_w) AM_SHARE("vram_1") - AM_RANGE(0x40000, 0x5ffff) AM_READWRITE(vram_2_r, vram_2_w) AM_SHARE("vram_2") - AM_RANGE(0x60000, 0x6ffff) AM_READ(gfxrom_r) - AM_RANGE(0x70000, 0x71fff) AM_READWRITE(scratchram_r, scratchram_w) AM_SHARE("scratchram") // unknown, maybe palette - AM_RANGE(0x72000, 0x73fff) AM_DEVREADWRITE("palette", palette_device, read16, write16) AM_SHARE("palette") - AM_RANGE(0x74000, 0x74fff) AM_READWRITE(spriteram_r, spriteram_w) AM_SHARE("spriteram") - AM_RANGE(0x75000, 0x75fff) AM_READWRITE(rmw_vram_0_r, rmw_vram_0_w) - AM_RANGE(0x76000, 0x76fff) AM_READWRITE(rmw_vram_1_r, rmw_vram_1_w) - AM_RANGE(0x77000, 0x77fff) AM_READWRITE(rmw_vram_2_r, rmw_vram_2_w) - AM_RANGE(0x78000, 0x787ff) AM_READWRITE(tiletable_r, tiletable_w) AM_SHARE("tiletable") - AM_RANGE(0x78808, 0x78809) AM_READWRITE(screen_xoffset_r, screen_xoffset_w) - AM_RANGE(0x7880a, 0x7880b) AM_READWRITE(screen_yoffset_r, screen_yoffset_w) - AM_RANGE(0x7880e, 0x7880f) AM_WRITE(screen_ctrl_w) // TODO: can be read back here (gakusai) - - AM_RANGE(0x78800, 0x78801) AM_WRITE(crtc_unlock_w) - AM_RANGE(0x78802, 0x78803) AM_WRITE(crtc_horz_w) - AM_RANGE(0x78804, 0x78805) AM_WRITE(crtc_vert_w) - - AM_RANGE(0x78840, 0x7884d) AM_WRITE(blitter_w) AM_SHARE("blitter_regs") - AM_RANGE(0x78850, 0x7885b) AM_READWRITE(scroll_r, scroll_w) AM_SHARE("scrollregs") - AM_RANGE(0x78860, 0x7886b) AM_READWRITE(window_r, window_w) AM_SHARE("windowregs") - AM_RANGE(0x78870, 0x78871) AM_WRITE(rombank_w) +void imagetek_i4300_device::v3_map(address_map &map) +{ + map(0x00000, 0x1ffff).rw(this, FUNC(imagetek_i4300_device::vram_0_r), FUNC(imagetek_i4300_device::vram_0_w)).share("vram_0"); + map(0x20000, 0x3ffff).rw(this, FUNC(imagetek_i4300_device::vram_1_r), FUNC(imagetek_i4300_device::vram_1_w)).share("vram_1"); + map(0x40000, 0x5ffff).rw(this, FUNC(imagetek_i4300_device::vram_2_r), FUNC(imagetek_i4300_device::vram_2_w)).share("vram_2"); + map(0x60000, 0x6ffff).r(this, FUNC(imagetek_i4300_device::gfxrom_r)); + map(0x70000, 0x71fff).rw(this, FUNC(imagetek_i4300_device::scratchram_r), FUNC(imagetek_i4300_device::scratchram_w)).share("scratchram"); // unknown, maybe palette + map(0x72000, 0x73fff).rw("palette", FUNC(palette_device::read16), FUNC(palette_device::write16)).share("palette"); + map(0x74000, 0x74fff).rw(this, FUNC(imagetek_i4300_device::spriteram_r), FUNC(imagetek_i4300_device::spriteram_w)).share("spriteram"); + map(0x75000, 0x75fff).rw(this, FUNC(imagetek_i4300_device::rmw_vram_0_r), FUNC(imagetek_i4300_device::rmw_vram_0_w)); + map(0x76000, 0x76fff).rw(this, FUNC(imagetek_i4300_device::rmw_vram_1_r), FUNC(imagetek_i4300_device::rmw_vram_1_w)); + map(0x77000, 0x77fff).rw(this, FUNC(imagetek_i4300_device::rmw_vram_2_r), FUNC(imagetek_i4300_device::rmw_vram_2_w)); + map(0x78000, 0x787ff).rw(this, FUNC(imagetek_i4300_device::tiletable_r), FUNC(imagetek_i4300_device::tiletable_w)).share("tiletable"); + map(0x78808, 0x78809).rw(this, FUNC(imagetek_i4300_device::screen_xoffset_r), FUNC(imagetek_i4300_device::screen_xoffset_w)); + map(0x7880a, 0x7880b).rw(this, FUNC(imagetek_i4300_device::screen_yoffset_r), FUNC(imagetek_i4300_device::screen_yoffset_w)); + map(0x7880e, 0x7880f).w(this, FUNC(imagetek_i4300_device::screen_ctrl_w)); // TODO: can be read back here (gakusai) + + map(0x78800, 0x78801).w(this, FUNC(imagetek_i4300_device::crtc_unlock_w)); + map(0x78802, 0x78803).w(this, FUNC(imagetek_i4300_device::crtc_horz_w)); + map(0x78804, 0x78805).w(this, FUNC(imagetek_i4300_device::crtc_vert_w)); + + map(0x78840, 0x7884d).w(this, FUNC(imagetek_i4300_device::blitter_w)).share("blitter_regs"); + map(0x78850, 0x7885b).rw(this, FUNC(imagetek_i4300_device::scroll_r), FUNC(imagetek_i4300_device::scroll_w)).share("scrollregs"); + map(0x78860, 0x7886b).rw(this, FUNC(imagetek_i4300_device::window_r), FUNC(imagetek_i4300_device::window_w)).share("windowregs"); + map(0x78870, 0x78871).w(this, FUNC(imagetek_i4300_device::rombank_w)); // video registers - AM_RANGE(0x79700, 0x79701) AM_READWRITE(sprite_count_r, sprite_count_w) - AM_RANGE(0x79702, 0x79703) AM_READWRITE(sprite_priority_r, sprite_priority_w) - AM_RANGE(0x79704, 0x79705) AM_READWRITE(sprite_yoffset_r, sprite_yoffset_w) - AM_RANGE(0x79706, 0x79707) AM_READWRITE(sprite_xoffset_r, sprite_xoffset_w) - AM_RANGE(0x79708, 0x79709) AM_READWRITE(sprite_color_code_r, sprite_color_code_w) - AM_RANGE(0x79710, 0x79711) AM_READWRITE(layer_priority_r, layer_priority_w) - AM_RANGE(0x79712, 0x79713) AM_READWRITE(background_color_r, background_color_w) -ADDRESS_MAP_END + map(0x79700, 0x79701).rw(this, FUNC(imagetek_i4300_device::sprite_count_r), FUNC(imagetek_i4300_device::sprite_count_w)); + map(0x79702, 0x79703).rw(this, FUNC(imagetek_i4300_device::sprite_priority_r), FUNC(imagetek_i4300_device::sprite_priority_w)); + map(0x79704, 0x79705).rw(this, FUNC(imagetek_i4300_device::sprite_yoffset_r), FUNC(imagetek_i4300_device::sprite_yoffset_w)); + map(0x79706, 0x79707).rw(this, FUNC(imagetek_i4300_device::sprite_xoffset_r), FUNC(imagetek_i4300_device::sprite_xoffset_w)); + map(0x79708, 0x79709).rw(this, FUNC(imagetek_i4300_device::sprite_color_code_r), FUNC(imagetek_i4300_device::sprite_color_code_w)); + map(0x79710, 0x79711).rw(this, FUNC(imagetek_i4300_device::layer_priority_r), FUNC(imagetek_i4300_device::layer_priority_w)); + map(0x79712, 0x79713).rw(this, FUNC(imagetek_i4300_device::background_color_r), FUNC(imagetek_i4300_device::background_color_w)); +} //************************************************************************** diff --git a/src/devices/video/jangou_blitter.cpp b/src/devices/video/jangou_blitter.cpp index c0ec764e2d2..6eda24f873d 100644 --- a/src/devices/video/jangou_blitter.cpp +++ b/src/devices/video/jangou_blitter.cpp @@ -41,26 +41,28 @@ jangou_blitter_device::jangou_blitter_device(const machine_config &mconfig, cons } -ADDRESS_MAP_START(jangou_blitter_device::blit_v1_regs) - AM_RANGE(0x00, 0x00) AM_WRITE(src_lo_address_w) - AM_RANGE(0x01, 0x01) AM_WRITE(src_md_address_w) - AM_RANGE(0x02, 0x02) AM_WRITE(x_w) - AM_RANGE(0x03, 0x03) AM_WRITE(y_w) - AM_RANGE(0x04, 0x04) AM_WRITE(width_w) - AM_RANGE(0x05, 0x05) AM_WRITE(height_and_trigger_w) - AM_RANGE(0x06, 0x06) AM_WRITE(src_hi_address_w) -ADDRESS_MAP_END +void jangou_blitter_device::blit_v1_regs(address_map &map) +{ + map(0x00, 0x00).w(this, FUNC(jangou_blitter_device::src_lo_address_w)); + map(0x01, 0x01).w(this, FUNC(jangou_blitter_device::src_md_address_w)); + map(0x02, 0x02).w(this, FUNC(jangou_blitter_device::x_w)); + map(0x03, 0x03).w(this, FUNC(jangou_blitter_device::y_w)); + map(0x04, 0x04).w(this, FUNC(jangou_blitter_device::width_w)); + map(0x05, 0x05).w(this, FUNC(jangou_blitter_device::height_and_trigger_w)); + map(0x06, 0x06).w(this, FUNC(jangou_blitter_device::src_hi_address_w)); +} // Sexy Gal and variants (v2) swaps around upper src address -ADDRESS_MAP_START(jangou_blitter_device::blit_v2_regs) - AM_RANGE(0x00, 0x00) AM_WRITE(src_lo_address_w) - AM_RANGE(0x01, 0x01) AM_WRITE(src_md_address_w) - AM_RANGE(0x02, 0x02) AM_WRITE(src_hi_address_w) - AM_RANGE(0x03, 0x03) AM_WRITE(x_w) - AM_RANGE(0x04, 0x04) AM_WRITE(y_w) - AM_RANGE(0x05, 0x05) AM_WRITE(width_w) - AM_RANGE(0x06, 0x06) AM_WRITE(height_and_trigger_w) -ADDRESS_MAP_END +void jangou_blitter_device::blit_v2_regs(address_map &map) +{ + map(0x00, 0x00).w(this, FUNC(jangou_blitter_device::src_lo_address_w)); + map(0x01, 0x01).w(this, FUNC(jangou_blitter_device::src_md_address_w)); + map(0x02, 0x02).w(this, FUNC(jangou_blitter_device::src_hi_address_w)); + map(0x03, 0x03).w(this, FUNC(jangou_blitter_device::x_w)); + map(0x04, 0x04).w(this, FUNC(jangou_blitter_device::y_w)); + map(0x05, 0x05).w(this, FUNC(jangou_blitter_device::width_w)); + map(0x06, 0x06).w(this, FUNC(jangou_blitter_device::height_and_trigger_w)); +} //------------------------------------------------- // device_start - device-specific startup diff --git a/src/devices/video/msm6255.cpp b/src/devices/video/msm6255.cpp index 4513327160a..c30810214b1 100644 --- a/src/devices/video/msm6255.cpp +++ b/src/devices/video/msm6255.cpp @@ -54,10 +54,11 @@ DEFINE_DEVICE_TYPE(MSM6255, msm6255_device, "msm6255", "Oki MSM6255 LCD Controller") // I/O map -ADDRESS_MAP_START(msm6255_device::map) - AM_RANGE(0x00, 0x00) AM_READWRITE(dr_r, dr_w) - AM_RANGE(0x01, 0x01) AM_READWRITE(ir_r, ir_w) -ADDRESS_MAP_END +void msm6255_device::map(address_map &map) +{ + map(0x00, 0x00).rw(this, FUNC(msm6255_device::dr_r), FUNC(msm6255_device::dr_w)); + map(0x01, 0x01).rw(this, FUNC(msm6255_device::ir_r), FUNC(msm6255_device::ir_w)); +} // default address map ADDRESS_MAP_START(msm6255_device::msm6255) diff --git a/src/mame/machine/315-5881_crypt.cpp b/src/mame/machine/315-5881_crypt.cpp index eab07f56785..c1e1645c20f 100644 --- a/src/mame/machine/315-5881_crypt.cpp +++ b/src/mame/machine/315-5881_crypt.cpp @@ -24,22 +24,24 @@ DEFINE_DEVICE_TYPE(SEGA315_5881_CRYPT, sega_315_5881_crypt_device, "sega315_5881 // TODO: standard hookup doesn't work properly (causes a crash in LA Machine Gun) // might be due of high address variables not properly set (@see sega_315_5881_crypt_device::set_addr_high) -ADDRESS_MAP_START(sega_315_5881_crypt_device::iomap_64be) - AM_RANGE(0x0000, 0x0001) AM_READ(ready_r) +void sega_315_5881_crypt_device::iomap_64be(address_map &map) +{ + map(0x0000, 0x0001).r(this, FUNC(sega_315_5881_crypt_device::ready_r)); // TODO: it is unknown if the - AM_RANGE(0x0010, 0x0011) AM_WRITE(addrlo_w) - AM_RANGE(0x0012, 0x0013) AM_WRITE(addrhi_w) - AM_RANGE(0x0018, 0x0019) AM_WRITE(subkey_be_w) - AM_RANGE(0x001c, 0x001d) AM_READ(decrypt_be_r) -ADDRESS_MAP_END - -ADDRESS_MAP_START(sega_315_5881_crypt_device::iomap_le) - AM_RANGE(0x0000, 0x0001) AM_READ(ready_r) - AM_RANGE(0x0008, 0x0009) AM_WRITE(addrlo_w) - AM_RANGE(0x000a, 0x000b) AM_WRITE(addrhi_w) - AM_RANGE(0x000c, 0x000d) AM_WRITE(subkey_le_w) - AM_RANGE(0x000e, 0x000f) AM_READ(decrypt_le_r) -ADDRESS_MAP_END + map(0x0010, 0x0011).w(this, FUNC(sega_315_5881_crypt_device::addrlo_w)); + map(0x0012, 0x0013).w(this, FUNC(sega_315_5881_crypt_device::addrhi_w)); + map(0x0018, 0x0019).w(this, FUNC(sega_315_5881_crypt_device::subkey_be_w)); + map(0x001c, 0x001d).r(this, FUNC(sega_315_5881_crypt_device::decrypt_be_r)); +} + +void sega_315_5881_crypt_device::iomap_le(address_map &map) +{ + map(0x0000, 0x0001).r(this, FUNC(sega_315_5881_crypt_device::ready_r)); + map(0x0008, 0x0009).w(this, FUNC(sega_315_5881_crypt_device::addrlo_w)); + map(0x000a, 0x000b).w(this, FUNC(sega_315_5881_crypt_device::addrhi_w)); + map(0x000c, 0x000d).w(this, FUNC(sega_315_5881_crypt_device::subkey_le_w)); + map(0x000e, 0x000f).r(this, FUNC(sega_315_5881_crypt_device::decrypt_le_r)); +} sega_315_5881_crypt_device::sega_315_5881_crypt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, SEGA315_5881_CRYPT, tag, owner, clock) diff --git a/src/mame/machine/abc1600mac.cpp b/src/mame/machine/abc1600mac.cpp index c586a76d2b9..18591c6428c 100644 --- a/src/mame/machine/abc1600mac.cpp +++ b/src/mame/machine/abc1600mac.cpp @@ -57,9 +57,10 @@ DEFINE_DEVICE_TYPE(ABC1600_MAC, abc1600_mac_device, "abc1600mac", "ABC 1600 MAC") -ADDRESS_MAP_START(abc1600_mac_device::map) - AM_RANGE(0x00000, 0xfffff) AM_READWRITE(read, write) -ADDRESS_MAP_END +void abc1600_mac_device::map(address_map &map) +{ + map(0x00000, 0xfffff).rw(this, FUNC(abc1600_mac_device::read), FUNC(abc1600_mac_device::write)); +} ADDRESS_MAP_START(abc1600_mac_device::program_map) diff --git a/src/mame/machine/at.cpp b/src/mame/machine/at.cpp index 9502d532fce..b3b9c292228 100644 --- a/src/mame/machine/at.cpp +++ b/src/mame/machine/at.cpp @@ -144,18 +144,19 @@ MACHINE_CONFIG_START(at_mb_device::device_add_mconfig) MACHINE_CONFIG_END -ADDRESS_MAP_START(at_mb_device::map) - AM_RANGE(0x0000, 0x001f) AM_DEVREADWRITE8("dma8237_1", am9517a_device, read, write, 0xffffffff) - AM_RANGE(0x0020, 0x003f) AM_DEVREADWRITE8("pic8259_master", pic8259_device, read, write, 0xffffffff) - AM_RANGE(0x0040, 0x005f) AM_DEVREADWRITE8("pit8254", pit8254_device, read, write, 0xffffffff) - AM_RANGE(0x0060, 0x0061) AM_READWRITE8(portb_r, portb_w, 0xff00) - AM_RANGE(0x0060, 0x0061) AM_DEVREADWRITE8("keybc", at_keyboard_controller_device, data_r, data_w, 0x00ff) - AM_RANGE(0x0064, 0x0065) AM_DEVREADWRITE8("keybc", at_keyboard_controller_device, status_r, command_w, 0x00ff) - AM_RANGE(0x0070, 0x007f) AM_DEVREAD8("rtc", mc146818_device, read, 0xffffffff) AM_WRITE8(write_rtc, 0xffffffff) - AM_RANGE(0x0080, 0x009f) AM_READWRITE8(page8_r, page8_w, 0xffffffff) - AM_RANGE(0x00a0, 0x00bf) AM_DEVREADWRITE8("pic8259_slave", pic8259_device, read, write, 0xffffffff) - AM_RANGE(0x00c0, 0x00df) AM_DEVREADWRITE8("dma8237_2", am9517a_device, read, write, 0x00ff00ff) -ADDRESS_MAP_END +void at_mb_device::map(address_map &map) +{ + map(0x0000, 0x001f).rw("dma8237_1", FUNC(am9517a_device::read), FUNC(am9517a_device::write)).umask16(0xffff); + map(0x0020, 0x003f).rw("pic8259_master", FUNC(pic8259_device::read), FUNC(pic8259_device::write)).umask16(0xffff); + map(0x0040, 0x005f).rw("pit8254", FUNC(pit8254_device::read), FUNC(pit8254_device::write)).umask16(0xffff); + map(0x0061, 0x0061).rw(this, FUNC(at_mb_device::portb_r), FUNC(at_mb_device::portb_w)); + map(0x0060, 0x0060).rw("keybc", FUNC(at_keyboard_controller_device::data_r), FUNC(at_keyboard_controller_device::data_w)); + map(0x0064, 0x0064).rw("keybc", FUNC(at_keyboard_controller_device::status_r), FUNC(at_keyboard_controller_device::command_w)); + map(0x0070, 0x007f).r("rtc", FUNC(mc146818_device::read)).umask16(0xffff).w(this, FUNC(at_mb_device::write_rtc)).umask16(0xffff); + map(0x0080, 0x009f).rw(this, FUNC(at_mb_device::page8_r), FUNC(at_mb_device::page8_w)).umask16(0xffff); + map(0x00a0, 0x00bf).rw("pic8259_slave", FUNC(pic8259_device::read), FUNC(pic8259_device::write)).umask16(0xffff); + map(0x00c0, 0x00df).rw("dma8237_2", FUNC(am9517a_device::read), FUNC(am9517a_device::write)).umask16(0x00ff); +} /************************************************************* * diff --git a/src/mame/machine/awboard.cpp b/src/mame/machine/awboard.cpp index 58e4c451dab..aae1d1f1d47 100644 --- a/src/mame/machine/awboard.cpp +++ b/src/mame/machine/awboard.cpp @@ -159,15 +159,16 @@ ROM board internal layouts: DEFINE_DEVICE_TYPE(AW_ROM_BOARD, aw_rom_board, "aw_rom_board", "Sammy Atomiswave ROM Board") -ADDRESS_MAP_START(aw_rom_board::submap) - AM_RANGE(0x00, 0x01) AM_WRITE(epr_offsetl_w) - AM_RANGE(0x02, 0x03) AM_WRITE(epr_offseth_w) - AM_RANGE(0x06, 0x07) AM_WRITE(mpr_record_index_w) - AM_RANGE(0x08, 0x09) AM_WRITE(mpr_first_file_index_w) - AM_RANGE(0x0a, 0x0b) AM_WRITE(mpr_file_offsetl_w) - AM_RANGE(0x0c, 0x0d) AM_WRITE(mpr_file_offseth_w) - AM_RANGE(0x40, 0x41) AM_READWRITE(pio_r, pio_w) -ADDRESS_MAP_END +void aw_rom_board::submap(address_map &map) +{ + map(0x00, 0x01).w(this, FUNC(aw_rom_board::epr_offsetl_w)); + map(0x02, 0x03).w(this, FUNC(aw_rom_board::epr_offseth_w)); + map(0x06, 0x07).w(this, FUNC(aw_rom_board::mpr_record_index_w)); + map(0x08, 0x09).w(this, FUNC(aw_rom_board::mpr_first_file_index_w)); + map(0x0a, 0x0b).w(this, FUNC(aw_rom_board::mpr_file_offsetl_w)); + map(0x0c, 0x0d).w(this, FUNC(aw_rom_board::mpr_file_offseth_w)); + map(0x40, 0x41).rw(this, FUNC(aw_rom_board::pio_r), FUNC(aw_rom_board::pio_w)); +} aw_rom_board::aw_rom_board(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : naomi_g1_device(mconfig, AW_ROM_BOARD, tag, owner, clock) diff --git a/src/mame/machine/cammu.cpp b/src/mame/machine/cammu.cpp index c027d2d59e5..f5922012d27 100644 --- a/src/mame/machine/cammu.cpp +++ b/src/mame/machine/cammu.cpp @@ -90,23 +90,25 @@ ADDRESS_MAP_START(cammu_c4i_device::map) AM_RANGE(0x0c0, 0x0c3) AM_READWRITE(test_address_r, test_address_w) ADDRESS_MAP_END -ADDRESS_MAP_START(cammu_c3_device::map) - AM_RANGE(0x000, 0x0ff) AM_NOP // tlb - AM_RANGE(0x104, 0x107) AM_READWRITE(s_pdo_r, s_pdo_w) - AM_RANGE(0x108, 0x10b) AM_READWRITE(u_pdo_r, u_pdo_w) - AM_RANGE(0x110, 0x113) AM_READWRITE(fault_r, fault_w) - AM_RANGE(0x140, 0x143) AM_READWRITE(control_r, control_w) - AM_RANGE(0x180, 0x183) AM_READWRITE(reset_r, reset_w) -ADDRESS_MAP_END +void cammu_c3_device::map(address_map &map) +{ + map(0x000, 0x0ff).noprw(); // tlb + map(0x104, 0x107).rw(this, FUNC(cammu_c3_device::s_pdo_r), FUNC(cammu_c3_device::s_pdo_w)); + map(0x108, 0x10b).rw(this, FUNC(cammu_c3_device::u_pdo_r), FUNC(cammu_c3_device::u_pdo_w)); + map(0x110, 0x113).rw(this, FUNC(cammu_c3_device::fault_r), FUNC(cammu_c3_device::fault_w)); + map(0x140, 0x143).rw(this, FUNC(cammu_c3_device::control_r), FUNC(cammu_c3_device::control_w)); + map(0x180, 0x183).rw(this, FUNC(cammu_c3_device::reset_r), FUNC(cammu_c3_device::reset_w)); +} -ADDRESS_MAP_START(cammu_c3_device::map_global) - AM_RANGE(0x000, 0x0ff) AM_NOP // global tlb - AM_RANGE(0x104, 0x107) AM_WRITE(g_s_pdo_w) - AM_RANGE(0x108, 0x10b) AM_WRITE(g_u_pdo_w) - AM_RANGE(0x110, 0x113) AM_WRITE(g_fault_w) - AM_RANGE(0x140, 0x143) AM_WRITE(g_control_w) - AM_RANGE(0x180, 0x183) AM_WRITE(g_reset_w) -ADDRESS_MAP_END +void cammu_c3_device::map_global(address_map &map) +{ + map(0x000, 0x0ff).noprw(); // global tlb + map(0x104, 0x107).w(this, FUNC(cammu_c3_device::g_s_pdo_w)); + map(0x108, 0x10b).w(this, FUNC(cammu_c3_device::g_u_pdo_w)); + map(0x110, 0x113).w(this, FUNC(cammu_c3_device::g_fault_w)); + map(0x140, 0x143).w(this, FUNC(cammu_c3_device::g_control_w)); + map(0x180, 0x183).w(this, FUNC(cammu_c3_device::g_reset_w)); +} DEFINE_DEVICE_TYPE(CAMMU_C4T, cammu_c4t_device, "c4t", "C4E/C4T CAMMU") DEFINE_DEVICE_TYPE(CAMMU_C4I, cammu_c4i_device, "c4i", "C4I CAMMU") diff --git a/src/mame/machine/deco_irq.cpp b/src/mame/machine/deco_irq.cpp index cf3f66ce5be..10fb9a6c821 100644 --- a/src/mame/machine/deco_irq.cpp +++ b/src/mame/machine/deco_irq.cpp @@ -130,12 +130,13 @@ TIMER_CALLBACK_MEMBER( deco_irq_device::scanline_callback ) // INTERFACE //************************************************************************** -ADDRESS_MAP_START(deco_irq_device::map) - AM_RANGE(0x0, 0x0) AM_WRITE(control_w) - AM_RANGE(0x1, 0x1) AM_READWRITE(scanline_r, scanline_w) - AM_RANGE(0x2, 0x2) AM_READWRITE(raster_irq_ack_r, vblank_irq_ack_w) - AM_RANGE(0x3, 0x3) AM_READ(status_r) -ADDRESS_MAP_END +void deco_irq_device::map(address_map &map) +{ + map(0x0, 0x0).w(this, FUNC(deco_irq_device::control_w)); + map(0x1, 0x1).rw(this, FUNC(deco_irq_device::scanline_r), FUNC(deco_irq_device::scanline_w)); + map(0x2, 0x2).rw(this, FUNC(deco_irq_device::raster_irq_ack_r), FUNC(deco_irq_device::vblank_irq_ack_w)); + map(0x3, 0x3).r(this, FUNC(deco_irq_device::status_r)); +} WRITE8_MEMBER( deco_irq_device::control_w ) { diff --git a/src/mame/machine/interpro_arbga.cpp b/src/mame/machine/interpro_arbga.cpp index 8407b4db2b3..15a350d456d 100644 --- a/src/mame/machine/interpro_arbga.cpp +++ b/src/mame/machine/interpro_arbga.cpp @@ -22,40 +22,42 @@ #if 0 // this might be for an earlier revision of the device -ADDRESS_MAP_START(interpro_arbga_device::map) - AM_RANGE(0x00, 0x03) AM_READWRITE(sdepid_r, sdepid_w) - AM_RANGE(0x04, 0x07) AM_READWRITE(snapid_r, snapid_w) - AM_RANGE(0x08, 0x0b) AM_READWRITE(prilo_r, prilo_w) - AM_RANGE(0x0c, 0x0f) AM_READWRITE(prihi_r, prihi_w) - AM_RANGE(0x10, 0x13) AM_READWRITE(errdomlo_r, errdomlo_w) - AM_RANGE(0x14, 0x17) AM_READWRITE(errdomhi_r, errdomhi_w) - AM_RANGE(0x18, 0x1b) AM_READWRITE(tmctrl_r, tmctrl_w) +void interpro_arbga_device::map(address_map &map) +{ + map(0x00, 0x03).rw(this, FUNC(interpro_arbga_device::sdepid_r), FUNC(interpro_arbga_device::sdepid_w)); + map(0x04, 0x07).rw(this, FUNC(interpro_arbga_device::snapid_r), FUNC(interpro_arbga_device::snapid_w)); + map(0x08, 0x0b).rw(this, FUNC(interpro_arbga_device::prilo_r), FUNC(interpro_arbga_device::prilo_w)); + map(0x0c, 0x0f).rw(this, FUNC(interpro_arbga_device::prihi_r), FUNC(interpro_arbga_device::prihi_w)); + map(0x10, 0x13).rw(this, FUNC(interpro_arbga_device::errdomlo_r), FUNC(interpro_arbga_device::errdomlo_w)); + map(0x14, 0x17).rw(this, FUNC(interpro_arbga_device::errdomhi_r), FUNC(interpro_arbga_device::errdomhi_w)); + map(0x18, 0x1b).rw(this, FUNC(interpro_arbga_device::tmctrl_r), FUNC(interpro_arbga_device::tmctrl_w)); - AM_RANGE(0x24, 0x27) AM_READWRITE(tmsrnem_r, tmsrnem_w) - AM_RANGE(0x28, 0x2b) AM_READWRITE(tmsrhog_r, tmsrhog_w) - AM_RANGE(0x2c, 0x2f) AM_READWRITE(tmscale_r, tmscale_w) -ADDRESS_MAP_END + map(0x24, 0x27).rw(this, FUNC(interpro_arbga_device::tmsrnem_r), FUNC(interpro_arbga_device::tmsrnem_w)); + map(0x28, 0x2b).rw(this, FUNC(interpro_arbga_device::tmsrhog_r), FUNC(interpro_arbga_device::tmsrhog_w)); + map(0x2c, 0x2f).rw(this, FUNC(interpro_arbga_device::tmscale_r), FUNC(interpro_arbga_device::tmscale_w)); +} #endif // derived from the FDM "dump_arb" command -ADDRESS_MAP_START(interpro_arbga_device::map) - AM_RANGE(0x00, 0x03) AM_READWRITE(sdepid_r, sdepid_w) - AM_RANGE(0x04, 0x07) AM_READWRITE(arbsnap_r, arbsnap_w) - AM_RANGE(0x08, 0x0b) AM_READWRITE(fixprils_r, fixprils_w) - AM_RANGE(0x0c, 0x0f) AM_READWRITE(fixprims_r, fixprims_w) - AM_RANGE(0x10, 0x13) AM_READWRITE(sysdomls_r, sysdomls_w) - AM_RANGE(0x14, 0x17) AM_READWRITE(sysdomms_r, sysdomms_w) - AM_RANGE(0x18, 0x1b) AM_READWRITE(tctrl_r, tctrl_w) - AM_RANGE(0x1c, 0x1f) AM_READWRITE8(inem_r, inem_w, 0x0000ff00) // boot code writes 0x10 - AM_RANGE(0x20, 0x23) AM_READWRITE8(enem_r, enem_w, 0x0000ff00) // boot code writes 0x07 - AM_RANGE(0x24, 0x27) AM_READWRITE(hog_r, hog_w) - AM_RANGE(0x28, 0x2b) AM_READWRITE(lock_r, lock_w) - AM_RANGE(0x2c, 0x2f) AM_READWRITE(lockprs_r, lockprs_w) - AM_RANGE(0x30, 0x33) AM_READWRITE(hiblockls_r, hiblockls_w) - AM_RANGE(0x34, 0x37) AM_READWRITE(hiblockms_r, hiblockms_w) +void interpro_arbga_device::map(address_map &map) +{ + map(0x00, 0x03).rw(this, FUNC(interpro_arbga_device::sdepid_r), FUNC(interpro_arbga_device::sdepid_w)); + map(0x04, 0x07).rw(this, FUNC(interpro_arbga_device::arbsnap_r), FUNC(interpro_arbga_device::arbsnap_w)); + map(0x08, 0x0b).rw(this, FUNC(interpro_arbga_device::fixprils_r), FUNC(interpro_arbga_device::fixprils_w)); + map(0x0c, 0x0f).rw(this, FUNC(interpro_arbga_device::fixprims_r), FUNC(interpro_arbga_device::fixprims_w)); + map(0x10, 0x13).rw(this, FUNC(interpro_arbga_device::sysdomls_r), FUNC(interpro_arbga_device::sysdomls_w)); + map(0x14, 0x17).rw(this, FUNC(interpro_arbga_device::sysdomms_r), FUNC(interpro_arbga_device::sysdomms_w)); + map(0x18, 0x1b).rw(this, FUNC(interpro_arbga_device::tctrl_r), FUNC(interpro_arbga_device::tctrl_w)); + map(0x1d, 0x1d).rw(this, FUNC(interpro_arbga_device::inem_r), FUNC(interpro_arbga_device::inem_w)); // boot code writes 0x10 + map(0x21, 0x21).rw(this, FUNC(interpro_arbga_device::enem_r), FUNC(interpro_arbga_device::enem_w)); // boot code writes 0x07 + map(0x24, 0x27).rw(this, FUNC(interpro_arbga_device::hog_r), FUNC(interpro_arbga_device::hog_w)); + map(0x28, 0x2b).rw(this, FUNC(interpro_arbga_device::lock_r), FUNC(interpro_arbga_device::lock_w)); + map(0x2c, 0x2f).rw(this, FUNC(interpro_arbga_device::lockprs_r), FUNC(interpro_arbga_device::lockprs_w)); + map(0x30, 0x33).rw(this, FUNC(interpro_arbga_device::hiblockls_r), FUNC(interpro_arbga_device::hiblockls_w)); + map(0x34, 0x37).rw(this, FUNC(interpro_arbga_device::hiblockms_r), FUNC(interpro_arbga_device::hiblockms_w)); - AM_RANGE(0x3c, 0x3f) AM_READWRITE(arbrev_r, arbrev_w) -ADDRESS_MAP_END + map(0x3c, 0x3f).rw(this, FUNC(interpro_arbga_device::arbrev_r), FUNC(interpro_arbga_device::arbrev_w)); +} DEFINE_DEVICE_TYPE(INTERPRO_ARBGA, interpro_arbga_device, "arbga", "SRX Arbiter Gate Array") diff --git a/src/mame/machine/interpro_ioga.cpp b/src/mame/machine/interpro_ioga.cpp index 8f3b7865f15..548a568e1d2 100644 --- a/src/mame/machine/interpro_ioga.cpp +++ b/src/mame/machine/interpro_ioga.cpp @@ -99,40 +99,41 @@ const interpro_ioga_device::interrupt_data_t interpro_ioga_device::m_interrupt_d { INT_SOFT_HI, IRQ_SOFT15, IRQ_PENDING, "soft int 15", "soft" }, }; -ADDRESS_MAP_START(interpro_ioga_device::map) - - AM_RANGE(0x0c, 0x1b) AM_READWRITE(dma_plotter_r, dma_plotter_w) - AM_RANGE(0x1c, 0x1f) AM_READWRITE(dma_plotter_eosl_r, dma_plotter_eosl_w) - AM_RANGE(0x20, 0x2f) AM_READWRITE(dma_scsi_r, dma_scsi_w) - AM_RANGE(0x30, 0x3f) AM_READWRITE(dma_floppy_r, dma_floppy_w) - AM_RANGE(0x40, 0x43) AM_READWRITE(serial_dma0_addr_r, serial_dma0_addr_w) - AM_RANGE(0x44, 0x47) AM_READWRITE(serial_dma0_ctrl_r, serial_dma0_ctrl_w) - AM_RANGE(0x48, 0x4b) AM_READWRITE(serial_dma1_addr_r, serial_dma1_addr_w) - AM_RANGE(0x4c, 0x4f) AM_READWRITE(serial_dma1_ctrl_r, serial_dma1_ctrl_w) - AM_RANGE(0x50, 0x53) AM_READWRITE(serial_dma2_addr_r, serial_dma2_addr_w) - AM_RANGE(0x54, 0x57) AM_READWRITE(serial_dma2_ctrl_r, serial_dma2_ctrl_w) +void interpro_ioga_device::map(address_map &map) +{ + + map(0x0c, 0x1b).rw(this, FUNC(interpro_ioga_device::dma_plotter_r), FUNC(interpro_ioga_device::dma_plotter_w)); + map(0x1c, 0x1f).rw(this, FUNC(interpro_ioga_device::dma_plotter_eosl_r), FUNC(interpro_ioga_device::dma_plotter_eosl_w)); + map(0x20, 0x2f).rw(this, FUNC(interpro_ioga_device::dma_scsi_r), FUNC(interpro_ioga_device::dma_scsi_w)); + map(0x30, 0x3f).rw(this, FUNC(interpro_ioga_device::dma_floppy_r), FUNC(interpro_ioga_device::dma_floppy_w)); + map(0x40, 0x43).rw(this, FUNC(interpro_ioga_device::serial_dma0_addr_r), FUNC(interpro_ioga_device::serial_dma0_addr_w)); + map(0x44, 0x47).rw(this, FUNC(interpro_ioga_device::serial_dma0_ctrl_r), FUNC(interpro_ioga_device::serial_dma0_ctrl_w)); + map(0x48, 0x4b).rw(this, FUNC(interpro_ioga_device::serial_dma1_addr_r), FUNC(interpro_ioga_device::serial_dma1_addr_w)); + map(0x4c, 0x4f).rw(this, FUNC(interpro_ioga_device::serial_dma1_ctrl_r), FUNC(interpro_ioga_device::serial_dma1_ctrl_w)); + map(0x50, 0x53).rw(this, FUNC(interpro_ioga_device::serial_dma2_addr_r), FUNC(interpro_ioga_device::serial_dma2_addr_w)); + map(0x54, 0x57).rw(this, FUNC(interpro_ioga_device::serial_dma2_ctrl_r), FUNC(interpro_ioga_device::serial_dma2_ctrl_w)); // 5a - sib control? - AM_RANGE(0x5c, 0x7f) AM_READWRITE16(icr_r, icr_w, 0xffffffff) - AM_RANGE(0x80, 0x83) AM_READWRITE16(icr18_r, icr18_w, 0x0000ffff) - AM_RANGE(0x80, 0x83) AM_READWRITE8(softint_r, softint_w, 0x00ff0000) - AM_RANGE(0x80, 0x83) AM_READWRITE8(nmictrl_r, nmictrl_w, 0xff000000) - AM_RANGE(0x84, 0x87) AM_READWRITE(mouse_status_r, mouse_status_w) - AM_RANGE(0x88, 0x8b) AM_READWRITE(prescaler_r, prescaler_w) - AM_RANGE(0x8c, 0x8f) AM_READWRITE(timer0_r, timer0_w) - AM_RANGE(0x90, 0x93) AM_READWRITE(timer1_r, timer1_w) - AM_RANGE(0x94, 0x97) AM_READ(error_address_r) - AM_RANGE(0x98, 0x9b) AM_READ(error_businfo_r) - AM_RANGE(0x9c, 0x9f) AM_READWRITE16(arbctl_r, arbctl_w, 0x0000ffff) + map(0x5c, 0x7f).rw(this, FUNC(interpro_ioga_device::icr_r), FUNC(interpro_ioga_device::icr_w)); + map(0x80, 0x81).rw(this, FUNC(interpro_ioga_device::icr18_r), FUNC(interpro_ioga_device::icr18_w)); + map(0x82, 0x82).rw(this, FUNC(interpro_ioga_device::softint_r), FUNC(interpro_ioga_device::softint_w)); + map(0x83, 0x83).rw(this, FUNC(interpro_ioga_device::nmictrl_r), FUNC(interpro_ioga_device::nmictrl_w)); + map(0x84, 0x87).rw(this, FUNC(interpro_ioga_device::mouse_status_r), FUNC(interpro_ioga_device::mouse_status_w)); + map(0x88, 0x8b).rw(this, FUNC(interpro_ioga_device::prescaler_r), FUNC(interpro_ioga_device::prescaler_w)); + map(0x8c, 0x8f).rw(this, FUNC(interpro_ioga_device::timer0_r), FUNC(interpro_ioga_device::timer0_w)); + map(0x90, 0x93).rw(this, FUNC(interpro_ioga_device::timer1_r), FUNC(interpro_ioga_device::timer1_w)); + map(0x94, 0x97).r(this, FUNC(interpro_ioga_device::error_address_r)); + map(0x98, 0x9b).r(this, FUNC(interpro_ioga_device::error_businfo_r)); + map(0x9c, 0x9d).rw(this, FUNC(interpro_ioga_device::arbctl_r), FUNC(interpro_ioga_device::arbctl_w)); //AM_RANGE(0x9c, 0x9f) AM_READWRITE16(?, ?, 0xffff0000) // ip2000 boot code writes 0x7f18 - AM_RANGE(0xa0, 0xa3) AM_READWRITE(timer2_count_r, timer2_count_w) - AM_RANGE(0xa4, 0xa7) AM_READWRITE(timer2_value_r, timer2_value_w) - AM_RANGE(0xa8, 0xab) AM_READWRITE(timer3_r, timer3_w) - AM_RANGE(0xac, 0xaf) AM_READWRITE(bus_timeout_r, bus_timeout_w) // boot writes 0x64 - AM_RANGE(0xb0, 0xbf) AM_READWRITE16(softint_vector_r, softint_vector_w, 0xffffffff) + map(0xa0, 0xa3).rw(this, FUNC(interpro_ioga_device::timer2_count_r), FUNC(interpro_ioga_device::timer2_count_w)); + map(0xa4, 0xa7).rw(this, FUNC(interpro_ioga_device::timer2_value_r), FUNC(interpro_ioga_device::timer2_value_w)); + map(0xa8, 0xab).rw(this, FUNC(interpro_ioga_device::timer3_r), FUNC(interpro_ioga_device::timer3_w)); + map(0xac, 0xaf).rw(this, FUNC(interpro_ioga_device::bus_timeout_r), FUNC(interpro_ioga_device::bus_timeout_w)); // boot writes 0x64 + map(0xb0, 0xbf).rw(this, FUNC(interpro_ioga_device::softint_vector_r), FUNC(interpro_ioga_device::softint_vector_w)); //c0, c4, c8 -ethernet address a,b,c? -ADDRESS_MAP_END +} ADDRESS_MAP_START(turquoise_ioga_device::map) AM_IMPORT_FROM(interpro_ioga_device::map) diff --git a/src/mame/machine/interpro_mcga.cpp b/src/mame/machine/interpro_mcga.cpp index 5c5667f4703..1e4f436c083 100644 --- a/src/mame/machine/interpro_mcga.cpp +++ b/src/mame/machine/interpro_mcga.cpp @@ -21,29 +21,31 @@ #define VERBOSE 0 #include "logmacro.h" -ADDRESS_MAP_START(interpro_mcga_device::map) - AM_RANGE(0x00, 0x03) AM_READWRITE16(reg00_r, reg00_w, 0xffff) - AM_RANGE(0x08, 0x0b) AM_READWRITE16(control_r, control_w, 0xffff) - AM_RANGE(0x10, 0x13) AM_READWRITE16(error_r, error_w, 0xffff) - AM_RANGE(0x18, 0x1b) AM_READWRITE8(frcrd_r, frcrd_w, 0xff) - AM_RANGE(0x20, 0x23) AM_READWRITE8(cbsub_r, cbsub_w, 0xff) - AM_RANGE(0x28, 0x2b) AM_READWRITE16(reg28_r, reg28_w, 0xffff) - AM_RANGE(0x30, 0x33) AM_READWRITE16(reg30_r, reg30_w, 0xffff) - AM_RANGE(0x38, 0x3b) AM_READWRITE16(memsize_r, memsize_w, 0xffff) -ADDRESS_MAP_END +void interpro_mcga_device::map(address_map &map) +{ + map(0x00, 0x01).rw(this, FUNC(interpro_mcga_device::reg00_r), FUNC(interpro_mcga_device::reg00_w)); + map(0x08, 0x09).rw(this, FUNC(interpro_mcga_device::control_r), FUNC(interpro_mcga_device::control_w)); + map(0x10, 0x11).rw(this, FUNC(interpro_mcga_device::error_r), FUNC(interpro_mcga_device::error_w)); + map(0x18, 0x18).rw(this, FUNC(interpro_mcga_device::frcrd_r), FUNC(interpro_mcga_device::frcrd_w)); + map(0x20, 0x20).rw(this, FUNC(interpro_mcga_device::cbsub_r), FUNC(interpro_mcga_device::cbsub_w)); + map(0x28, 0x29).rw(this, FUNC(interpro_mcga_device::reg28_r), FUNC(interpro_mcga_device::reg28_w)); + map(0x30, 0x31).rw(this, FUNC(interpro_mcga_device::reg30_r), FUNC(interpro_mcga_device::reg30_w)); + map(0x38, 0x39).rw(this, FUNC(interpro_mcga_device::memsize_r), FUNC(interpro_mcga_device::memsize_w)); +} -ADDRESS_MAP_START(interpro_fmcc_device::map) - AM_RANGE(0x00, 0x03) AM_READWRITE16(reg00_r, reg00_w, 0xffff) - AM_RANGE(0x08, 0x0b) AM_READWRITE16(control_r, control_w, 0xffff) - AM_RANGE(0x10, 0x13) AM_READWRITE16(error_r, error_w, 0xffff) - AM_RANGE(0x18, 0x1b) AM_READWRITE8(frcrd_r, frcrd_w, 0xff) - AM_RANGE(0x20, 0x23) AM_READWRITE8(cbsub_r, cbsub_w, 0xff) - AM_RANGE(0x28, 0x2b) AM_READWRITE16(reg28_r, reg28_w, 0xffff) - AM_RANGE(0x30, 0x33) AM_READWRITE16(reg30_r, reg30_w, 0xffff) - AM_RANGE(0x38, 0x3b) AM_READWRITE16(memsize_r, memsize_w, 0xffff) - AM_RANGE(0x40, 0x43) AM_NOP // unknown - AM_RANGE(0x48, 0x4b) AM_READWRITE16(error_control_r, error_control_w, 0xffff) -ADDRESS_MAP_END +void interpro_fmcc_device::map(address_map &map) +{ + map(0x00, 0x01).rw(this, FUNC(interpro_fmcc_device::reg00_r), FUNC(interpro_fmcc_device::reg00_w)); + map(0x08, 0x09).rw(this, FUNC(interpro_fmcc_device::control_r), FUNC(interpro_fmcc_device::control_w)); + map(0x10, 0x11).rw(this, FUNC(interpro_fmcc_device::error_r), FUNC(interpro_fmcc_device::error_w)); + map(0x18, 0x18).rw(this, FUNC(interpro_fmcc_device::frcrd_r), FUNC(interpro_fmcc_device::frcrd_w)); + map(0x20, 0x20).rw(this, FUNC(interpro_fmcc_device::cbsub_r), FUNC(interpro_fmcc_device::cbsub_w)); + map(0x28, 0x29).rw(this, FUNC(interpro_fmcc_device::reg28_r), FUNC(interpro_fmcc_device::reg28_w)); + map(0x30, 0x31).rw(this, FUNC(interpro_fmcc_device::reg30_r), FUNC(interpro_fmcc_device::reg30_w)); + map(0x38, 0x39).rw(this, FUNC(interpro_fmcc_device::memsize_r), FUNC(interpro_fmcc_device::memsize_w)); + map(0x40, 0x43).noprw(); // unknown + map(0x48, 0x49).rw(this, FUNC(interpro_fmcc_device::error_control_r), FUNC(interpro_fmcc_device::error_control_w)); +} DEFINE_DEVICE_TYPE(INTERPRO_MCGA, interpro_mcga_device, "mcga", "Memory Controller Gate Array") DEFINE_DEVICE_TYPE(INTERPRO_FMCC, interpro_fmcc_device, "fmcc", "Fast Memory Control Chip") diff --git a/src/mame/machine/interpro_sga.cpp b/src/mame/machine/interpro_sga.cpp index bc6d2642b31..794b135ef1e 100644 --- a/src/mame/machine/interpro_sga.cpp +++ b/src/mame/machine/interpro_sga.cpp @@ -20,51 +20,52 @@ #define VERBOSE 0 #include "logmacro.h" -ADDRESS_MAP_START(interpro_sga_device::map) - AM_RANGE(0x00, 0x03) AM_READWRITE(gcsr_r, gcsr_w) - AM_RANGE(0x04, 0x07) AM_READWRITE(ipoll_r, ipoll_w) - AM_RANGE(0x08, 0x0b) AM_READWRITE(imask_r, imask_w) - AM_RANGE(0x0c, 0x0f) AM_READWRITE(range_base_r, range_base_w) - AM_RANGE(0x10, 0x13) AM_READWRITE(range_end_r, range_end_w) - AM_RANGE(0x14, 0x17) AM_READWRITE(cttag_r, cttag_w) // aka diag1 - AM_RANGE(0x18, 0x1b) AM_READWRITE(address_r, address_w) // aka diag0 - AM_RANGE(0x1c, 0x1f) AM_READWRITE(dmacsr_r, dmacsr_w) - AM_RANGE(0x20, 0x23) AM_READWRITE(edmacsr_r, edmacsr_w) // esga - AM_RANGE(0x24, 0x27) AM_READWRITE(reg6_range_r, reg6_range_w) // esga - - AM_RANGE(0x80, 0x83) AM_READWRITE(ddpta0_r, ddpta0_w) // dma 0 device page table address (esga) - AM_RANGE(0x84, 0x87) AM_READWRITE(ddpad0_r, ddpad0_w) // dma 0 device page address - AM_RANGE(0x88, 0x8b) AM_READWRITE(ddoff0_r, ddoff0_w) // dma 0 device page offset - AM_RANGE(0x8c, 0x8f) AM_READWRITE(ddtc0_r, ddtc0_w) // dma 0 device transfer context - - AM_RANGE(0x90, 0x93) AM_READWRITE(dspta0_r, dspta0_w) // dma 0 SRX page table address (esga) - AM_RANGE(0x94, 0x97) AM_READWRITE(dspad0_r, dspad0_w) // dma 0 SRX page address - AM_RANGE(0x98, 0x9b) AM_READWRITE(dsoff0_r, dsoff0_w) // dma 0 SRX page offset - AM_RANGE(0x9c, 0x9f) AM_READWRITE(dstc0_r, dstc0_w) // dma 0 SRX transfer context - - AM_RANGE(0xa4, 0xa7) AM_READWRITE(dspad1_r, dspad1_w) // dma 1 source page address - AM_RANGE(0xa8, 0xab) AM_READWRITE(dsoff1_r, dsoff1_w) // dma 1 source page offset - AM_RANGE(0xac, 0xaf) AM_READWRITE(dstc1_r, dstc1_w) // dma 1 source transfer count - - AM_RANGE(0xb4, 0xb7) AM_READWRITE(ddpad1_r, ddpad1_w) // dma 1 destination page address - AM_RANGE(0xb8, 0xbb) AM_READWRITE(ddoff1_r, ddoff1_w) // dma 1 destination page offset - AM_RANGE(0xbc, 0xbf) AM_READWRITE(ddtc1_r, ddtc1_w) // dma 1 destination transfer count - - AM_RANGE(0xc0, 0xc3) AM_READWRITE(ddpta2_r, ddpta2_w) // dma 2 device page table address (esga) - AM_RANGE(0xc4, 0xc7) AM_READWRITE(ddpad2_r, ddpad2_w) // dma 2 device page address - AM_RANGE(0xc8, 0xcb) AM_READWRITE(ddoff2_r, ddoff2_w) // dma 2 device page offset - AM_RANGE(0xcc, 0xcf) AM_READWRITE(ddtc2_r, ddtc2_w) // dma 2 device transfer context - - AM_RANGE(0xd0, 0xd3) AM_READWRITE(dspta2_r, dspta2_w) // dma 2 SRX page table address (esga) - AM_RANGE(0xd4, 0xd7) AM_READWRITE(dspad2_r, dspad2_w) // dma 2 SRX page address - AM_RANGE(0xd8, 0xdb) AM_READWRITE(dsoff2_r, dsoff2_w) // dma 2 SRX page offset - AM_RANGE(0xdc, 0xdf) AM_READWRITE(dstc2_r, dstc2_w) // dma 2 SRX transfer context - - AM_RANGE(0xe0, 0xe3) AM_READWRITE(ddrd2_r, ddrd2_w) // dma 2 device record descriptor (esga) - AM_RANGE(0xe4, 0xe7) AM_READWRITE(dsrd2_r, dsrd2_w) // dma 2 SRX record descriptor (esga) - AM_RANGE(0xe8, 0xeb) AM_READWRITE(dcksum0_r, dcksum0_w) // dma 1 device checksum register 0 (esga) - AM_RANGE(0xec, 0xef) AM_READWRITE(dcksum1_r, dcksum1_w) // dma 1 device checksum register 1 (esga) -ADDRESS_MAP_END +void interpro_sga_device::map(address_map &map) +{ + map(0x00, 0x03).rw(this, FUNC(interpro_sga_device::gcsr_r), FUNC(interpro_sga_device::gcsr_w)); + map(0x04, 0x07).rw(this, FUNC(interpro_sga_device::ipoll_r), FUNC(interpro_sga_device::ipoll_w)); + map(0x08, 0x0b).rw(this, FUNC(interpro_sga_device::imask_r), FUNC(interpro_sga_device::imask_w)); + map(0x0c, 0x0f).rw(this, FUNC(interpro_sga_device::range_base_r), FUNC(interpro_sga_device::range_base_w)); + map(0x10, 0x13).rw(this, FUNC(interpro_sga_device::range_end_r), FUNC(interpro_sga_device::range_end_w)); + map(0x14, 0x17).rw(this, FUNC(interpro_sga_device::cttag_r), FUNC(interpro_sga_device::cttag_w)); // aka diag1 + map(0x18, 0x1b).rw(this, FUNC(interpro_sga_device::address_r), FUNC(interpro_sga_device::address_w)); // aka diag0 + map(0x1c, 0x1f).rw(this, FUNC(interpro_sga_device::dmacsr_r), FUNC(interpro_sga_device::dmacsr_w)); + map(0x20, 0x23).rw(this, FUNC(interpro_sga_device::edmacsr_r), FUNC(interpro_sga_device::edmacsr_w)); // esga + map(0x24, 0x27).rw(this, FUNC(interpro_sga_device::reg6_range_r), FUNC(interpro_sga_device::reg6_range_w)); // esga + + map(0x80, 0x83).rw(this, FUNC(interpro_sga_device::ddpta0_r), FUNC(interpro_sga_device::ddpta0_w)); // dma 0 device page table address (esga) + map(0x84, 0x87).rw(this, FUNC(interpro_sga_device::ddpad0_r), FUNC(interpro_sga_device::ddpad0_w)); // dma 0 device page address + map(0x88, 0x8b).rw(this, FUNC(interpro_sga_device::ddoff0_r), FUNC(interpro_sga_device::ddoff0_w)); // dma 0 device page offset + map(0x8c, 0x8f).rw(this, FUNC(interpro_sga_device::ddtc0_r), FUNC(interpro_sga_device::ddtc0_w)); // dma 0 device transfer context + + map(0x90, 0x93).rw(this, FUNC(interpro_sga_device::dspta0_r), FUNC(interpro_sga_device::dspta0_w)); // dma 0 SRX page table address (esga) + map(0x94, 0x97).rw(this, FUNC(interpro_sga_device::dspad0_r), FUNC(interpro_sga_device::dspad0_w)); // dma 0 SRX page address + map(0x98, 0x9b).rw(this, FUNC(interpro_sga_device::dsoff0_r), FUNC(interpro_sga_device::dsoff0_w)); // dma 0 SRX page offset + map(0x9c, 0x9f).rw(this, FUNC(interpro_sga_device::dstc0_r), FUNC(interpro_sga_device::dstc0_w)); // dma 0 SRX transfer context + + map(0xa4, 0xa7).rw(this, FUNC(interpro_sga_device::dspad1_r), FUNC(interpro_sga_device::dspad1_w)); // dma 1 source page address + map(0xa8, 0xab).rw(this, FUNC(interpro_sga_device::dsoff1_r), FUNC(interpro_sga_device::dsoff1_w)); // dma 1 source page offset + map(0xac, 0xaf).rw(this, FUNC(interpro_sga_device::dstc1_r), FUNC(interpro_sga_device::dstc1_w)); // dma 1 source transfer count + + map(0xb4, 0xb7).rw(this, FUNC(interpro_sga_device::ddpad1_r), FUNC(interpro_sga_device::ddpad1_w)); // dma 1 destination page address + map(0xb8, 0xbb).rw(this, FUNC(interpro_sga_device::ddoff1_r), FUNC(interpro_sga_device::ddoff1_w)); // dma 1 destination page offset + map(0xbc, 0xbf).rw(this, FUNC(interpro_sga_device::ddtc1_r), FUNC(interpro_sga_device::ddtc1_w)); // dma 1 destination transfer count + + map(0xc0, 0xc3).rw(this, FUNC(interpro_sga_device::ddpta2_r), FUNC(interpro_sga_device::ddpta2_w)); // dma 2 device page table address (esga) + map(0xc4, 0xc7).rw(this, FUNC(interpro_sga_device::ddpad2_r), FUNC(interpro_sga_device::ddpad2_w)); // dma 2 device page address + map(0xc8, 0xcb).rw(this, FUNC(interpro_sga_device::ddoff2_r), FUNC(interpro_sga_device::ddoff2_w)); // dma 2 device page offset + map(0xcc, 0xcf).rw(this, FUNC(interpro_sga_device::ddtc2_r), FUNC(interpro_sga_device::ddtc2_w)); // dma 2 device transfer context + + map(0xd0, 0xd3).rw(this, FUNC(interpro_sga_device::dspta2_r), FUNC(interpro_sga_device::dspta2_w)); // dma 2 SRX page table address (esga) + map(0xd4, 0xd7).rw(this, FUNC(interpro_sga_device::dspad2_r), FUNC(interpro_sga_device::dspad2_w)); // dma 2 SRX page address + map(0xd8, 0xdb).rw(this, FUNC(interpro_sga_device::dsoff2_r), FUNC(interpro_sga_device::dsoff2_w)); // dma 2 SRX page offset + map(0xdc, 0xdf).rw(this, FUNC(interpro_sga_device::dstc2_r), FUNC(interpro_sga_device::dstc2_w)); // dma 2 SRX transfer context + + map(0xe0, 0xe3).rw(this, FUNC(interpro_sga_device::ddrd2_r), FUNC(interpro_sga_device::ddrd2_w)); // dma 2 device record descriptor (esga) + map(0xe4, 0xe7).rw(this, FUNC(interpro_sga_device::dsrd2_r), FUNC(interpro_sga_device::dsrd2_w)); // dma 2 SRX record descriptor (esga) + map(0xe8, 0xeb).rw(this, FUNC(interpro_sga_device::dcksum0_r), FUNC(interpro_sga_device::dcksum0_w)); // dma 1 device checksum register 0 (esga) + map(0xec, 0xef).rw(this, FUNC(interpro_sga_device::dcksum1_r), FUNC(interpro_sga_device::dcksum1_w)); // dma 1 device checksum register 1 (esga) +} DEFINE_DEVICE_TYPE(INTERPRO_SGA, interpro_sga_device, "sga", "SRX Gate Array") diff --git a/src/mame/machine/isbc_208.cpp b/src/mame/machine/isbc_208.cpp index 1040870b01c..12600e2bd67 100644 --- a/src/mame/machine/isbc_208.cpp +++ b/src/mame/machine/isbc_208.cpp @@ -44,11 +44,12 @@ MACHINE_CONFIG_START(isbc_208_device::device_add_mconfig) MCFG_FLOPPY_DRIVE_ADD("fdc:1", isbc_208_floppies, "525dd", isbc_208_device::floppy_formats) MACHINE_CONFIG_END -ADDRESS_MAP_START(isbc_208_device::map) - AM_RANGE(0x00, 0x0f) AM_DEVREADWRITE("dmac", am9517a_device, read, write) - AM_RANGE(0x10, 0x11) AM_DEVICE("fdc", i8272a_device, map) - AM_RANGE(0x12, 0x15) AM_READWRITE(stat_r, aux_w) -ADDRESS_MAP_END +void isbc_208_device::map(address_map &map) +{ + map(0x00, 0x0f).rw("dmac", FUNC(am9517a_device::read), FUNC(am9517a_device::write)); + map(0x10, 0x11).m("fdc", FUNC(i8272a_device::map)); + map(0x12, 0x15).rw(this, FUNC(isbc_208_device::stat_r), FUNC(isbc_208_device::aux_w)); +} WRITE_LINE_MEMBER(isbc_208_device::out_eop_w) diff --git a/src/mame/machine/k573dio.cpp b/src/mame/machine/k573dio.cpp index d3a6121d88f..784e9f0e421 100644 --- a/src/mame/machine/k573dio.cpp +++ b/src/mame/machine/k573dio.cpp @@ -67,38 +67,39 @@ DEFINE_DEVICE_TYPE(KONAMI_573_DIGITAL_IO_BOARD, k573dio_device, "k573_dio", "Konami 573 digital I/O board") -ADDRESS_MAP_START(k573dio_device::amap) - AM_RANGE(0x00, 0x01) AM_READ(a00_r) - AM_RANGE(0x02, 0x03) AM_READ(a02_r) - AM_RANGE(0x04, 0x05) AM_READ(a04_r) - AM_RANGE(0x06, 0x07) AM_READ(a06_r) - AM_RANGE(0x0a, 0x0b) AM_READ(a0a_r) - AM_RANGE(0x80, 0x81) AM_READ(a80_r) - AM_RANGE(0xa0, 0xa1) AM_WRITE(mpeg_start_adr_high_w) - AM_RANGE(0xa2, 0xa3) AM_WRITE(mpeg_start_adr_low_w) - AM_RANGE(0xa4, 0xa5) AM_WRITE(mpeg_end_adr_high_w) - AM_RANGE(0xa6, 0xa7) AM_WRITE(mpeg_end_adr_low_w) - AM_RANGE(0xa8, 0xa9) AM_WRITE(mpeg_key_1_w) - AM_RANGE(0xac, 0xad) AM_READWRITE(mas_i2c_r, mas_i2c_w) - AM_RANGE(0xae, 0xaf) AM_WRITE(mpeg_ctrl_w) - AM_RANGE(0xb0, 0xb1) AM_WRITE(ram_write_adr_high_w) - AM_RANGE(0xb2, 0xb3) AM_WRITE(ram_write_adr_low_w) - AM_RANGE(0xb4, 0xb5) AM_READWRITE(ram_r, ram_w) - AM_RANGE(0xb6, 0xb7) AM_WRITE(ram_read_adr_high_w) - AM_RANGE(0xb8, 0xb9) AM_WRITE(ram_read_adr_low_w) - AM_RANGE(0xe0, 0xe1) AM_WRITE(output_1_w) - AM_RANGE(0xe2, 0xe3) AM_WRITE(output_0_w) - AM_RANGE(0xe4, 0xe5) AM_WRITE(output_3_w) - AM_RANGE(0xe6, 0xe7) AM_WRITE(output_7_w) - AM_RANGE(0xea, 0xeb) AM_WRITE(mpeg_key_2_w) - AM_RANGE(0xec, 0xed) AM_WRITE(mpeg_key_3_w) - AM_RANGE(0xee, 0xef) AM_READWRITE(digital_id_r, digital_id_w) - AM_RANGE(0xf6, 0xf7) AM_READ(fpga_status_r) - AM_RANGE(0xf8, 0xf9) AM_WRITE(fpga_firmware_w) - AM_RANGE(0xfa, 0xfb) AM_WRITE(output_4_w) - AM_RANGE(0xfc, 0xfd) AM_WRITE(output_5_w) - AM_RANGE(0xfe, 0xff) AM_WRITE(output_2_w) -ADDRESS_MAP_END +void k573dio_device::amap(address_map &map) +{ + map(0x00, 0x01).r(this, FUNC(k573dio_device::a00_r)); + map(0x02, 0x03).r(this, FUNC(k573dio_device::a02_r)); + map(0x04, 0x05).r(this, FUNC(k573dio_device::a04_r)); + map(0x06, 0x07).r(this, FUNC(k573dio_device::a06_r)); + map(0x0a, 0x0b).r(this, FUNC(k573dio_device::a0a_r)); + map(0x80, 0x81).r(this, FUNC(k573dio_device::a80_r)); + map(0xa0, 0xa1).w(this, FUNC(k573dio_device::mpeg_start_adr_high_w)); + map(0xa2, 0xa3).w(this, FUNC(k573dio_device::mpeg_start_adr_low_w)); + map(0xa4, 0xa5).w(this, FUNC(k573dio_device::mpeg_end_adr_high_w)); + map(0xa6, 0xa7).w(this, FUNC(k573dio_device::mpeg_end_adr_low_w)); + map(0xa8, 0xa9).w(this, FUNC(k573dio_device::mpeg_key_1_w)); + map(0xac, 0xad).rw(this, FUNC(k573dio_device::mas_i2c_r), FUNC(k573dio_device::mas_i2c_w)); + map(0xae, 0xaf).w(this, FUNC(k573dio_device::mpeg_ctrl_w)); + map(0xb0, 0xb1).w(this, FUNC(k573dio_device::ram_write_adr_high_w)); + map(0xb2, 0xb3).w(this, FUNC(k573dio_device::ram_write_adr_low_w)); + map(0xb4, 0xb5).rw(this, FUNC(k573dio_device::ram_r), FUNC(k573dio_device::ram_w)); + map(0xb6, 0xb7).w(this, FUNC(k573dio_device::ram_read_adr_high_w)); + map(0xb8, 0xb9).w(this, FUNC(k573dio_device::ram_read_adr_low_w)); + map(0xe0, 0xe1).w(this, FUNC(k573dio_device::output_1_w)); + map(0xe2, 0xe3).w(this, FUNC(k573dio_device::output_0_w)); + map(0xe4, 0xe5).w(this, FUNC(k573dio_device::output_3_w)); + map(0xe6, 0xe7).w(this, FUNC(k573dio_device::output_7_w)); + map(0xea, 0xeb).w(this, FUNC(k573dio_device::mpeg_key_2_w)); + map(0xec, 0xed).w(this, FUNC(k573dio_device::mpeg_key_3_w)); + map(0xee, 0xef).rw(this, FUNC(k573dio_device::digital_id_r), FUNC(k573dio_device::digital_id_w)); + map(0xf6, 0xf7).r(this, FUNC(k573dio_device::fpga_status_r)); + map(0xf8, 0xf9).w(this, FUNC(k573dio_device::fpga_firmware_w)); + map(0xfa, 0xfb).w(this, FUNC(k573dio_device::output_4_w)); + map(0xfc, 0xfd).w(this, FUNC(k573dio_device::output_5_w)); + map(0xfe, 0xff).w(this, FUNC(k573dio_device::output_2_w)); +} k573dio_device::k573dio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, KONAMI_573_DIGITAL_IO_BOARD, tag, owner, clock), diff --git a/src/mame/machine/m3comm.cpp b/src/mame/machine/m3comm.cpp index 2182a321747..0cacad10bd6 100644 --- a/src/mame/machine/m3comm.cpp +++ b/src/mame/machine/m3comm.cpp @@ -88,11 +88,12 @@ SEGA 1998 #define M68K_TAG "m3commcpu" //////// Model 3 (main CPU @ C00xxxxx) and Hikaru (MMctrl bank 0E) interface -ADDRESS_MAP_START(m3comm_device::m3_map) - AM_RANGE(0x0000000, 0x000ffff) AM_READWRITE8(m3_comm_ram_r, m3_comm_ram_w, 0xffffffff) - AM_RANGE(0x0010000, 0x00101ff) AM_READWRITE16(m3_ioregs_r, m3_ioregs_w, 0xffff0000) - AM_RANGE(0x0020000, 0x003ffff) AM_READWRITE16(m3_m68k_ram_r, m3_m68k_ram_w, 0xffff0000) -ADDRESS_MAP_END +void m3comm_device::m3_map(address_map &map) +{ + map(0x0000000, 0x000ffff).rw(this, FUNC(m3comm_device::m3_comm_ram_r), FUNC(m3comm_device::m3_comm_ram_w)); + map(0x0010000, 0x00101ff).rw(this, FUNC(m3comm_device::m3_ioregs_r), FUNC(m3comm_device::m3_ioregs_w)).umask32(0xffff0000); + map(0x0020000, 0x003ffff).rw(this, FUNC(m3comm_device::m3_m68k_ram_r), FUNC(m3comm_device::m3_m68k_ram_w)).umask32(0xffff0000); +} /************************************* diff --git a/src/mame/machine/maple-dc.cpp b/src/mame/machine/maple-dc.cpp index 6583d1d0353..f607b2ca10c 100644 --- a/src/mame/machine/maple-dc.cpp +++ b/src/mame/machine/maple-dc.cpp @@ -7,14 +7,15 @@ DEFINE_DEVICE_TYPE(MAPLE_DC, maple_dc_device, "maple_dc", "Dreamcast Maple Bus") -ADDRESS_MAP_START(maple_dc_device::amap) - AM_RANGE(0x04, 0x07) AM_READWRITE(sb_mdstar_r, sb_mdstar_w) - AM_RANGE(0x10, 0x13) AM_READWRITE(sb_mdtsel_r, sb_mdtsel_w) - AM_RANGE(0x14, 0x17) AM_READWRITE(sb_mden_r, sb_mden_w) - AM_RANGE(0x18, 0x1b) AM_READWRITE(sb_mdst_r, sb_mdst_w) - AM_RANGE(0x80, 0x83) AM_READWRITE(sb_msys_r, sb_msys_w) - AM_RANGE(0x8c, 0x8f) AM_WRITE(sb_mdapro_w) -ADDRESS_MAP_END +void maple_dc_device::amap(address_map &map) +{ + map(0x04, 0x07).rw(this, FUNC(maple_dc_device::sb_mdstar_r), FUNC(maple_dc_device::sb_mdstar_w)); + map(0x10, 0x13).rw(this, FUNC(maple_dc_device::sb_mdtsel_r), FUNC(maple_dc_device::sb_mdtsel_w)); + map(0x14, 0x17).rw(this, FUNC(maple_dc_device::sb_mden_r), FUNC(maple_dc_device::sb_mden_w)); + map(0x18, 0x1b).rw(this, FUNC(maple_dc_device::sb_mdst_r), FUNC(maple_dc_device::sb_mdst_w)); + map(0x80, 0x83).rw(this, FUNC(maple_dc_device::sb_msys_r), FUNC(maple_dc_device::sb_msys_w)); + map(0x8c, 0x8f).w(this, FUNC(maple_dc_device::sb_mdapro_w)); +} maple_dc_device::maple_dc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, MAPLE_DC, tag, owner, clock) diff --git a/src/mame/machine/namco_c139.cpp b/src/mame/machine/namco_c139.cpp index 757bfedc49d..d28104dddb5 100644 --- a/src/mame/machine/namco_c139.cpp +++ b/src/mame/machine/namco_c139.cpp @@ -32,13 +32,14 @@ ADDRESS_MAP_START(namco_c139_device::data_map) AM_RANGE(0x0000, 0x3fff) AM_RAM AM_SHARE("sharedram") ADDRESS_MAP_END -ADDRESS_MAP_START(namco_c139_device::regs_map) - AM_RANGE(0x00, 0x01) AM_READ(status_r) // WRITE clears flags - AM_RANGE(0x02, 0x03) AM_NOP // settings? +void namco_c139_device::regs_map(address_map &map) +{ + map(0x00, 0x01).r(this, FUNC(namco_c139_device::status_r)); // WRITE clears flags + map(0x02, 0x03).noprw(); // settings? // AM_RANGE(0x0a, 0x0b) // WRITE tx_w // AM_RANGE(0x0c, 0x0d) // READ rx_r // AM_RANGE(0x0e, 0x0f) // -ADDRESS_MAP_END +} //------------------------------------------------- // namco_c139_device - constructor diff --git a/src/mame/machine/namco_c148.cpp b/src/mame/machine/namco_c148.cpp index b132af74f39..cfcc1a0ac86 100644 --- a/src/mame/machine/namco_c148.cpp +++ b/src/mame/machine/namco_c148.cpp @@ -75,25 +75,26 @@ namco_c148_device::namco_c148_device(const machine_config &mconfig, const char * } // (*) denotes master CPU only -ADDRESS_MAP_START(namco_c148_device::map) - AM_RANGE(0x04000, 0x05fff) AM_READWRITE8(bus_ctrl_r, bus_ctrl_w, 0x00ff) - AM_RANGE(0x06000, 0x07fff) AM_READWRITE8(cpu_irq_level_r,cpu_irq_level_w,0x00ff) // CPUIRQ lv - AM_RANGE(0x08000, 0x09fff) AM_READWRITE8(ex_irq_level_r,ex_irq_level_w,0x00ff) // EXIRQ lv - AM_RANGE(0x0a000, 0x0bfff) AM_READWRITE8(pos_irq_level_r,pos_irq_level_w,0x00ff) // POSIRQ lv - AM_RANGE(0x0c000, 0x0dfff) AM_READWRITE8(sci_irq_level_r,sci_irq_level_w,0x00ff) // SCIRQ lv - AM_RANGE(0x0e000, 0x0ffff) AM_READWRITE8(vblank_irq_level_r,vblank_irq_level_w,0x00ff) // VBlank IRQ lv - - AM_RANGE(0x10000, 0x11fff) AM_WRITE(cpu_irq_assert_w) - AM_RANGE(0x16000, 0x17fff) AM_READWRITE(cpu_irq_ack_r, cpu_irq_ack_w) // CPUIRQ ack - AM_RANGE(0x18000, 0x19fff) AM_READWRITE(ex_irq_ack_r, ex_irq_ack_w) // EXIRQ ack - AM_RANGE(0x1a000, 0x1bfff) AM_READWRITE(pos_irq_ack_r, pos_irq_ack_w) // POSIRQ ack - AM_RANGE(0x1c000, 0x1dfff) AM_READWRITE(sci_irq_ack_r, sci_irq_ack_w) // SCIRQ ack - AM_RANGE(0x1e000, 0x1ffff) AM_READWRITE(vblank_irq_ack_r, vblank_irq_ack_w) // VBlank IRQ ack - AM_RANGE(0x20000, 0x21fff) AM_READ8(ext_r,0x00ff) // EEPROM ready status (*) - AM_RANGE(0x22000, 0x23fff) AM_READNOP AM_WRITE8(ext1_w,0x00ff) // sound CPU reset (*) - AM_RANGE(0x24000, 0x25fff) AM_WRITE8(ext2_w,0x00ff) // slave & i/o reset (*) - AM_RANGE(0x26000, 0x27fff) AM_NOP // watchdog -ADDRESS_MAP_END +void namco_c148_device::map(address_map &map) +{ + map(0x04000, 0x05fff).rw(this, FUNC(namco_c148_device::bus_ctrl_r), FUNC(namco_c148_device::bus_ctrl_w)).umask16(0x00ff); + map(0x06000, 0x07fff).rw(this, FUNC(namco_c148_device::cpu_irq_level_r), FUNC(namco_c148_device::cpu_irq_level_w)).umask16(0x00ff); // CPUIRQ lv + map(0x08000, 0x09fff).rw(this, FUNC(namco_c148_device::ex_irq_level_r), FUNC(namco_c148_device::ex_irq_level_w)).umask16(0x00ff); // EXIRQ lv + map(0x0a000, 0x0bfff).rw(this, FUNC(namco_c148_device::pos_irq_level_r), FUNC(namco_c148_device::pos_irq_level_w)).umask16(0x00ff); // POSIRQ lv + map(0x0c000, 0x0dfff).rw(this, FUNC(namco_c148_device::sci_irq_level_r), FUNC(namco_c148_device::sci_irq_level_w)).umask16(0x00ff); // SCIRQ lv + map(0x0e000, 0x0ffff).rw(this, FUNC(namco_c148_device::vblank_irq_level_r), FUNC(namco_c148_device::vblank_irq_level_w)).umask16(0x00ff); // VBlank IRQ lv + + map(0x10000, 0x11fff).w(this, FUNC(namco_c148_device::cpu_irq_assert_w)); + map(0x16000, 0x17fff).rw(this, FUNC(namco_c148_device::cpu_irq_ack_r), FUNC(namco_c148_device::cpu_irq_ack_w)); // CPUIRQ ack + map(0x18000, 0x19fff).rw(this, FUNC(namco_c148_device::ex_irq_ack_r), FUNC(namco_c148_device::ex_irq_ack_w)); // EXIRQ ack + map(0x1a000, 0x1bfff).rw(this, FUNC(namco_c148_device::pos_irq_ack_r), FUNC(namco_c148_device::pos_irq_ack_w)); // POSIRQ ack + map(0x1c000, 0x1dfff).rw(this, FUNC(namco_c148_device::sci_irq_ack_r), FUNC(namco_c148_device::sci_irq_ack_w)); // SCIRQ ack + map(0x1e000, 0x1ffff).rw(this, FUNC(namco_c148_device::vblank_irq_ack_r), FUNC(namco_c148_device::vblank_irq_ack_w)); // VBlank IRQ ack + map(0x20000, 0x21fff).r(this, FUNC(namco_c148_device::ext_r)).umask16(0x00ff); // EEPROM ready status (*) + map(0x22000, 0x23fff).nopr().w(this, FUNC(namco_c148_device::ext1_w)).umask16(0x00ff); // sound CPU reset (*) + map(0x24000, 0x25fff).w(this, FUNC(namco_c148_device::ext2_w)).umask16(0x00ff); // slave & i/o reset (*) + map(0x26000, 0x27fff).noprw(); // watchdog +} diff --git a/src/mame/machine/naomibd.cpp b/src/mame/machine/naomibd.cpp index 64412e8c420..14b7777412a 100644 --- a/src/mame/machine/naomibd.cpp +++ b/src/mame/machine/naomibd.cpp @@ -60,18 +60,19 @@ Normal address starts with 0xa0000000 to enable auto-advance and 8MB ROM addressing mode. */ -ADDRESS_MAP_START(naomi_board::submap) - AM_RANGE(0x00, 0xff) AM_READ(default_r) - - AM_RANGE(0x00, 0x01) AM_WRITE(rom_offseth_w) - AM_RANGE(0x02, 0x03) AM_WRITE(rom_offsetl_w) - AM_RANGE(0x04, 0x05) AM_READWRITE(rom_data_r, rom_data_w) - AM_RANGE(0x06, 0x07) AM_WRITE(dma_offseth_w) - AM_RANGE(0x08, 0x09) AM_WRITE(dma_offsetl_w) - AM_RANGE(0x0a, 0x0b) AM_WRITE(dma_count_w) - AM_RANGE(0x3c, 0x3d) AM_WRITE(boardid_w) - AM_RANGE(0x3e, 0x3f) AM_READ(boardid_r) -ADDRESS_MAP_END +void naomi_board::submap(address_map &map) +{ + map(0x00, 0xff).r(this, FUNC(naomi_board::default_r)); + + map(0x00, 0x01).w(this, FUNC(naomi_board::rom_offseth_w)); + map(0x02, 0x03).w(this, FUNC(naomi_board::rom_offsetl_w)); + map(0x04, 0x05).rw(this, FUNC(naomi_board::rom_data_r), FUNC(naomi_board::rom_data_w)); + map(0x06, 0x07).w(this, FUNC(naomi_board::dma_offseth_w)); + map(0x08, 0x09).w(this, FUNC(naomi_board::dma_offsetl_w)); + map(0x0a, 0x0b).w(this, FUNC(naomi_board::dma_count_w)); + map(0x3c, 0x3d).w(this, FUNC(naomi_board::boardid_w)); + map(0x3e, 0x3f).r(this, FUNC(naomi_board::boardid_r)); +} naomi_board::naomi_board(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : naomi_g1_device(mconfig, type, tag, owner, clock) diff --git a/src/mame/machine/naomig1.cpp b/src/mame/machine/naomig1.cpp index 4964d0bbb58..226b2e45dc4 100644 --- a/src/mame/machine/naomig1.cpp +++ b/src/mame/machine/naomig1.cpp @@ -4,26 +4,27 @@ #include "emu.h" #include "machine/naomig1.h" -ADDRESS_MAP_START(naomi_g1_device::amap) - AM_RANGE(0x04, 0x07) AM_READWRITE(sb_gdstar_r, sb_gdstar_w) - AM_RANGE(0x08, 0x0b) AM_READWRITE(sb_gdlen_r, sb_gdlen_w) - AM_RANGE(0x0c, 0x0f) AM_READWRITE(sb_gddir_r, sb_gddir_w) - AM_RANGE(0x14, 0x17) AM_READWRITE(sb_gden_r, sb_gden_w) - AM_RANGE(0x18, 0x1b) AM_READWRITE(sb_gdst_r, sb_gdst_w) - AM_RANGE(0x80, 0x83) AM_WRITE(sb_g1rrc_w) - AM_RANGE(0x84, 0x87) AM_WRITE(sb_g1rwc_w) - AM_RANGE(0x88, 0x8b) AM_WRITE(sb_g1frc_w) - AM_RANGE(0x8c, 0x8f) AM_WRITE(sb_g1fwc_w) - AM_RANGE(0x90, 0x93) AM_WRITE(sb_g1crc_w) - AM_RANGE(0x94, 0x97) AM_WRITE(sb_g1cwc_w) - AM_RANGE(0xa0, 0xa3) AM_WRITE(sb_g1gdrc_w) - AM_RANGE(0xa4, 0xa7) AM_WRITE(sb_g1gdwc_w) - AM_RANGE(0xb0, 0xb3) AM_READ(sb_g1sysm_r) - AM_RANGE(0xb4, 0xb7) AM_WRITE(sb_g1crdyc_w) - AM_RANGE(0xb8, 0xbb) AM_WRITE(sb_gdapro_w) - AM_RANGE(0xf4, 0xf7) AM_READ(sb_gdstard_r) - AM_RANGE(0xf8, 0xfb) AM_READ(sb_gdlend_r) -ADDRESS_MAP_END +void naomi_g1_device::amap(address_map &map) +{ + map(0x04, 0x07).rw(this, FUNC(naomi_g1_device::sb_gdstar_r), FUNC(naomi_g1_device::sb_gdstar_w)); + map(0x08, 0x0b).rw(this, FUNC(naomi_g1_device::sb_gdlen_r), FUNC(naomi_g1_device::sb_gdlen_w)); + map(0x0c, 0x0f).rw(this, FUNC(naomi_g1_device::sb_gddir_r), FUNC(naomi_g1_device::sb_gddir_w)); + map(0x14, 0x17).rw(this, FUNC(naomi_g1_device::sb_gden_r), FUNC(naomi_g1_device::sb_gden_w)); + map(0x18, 0x1b).rw(this, FUNC(naomi_g1_device::sb_gdst_r), FUNC(naomi_g1_device::sb_gdst_w)); + map(0x80, 0x83).w(this, FUNC(naomi_g1_device::sb_g1rrc_w)); + map(0x84, 0x87).w(this, FUNC(naomi_g1_device::sb_g1rwc_w)); + map(0x88, 0x8b).w(this, FUNC(naomi_g1_device::sb_g1frc_w)); + map(0x8c, 0x8f).w(this, FUNC(naomi_g1_device::sb_g1fwc_w)); + map(0x90, 0x93).w(this, FUNC(naomi_g1_device::sb_g1crc_w)); + map(0x94, 0x97).w(this, FUNC(naomi_g1_device::sb_g1cwc_w)); + map(0xa0, 0xa3).w(this, FUNC(naomi_g1_device::sb_g1gdrc_w)); + map(0xa4, 0xa7).w(this, FUNC(naomi_g1_device::sb_g1gdwc_w)); + map(0xb0, 0xb3).r(this, FUNC(naomi_g1_device::sb_g1sysm_r)); + map(0xb4, 0xb7).w(this, FUNC(naomi_g1_device::sb_g1crdyc_w)); + map(0xb8, 0xbb).w(this, FUNC(naomi_g1_device::sb_gdapro_w)); + map(0xf4, 0xf7).r(this, FUNC(naomi_g1_device::sb_gdstard_r)); + map(0xf8, 0xfb).r(this, FUNC(naomi_g1_device::sb_gdlend_r)); +} naomi_g1_device::naomi_g1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, type, tag, owner, clock) diff --git a/src/mame/machine/nextkbd.cpp b/src/mame/machine/nextkbd.cpp index 827b7952aad..8e703ab6a94 100644 --- a/src/mame/machine/nextkbd.cpp +++ b/src/mame/machine/nextkbd.cpp @@ -6,14 +6,15 @@ DEFINE_DEVICE_TYPE(NEXTKBD, nextkbd_device, "nextkbd", "NeXT Keyboard") -ADDRESS_MAP_START(nextkbd_device::amap) - AM_RANGE(0x0, 0x3) AM_READWRITE8(status_snd_r, ctrl_snd_w, 0xff000000) - AM_RANGE(0x0, 0x3) AM_READWRITE8(status_kms_r, ctrl_kms_w, 0x00ff0000) - AM_RANGE(0x0, 0x3) AM_READWRITE8(status_dma_r, ctrl_dma_w, 0x0000ff00) - AM_RANGE(0x0, 0x3) AM_READWRITE8(status_cmd_r, ctrl_cmd_w, 0x000000ff) - AM_RANGE(0x4, 0x7) AM_READWRITE(cdata_r, cdata_w) - AM_RANGE(0x8, 0xb) AM_READWRITE(kmdata_r, kmdata_w) -ADDRESS_MAP_END +void nextkbd_device::amap(address_map &map) +{ + map(0x0, 0x0).rw(this, FUNC(nextkbd_device::status_snd_r), FUNC(nextkbd_device::ctrl_snd_w)); + map(0x1, 0x1).rw(this, FUNC(nextkbd_device::status_kms_r), FUNC(nextkbd_device::ctrl_kms_w)); + map(0x2, 0x2).rw(this, FUNC(nextkbd_device::status_dma_r), FUNC(nextkbd_device::ctrl_dma_w)); + map(0x3, 0x3).rw(this, FUNC(nextkbd_device::status_cmd_r), FUNC(nextkbd_device::ctrl_cmd_w)); + map(0x4, 0x7).rw(this, FUNC(nextkbd_device::cdata_r), FUNC(nextkbd_device::cdata_w)); + map(0x8, 0xb).rw(this, FUNC(nextkbd_device::kmdata_r), FUNC(nextkbd_device::kmdata_w)); +} nextkbd_device::nextkbd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, NEXTKBD, tag, owner, clock), diff --git a/src/mame/machine/nextmo.cpp b/src/mame/machine/nextmo.cpp index c7239dd976f..ea389a6cd8a 100644 --- a/src/mame/machine/nextmo.cpp +++ b/src/mame/machine/nextmo.cpp @@ -6,17 +6,18 @@ DEFINE_DEVICE_TYPE(NEXTMO, nextmo_device, "nextmo", "NeXT Magneto-optical drive") -ADDRESS_MAP_START(nextmo_device::map) - AM_RANGE(0x04, 0x04) AM_READWRITE(r4_r, r4_w) - AM_RANGE(0x05, 0x05) AM_READWRITE(r5_r, r5_w) - AM_RANGE(0x06, 0x06) AM_READWRITE(r6_r, r6_w) - AM_RANGE(0x07, 0x07) AM_READWRITE(r7_r, r7_w) - AM_RANGE(0x08, 0x08) AM_READWRITE(r8_r, r8_w) - AM_RANGE(0x09, 0x09) AM_READWRITE(r9_r, r9_w) - AM_RANGE(0x0a, 0x0a) AM_READWRITE(ra_r, ra_w) - AM_RANGE(0x0b, 0x0b) AM_READWRITE(rb_r, rb_w) - AM_RANGE(0x10, 0x17) AM_READWRITE(r10_r, r10_w) -ADDRESS_MAP_END +void nextmo_device::map(address_map &map) +{ + map(0x04, 0x04).rw(this, FUNC(nextmo_device::r4_r), FUNC(nextmo_device::r4_w)); + map(0x05, 0x05).rw(this, FUNC(nextmo_device::r5_r), FUNC(nextmo_device::r5_w)); + map(0x06, 0x06).rw(this, FUNC(nextmo_device::r6_r), FUNC(nextmo_device::r6_w)); + map(0x07, 0x07).rw(this, FUNC(nextmo_device::r7_r), FUNC(nextmo_device::r7_w)); + map(0x08, 0x08).rw(this, FUNC(nextmo_device::r8_r), FUNC(nextmo_device::r8_w)); + map(0x09, 0x09).rw(this, FUNC(nextmo_device::r9_r), FUNC(nextmo_device::r9_w)); + map(0x0a, 0x0a).rw(this, FUNC(nextmo_device::ra_r), FUNC(nextmo_device::ra_w)); + map(0x0b, 0x0b).rw(this, FUNC(nextmo_device::rb_r), FUNC(nextmo_device::rb_w)); + map(0x10, 0x17).rw(this, FUNC(nextmo_device::r10_r), FUNC(nextmo_device::r10_w)); +} nextmo_device::nextmo_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, NEXTMO, tag, owner, clock), diff --git a/src/mame/machine/prof80mmu.cpp b/src/mame/machine/prof80mmu.cpp index 6df56ee82c5..3e5409b7680 100644 --- a/src/mame/machine/prof80mmu.cpp +++ b/src/mame/machine/prof80mmu.cpp @@ -18,9 +18,10 @@ DEFINE_DEVICE_TYPE(PROF80_MMU, prof80_mmu_device, "prof80_mmu", "PROF80 MMU") -ADDRESS_MAP_START(prof80_mmu_device::z80_program_map) - AM_RANGE(0x0000, 0xffff) AM_READWRITE(program_r, program_w) -ADDRESS_MAP_END +void prof80_mmu_device::z80_program_map(address_map &map) +{ + map(0x0000, 0xffff).rw(this, FUNC(prof80_mmu_device::program_r), FUNC(prof80_mmu_device::program_w)); +} ADDRESS_MAP_START(prof80_mmu_device::program_map) ADDRESS_MAP_END diff --git a/src/mame/machine/wpc_shift.cpp b/src/mame/machine/wpc_shift.cpp index 0dd7c30fff9..59f9c6e42d9 100644 --- a/src/mame/machine/wpc_shift.cpp +++ b/src/mame/machine/wpc_shift.cpp @@ -15,12 +15,13 @@ wpc_shift_device::~wpc_shift_device() { } -ADDRESS_MAP_START(wpc_shift_device::registers) - AM_RANGE(0, 0) AM_READWRITE(adrh_r, adrh_w) - AM_RANGE(1, 1) AM_READWRITE(adrl_r, adrl_w) - AM_RANGE(2, 2) AM_READWRITE(val1_r, val1_w) - AM_RANGE(3, 3) AM_READWRITE(val2_r, val2_w) -ADDRESS_MAP_END +void wpc_shift_device::registers(address_map &map) +{ + map(0, 0).rw(this, FUNC(wpc_shift_device::adrh_r), FUNC(wpc_shift_device::adrh_w)); + map(1, 1).rw(this, FUNC(wpc_shift_device::adrl_r), FUNC(wpc_shift_device::adrl_w)); + map(2, 2).rw(this, FUNC(wpc_shift_device::val1_r), FUNC(wpc_shift_device::val1_w)); + map(3, 3).rw(this, FUNC(wpc_shift_device::val2_r), FUNC(wpc_shift_device::val2_w)); +} READ8_MEMBER(wpc_shift_device::adrh_r) -- cgit v1.2.3