diff options
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 |
commit | 23325728009b85bad264dcc175c8f1b8c5e51678 (patch) | |
tree | 47e270288dae6d6e6f2cce33c779e94ffc2d39ab /src/mame/drivers/shangkid.cpp | |
parent | d1f8569f4d2729631ef5c3fd6de4e3cfca9856e8 (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/shangkid.cpp')
-rw-r--r-- | src/mame/drivers/shangkid.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mame/drivers/shangkid.cpp b/src/mame/drivers/shangkid.cpp index 0a579f17fdc..de83c1c82f1 100644 --- a/src/mame/drivers/shangkid.cpp +++ b/src/mame/drivers/shangkid.cpp @@ -256,7 +256,7 @@ static const gfx_layout chinhero_sprite_layout2 = { 8*0x40 }; -static GFXDECODE_START( chinhero ) +static GFXDECODE_START( gfx_chinhero ) GFXDECODE_ENTRY( "gfx1", 0, shangkid_char_layout, 0, 0x40 ) GFXDECODE_ENTRY( "gfx2", 0, chinhero_sprite_layout1, 0, 0x20 ) GFXDECODE_ENTRY( "gfx2", 0, chinhero_sprite_layout2, 0, 0x20 ) @@ -264,12 +264,12 @@ static GFXDECODE_START( chinhero ) GFXDECODE_ENTRY( "gfx3", 0, chinhero_sprite_layout2, 0, 0x20 ) GFXDECODE_END -static GFXDECODE_START( shangkid ) +static GFXDECODE_START( gfx_shangkid ) GFXDECODE_ENTRY( "gfx1", 0, shangkid_char_layout, 0, 0x40 ) GFXDECODE_ENTRY( "gfx2", 0, shangkid_sprite_layout, 0, 0x40 ) GFXDECODE_END -static GFXDECODE_START( dynamski ) +static GFXDECODE_START( gfx_dynamski ) GFXDECODE_ENTRY( "gfx1", 0, shangkid_char_layout, 0, 0x10 ) GFXDECODE_ENTRY( "gfx2", 0, shangkid_sprite_layout, 0x40, 0x10 ) GFXDECODE_END @@ -413,7 +413,7 @@ MACHINE_CONFIG_START(shangkid_state::chinhero) MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, shangkid_state, irq_1_w)) MCFG_DEVCB_CHAIN_OUTPUT(WRITELINE(*this, shangkid_state, irq_2_w)) - MCFG_GFXDECODE_ADD("gfxdecode", "palette", chinhero) + MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_chinhero) MCFG_PALETTE_ADD_RRRRGGGGBBBB_PROMS("palette", "proms", 256) MCFG_VIDEO_START_OVERRIDE(shangkid_state,shangkid) @@ -453,7 +453,7 @@ MACHINE_CONFIG_START(shangkid_state::shangkid) MCFG_MACHINE_RESET_OVERRIDE(shangkid_state,shangkid) /* video hardware */ - MCFG_GFXDECODE_MODIFY("gfxdecode", shangkid) + MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_shangkid) MCFG_DEVICE_MODIFY("aysnd") MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(*this, shangkid_state, shangkid_ay8910_porta_w)) @@ -506,7 +506,7 @@ MACHINE_CONFIG_START(shangkid_state::dynamski) MCFG_SCREEN_PALETTE("palette") MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, shangkid_state, irq_1_w)) - MCFG_GFXDECODE_ADD("gfxdecode", "palette", dynamski) + MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_dynamski) MCFG_PALETTE_ADD("palette", 16*4+16*4) MCFG_PALETTE_INDIRECT_ENTRIES(32) MCFG_PALETTE_INIT_OWNER(shangkid_state,dynamski) |