From ea8b5cb36cd4666afa139d3d3c684977de8211de Mon Sep 17 00:00:00 2001 From: Robbbert Date: Thu, 12 Apr 2018 02:39:21 +1000 Subject: (nw) more address maps --- src/mame/drivers/age_candy.cpp | 7 ++++--- src/mame/drivers/argus.cpp | 9 +++++---- src/mame/drivers/bitgraph.cpp | 7 ++++--- src/mame/drivers/blocktax.cpp | 6 ++++-- src/mame/drivers/dooyong.cpp | 19 ++++++++++--------- src/mame/drivers/galgames.cpp | 13 +++++++------ src/mame/drivers/gladiatr.cpp | 11 ++++++----- src/mame/drivers/gsword.cpp | 29 +++++++++++++++-------------- src/mame/drivers/kyocera.cpp | 9 +++++---- 9 files changed, 60 insertions(+), 50 deletions(-) diff --git a/src/mame/drivers/age_candy.cpp b/src/mame/drivers/age_candy.cpp index 66bd429734c..4dd1d3e981f 100644 --- a/src/mame/drivers/age_candy.cpp +++ b/src/mame/drivers/age_candy.cpp @@ -47,9 +47,10 @@ void age_candy_state::machine_reset() #ifdef UNUSED_DEFINITION -ADDRESS_MAP_START(age_candy_state::age_candy_map) - AM_RANGE(0xc000, 0xffff) AM_ROM AM_REGION("maincpu", 0x4000) -ADDRESS_MAP_END +void age_candy_state::age_candy_map(address_map &map) +{ + map(0xc000, 0xffff).rom().region("maincpu", 0x4000); +} #endif MACHINE_CONFIG_START(age_candy_state::age_candy) diff --git a/src/mame/drivers/argus.cpp b/src/mame/drivers/argus.cpp index e0dc3d5eb4a..e2f0afdcab7 100644 --- a/src/mame/drivers/argus.cpp +++ b/src/mame/drivers/argus.cpp @@ -273,10 +273,11 @@ void argus_state::sound_map_b(address_map &map) } #if 0 -ADDRESS_MAP_START(argus_state::sound_portmap_1) - ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x01) AM_DEVREADWRITE("ym1", ym2203_device, read, write) -ADDRESS_MAP_END +void argus_state::sound_portmap_1(address_map &map) +{ + map.global_mask(0xff); + map(0x00, 0x01).rw("ym1", FUNC(ym2203_device::read), FUNC(ym2203_device::write)); +} #endif void argus_state::sound_portmap_2(address_map &map) diff --git a/src/mame/drivers/bitgraph.cpp b/src/mame/drivers/bitgraph.cpp index 3c5050c5901..9e956a85930 100644 --- a/src/mame/drivers/bitgraph.cpp +++ b/src/mame/drivers/bitgraph.cpp @@ -433,9 +433,10 @@ WRITE8_MEMBER(bitgraph_state::ppu_write) } #ifdef UNUSED_FUNCTION -ADDRESS_MAP_START(bitgraph_state::ppu_io) -// AM_RANGE(0x00, 0x00) AM_READ(ppu_irq) -ADDRESS_MAP_END +void bitgraph_state::ppu_io(address_map &map) +{ +// map(0x00, 0x00).r(this, FUNC(bitgraph_state::ppu_irq)); +} #endif /* diff --git a/src/mame/drivers/blocktax.cpp b/src/mame/drivers/blocktax.cpp index a3580471464..fbd8035707f 100644 --- a/src/mame/drivers/blocktax.cpp +++ b/src/mame/drivers/blocktax.cpp @@ -64,8 +64,10 @@ uint32_t blocktax_state::screen_update_blocktax(screen_device &screen, bitmap_in return 0; } -ADDRESS_MAP_START(blocktax_state::blocktax_map) -ADDRESS_MAP_END +//unused function +void blocktax_state::blocktax_map(address_map &map) +{ +} static INPUT_PORTS_START( blocktax ) INPUT_PORTS_END diff --git a/src/mame/drivers/dooyong.cpp b/src/mame/drivers/dooyong.cpp index 04e644e8a93..cbd1792218d 100644 --- a/src/mame/drivers/dooyong.cpp +++ b/src/mame/drivers/dooyong.cpp @@ -967,8 +967,8 @@ void popbingo_state::popbingo_map(address_map &map) map(0x0c4000, 0x0c400f).w(m_bg, FUNC(dooyong_rom_tilemap_device::ctrl_w)).umask16(0x00ff); map(0x0c4010, 0x0c401f).w(m_bg2, FUNC(dooyong_rom_tilemap_device::ctrl_w)).umask16(0x00ff); map(0x0c8000, 0x0c8fff).w(m_palette, FUNC(palette_device::write16)).share("palette"); - //AM_RANGE(0x08c000, 0x08c00f) AM_DEVWRITE8("fg", dooyong_rom_tilemap_device, ctrl_w, 0x00ff) apparently not present - //AM_RANGE(0x08c010, 0x08c01f) AM_DEVWRITE8("fg2", dooyong_rom_tilemap_device, ctrl_w, 0x00ff) apparently not present + //map(0x08c000, 0x08c00f) AM_DEVWRITE8("fg", dooyong_rom_tilemap_device, ctrl_w, 0x00ff) apparently not present + //map(0x08c010, 0x08c01f) AM_DEVWRITE8("fg2", dooyong_rom_tilemap_device, ctrl_w, 0x00ff) apparently not present map(0x0dc000, 0x0dc01f).ram(); // registers of some kind? } @@ -990,13 +990,14 @@ void dooyong_z80_ym2203_state::pollux_sound_map(address_map &map) map(0xf804, 0xf805).rw("ym2", FUNC(ym2203_device::read), FUNC(ym2203_device::write)); } -ADDRESS_MAP_START(dooyong_state::bluehawk_sound_map) - AM_RANGE(0x0000, 0xefff) AM_ROM - AM_RANGE(0xf000, 0xf7ff) AM_RAM - AM_RANGE(0xf800, 0xf800) AM_DEVREAD("soundlatch", generic_latch_8_device, read) - AM_RANGE(0xf808, 0xf809) AM_DEVREADWRITE("ymsnd", ym2151_device, read, write) - AM_RANGE(0xf80a, 0xf80a) AM_DEVREADWRITE("oki", okim6295_device, read, write) -ADDRESS_MAP_END +void dooyong_state::bluehawk_sound_map(address_map &map) +{ + map(0x0000, 0xefff).rom(); + map(0xf000, 0xf7ff).ram(); + map(0xf800, 0xf800).r("soundlatch", FUNC(generic_latch_8_device::read)); + map(0xf808, 0xf809).rw("ymsnd", FUNC(ym2151_device::read), FUNC(ym2151_device::write)); + map(0xf80a, 0xf80a).rw("oki", FUNC(okim6295_device::read), FUNC(okim6295_device::write)); +} /*************************************************************************** diff --git a/src/mame/drivers/galgames.cpp b/src/mame/drivers/galgames.cpp index 8e3a1f53725..8ebce2d3acb 100644 --- a/src/mame/drivers/galgames.cpp +++ b/src/mame/drivers/galgames.cpp @@ -559,12 +559,13 @@ WRITE_LINE_MEMBER(galgames_cart_device::eeprom_cs_write) // SLOT implementation -ADDRESS_MAP_START(galgames_slot_device::slot_map) - AM_RANGE( 0x000000, 0x1fffff ) AM_READ(rom0_r) - AM_RANGE( 0x000000, 0x03ffff ) AM_READWRITE(rom0_or_ram_r, ram_w) AM_SHARE("ram") - AM_RANGE( 0x200000, 0x3fffff ) AM_READ(rom_r) - AM_RANGE( 0x200000, 0x23ffff ) AM_READWRITE(rom_or_ram_r, ram_w) -ADDRESS_MAP_END +void galgames_slot_device::slot_map(address_map &map) +{ + map( 0x000000, 0x1fffff ).r(this, FUNC(galgames_slot_device::rom0_r)); + map( 0x000000, 0x03ffff ).rw(this, FUNC(galgames_slot_device::rom0_or_ram_r), FUNC(galgames_slot_device::ram_w)).share("ram"); + map( 0x200000, 0x3fffff ).r(this, FUNC(galgames_slot_device::rom_r)); + map( 0x200000, 0x23ffff ).rw(this, FUNC(galgames_slot_device::rom_or_ram_r), FUNC(galgames_slot_device::ram_w)); +} galgames_slot_device::galgames_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, GALGAMES_SLOT, tag, owner, clock), diff --git a/src/mame/drivers/gladiatr.cpp b/src/mame/drivers/gladiatr.cpp index 73236b13e32..b7f2372b017 100644 --- a/src/mame/drivers/gladiatr.cpp +++ b/src/mame/drivers/gladiatr.cpp @@ -639,7 +639,7 @@ void ppking_state::ppking_cpu1_io(address_map &map) { // ADDRESS_MAP_GLOBAL_MASK(0xff) map(0xc000, 0xc007).w("mainlatch", FUNC(ls259_device::write_d0)); -// AM_RANGE(0xc004, 0xc004) AM_NOP // WRITE(ppking_irq_patch_w) +// map(0xc004, 0xc004) AM_NOP // WRITE(ppking_irq_patch_w) map(0xc09e, 0xc09f).r(this, FUNC(ppking_state::ppking_qx0_r)).w(this, FUNC(ppking_state::ppking_qx0_w)); map(0xc0bf, 0xc0bf).noprw(); // watchdog map(0xc0c0, 0xc0c1).r(this, FUNC(ppking_state::ppking_qxcomu_r)).w(this, FUNC(ppking_state::ppking_qxcomu_w)); @@ -671,10 +671,11 @@ void gladiatr_state::gladiatr_cpu1_map(address_map &map) map(0xf000, 0xf7ff).ram().share("nvram"); /* battery backed RAM */ } -ADDRESS_MAP_START(gladiatr_state_base::cpu2_map) - AM_RANGE(0x0000, 0x7fff) AM_ROM - AM_RANGE(0x8000, 0x83ff) AM_RAM -ADDRESS_MAP_END +void gladiatr_state_base::cpu2_map(address_map &map) +{ + map(0x0000, 0x7fff).rom(); + map(0x8000, 0x83ff).ram(); +} void gladiatr_state::gladiatr_cpu3_map(address_map &map) { diff --git a/src/mame/drivers/gsword.cpp b/src/mame/drivers/gsword.cpp index 9607097977a..f58a6adfc01 100644 --- a/src/mame/drivers/gsword.cpp +++ b/src/mame/drivers/gsword.cpp @@ -455,19 +455,20 @@ void josvolly_state::machine_reset() } -ADDRESS_MAP_START(gsword_state_base::cpu1_map) - AM_RANGE(0x0000, 0x8fff) AM_ROM - AM_RANGE(0x9000, 0x9fff) AM_RAM - AM_RANGE(0xa000, 0xa37f) AM_RAM - AM_RANGE(0xa380, 0xa3ff) AM_RAM AM_SHARE("spritetile_ram") - AM_RANGE(0xa400, 0xa77f) AM_RAM - AM_RANGE(0xa780, 0xa7ff) AM_RAM AM_SHARE("spritexy_ram") - AM_RANGE(0xa980, 0xa980) AM_WRITE(charbank_w) - AM_RANGE(0xaa80, 0xaa80) AM_WRITE(videoctrl_w) /* flip screen, char palette bank */ - AM_RANGE(0xab00, 0xab00) AM_WRITE(scroll_w) - AM_RANGE(0xab80, 0xabff) AM_WRITEONLY AM_SHARE("spriteattram") - AM_RANGE(0xb000, 0xb7ff) AM_RAM_WRITE(videoram_w) AM_SHARE("videoram") -ADDRESS_MAP_END +void gsword_state_base::cpu1_map(address_map &map) +{ + map(0x0000, 0x8fff).rom(); + map(0x9000, 0x9fff).ram(); + map(0xa000, 0xa37f).ram(); + map(0xa380, 0xa3ff).ram().share("spritetile_ram"); + map(0xa400, 0xa77f).ram(); + map(0xa780, 0xa7ff).ram().share("spritexy_ram"); + map(0xa980, 0xa980).w(this, FUNC(gsword_state_base::charbank_w)); + map(0xaa80, 0xaa80).w(this, FUNC(gsword_state_base::videoctrl_w)); /* flip screen, char palette bank */ + map(0xab00, 0xab00).w(this, FUNC(gsword_state_base::scroll_w)); + map(0xab80, 0xabff).writeonly().share("spriteattram"); + map(0xb000, 0xb7ff).readonly().w(this, FUNC(gsword_state_base::videoram_w)).share("videoram"); +} void gsword_state::cpu1_io_map(address_map &map) @@ -521,7 +522,7 @@ void josvolly_state::josvolly_cpu2_map(address_map &map) /* NEC D8255A with silkscreen removed and replaced with "AA 007" */ map(0x8000, 0x8003).rw("aa_007", FUNC(i8255_device::read), FUNC(i8255_device::write)); -// AM_RANGE(0x6000, 0x6000) AM_WRITE(adpcm_soundcommand_w) +// map(0x6000, 0x6000) AM_WRITE(adpcm_soundcommand_w) map(0xA000, 0xA001).rw("mcu2", FUNC(upi41_cpu_device::upi41_master_r), FUNC(upi41_cpu_device::upi41_master_w)); } diff --git a/src/mame/drivers/kyocera.cpp b/src/mame/drivers/kyocera.cpp index 27b94b010a4..75db227e023 100644 --- a/src/mame/drivers/kyocera.cpp +++ b/src/mame/drivers/kyocera.cpp @@ -599,10 +599,11 @@ void kc85_state::kc85_io(address_map &map) map(0xf0, 0xf1).mirror(0x0e).rw(this, FUNC(kc85_state::lcd_r), FUNC(kc85_state::lcd_w)); } -ADDRESS_MAP_START(kc85_state::trsm100_io) - AM_IMPORT_FROM(kc85_io) - AM_RANGE(0xa0, 0xa0) AM_MIRROR(0x0f) AM_WRITE(modem_w) -ADDRESS_MAP_END +void kc85_state::trsm100_io(address_map &map) +{ + kc85_io(map); + map(0xa0, 0xa0).mirror(0x0f).w(this, FUNC(kc85_state::modem_w)); +} void pc8201_state::pc8201_io(address_map &map) { -- cgit v1.2.3