diff options
author | Ivan Vangelista <mesgnet@yahoo.it> | 2018-12-18 18:38:59 +0100 |
---|---|---|
committer | Ivan Vangelista <mesgnet@yahoo.it> | 2018-12-18 18:38:59 +0100 |
commit | 3f609b8cb8d49cd259d223e001d38235b1ddd619 (patch) | |
tree | 8de32fdac04aeda5c12e5623b54c6e6e9efe0e49 | |
parent | 0868e31f8904d99c6314c3728940f3383dc21ac3 (diff) |
src/mame: more MCFG macros removal (nw)
-rw-r--r-- | src/mame/drivers/batman.cpp | 11 | ||||
-rw-r--r-- | src/mame/drivers/cclimber.cpp | 24 | ||||
-rw-r--r-- | src/mame/drivers/cybstorm.cpp | 11 | ||||
-rw-r--r-- | src/mame/drivers/jongkyo.cpp | 17 | ||||
-rw-r--r-- | src/mame/drivers/offtwall.cpp | 7 | ||||
-rw-r--r-- | src/mame/drivers/pengo.cpp | 13 | ||||
-rw-r--r-- | src/mame/drivers/relief.cpp | 9 | ||||
-rw-r--r-- | src/mame/drivers/segag80r.cpp | 31 | ||||
-rw-r--r-- | src/mame/drivers/segas16a.cpp | 2 | ||||
-rw-r--r-- | src/mame/drivers/senjyo.cpp | 30 | ||||
-rw-r--r-- | src/mame/drivers/sg1000a.cpp | 15 | ||||
-rw-r--r-- | src/mame/drivers/shuuz.cpp | 7 | ||||
-rw-r--r-- | src/mame/drivers/suprloco.cpp | 10 | ||||
-rw-r--r-- | src/mame/drivers/system1.cpp | 18 | ||||
-rw-r--r-- | src/mame/drivers/thunderj.cpp | 11 | ||||
-rw-r--r-- | src/mame/drivers/turbo.cpp | 15 | ||||
-rw-r--r-- | src/mame/drivers/zaxxon.cpp | 50 | ||||
-rw-r--r-- | src/mame/machine/segacrpt_device.h | 17 | ||||
-rw-r--r-- | src/mame/video/atarivad.h | 52 |
19 files changed, 154 insertions, 196 deletions
diff --git a/src/mame/drivers/batman.cpp b/src/mame/drivers/batman.cpp index dff51673e27..635108e3418 100644 --- a/src/mame/drivers/batman.cpp +++ b/src/mame/drivers/batman.cpp @@ -198,11 +198,12 @@ MACHINE_CONFIG_START(batman_state::batman) MCFG_PALETTE_ADD("palette", 2048) MCFG_PALETTE_FORMAT(IRRRRRGGGGGBBBBB) - MCFG_ATARI_VAD_ADD("vad", "screen", INPUTLINE("maincpu", M68K_IRQ_4)) - MCFG_ATARI_VAD_PLAYFIELD(batman_state, "gfxdecode", get_playfield_tile_info) - MCFG_ATARI_VAD_PLAYFIELD2(batman_state, "gfxdecode", get_playfield2_tile_info) - MCFG_ATARI_VAD_ALPHA(batman_state, "gfxdecode", get_alpha_tile_info) - MCFG_ATARI_VAD_MOB(batman_state::s_mob_config, "gfxdecode") + ATARI_VAD(config, m_vad, 0, m_screen); + m_vad->scanline_int_cb().set_inputline(m_maincpu, M68K_IRQ_4); + TILEMAP(config, "vad:playfield", "gfxdecode", 2, 8, 8, TILEMAP_SCAN_COLS, 64, 64).set_info_callback(DEVICE_SELF_OWNER, FUNC(batman_state::get_playfield_tile_info)); + TILEMAP(config, "vad:playfield2", "gfxdecode", 2, 8, 8, TILEMAP_SCAN_COLS, 64, 64, 0).set_info_callback(DEVICE_SELF_OWNER, FUNC(batman_state::get_playfield2_tile_info)); + TILEMAP(config, "vad:alpha", "gfxdecode", 2, 8, 8, TILEMAP_SCAN_ROWS, 64, 32, 0).set_info_callback(DEVICE_SELF_OWNER, FUNC(batman_state::get_alpha_tile_info)); + ATARI_MOTION_OBJECTS(config, "vad:mob", 0, m_screen, batman_state::s_mob_config).set_gfxdecode("gfxdecode"); MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK) diff --git a/src/mame/drivers/cclimber.cpp b/src/mame/drivers/cclimber.cpp index 96f8a320b76..d7d757d4ed5 100644 --- a/src/mame/drivers/cclimber.cpp +++ b/src/mame/drivers/cclimber.cpp @@ -1190,11 +1190,11 @@ MACHINE_CONFIG_START(cclimber_state::yamato) root(config); /* basic machine hardware */ - MCFG_DEVICE_REPLACE(m_maincpu, SEGA_315_5018, XTAL(18'432'000)/3/2) /* 3.072 MHz */ - MCFG_DEVICE_PROGRAM_MAP(yamato_map) - MCFG_DEVICE_IO_MAP(yamato_portmap) - MCFG_DEVICE_OPCODES_MAP(yamato_decrypted_opcodes_map) - MCFG_SEGACRPT_SET_DECRYPTED_TAG(":decrypted_opcodes") + sega_315_5018_device &maincpu(SEGA_315_5018(config.replace(), m_maincpu, XTAL(18'432'000)/3/2)); /* 3.072 MHz */ + maincpu.set_addrmap(AS_PROGRAM, &cclimber_state::yamato_map); + maincpu.set_addrmap(AS_IO, &cclimber_state::yamato_portmap); + maincpu.set_addrmap(AS_OPCODES, &cclimber_state::yamato_decrypted_opcodes_map); + maincpu.set_decrypted_tag(":decrypted_opcodes"); MCFG_DEVICE_ADD("audiocpu", Z80, 3072000) /* 3.072 MHz ? */ MCFG_DEVICE_PROGRAM_MAP(yamato_audio_map) @@ -1219,13 +1219,13 @@ MACHINE_CONFIG_END MACHINE_CONFIG_START(cclimber_state::toprollr) cclimber(config); - MCFG_DEVICE_REPLACE(m_maincpu, SEGA_315_5018, XTAL(18'432'000)/3/2) /* 3.072 MHz */ - MCFG_DEVICE_PROGRAM_MAP(toprollr_map) - MCFG_DEVICE_IO_MAP(cclimber_portmap) - MCFG_DEVICE_OPCODES_MAP(toprollr_decrypted_opcodes_map) - MCFG_SEGACRPT_SET_SIZE(0) - MCFG_SEGACRPT_SET_NUMBANKS(3) - MCFG_SEGACRPT_SET_BANKSIZE(0x6000) + sega_315_5018_device &maincpu(SEGA_315_5018(config.replace(), m_maincpu, XTAL(18'432'000)/3/2)); /* 3.072 MHz */ + maincpu.set_addrmap(AS_PROGRAM, &cclimber_state::toprollr_map); + maincpu.set_addrmap(AS_IO, &cclimber_state::cclimber_portmap); + maincpu.set_addrmap(AS_OPCODES, &cclimber_state::toprollr_decrypted_opcodes_map); + maincpu.set_size(0); + maincpu.set_numbanks(3); + maincpu.set_banksize(0x6000); m_mainlatch->q_out_cb<5>().set(FUNC(cclimber_state::toprollr_rombank_w)); m_mainlatch->q_out_cb<6>().set(FUNC(cclimber_state::toprollr_rombank_w)); diff --git a/src/mame/drivers/cybstorm.cpp b/src/mame/drivers/cybstorm.cpp index eddde4c4a7d..46083346386 100644 --- a/src/mame/drivers/cybstorm.cpp +++ b/src/mame/drivers/cybstorm.cpp @@ -233,11 +233,12 @@ MACHINE_CONFIG_START(cybstorm_state::round2) WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ - MCFG_ATARI_VAD_ADD("vad", "screen", INPUTLINE("maincpu", M68K_IRQ_4)) - MCFG_ATARI_VAD_PLAYFIELD(cybstorm_state, "gfxdecode", get_playfield_tile_info) - MCFG_ATARI_VAD_PLAYFIELD2(cybstorm_state, "gfxdecode", get_playfield2_tile_info) - MCFG_ATARI_VAD_ALPHA(cybstorm_state, "gfxdecode", get_alpha_tile_info) - MCFG_ATARI_VAD_MOB(cybstorm_state::s_mob_config, "gfxdecode") + ATARI_VAD(config, m_vad, 0, m_screen); + m_vad->scanline_int_cb().set_inputline(m_maincpu, M68K_IRQ_4); + TILEMAP(config, "vad:playfield", m_gfxdecode, 2, 8, 8, TILEMAP_SCAN_COLS, 64, 64).set_info_callback(DEVICE_SELF_OWNER, FUNC(cybstorm_state::get_playfield_tile_info)); + TILEMAP(config, "vad:playfield2", m_gfxdecode, 2, 8, 8, TILEMAP_SCAN_COLS, 64, 64, 0).set_info_callback(DEVICE_SELF_OWNER, FUNC(cybstorm_state::get_playfield2_tile_info)); + TILEMAP(config, "vad:alpha", m_gfxdecode, 2, 8, 8, TILEMAP_SCAN_ROWS, 64, 32, 0).set_info_callback(DEVICE_SELF_OWNER, FUNC(cybstorm_state::get_alpha_tile_info)); + ATARI_MOTION_OBJECTS(config, "vad:mob", 0, m_screen, cybstorm_state::s_mob_config).set_gfxdecode(m_gfxdecode); ADDRESS_MAP_BANK(config, "vadbank").set_map(&cybstorm_state::vadbank_map).set_options(ENDIANNESS_BIG, 16, 32, 0x90000); diff --git a/src/mame/drivers/jongkyo.cpp b/src/mame/drivers/jongkyo.cpp index 9966792c7a8..1fafaa3a7f1 100644 --- a/src/mame/drivers/jongkyo.cpp +++ b/src/mame/drivers/jongkyo.cpp @@ -513,15 +513,14 @@ void jongkyo_state::machine_reset() MACHINE_CONFIG_START(jongkyo_state::jongkyo) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", SEGA_315_5084,JONGKYO_CLOCK/4) - MCFG_DEVICE_PROGRAM_MAP(jongkyo_memmap) - MCFG_DEVICE_IO_MAP(jongkyo_portmap) - MCFG_DEVICE_OPCODES_MAP(decrypted_opcodes_map) - MCFG_DEVICE_VBLANK_INT_DRIVER("screen", jongkyo_state, irq0_line_hold) - MCFG_SEGACRPT_SET_SIZE(0x6c00) - MCFG_SEGACRPT_SET_NUMBANKS(8) - MCFG_SEGACRPT_SET_BANKSIZE(0x400) - // sega_decode(rom, opcodes, 0x6c00, convtable, 8, 0x400); + sega_315_5084_device &maincpu(SEGA_315_5084(config, m_maincpu, JONGKYO_CLOCK/4)); + maincpu.set_addrmap(AS_PROGRAM, &jongkyo_state::jongkyo_memmap); + maincpu.set_addrmap(AS_IO, &jongkyo_state::jongkyo_portmap); + maincpu.set_addrmap(AS_OPCODES, &jongkyo_state::decrypted_opcodes_map); + maincpu.set_vblank_int("screen", FUNC(jongkyo_state::irq0_line_hold)); + maincpu.set_size(0x6c00); + maincpu.set_numbanks(8); + maincpu.set_banksize(0x400); /* video hardware */ diff --git a/src/mame/drivers/offtwall.cpp b/src/mame/drivers/offtwall.cpp index 726bfb624f7..348d182c4c0 100644 --- a/src/mame/drivers/offtwall.cpp +++ b/src/mame/drivers/offtwall.cpp @@ -351,9 +351,10 @@ MACHINE_CONFIG_START(offtwall_state::offtwall) MCFG_PALETTE_ADD("palette", 2048) MCFG_PALETTE_FORMAT(IRRRRRGGGGGBBBBB) - MCFG_ATARI_VAD_ADD("vad", "screen", INPUTLINE("maincpu", M68K_IRQ_4)) - MCFG_ATARI_VAD_PLAYFIELD(offtwall_state, "gfxdecode", get_playfield_tile_info) - MCFG_ATARI_VAD_MOB(offtwall_state::s_mob_config, "gfxdecode") + ATARI_VAD(config, m_vad, 0, "screen"); + m_vad->scanline_int_cb().set_inputline(m_maincpu, M68K_IRQ_4); + TILEMAP(config, "vad:playfield", "gfxdecode", 2, 8, 8, TILEMAP_SCAN_COLS, 64, 64).set_info_callback(DEVICE_SELF_OWNER, FUNC(offtwall_state::get_playfield_tile_info)); + ATARI_MOTION_OBJECTS(config, "vad:mob", 0, "screen", offtwall_state::s_mob_config).set_gfxdecode("gfxdecode"); MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK) diff --git a/src/mame/drivers/pengo.cpp b/src/mame/drivers/pengo.cpp index 7ef72f6978c..cac15403ed8 100644 --- a/src/mame/drivers/pengo.cpp +++ b/src/mame/drivers/pengo.cpp @@ -432,13 +432,14 @@ MACHINE_CONFIG_START(pengo_state::pengou) MCFG_DEVICE_REMOVE_ADDRESS_MAP(AS_OPCODES) MACHINE_CONFIG_END -MACHINE_CONFIG_START(pengo_state::pengoe) +void pengo_state::pengoe(machine_config &config) +{ pengo(config); - MCFG_DEVICE_REPLACE("maincpu", SEGA_315_5010, MASTER_CLOCK/6) - MCFG_DEVICE_PROGRAM_MAP(pengo_map) - MCFG_DEVICE_OPCODES_MAP(decrypted_opcodes_map) - MCFG_SEGACRPT_SET_DECRYPTED_TAG(":decrypted_opcodes") -MACHINE_CONFIG_END + sega_315_5010_device &maincpu(SEGA_315_5010(config.replace(), m_maincpu, MASTER_CLOCK/6)); + maincpu.set_addrmap(AS_PROGRAM, &pengo_state::pengo_map); + maincpu.set_addrmap(AS_OPCODES, &pengo_state::decrypted_opcodes_map); + maincpu.set_decrypted_tag(":decrypted_opcodes"); +} MACHINE_CONFIG_START(pengo_state::jrpacmbl) pengo(config); diff --git a/src/mame/drivers/relief.cpp b/src/mame/drivers/relief.cpp index 05ec9f00b35..691b9c380d9 100644 --- a/src/mame/drivers/relief.cpp +++ b/src/mame/drivers/relief.cpp @@ -270,10 +270,11 @@ MACHINE_CONFIG_START(relief_state::relief) MCFG_PALETTE_ADD("palette", 2048) MCFG_PALETTE_FORMAT(IRRRRRGGGGGBBBBB) - MCFG_ATARI_VAD_ADD("vad", "screen", INPUTLINE("maincpu", M68K_IRQ_4)) - MCFG_ATARI_VAD_PLAYFIELD(relief_state, "gfxdecode", get_playfield_tile_info) - MCFG_ATARI_VAD_PLAYFIELD2(relief_state, "gfxdecode", get_playfield2_tile_info) - MCFG_ATARI_VAD_MOB(relief_state::s_mob_config, "gfxdecode") + ATARI_VAD(config, m_vad, 0, m_screen); + m_vad->scanline_int_cb().set_inputline(m_maincpu, M68K_IRQ_4); + TILEMAP(config, "vad:playfield", m_gfxdecode, 2, 8, 8, TILEMAP_SCAN_COLS, 64, 64).set_info_callback(DEVICE_SELF_OWNER, FUNC(relief_state::get_playfield_tile_info)); + TILEMAP(config, "vad:playfield2", m_gfxdecode, 2, 8, 8, TILEMAP_SCAN_COLS, 64, 64, 0).set_info_callback(DEVICE_SELF_OWNER, FUNC(relief_state::get_playfield2_tile_info)); + ATARI_MOTION_OBJECTS(config, "vad:mob", 0, m_screen, relief_state::s_mob_config).set_gfxdecode(m_gfxdecode); MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK) diff --git a/src/mame/drivers/segag80r.cpp b/src/mame/drivers/segag80r.cpp index 33546daf5de..5617a7caf93 100644 --- a/src/mame/drivers/segag80r.cpp +++ b/src/mame/drivers/segag80r.cpp @@ -920,16 +920,17 @@ MACHINE_CONFIG_START(segag80r_state::monsterb) MCFG_DEVICE_ADD(m_soundbrd, MONSTERB_SOUND, 0) MACHINE_CONFIG_END -MACHINE_CONFIG_START(segag80r_state::monster2) +void segag80r_state::monster2(machine_config &config) +{ monsterb(config); - MCFG_DEVICE_REPLACE("maincpu", SEGA_315_SPAT, VIDEO_CLOCK/4) - MCFG_DEVICE_PROGRAM_MAP(main_map) - MCFG_DEVICE_IO_MAP(main_ppi8255_portmap) - MCFG_DEVICE_VBLANK_INT_DRIVER("screen", segag80r_state, segag80r_vblank_start) - MCFG_DEVICE_IRQ_ACKNOWLEDGE_DRIVER(segag80r_state, segag80r_irq_ack) - MCFG_DEVICE_OPCODES_MAP(sega_315_opcodes_map) - MCFG_SEGACRPT_SET_DECRYPTED_TAG(":decrypted_opcodes") -MACHINE_CONFIG_END + sega_315_spat_device &maincpu(SEGA_315_SPAT(config.replace(), m_maincpu, VIDEO_CLOCK/4)); + maincpu.set_addrmap(AS_PROGRAM, &segag80r_state::main_map); + maincpu.set_addrmap(AS_IO, &segag80r_state::main_ppi8255_portmap); + maincpu.set_vblank_int("screen", FUNC(segag80r_state::segag80r_vblank_start)); + maincpu.set_irq_acknowledge_callback(FUNC(segag80r_state::segag80r_irq_ack)); + maincpu.set_addrmap(AS_OPCODES, &segag80r_state::sega_315_opcodes_map); + maincpu.set_decrypted_tag(":decrypted_opcodes"); +} MACHINE_CONFIG_START(segag80r_state::pignewt) g80r_base(config); @@ -953,12 +954,12 @@ MACHINE_CONFIG_START(segag80r_state::sindbadm) g80r_base(config); /* basic machine hardware */ - MCFG_DEVICE_REPLACE("maincpu", SEGA_315_5028, VIDEO_CLOCK/4) - MCFG_DEVICE_PROGRAM_MAP(main_map) - MCFG_DEVICE_IO_MAP(sindbadm_portmap) - MCFG_DEVICE_OPCODES_MAP(sega_315_opcodes_map) - MCFG_DEVICE_VBLANK_INT_DRIVER("screen", segag80r_state, sindbadm_vblank_start) - MCFG_SEGACRPT_SET_DECRYPTED_TAG(":decrypted_opcodes") + sega_315_5028_device &maincpu(SEGA_315_5028(config.replace(), m_maincpu, VIDEO_CLOCK/4)); + maincpu.set_addrmap(AS_PROGRAM, &segag80r_state::main_map); + maincpu.set_addrmap(AS_IO, &segag80r_state::sindbadm_portmap); + maincpu.set_addrmap(AS_OPCODES, &segag80r_state::sega_315_opcodes_map); + maincpu.set_vblank_int("screen", FUNC(segag80r_state::sindbadm_vblank_start)); + maincpu.set_decrypted_tag(":decrypted_opcodes"); i8255_device &ppi(I8255A(config, "ppi8255")); ppi.in_pb_callback().set_ioport("FC"); diff --git a/src/mame/drivers/segas16a.cpp b/src/mame/drivers/segas16a.cpp index 547e9ed959a..406e2e345b6 100644 --- a/src/mame/drivers/segas16a.cpp +++ b/src/mame/drivers/segas16a.cpp @@ -2092,7 +2092,7 @@ void segas16a_state::system16a_no7751p(machine_config &config) z80.set_addrmap(AS_PROGRAM, &segas16a_state::sound_map); z80.set_addrmap(AS_IO, &segas16a_state::sound_no7751_portmap); z80.set_addrmap(AS_OPCODES, &segas16a_state::sound_decrypted_opcodes_map); - z80.set_decrypted_tag(":sound_decrypted_opcodes"); + z80.set_decrypted_tag(m_sound_decrypted_opcodes); } /* diff --git a/src/mame/drivers/senjyo.cpp b/src/mame/drivers/senjyo.cpp index 0b12a9eefab..24788b1b487 100644 --- a/src/mame/drivers/senjyo.cpp +++ b/src/mame/drivers/senjyo.cpp @@ -604,23 +604,25 @@ MACHINE_CONFIG_END -MACHINE_CONFIG_START(senjyo_state::senjyox_e) +void senjyo_state::senjyox_e(machine_config &config) +{ senjyo(config); - MCFG_DEVICE_REPLACE("maincpu", SEGA_315_5015, 4000000) /* 4 MHz? */ - MCFG_DEVICE_PROGRAM_MAP(senjyo_map) - MCFG_DEVICE_OPCODES_MAP(decrypted_opcodes_map) - MCFG_DEVICE_VBLANK_INT_DRIVER("screen", senjyo_state, irq0_line_assert) - MCFG_SEGACRPT_SET_DECRYPTED_TAG(":decrypted_opcodes") -MACHINE_CONFIG_END + sega_315_5015_device &maincpu(SEGA_315_5015(config.replace(), m_maincpu, 4000000)); /* 4 MHz? */ + maincpu.set_addrmap(AS_PROGRAM, &senjyo_state::senjyo_map); + maincpu.set_addrmap(AS_OPCODES, &senjyo_state::decrypted_opcodes_map); + maincpu.set_vblank_int("screen", FUNC(senjyo_state::irq0_line_assert)); + maincpu.set_decrypted_tag(":decrypted_opcodes"); +} -MACHINE_CONFIG_START(senjyo_state::senjyox_a) +void senjyo_state::senjyox_a(machine_config &config) +{ senjyo(config); - MCFG_DEVICE_REPLACE("maincpu", SEGA_315_5018, 4000000) /* 4 MHz? */ - MCFG_DEVICE_PROGRAM_MAP(senjyo_map) - MCFG_DEVICE_OPCODES_MAP(decrypted_opcodes_map) - MCFG_DEVICE_VBLANK_INT_DRIVER("screen", senjyo_state, irq0_line_assert) - MCFG_SEGACRPT_SET_DECRYPTED_TAG(":decrypted_opcodes") -MACHINE_CONFIG_END + sega_315_5018_device &maincpu(SEGA_315_5018(config.replace(), m_maincpu, 4000000)); /* 4 MHz? */ + maincpu.set_addrmap(AS_PROGRAM, &senjyo_state::senjyo_map); + maincpu.set_addrmap(AS_OPCODES, &senjyo_state::decrypted_opcodes_map); + maincpu.set_vblank_int("screen", FUNC(senjyo_state::irq0_line_assert)); + maincpu.set_decrypted_tag(":decrypted_opcodes"); +} MACHINE_CONFIG_START(senjyo_state::starforb) diff --git a/src/mame/drivers/sg1000a.cpp b/src/mame/drivers/sg1000a.cpp index b85ddcef14f..0bd5a5cbcd1 100644 --- a/src/mame/drivers/sg1000a.cpp +++ b/src/mame/drivers/sg1000a.cpp @@ -494,14 +494,15 @@ MACHINE_CONFIG_START(sg1000a_state::sg1000a) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) MACHINE_CONFIG_END -MACHINE_CONFIG_START(sg1000a_state::sg1000ax) +void sg1000a_state::sg1000ax(machine_config &config) +{ sg1000a(config); - MCFG_DEVICE_REPLACE("maincpu", SEGA_315_5033, XTAL(3'579'545)) - MCFG_DEVICE_PROGRAM_MAP(program_map) - MCFG_DEVICE_IO_MAP(io_map) - MCFG_DEVICE_OPCODES_MAP(decrypted_opcodes_map) - MCFG_SEGACRPT_SET_DECRYPTED_TAG(":decrypted_opcodes") -MACHINE_CONFIG_END + sega_315_5033_device &maincpu(SEGA_315_5033(config.replace(), m_maincpu, XTAL(3'579'545))); + maincpu.set_addrmap(AS_PROGRAM, &sg1000a_state::program_map); + maincpu.set_addrmap(AS_IO, &sg1000a_state::io_map); + maincpu.set_addrmap(AS_OPCODES, &sg1000a_state::decrypted_opcodes_map); + maincpu.set_decrypted_tag(":decrypted_opcodes"); +} MACHINE_CONFIG_START(sg1000a_state::sderbys) sg1000a(config); diff --git a/src/mame/drivers/shuuz.cpp b/src/mame/drivers/shuuz.cpp index 358ff950a99..79ec00cf1c4 100644 --- a/src/mame/drivers/shuuz.cpp +++ b/src/mame/drivers/shuuz.cpp @@ -248,9 +248,10 @@ MACHINE_CONFIG_START(shuuz_state::shuuz) MCFG_PALETTE_ADD("palette", 1024) MCFG_PALETTE_FORMAT(IRRRRRGGGGGBBBBB) - MCFG_ATARI_VAD_ADD("vad", "screen", WRITELINE(*this, shuuz_state, scanline_int_write_line)) - MCFG_ATARI_VAD_PLAYFIELD(shuuz_state, "gfxdecode", get_playfield_tile_info) - MCFG_ATARI_VAD_MOB(shuuz_state::s_mob_config, "gfxdecode") + ATARI_VAD(config, m_vad, 0, m_screen); + m_vad->scanline_int_cb().set(FUNC(shuuz_state::scanline_int_write_line)); + TILEMAP(config, "vad:playfield", m_gfxdecode, 2, 8, 8, TILEMAP_SCAN_COLS, 64, 64).set_info_callback(DEVICE_SELF_OWNER, FUNC(shuuz_state::get_playfield_tile_info)); + ATARI_MOTION_OBJECTS(config, "vad:mob", 0, m_screen, shuuz_state::s_mob_config).set_gfxdecode(m_gfxdecode); MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK) diff --git a/src/mame/drivers/suprloco.cpp b/src/mame/drivers/suprloco.cpp index dbab7bf7e64..8692c71ac66 100644 --- a/src/mame/drivers/suprloco.cpp +++ b/src/mame/drivers/suprloco.cpp @@ -166,11 +166,11 @@ GFXDECODE_END MACHINE_CONFIG_START(suprloco_state::suprloco) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", SEGA_315_5015, 4000000) /* 4 MHz (?) */ - MCFG_DEVICE_PROGRAM_MAP(main_map) - MCFG_DEVICE_OPCODES_MAP(decrypted_opcodes_map) - MCFG_DEVICE_VBLANK_INT_DRIVER("screen", suprloco_state, irq0_line_hold) - MCFG_SEGACRPT_SET_DECRYPTED_TAG(":decrypted_opcodes") + sega_315_5015_device &maincpu(SEGA_315_5015(config, m_maincpu, 4000000)); /* 4 MHz (?) */ + maincpu.set_addrmap(AS_PROGRAM, &suprloco_state::main_map); + maincpu.set_addrmap(AS_OPCODES, &suprloco_state::decrypted_opcodes_map); + maincpu.set_vblank_int("screen", FUNC(suprloco_state::irq0_line_hold)); + maincpu.set_decrypted_tag(":decrypted_opcodes"); MCFG_DEVICE_ADD("audiocpu", Z80, 4000000) MCFG_DEVICE_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/system1.cpp b/src/mame/drivers/system1.cpp index e6f795a22c7..8d259fe88b1 100644 --- a/src/mame/drivers/system1.cpp +++ b/src/mame/drivers/system1.cpp @@ -2262,7 +2262,7 @@ void system1_state::sys1ppix_315_5178(machine_config &config) sys1ppi(config); segacrp2_z80_device &z80(SEGA_315_5178(config.replace(), m_maincpu, MASTER_CLOCK)); encrypted_sys1ppi_maps(config); - z80.set_decrypted_tag(":decrypted_opcodes"); + z80.set_decrypted_tag(m_decrypted_opcodes); } void system1_state::sys1ppix_315_5179(machine_config &config) @@ -2270,7 +2270,7 @@ void system1_state::sys1ppix_315_5179(machine_config &config) sys1ppi(config); segacrp2_z80_device &z80(SEGA_315_5179(config.replace(), m_maincpu, MASTER_CLOCK)); encrypted_sys1ppi_maps(config); - z80.set_decrypted_tag(":decrypted_opcodes"); + z80.set_decrypted_tag(m_decrypted_opcodes); } void system1_state::sys1ppix_315_5051(machine_config &config) @@ -2318,7 +2318,7 @@ void system1_state::sys1piox_315_5177(machine_config &config) sys1pio(config); segacrp2_z80_device &z80(SEGA_315_5177(config.replace(), m_maincpu, MASTER_CLOCK)); encrypted_sys1pio_maps(config); - z80.set_decrypted_tag(":decrypted_opcodes"); + z80.set_decrypted_tag(m_decrypted_opcodes); } void system1_state::sys1piox_315_5162(machine_config &config) @@ -2326,7 +2326,7 @@ void system1_state::sys1piox_315_5162(machine_config &config) sys1pio(config); segacrp2_z80_device &z80(SEGA_315_5162(config.replace(), m_maincpu, MASTER_CLOCK)); encrypted_sys1pio_maps(config); - z80.set_decrypted_tag(":decrypted_opcodes"); + z80.set_decrypted_tag(m_decrypted_opcodes); } void system1_state::sys1piox_317_0006(machine_config &config) @@ -2334,7 +2334,7 @@ void system1_state::sys1piox_317_0006(machine_config &config) sys1pio(config); segacrp2_z80_device &z80(SEGA_317_0006(config.replace(), m_maincpu, MASTER_CLOCK)); encrypted_sys1pio_maps(config); - z80.set_decrypted_tag(":decrypted_opcodes"); + z80.set_decrypted_tag(m_decrypted_opcodes); } void system1_state::sys1piox_315_5135(machine_config &config) @@ -2519,7 +2519,7 @@ void system1_state::sys2_315_5177(machine_config &config) sys2(config); segacrp2_z80_device &z80(SEGA_315_5177(config.replace(), m_maincpu, MASTER_CLOCK)); encrypted_sys1ppi_maps(config); - z80.set_decrypted_tag(":decrypted_opcodes"); + z80.set_decrypted_tag(m_decrypted_opcodes); } void system1_state::sys2_315_5176(machine_config &config) @@ -2527,7 +2527,7 @@ void system1_state::sys2_315_5176(machine_config &config) sys2(config); segacrp2_z80_device &z80(SEGA_315_5176(config.replace(), m_maincpu, MASTER_CLOCK)); encrypted_sys1ppi_maps(config); - z80.set_decrypted_tag(":decrypted_opcodes"); + z80.set_decrypted_tag(m_decrypted_opcodes); } void system1_state::sys2_317_0006(machine_config &config) @@ -2535,7 +2535,7 @@ void system1_state::sys2_317_0006(machine_config &config) sys2(config); segacrp2_z80_device &z80(SEGA_317_0006(config.replace(), m_maincpu, MASTER_CLOCK)); encrypted_sys1ppi_maps(config); - z80.set_decrypted_tag(":decrypted_opcodes"); + z80.set_decrypted_tag(m_decrypted_opcodes); } void system1_state::sys2_317_0007(machine_config &config) @@ -2543,7 +2543,7 @@ void system1_state::sys2_317_0007(machine_config &config) sys2(config); segacrp2_z80_device &z80(SEGA_317_0007(config.replace(), m_maincpu, MASTER_CLOCK)); encrypted_sys1ppi_maps(config); - z80.set_decrypted_tag(":decrypted_opcodes"); + z80.set_decrypted_tag(m_decrypted_opcodes); } void system1_state::sys2xb(machine_config &config) diff --git a/src/mame/drivers/thunderj.cpp b/src/mame/drivers/thunderj.cpp index 055d4f10021..fc4d078ec90 100644 --- a/src/mame/drivers/thunderj.cpp +++ b/src/mame/drivers/thunderj.cpp @@ -262,11 +262,12 @@ MACHINE_CONFIG_START(thunderj_state::thunderj) MCFG_PALETTE_ADD("palette", 2048) MCFG_PALETTE_FORMAT(IRRRRRGGGGGBBBBB) - MCFG_ATARI_VAD_ADD("vad", "screen", WRITELINE(*this, thunderj_state, scanline_int_write_line)) - MCFG_ATARI_VAD_PLAYFIELD(thunderj_state, "gfxdecode", get_playfield_tile_info) - MCFG_ATARI_VAD_PLAYFIELD2(thunderj_state, "gfxdecode", get_playfield2_tile_info) - MCFG_ATARI_VAD_ALPHA(thunderj_state, "gfxdecode", get_alpha_tile_info) - MCFG_ATARI_VAD_MOB(thunderj_state::s_mob_config, "gfxdecode") + ATARI_VAD(config, m_vad, 0, m_screen); + m_vad->scanline_int_cb().set(FUNC(thunderj_state::scanline_int_write_line)); + TILEMAP(config, "vad:playfield", "gfxdecode", 2, 8, 8, TILEMAP_SCAN_COLS, 64, 64).set_info_callback(DEVICE_SELF_OWNER, FUNC(thunderj_state::get_playfield_tile_info)); + TILEMAP(config, "vad:playfield2", "gfxdecode", 2, 8, 8, TILEMAP_SCAN_COLS, 64, 64, 0).set_info_callback(DEVICE_SELF_OWNER, FUNC(thunderj_state::get_playfield2_tile_info)); + TILEMAP(config, "vad:alpha", "gfxdecode", 2, 8, 8, TILEMAP_SCAN_ROWS, 64, 32, 0).set_info_callback(DEVICE_SELF_OWNER, FUNC(thunderj_state::get_alpha_tile_info)); + ATARI_MOTION_OBJECTS(config, "vad:mob", 0, m_screen, thunderj_state::s_mob_config).set_gfxdecode("gfxdecode"); MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK) diff --git a/src/mame/drivers/turbo.cpp b/src/mame/drivers/turbo.cpp index 246085669a0..a6164e53489 100644 --- a/src/mame/drivers/turbo.cpp +++ b/src/mame/drivers/turbo.cpp @@ -992,16 +992,17 @@ MACHINE_CONFIG_START(turbo_state::buckrogu) MACHINE_CONFIG_END -MACHINE_CONFIG_START(turbo_state::buckroge) +void turbo_state::buckroge(machine_config &config) +{ buckrog(config); /* basic machine hardware */ - MCFG_DEVICE_REPLACE("maincpu", SEGA_315_5014, MASTER_CLOCK/4) - MCFG_DEVICE_PROGRAM_MAP(buckrog_map) - MCFG_DEVICE_OPCODES_MAP(decrypted_opcodes_map) - MCFG_DEVICE_VBLANK_INT_DRIVER("screen", turbo_state, irq0_line_hold) - MCFG_SEGACRPT_SET_DECRYPTED_TAG(":decrypted_opcodes") -MACHINE_CONFIG_END + sega_315_5014_device &maincpu(SEGA_315_5014(config.replace(), m_maincpu, MASTER_CLOCK/4)); + maincpu.set_addrmap(AS_PROGRAM, &turbo_state::buckrog_map); + maincpu.set_addrmap(AS_OPCODES, &turbo_state::decrypted_opcodes_map); + maincpu.set_vblank_int("screen", FUNC(turbo_state::irq0_line_hold)); + maincpu.set_decrypted_tag(":decrypted_opcodes"); +} /************************************* * diff --git a/src/mame/drivers/zaxxon.cpp b/src/mame/drivers/zaxxon.cpp index 7bfe407bb8d..0691d75cac2 100644 --- a/src/mame/drivers/zaxxon.cpp +++ b/src/mame/drivers/zaxxon.cpp @@ -970,24 +970,25 @@ MACHINE_CONFIG_START(zaxxon_state::szaxxon) MACHINE_CONFIG_END -MACHINE_CONFIG_START(zaxxon_state::szaxxone) +void zaxxon_state::szaxxone(machine_config &config) +{ zaxxon(config); - MCFG_DEVICE_REPLACE("maincpu", SEGA_315_5013, MASTER_CLOCK/16) - MCFG_DEVICE_PROGRAM_MAP(zaxxon_map) - MCFG_DEVICE_OPCODES_MAP(decrypted_opcodes_map) - MCFG_SEGACRPT_SET_DECRYPTED_TAG(":decrypted_opcodes") - MCFG_SEGACRPT_SET_SIZE(0x6000) -MACHINE_CONFIG_END + sega_315_5013_device &maincpu(SEGA_315_5013(config.replace(), m_maincpu, MASTER_CLOCK/16)); + maincpu.set_addrmap(AS_PROGRAM, &zaxxon_state::zaxxon_map); + maincpu.set_addrmap(AS_OPCODES, &zaxxon_state::decrypted_opcodes_map); + maincpu.set_decrypted_tag(":decrypted_opcodes"); + maincpu.set_size(0x6000); +} MACHINE_CONFIG_START(zaxxon_state::futspye) root(config); - MCFG_DEVICE_REPLACE("maincpu", SEGA_315_5061, MASTER_CLOCK/16) - MCFG_DEVICE_PROGRAM_MAP(zaxxon_map) - MCFG_DEVICE_OPCODES_MAP(decrypted_opcodes_map) - MCFG_SEGACRPT_SET_DECRYPTED_TAG(":decrypted_opcodes") - MCFG_SEGACRPT_SET_SIZE(0x6000) + sega_315_5061_device &maincpu(SEGA_315_5061(config.replace(), m_maincpu, MASTER_CLOCK/16)); + maincpu.set_addrmap(AS_PROGRAM, &zaxxon_state::zaxxon_map); + maincpu.set_addrmap(AS_OPCODES, &zaxxon_state::decrypted_opcodes_map); + maincpu.set_decrypted_tag(":decrypted_opcodes"); + maincpu.set_size(0x6000); /* video hardware */ @@ -1005,11 +1006,11 @@ MACHINE_CONFIG_END MACHINE_CONFIG_START(zaxxon_state::razmataze) root(config); - MCFG_DEVICE_REPLACE("maincpu", SEGA_315_5098, MASTER_CLOCK/16) - MCFG_DEVICE_PROGRAM_MAP(ixion_map) - MCFG_DEVICE_OPCODES_MAP(decrypted_opcodes_map) - MCFG_SEGACRPT_SET_DECRYPTED_TAG(":decrypted_opcodes") - MCFG_SEGACRPT_SET_SIZE(0x6000) + sega_315_5098_device &maincpu(SEGA_315_5098(config.replace(), m_maincpu, MASTER_CLOCK/16)); + maincpu.set_addrmap(AS_PROGRAM, &zaxxon_state::ixion_map); + maincpu.set_addrmap(AS_OPCODES, &zaxxon_state::decrypted_opcodes_map); + maincpu.set_decrypted_tag(":decrypted_opcodes"); + maincpu.set_size(0x6000); config.device_remove("ppi8255"); @@ -1023,16 +1024,17 @@ MACHINE_CONFIG_START(zaxxon_state::razmataze) SEGAUSBROM(config, "usbsnd", 0, m_maincpu).add_route(ALL_OUTPUTS, "speaker", 1.0); MACHINE_CONFIG_END -MACHINE_CONFIG_START(zaxxon_state::ixion) +void zaxxon_state::ixion(machine_config &config) +{ razmataze(config); - MCFG_DEVICE_REPLACE("maincpu", SEGA_315_5013, MASTER_CLOCK/16) - MCFG_DEVICE_PROGRAM_MAP(ixion_map) - MCFG_DEVICE_OPCODES_MAP(decrypted_opcodes_map) - MCFG_SEGACRPT_SET_DECRYPTED_TAG(":decrypted_opcodes") - MCFG_SEGACRPT_SET_SIZE(0x6000) + sega_315_5013_device &maincpu(SEGA_315_5013(config.replace(), m_maincpu, MASTER_CLOCK/16)); + maincpu.set_addrmap(AS_PROGRAM, &zaxxon_state::ixion_map); + maincpu.set_addrmap(AS_OPCODES, &zaxxon_state::decrypted_opcodes_map); + maincpu.set_decrypted_tag(":decrypted_opcodes"); + maincpu.set_size(0x6000); m_mainlatch[0]->q_out_cb<6>().set_nop(); // flip screen not used -MACHINE_CONFIG_END +} MACHINE_CONFIG_START(zaxxon_state::congo) root(config); diff --git a/src/mame/machine/segacrpt_device.h b/src/mame/machine/segacrpt_device.h index ba87cca9671..59aa71eaf23 100644 --- a/src/mame/machine/segacrpt_device.h +++ b/src/mame/machine/segacrpt_device.h @@ -9,28 +9,11 @@ #include "cpu/z80/z80.h" -#define MCFG_SEGACRPT_SET_DECRYPTED_TAG(_tag) \ - downcast<segacrpt_z80_device &>(*device).set_decrypted_tag(_tag); - -#define MCFG_SEGACRPT_SET_DECRYPTED_PTR(_tag) \ - downcast<segacrpt_z80_device &>(*device).set_decrypted_ptr(_ptr); - -#define MCFG_SEGACRPT_SET_SIZE(_size) \ - downcast<segacrpt_z80_device &>(*device).set_size(_size); - -#define MCFG_SEGACRPT_SET_NUMBANKS(_numbanks) \ - downcast<segacrpt_z80_device &>(*device).set_numbanks(_numbanks); - -#define MCFG_SEGACRPT_SET_BANKSIZE(_banksize) \ - downcast<segacrpt_z80_device &>(*device).set_banksize(_banksize); - - // base class class segacrpt_z80_device : public z80_device { public: void set_decrypted_tag(const char* decrypted_tag) { m_decrypted_tag = decrypted_tag; } - void set_decrypted_ptr(uint8_t* ptr) { m_decrypted_ptr = ptr; } // toprollr void set_size(int size) { m_decode_size = size; } void set_numbanks(int numbanks) { m_numbanks = numbanks; } void set_banksize(int banksize) { m_banksize = banksize; } diff --git a/src/mame/video/atarivad.h b/src/mame/video/atarivad.h index bdfcd7f04c9..01230e5062e 100644 --- a/src/mame/video/atarivad.h +++ b/src/mame/video/atarivad.h @@ -15,50 +15,6 @@ //************************************************************************** -// DEVICE CONFIGURATION MACROS -//************************************************************************** - -#define MCFG_ATARI_VAD_ADD(_tag, _screen, _intcb) \ - MCFG_DEVICE_ADD(_tag, ATARI_VAD, 0) \ - MCFG_VIDEO_SET_SCREEN(_screen) \ - downcast<atari_vad_device &>(*device).set_scanline_int_cb(DEVCB_##_intcb); - -#define MCFG_ATARI_VAD_PLAYFIELD(_class, _gfxtag, _getinfo) \ - { std::string fulltag(device->tag()); fulltag.append(":playfield"); device_t *device; \ - MCFG_TILEMAP_ADD(fulltag.c_str()) \ - MCFG_TILEMAP_GFXDECODE(_gfxtag) \ - MCFG_TILEMAP_BYTES_PER_ENTRY(2) \ - MCFG_TILEMAP_INFO_CB_DEVICE(DEVICE_SELF_OWNER, _class, _getinfo) \ - MCFG_TILEMAP_TILE_SIZE(8,8) \ - MCFG_TILEMAP_LAYOUT_STANDARD(SCAN_COLS, 64,64) } - -#define MCFG_ATARI_VAD_PLAYFIELD2(_class, _gfxtag, _getinfo) \ - { std::string fulltag(device->tag()); fulltag.append(":playfield2"); device_t *device; \ - MCFG_TILEMAP_ADD(fulltag.c_str()) \ - MCFG_TILEMAP_GFXDECODE(_gfxtag) \ - MCFG_TILEMAP_BYTES_PER_ENTRY(2) \ - MCFG_TILEMAP_INFO_CB_DEVICE(DEVICE_SELF_OWNER, _class, _getinfo) \ - MCFG_TILEMAP_TILE_SIZE(8,8) \ - MCFG_TILEMAP_LAYOUT_STANDARD(SCAN_COLS, 64,64) \ - MCFG_TILEMAP_TRANSPARENT_PEN(0) } - -#define MCFG_ATARI_VAD_ALPHA(_class, _gfxtag, _getinfo) \ - { std::string fulltag(device->tag()); fulltag.append(":alpha"); device_t *device; \ - MCFG_TILEMAP_ADD(fulltag.c_str()) \ - MCFG_TILEMAP_GFXDECODE(_gfxtag) \ - MCFG_TILEMAP_BYTES_PER_ENTRY(2) \ - MCFG_TILEMAP_INFO_CB_DEVICE(DEVICE_SELF_OWNER, _class, _getinfo) \ - MCFG_TILEMAP_TILE_SIZE(8,8) \ - MCFG_TILEMAP_LAYOUT_STANDARD(SCAN_ROWS, 64,32) \ - MCFG_TILEMAP_TRANSPARENT_PEN(0) } - -#define MCFG_ATARI_VAD_MOB(_config, _gfxtag) \ - { std::string fulltag(device->tag()); fulltag.append(":mob"); \ - ATARI_MOTION_OBJECTS(config, fulltag.c_str(), 0, "screen", _config).set_gfxdecode(_gfxtag); } - - - -//************************************************************************** // TYPE DEFINITIONS //************************************************************************** @@ -71,10 +27,16 @@ class atari_vad_device : public device_t, public device_video_interface { public: // construction/destruction + template <typename T> + atari_vad_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&screen_tag) + : atari_vad_device(mconfig, tag, owner, clock) + { + set_screen(std::forward<T>(screen_tag)); + } atari_vad_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // configuration helpers - template<class Object> devcb_base &set_scanline_int_cb(Object &&cb) { return m_scanline_int_cb.set_callback(std::forward<Object>(cb)); } + auto scanline_int_cb() { return m_scanline_int_cb.bind(); } // getters tilemap_device &alpha() const { return *m_alpha_tilemap; } |