summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/vaportra.cpp
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2018-05-15 05:43:28 +1000
committer Vas Crabb <vas@vastheman.com>2018-05-15 05:43:28 +1000
commit23325728009b85bad264dcc175c8f1b8c5e51678 (patch)
tree47e270288dae6d6e6f2cce33c779e94ffc2d39ab /src/mame/drivers/vaportra.cpp
parentd1f8569f4d2729631ef5c3fd6de4e3cfca9856e8 (diff)
More cleanup/streamlining of machine configuration and macros:
* Get rid of implicit prefix for GFX decode names and prefix them all * Get rid of special macro for adding GFXDECODE in favour of constructor * Make empty GFX decode a static member of interface * Allow palette to be specified to GFXDECODE as a device finder * Removed diserial.h from emu.h as it's used relatively infrequently Also fix darkseal and vaportra propely. The palette device automatically attaches itself to a share with matching tag. The correct solution here is to rename one or the other out of the way, since it was never attached to a share before.
Diffstat (limited to 'src/mame/drivers/vaportra.cpp')
-rw-r--r--src/mame/drivers/vaportra.cpp25
1 files changed, 12 insertions, 13 deletions
diff --git a/src/mame/drivers/vaportra.cpp b/src/mame/drivers/vaportra.cpp
index cd40a37db5e..03e76e0c7c0 100644
--- a/src/mame/drivers/vaportra.cpp
+++ b/src/mame/drivers/vaportra.cpp
@@ -183,7 +183,7 @@ static const gfx_layout tilelayout =
32*16
};
-static GFXDECODE_START( vaportra )
+static GFXDECODE_START( gfx_vaportra )
GFXDECODE_ENTRY( "gfx1", 0x000000, charlayout, 0x000, 0x500 ) /* Characters 8x8 */
GFXDECODE_ENTRY( "gfx1", 0x000000, tilelayout, 0x000, 0x500 ) /* Tiles 16x16 */
GFXDECODE_ENTRY( "gfx2", 0x000000, charlayout, 0x000, 0x500 ) /* Characters 8x8 */
@@ -212,16 +212,16 @@ void vaportra_state::machine_reset()
MACHINE_CONFIG_START(vaportra_state::vaportra)
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000,XTAL(24'000'000)/2) /* Custom chip 59 */
+ MCFG_DEVICE_ADD(m_maincpu, M68000,XTAL(24'000'000)/2) /* Custom chip 59 */
MCFG_DEVICE_PROGRAM_MAP(main_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", vaportra_state, irq6_line_assert)
- MCFG_DEVICE_ADD("audiocpu", H6280, XTAL(24'000'000)/4) /* Custom chip 45; Audio section crystal is 32.220 MHz but CPU clock is confirmed as coming from the 24MHz crystal (6Mhz exactly on the CPU) */
+ MCFG_DEVICE_ADD(m_audiocpu, H6280, XTAL(24'000'000)/4) /* Custom chip 45; Audio section crystal is 32.220 MHz but CPU clock is confirmed as coming from the 24MHz crystal (6Mhz exactly on the CPU) */
MCFG_DEVICE_PROGRAM_MAP(sound_map)
/* video hardware */
- MCFG_DEVICE_ADD("spriteram", BUFFERED_SPRITERAM16)
+ MCFG_DEVICE_ADD(m_spriteram, BUFFERED_SPRITERAM16)
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(58)
@@ -229,13 +229,12 @@ MACHINE_CONFIG_START(vaportra_state::vaportra)
MCFG_SCREEN_SIZE(32*8, 32*8)
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1)
MCFG_SCREEN_UPDATE_DRIVER(vaportra_state, screen_update)
- MCFG_SCREEN_PALETTE("palette")
+ MCFG_SCREEN_PALETTE("colors")
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", vaportra)
- MCFG_PALETTE_ADD("palette", 1280)
- MCFG_PALETTE_FORMAT(xxxxRRRRGGGGBBBB)
+ MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_vaportra)
+ MCFG_PALETTE_ADD(m_palette, 1280)
- MCFG_DEVICE_ADD("tilegen1", DECO16IC, 0)
+ MCFG_DEVICE_ADD(m_tilegen[0], DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
MCFG_DECO16IC_PF1_SIZE(DECO_64x32)
MCFG_DECO16IC_PF2_SIZE(DECO_64x32)
@@ -251,7 +250,7 @@ MACHINE_CONFIG_START(vaportra_state::vaportra)
MCFG_DECO16IC_PF12_16X16_BANK(1)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DEVICE_ADD("tilegen2", DECO16IC, 0)
+ MCFG_DEVICE_ADD(m_tilegen[1], DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
MCFG_DECO16IC_PF1_SIZE(DECO_64x32)
MCFG_DECO16IC_PF2_SIZE(DECO_64x32)
@@ -267,15 +266,15 @@ MACHINE_CONFIG_START(vaportra_state::vaportra)
MCFG_DECO16IC_PF12_16X16_BANK(3)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DEVICE_ADD("spritegen", DECO_MXC06, 0)
+ MCFG_DEVICE_ADD(m_spritegen, DECO_MXC06, 0)
MCFG_DECO_MXC06_GFX_REGION(4)
MCFG_DECO_MXC06_GFXDECODE("gfxdecode")
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_GENERIC_LATCH_8_ADD("soundlatch")
- MCFG_GENERIC_LATCH_DATA_PENDING_CB(INPUTLINE("audiocpu", 0))
+ MCFG_GENERIC_LATCH_8_ADD(m_soundlatch)
+ MCFG_GENERIC_LATCH_DATA_PENDING_CB(INPUTLINE(m_audiocpu, 0))
MCFG_DEVICE_ADD("ym1", YM2203, XTAL(32'220'000)/8)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60)