diff options
Diffstat (limited to 'src/mame/drivers/simpsons.cpp')
-rw-r--r-- | src/mame/drivers/simpsons.cpp | 45 |
1 files changed, 22 insertions, 23 deletions
diff --git a/src/mame/drivers/simpsons.cpp b/src/mame/drivers/simpsons.cpp index 83173077009..14f8c2656b8 100644 --- a/src/mame/drivers/simpsons.cpp +++ b/src/mame/drivers/simpsons.cpp @@ -100,7 +100,6 @@ Notes: #include "includes/simpsons.h" #include "includes/konamipt.h" -#include "cpu/m6809/konami.h" /* for the callback and the firq irq definition */ #include "cpu/z80/z80.h" #include "machine/eepromser.h" #include "machine/watchdog.h" @@ -322,16 +321,16 @@ INTERRUPT_GEN_MEMBER(simpsons_state::simpsons_irq) device.execute().set_input_line(KONAMI_IRQ_LINE, HOLD_LINE); } -MACHINE_CONFIG_START(simpsons_state::simpsons) - +void simpsons_state::simpsons(machine_config &config) +{ /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", KONAMI, XTAL(24'000'000)/2/4) /* 053248, the clock input is 12MHz, and internal CPU divider of 4 */ - MCFG_DEVICE_PROGRAM_MAP(main_map) - MCFG_DEVICE_VBLANK_INT_DRIVER("screen", simpsons_state, simpsons_irq) /* IRQ triggered by the 052109, FIRQ by the sprite hardware */ - MCFG_KONAMICPU_LINE_CB(WRITE8(*this, simpsons_state, banking_callback)) + KONAMI(config, m_maincpu, XTAL(24'000'000)/2/4); /* 053248, the clock input is 12MHz, and internal CPU divider of 4 */ + m_maincpu->set_addrmap(AS_PROGRAM, &simpsons_state::main_map); + m_maincpu->set_vblank_int("screen", FUNC(simpsons_state::simpsons_irq)); /* IRQ triggered by the 052109, FIRQ by the sprite hardware */ + m_maincpu->line().set(FUNC(simpsons_state::banking_callback)); - MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(3'579'545)) /* verified on pcb */ - MCFG_DEVICE_PROGRAM_MAP(z80_map) /* NMIs are generated by the 053260 */ + Z80(config, m_audiocpu, XTAL(3'579'545)); /* verified on pcb */ + m_audiocpu->set_addrmap(AS_PROGRAM, &simpsons_state::z80_map); /* NMIs are generated by the 053260 */ ADDRESS_MAP_BANK(config, "bank0000").set_map(&simpsons_state::bank0000_map).set_options(ENDIANNESS_BIG, 8, 13, 0x1000); ADDRESS_MAP_BANK(config, "bank2000").set_map(&simpsons_state::bank2000_map).set_options(ENDIANNESS_BIG, 8, 14, 0x2000); @@ -341,18 +340,18 @@ MACHINE_CONFIG_START(simpsons_state::simpsons) WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) - MCFG_SCREEN_RAW_PARAMS(XTAL(24'000'000)/3, 528, 112, 400, 256, 16, 240) + screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); + screen.set_raw(XTAL(24'000'000)/3, 528, 112, 400, 256, 16, 240); // 6MHz dotclock is more realistic, however needs drawing updates. replace when ready -// MCFG_SCREEN_RAW_PARAMS(XTAL(24'000'000)/4, 396, hbend, hbstart, 256, 16, 240) - MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK) - MCFG_SCREEN_UPDATE_DRIVER(simpsons_state, screen_update_simpsons) - MCFG_SCREEN_PALETTE("palette") +// screen.set_raw(XTAL(24'000'000)/4, 396, hbend, hbstart, 256, 16, 240); + screen.set_video_attributes(VIDEO_UPDATE_AFTER_VBLANK); + screen.set_screen_update(FUNC(simpsons_state::screen_update_simpsons)); + screen.set_palette("palette"); - MCFG_PALETTE_ADD("palette", 2048) - MCFG_PALETTE_ENABLE_SHADOWS() - MCFG_PALETTE_ENABLE_HILIGHTS() - MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR) + palette_device &palette(PALETTE(config, "palette", 2048)); + palette.enable_shadows(); + palette.enable_hilights(); + palette.set_format(PALETTE_FORMAT_xBBBBBGGGGGRRRRR); K052109(config, m_k052109, 0); m_k052109->set_palette("palette"); @@ -375,10 +374,10 @@ MACHINE_CONFIG_START(simpsons_state::simpsons) ymsnd.add_route(1, "lspeaker", 0.0); ymsnd.add_route(1, "rspeaker", 0.0); - MCFG_DEVICE_ADD("k053260", K053260, XTAL(3'579'545)) /* verified on pcb */ - MCFG_SOUND_ROUTE(0, "lspeaker", 0.75) - MCFG_SOUND_ROUTE(1, "rspeaker", 0.75) -MACHINE_CONFIG_END + k053260_device &k053260(K053260(config, "k053260", XTAL(3'579'545))); /* verified on pcb */ + k053260.add_route(0, "lspeaker", 0.75); + k053260.add_route(1, "rspeaker", 0.75); +} /*************************************************************************** |