summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/machine
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2017-02-27 22:16:07 +1100
committer Vas Crabb <vas@vastheman.com>2017-02-27 22:57:14 +1100
commit6c23897483a0201dd0b65b450253fd9bf8fb8723 (patch)
tree62a083b4801f63b09bed57ae0c9e8f646aaa3200 /src/mame/machine
parentb07c572f709e95dcd1e2e4b9d4c696e122f67655 (diff)
Self-registering devices prep:
* Make device_creator a variable template and get rid of the ampersands * Remove screen.h and speaker.h from emu.h and add where necessary * Centralise instantiations of screen and speaker finder templates * Add/standardise #include guards in many hearers * Remove many redundant #includes * Order #includesr to help catch headers that can't be #included alone (nw) This changes #include order to be prefix, unit header if applicable then other stuff roughly in order from most dependent to least dependent library. This helps catch headers that don't #include things that they use.
Diffstat (limited to 'src/mame/machine')
-rw-r--r--src/mame/machine/315-5838_317-0229_comp.cpp2
-rw-r--r--src/mame/machine/315-5881_crypt.cpp2
-rw-r--r--src/mame/machine/315_5296.cpp2
-rw-r--r--src/mame/machine/3do.cpp4
-rw-r--r--src/mame/machine/6883sam.cpp2
-rw-r--r--src/mame/machine/abc1600mac.cpp2
-rw-r--r--src/mame/machine/abc80kb.cpp2
-rw-r--r--src/mame/machine/alpha8201.cpp2
-rw-r--r--src/mame/machine/amstrad.cpp3
-rw-r--r--src/mame/machine/apollo.cpp10
-rw-r--r--src/mame/machine/apollo_kbd.cpp2
-rw-r--r--src/mame/machine/apple2.cpp11
-rw-r--r--src/mame/machine/apple2gs.cpp3
-rw-r--r--src/mame/machine/apple3.cpp1
-rw-r--r--src/mame/machine/apricotkb.cpp2
-rw-r--r--src/mame/machine/archimds.cpp2
-rw-r--r--src/mame/machine/asic65.cpp2
-rw-r--r--src/mame/machine/at.cpp3
-rw-r--r--src/mame/machine/at.h8
-rw-r--r--src/mame/machine/atari_vg.cpp2
-rw-r--r--src/mame/machine/atarifdc.cpp2
-rw-r--r--src/mame/machine/atarigen.cpp8
-rw-r--r--src/mame/machine/atarigen.h11
-rw-r--r--src/mame/machine/atarixga.cpp4
-rw-r--r--src/mame/machine/awboard.cpp2
-rw-r--r--src/mame/machine/beta.cpp2
-rw-r--r--src/mame/machine/bfm_bd1.cpp2
-rw-r--r--src/mame/machine/bfm_bda.cpp2
-rw-r--r--src/mame/machine/c117.cpp2
-rw-r--r--src/mame/machine/cammu.cpp6
-rw-r--r--src/mame/machine/cat702.cpp2
-rw-r--r--src/mame/machine/cdi070.cpp2
-rw-r--r--src/mame/machine/cdicdic.cpp2
-rw-r--r--src/mame/machine/cdislave.cpp2
-rw-r--r--src/mame/machine/cedar_magnet_flop.cpp2
-rw-r--r--src/mame/machine/cedar_magnet_plane.cpp2
-rw-r--r--src/mame/machine/cedar_magnet_sprite.cpp2
-rw-r--r--src/mame/machine/coco.cpp2
-rw-r--r--src/mame/machine/coco_vhd.cpp2
-rw-r--r--src/mame/machine/compiskb.cpp6
-rw-r--r--src/mame/machine/compiskb.h11
-rw-r--r--src/mame/machine/cuda.cpp4
-rw-r--r--src/mame/machine/dc-ctrl.cpp2
-rw-r--r--src/mame/machine/dec_lk201.cpp3
-rw-r--r--src/mame/machine/deco104.cpp2
-rw-r--r--src/mame/machine/deco146.cpp4
-rw-r--r--src/mame/machine/deco222.cpp3
-rw-r--r--src/mame/machine/deco222.h6
-rw-r--r--src/mame/machine/decocass_tape.cpp2
-rw-r--r--src/mame/machine/decocpu6.cpp3
-rw-r--r--src/mame/machine/decocpu6.h2
-rw-r--r--src/mame/machine/decocpu7.cpp3
-rw-r--r--src/mame/machine/decocpu7.h2
-rw-r--r--src/mame/machine/decopincpu.cpp8
-rw-r--r--src/mame/machine/dmv_keyb.cpp2
-rw-r--r--src/mame/machine/docg3.cpp2
-rw-r--r--src/mame/machine/egret.cpp4
-rw-r--r--src/mame/machine/einstein.cpp6
-rw-r--r--src/mame/machine/electron.cpp3
-rw-r--r--src/mame/machine/esqlcd.cpp2
-rw-r--r--src/mame/machine/esqpanel.cpp6
-rw-r--r--src/mame/machine/esqvfd.cpp6
-rw-r--r--src/mame/machine/fd1089.cpp4
-rw-r--r--src/mame/machine/fd1094.cpp2
-rw-r--r--src/mame/machine/fm_scsi.cpp2
-rw-r--r--src/mame/machine/fmt_icmem.cpp2
-rw-r--r--src/mame/machine/gaelco3d.cpp2
-rw-r--r--src/mame/machine/gamecom.cpp1
-rw-r--r--src/mame/machine/gamepock.cpp4
-rw-r--r--src/mame/machine/gdrom.cpp2
-rw-r--r--src/mame/machine/genpin.cpp4
-rw-r--r--src/mame/machine/hec2hrp.cpp10
-rw-r--r--src/mame/machine/hp48.cpp7
-rw-r--r--src/mame/machine/ibm6580_fdc.cpp2
-rw-r--r--src/mame/machine/ibm6580_kbd.cpp2
-rw-r--r--src/mame/machine/ie15_kbd.cpp2
-rw-r--r--src/mame/machine/igs022.cpp2
-rw-r--r--src/mame/machine/igs022.h5
-rw-r--r--src/mame/machine/igs025.cpp2
-rw-r--r--src/mame/machine/igs025.h6
-rw-r--r--src/mame/machine/igs028.cpp2
-rw-r--r--src/mame/machine/igs028.h6
-rw-r--r--src/mame/machine/inder_sb.cpp4
-rw-r--r--src/mame/machine/inder_vid.cpp3
-rw-r--r--src/mame/machine/interpro_ioga.cpp2
-rw-r--r--src/mame/machine/interpro_mcga.cpp2
-rw-r--r--src/mame/machine/interpro_sga.cpp2
-rw-r--r--src/mame/machine/isbc_208.cpp2
-rw-r--r--src/mame/machine/isbc_215g.cpp2
-rw-r--r--src/mame/machine/iteagle_fpga.cpp6
-rw-r--r--src/mame/machine/jvs13551.cpp2
-rw-r--r--src/mame/machine/k573cass.cpp12
-rw-r--r--src/mame/machine/k573dio.cpp2
-rw-r--r--src/mame/machine/k573mcr.cpp2
-rw-r--r--src/mame/machine/k573msu.cpp2
-rw-r--r--src/mame/machine/k573npu.cpp2
-rw-r--r--src/mame/machine/k7659kb.cpp2
-rw-r--r--src/mame/machine/kaneko_calc3.cpp2
-rw-r--r--src/mame/machine/kaneko_hit.cpp2
-rw-r--r--src/mame/machine/kaneko_toybox.cpp2
-rw-r--r--src/mame/machine/kc_keyb.cpp2
-rw-r--r--src/mame/machine/km035.cpp3
-rw-r--r--src/mame/machine/konami1.cpp2
-rw-r--r--src/mame/machine/konppc.cpp2
-rw-r--r--src/mame/machine/lisa.cpp1
-rw-r--r--src/mame/machine/lviv.cpp10
-rw-r--r--src/mame/machine/m1comm.cpp2
-rw-r--r--src/mame/machine/m20_8086.cpp2
-rw-r--r--src/mame/machine/m20_kbd.cpp2
-rw-r--r--src/mame/machine/m24_kbd.cpp2
-rw-r--r--src/mame/machine/m24_z8000.cpp2
-rw-r--r--src/mame/machine/m2comm.cpp2
-rw-r--r--src/mame/machine/m3comm.cpp2
-rw-r--r--src/mame/machine/mackbd.cpp2
-rw-r--r--src/mame/machine/macrtc.cpp2
-rw-r--r--src/mame/machine/maple-dc.cpp2
-rw-r--r--src/mame/machine/mathbox.cpp2
-rw-r--r--src/mame/machine/mega32x.cpp4
-rw-r--r--src/mame/machine/megacd.cpp6
-rw-r--r--src/mame/machine/megacdcd.cpp2
-rw-r--r--src/mame/machine/megadriv.cpp1
-rw-r--r--src/mame/machine/meters.cpp2
-rw-r--r--src/mame/machine/microdrv.cpp2
-rw-r--r--src/mame/machine/micropolis.cpp2
-rw-r--r--src/mame/machine/midikbd.cpp2
-rw-r--r--src/mame/machine/midwayic.cpp8
-rw-r--r--src/mame/machine/mie.cpp4
-rw-r--r--src/mame/machine/mm1kb.cpp4
-rw-r--r--src/mame/machine/ms7004.cpp4
-rw-r--r--src/mame/machine/msx_matsushita.cpp2
-rw-r--r--src/mame/machine/msx_s1985.cpp2
-rw-r--r--src/mame/machine/msx_systemflags.cpp2
-rw-r--r--src/mame/machine/mz700.cpp9
-rw-r--r--src/mame/machine/n64.cpp2
-rw-r--r--src/mame/machine/namco06.cpp2
-rw-r--r--src/mame/machine/namco50.cpp2
-rw-r--r--src/mame/machine/namco51.cpp3
-rw-r--r--src/mame/machine/namco53.cpp2
-rw-r--r--src/mame/machine/namco62.cpp2
-rw-r--r--src/mame/machine/namco_c139.cpp2
-rw-r--r--src/mame/machine/namco_c148.cpp2
-rw-r--r--src/mame/machine/namco_settings.cpp2
-rw-r--r--src/mame/machine/namcoio.cpp6
-rw-r--r--src/mame/machine/namcoio_gearbox.cpp2
-rw-r--r--src/mame/machine/namcomcu.cpp10
-rw-r--r--src/mame/machine/naomigd.cpp2
-rw-r--r--src/mame/machine/naomim1.cpp2
-rw-r--r--src/mame/machine/naomim2.cpp2
-rw-r--r--src/mame/machine/naomim4.cpp2
-rw-r--r--src/mame/machine/naomirom.cpp2
-rw-r--r--src/mame/machine/nb1413m3.cpp2
-rw-r--r--src/mame/machine/nb1414m4.cpp9
-rw-r--r--src/mame/machine/nextkbd.cpp2
-rw-r--r--src/mame/machine/nextmo.cpp2
-rw-r--r--src/mame/machine/ng_memcard.cpp2
-rw-r--r--src/mame/machine/ngen_kb.cpp2
-rw-r--r--src/mame/machine/nmk004.cpp2
-rw-r--r--src/mame/machine/nmk112.cpp2
-rw-r--r--src/mame/machine/ns10crypt.cpp16
-rw-r--r--src/mame/machine/ns11prot.cpp18
-rw-r--r--src/mame/machine/octo_kbd.cpp2
-rw-r--r--src/mame/machine/orion.cpp7
-rw-r--r--src/mame/machine/osborne1.cpp2
-rw-r--r--src/mame/machine/pc1512kb.cpp2
-rw-r--r--src/mame/machine/pc9801_118.cpp5
-rw-r--r--src/mame/machine/pc9801_26.cpp5
-rw-r--r--src/mame/machine/pc9801_86.cpp3
-rw-r--r--src/mame/machine/pc9801_cbus.cpp2
-rw-r--r--src/mame/machine/pc9801_cd.cpp2
-rw-r--r--src/mame/machine/pc9801_kbd.cpp2
-rw-r--r--src/mame/machine/pcd_kbd.cpp6
-rw-r--r--src/mame/machine/pcd_kbd.h13
-rw-r--r--src/mame/machine/pce220_ser.cpp2
-rw-r--r--src/mame/machine/pce_cd.cpp2
-rw-r--r--src/mame/machine/pecom.cpp3
-rw-r--r--src/mame/machine/pgmprot_igs027a_type1.cpp4
-rw-r--r--src/mame/machine/pgmprot_igs027a_type1.h8
-rw-r--r--src/mame/machine/primo.cpp7
-rw-r--r--src/mame/machine/prof80mmu.cpp2
-rw-r--r--src/mame/machine/psion_pack.cpp2
-rw-r--r--src/mame/machine/psxcd.cpp2
-rw-r--r--src/mame/machine/qimi.cpp2
-rw-r--r--src/mame/machine/qx10kbd.cpp2
-rw-r--r--src/mame/machine/rmnkbd.cpp2
-rw-r--r--src/mame/machine/rx01.cpp2
-rw-r--r--src/mame/machine/s32comm.cpp2
-rw-r--r--src/mame/machine/samcoupe.cpp1
-rw-r--r--src/mame/machine/segabb.cpp2
-rw-r--r--src/mame/machine/segacrp2_device.cpp24
-rw-r--r--src/mame/machine/segacrpt_device.cpp54
-rw-r--r--src/mame/machine/segaic16.cpp8
-rw-r--r--src/mame/machine/segaic16.h9
-rw-r--r--src/mame/machine/seibucop/seibucop.cpp2
-rw-r--r--src/mame/machine/seicop.cpp2
-rw-r--r--src/mame/machine/sgi.cpp2
-rw-r--r--src/mame/machine/slapstic.cpp2
-rw-r--r--src/mame/machine/st0016.cpp4
-rw-r--r--src/mame/machine/st0016.h9
-rw-r--r--src/mame/machine/swim.cpp2
-rw-r--r--src/mame/machine/tait8741.cpp2
-rw-r--r--src/mame/machine/taito68705interface.cpp8
-rw-r--r--src/mame/machine/taitoio.cpp6
-rw-r--r--src/mame/machine/tandy2kb.cpp2
-rw-r--r--src/mame/machine/teleprinter.cpp6
-rw-r--r--src/mame/machine/thomson.cpp2
-rw-r--r--src/mame/machine/ticket.cpp2
-rw-r--r--src/mame/machine/trs80m2kb.cpp2
-rw-r--r--src/mame/machine/upd65031.cpp2
-rw-r--r--src/mame/machine/v1050kb.cpp4
-rw-r--r--src/mame/machine/vector06.cpp1
-rw-r--r--src/mame/machine/victor9k_fdc.cpp2
-rw-r--r--src/mame/machine/victor9kb.cpp2
-rw-r--r--src/mame/machine/vtech2.cpp3
-rw-r--r--src/mame/machine/wangpckb.cpp3
-rw-r--r--src/mame/machine/wpc.cpp2
-rw-r--r--src/mame/machine/wpc_lamp.cpp2
-rw-r--r--src/mame/machine/wpc_out.cpp2
-rw-r--r--src/mame/machine/wpc_pic.cpp2
-rw-r--r--src/mame/machine/wpc_shift.cpp2
-rw-r--r--src/mame/machine/x1.cpp2
-rw-r--r--src/mame/machine/x68k_hdc.cpp2
-rw-r--r--src/mame/machine/x68k_kbd.cpp2
-rw-r--r--src/mame/machine/x820kb.cpp2
-rw-r--r--src/mame/machine/xbox.cpp18
-rw-r--r--src/mame/machine/xbox_usb.cpp11
-rw-r--r--src/mame/machine/znmcu.cpp2
-rw-r--r--src/mame/machine/zorbakbd.cpp15
-rw-r--r--src/mame/machine/zs01.cpp2
-rw-r--r--src/mame/machine/zx8302.cpp2
229 files changed, 463 insertions, 408 deletions
diff --git a/src/mame/machine/315-5838_317-0229_comp.cpp b/src/mame/machine/315-5838_317-0229_comp.cpp
index a203d873499..dd03de19e1d 100644
--- a/src/mame/machine/315-5838_317-0229_comp.cpp
+++ b/src/mame/machine/315-5838_317-0229_comp.cpp
@@ -48,7 +48,7 @@
#include "emu.h"
#include "machine/315-5838_317-0229_comp.h"
-extern const device_type SEGA315_5838_COMP = &device_creator<sega_315_5838_comp_device>;
+const device_type SEGA315_5838_COMP = device_creator<sega_315_5838_comp_device>;
//#define DEBUG_DATA_DUMP
diff --git a/src/mame/machine/315-5881_crypt.cpp b/src/mame/machine/315-5881_crypt.cpp
index a3da4752d76..124f430c4e1 100644
--- a/src/mame/machine/315-5881_crypt.cpp
+++ b/src/mame/machine/315-5881_crypt.cpp
@@ -17,7 +17,7 @@
#include "emu.h"
#include "machine/315-5881_crypt.h"
-extern const device_type SEGA315_5881_CRYPT = &device_creator<sega_315_5881_crypt_device>;
+const device_type SEGA315_5881_CRYPT = device_creator<sega_315_5881_crypt_device>;
sega_315_5881_crypt_device::sega_315_5881_crypt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
diff --git a/src/mame/machine/315_5296.cpp b/src/mame/machine/315_5296.cpp
index 46464969d50..15621dc3cda 100644
--- a/src/mame/machine/315_5296.cpp
+++ b/src/mame/machine/315_5296.cpp
@@ -26,7 +26,7 @@
#include "machine/315_5296.h"
-const device_type SEGA_315_5296 = &device_creator<sega_315_5296_device>;
+const device_type SEGA_315_5296 = device_creator<sega_315_5296_device>;
//-------------------------------------------------
// sega_315_5296_device - constructor
diff --git a/src/mame/machine/3do.cpp b/src/mame/machine/3do.cpp
index 9f1ef4208da..e66ed76f6ee 100644
--- a/src/mame/machine/3do.cpp
+++ b/src/mame/machine/3do.cpp
@@ -61,8 +61,12 @@ Expansion bus stuff:
#include "emu.h"
#include "includes/3do.h"
+
#include "cpu/arm7/arm7core.h"
+
#include "debugger.h"
+#include "screen.h"
+
#define VERBOSE 1
#define LOG(x) do { if (VERBOSE) printf x; } while (0)
diff --git a/src/mame/machine/6883sam.cpp b/src/mame/machine/6883sam.cpp
index 36de03974ec..ecca3bd78bc 100644
--- a/src/mame/machine/6883sam.cpp
+++ b/src/mame/machine/6883sam.cpp
@@ -59,7 +59,7 @@
#define LOG_SAM 0
-const device_type SAM6883 = &device_creator<sam6883_device>;
+const device_type SAM6883 = device_creator<sam6883_device>;
diff --git a/src/mame/machine/abc1600mac.cpp b/src/mame/machine/abc1600mac.cpp
index a7c220d01d9..16e2338a9b2 100644
--- a/src/mame/machine/abc1600mac.cpp
+++ b/src/mame/machine/abc1600mac.cpp
@@ -54,7 +54,7 @@
// DEVICE DEFINITIONS
//**************************************************************************
-const device_type ABC1600_MAC = &device_creator<abc1600_mac_device>;
+const device_type ABC1600_MAC = device_creator<abc1600_mac_device>;
DEVICE_ADDRESS_MAP_START( map, 8, abc1600_mac_device )
diff --git a/src/mame/machine/abc80kb.cpp b/src/mame/machine/abc80kb.cpp
index f57bfb8a31e..afefb8cf5d8 100644
--- a/src/mame/machine/abc80kb.cpp
+++ b/src/mame/machine/abc80kb.cpp
@@ -88,7 +88,7 @@ Notes:
// DEVICE DEFINITIONS
//**************************************************************************
-const device_type ABC80_KEYBOARD = &device_creator<abc80_keyboard_device>;
+const device_type ABC80_KEYBOARD = device_creator<abc80_keyboard_device>;
//-------------------------------------------------
diff --git a/src/mame/machine/alpha8201.cpp b/src/mame/machine/alpha8201.cpp
index 99d130e63c6..9aa3522329c 100644
--- a/src/mame/machine/alpha8201.cpp
+++ b/src/mame/machine/alpha8201.cpp
@@ -277,7 +277,7 @@ Notes:
/**************************************************************************/
-const device_type ALPHA_8201 = &device_creator<alpha_8201_device>;
+const device_type ALPHA_8201 = device_creator<alpha_8201_device>;
//-------------------------------------------------
// alpha_8201_device - constructor
diff --git a/src/mame/machine/amstrad.cpp b/src/mame/machine/amstrad.cpp
index 6f38cf230e9..8e7d114e1ae 100644
--- a/src/mame/machine/amstrad.cpp
+++ b/src/mame/machine/amstrad.cpp
@@ -38,6 +38,8 @@ This gives a total of 19968 NOPs per frame.
#include "emu.h"
+#include "includes/amstrad.h"
+
#include "cpu/z80/z80.h"
#include "machine/i8255.h"
#include "machine/mc146818.h"
@@ -47,7 +49,6 @@ This gives a total of 19968 NOPs per frame.
#include "bus/cpc/mface2.h"
#include "imagedev/cassette.h"
#include "imagedev/snapquik.h"
-#include "includes/amstrad.h"
#include "sound/ay8910.h"
#include "machine/ram.h"
diff --git a/src/mame/machine/apollo.cpp b/src/mame/machine/apollo.cpp
index d7323da90c2..9bb870aab5a 100644
--- a/src/mame/machine/apollo.cpp
+++ b/src/mame/machine/apollo.cpp
@@ -137,9 +137,7 @@ private:
// internal state
};
-extern const device_type APOLLO_CONF;
-
-const device_type APOLLO_CONF = &device_creator<apollo_config_device>;
+const device_type APOLLO_CONF = device_creator<apollo_config_device>;
apollo_config_device::apollo_config_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, APOLLO_CONF, "Apollo Configuration", tag, owner, clock, "apollo_config", __FILE__)
@@ -811,7 +809,7 @@ WRITE8_MEMBER( apollo_sio::write )
}
// device type definition
-const device_type APOLLO_SIO = &device_creator<apollo_sio>;
+const device_type APOLLO_SIO = device_creator<apollo_sio>;
WRITE_LINE_MEMBER(apollo_state::sio_irq_handler)
{
@@ -864,7 +862,7 @@ WRITE_LINE_MEMBER(apollo_state::sio2_irq_handler)
/*** Apollo Node ID device ***/
// device type definition
-const device_type APOLLO_NI = &device_creator<apollo_ni> ;
+const device_type APOLLO_NI = device_creator<apollo_ni> ;
//-------------------------------------------------
// apollo_ni - constructor
@@ -1270,7 +1268,7 @@ MACHINE_RESET_MEMBER(apollo_state,apollo)
***************************************************************************/
// device type definition
-const device_type APOLLO_STDIO = &device_creator<apollo_stdio_device> ;
+const device_type APOLLO_STDIO = device_creator<apollo_stdio_device> ;
//-------------------------------------------------
// apollo_stdio_device - constructor
diff --git a/src/mame/machine/apollo_kbd.cpp b/src/mame/machine/apollo_kbd.cpp
index cc1220d0667..67244a77f24 100644
--- a/src/mame/machine/apollo_kbd.cpp
+++ b/src/mame/machine/apollo_kbd.cpp
@@ -56,7 +56,7 @@
***************************************************************************/
// device type definition
-const device_type APOLLO_KBD = &device_creator<apollo_kbd_device>;
+const device_type APOLLO_KBD = device_creator<apollo_kbd_device>;
//-------------------------------------------------
// apollo_kbd_device - constructor
diff --git a/src/mame/machine/apple2.cpp b/src/mame/machine/apple2.cpp
index 733ccf619e1..6ef1c5b5825 100644
--- a/src/mame/machine/apple2.cpp
+++ b/src/mame/machine/apple2.cpp
@@ -9,15 +9,16 @@
***************************************************************************/
#include "emu.h"
-#include "cpu/m6502/m6502.h"
#include "includes/apple2.h"
+
+#include "imagedev/flopdrv.h"
+#include "machine/appldriv.h"
#include "machine/applefdc.h"
#include "machine/sonydriv.h"
-#include "machine/appldriv.h"
-#include "imagedev/flopdrv.h"
-#include "imagedev/cassette.h"
-#include "sound/speaker.h"
+
#include "debugger.h"
+#include "screen.h"
+
#ifdef MAME_DEBUG
#define VERBOSE 1
diff --git a/src/mame/machine/apple2gs.cpp b/src/mame/machine/apple2gs.cpp
index f7b382432d5..20b10825854 100644
--- a/src/mame/machine/apple2gs.cpp
+++ b/src/mame/machine/apple2gs.cpp
@@ -120,6 +120,7 @@
#include "includes/apple2gs.h"
#include "includes/apple2.h"
+
#include "machine/applefdc.h"
#include "machine/sonydriv.h"
#include "machine/8530scc.h"
@@ -127,7 +128,9 @@
#include "cpu/g65816/g65816.h"
#include "sound/es5503.h"
#include "machine/ram.h"
+
#include "debugger.h"
+#include "screen.h"
#define LOG_C0XX 0
#define LOG_ADB 0
diff --git a/src/mame/machine/apple3.cpp b/src/mame/machine/apple3.cpp
index 238e0f46f27..8a7dc30e397 100644
--- a/src/mame/machine/apple3.cpp
+++ b/src/mame/machine/apple3.cpp
@@ -47,6 +47,7 @@
#include "emu.h"
#include "includes/apple3.h"
#include "includes/apple2.h"
+#include "screen.h"
#define LOG_MEMORY 1
#define LOG_INDXADDR 1
diff --git a/src/mame/machine/apricotkb.cpp b/src/mame/machine/apricotkb.cpp
index 21af9342dce..558145031c7 100644
--- a/src/mame/machine/apricotkb.cpp
+++ b/src/mame/machine/apricotkb.cpp
@@ -23,7 +23,7 @@
// DEVICE DEFINITIONS
//**************************************************************************
-const device_type APRICOT_KEYBOARD = &device_creator<apricot_keyboard_device>;
+const device_type APRICOT_KEYBOARD = device_creator<apricot_keyboard_device>;
//-------------------------------------------------
diff --git a/src/mame/machine/archimds.cpp b/src/mame/machine/archimds.cpp
index 38778054513..a2f610b4af5 100644
--- a/src/mame/machine/archimds.cpp
+++ b/src/mame/machine/archimds.cpp
@@ -29,8 +29,8 @@
*****************************************************************************/
#include "emu.h"
-#include "cpu/arm/arm.h"
#include "includes/archimds.h"
+#include "cpu/arm/arm.h"
#include "debugger.h"
static const int page_sizes[4] = { 4096, 8192, 16384, 32768 };
diff --git a/src/mame/machine/asic65.cpp b/src/mame/machine/asic65.cpp
index d4bc451c0ce..2336825677b 100644
--- a/src/mame/machine/asic65.cpp
+++ b/src/mame/machine/asic65.cpp
@@ -82,7 +82,7 @@ static const uint8_t command_map[3][MAX_COMMANDS] =
}
};
-const device_type ASIC65 = &device_creator<asic65_device>;
+const device_type ASIC65 = device_creator<asic65_device>;
asic65_device::asic65_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, ASIC65, "Atari ASIC65", tag, owner, clock, "asic65", __FILE__),
diff --git a/src/mame/machine/at.cpp b/src/mame/machine/at.cpp
index d79a9da0318..5dcca6b3177 100644
--- a/src/mame/machine/at.cpp
+++ b/src/mame/machine/at.cpp
@@ -13,10 +13,11 @@
#include "machine/at_keybc.h"
#include "bus/pc_kbd/pc_kbdc.h"
#include "softlist_dev.h"
+#include "speaker.h"
#define LOG_PORT80 0
-const device_type AT_MB = &device_creator<at_mb_device>;
+const device_type AT_MB = device_creator<at_mb_device>;
at_mb_device::at_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, AT_MB, "PC/AT Motherboard", tag, owner, clock, "at_mb", __FILE__),
diff --git a/src/mame/machine/at.h b/src/mame/machine/at.h
index 75f3f7cb703..3eac37f4355 100644
--- a/src/mame/machine/at.h
+++ b/src/mame/machine/at.h
@@ -1,7 +1,7 @@
// license:BSD-3-Clause
// copyright-holders:Wilbert Pol, Miodrag Milanovic, Carl
-#ifndef _AT_H_
-#define _AT_H_
+#ifndef MAME_MACHINE_AT_H
+#define MAME_MACHINE_AT_H
#include "machine/mc146818.h"
#include "machine/pic8259.h"
@@ -9,7 +9,7 @@
#include "machine/am9517a.h"
#include "bus/pc_kbd/pc_kbdc.h"
#include "bus/isa/isa.h"
-#include "sound/speaker.h"
+#include "sound/spkrdev.h"
#include "softlist.h"
class at_mb_device : public device_t
@@ -91,4 +91,4 @@ extern const device_type AT_MB;
MACHINE_CONFIG_EXTERN(at_softlists);
-#endif
+#endif // MAME_MACHINE_AT_H
diff --git a/src/mame/machine/atari_vg.cpp b/src/mame/machine/atari_vg.cpp
index 0ae26eef201..f9d0a999074 100644
--- a/src/mame/machine/atari_vg.cpp
+++ b/src/mame/machine/atari_vg.cpp
@@ -35,7 +35,7 @@
// device type definition
-const device_type ATARIVGEAROM = &device_creator<atari_vg_earom_device>;
+const device_type ATARIVGEAROM = device_creator<atari_vg_earom_device>;
//-------------------------------------------------
// atari_vg_earom_device - constructor
diff --git a/src/mame/machine/atarifdc.cpp b/src/mame/machine/atarifdc.cpp
index 4435d478534..ef399bb11c8 100644
--- a/src/mame/machine/atarifdc.cpp
+++ b/src/mame/machine/atarifdc.cpp
@@ -749,7 +749,7 @@ legacy_floppy_image_device *atari_fdc_device::atari_floppy_get_device_child(int
return nullptr;
}
-const device_type ATARI_FDC = &device_creator<atari_fdc_device>;
+const device_type ATARI_FDC = device_creator<atari_fdc_device>;
atari_fdc_device::atari_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, ATARI_FDC, "Atari FDC", tag, owner, clock, "atari_fdc", __FILE__),
diff --git a/src/mame/machine/atarigen.cpp b/src/mame/machine/atarigen.cpp
index baa7f4b465e..57f851b131a 100644
--- a/src/mame/machine/atarigen.cpp
+++ b/src/mame/machine/atarigen.cpp
@@ -49,7 +49,7 @@ inline const atarigen_screen_timer *get_screen_timer(screen_device &screen)
//**************************************************************************
// device type definition
-const device_type ATARI_SOUND_COMM = &device_creator<atari_sound_comm_device>;
+const device_type ATARI_SOUND_COMM = device_creator<atari_sound_comm_device>;
//-------------------------------------------------
// atari_sound_comm_device - constructor
@@ -342,7 +342,7 @@ void atari_sound_comm_device::delayed_6502_write(int data)
//**************************************************************************
// device type definition
-const device_type ATARI_VAD = &device_creator<atari_vad_device>;
+const device_type ATARI_VAD = device_creator<atari_vad_device>;
//-------------------------------------------------
// atari_vad_device - constructor
@@ -819,8 +819,8 @@ void atari_vad_device::eof_update(emu_timer &timer)
//**************************************************************************
// device type definition
-const device_type ATARI_EEPROM_2804 = &device_creator<atari_eeprom_2804_device>;
-const device_type ATARI_EEPROM_2816 = &device_creator<atari_eeprom_2816_device>;
+const device_type ATARI_EEPROM_2804 = device_creator<atari_eeprom_2804_device>;
+const device_type ATARI_EEPROM_2816 = device_creator<atari_eeprom_2816_device>;
//-------------------------------------------------
// atari_eeprom_device - constructor
diff --git a/src/mame/machine/atarigen.h b/src/mame/machine/atarigen.h
index 9927be55daa..bcede09ed34 100644
--- a/src/mame/machine/atarigen.h
+++ b/src/mame/machine/atarigen.h
@@ -8,13 +8,14 @@
***************************************************************************/
-#ifndef __MACHINE_ATARIGEN__
-#define __MACHINE_ATARIGEN__
+#ifndef MAME_MACHINE_ATARIGEN_H
+#define MAME_MACHINE_ATARIGEN_H
+#include "includes/slapstic.h"
+#include "cpu/m6502/m6502.h"
#include "machine/eeprompar.h"
#include "video/atarimo.h"
-#include "cpu/m6502/m6502.h"
-#include "includes/slapstic.h"
+#include "screen.h"
/***************************************************************************
@@ -458,4 +459,4 @@ public:
***************************************************************************/
-#endif
+#endif // MAME_MACHINE_ATARIGEN_H
diff --git a/src/mame/machine/atarixga.cpp b/src/mame/machine/atarixga.cpp
index cd574d48db9..37636902aea 100644
--- a/src/mame/machine/atarixga.cpp
+++ b/src/mame/machine/atarixga.cpp
@@ -63,7 +63,7 @@ static uint16_t parity(uint16_t x)
*
*************************************/
-extern const device_type ATARI_136094_0072 = &device_creator<atari_136094_0072_device>;
+const device_type ATARI_136094_0072 = device_creator<atari_136094_0072_device>;
atari_136094_0072_device::atari_136094_0072_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: atari_xga_device(mconfig, ATARI_136094_0072, tag, owner, clock, "Atari 136094-0072 XGA", "136094-0072")
@@ -283,7 +283,7 @@ READ32_MEMBER(atari_136094_0072_device::read)
*
*************************************/
-extern const device_type ATARI_136095_0072 = &device_creator<atari_136095_0072_device>;
+const device_type ATARI_136095_0072 = device_creator<atari_136095_0072_device>;
atari_136095_0072_device::atari_136095_0072_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: atari_xga_device(mconfig, ATARI_136095_0072, tag, owner, clock, "Atari 136095-0072 XGA", "136095-0072")
diff --git a/src/mame/machine/awboard.cpp b/src/mame/machine/awboard.cpp
index 59dd8179828..dcccc77efc1 100644
--- a/src/mame/machine/awboard.cpp
+++ b/src/mame/machine/awboard.cpp
@@ -153,7 +153,7 @@ ROM board internal layouts:
*/
-const device_type AW_ROM_BOARD = &device_creator<aw_rom_board>;
+const device_type AW_ROM_BOARD = device_creator<aw_rom_board>;
DEVICE_ADDRESS_MAP_START(submap, 16, aw_rom_board)
AM_RANGE(0x00, 0x01) AM_WRITE(epr_offsetl_w)
diff --git a/src/mame/machine/beta.cpp b/src/mame/machine/beta.cpp
index 9185aa933f3..83d01f23f19 100644
--- a/src/mame/machine/beta.cpp
+++ b/src/mame/machine/beta.cpp
@@ -24,7 +24,7 @@ BUGS:
***************************************************************************/
-const device_type BETA_DISK = &device_creator<beta_disk_device>;
+const device_type BETA_DISK = device_creator<beta_disk_device>;
beta_disk_device::beta_disk_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, BETA_DISK, "Beta Disk Interface", tag, owner, clock, "betadisk", __FILE__)
diff --git a/src/mame/machine/bfm_bd1.cpp b/src/mame/machine/bfm_bd1.cpp
index 3c1b6ea32f4..e16118c9424 100644
--- a/src/mame/machine/bfm_bd1.cpp
+++ b/src/mame/machine/bfm_bd1.cpp
@@ -11,7 +11,7 @@
#include "emu.h"
#include "bfm_bd1.h"
-const device_type BFM_BD1 = &device_creator<bfm_bd1_t>;
+const device_type BFM_BD1 = device_creator<bfm_bd1_t>;
/*
diff --git a/src/mame/machine/bfm_bda.cpp b/src/mame/machine/bfm_bda.cpp
index 2efd4a9f630..9d32eb883cd 100644
--- a/src/mame/machine/bfm_bda.cpp
+++ b/src/mame/machine/bfm_bda.cpp
@@ -10,7 +10,7 @@
#include "emu.h"
#include "bfm_bda.h"
-const device_type BFM_BDA = &device_creator<bfm_bda_t>;
+const device_type BFM_BDA = device_creator<bfm_bda_t>;
//I currently use the BDA character set, until a suitable image can be programmed
diff --git a/src/mame/machine/c117.cpp b/src/mame/machine/c117.cpp
index b1d86b3ee03..36e8b5e3305 100644
--- a/src/mame/machine/c117.cpp
+++ b/src/mame/machine/c117.cpp
@@ -31,7 +31,7 @@ static MACHINE_CONFIG_FRAGMENT( namco_c117 )
MACHINE_CONFIG_END
-const device_type NAMCO_C117 = &device_creator<namco_c117_device>;
+const device_type NAMCO_C117 = device_creator<namco_c117_device>;
//-------------------------------------------------
diff --git a/src/mame/machine/cammu.cpp b/src/mame/machine/cammu.cpp
index 9c31e925611..c58298453d4 100644
--- a/src/mame/machine/cammu.cpp
+++ b/src/mame/machine/cammu.cpp
@@ -39,9 +39,9 @@ DEVICE_ADDRESS_MAP_START(map, 32, cammu_c3_device)
AM_RANGE(0x000, 0xfff) AM_READWRITE(cammu_r, cammu_w)
ADDRESS_MAP_END
-const device_type CAMMU_C4T = &device_creator<cammu_c4t_device>;
-const device_type CAMMU_C4I = &device_creator<cammu_c4i_device>;
-const device_type CAMMU_C3 = &device_creator<cammu_c3_device>;
+const device_type CAMMU_C4T = device_creator<cammu_c4t_device>;
+const device_type CAMMU_C4I = device_creator<cammu_c4i_device>;
+const device_type CAMMU_C3 = device_creator<cammu_c3_device>;
cammu_c4t_device::cammu_c4t_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: cammu_device(mconfig, CAMMU_C4T, "C4E/C4T CAMMU", tag, owner, clock, "C4T", __FILE__) { }
diff --git a/src/mame/machine/cat702.cpp b/src/mame/machine/cat702.cpp
index a474c18be4b..7a3dc1f0e52 100644
--- a/src/mame/machine/cat702.cpp
+++ b/src/mame/machine/cat702.cpp
@@ -87,7 +87,7 @@
#include "emu.h"
#include "cat702.h"
-const device_type CAT702 = &device_creator<cat702_device>;
+const device_type CAT702 = device_creator<cat702_device>;
cat702_device::cat702_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, CAT702, "CAT702", tag, owner, clock, "cat702", __FILE__),
diff --git a/src/mame/machine/cdi070.cpp b/src/mame/machine/cdi070.cpp
index 6f4bfbbd3b5..c3ba4d00891 100644
--- a/src/mame/machine/cdi070.cpp
+++ b/src/mame/machine/cdi070.cpp
@@ -27,7 +27,7 @@ TODO:
#include "includes/cdi.h"
// device type definition
-const device_type MACHINE_CDI68070 = &device_creator<cdi68070_device>;
+const device_type MACHINE_CDI68070 = device_creator<cdi68070_device>;
#if ENABLE_VERBOSE_LOG
static inline void ATTR_PRINTF(3,4) verboselog(device_t& device, int n_level, const char *s_fmt, ...)
diff --git a/src/mame/machine/cdicdic.cpp b/src/mame/machine/cdicdic.cpp
index a5c5628c6cf..022fd1313c3 100644
--- a/src/mame/machine/cdicdic.cpp
+++ b/src/mame/machine/cdicdic.cpp
@@ -30,7 +30,7 @@ TODO:
#include "imagedev/chd_cd.h"
// device type definition
-const device_type MACHINE_CDICDIC = &device_creator<cdicdic_device>;
+const device_type MACHINE_CDICDIC = device_creator<cdicdic_device>;
#if ENABLE_VERBOSE_LOG
static inline void ATTR_PRINTF(3,4) verboselog(device_t& device, int n_level, const char *s_fmt, ...)
diff --git a/src/mame/machine/cdislave.cpp b/src/mame/machine/cdislave.cpp
index 23141055e59..bbf21038307 100644
--- a/src/mame/machine/cdislave.cpp
+++ b/src/mame/machine/cdislave.cpp
@@ -28,7 +28,7 @@ TODO:
#include "includes/cdi.h"
// device type definition
-const device_type MACHINE_CDISLAVE = &device_creator<cdislave_device>;
+const device_type MACHINE_CDISLAVE = device_creator<cdislave_device>;
#if ENABLE_VERBOSE_LOG
diff --git a/src/mame/machine/cedar_magnet_flop.cpp b/src/mame/machine/cedar_magnet_flop.cpp
index f496ac42f7f..c0abb54b341 100644
--- a/src/mame/machine/cedar_magnet_flop.cpp
+++ b/src/mame/machine/cedar_magnet_flop.cpp
@@ -8,7 +8,7 @@
#include "emu.h"
#include "cedar_magnet_flop.h"
-extern const device_type CEDAR_MAGNET_FLOP = &device_creator<cedar_magnet_flop_device>;
+const device_type CEDAR_MAGNET_FLOP = device_creator<cedar_magnet_flop_device>;
cedar_magnet_flop_device::cedar_magnet_flop_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, CEDAR_MAGNET_FLOP, "Cedar Floppy Simulation", tag, owner, clock, "cedmag_flop", __FILE__)
diff --git a/src/mame/machine/cedar_magnet_plane.cpp b/src/mame/machine/cedar_magnet_plane.cpp
index 261e3d17ecb..9646d49dbed 100644
--- a/src/mame/machine/cedar_magnet_plane.cpp
+++ b/src/mame/machine/cedar_magnet_plane.cpp
@@ -6,7 +6,7 @@
#include "cedar_magnet_plane.h"
-extern const device_type CEDAR_MAGNET_PLANE = &device_creator<cedar_magnet_plane_device>;
+const device_type CEDAR_MAGNET_PLANE = device_creator<cedar_magnet_plane_device>;
cedar_magnet_plane_device::cedar_magnet_plane_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
diff --git a/src/mame/machine/cedar_magnet_sprite.cpp b/src/mame/machine/cedar_magnet_sprite.cpp
index 74b8cedc5c5..5b27751dedd 100644
--- a/src/mame/machine/cedar_magnet_sprite.cpp
+++ b/src/mame/machine/cedar_magnet_sprite.cpp
@@ -10,7 +10,7 @@
#include "cedar_magnet_sprite.h"
-extern const device_type CEDAR_MAGNET_SPRITE = &device_creator<cedar_magnet_sprite_device>;
+const device_type CEDAR_MAGNET_SPRITE = device_creator<cedar_magnet_sprite_device>;
cedar_magnet_sprite_device::cedar_magnet_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
diff --git a/src/mame/machine/coco.cpp b/src/mame/machine/coco.cpp
index ddf0efaca74..5dfc15c28ed 100644
--- a/src/mame/machine/coco.cpp
+++ b/src/mame/machine/coco.cpp
@@ -59,7 +59,9 @@ DAC and bitbanger values written should be reflected in the read.
#include "emu.h"
#include "includes/coco.h"
+
#include "cpu/m6809/m6809.h"
+#include "screen.h"
diff --git a/src/mame/machine/coco_vhd.cpp b/src/mame/machine/coco_vhd.cpp
index 1fd772418d9..e9141a63927 100644
--- a/src/mame/machine/coco_vhd.cpp
+++ b/src/mame/machine/coco_vhd.cpp
@@ -65,7 +65,7 @@
CORE IMPLEMENTATION
***************************************************************************/
-const device_type COCO_VHD = &device_creator<coco_vhd_image_device>;
+const device_type COCO_VHD = device_creator<coco_vhd_image_device>;
//-------------------------------------------------
// coco_vhd_image_device - constructor
diff --git a/src/mame/machine/compiskb.cpp b/src/mame/machine/compiskb.cpp
index 0343351ce51..8680a94798b 100644
--- a/src/mame/machine/compiskb.cpp
+++ b/src/mame/machine/compiskb.cpp
@@ -9,6 +9,10 @@
#include "emu.h"
#include "compiskb.h"
+#include "cpu/mcs48/mcs48.h"
+
+#include "speaker.h"
+
//**************************************************************************
@@ -24,7 +28,7 @@
// DEVICE DEFINITIONS
//**************************************************************************
-const device_type COMPIS_KEYBOARD = &device_creator<compis_keyboard_device>;
+const device_type COMPIS_KEYBOARD = device_creator<compis_keyboard_device>;
//-------------------------------------------------
diff --git a/src/mame/machine/compiskb.h b/src/mame/machine/compiskb.h
index 1d6c2f18d31..dfaf863bee4 100644
--- a/src/mame/machine/compiskb.h
+++ b/src/mame/machine/compiskb.h
@@ -6,13 +6,12 @@
*********************************************************************/
-#pragma once
+#ifndef MAME_INCLUDES_COMPISKB_H
+#define MAME_INCLUDES_COMPISKB_H
-#ifndef __COMPIS_KEYBOARD__
-#define __COMPIS_KEYBOARD__
+#pragma once
-#include "cpu/mcs48/mcs48.h"
-#include "sound/speaker.h"
+#include "sound/spkrdev.h"
@@ -78,4 +77,4 @@ extern const device_type COMPIS_KEYBOARD;
-#endif
+#endif // MAME_INCLUDES_COMPISKB_H
diff --git a/src/mame/machine/cuda.cpp b/src/mame/machine/cuda.cpp
index c578e6a3181..5ce2edfbd9a 100644
--- a/src/mame/machine/cuda.cpp
+++ b/src/mame/machine/cuda.cpp
@@ -40,9 +40,9 @@
#include "emu.h"
#include "cuda.h"
+#include "includes/mac.h"
#include "cpu/m6805/m6805.h"
#include "sound/asc.h"
-#include "includes/mac.h"
//**************************************************************************
// MACROS / CONSTANTS
@@ -54,7 +54,7 @@
// DEVICE DEFINITIONS
//**************************************************************************
-const device_type CUDA = &device_creator<cuda_device>;
+const device_type CUDA = device_creator<cuda_device>;
ROM_START( cuda )
ROM_REGION(0x4400, CUDA_CPU_TAG, 0)
diff --git a/src/mame/machine/dc-ctrl.cpp b/src/mame/machine/dc-ctrl.cpp
index 36bada88469..48db78e1af6 100644
--- a/src/mame/machine/dc-ctrl.cpp
+++ b/src/mame/machine/dc-ctrl.cpp
@@ -3,7 +3,7 @@
#include "emu.h"
#include "dc-ctrl.h"
-const device_type DC_CONTROLLER = &device_creator<dc_controller_device>;
+const device_type DC_CONTROLLER = device_creator<dc_controller_device>;
void dc_controller_device::static_set_port_tag(device_t &device, int port, const char *tag)
{
diff --git a/src/mame/machine/dec_lk201.cpp b/src/mame/machine/dec_lk201.cpp
index 3e611d1f4e0..30d9203d2f3 100644
--- a/src/mame/machine/dec_lk201.cpp
+++ b/src/mame/machine/dec_lk201.cpp
@@ -107,6 +107,7 @@ ________|D7 |D6 |D5 |D4 |D3 |D2 |D1 |D0
#include "emu.h"
#include "dec_lk201.h"
#include "cpu/m6805/m6805.h"
+#include "speaker.h"
//**************************************************************************
// MACROS / CONSTANTS
@@ -176,7 +177,7 @@ ________|D7 |D6 |D5 |D4 |D3 |D2 |D1 |D0
// DEVICE DEFINITIONS
//**************************************************************************
-const device_type LK201 = &device_creator<lk201_device>;
+const device_type LK201 = device_creator<lk201_device>;
ROM_START( lk201 )
ROM_REGION(0x2000, LK201_CPU_TAG, 0)
diff --git a/src/mame/machine/deco104.cpp b/src/mame/machine/deco104.cpp
index d37726b63b8..42ce906f9a6 100644
--- a/src/mame/machine/deco104.cpp
+++ b/src/mame/machine/deco104.cpp
@@ -1051,7 +1051,7 @@ deco146port_xx port104_table[] = {
-const device_type DECO104PROT = &device_creator<deco104_device>;
+const device_type DECO104PROT = device_creator<deco104_device>;
diff --git a/src/mame/machine/deco146.cpp b/src/mame/machine/deco146.cpp
index ea805f73407..e5c9f35cd59 100644
--- a/src/mame/machine/deco146.cpp
+++ b/src/mame/machine/deco146.cpp
@@ -1315,7 +1315,7 @@ uint16_t deco_146_base_device::read_data(uint16_t address, uint16_t mem_mask, ui
}
-//const device_type DECO146BASE = &device_creator<deco_146_base_device>;
+//const device_type DECO146BASE = device_creator<deco_146_base_device>;
@@ -1464,7 +1464,7 @@ void deco_146_base_device::device_reset()
-const device_type DECO146PROT = &device_creator<deco146_device>;
+const device_type DECO146PROT = device_creator<deco146_device>;
uint16_t deco_146_base_device::read_data_getloc(uint16_t address, int& location)
diff --git a/src/mame/machine/deco222.cpp b/src/mame/machine/deco222.cpp
index 9207c164f07..d19aefade66 100644
--- a/src/mame/machine/deco222.cpp
+++ b/src/mame/machine/deco222.cpp
@@ -8,6 +8,9 @@
#include "emu.h"
#include "deco222.h"
+const device_type DECO_222 = device_creator<deco_222_device>;
+const device_type DECO_C10707 = device_creator<deco_c10707_device>;
+
deco_222_device::deco_222_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
m6502_device(mconfig, DECO_222, "DECO 222", tag, owner, clock, "deco222", __FILE__)
diff --git a/src/mame/machine/deco222.h b/src/mame/machine/deco222.h
index 6281ba7a88c..56df49a0bad 100644
--- a/src/mame/machine/deco222.h
+++ b/src/mame/machine/deco222.h
@@ -21,8 +21,6 @@ protected:
};
-static const device_type DECO_222 = &device_creator<deco_222_device>;
-
class deco_c10707_device : public m6502_device {
@@ -43,4 +41,6 @@ protected:
};
-static const device_type DECO_C10707 = &device_creator<deco_c10707_device>;
+
+extern const device_type DECO_222;
+extern const device_type DECO_C10707;
diff --git a/src/mame/machine/decocass_tape.cpp b/src/mame/machine/decocass_tape.cpp
index a133a7c6339..a3be6307cfc 100644
--- a/src/mame/machine/decocass_tape.cpp
+++ b/src/mame/machine/decocass_tape.cpp
@@ -56,7 +56,7 @@
static uint16_t tape_crc16_byte(uint16_t crc, uint8_t data);
-const device_type DECOCASS_TAPE = &device_creator<decocass_tape_device>;
+const device_type DECOCASS_TAPE = device_creator<decocass_tape_device>;
decocass_tape_device::decocass_tape_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, DECOCASS_TAPE, "DECO Cassette Tape", tag, owner, clock, "decocass_tape", __FILE__),
diff --git a/src/mame/machine/decocpu6.cpp b/src/mame/machine/decocpu6.cpp
index 5f5ab6e97b3..2162812d3dd 100644
--- a/src/mame/machine/decocpu6.cpp
+++ b/src/mame/machine/decocpu6.cpp
@@ -9,6 +9,9 @@
#include "emu.h"
#include "decocpu6.h"
+const device_type DECO_CPU6 = device_creator<deco_cpu6_device>;
+
+
deco_cpu6_device::deco_cpu6_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
m6502_device(mconfig, DECO_CPU6, "DECO CPU-6", tag, owner, clock, "decocpu6", __FILE__)
{
diff --git a/src/mame/machine/decocpu6.h b/src/mame/machine/decocpu6.h
index fc176bbcfcd..5db333114fc 100644
--- a/src/mame/machine/decocpu6.h
+++ b/src/mame/machine/decocpu6.h
@@ -20,4 +20,4 @@ protected:
};
-static const device_type DECO_CPU6 = &device_creator<deco_cpu6_device>;
+extern const device_type DECO_CPU6;
diff --git a/src/mame/machine/decocpu7.cpp b/src/mame/machine/decocpu7.cpp
index 7900cd3e866..6c7fe9c8179 100644
--- a/src/mame/machine/decocpu7.cpp
+++ b/src/mame/machine/decocpu7.cpp
@@ -4,6 +4,9 @@
#include "emu.h"
#include "decocpu7.h"
+const device_type DECO_CPU7 = device_creator<deco_cpu7_device>;
+
+
deco_cpu7_device::deco_cpu7_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
m6502_device(mconfig, DECO_CPU7, "DECO CPU-7", tag, owner, clock, "decocpu7", __FILE__)
{
diff --git a/src/mame/machine/decocpu7.h b/src/mame/machine/decocpu7.h
index 229d97d6e30..18d1510bcb9 100644
--- a/src/mame/machine/decocpu7.h
+++ b/src/mame/machine/decocpu7.h
@@ -22,4 +22,4 @@ protected:
};
-static const device_type DECO_CPU7 = &device_creator<deco_cpu7_device>;
+extern const device_type DECO_CPU7;
diff --git a/src/mame/machine/decopincpu.cpp b/src/mame/machine/decopincpu.cpp
index 5166940d2ee..71ee0359f65 100644
--- a/src/mame/machine/decopincpu.cpp
+++ b/src/mame/machine/decopincpu.cpp
@@ -16,10 +16,10 @@
#include "emu.h"
#include "decopincpu.h"
-const device_type DECOCPU1 = &device_creator<decocpu_type1_device>;
-const device_type DECOCPU2 = &device_creator<decocpu_type2_device>;
-const device_type DECOCPU3 = &device_creator<decocpu_type3_device>;
-const device_type DECOCPU3B = &device_creator<decocpu_type3b_device>;
+const device_type DECOCPU1 = device_creator<decocpu_type1_device>;
+const device_type DECOCPU2 = device_creator<decocpu_type2_device>;
+const device_type DECOCPU3 = device_creator<decocpu_type3_device>;
+const device_type DECOCPU3B = device_creator<decocpu_type3b_device>;
static ADDRESS_MAP_START( decocpu1_map, AS_PROGRAM, 8, decocpu_type1_device )
AM_RANGE(0x0000, 0x07ff) AM_RAM AM_SHARE("nvram")
diff --git a/src/mame/machine/dmv_keyb.cpp b/src/mame/machine/dmv_keyb.cpp
index a34993d1861..6d5d830c9d9 100644
--- a/src/mame/machine/dmv_keyb.cpp
+++ b/src/mame/machine/dmv_keyb.cpp
@@ -14,7 +14,7 @@
// DEVICE DEFINITIONS
//**************************************************************************
-const device_type DMV_KEYBOARD = &device_creator<dmv_keyboard_device>;
+const device_type DMV_KEYBOARD = device_creator<dmv_keyboard_device>;
//***************************************************************************
diff --git a/src/mame/machine/docg3.cpp b/src/mame/machine/docg3.cpp
index 4ab93b55ea0..d6ef4bdca30 100644
--- a/src/mame/machine/docg3.cpp
+++ b/src/mame/machine/docg3.cpp
@@ -32,7 +32,7 @@ static inline void ATTR_PRINTF(3,4) verboselog( device_t &device, int n_level, c
***************************************************************************/
// device type definition
-const device_type DISKONCHIP_G3 = &device_creator<diskonchip_g3_device>;
+const device_type DISKONCHIP_G3 = device_creator<diskonchip_g3_device>;
//-------------------------------------------------
// diskonchip_g3_device - constructor
diff --git a/src/mame/machine/egret.cpp b/src/mame/machine/egret.cpp
index ee3352fb0ea..4ca3dd6fb3e 100644
--- a/src/mame/machine/egret.cpp
+++ b/src/mame/machine/egret.cpp
@@ -39,9 +39,9 @@
#include "emu.h"
#include "egret.h"
+#include "includes/mac.h"
#include "cpu/m6805/m6805.h"
#include "sound/asc.h"
-#include "includes/mac.h"
//**************************************************************************
// MACROS / CONSTANTS
@@ -53,7 +53,7 @@
// DEVICE DEFINITIONS
//**************************************************************************
-const device_type EGRET = &device_creator<egret_device>;
+const device_type EGRET = device_creator<egret_device>;
ROM_START( egret )
ROM_REGION(0x4400, EGRET_CPU_TAG, 0)
diff --git a/src/mame/machine/einstein.cpp b/src/mame/machine/einstein.cpp
index 0a9035df945..d9145ab2509 100644
--- a/src/mame/machine/einstein.cpp
+++ b/src/mame/machine/einstein.cpp
@@ -15,7 +15,7 @@
****************************************************************/
-const device_type EINSTEIN_KEYBOARD_DAISY = &device_creator<einstein_keyboard_daisy_device>;
+const device_type EINSTEIN_KEYBOARD_DAISY = device_creator<einstein_keyboard_daisy_device>;
//**************************************************************************
@@ -79,7 +79,7 @@ void einstein_keyboard_daisy_device::z80daisy_irq_reti()
{
}
-const device_type EINSTEIN_ADC_DAISY = &device_creator<einstein_adc_daisy_device>;
+const device_type EINSTEIN_ADC_DAISY = device_creator<einstein_adc_daisy_device>;
//**************************************************************************
// LIVE DEVICE
@@ -143,7 +143,7 @@ void einstein_adc_daisy_device::z80daisy_irq_reti()
}
-const device_type EINSTEIN_FIRE_DAISY = &device_creator<einstein_fire_daisy_device>;
+const device_type EINSTEIN_FIRE_DAISY = device_creator<einstein_fire_daisy_device>;
//**************************************************************************
diff --git a/src/mame/machine/electron.cpp b/src/mame/machine/electron.cpp
index 5c72a5cc1ea..1bdfdebb88e 100644
--- a/src/mame/machine/electron.cpp
+++ b/src/mame/machine/electron.cpp
@@ -11,8 +11,7 @@
#include "emu.h"
#include "includes/electron.h"
-#include "sound/beep.h"
-#include "imagedev/cassette.h"
+#include "screen.h"
void electron_state::waitforramsync()
diff --git a/src/mame/machine/esqlcd.cpp b/src/mame/machine/esqlcd.cpp
index 273e52b1953..9e71f99c2f0 100644
--- a/src/mame/machine/esqlcd.cpp
+++ b/src/mame/machine/esqlcd.cpp
@@ -10,7 +10,7 @@
//#define VERBOSE
-const device_type ESQ2x16_SQ1 = &device_creator<esq2x16_sq1_t>;
+const device_type ESQ2x16_SQ1 = device_creator<esq2x16_sq1_t>;
// --- SQ1 - Parduz --------------------------------------------------------------------------------------------------------------------------
static MACHINE_CONFIG_FRAGMENT(esq2x16)
diff --git a/src/mame/machine/esqpanel.cpp b/src/mame/machine/esqpanel.cpp
index 741e8e71003..e0bdfc823b5 100644
--- a/src/mame/machine/esqpanel.cpp
+++ b/src/mame/machine/esqpanel.cpp
@@ -14,9 +14,9 @@
// DEVICE DEFINITIONS
//**************************************************************************
-const device_type ESQPANEL1x22 = &device_creator<esqpanel1x22_device>;
-const device_type ESQPANEL2x40 = &device_creator<esqpanel2x40_device>;
-const device_type ESQPANEL2x16_SQ1 = &device_creator<esqpanel2x16_sq1_device>;
+const device_type ESQPANEL1x22 = device_creator<esqpanel1x22_device>;
+const device_type ESQPANEL2x40 = device_creator<esqpanel2x40_device>;
+const device_type ESQPANEL2x16_SQ1 = device_creator<esqpanel2x16_sq1_device>;
//**************************************************************************
// LIVE DEVICE
diff --git a/src/mame/machine/esqvfd.cpp b/src/mame/machine/esqvfd.cpp
index aa557cbed92..81a7400b223 100644
--- a/src/mame/machine/esqvfd.cpp
+++ b/src/mame/machine/esqvfd.cpp
@@ -10,9 +10,9 @@
#include "esq1by22.lh"
#include "esq2by40.lh"
-const device_type ESQ1x22 = &device_creator<esq1x22_t>;
-const device_type ESQ2x40 = &device_creator<esq2x40_t>;
-const device_type ESQ2x40_SQ1 = &device_creator<esq2x40_sq1_t>;
+const device_type ESQ1x22 = device_creator<esq1x22_t>;
+const device_type ESQ2x40 = device_creator<esq2x40_t>;
+const device_type ESQ2x40_SQ1 = device_creator<esq2x40_sq1_t>;
// adapted from bfm_bd1, rearranged to work with ASCII data used by the Ensoniq h/w
static const uint16_t font[]=
diff --git a/src/mame/machine/fd1089.cpp b/src/mame/machine/fd1089.cpp
index bf12b35cbae..1d6a13c1940 100644
--- a/src/mame/machine/fd1089.cpp
+++ b/src/mame/machine/fd1089.cpp
@@ -142,8 +142,8 @@
//**************************************************************************
// device type definition
-const device_type FD1089A = &device_creator<fd1089a_device>;
-const device_type FD1089B = &device_creator<fd1089b_device>;
+const device_type FD1089A = device_creator<fd1089a_device>;
+const device_type FD1089B = device_creator<fd1089b_device>;
// common base lookup table, shared between A and B variants
const uint8_t fd1089_base_device::s_basetable_fd1089[0x100] =
diff --git a/src/mame/machine/fd1094.cpp b/src/mame/machine/fd1094.cpp
index 8452bf20e77..2c81115e82f 100644
--- a/src/mame/machine/fd1094.cpp
+++ b/src/mame/machine/fd1094.cpp
@@ -379,7 +379,7 @@
//**************************************************************************
// device type definition
-const device_type FD1094 = &device_creator<fd1094_device>;
+const device_type FD1094 = device_creator<fd1094_device>;
/*
317-0162 CPU also needs to mask:
diff --git a/src/mame/machine/fm_scsi.cpp b/src/mame/machine/fm_scsi.cpp
index 6187c91aab7..164f26e7610 100644
--- a/src/mame/machine/fm_scsi.cpp
+++ b/src/mame/machine/fm_scsi.cpp
@@ -32,7 +32,7 @@
* Device config
*/
-const device_type FMSCSI = &device_creator<fmscsi_device>;
+const device_type FMSCSI = device_creator<fmscsi_device>;
/*
* Device
diff --git a/src/mame/machine/fmt_icmem.cpp b/src/mame/machine/fmt_icmem.cpp
index 8a22f583d30..bdb058b11dd 100644
--- a/src/mame/machine/fmt_icmem.cpp
+++ b/src/mame/machine/fmt_icmem.cpp
@@ -14,7 +14,7 @@
#include "fmt_icmem.h"
// device type definition
-const device_type FMT_ICMEM = &device_creator<fmt_icmem_device>;
+const device_type FMT_ICMEM = device_creator<fmt_icmem_device>;
//-------------------------------------------------
// fmt_icmem_device - constructor
diff --git a/src/mame/machine/gaelco3d.cpp b/src/mame/machine/gaelco3d.cpp
index 567b0e5a5f6..f1a7c4851b7 100644
--- a/src/mame/machine/gaelco3d.cpp
+++ b/src/mame/machine/gaelco3d.cpp
@@ -168,7 +168,7 @@ static void buf_reset(buf_t *buf)
buf->cnt = 0;
}
-const device_type GAELCO_SERIAL = &device_creator<gaelco_serial_device>;
+const device_type GAELCO_SERIAL = device_creator<gaelco_serial_device>;
gaelco_serial_device::gaelco_serial_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, GAELCO_SERIAL, "Gaelco 3D Serial Hardware", tag, owner, clock, "gaelco_serial", __FILE__),
diff --git a/src/mame/machine/gamecom.cpp b/src/mame/machine/gamecom.cpp
index 2756dee4960..62f4da29c56 100644
--- a/src/mame/machine/gamecom.cpp
+++ b/src/mame/machine/gamecom.cpp
@@ -4,6 +4,7 @@
#include "emu.h"
#include "includes/gamecom.h"
+#include "screen.h"
static const int gamecom_timer_limit[8] = { 2, 1024, 2048, 4096, 8192, 16384, 32768, 65536 };
diff --git a/src/mame/machine/gamepock.cpp b/src/mame/machine/gamepock.cpp
index 2d5d543ab6a..9d705519d0f 100644
--- a/src/mame/machine/gamepock.cpp
+++ b/src/mame/machine/gamepock.cpp
@@ -1,10 +1,10 @@
// license:BSD-3-Clause
// copyright-holders:Wilbert Pol
#include "emu.h"
-#include "sound/speaker.h"
-#include "cpu/upd7810/upd7810.h"
#include "includes/gamepock.h"
+#include "cpu/upd7810/upd7810.h"
+
void gamepock_state::hd44102ch_w( int which, int c_d, uint8_t data )
{
diff --git a/src/mame/machine/gdrom.cpp b/src/mame/machine/gdrom.cpp
index fd081b3f060..e7420ec9383 100644
--- a/src/mame/machine/gdrom.cpp
+++ b/src/mame/machine/gdrom.cpp
@@ -434,7 +434,7 @@ void gdrom_device::WriteData( uint8_t *data, int dataLength )
}
// device type definition
-const device_type GDROM = &device_creator<gdrom_device>;
+const device_type GDROM = device_creator<gdrom_device>;
gdrom_device::gdrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
atapi_cdrom_device(mconfig, GDROM, "GDROM", tag, owner, clock, "gdrom", __FILE__)
diff --git a/src/mame/machine/genpin.cpp b/src/mame/machine/genpin.cpp
index 5875bc787c8..0322e35f971 100644
--- a/src/mame/machine/genpin.cpp
+++ b/src/mame/machine/genpin.cpp
@@ -6,10 +6,10 @@ This is for common pinball machine coding.
**********************************************************************************/
-
-
#include "emu.h"
#include "genpin.h"
+#include "speaker.h"
+
MACHINE_CONFIG_FRAGMENT( genpin_audio )
MCFG_SPEAKER_STANDARD_MONO("mechvol")
diff --git a/src/mame/machine/hec2hrp.cpp b/src/mame/machine/hec2hrp.cpp
index affbcd2fd07..14b0affeaa1 100644
--- a/src/mame/machine/hec2hrp.cpp
+++ b/src/mame/machine/hec2hrp.cpp
@@ -40,16 +40,20 @@
*/
#include "emu.h"
+#include "includes/hec2hrp.h"
+
+#include "cpu/z80/z80.h"
#include "imagedev/cassette.h"
#include "imagedev/printer.h"
+#include "machine/upd765.h" /* for floppy disc controller */
#include "sound/wave.h" /* for K7 sound*/
#include "sound/discrete.h" /* for 1 Bit sound*/
-#include "machine/upd765.h" /* for floppy disc controller */
+
+#include "speaker.h"
#include "formats/hect_tap.h"
-#include "includes/hec2hrp.h"
#include "formats/hect_dsk.h"
-#include "cpu/z80/z80.h"
+
#ifndef DEBUG_TRACE_COM_HECTOR
//#define DEBUG_TRACE_COM_HECTOR 1
diff --git a/src/mame/machine/hp48.cpp b/src/mame/machine/hp48.cpp
index a8e95d35a45..8d205d50672 100644
--- a/src/mame/machine/hp48.cpp
+++ b/src/mame/machine/hp48.cpp
@@ -9,11 +9,12 @@
**********************************************************************/
#include "emu.h"
-#include "cpu/saturn/saturn.h"
+#include "includes/hp48.h"
+#include "cpu/saturn/saturn.h"
#include "machine/nvram.h"
-#include "includes/hp48.h"
+#include "screen.h"
/***************************************************************************
@@ -913,7 +914,7 @@ void hp48_state::hp48_encode_nibble( uint8_t* dst, uint8_t* src, int size )
/* ----- card images ------ */
-const device_type HP48_PORT = &device_creator<hp48_port_image_device>;
+const device_type HP48_PORT = device_creator<hp48_port_image_device>;
/* helper for load and create */
void hp48_port_image_device::hp48_fill_port()
diff --git a/src/mame/machine/ibm6580_fdc.cpp b/src/mame/machine/ibm6580_fdc.cpp
index bf278444c11..101aa9b0453 100644
--- a/src/mame/machine/ibm6580_fdc.cpp
+++ b/src/mame/machine/ibm6580_fdc.cpp
@@ -17,7 +17,7 @@
} while (0)
-const device_type DW_FDC = &device_creator<dw_fdc_device>;
+const device_type DW_FDC = device_creator<dw_fdc_device>;
ROM_START( dw_fdc )
ROM_REGION(0x800, "mcu", 0)
diff --git a/src/mame/machine/ibm6580_kbd.cpp b/src/mame/machine/ibm6580_kbd.cpp
index edc28843960..5bd25997f8d 100644
--- a/src/mame/machine/ibm6580_kbd.cpp
+++ b/src/mame/machine/ibm6580_kbd.cpp
@@ -16,7 +16,7 @@
} while (0)
-const device_type DW_KEYBOARD = &device_creator<dw_keyboard_device>;
+const device_type DW_KEYBOARD = device_creator<dw_keyboard_device>;
ROM_START( dw_keyboard )
ROM_REGION(0x800, "mcu", 0)
diff --git a/src/mame/machine/ie15_kbd.cpp b/src/mame/machine/ie15_kbd.cpp
index 88fc6f2b134..c5016c6006c 100644
--- a/src/mame/machine/ie15_kbd.cpp
+++ b/src/mame/machine/ie15_kbd.cpp
@@ -300,4 +300,4 @@ ioport_constructor ie15_keyboard_device::device_input_ports() const
return INPUT_PORTS_NAME(ie15_keyboard);
}
-const device_type IE15_KEYBOARD = &device_creator<ie15_keyboard_device>;
+const device_type IE15_KEYBOARD = device_creator<ie15_keyboard_device>;
diff --git a/src/mame/machine/igs022.cpp b/src/mame/machine/igs022.cpp
index f92f8425a26..afa5dda87e9 100644
--- a/src/mame/machine/igs022.cpp
+++ b/src/mame/machine/igs022.cpp
@@ -273,4 +273,4 @@ void igs022_device::IGS022_handle_command()
}
-const device_type IGS022 = &device_creator<igs022_device>;
+const device_type IGS022 = device_creator<igs022_device>;
diff --git a/src/mame/machine/igs022.h b/src/mame/machine/igs022.h
index e13b3d149c1..0460b1586d6 100644
--- a/src/mame/machine/igs022.h
+++ b/src/mame/machine/igs022.h
@@ -1,6 +1,8 @@
// license:BSD-3-Clause
// copyright-holders:David Haywood, ElSemi
/* IGS022 */
+#ifndef MAME_MACHINE_IGS022_H
+#define MAME_MACHINE_IGS022_H
class igs022_device : public device_t
@@ -23,5 +25,6 @@ protected:
};
-
extern const device_type IGS022;
+
+#endif // MAME_MACHINE_IGS022_H
diff --git a/src/mame/machine/igs025.cpp b/src/mame/machine/igs025.cpp
index af750428f75..5bbec6fa07e 100644
--- a/src/mame/machine/igs025.cpp
+++ b/src/mame/machine/igs025.cpp
@@ -356,4 +356,4 @@ void igs025_device::killbld_protection_calculate_hilo()
-const device_type IGS025 = &device_creator<igs025_device>;
+const device_type IGS025 = device_creator<igs025_device>;
diff --git a/src/mame/machine/igs025.h b/src/mame/machine/igs025.h
index 652119e786c..d3dc87f0447 100644
--- a/src/mame/machine/igs025.h
+++ b/src/mame/machine/igs025.h
@@ -1,7 +1,8 @@
// license:BSD-3-Clause
// copyright-holders:David Haywood, ElSemi
/* Common device stuff for IGS025 / IGS022, should be split into devices for each chip once we know where what part does what */
-
+#ifndef MAME_MACHINE_IGS025_H
+#define MAME_MACHINE_IGS025_H
// used to connect the 022
@@ -56,5 +57,6 @@ protected:
};
-
extern const device_type IGS025;
+
+#endif // MAME_MACHINE_IGS025_H
diff --git a/src/mame/machine/igs028.cpp b/src/mame/machine/igs028.cpp
index 372c2617ef1..74205936960 100644
--- a/src/mame/machine/igs028.cpp
+++ b/src/mame/machine/igs028.cpp
@@ -212,4 +212,4 @@ void igs028_device::IGS028_handle()
}
-const device_type IGS028 = &device_creator<igs028_device>;
+const device_type IGS028 = device_creator<igs028_device>;
diff --git a/src/mame/machine/igs028.h b/src/mame/machine/igs028.h
index 3607a16bfd0..911781d19ca 100644
--- a/src/mame/machine/igs028.h
+++ b/src/mame/machine/igs028.h
@@ -1,7 +1,8 @@
// license:BSD-3-Clause
// copyright-holders:David Haywood, ElSemi
/* IGS 028 */
-
+#ifndef MAME_MACHINE_IGS028_H
+#define MAME_MACHINE_IGS028_H
class igs028_device : public device_t
@@ -24,5 +25,6 @@ protected:
};
-
extern const device_type IGS028;
+
+#endif // MAME_MACHINE_IGS028_H
diff --git a/src/mame/machine/inder_sb.cpp b/src/mame/machine/inder_sb.cpp
index 66d297641d4..b199717fa76 100644
--- a/src/mame/machine/inder_sb.cpp
+++ b/src/mame/machine/inder_sb.cpp
@@ -5,10 +5,12 @@
#include "emu.h"
#include "machine/inder_sb.h"
+
#include "sound/volt_reg.h"
+#include "speaker.h"
-extern const device_type INDER_AUDIO = &device_creator<inder_sb_device>;
+const device_type INDER_AUDIO = device_creator<inder_sb_device>;
inder_sb_device::inder_sb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
diff --git a/src/mame/machine/inder_vid.cpp b/src/mame/machine/inder_vid.cpp
index 325134d8e3d..82568dec121 100644
--- a/src/mame/machine/inder_vid.cpp
+++ b/src/mame/machine/inder_vid.cpp
@@ -8,9 +8,10 @@
#include "emu.h"
#include "machine/inder_vid.h"
+#include "screen.h"
-extern const device_type INDER_VIDEO = &device_creator<inder_vid_device>;
+const device_type INDER_VIDEO = device_creator<inder_vid_device>;
inder_vid_device::inder_vid_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
diff --git a/src/mame/machine/interpro_ioga.cpp b/src/mame/machine/interpro_ioga.cpp
index 373f1545fcb..a169013b8fb 100644
--- a/src/mame/machine/interpro_ioga.cpp
+++ b/src/mame/machine/interpro_ioga.cpp
@@ -56,7 +56,7 @@ DEVICE_ADDRESS_MAP_START(map, 32, interpro_ioga_device)
AM_RANGE(0xb0, 0xbf) AM_READWRITE16(softint_vector_r, softint_vector_w, 0xffffffff)
ADDRESS_MAP_END
-const device_type INTERPRO_IOGA = &device_creator<interpro_ioga_device>;
+const device_type INTERPRO_IOGA = device_creator<interpro_ioga_device>;
interpro_ioga_device::interpro_ioga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, INTERPRO_IOGA, "InterPro IOGA", tag, owner, clock, "ioga", __FILE__),
diff --git a/src/mame/machine/interpro_mcga.cpp b/src/mame/machine/interpro_mcga.cpp
index c35c7d13305..e049a76f5ef 100644
--- a/src/mame/machine/interpro_mcga.cpp
+++ b/src/mame/machine/interpro_mcga.cpp
@@ -25,7 +25,7 @@ DEVICE_ADDRESS_MAP_START(map, 16, interpro_mcga_device)
AM_RANGE(0x00, 0x3f) AM_READWRITE16(read, write, 0xffff)
ADDRESS_MAP_END
-const device_type INTERPRO_MCGA = &device_creator<interpro_mcga_device>;
+const device_type INTERPRO_MCGA = device_creator<interpro_mcga_device>;
interpro_mcga_device::interpro_mcga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, INTERPRO_MCGA, "InterPro MCGA", tag, owner, clock, "mcga", __FILE__)
diff --git a/src/mame/machine/interpro_sga.cpp b/src/mame/machine/interpro_sga.cpp
index ee7b08905fe..37fddebd74f 100644
--- a/src/mame/machine/interpro_sga.cpp
+++ b/src/mame/machine/interpro_sga.cpp
@@ -35,7 +35,7 @@ DEVICE_ADDRESS_MAP_START(map, 32, interpro_sga_device)
AM_RANGE(0xbc, 0xbf) AM_READWRITE(ddtc1_r, ddtc1_w)
ADDRESS_MAP_END
-const device_type INTERPRO_SGA = &device_creator<interpro_sga_device>;
+const device_type INTERPRO_SGA = device_creator<interpro_sga_device>;
interpro_sga_device::interpro_sga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, INTERPRO_SGA, "InterPro SGA", tag, owner, clock, "sga", __FILE__)
diff --git a/src/mame/machine/isbc_208.cpp b/src/mame/machine/isbc_208.cpp
index 6b0201b0e3c..df2562bd1f3 100644
--- a/src/mame/machine/isbc_208.cpp
+++ b/src/mame/machine/isbc_208.cpp
@@ -6,7 +6,7 @@
#include "emu.h"
#include "isbc_208.h"
-const device_type ISBC_208 = &device_creator<isbc_208_device>;
+const device_type ISBC_208 = device_creator<isbc_208_device>;
isbc_208_device::isbc_208_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, ISBC_208, "ISBC 208 Flexible Disk Drive Controller", tag, owner, clock, "isbc_208", __FILE__),
diff --git a/src/mame/machine/isbc_215g.cpp b/src/mame/machine/isbc_215g.cpp
index 9408e05d223..31eed1e394a 100644
--- a/src/mame/machine/isbc_215g.cpp
+++ b/src/mame/machine/isbc_215g.cpp
@@ -9,7 +9,7 @@
#include "emu.h"
#include "isbc_215g.h"
-const device_type ISBC_215G = &device_creator<isbc_215g_device>;
+const device_type ISBC_215G = device_creator<isbc_215g_device>;
isbc_215g_device::isbc_215g_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, ISBC_215G, "ISBC 215G Winchester Disk Controller", tag, owner, clock, "isbc_215g", __FILE__),
diff --git a/src/mame/machine/iteagle_fpga.cpp b/src/mame/machine/iteagle_fpga.cpp
index 561066b4164..9597d32851f 100644
--- a/src/mame/machine/iteagle_fpga.cpp
+++ b/src/mame/machine/iteagle_fpga.cpp
@@ -15,7 +15,7 @@
#define COM1_TAG "com1"
#define COM2_TAG "com2"
-const device_type ITEAGLE_FPGA = &device_creator<iteagle_fpga_device>;
+const device_type ITEAGLE_FPGA = device_creator<iteagle_fpga_device>;
MACHINE_CONFIG_FRAGMENT(iteagle_fpga)
MCFG_NVRAM_ADD_0FILL("eagle2_rtc")
@@ -595,7 +595,7 @@ WRITE32_MEMBER( iteagle_fpga_device::ram_w )
// Attached serial EEPROM
//************************************
-const device_type ITEAGLE_EEPROM = &device_creator<iteagle_eeprom_device>;
+const device_type ITEAGLE_EEPROM = device_creator<iteagle_eeprom_device>;
DEVICE_ADDRESS_MAP_START(eeprom_map, 32, iteagle_eeprom_device)
AM_RANGE(0x0000, 0x000F) AM_READWRITE(eeprom_r, eeprom_w)
@@ -729,7 +729,7 @@ machine_config_constructor iteagle_periph_device::device_mconfig_additions() con
return MACHINE_CONFIG_NAME(eagle1);
}
-const device_type ITEAGLE_PERIPH = &device_creator<iteagle_periph_device>;
+const device_type ITEAGLE_PERIPH = device_creator<iteagle_periph_device>;
DEVICE_ADDRESS_MAP_START(ctrl_map, 32, iteagle_periph_device)
AM_RANGE(0x000, 0x0cf) AM_READWRITE(ctrl_r, ctrl_w)
diff --git a/src/mame/machine/jvs13551.cpp b/src/mame/machine/jvs13551.cpp
index 494ebad62fa..5c9782524d7 100644
--- a/src/mame/machine/jvs13551.cpp
+++ b/src/mame/machine/jvs13551.cpp
@@ -3,7 +3,7 @@
#include "emu.h"
#include "jvs13551.h"
-const device_type SEGA_837_13551 = &device_creator<sega_837_13551>;
+const device_type SEGA_837_13551 = device_creator<sega_837_13551>;
WRITE_LINE_MEMBER(sega_837_13551::jvs13551_coin_1_w)
{
diff --git a/src/mame/machine/k573cass.cpp b/src/mame/machine/k573cass.cpp
index 5919920338c..e2dfa9a2edd 100644
--- a/src/mame/machine/k573cass.cpp
+++ b/src/mame/machine/k573cass.cpp
@@ -62,7 +62,7 @@ READ_LINE_MEMBER(konami573_cassette_interface::read_line_adc083x_sars)
}
-const device_type KONAMI573_CASSETTE_X = &device_creator<konami573_cassette_x_device>;
+const device_type KONAMI573_CASSETTE_X = device_creator<konami573_cassette_x_device>;
konami573_cassette_x_device::konami573_cassette_x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, KONAMI573_CASSETTE_X, "Konami 573 Cassette X", tag, owner, clock, "k573cassx", __FILE__),
@@ -118,7 +118,7 @@ READ_LINE_MEMBER(konami573_cassette_x_device::read_line_secflash_sda)
}
-const device_type KONAMI573_CASSETTE_XI = &device_creator<konami573_cassette_xi_device>;
+const device_type KONAMI573_CASSETTE_XI = device_creator<konami573_cassette_xi_device>;
konami573_cassette_xi_device::konami573_cassette_xi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
konami573_cassette_x_device(mconfig, KONAMI573_CASSETTE_XI, "Konami 573 Cassette XI", tag, owner, clock, "k573cassxi", __FILE__),
@@ -178,7 +178,7 @@ READ_LINE_MEMBER(konami573_cassette_xi_device::read_line_adc083x_sars)
}
-const device_type KONAMI573_CASSETTE_Y = &device_creator<konami573_cassette_y_device>;
+const device_type KONAMI573_CASSETTE_Y = device_creator<konami573_cassette_y_device>;
konami573_cassette_y_device::konami573_cassette_y_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, KONAMI573_CASSETTE_Y, "Konami 573 Cassette Y", tag, owner, clock, "k573cassy", __FILE__),
@@ -283,7 +283,7 @@ WRITE_LINE_MEMBER(konami573_cassette_y_device::write_line_d7)
}
-const device_type KONAMI573_CASSETTE_YI = &device_creator<konami573_cassette_yi_device>;
+const device_type KONAMI573_CASSETTE_YI = device_creator<konami573_cassette_yi_device>;
konami573_cassette_yi_device::konami573_cassette_yi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
konami573_cassette_y_device(mconfig, KONAMI573_CASSETTE_YI, "Konami 573 Cassette YI", tag, owner, clock, "k573cassyi", __FILE__),
@@ -314,7 +314,7 @@ READ_LINE_MEMBER(konami573_cassette_yi_device::read_line_ds2401)
}
-const device_type KONAMI573_CASSETTE_ZI = &device_creator<konami573_cassette_zi_device>;
+const device_type KONAMI573_CASSETTE_ZI = device_creator<konami573_cassette_zi_device>;
konami573_cassette_zi_device::konami573_cassette_zi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, KONAMI573_CASSETTE_ZI, "Konami 573 Cassette ZI", tag, owner, clock, "k573casszi", __FILE__),
@@ -376,7 +376,7 @@ READ_LINE_MEMBER(konami573_cassette_zi_device::read_line_secflash_sda)
}
-const device_type KONAMI573_CASSETTE_SLOT = &device_creator<konami573_cassette_slot_device>;
+const device_type KONAMI573_CASSETTE_SLOT = device_creator<konami573_cassette_slot_device>;
konami573_cassette_slot_device::konami573_cassette_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, KONAMI573_CASSETTE_SLOT, "Konami 573 Cassette Slot", tag, owner, clock, "k573cassslot", __FILE__),
diff --git a/src/mame/machine/k573dio.cpp b/src/mame/machine/k573dio.cpp
index 10aadf96119..e805f12c389 100644
--- a/src/mame/machine/k573dio.cpp
+++ b/src/mame/machine/k573dio.cpp
@@ -65,7 +65,7 @@
*/
-const device_type KONAMI_573_DIGITAL_IO_BOARD = &device_creator<k573dio_device>;
+const device_type KONAMI_573_DIGITAL_IO_BOARD = device_creator<k573dio_device>;
DEVICE_ADDRESS_MAP_START(amap, 16, k573dio_device)
AM_RANGE(0x00, 0x01) AM_READ(a00_r)
diff --git a/src/mame/machine/k573mcr.cpp b/src/mame/machine/k573mcr.cpp
index 273a4737c56..43db5e70cc7 100644
--- a/src/mame/machine/k573mcr.cpp
+++ b/src/mame/machine/k573mcr.cpp
@@ -31,4 +31,4 @@ const tiny_rom_entry *k573mcr_device::device_rom_region() const
return ROM_NAME( k573mcr );
}
-const device_type KONAMI_573_MEMORY_CARD_READER = &device_creator<k573mcr_device>;
+const device_type KONAMI_573_MEMORY_CARD_READER = device_creator<k573mcr_device>;
diff --git a/src/mame/machine/k573msu.cpp b/src/mame/machine/k573msu.cpp
index 0ccdcf591ed..4113837a44e 100644
--- a/src/mame/machine/k573msu.cpp
+++ b/src/mame/machine/k573msu.cpp
@@ -94,4 +94,4 @@ const tiny_rom_entry *k573msu_device::device_rom_region() const
return ROM_NAME( k573msu );
}
-const device_type KONAMI_573_MULTI_SESSION_UNIT = &device_creator<k573msu_device>;
+const device_type KONAMI_573_MULTI_SESSION_UNIT = device_creator<k573msu_device>;
diff --git a/src/mame/machine/k573npu.cpp b/src/mame/machine/k573npu.cpp
index 3664ddb09b8..5364b4c3001 100644
--- a/src/mame/machine/k573npu.cpp
+++ b/src/mame/machine/k573npu.cpp
@@ -91,4 +91,4 @@ const tiny_rom_entry *k573npu_device::device_rom_region() const
return ROM_NAME( k573npu );
}
-const device_type KONAMI_573_NETWORK_PCB_UNIT = &device_creator<k573npu_device>;
+const device_type KONAMI_573_NETWORK_PCB_UNIT = device_creator<k573npu_device>;
diff --git a/src/mame/machine/k7659kb.cpp b/src/mame/machine/k7659kb.cpp
index 7466a67ecb5..9c9114c8d4a 100644
--- a/src/mame/machine/k7659kb.cpp
+++ b/src/mame/machine/k7659kb.cpp
@@ -22,7 +22,7 @@
// DEVICE DEFINITIONS
//**************************************************************************
-const device_type K7659_KEYBOARD = &device_creator<k7659_keyboard_device>;
+const device_type K7659_KEYBOARD = device_creator<k7659_keyboard_device>;
diff --git a/src/mame/machine/kaneko_calc3.cpp b/src/mame/machine/kaneko_calc3.cpp
index 44beeb77977..78ccadafb80 100644
--- a/src/mame/machine/kaneko_calc3.cpp
+++ b/src/mame/machine/kaneko_calc3.cpp
@@ -27,7 +27,7 @@
#include "kaneko_calc3.h"
#include "machine/eepromser.h"
-const device_type KANEKO_CALC3 = &device_creator<kaneko_calc3_device>;
+const device_type KANEKO_CALC3 = device_creator<kaneko_calc3_device>;
kaneko_calc3_device::kaneko_calc3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, KANEKO_CALC3, "Kaneko CALC3 MCU", tag, owner, clock, "kaneko_calc3", __FILE__),
diff --git a/src/mame/machine/kaneko_hit.cpp b/src/mame/machine/kaneko_hit.cpp
index 4ecd6cd1f7c..47200d796b6 100644
--- a/src/mame/machine/kaneko_hit.cpp
+++ b/src/mame/machine/kaneko_hit.cpp
@@ -28,7 +28,7 @@
#include "emu.h"
#include "kaneko_hit.h"
-const device_type KANEKO_HIT = &device_creator<kaneko_hit_device>;
+const device_type KANEKO_HIT = device_creator<kaneko_hit_device>;
kaneko_hit_device::kaneko_hit_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, KANEKO_HIT, "Kaneko CALC Hitbox", tag, owner, clock, "kaneko_hit", __FILE__),
diff --git a/src/mame/machine/kaneko_toybox.cpp b/src/mame/machine/kaneko_toybox.cpp
index 82e893b008a..3a1868e4e9a 100644
--- a/src/mame/machine/kaneko_toybox.cpp
+++ b/src/mame/machine/kaneko_toybox.cpp
@@ -51,7 +51,7 @@ mcu_subcmd = kaneko16_mcu_ram[0x0014/2]; // sub-command parameter, happens o
#include "kaneko_toybox.h"
#include "machine/eepromser.h"
-const device_type KANEKO_TOYBOX = &device_creator<kaneko_toybox_device>;
+const device_type KANEKO_TOYBOX = device_creator<kaneko_toybox_device>;
kaneko_toybox_device::kaneko_toybox_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, KANEKO_TOYBOX, "Kaneko Toybox MCU", tag, owner, clock, "kaneko_toybox", __FILE__),
diff --git a/src/mame/machine/kc_keyb.cpp b/src/mame/machine/kc_keyb.cpp
index 984bfa940cf..6dc9f46d0ec 100644
--- a/src/mame/machine/kc_keyb.cpp
+++ b/src/mame/machine/kc_keyb.cpp
@@ -328,7 +328,7 @@ triggers the time measurement by the CTC channel 3."
// GLOBAL VARIABLES
//**************************************************************************
-const device_type KC_KEYBOARD = &device_creator<kc_keyboard_device>;
+const device_type KC_KEYBOARD = device_creator<kc_keyboard_device>;
//**************************************************************************
// Input Ports
diff --git a/src/mame/machine/km035.cpp b/src/mame/machine/km035.cpp
index a1b66e3e856..133a03efc45 100644
--- a/src/mame/machine/km035.cpp
+++ b/src/mame/machine/km035.cpp
@@ -9,6 +9,7 @@
#include "emu.h"
#include "km035.h"
+#include "speaker.h"
#define VERBOSE_DBG 0 /* general debug messages */
@@ -33,7 +34,7 @@
// DEVICE DEFINITIONS
//**************************************************************************
-const device_type KM035 = &device_creator<km035_device>;
+const device_type KM035 = device_creator<km035_device>;
ROM_START( km035 )
ROM_REGION (0x800, KM035_CPU_TAG, 0)
diff --git a/src/mame/machine/konami1.cpp b/src/mame/machine/konami1.cpp
index 5e84e9617f7..f3b6b920934 100644
--- a/src/mame/machine/konami1.cpp
+++ b/src/mame/machine/konami1.cpp
@@ -9,7 +9,7 @@
#include "emu.h"
#include "konami1.h"
-const device_type KONAMI1 = &device_creator<konami1_device>;
+const device_type KONAMI1 = device_creator<konami1_device>;
konami1_device::konami1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: m6809_base_device(mconfig, "KONAMI-1", tag, owner, clock, KONAMI1, 1, "konami1", __FILE__)
diff --git a/src/mame/machine/konppc.cpp b/src/mame/machine/konppc.cpp
index d82c4eae573..2d841620c82 100644
--- a/src/mame/machine/konppc.cpp
+++ b/src/mame/machine/konppc.cpp
@@ -14,7 +14,7 @@
/*****************************************************************************/
-const device_type KONPPC = &device_creator<konppc_device>;
+const device_type KONPPC = device_creator<konppc_device>;
konppc_device::konppc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, KONPPC, "Konami PowerPC Common Functions", tag, owner, clock, "konppc", __FILE__),
diff --git a/src/mame/machine/lisa.cpp b/src/mame/machine/lisa.cpp
index 69d4503b6b5..cfc9ef45f60 100644
--- a/src/mame/machine/lisa.cpp
+++ b/src/mame/machine/lisa.cpp
@@ -40,6 +40,7 @@
#include "emu.h"
#include "includes/lisa.h"
+#include "screen.h"
/*
diff --git a/src/mame/machine/lviv.cpp b/src/mame/machine/lviv.cpp
index f7dee34255b..cebbe846cc6 100644
--- a/src/mame/machine/lviv.cpp
+++ b/src/mame/machine/lviv.cpp
@@ -12,18 +12,12 @@
***************************************************************************/
#include "emu.h"
-#include "imagedev/cassette.h"
-#include "imagedev/snapquik.h"
-#include "cpu/i8085/i8085.h"
-#include "machine/i8255.h"
#include "includes/lviv.h"
-#include "sound/speaker.h"
-#include "machine/ram.h"
-
-#define LVIV_SNAPSHOT_SIZE 82219
+#include "cpu/i8085/i8085.h"
+#define LVIV_SNAPSHOT_SIZE 82219
void lviv_state::lviv_update_memory ()
diff --git a/src/mame/machine/m1comm.cpp b/src/mame/machine/m1comm.cpp
index be789852184..be4f81f0381 100644
--- a/src/mame/machine/m1comm.cpp
+++ b/src/mame/machine/m1comm.cpp
@@ -95,7 +95,7 @@ ROM_END
// GLOBAL VARIABLES
//**************************************************************************
-const device_type M1COMM = &device_creator<m1comm_device>;
+const device_type M1COMM = device_creator<m1comm_device>;
//-------------------------------------------------
// machine_config_additions - device-specific
diff --git a/src/mame/machine/m20_8086.cpp b/src/mame/machine/m20_8086.cpp
index 4fb0be656ec..fa690919fa4 100644
--- a/src/mame/machine/m20_8086.cpp
+++ b/src/mame/machine/m20_8086.cpp
@@ -4,7 +4,7 @@
#include "m20_8086.h"
#include "machine/ram.h"
-const device_type M20_8086 = &device_creator<m20_8086_device>;
+const device_type M20_8086 = device_creator<m20_8086_device>;
m20_8086_device::m20_8086_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, M20_8086, "Olivetti M20 8086 Adapter", tag, owner, clock, "m20_8086", __FILE__),
diff --git a/src/mame/machine/m20_kbd.cpp b/src/mame/machine/m20_kbd.cpp
index 3d90493277f..796dcae5a7b 100644
--- a/src/mame/machine/m20_kbd.cpp
+++ b/src/mame/machine/m20_kbd.cpp
@@ -235,4 +235,4 @@ void m20_keyboard_device::received_byte(uint8_t byte)
}
-const device_type M20_KEYBOARD = &device_creator<m20_keyboard_device>;
+const device_type M20_KEYBOARD = device_creator<m20_keyboard_device>;
diff --git a/src/mame/machine/m24_kbd.cpp b/src/mame/machine/m24_kbd.cpp
index b753ddbe532..d29e8e6b23d 100644
--- a/src/mame/machine/m24_kbd.cpp
+++ b/src/mame/machine/m24_kbd.cpp
@@ -3,7 +3,7 @@
#include "emu.h"
#include "m24_kbd.h"
-const device_type M24_KEYBOARD = &device_creator<m24_keyboard_device>;
+const device_type M24_KEYBOARD = device_creator<m24_keyboard_device>;
ROM_START( m24_keyboard )
ROM_REGION(0x800, "mcu", 0)
diff --git a/src/mame/machine/m24_z8000.cpp b/src/mame/machine/m24_z8000.cpp
index 73204a21acb..ffdc85a89d9 100644
--- a/src/mame/machine/m24_z8000.cpp
+++ b/src/mame/machine/m24_z8000.cpp
@@ -3,7 +3,7 @@
#include "emu.h"
#include "m24_z8000.h"
-const device_type M24_Z8000 = &device_creator<m24_z8000_device>;
+const device_type M24_Z8000 = device_creator<m24_z8000_device>;
m24_z8000_device::m24_z8000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, M24_Z8000, "Olivetti M24 Z8000 Adapter", tag, owner, clock, "m24_z8000", __FILE__),
diff --git a/src/mame/machine/m2comm.cpp b/src/mame/machine/m2comm.cpp
index 8d15c93965c..d7b313b8e08 100644
--- a/src/mame/machine/m2comm.cpp
+++ b/src/mame/machine/m2comm.cpp
@@ -177,7 +177,7 @@ MACHINE_CONFIG_END
// GLOBAL VARIABLES
//**************************************************************************
-const device_type M2COMM = &device_creator<m2comm_device>;
+const device_type M2COMM = device_creator<m2comm_device>;
//-------------------------------------------------
// machine_config_additions - device-specific
diff --git a/src/mame/machine/m3comm.cpp b/src/mame/machine/m3comm.cpp
index 5ec45c587ac..0c90c8a025a 100644
--- a/src/mame/machine/m3comm.cpp
+++ b/src/mame/machine/m3comm.cpp
@@ -116,7 +116,7 @@ MACHINE_CONFIG_END
// GLOBAL VARIABLES
//**************************************************************************
-const device_type M3COMM = &device_creator<m3comm_device>;
+const device_type M3COMM = device_creator<m3comm_device>;
//-------------------------------------------------
// machine_config_additions - device-specific
diff --git a/src/mame/machine/mackbd.cpp b/src/mame/machine/mackbd.cpp
index cf768223e28..72f7c0d6a9c 100644
--- a/src/mame/machine/mackbd.cpp
+++ b/src/mame/machine/mackbd.cpp
@@ -65,7 +65,7 @@
// DEVICE DEFINITIONS
//**************************************************************************
-const device_type MACKBD = &device_creator<mackbd_device>;
+const device_type MACKBD = device_creator<mackbd_device>;
ROM_START( mackbd )
ROM_REGION(0x800, MACKBD_CPU_TAG, 0)
diff --git a/src/mame/machine/macrtc.cpp b/src/mame/machine/macrtc.cpp
index ac615c0db4e..94a5c5435ff 100644
--- a/src/mame/machine/macrtc.cpp
+++ b/src/mame/machine/macrtc.cpp
@@ -33,7 +33,7 @@ enum
//**************************************************************************
// device type definition
-const device_type RTC3430042 = &device_creator<rtc3430042_device>;
+const device_type RTC3430042 = device_creator<rtc3430042_device>;
//-------------------------------------------------
diff --git a/src/mame/machine/maple-dc.cpp b/src/mame/machine/maple-dc.cpp
index 56a838a8967..aa51b0fcdf9 100644
--- a/src/mame/machine/maple-dc.cpp
+++ b/src/mame/machine/maple-dc.cpp
@@ -5,7 +5,7 @@
#include "maple-dc.h"
#include "mie.h"
-const device_type MAPLE_DC = &device_creator<maple_dc_device>;
+const device_type MAPLE_DC = device_creator<maple_dc_device>;
DEVICE_ADDRESS_MAP_START(amap, 32, maple_dc_device)
AM_RANGE(0x04, 0x07) AM_READWRITE(sb_mdstar_r, sb_mdstar_w)
diff --git a/src/mame/machine/mathbox.cpp b/src/mame/machine/mathbox.cpp
index 1baf980268d..658881873dd 100644
--- a/src/mame/machine/mathbox.cpp
+++ b/src/mame/machine/mathbox.cpp
@@ -37,7 +37,7 @@
// mathbox_device - constructor
//-------------------------------------------------
-const device_type MATHBOX = &device_creator<mathbox_device>;
+const device_type MATHBOX = device_creator<mathbox_device>;
mathbox_device::mathbox_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, MATHBOX, "Atari MATHBOX", tag, owner, clock, "mathbox", __FILE__)
diff --git a/src/mame/machine/mega32x.cpp b/src/mame/machine/mega32x.cpp
index f3938f6c534..df371297ec3 100644
--- a/src/mame/machine/mega32x.cpp
+++ b/src/mame/machine/mega32x.cpp
@@ -202,8 +202,8 @@ GFX check (these don't explicitly fails):
#include "sound/volt_reg.h"
-const device_type SEGA_32X_NTSC = &device_creator<sega_32x_ntsc_device>;
-const device_type SEGA_32X_PAL = &device_creator<sega_32x_pal_device>;
+const device_type SEGA_32X_NTSC = device_creator<sega_32x_ntsc_device>;
+const device_type SEGA_32X_PAL = device_creator<sega_32x_pal_device>;
sega_32x_device::sega_32x_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source)
: device_t(mconfig, type, name, tag, owner, clock, shortname, source)
diff --git a/src/mame/machine/megacd.cpp b/src/mame/machine/megacd.cpp
index 42caa03fc38..2262cf5a5b6 100644
--- a/src/mame/machine/megacd.cpp
+++ b/src/mame/machine/megacd.cpp
@@ -6,9 +6,9 @@
#include "megacd.lh"
-const device_type SEGA_SEGACD_US = &device_creator<sega_segacd_us_device>;
-const device_type SEGA_SEGACD_JAPAN = &device_creator<sega_segacd_japan_device>;
-const device_type SEGA_SEGACD_EUROPE = &device_creator<sega_segacd_europe_device>;
+const device_type SEGA_SEGACD_US = device_creator<sega_segacd_us_device>;
+const device_type SEGA_SEGACD_JAPAN = device_creator<sega_segacd_japan_device>;
+const device_type SEGA_SEGACD_EUROPE = device_creator<sega_segacd_europe_device>;
/* Callback when the genesis enters interrupt code */
diff --git a/src/mame/machine/megacdcd.cpp b/src/mame/machine/megacdcd.cpp
index 47adee8fa80..23b9a9b0ff4 100644
--- a/src/mame/machine/megacdcd.cpp
+++ b/src/mame/machine/megacdcd.cpp
@@ -10,7 +10,7 @@
#include "emu.h"
#include "machine/megacdcd.h"
-const device_type LC89510_TEMP = &device_creator<lc89510_temp_device>;
+const device_type LC89510_TEMP = device_creator<lc89510_temp_device>;
lc89510_temp_device::lc89510_temp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, LC89510_TEMP, "lc89510_temp_device", tag, owner, clock, "lc89510_temp", __FILE__)
diff --git a/src/mame/machine/megadriv.cpp b/src/mame/machine/megadriv.cpp
index 9347060ab1a..50d9ff92739 100644
--- a/src/mame/machine/megadriv.cpp
+++ b/src/mame/machine/megadriv.cpp
@@ -25,6 +25,7 @@ Known Non-Issues (confirmed on Real Genesis)
#include "emu.h"
#include "includes/megadriv.h"
+#include "speaker.h"
MACHINE_CONFIG_EXTERN( megadriv );
diff --git a/src/mame/machine/meters.cpp b/src/mame/machine/meters.cpp
index 055aee26d18..9a15cf9b6e0 100644
--- a/src/mame/machine/meters.cpp
+++ b/src/mame/machine/meters.cpp
@@ -15,7 +15,7 @@
DEVICE INTERFACE
*****************************************************************************/
-const device_type METERS = &device_creator<meters_device>;
+const device_type METERS = device_creator<meters_device>;
meters_device::meters_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, METERS, "Electro mechanical meters", tag, owner, clock, "meters", __FILE__),
diff --git a/src/mame/machine/microdrv.cpp b/src/mame/machine/microdrv.cpp
index c55f305f0f1..0c1dff43a03 100644
--- a/src/mame/machine/microdrv.cpp
+++ b/src/mame/machine/microdrv.cpp
@@ -37,7 +37,7 @@
***************************************************************************/
// device type definition
-const device_type MICRODRIVE = &device_creator<microdrive_image_device>;
+const device_type MICRODRIVE = device_creator<microdrive_image_device>;
//-------------------------------------------------
// microdrive_image_device - constructor
diff --git a/src/mame/machine/micropolis.cpp b/src/mame/machine/micropolis.cpp
index f9d4220a83f..a747e7d2a36 100644
--- a/src/mame/machine/micropolis.cpp
+++ b/src/mame/machine/micropolis.cpp
@@ -63,7 +63,7 @@ static const uint8_t track_SD[][2] = {
MAME DEVICE INTERFACE
***************************************************************************/
-const device_type MICROPOLIS = &device_creator<micropolis_device>;
+const device_type MICROPOLIS = device_creator<micropolis_device>;
micropolis_device::micropolis_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, MICROPOLIS, "MICROPOLIS", tag, owner, clock, "micropolis", __FILE__),
diff --git a/src/mame/machine/midikbd.cpp b/src/mame/machine/midikbd.cpp
index 3b6ece1ce9d..3fdbb105cf9 100644
--- a/src/mame/machine/midikbd.cpp
+++ b/src/mame/machine/midikbd.cpp
@@ -3,7 +3,7 @@
#include "emu.h"
#include "machine/midikbd.h"
-const device_type MIDI_KBD = &device_creator<midi_keyboard_device>;
+const device_type MIDI_KBD = device_creator<midi_keyboard_device>;
midi_keyboard_device::midi_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, MIDI_KBD, "Generic MIDI Keyboard", tag, owner, clock, "midi_kbd", __FILE__),
diff --git a/src/mame/machine/midwayic.cpp b/src/mame/machine/midwayic.cpp
index f15d4807799..c5b43035d14 100644
--- a/src/mame/machine/midwayic.cpp
+++ b/src/mame/machine/midwayic.cpp
@@ -105,7 +105,7 @@ void midway_serial_pic_device::serial_register_state()
save_item(NAME(m_ormask));
}
-const device_type MIDWAY_SERIAL_PIC = &device_creator<midway_serial_pic_device>;
+const device_type MIDWAY_SERIAL_PIC = device_creator<midway_serial_pic_device>;
//-------------------------------------------------
@@ -200,7 +200,7 @@ WRITE8_MEMBER(midway_serial_pic_device::write)
*************************************/
-const device_type MIDWAY_SERIAL_PIC_EMU = &device_creator<midway_serial_pic_emu_device>;
+const device_type MIDWAY_SERIAL_PIC_EMU = device_creator<midway_serial_pic_emu_device>;
//-------------------------------------------------
@@ -285,7 +285,7 @@ static inline uint8_t make_bcd(uint8_t data)
return ((data / 10) << 4) | (data % 10);
}
-const device_type MIDWAY_SERIAL_PIC2 = &device_creator<midway_serial_pic2_device>;
+const device_type MIDWAY_SERIAL_PIC2 = device_creator<midway_serial_pic2_device>;
//-------------------------------------------------
@@ -662,7 +662,7 @@ void midway_ioasic_device::ioasic_register_state()
save_item(NAME(m_fifo_force_buffer_empty_pc));
}
-const device_type MIDWAY_IOASIC = &device_creator<midway_ioasic_device>;
+const device_type MIDWAY_IOASIC = device_creator<midway_ioasic_device>;
//-------------------------------------------------
diff --git a/src/mame/machine/mie.cpp b/src/mame/machine/mie.cpp
index b06fe6d64f0..a130493dc3a 100644
--- a/src/mame/machine/mie.cpp
+++ b/src/mame/machine/mie.cpp
@@ -23,8 +23,8 @@
// - Speed is all wrong
-const device_type MIE = &device_creator<mie_device>;
-const device_type MIE_JVS = &device_creator<mie_jvs_device>;
+const device_type MIE = device_creator<mie_device>;
+const device_type MIE_JVS = device_creator<mie_jvs_device>;
static ADDRESS_MAP_START( mie_map, AS_PROGRAM, 8, mie_device)
AM_RANGE(0x0000, 0x07ff) AM_ROM
diff --git a/src/mame/machine/mm1kb.cpp b/src/mame/machine/mm1kb.cpp
index dd620968e8a..875076bd196 100644
--- a/src/mame/machine/mm1kb.cpp
+++ b/src/mame/machine/mm1kb.cpp
@@ -8,6 +8,8 @@
#include "emu.h"
#include "mm1kb.h"
+#include "screen.h"
+#include "speaker.h"
@@ -15,7 +17,7 @@
// DEVICE DEFINITIONS
//**************************************************************************
-const device_type MM1_KEYBOARD = &device_creator<mm1_keyboard_t>;
+const device_type MM1_KEYBOARD = device_creator<mm1_keyboard_t>;
//-------------------------------------------------
diff --git a/src/mame/machine/ms7004.cpp b/src/mame/machine/ms7004.cpp
index d09ce6a4332..1f3ae8a3421 100644
--- a/src/mame/machine/ms7004.cpp
+++ b/src/mame/machine/ms7004.cpp
@@ -10,6 +10,8 @@
#include "emu.h"
#include "ms7004.h"
+#include "speaker.h"
+
#define VERBOSE_DBG 1 /* general debug messages */
@@ -34,7 +36,7 @@
// DEVICE DEFINITIONS
//**************************************************************************
-const device_type MS7004 = &device_creator<ms7004_device>;
+const device_type MS7004 = device_creator<ms7004_device>;
ROM_START( ms7004 )
ROM_REGION (0x800, MS7004_CPU_TAG, 0)
diff --git a/src/mame/machine/msx_matsushita.cpp b/src/mame/machine/msx_matsushita.cpp
index d5b1f13e44f..93d421ad51c 100644
--- a/src/mame/machine/msx_matsushita.cpp
+++ b/src/mame/machine/msx_matsushita.cpp
@@ -5,7 +5,7 @@
const uint8_t manufacturer_id = 0x08;
-const device_type MSX_MATSUSHITA = &device_creator<msx_matsushita_device>;
+const device_type MSX_MATSUSHITA = device_creator<msx_matsushita_device>;
msx_matsushita_device::msx_matsushita_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, MSX_MATSUSHITA, "Matsushita switched device", tag, owner, clock, "msx_matsushita", __FILE__)
diff --git a/src/mame/machine/msx_s1985.cpp b/src/mame/machine/msx_s1985.cpp
index 6096b6a9f76..f754541e873 100644
--- a/src/mame/machine/msx_s1985.cpp
+++ b/src/mame/machine/msx_s1985.cpp
@@ -5,7 +5,7 @@
const uint8_t manufacturer_id = 0xfe;
-const device_type MSX_S1985 = &device_creator<msx_s1985_device>;
+const device_type MSX_S1985 = device_creator<msx_s1985_device>;
msx_s1985_device::msx_s1985_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, MSX_S1985, "MSX-Engine S1985", tag, owner, clock, "msx_s1985", __FILE__)
diff --git a/src/mame/machine/msx_systemflags.cpp b/src/mame/machine/msx_systemflags.cpp
index 4ff1a5b2b42..4aa79e46fac 100644
--- a/src/mame/machine/msx_systemflags.cpp
+++ b/src/mame/machine/msx_systemflags.cpp
@@ -4,7 +4,7 @@
#include "msx_systemflags.h"
-const device_type MSX_SYSTEMFLAGS = &device_creator<msx_systemflags_device>;
+const device_type MSX_SYSTEMFLAGS = device_creator<msx_systemflags_device>;
msx_systemflags_device::msx_systemflags_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
diff --git a/src/mame/machine/mz700.cpp b/src/mame/machine/mz700.cpp
index 1a2ccd1f3a5..b05bb44ce8e 100644
--- a/src/mame/machine/mz700.cpp
+++ b/src/mame/machine/mz700.cpp
@@ -9,14 +9,11 @@
#include "emu.h"
#include "includes/mz700.h"
+
#include "cpu/z80/z80.h"
-#include "machine/pit8253.h"
-#include "machine/i8255.h"
-#include "machine/z80pio.h"
#include "machine/74145.h"
-#include "sound/speaker.h"
-#include "imagedev/cassette.h"
-#include "machine/ram.h"
+#include "screen.h"
+
#ifndef VERBOSE
#define VERBOSE 1
diff --git a/src/mame/machine/n64.cpp b/src/mame/machine/n64.cpp
index 1b94269b7b4..348ea04eaa8 100644
--- a/src/mame/machine/n64.cpp
+++ b/src/mame/machine/n64.cpp
@@ -10,7 +10,7 @@
#include "video/n64.h"
// device type definition
-const device_type N64PERIPH = &device_creator<n64_periphs>;
+const device_type N64PERIPH = device_creator<n64_periphs>;
n64_periphs::n64_periphs(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, N64PERIPH, "N64 Periphal Chips", tag, owner, clock, "n64_periphs", __FILE__)
diff --git a/src/mame/machine/namco06.cpp b/src/mame/machine/namco06.cpp
index 40bf97858e5..11d2647abed 100644
--- a/src/mame/machine/namco06.cpp
+++ b/src/mame/machine/namco06.cpp
@@ -174,7 +174,7 @@ WRITE8_MEMBER( namco_06xx_device::ctrl_w )
}
-const device_type NAMCO_06XX = &device_creator<namco_06xx_device>;
+const device_type NAMCO_06XX = device_creator<namco_06xx_device>;
namco_06xx_device::namco_06xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, NAMCO_06XX, "Namco 06xx", tag, owner, clock, "namco06xx", __FILE__)
diff --git a/src/mame/machine/namco50.cpp b/src/mame/machine/namco50.cpp
index 62280849c39..8b54f21e05e 100644
--- a/src/mame/machine/namco50.cpp
+++ b/src/mame/machine/namco50.cpp
@@ -237,7 +237,7 @@ ROM_START( namco_50xx )
ROM_END
-const device_type NAMCO_50XX = &device_creator<namco_50xx_device>;
+const device_type NAMCO_50XX = device_creator<namco_50xx_device>;
namco_50xx_device::namco_50xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, NAMCO_50XX, "Namco 50xx", tag, owner, clock, "namco50", __FILE__),
diff --git a/src/mame/machine/namco51.cpp b/src/mame/machine/namco51.cpp
index e9bc2dba237..a7b1257723a 100644
--- a/src/mame/machine/namco51.cpp
+++ b/src/mame/machine/namco51.cpp
@@ -58,6 +58,7 @@
#include "emu.h"
#include "namco51.h"
+#include "screen.h"
#define VERBOSE 0
@@ -340,7 +341,7 @@ ROM_START( namco_51xx )
ROM_LOAD( "51xx.bin", 0x0000, 0x0400, CRC(c2f57ef8) SHA1(50de79e0d6a76bda95ffb02fcce369a79e6abfec) )
ROM_END
-const device_type NAMCO_51XX = &device_creator<namco_51xx_device>;
+const device_type NAMCO_51XX = device_creator<namco_51xx_device>;
namco_51xx_device::namco_51xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, NAMCO_51XX, "Namco 51xx", tag, owner, clock, "namco51", __FILE__),
diff --git a/src/mame/machine/namco53.cpp b/src/mame/machine/namco53.cpp
index 4b1b29173db..a76388149f1 100644
--- a/src/mame/machine/namco53.cpp
+++ b/src/mame/machine/namco53.cpp
@@ -143,7 +143,7 @@ ROM_START( namco_53xx )
ROM_LOAD( "53xx.bin", 0x0000, 0x0400, CRC(b326fecb) SHA1(758d8583d658e4f1df93184009d86c3eb8713899) )
ROM_END
-const device_type NAMCO_53XX = &device_creator<namco_53xx_device>;
+const device_type NAMCO_53XX = device_creator<namco_53xx_device>;
namco_53xx_device::namco_53xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, NAMCO_53XX, "Namco 53xx", tag, owner, clock, "namco53", __FILE__),
diff --git a/src/mame/machine/namco62.cpp b/src/mame/machine/namco62.cpp
index fbb676015f2..4ef3d0e79e7 100644
--- a/src/mame/machine/namco62.cpp
+++ b/src/mame/machine/namco62.cpp
@@ -42,7 +42,7 @@ ROM_START( namco_62xx )
ROM_END
-const device_type NAMCO_62XX = &device_creator<namco_62xx_device>;
+const device_type NAMCO_62XX = device_creator<namco_62xx_device>;
namco_62xx_device::namco_62xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, NAMCO_62XX, "Namco 62xx", tag, owner, clock, "namco62", __FILE__),
diff --git a/src/mame/machine/namco_c139.cpp b/src/mame/machine/namco_c139.cpp
index ed021210762..9581a8325b0 100644
--- a/src/mame/machine/namco_c139.cpp
+++ b/src/mame/machine/namco_c139.cpp
@@ -21,7 +21,7 @@
//**************************************************************************
// device type definition
-const device_type NAMCO_C139 = &device_creator<namco_c139_device>;
+const device_type NAMCO_C139 = device_creator<namco_c139_device>;
//**************************************************************************
diff --git a/src/mame/machine/namco_c148.cpp b/src/mame/machine/namco_c148.cpp
index a12ece76d55..ab8470b67eb 100644
--- a/src/mame/machine/namco_c148.cpp
+++ b/src/mame/machine/namco_c148.cpp
@@ -54,7 +54,7 @@ Interrupt Controller C148 1C0000-1FFFFF R/W D00-D02
//**************************************************************************
// device type definition
-const device_type NAMCO_C148 = &device_creator<namco_c148_device>;
+const device_type NAMCO_C148 = device_creator<namco_c148_device>;
//**************************************************************************
diff --git a/src/mame/machine/namco_settings.cpp b/src/mame/machine/namco_settings.cpp
index 24415e62684..7d3a4c1a82b 100644
--- a/src/mame/machine/namco_settings.cpp
+++ b/src/mame/machine/namco_settings.cpp
@@ -3,7 +3,7 @@
#include "emu.h"
#include "namco_settings.h"
-const device_type NAMCO_SETTINGS = &device_creator<namco_settings_device>;
+const device_type NAMCO_SETTINGS = device_creator<namco_settings_device>;
namco_settings_device::namco_settings_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, NAMCO_SETTINGS, "Namco Settings", tag, owner, clock, "namco_settings", __FILE__)
diff --git a/src/mame/machine/namcoio.cpp b/src/mame/machine/namcoio.cpp
index 335fe4ea84f..b4a32041a0e 100644
--- a/src/mame/machine/namcoio.cpp
+++ b/src/mame/machine/namcoio.cpp
@@ -118,9 +118,9 @@ TODO:
#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
-const device_type NAMCO56XX = &device_creator<namco56xx_device>;
-const device_type NAMCO58XX = &device_creator<namco58xx_device>;
-const device_type NAMCO59XX = &device_creator<namco59xx_device>;
+const device_type NAMCO56XX = device_creator<namco56xx_device>;
+const device_type NAMCO58XX = device_creator<namco58xx_device>;
+const device_type NAMCO59XX = device_creator<namco59xx_device>;
namcoio_device::namcoio_device(const machine_config &mconfig, device_type type, const char* name, const char *tag, device_t *owner, uint32_t clock, const char *shortname)
: device_t(mconfig, type, name, tag, owner, clock, shortname, __FILE__),
diff --git a/src/mame/machine/namcoio_gearbox.cpp b/src/mame/machine/namcoio_gearbox.cpp
index 68f0c82e794..6e4d8096a7c 100644
--- a/src/mame/machine/namcoio_gearbox.cpp
+++ b/src/mame/machine/namcoio_gearbox.cpp
@@ -33,7 +33,7 @@
//**************************************************************************
// device type definition
-const device_type NAMCOIO_GEARBOX = &device_creator<namcoio_gearbox_device>;
+const device_type NAMCOIO_GEARBOX = device_creator<namcoio_gearbox_device>;
//**************************************************************************
diff --git a/src/mame/machine/namcomcu.cpp b/src/mame/machine/namcomcu.cpp
index 307d2ac3ab6..b49e53a1b7b 100644
--- a/src/mame/machine/namcomcu.cpp
+++ b/src/mame/machine/namcomcu.cpp
@@ -16,11 +16,11 @@ C76 System 11
#include "namcomcu.h"
-const device_type NAMCO_C69 = &device_creator<namco_c69_device>;
-const device_type NAMCO_C70 = &device_creator<namco_c70_device>;
-const device_type NAMCO_C74 = &device_creator<namco_c74_device>;
-const device_type NAMCO_C75 = &device_creator<namco_c75_device>;
-const device_type NAMCO_C76 = &device_creator<namco_c76_device>;
+const device_type NAMCO_C69 = device_creator<namco_c69_device>;
+const device_type NAMCO_C70 = device_creator<namco_c70_device>;
+const device_type NAMCO_C74 = device_creator<namco_c74_device>;
+const device_type NAMCO_C75 = device_creator<namco_c75_device>;
+const device_type NAMCO_C76 = device_creator<namco_c76_device>;
ROM_START( c69 )
diff --git a/src/mame/machine/naomigd.cpp b/src/mame/machine/naomigd.cpp
index d82eb9d0166..3f3508d54c9 100644
--- a/src/mame/machine/naomigd.cpp
+++ b/src/mame/machine/naomigd.cpp
@@ -98,7 +98,7 @@ SH4 IO port A bits
*/
-const device_type NAOMI_GDROM_BOARD = &device_creator<naomi_gdrom_board>;
+const device_type NAOMI_GDROM_BOARD = device_creator<naomi_gdrom_board>;
const uint32_t naomi_gdrom_board::DES_LEFTSWAP[] = {
0x00000000, 0x00000001, 0x00000100, 0x00000101, 0x00010000, 0x00010001, 0x00010100, 0x00010101,
diff --git a/src/mame/machine/naomim1.cpp b/src/mame/machine/naomim1.cpp
index 2068bfcaca0..84412849767 100644
--- a/src/mame/machine/naomim1.cpp
+++ b/src/mame/machine/naomim1.cpp
@@ -4,7 +4,7 @@
#include "emu.h"
#include "naomim1.h"
-const device_type NAOMI_M1_BOARD = &device_creator<naomi_m1_board>;
+const device_type NAOMI_M1_BOARD = device_creator<naomi_m1_board>;
DEVICE_ADDRESS_MAP_START(submap, 16, naomi_m1_board)
AM_RANGE(0x0a, 0x0b) AM_READ(actel_id_r)
diff --git a/src/mame/machine/naomim2.cpp b/src/mame/machine/naomim2.cpp
index 6061fc4763d..a2d089e6e9b 100644
--- a/src/mame/machine/naomim2.cpp
+++ b/src/mame/machine/naomim2.cpp
@@ -109,7 +109,7 @@ note: if ROM is not mounted its area readed as 0xFF
********************************************************************************************************/
-const device_type NAOMI_M2_BOARD = &device_creator<naomi_m2_board>;
+const device_type NAOMI_M2_BOARD = device_creator<naomi_m2_board>;
naomi_m2_board::naomi_m2_board(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: naomi_board(mconfig, NAOMI_M2_BOARD, "Sega NAOMI M2 Board", tag, owner, clock, "naomi_m2_board", __FILE__),
diff --git a/src/mame/machine/naomim4.cpp b/src/mame/machine/naomim4.cpp
index f0799c9a770..12077a6f579 100644
--- a/src/mame/machine/naomim4.cpp
+++ b/src/mame/machine/naomim4.cpp
@@ -21,7 +21,7 @@
// the algorithm is a 32-bits key stored in the PIC16C621A. The hardware auto-reset the feed value
// to the cart-based IV every 16 blocks (32 bytes); that reset is not address-based, but index-based.
-const device_type NAOMI_M4_BOARD = &device_creator<naomi_m4_board>;
+const device_type NAOMI_M4_BOARD = device_creator<naomi_m4_board>;
const uint8_t naomi_m4_board::k_sboxes[4][16] = {
{9,8,2,11,1,14,5,15,12,6,0,3,7,13,10,4},
diff --git a/src/mame/machine/naomirom.cpp b/src/mame/machine/naomirom.cpp
index 6c92ae377ba..62f53eb4eb7 100644
--- a/src/mame/machine/naomirom.cpp
+++ b/src/mame/machine/naomirom.cpp
@@ -3,7 +3,7 @@
#include "emu.h"
#include "naomirom.h"
-const device_type NAOMI_ROM_BOARD = &device_creator<naomi_rom_board>;
+const device_type NAOMI_ROM_BOARD = device_creator<naomi_rom_board>;
naomi_rom_board::naomi_rom_board(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: naomi_board(mconfig, NAOMI_ROM_BOARD, "Sega NAOMI ROM Board", tag, owner, clock, "naomi_rom_board", __FILE__),
diff --git a/src/mame/machine/nb1413m3.cpp b/src/mame/machine/nb1413m3.cpp
index 92efbb0c1fe..7ce1d1f7010 100644
--- a/src/mame/machine/nb1413m3.cpp
+++ b/src/mame/machine/nb1413m3.cpp
@@ -21,7 +21,7 @@ Memo:
#define NB1413M3_TIMER_BASE 20000000
-const device_type NB1413M3 = &device_creator<nb1413m3_device>;
+const device_type NB1413M3 = device_creator<nb1413m3_device>;
nb1413m3_device::nb1413m3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, NB1413M3, "NB1413M3 Mahjong Custom", tag, owner, clock, "nb1413m3", __FILE__),
diff --git a/src/mame/machine/nb1414m4.cpp b/src/mame/machine/nb1414m4.cpp
index 22f758012ae..c7e4cfe98b2 100644
--- a/src/mame/machine/nb1414m4.cpp
+++ b/src/mame/machine/nb1414m4.cpp
@@ -29,13 +29,14 @@ Notes:
#include "emu.h"
#include "includes/nb1414m4.h"
+#include "screen.h"
-const device_type NB1414M4 = &device_creator<nb1414m4_device>;
+const device_type NB1414M4 = device_creator<nb1414m4_device>;
nb1414m4_device::nb1414m4_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
- : device_t(mconfig, NB1414M4, "NB1414M4 Mahjong Custom", tag, owner, clock, "nb1414m4", __FILE__),
- device_video_interface(mconfig, *this),
- m_data(*this, DEVICE_SELF)
+ : device_t(mconfig, NB1414M4, "NB1414M4 Mahjong Custom", tag, owner, clock, "nb1414m4", __FILE__)
+ , device_video_interface(mconfig, *this)
+ , m_data(*this, DEVICE_SELF)
{
}
diff --git a/src/mame/machine/nextkbd.cpp b/src/mame/machine/nextkbd.cpp
index 64c5df5ddc2..2f696f58cc3 100644
--- a/src/mame/machine/nextkbd.cpp
+++ b/src/mame/machine/nextkbd.cpp
@@ -4,7 +4,7 @@
#include "emu.h"
#include "nextkbd.h"
-const device_type NEXTKBD = &device_creator<nextkbd_device>;
+const device_type NEXTKBD = device_creator<nextkbd_device>;
DEVICE_ADDRESS_MAP_START(amap, 32, nextkbd_device)
AM_RANGE(0x0, 0x3) AM_READWRITE8(status_snd_r, ctrl_snd_w, 0xff000000)
diff --git a/src/mame/machine/nextmo.cpp b/src/mame/machine/nextmo.cpp
index 25341374c25..2df3346f762 100644
--- a/src/mame/machine/nextmo.cpp
+++ b/src/mame/machine/nextmo.cpp
@@ -4,7 +4,7 @@
#include "emu.h"
#include "nextmo.h"
-const device_type NEXTMO = &device_creator<nextmo_device>;
+const device_type NEXTMO = device_creator<nextmo_device>;
DEVICE_ADDRESS_MAP_START(map, 8, nextmo_device)
AM_RANGE(0x04, 0x04) AM_READWRITE(r4_r, r4_w)
diff --git a/src/mame/machine/ng_memcard.cpp b/src/mame/machine/ng_memcard.cpp
index 720306fab95..1f354d1c75a 100644
--- a/src/mame/machine/ng_memcard.cpp
+++ b/src/mame/machine/ng_memcard.cpp
@@ -13,7 +13,7 @@
#include "ng_memcard.h"
// device type definition
-const device_type NG_MEMCARD = &device_creator<ng_memcard_device>;
+const device_type NG_MEMCARD = device_creator<ng_memcard_device>;
//-------------------------------------------------
// ng_memcard_device - constructor
diff --git a/src/mame/machine/ngen_kb.cpp b/src/mame/machine/ngen_kb.cpp
index 30001eb6a21..1fa1f79732d 100644
--- a/src/mame/machine/ngen_kb.cpp
+++ b/src/mame/machine/ngen_kb.cpp
@@ -106,4 +106,4 @@ void ngen_keyboard_device::key_break(uint8_t row, uint8_t column)
}
}
-const device_type NGEN_KEYBOARD = &device_creator<ngen_keyboard_device>;
+const device_type NGEN_KEYBOARD = device_creator<ngen_keyboard_device>;
diff --git a/src/mame/machine/nmk004.cpp b/src/mame/machine/nmk004.cpp
index 08c579fce3d..d8e117b6f25 100644
--- a/src/mame/machine/nmk004.cpp
+++ b/src/mame/machine/nmk004.cpp
@@ -90,7 +90,7 @@ ROM_START( nmk004 )
ROM_END
-const device_type NMK004 = &device_creator<nmk004_device>;
+const device_type NMK004 = device_creator<nmk004_device>;
nmk004_device::nmk004_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, NMK004, "NMK004", tag, owner, clock, "nmk004", __FILE__),
diff --git a/src/mame/machine/nmk112.cpp b/src/mame/machine/nmk112.cpp
index 547fdff5a27..1f1d7157af4 100644
--- a/src/mame/machine/nmk112.cpp
+++ b/src/mame/machine/nmk112.cpp
@@ -17,7 +17,7 @@
-const device_type NMK112 = &device_creator<nmk112_device>;
+const device_type NMK112 = device_creator<nmk112_device>;
nmk112_device::nmk112_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, NMK112, "NMK112", tag, owner, clock, "nmk112", __FILE__),
diff --git a/src/mame/machine/ns10crypt.cpp b/src/mame/machine/ns10crypt.cpp
index 19ed7f809ef..8d0975c0680 100644
--- a/src/mame/machine/ns10crypt.cpp
+++ b/src/mame/machine/ns10crypt.cpp
@@ -118,14 +118,14 @@ really exist.
#include "emu.h"
#include "ns10crypt.h"
-const device_type CHOCOVDR_DECRYPTER = &device_creator<chocovdr_decrypter_device>;
-const device_type GAMSHARA_DECRYPTER = &device_creator<gamshara_decrypter_device>;
-const device_type GJSPACE_DECRYPTER = &device_creator<gjspace_decrypter_device>;
-const device_type KNPUZZLE_DECRYPTER = &device_creator<knpuzzle_decrypter_device>;
-const device_type KONOTAKO_DECRYPTER = &device_creator<konotako_decrypter_device>;
-const device_type MRDRILR2_DECRYPTER = &device_creator<mrdrilr2_decrypter_device>;
-const device_type NFLCLSFB_DECRYPTER = &device_creator<nflclsfb_decrypter_device>;
-const device_type STARTRGN_DECRYPTER = &device_creator<startrgn_decrypter_device>;
+const device_type CHOCOVDR_DECRYPTER = device_creator<chocovdr_decrypter_device>;
+const device_type GAMSHARA_DECRYPTER = device_creator<gamshara_decrypter_device>;
+const device_type GJSPACE_DECRYPTER = device_creator<gjspace_decrypter_device>;
+const device_type KNPUZZLE_DECRYPTER = device_creator<knpuzzle_decrypter_device>;
+const device_type KONOTAKO_DECRYPTER = device_creator<konotako_decrypter_device>;
+const device_type MRDRILR2_DECRYPTER = device_creator<mrdrilr2_decrypter_device>;
+const device_type NFLCLSFB_DECRYPTER = device_creator<nflclsfb_decrypter_device>;
+const device_type STARTRGN_DECRYPTER = device_creator<startrgn_decrypter_device>;
// base class
diff --git a/src/mame/machine/ns11prot.cpp b/src/mame/machine/ns11prot.cpp
index b323cbd2e7d..bec5d68e7a4 100644
--- a/src/mame/machine/ns11prot.cpp
+++ b/src/mame/machine/ns11prot.cpp
@@ -65,7 +65,7 @@ WRITE16_MEMBER(keycus_c406_device::write)
logerror( "keycus_c406_device::write unexpected offset=%d data=%04x\n", offset, data );
}
-const device_type KEYCUS_C406 = &device_creator<keycus_c406_device>;
+const device_type KEYCUS_C406 = device_creator<keycus_c406_device>;
/* soul edge */
@@ -105,7 +105,7 @@ WRITE16_MEMBER(keycus_c409_device::write)
logerror( "keycus_c409_device::write unexpected offset=%d data=%04x\n", offset, data );
}
-const device_type KEYCUS_C409 = &device_creator<keycus_c409_device>;
+const device_type KEYCUS_C409 = device_creator<keycus_c409_device>;
/* dunk mania */
@@ -159,7 +159,7 @@ WRITE16_MEMBER(keycus_c410_device::write)
logerror( "keycus_c410_device::write unexpected offset=%d data=%04x\n", offset, data );
}
-const device_type KEYCUS_C410 = &device_creator<keycus_c410_device>;
+const device_type KEYCUS_C410 = device_creator<keycus_c410_device>;
/* prime goal ex */
@@ -215,7 +215,7 @@ WRITE16_MEMBER(keycus_c411_device::write)
logerror( "keycus_c411_device::write unexpected offset=%d data=%04x\n", offset, data );
}
-const device_type KEYCUS_C411 = &device_creator<keycus_c411_device>;
+const device_type KEYCUS_C411 = device_creator<keycus_c411_device>;
/* xevious 3d/g */
@@ -274,7 +274,7 @@ WRITE16_MEMBER(keycus_c430_device::write)
logerror( "keycus_c430_device::write unexpected offset=%d data=%04x\n", offset, data );
}
-const device_type KEYCUS_C430 = &device_creator<keycus_c430_device>;
+const device_type KEYCUS_C430 = device_creator<keycus_c430_device>;
/* dancing eyes */
@@ -332,7 +332,7 @@ WRITE16_MEMBER(keycus_c431_device::write)
logerror( "keycus_c431_device::write unexpected offset=%d data=%04x\n", offset, data );
}
-const device_type KEYCUS_C431 = &device_creator<keycus_c431_device>;
+const device_type KEYCUS_C431 = device_creator<keycus_c431_device>;
/* pocket racer */
@@ -392,7 +392,7 @@ WRITE16_MEMBER(keycus_c432_device::write)
logerror( "keycus_c432_device::write unexpected offset=%d data=%04x\n", offset, data );
}
-const device_type KEYCUS_C432 = &device_creator<keycus_c432_device>;
+const device_type KEYCUS_C432 = device_creator<keycus_c432_device>;
/* star sweep */
@@ -440,7 +440,7 @@ WRITE16_MEMBER(keycus_c442_device::write)
logerror( "keycus_c442_device::write unexpected offset=%d data=%04x\n", offset, data );
}
-const device_type KEYCUS_C442 = &device_creator<keycus_c442_device>;
+const device_type KEYCUS_C442 = device_creator<keycus_c442_device>;
/* kosodate quiz my angel 3 / point blank 2 */
@@ -486,4 +486,4 @@ WRITE16_MEMBER(keycus_c443_device::write)
logerror( "keycus_c443_device::write unexpected offset=%d data=%04x\n", offset, data );
}
-const device_type KEYCUS_C443 = &device_creator<keycus_c443_device>;
+const device_type KEYCUS_C443 = device_creator<keycus_c443_device>;
diff --git a/src/mame/machine/octo_kbd.cpp b/src/mame/machine/octo_kbd.cpp
index 7c12b1cfd90..a5d7219619b 100644
--- a/src/mame/machine/octo_kbd.cpp
+++ b/src/mame/machine/octo_kbd.cpp
@@ -260,6 +260,6 @@ void octopus_keyboard_device::device_timer(emu_timer &timer, device_timer_id id,
}
-const device_type OCTOPUS_KEYBOARD = &device_creator<octopus_keyboard_device>;
+const device_type OCTOPUS_KEYBOARD = device_creator<octopus_keyboard_device>;
diff --git a/src/mame/machine/orion.cpp b/src/mame/machine/orion.cpp
index 0146f95a2b5..2112a3d5a0e 100644
--- a/src/mame/machine/orion.cpp
+++ b/src/mame/machine/orion.cpp
@@ -11,11 +11,12 @@
#include "emu.h"
-#include "cpu/i8085/i8085.h"
-#include "imagedev/cassette.h"
-#include "sound/speaker.h"
#include "includes/orion.h"
+#include "imagedev/cassette.h"
+#include "screen.h"
+
+
#define SCREEN_WIDTH_384 48
#define SCREEN_WIDTH_480 60
#define SCREEN_WIDTH_512 64
diff --git a/src/mame/machine/osborne1.cpp b/src/mame/machine/osborne1.cpp
index 5472ac30bce..16873853e12 100644
--- a/src/mame/machine/osborne1.cpp
+++ b/src/mame/machine/osborne1.cpp
@@ -12,6 +12,8 @@ There are three IRQ sources:
#include "emu.h"
#include "includes/osborne1.h"
+#include "screen.h"
+
WRITE8_MEMBER( osborne1_state::bank_0xxx_w )
{
diff --git a/src/mame/machine/pc1512kb.cpp b/src/mame/machine/pc1512kb.cpp
index dbd6a14e958..a39ed7ef0ae 100644
--- a/src/mame/machine/pc1512kb.cpp
+++ b/src/mame/machine/pc1512kb.cpp
@@ -23,7 +23,7 @@
// DEVICE DEFINITIONS
//**************************************************************************
-const device_type PC1512_KEYBOARD = &device_creator<pc1512_keyboard_t>;
+const device_type PC1512_KEYBOARD = device_creator<pc1512_keyboard_t>;
//-------------------------------------------------
diff --git a/src/mame/machine/pc9801_118.cpp b/src/mame/machine/pc9801_118.cpp
index 7737582a209..3fdd6dd0e06 100644
--- a/src/mame/machine/pc9801_118.cpp
+++ b/src/mame/machine/pc9801_118.cpp
@@ -14,8 +14,11 @@
#include "emu.h"
#include "machine/pc9801_118.h"
+
#include "machine/pic8259.h"
#include "sound/2608intf.h"
+#include "speaker.h"
+
#define MAIN_CLOCK_X2 XTAL_2_4576MHz
@@ -24,7 +27,7 @@
//**************************************************************************
// device type definition
-const device_type PC9801_118 = &device_creator<pc9801_118_device>;
+const device_type PC9801_118 = device_creator<pc9801_118_device>;
READ8_MEMBER(pc9801_118_device::opn_porta_r)
diff --git a/src/mame/machine/pc9801_26.cpp b/src/mame/machine/pc9801_26.cpp
index ec01035bba3..29b65d10b96 100644
--- a/src/mame/machine/pc9801_26.cpp
+++ b/src/mame/machine/pc9801_26.cpp
@@ -13,8 +13,11 @@
#include "emu.h"
#include "machine/pc9801_26.h"
+
#include "machine/pic8259.h"
#include "sound/2203intf.h"
+#include "speaker.h"
+
#define MAIN_CLOCK_X1 XTAL_1_9968MHz
@@ -23,7 +26,7 @@
//**************************************************************************
// device type definition
-const device_type PC9801_26 = &device_creator<pc9801_26_device>;
+const device_type PC9801_26 = device_creator<pc9801_26_device>;
diff --git a/src/mame/machine/pc9801_86.cpp b/src/mame/machine/pc9801_86.cpp
index 5a2b80ea2b7..15899b1029d 100644
--- a/src/mame/machine/pc9801_86.cpp
+++ b/src/mame/machine/pc9801_86.cpp
@@ -18,6 +18,7 @@
#include "emu.h"
#include "machine/pc9801_86.h"
#include "sound/volt_reg.h"
+#include "speaker.h"
#define MAIN_CLOCK_X1 XTAL_1_9968MHz
#define QUEUE_SIZE 32768
@@ -27,7 +28,7 @@
//**************************************************************************
// device type definition
-const device_type PC9801_86 = &device_creator<pc9801_86_device>;
+const device_type PC9801_86 = device_creator<pc9801_86_device>;
READ8_MEMBER(pc9801_86_device::opn_porta_r)
diff --git a/src/mame/machine/pc9801_cbus.cpp b/src/mame/machine/pc9801_cbus.cpp
index 065bbe19e47..ec3b0df3eb0 100644
--- a/src/mame/machine/pc9801_cbus.cpp
+++ b/src/mame/machine/pc9801_cbus.cpp
@@ -15,7 +15,7 @@
// GLOBAL VARIABLES
//**************************************************************************
-const device_type PC9801CBUS_SLOT = &device_creator<pc9801_slot_device>;
+const device_type PC9801CBUS_SLOT = device_creator<pc9801_slot_device>;
diff --git a/src/mame/machine/pc9801_cd.cpp b/src/mame/machine/pc9801_cd.cpp
index 8e9216fc005..a8ec66ac672 100644
--- a/src/mame/machine/pc9801_cd.cpp
+++ b/src/mame/machine/pc9801_cd.cpp
@@ -4,7 +4,7 @@
#include "pc9801_cd.h"
// device type definition
-const device_type PC9801_CD = &device_creator<pc9801_cd_device>;
+const device_type PC9801_CD = device_creator<pc9801_cd_device>;
pc9801_cd_device::pc9801_cd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
atapi_cdrom_device(mconfig, PC9801_CD, "PC9801 CD-ROM Drive", tag, owner, clock, "pc9801_cd", __FILE__)
diff --git a/src/mame/machine/pc9801_kbd.cpp b/src/mame/machine/pc9801_kbd.cpp
index 728c9c4b23b..d7e01fc887a 100644
--- a/src/mame/machine/pc9801_kbd.cpp
+++ b/src/mame/machine/pc9801_kbd.cpp
@@ -24,7 +24,7 @@
//**************************************************************************
// device type definition
-const device_type PC9801_KBD = &device_creator<pc9801_kbd_device>;
+const device_type PC9801_KBD = device_creator<pc9801_kbd_device>;
//**************************************************************************
diff --git a/src/mame/machine/pcd_kbd.cpp b/src/mame/machine/pcd_kbd.cpp
index b05eaa8ab1c..ed6f8c84582 100644
--- a/src/mame/machine/pcd_kbd.cpp
+++ b/src/mame/machine/pcd_kbd.cpp
@@ -3,7 +3,11 @@
#include "emu.h"
#include "pcd_kbd.h"
-const device_type PCD_KEYBOARD = &device_creator<pcd_keyboard_device>;
+#include "cpu/mcs48/mcs48.h"
+#include "sound/spkrdev.h"
+#include "speaker.h"
+
+const device_type PCD_KEYBOARD = device_creator<pcd_keyboard_device>;
ROM_START( pcd_keyboard )
ROM_REGION(0x1000, "mcu", 0)
diff --git a/src/mame/machine/pcd_kbd.h b/src/mame/machine/pcd_kbd.h
index 6542ecdbc60..b899fab91d6 100644
--- a/src/mame/machine/pcd_kbd.h
+++ b/src/mame/machine/pcd_kbd.h
@@ -1,20 +1,17 @@
// license:BSD-3-Clause
// copyright-holders:Carl
-#ifndef PCD_KBD_H_
-#define PCD_KBD_H_
-
-#include "cpu/mcs48/mcs48.h"
-#include "sound/speaker.h"
+#ifndef MAME_INCLUDES_PCD_KBD_H
+#define MAME_INCLUDES_PCD_KBD_H
#define MCFG_PCD_KEYBOARD_OUT_TX_HANDLER(_devcb) \
devcb = &pcd_keyboard_device::set_out_tx_handler(*device, DEVCB_##_devcb);
-class pcd_keyboard_device : public device_t
+class pcd_keyboard_device : public device_t
{
public:
pcd_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template<class _Object> static devcb_base &set_out_tx_handler(device_t &device, _Object object) { return downcast<pcd_keyboard_device &>(device).m_out_tx_handler.set_callback(object); }
+ template <class Object> static devcb_base &set_out_tx_handler(device_t &device, Object &&cb) { return downcast<pcd_keyboard_device &>(device).m_out_tx_handler.set_callback(std::forward<Object>(cb)); }
virtual const tiny_rom_entry *device_rom_region() const override;
virtual machine_config_constructor device_mconfig_additions() const override;
@@ -36,4 +33,4 @@ private:
extern const device_type PCD_KEYBOARD;
-#endif /* PCD_KBD_H_ */
+#endif // MAME_INCLUDES_PCD_KBD_H
diff --git a/src/mame/machine/pce220_ser.cpp b/src/mame/machine/pce220_ser.cpp
index 2fd629a37bf..f9b01143c7d 100644
--- a/src/mame/machine/pce220_ser.cpp
+++ b/src/mame/machine/pce220_ser.cpp
@@ -37,7 +37,7 @@ enum
};
// device type definition
-const device_type PCE220SERIAL = &device_creator<pce220_serial_device>;
+const device_type PCE220SERIAL = device_creator<pce220_serial_device>;
//-------------------------------------------------
// pce220_serial_device - constructor
diff --git a/src/mame/machine/pce_cd.cpp b/src/mame/machine/pce_cd.cpp
index 13db6a9b06d..a3919312903 100644
--- a/src/mame/machine/pce_cd.cpp
+++ b/src/mame/machine/pce_cd.cpp
@@ -75,7 +75,7 @@ CD Interface Register 0x0f - ADPCM fade in/out register
#define PCE_CD_CLOCK 9216000
-const device_type PCE_CD = &device_creator<pce_cd_device>;
+const device_type PCE_CD = device_creator<pce_cd_device>;
pce_cd_device::pce_cd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
diff --git a/src/mame/machine/pecom.cpp b/src/mame/machine/pecom.cpp
index fe7cba9bc21..894eed534bd 100644
--- a/src/mame/machine/pecom.cpp
+++ b/src/mame/machine/pecom.cpp
@@ -9,10 +9,9 @@
****************************************************************************/
#include "emu.h"
-#include "cpu/cosmac/cosmac.h"
-#include "sound/cdp1869.h"
#include "includes/pecom.h"
+
TIMER_CALLBACK_MEMBER(pecom_state::reset_tick)
{
m_reset = 1;
diff --git a/src/mame/machine/pgmprot_igs027a_type1.cpp b/src/mame/machine/pgmprot_igs027a_type1.cpp
index 39a8a76e753..51cb33039d3 100644
--- a/src/mame/machine/pgmprot_igs027a_type1.cpp
+++ b/src/mame/machine/pgmprot_igs027a_type1.cpp
@@ -58,9 +58,11 @@
***********************************************************************/
#include "emu.h"
-#include "includes/pgm.h"
#include "machine/pgmprot_igs027a_type1.h"
+#include "screen.h"
+
+
/**************************** EMULATION *******************************/
/* used by photoy2k, kovsh */
diff --git a/src/mame/machine/pgmprot_igs027a_type1.h b/src/mame/machine/pgmprot_igs027a_type1.h
index 91d1818e104..91dcf4ca761 100644
--- a/src/mame/machine/pgmprot_igs027a_type1.h
+++ b/src/mame/machine/pgmprot_igs027a_type1.h
@@ -1,13 +1,15 @@
// license:BSD-3-Clause
// copyright-holders:David Haywood, ElSemi, Xing Xing
+#include "includes/pgm.h"
class pgm_arm_type1_state : public pgm_state
{
public:
pgm_arm_type1_state(const machine_config &mconfig, device_type type, const char *tag)
- : pgm_state(mconfig, type, tag),
- m_arm7_shareram(*this, "arm7_shareram"),
- m_prot(*this, "prot") {
+ : pgm_state(mconfig, type, tag)
+ , m_arm7_shareram(*this, "arm7_shareram")
+ , m_prot(*this, "prot")
+ {
m_curslots = 0;
m_puzzli_54_trigger = 0;
}
diff --git a/src/mame/machine/primo.cpp b/src/mame/machine/primo.cpp
index 34bc2fd66b4..4c36389e6b4 100644
--- a/src/mame/machine/primo.cpp
+++ b/src/mame/machine/primo.cpp
@@ -17,12 +17,7 @@
/* Components */
#include "cpu/z80/z80.h"
-#include "bus/cbmiec/cbmiec.h"
-#include "sound/speaker.h"
-
-/* Devices */
-#include "imagedev/cassette.h"
-#include "imagedev/snapquik.h"
+#include "screen.h"
diff --git a/src/mame/machine/prof80mmu.cpp b/src/mame/machine/prof80mmu.cpp
index cc8af9d6790..a89ed51af15 100644
--- a/src/mame/machine/prof80mmu.cpp
+++ b/src/mame/machine/prof80mmu.cpp
@@ -15,7 +15,7 @@
// DEVICE DEFINITIONS
//**************************************************************************
-const device_type PROF80_MMU = &device_creator<prof80_mmu_device>;
+const device_type PROF80_MMU = device_creator<prof80_mmu_device>;
DEVICE_ADDRESS_MAP_START( z80_program_map, 8, prof80_mmu_device )
diff --git a/src/mame/machine/psion_pack.cpp b/src/mame/machine/psion_pack.cpp
index e29d3fe7112..e90810a6de2 100644
--- a/src/mame/machine/psion_pack.cpp
+++ b/src/mame/machine/psion_pack.cpp
@@ -54,7 +54,7 @@ static const char *datapack_option_spec =
// device type definition
-const device_type PSION_DATAPACK = &device_creator<datapack_device>;
+const device_type PSION_DATAPACK = device_creator<datapack_device>;
//-------------------------------------------------
// datapack_device - constructor
diff --git a/src/mame/machine/psxcd.cpp b/src/mame/machine/psxcd.cpp
index eafd7ed2562..f1b4a3fd0c5 100644
--- a/src/mame/machine/psxcd.cpp
+++ b/src/mame/machine/psxcd.cpp
@@ -83,7 +83,7 @@ enum submode_flags
// DEVICE DEFINITIONS
//**************************************************************************
-const device_type PSXCD = &device_creator<psxcd_device>;
+const device_type PSXCD = device_creator<psxcd_device>;
psxcd_device::psxcd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
cdrom_image_device(mconfig, PSXCD, "PSX Cdrom", tag, owner, clock, "psx_cd", __FILE__),
diff --git a/src/mame/machine/qimi.cpp b/src/mame/machine/qimi.cpp
index 7bbfbe903af..c698f3d587f 100644
--- a/src/mame/machine/qimi.cpp
+++ b/src/mame/machine/qimi.cpp
@@ -15,7 +15,7 @@
// DEVICE DEFINITIONS
//**************************************************************************
-const device_type QIMI = &device_creator<qimi_t>;
+const device_type QIMI = device_creator<qimi_t>;
//-------------------------------------------------
diff --git a/src/mame/machine/qx10kbd.cpp b/src/mame/machine/qx10kbd.cpp
index 14a91372c78..a93bf7c7dd4 100644
--- a/src/mame/machine/qx10kbd.cpp
+++ b/src/mame/machine/qx10kbd.cpp
@@ -244,4 +244,4 @@ ioport_constructor qx10_keyboard_device::device_input_ports() const
}
-const device_type QX10_KEYBOARD = &device_creator<qx10_keyboard_device>;
+const device_type QX10_KEYBOARD = device_creator<qx10_keyboard_device>;
diff --git a/src/mame/machine/rmnkbd.cpp b/src/mame/machine/rmnkbd.cpp
index be3304ec472..b7ba96f296b 100644
--- a/src/mame/machine/rmnkbd.cpp
+++ b/src/mame/machine/rmnkbd.cpp
@@ -177,4 +177,4 @@ void rmnimbus_keyboard_device::received_byte(uint8_t byte)
}
-const device_type RMNIMBUS_KEYBOARD = &device_creator<rmnimbus_keyboard_device>;
+const device_type RMNIMBUS_KEYBOARD = device_creator<rmnimbus_keyboard_device>;
diff --git a/src/mame/machine/rx01.cpp b/src/mame/machine/rx01.cpp
index 263e7f94a37..dd62af3cdc8 100644
--- a/src/mame/machine/rx01.cpp
+++ b/src/mame/machine/rx01.cpp
@@ -42,7 +42,7 @@ MACHINE_CONFIG_END
// DEVICE DEFINITIONS
//**************************************************************************
-const device_type RX01 = &device_creator<rx01_device>;
+const device_type RX01 = device_creator<rx01_device>;
//-------------------------------------------------
// rx01_device - constructor
diff --git a/src/mame/machine/s32comm.cpp b/src/mame/machine/s32comm.cpp
index 793f3600187..d25d3bdfc32 100644
--- a/src/mame/machine/s32comm.cpp
+++ b/src/mame/machine/s32comm.cpp
@@ -79,7 +79,7 @@ MACHINE_CONFIG_END
// GLOBAL VARIABLES
//**************************************************************************
-const device_type S32COMM = &device_creator<s32comm_device>;
+const device_type S32COMM = device_creator<s32comm_device>;
//-------------------------------------------------
// machine_config_additions - device-specific
diff --git a/src/mame/machine/samcoupe.cpp b/src/mame/machine/samcoupe.cpp
index fa7a5fe80ca..85be0128bbf 100644
--- a/src/mame/machine/samcoupe.cpp
+++ b/src/mame/machine/samcoupe.cpp
@@ -8,6 +8,7 @@
#include "emu.h"
#include "includes/samcoupe.h"
+#include "screen.h"
/***************************************************************************
CONSTANTS
diff --git a/src/mame/machine/segabb.cpp b/src/mame/machine/segabb.cpp
index aa03b4e483e..e930caa4f3c 100644
--- a/src/mame/machine/segabb.cpp
+++ b/src/mame/machine/segabb.cpp
@@ -3,7 +3,7 @@
#include "emu.h"
#include "segabb.h"
-const device_type SEGA_LINDBERGH_BASEBOARD = &device_creator<sega_lindbergh_baseboard_device>;
+const device_type SEGA_LINDBERGH_BASEBOARD = device_creator<sega_lindbergh_baseboard_device>;
DEVICE_ADDRESS_MAP_START(map1, 32, sega_lindbergh_baseboard_device)
ADDRESS_MAP_END
diff --git a/src/mame/machine/segacrp2_device.cpp b/src/mame/machine/segacrp2_device.cpp
index 9df96b7bb7c..be21a1919ef 100644
--- a/src/mame/machine/segacrp2_device.cpp
+++ b/src/mame/machine/segacrp2_device.cpp
@@ -85,18 +85,18 @@ static void decode(uint8_t *rom, uint8_t *decrypted,
}
-const device_type SEGACRP2_Z80 = &device_creator<segacrp2_z80_device>;
-
-const device_type SEGA_315_5179 = &device_creator<sega_315_5179_device>;
-const device_type SEGA_315_5178 = &device_creator<sega_315_5178_device>;
-const device_type SEGA_315_5177 = &device_creator<sega_315_5177_device>; // also seen as 317-5000
-const device_type SEGA_315_5176 = &device_creator<sega_315_5176_device>; // TODO!
-const device_type SEGA_315_5162 = &device_creator<sega_315_5162_device>;
-
-const device_type SEGA_317_0004 = &device_creator<sega_317_0004_device>;
-const device_type SEGA_317_0005 = &device_creator<sega_317_0005_device>;
-const device_type SEGA_317_0006 = &device_creator<sega_317_0006_device>;
-const device_type SEGA_317_0007 = &device_creator<sega_317_0007_device>;
+const device_type SEGACRP2_Z80 = device_creator<segacrp2_z80_device>;
+
+const device_type SEGA_315_5179 = device_creator<sega_315_5179_device>;
+const device_type SEGA_315_5178 = device_creator<sega_315_5178_device>;
+const device_type SEGA_315_5177 = device_creator<sega_315_5177_device>; // also seen as 317-5000
+const device_type SEGA_315_5176 = device_creator<sega_315_5176_device>; // TODO!
+const device_type SEGA_315_5162 = device_creator<sega_315_5162_device>;
+
+const device_type SEGA_317_0004 = device_creator<sega_317_0004_device>;
+const device_type SEGA_317_0005 = device_creator<sega_317_0005_device>;
+const device_type SEGA_317_0006 = device_creator<sega_317_0006_device>;
+const device_type SEGA_317_0007 = device_creator<sega_317_0007_device>;
diff --git a/src/mame/machine/segacrpt_device.cpp b/src/mame/machine/segacrpt_device.cpp
index d889e4045cb..bda64ba277e 100644
--- a/src/mame/machine/segacrpt_device.cpp
+++ b/src/mame/machine/segacrpt_device.cpp
@@ -255,35 +255,35 @@ static void decode(uint8_t *data, uint8_t *opcodes, int size, const uint8_t conv
-const device_type SEGACRPT_Z80 = &device_creator<segacrpt_z80_device>;
-
-const device_type SEGA_315_5132 = &device_creator<sega_315_5132_device>;
-const device_type SEGA_315_5155 = &device_creator<sega_315_5155_device>;
-const device_type SEGA_315_5110 = &device_creator<sega_315_5110_device>;
-const device_type SEGA_315_5135 = &device_creator<sega_315_5135_device>;
-const device_type SEGA_315_5051 = &device_creator<sega_315_5051_device>;
-const device_type SEGA_315_5098 = &device_creator<sega_315_5098_device>; // also 315-5030 ?
-const device_type SEGA_315_5102 = &device_creator<sega_315_5102_device>;
-const device_type SEGA_315_5065 = &device_creator<sega_315_5065_device>;
-const device_type SEGA_315_5064 = &device_creator<sega_315_5064_device>;
-const device_type SEGA_315_5033 = &device_creator<sega_315_5033_device>;
-const device_type SEGA_315_5041 = &device_creator<sega_315_5041_device>;
-const device_type SEGA_315_5048 = &device_creator<sega_315_5048_device>;
-const device_type SEGA_315_5093 = &device_creator<sega_315_5093_device>;
-const device_type SEGA_315_5099 = &device_creator<sega_315_5099_device>;
-const device_type SEGA_315_5015 = &device_creator<sega_315_5015_device>;
-const device_type SEGA_315_5133 = &device_creator<sega_315_5133_device>; // NOT DECRYPTED YET
-const device_type SEGA_315_5061 = &device_creator<sega_315_5061_device>;
-const device_type SEGA_315_5028 = &device_creator<sega_315_5028_device>;
-const device_type SEGA_315_5084 = &device_creator<sega_315_5084_device>;
-const device_type SEGA_315_5013 = &device_creator<sega_315_5013_device>;
-const device_type SEGA_315_5014 = &device_creator<sega_315_5014_device>;
-const device_type SEGA_315_5018 = &device_creator<sega_315_5018_device>;
-const device_type SEGA_315_5010 = &device_creator<sega_315_5010_device>;
+const device_type SEGACRPT_Z80 = device_creator<segacrpt_z80_device>;
+
+const device_type SEGA_315_5132 = device_creator<sega_315_5132_device>;
+const device_type SEGA_315_5155 = device_creator<sega_315_5155_device>;
+const device_type SEGA_315_5110 = device_creator<sega_315_5110_device>;
+const device_type SEGA_315_5135 = device_creator<sega_315_5135_device>;
+const device_type SEGA_315_5051 = device_creator<sega_315_5051_device>;
+const device_type SEGA_315_5098 = device_creator<sega_315_5098_device>; // also 315-5030 ?
+const device_type SEGA_315_5102 = device_creator<sega_315_5102_device>;
+const device_type SEGA_315_5065 = device_creator<sega_315_5065_device>;
+const device_type SEGA_315_5064 = device_creator<sega_315_5064_device>;
+const device_type SEGA_315_5033 = device_creator<sega_315_5033_device>;
+const device_type SEGA_315_5041 = device_creator<sega_315_5041_device>;
+const device_type SEGA_315_5048 = device_creator<sega_315_5048_device>;
+const device_type SEGA_315_5093 = device_creator<sega_315_5093_device>;
+const device_type SEGA_315_5099 = device_creator<sega_315_5099_device>;
+const device_type SEGA_315_5015 = device_creator<sega_315_5015_device>;
+const device_type SEGA_315_5133 = device_creator<sega_315_5133_device>; // NOT DECRYPTED YET
+const device_type SEGA_315_5061 = device_creator<sega_315_5061_device>;
+const device_type SEGA_315_5028 = device_creator<sega_315_5028_device>;
+const device_type SEGA_315_5084 = device_creator<sega_315_5084_device>;
+const device_type SEGA_315_5013 = device_creator<sega_315_5013_device>;
+const device_type SEGA_315_5014 = device_creator<sega_315_5014_device>;
+const device_type SEGA_315_5018 = device_creator<sega_315_5018_device>;
+const device_type SEGA_315_5010 = device_creator<sega_315_5010_device>;
// below are unknown part numbers
-const device_type SEGA_315_SPAT = &device_creator<sega_315_spat_device>; // unknown part number
-const device_type SEGA_CPU_PBACTIO4 = &device_creator<sega_cpu_pbactio4_device>;
+const device_type SEGA_315_SPAT = device_creator<sega_315_spat_device>; // unknown part number
+const device_type SEGA_CPU_PBACTIO4 = device_creator<sega_cpu_pbactio4_device>;
diff --git a/src/mame/machine/segaic16.cpp b/src/mame/machine/segaic16.cpp
index 11ec0dddc8c..ecb16a4bf73 100644
--- a/src/mame/machine/segaic16.cpp
+++ b/src/mame/machine/segaic16.cpp
@@ -27,10 +27,10 @@
//**************************************************************************
// device type definition
-const device_type SEGA_315_5195_MEM_MAPPER = &device_creator<sega_315_5195_mapper_device>;
-const device_type SEGA_315_5248_MULTIPLIER = &device_creator<sega_315_5248_multiplier_device>;
-const device_type SEGA_315_5249_DIVIDER = &device_creator<sega_315_5249_divider_device>;
-const device_type SEGA_315_5250_COMPARE_TIMER = &device_creator<sega_315_5250_compare_timer_device>;
+const device_type SEGA_315_5195_MEM_MAPPER = device_creator<sega_315_5195_mapper_device>;
+const device_type SEGA_315_5248_MULTIPLIER = device_creator<sega_315_5248_multiplier_device>;
+const device_type SEGA_315_5249_DIVIDER = device_creator<sega_315_5249_divider_device>;
+const device_type SEGA_315_5250_COMPARE_TIMER = device_creator<sega_315_5250_compare_timer_device>;
diff --git a/src/mame/machine/segaic16.h b/src/mame/machine/segaic16.h
index 25205c34985..28c672e6583 100644
--- a/src/mame/machine/segaic16.h
+++ b/src/mame/machine/segaic16.h
@@ -6,14 +6,15 @@
***************************************************************************/
-#pragma once
+#ifndef MAME_MACHINE_SEGAIC16_H
+#define MAME_MACHINE_SEGAIC16_H
-#ifndef __SEGAIC16_H__
-#define __SEGAIC16_H__
+#pragma once
#include "cpu/m68000/m68000.h"
#include "machine/fd1089.h"
#include "machine/fd1094.h"
+#include "screen.h"
//**************************************************************************
@@ -274,4 +275,4 @@ extern const device_type SEGA_315_5249_DIVIDER;
extern const device_type SEGA_315_5250_COMPARE_TIMER;
-#endif
+#endif // MAME_MACHINE_SEGAIC16_H
diff --git a/src/mame/machine/seibucop/seibucop.cpp b/src/mame/machine/seibucop/seibucop.cpp
index 8b5cab3a08b..70a3beb7660 100644
--- a/src/mame/machine/seibucop/seibucop.cpp
+++ b/src/mame/machine/seibucop/seibucop.cpp
@@ -110,7 +110,7 @@
if (LOG_Commands) logerror
-const device_type RAIDEN2COP = &device_creator<raiden2cop_device>;
+const device_type RAIDEN2COP = device_creator<raiden2cop_device>;
raiden2cop_device::raiden2cop_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, RAIDEN2COP, "Seibu COP (Raiden 2)", tag, owner, clock, "raiden2cop", __FILE__),
diff --git a/src/mame/machine/seicop.cpp b/src/mame/machine/seicop.cpp
index addb3a792a8..515b31282a1 100644
--- a/src/mame/machine/seicop.cpp
+++ b/src/mame/machine/seicop.cpp
@@ -18,7 +18,7 @@
#include "includes/legionna.h"
-const device_type SEIBU_COP_BOOTLEG = &device_creator<seibu_cop_bootleg_device>;
+const device_type SEIBU_COP_BOOTLEG = device_creator<seibu_cop_bootleg_device>;
READ16_MEMBER(seibu_cop_bootleg_device::reg_lo_addr_r)
{
diff --git a/src/mame/machine/sgi.cpp b/src/mame/machine/sgi.cpp
index c190315041c..909d821fef0 100644
--- a/src/mame/machine/sgi.cpp
+++ b/src/mame/machine/sgi.cpp
@@ -28,7 +28,7 @@ static inline void ATTR_PRINTF(3,4) verboselog( running_machine &machine, int n_
}
#endif
-const device_type SGI_MC = &device_creator<sgi_mc_device>;
+const device_type SGI_MC = device_creator<sgi_mc_device>;
sgi_mc_device::sgi_mc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, SGI_MC, "SGI Memory Controller", tag, owner, clock, "sgi_mc", __FILE__),
diff --git a/src/mame/machine/slapstic.cpp b/src/mame/machine/slapstic.cpp
index 0361b53f4d7..38f74b9358d 100644
--- a/src/mame/machine/slapstic.cpp
+++ b/src/mame/machine/slapstic.cpp
@@ -185,7 +185,7 @@
#include "includes/slapstic.h"
-extern const device_type SLAPSTIC = &device_creator<atari_slapstic_device>;
+const device_type SLAPSTIC = device_creator<atari_slapstic_device>;
atari_slapstic_device::atari_slapstic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, SLAPSTIC, "Atari Slapstic", tag, owner, clock, "slapstic", __FILE__),
diff --git a/src/mame/machine/st0016.cpp b/src/mame/machine/st0016.cpp
index d39d6c1bc41..fc14f746b50 100644
--- a/src/mame/machine/st0016.cpp
+++ b/src/mame/machine/st0016.cpp
@@ -4,8 +4,10 @@
#include "emu.h"
#include "st0016.h"
+#include "speaker.h"
-const device_type ST0016_CPU = &device_creator<st0016_cpu_device>;
+
+const device_type ST0016_CPU = device_creator<st0016_cpu_device>;
static ADDRESS_MAP_START(st0016_cpu_internal_map, AS_PROGRAM, 8, st0016_cpu_device)
AM_RANGE(0xc000, 0xcfff) AM_READ(st0016_sprite_ram_r) AM_WRITE(st0016_sprite_ram_w)
diff --git a/src/mame/machine/st0016.h b/src/mame/machine/st0016.h
index c82e4eacfdb..c25b1e425e5 100644
--- a/src/mame/machine/st0016.h
+++ b/src/mame/machine/st0016.h
@@ -2,13 +2,14 @@
// copyright-holders:Tomasz Slanina, David Haywood
/* ST0016 - CPU (z80) + Sound + Video */
-#pragma once
+#ifndef MAME_MACHINE_ST0016_CPU_H
+#define MAME_MACHINE_ST0016_CPU_H
-#ifndef __ST0016_CPU__
-#define __ST0016_CPU__
+#pragma once
#include "cpu/z80/z80.h"
#include "sound/st0016.h"
+#include "screen.h"
#define ISMACS (m_game_flag & 0x80)
#define ISMACS1 (((m_game_flag & 0x180) == 0x180))
@@ -113,4 +114,4 @@ private:
extern const device_type ST0016_CPU;
-#endif /// __ST0016_CPU__
+#endif // MAME_MACHINE_ST0016_CPU_H
diff --git a/src/mame/machine/swim.cpp b/src/mame/machine/swim.cpp
index cac2f6ed387..59537173bd8 100644
--- a/src/mame/machine/swim.cpp
+++ b/src/mame/machine/swim.cpp
@@ -32,7 +32,7 @@ enum
DEVICE
***************************************************************************/
-const device_type SWIM = &device_creator<swim_device>;
+const device_type SWIM = device_creator<swim_device>;
//-------------------------------------------------
// ctor
diff --git a/src/mame/machine/tait8741.cpp b/src/mame/machine/tait8741.cpp
index 3ea6607b1b0..ba5c223a025 100644
--- a/src/mame/machine/tait8741.cpp
+++ b/src/mame/machine/tait8741.cpp
@@ -33,7 +33,7 @@ gladiatr and Great Swordsman set.
#define CMD_08 1
#define CMD_4a 2
-const device_type TAITO8741_4PACK = &device_creator<taito8741_4pack_device>;
+const device_type TAITO8741_4PACK = device_creator<taito8741_4pack_device>;
taito8741_4pack_device::taito8741_4pack_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, TAITO8741_4PACK, "I8741 MCU Simulation (Taito 4Pack)", tag, owner, clock, "taito8741_4pack", __FILE__),
diff --git a/src/mame/machine/taito68705interface.cpp b/src/mame/machine/taito68705interface.cpp
index 3cb18183b9a..b66233d70ff 100644
--- a/src/mame/machine/taito68705interface.cpp
+++ b/src/mame/machine/taito68705interface.cpp
@@ -73,10 +73,10 @@ MACHINE_CONFIG_END
} // anonymous namespace
-device_type const TAITO68705_MCU = &device_creator<taito68705_mcu_device>;
-device_type const TAITO68705_MCU_TIGER = &device_creator<taito68705_mcu_tiger_device>;
-device_type const ARKANOID_68705P3 = &device_creator<arkanoid_68705p3_device>;
-device_type const ARKANOID_68705P5 = &device_creator<arkanoid_68705p5_device>;
+device_type const TAITO68705_MCU = device_creator<taito68705_mcu_device>;
+device_type const TAITO68705_MCU_TIGER = device_creator<taito68705_mcu_tiger_device>;
+device_type const ARKANOID_68705P3 = device_creator<arkanoid_68705p3_device>;
+device_type const ARKANOID_68705P5 = device_creator<arkanoid_68705p5_device>;
READ8_MEMBER(taito68705_mcu_device_base::data_r)
diff --git a/src/mame/machine/taitoio.cpp b/src/mame/machine/taitoio.cpp
index c19e1ffd02b..cd38073857a 100644
--- a/src/mame/machine/taitoio.cpp
+++ b/src/mame/machine/taitoio.cpp
@@ -59,7 +59,7 @@ MACHINE_CONFIG_END
/* */
/***************************************************************************/
-const device_type TC0220IOC = &device_creator<tc0220ioc_device>;
+const device_type TC0220IOC = device_creator<tc0220ioc_device>;
tc0220ioc_device::tc0220ioc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, TC0220IOC, "Taito TC0220IOC", tag, owner, clock, "tc0220ioc", __FILE__),
@@ -196,7 +196,7 @@ WRITE8_MEMBER( tc0220ioc_device::portreg_w )
/***************************************************************************/
-const device_type TC0510NIO = &device_creator<tc0510nio_device>;
+const device_type TC0510NIO = device_creator<tc0510nio_device>;
tc0510nio_device::tc0510nio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, TC0510NIO, "Taito TC0510NIO", tag, owner, clock, "tc0510nio", __FILE__),
@@ -334,7 +334,7 @@ WRITE16_MEMBER( tc0510nio_device::halfword_wordswap_w )
/***************************************************************************/
-const device_type TC0640FIO = &device_creator<tc0640fio_device>;
+const device_type TC0640FIO = device_creator<tc0640fio_device>;
tc0640fio_device::tc0640fio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, TC0640FIO, "Taito TC0640FIO", tag, owner, clock, "tc0640fio", __FILE__),
diff --git a/src/mame/machine/tandy2kb.cpp b/src/mame/machine/tandy2kb.cpp
index ff76291c1ff..fa84fbec7ee 100644
--- a/src/mame/machine/tandy2kb.cpp
+++ b/src/mame/machine/tandy2kb.cpp
@@ -23,7 +23,7 @@
// DEVICE DEFINITIONS
//**************************************************************************
-const device_type TANDY2K_KEYBOARD = &device_creator<tandy2k_keyboard_device>;
+const device_type TANDY2K_KEYBOARD = device_creator<tandy2k_keyboard_device>;
diff --git a/src/mame/machine/teleprinter.cpp b/src/mame/machine/teleprinter.cpp
index d93c498e371..b2b3ffdae10 100644
--- a/src/mame/machine/teleprinter.cpp
+++ b/src/mame/machine/teleprinter.cpp
@@ -3,6 +3,10 @@
#include "emu.h"
#include "teleprinter.h"
+#include "screen.h"
+#include "speaker.h"
+
+
static const uint8_t teleprinter_font[128*8] =
{
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
@@ -237,4 +241,4 @@ void teleprinter_device::device_reset()
generic_terminal_device::device_reset();
}
-const device_type TELEPRINTER = &device_creator<teleprinter_device>;
+const device_type TELEPRINTER = device_creator<teleprinter_device>;
diff --git a/src/mame/machine/thomson.cpp b/src/mame/machine/thomson.cpp
index b1c7d004b2c..9bce968b43c 100644
--- a/src/mame/machine/thomson.cpp
+++ b/src/mame/machine/thomson.cpp
@@ -593,7 +593,7 @@ READ8_MEMBER( thomson_state::to7_sys_portb_in )
because the Data Transmit Ready bit is shared in an incompatible way!
*/
-const device_type TO7_IO_LINE = &device_creator<to7_io_line_device>;
+const device_type TO7_IO_LINE = device_creator<to7_io_line_device>;
//-------------------------------------------------
// to7_io_line_device - constructor
diff --git a/src/mame/machine/ticket.cpp b/src/mame/machine/ticket.cpp
index 81db8e0caf0..68cb586d32e 100644
--- a/src/mame/machine/ticket.cpp
+++ b/src/mame/machine/ticket.cpp
@@ -26,7 +26,7 @@
//**************************************************************************
// device type definition
-const device_type TICKET_DISPENSER = &device_creator<ticket_dispenser_device>;
+const device_type TICKET_DISPENSER = device_creator<ticket_dispenser_device>;
diff --git a/src/mame/machine/trs80m2kb.cpp b/src/mame/machine/trs80m2kb.cpp
index 0fe207f1ab0..86a73ed9c7d 100644
--- a/src/mame/machine/trs80m2kb.cpp
+++ b/src/mame/machine/trs80m2kb.cpp
@@ -23,7 +23,7 @@
// DEVICE DEFINITIONS
//**************************************************************************
-const device_type TRS80M2_KEYBOARD = &device_creator<trs80m2_keyboard_device>;
+const device_type TRS80M2_KEYBOARD = device_creator<trs80m2_keyboard_device>;
diff --git a/src/mame/machine/upd65031.cpp b/src/mame/machine/upd65031.cpp
index 6a98da0660c..8c57602dbd6 100644
--- a/src/mame/machine/upd65031.cpp
+++ b/src/mame/machine/upd65031.cpp
@@ -27,7 +27,7 @@
// device type definition
-const device_type UPD65031 = &device_creator<upd65031_device>;
+const device_type UPD65031 = device_creator<upd65031_device>;
//**************************************************************************
diff --git a/src/mame/machine/v1050kb.cpp b/src/mame/machine/v1050kb.cpp
index 05f7114e8c9..33b3be0a86d 100644
--- a/src/mame/machine/v1050kb.cpp
+++ b/src/mame/machine/v1050kb.cpp
@@ -9,6 +9,8 @@
#include "emu.h"
#include "v1050kb.h"
+#include "speaker.h"
+
//**************************************************************************
@@ -24,7 +26,7 @@
// DEVICE DEFINITIONS
//**************************************************************************
-const device_type V1050_KEYBOARD = &device_creator<v1050_keyboard_device>;
+const device_type V1050_KEYBOARD = device_creator<v1050_keyboard_device>;
//-------------------------------------------------
diff --git a/src/mame/machine/vector06.cpp b/src/mame/machine/vector06.cpp
index efe3e81ff0d..f16eae3e56a 100644
--- a/src/mame/machine/vector06.cpp
+++ b/src/mame/machine/vector06.cpp
@@ -11,6 +11,7 @@
#include "emu.h"
#include "includes/vector06.h"
+#include "screen.h"
READ8_MEMBER( vector06_state::vector06_8255_portb_r )
diff --git a/src/mame/machine/victor9k_fdc.cpp b/src/mame/machine/victor9k_fdc.cpp
index d23f62126a2..e63fa8364be 100644
--- a/src/mame/machine/victor9k_fdc.cpp
+++ b/src/mame/machine/victor9k_fdc.cpp
@@ -86,7 +86,7 @@ const int victor_9000_fdc_t::rpm[] = { 252, 252, 252, 252, 252, 252, 252, 252, 2
// DEVICE DEFINITIONS
//**************************************************************************
-const device_type VICTOR_9000_FDC = &device_creator<victor_9000_fdc_t>;
+const device_type VICTOR_9000_FDC = device_creator<victor_9000_fdc_t>;
//-------------------------------------------------
diff --git a/src/mame/machine/victor9kb.cpp b/src/mame/machine/victor9kb.cpp
index 9fb6e882caf..b26df2526ac 100644
--- a/src/mame/machine/victor9kb.cpp
+++ b/src/mame/machine/victor9kb.cpp
@@ -353,7 +353,7 @@ Y11 104 103 102 101 100 99 98 97 kN/A k. k00 k0 RGHT LEFT PAUS
// DEVICE DEFINITIONS
//**************************************************************************
-const device_type VICTOR9K_KEYBOARD = &device_creator<victor_9000_keyboard_t>;
+const device_type VICTOR9K_KEYBOARD = device_creator<victor_9000_keyboard_t>;
//-------------------------------------------------
diff --git a/src/mame/machine/vtech2.cpp b/src/mame/machine/vtech2.cpp
index 4d1fcefdf96..f8d7d2a38b0 100644
--- a/src/mame/machine/vtech2.cpp
+++ b/src/mame/machine/vtech2.cpp
@@ -17,9 +17,8 @@
#include "emu.h"
#include "includes/vtech2.h"
+
#include "imagedev/flopdrv.h"
-#include "imagedev/cassette.h"
-#include "sound/speaker.h"
/* public */
diff --git a/src/mame/machine/wangpckb.cpp b/src/mame/machine/wangpckb.cpp
index e502814d13e..e9332d7dc06 100644
--- a/src/mame/machine/wangpckb.cpp
+++ b/src/mame/machine/wangpckb.cpp
@@ -52,6 +52,7 @@ Notes:
#include "emu.h"
#include "wangpckb.h"
+#include "speaker.h"
//**************************************************************************
@@ -69,7 +70,7 @@ Notes:
// DEVICE DEFINITIONS
//**************************************************************************
-const device_type WANGPC_KEYBOARD = &device_creator<wangpc_keyboard_t>;
+const device_type WANGPC_KEYBOARD = device_creator<wangpc_keyboard_t>;
diff --git a/src/mame/machine/wpc.cpp b/src/mame/machine/wpc.cpp
index 346daf954a1..b959966164e 100644
--- a/src/mame/machine/wpc.cpp
+++ b/src/mame/machine/wpc.cpp
@@ -11,7 +11,7 @@
#define LOG_WPC (0)
-const device_type WPCASIC = &device_creator<wpc_device>;
+const device_type WPCASIC = device_creator<wpc_device>;
wpc_device::wpc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig,WPCASIC,"Williams WPC ASIC",tag,owner,clock, "wpc", __FILE__),
diff --git a/src/mame/machine/wpc_lamp.cpp b/src/mame/machine/wpc_lamp.cpp
index a2d7a4713fa..d40bc033b03 100644
--- a/src/mame/machine/wpc_lamp.cpp
+++ b/src/mame/machine/wpc_lamp.cpp
@@ -4,7 +4,7 @@
#include "emu.h"
#include "wpc_lamp.h"
-const device_type WPC_LAMP = &device_creator<wpc_lamp_device>;
+const device_type WPC_LAMP = device_creator<wpc_lamp_device>;
wpc_lamp_device::wpc_lamp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, WPC_LAMP, "Williams Pinball Controller Lamp Control", tag, owner, clock, "wpc_lamp", __FILE__)
diff --git a/src/mame/machine/wpc_out.cpp b/src/mame/machine/wpc_out.cpp
index 67e02e1768e..1e5cb36f084 100644
--- a/src/mame/machine/wpc_out.cpp
+++ b/src/mame/machine/wpc_out.cpp
@@ -4,7 +4,7 @@
#include "emu.h"
#include "wpc_out.h"
-const device_type WPC_OUT = &device_creator<wpc_out_device>;
+const device_type WPC_OUT = device_creator<wpc_out_device>;
wpc_out_device::wpc_out_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, WPC_OUT, "Williams Pinball Controller Output Control", tag, owner, clock, "wpc_out", __FILE__)
diff --git a/src/mame/machine/wpc_pic.cpp b/src/mame/machine/wpc_pic.cpp
index c61d0b5213b..64ec9fbafb5 100644
--- a/src/mame/machine/wpc_pic.cpp
+++ b/src/mame/machine/wpc_pic.cpp
@@ -4,7 +4,7 @@
#include "emu.h"
#include "wpc_pic.h"
-const device_type WPC_PIC = &device_creator<wpc_pic_device>;
+const device_type WPC_PIC = device_creator<wpc_pic_device>;
wpc_pic_device::wpc_pic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, WPC_PIC, "Williams Pinball Controller PIC Security", tag, owner, clock, "wpc_pic", __FILE__),
diff --git a/src/mame/machine/wpc_shift.cpp b/src/mame/machine/wpc_shift.cpp
index cbd534dc12a..a8cfa7c853c 100644
--- a/src/mame/machine/wpc_shift.cpp
+++ b/src/mame/machine/wpc_shift.cpp
@@ -4,7 +4,7 @@
#include "emu.h"
#include "wpc_shift.h"
-const device_type WPC_SHIFT = &device_creator<wpc_shift_device>;
+const device_type WPC_SHIFT = device_creator<wpc_shift_device>;
wpc_shift_device::wpc_shift_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, WPC_SHIFT, "Williams Pinball Controller Shifter", tag, owner, clock, "wpc_shift", __FILE__)
diff --git a/src/mame/machine/x1.cpp b/src/mame/machine/x1.cpp
index cb724cd326f..71cdb6ff643 100644
--- a/src/mame/machine/x1.cpp
+++ b/src/mame/machine/x1.cpp
@@ -9,7 +9,7 @@
// LIVE DEVICE
//**************************************************************************
-const device_type X1_KEYBOARD = &device_creator<x1_keyboard_device>;
+const device_type X1_KEYBOARD = device_creator<x1_keyboard_device>;
//-------------------------------------------------
// z80ctc_device - constructor
diff --git a/src/mame/machine/x68k_hdc.cpp b/src/mame/machine/x68k_hdc.cpp
index cb8400b18e5..aee064627cb 100644
--- a/src/mame/machine/x68k_hdc.cpp
+++ b/src/mame/machine/x68k_hdc.cpp
@@ -22,7 +22,7 @@
#include "imagedev/harddriv.h"
#include "image.h"
-const device_type X68KHDC = &device_creator<x68k_hdc_image_device>;
+const device_type X68KHDC = device_creator<x68k_hdc_image_device>;
x68k_hdc_image_device::x68k_hdc_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, X68KHDC, "SASI Hard Disk", tag, owner, clock, "x68k_hdc_image", __FILE__),
diff --git a/src/mame/machine/x68k_kbd.cpp b/src/mame/machine/x68k_kbd.cpp
index 94c49450f87..7aa06e76a31 100644
--- a/src/mame/machine/x68k_kbd.cpp
+++ b/src/mame/machine/x68k_kbd.cpp
@@ -302,7 +302,7 @@ void x68k_keyboard_device::device_timer(emu_timer &timer, device_timer_id id, in
}
-const device_type X68K_KEYBOARD = &device_creator<x68k_keyboard_device>;
+const device_type X68K_KEYBOARD = device_creator<x68k_keyboard_device>;
#if 0
diff --git a/src/mame/machine/x820kb.cpp b/src/mame/machine/x820kb.cpp
index 569ce6270bb..e9f1b57f49d 100644
--- a/src/mame/machine/x820kb.cpp
+++ b/src/mame/machine/x820kb.cpp
@@ -57,7 +57,7 @@ Notes:
// DEVICE DEFINITIONS
//**************************************************************************
-const device_type XEROX_820_KEYBOARD = &device_creator<xerox_820_keyboard_t>;
+const device_type XEROX_820_KEYBOARD = device_creator<xerox_820_keyboard_t>;
//-------------------------------------------------
diff --git a/src/mame/machine/xbox.cpp b/src/mame/machine/xbox.cpp
index 753a1406c77..fa5b2e28f87 100644
--- a/src/mame/machine/xbox.cpp
+++ b/src/mame/machine/xbox.cpp
@@ -1,22 +1,20 @@
// license:BSD-3-Clause
// copyright-holders:Samuele Zannoli
-#include <functional>
-
#include "emu.h"
+#include "includes/xbox.h"
+
#include "cpu/i386/i386.h"
#include "machine/lpci.h"
-#include "machine/pic8259.h"
#include "machine/pit8253.h"
-#include "machine/idectrl.h"
-#include "video/poly.h"
-#include "bitmap.h"
-#include "debugger.h"
#include "debug/debugcon.h"
#include "debug/debugcmd.h"
-#include "includes/xbox_nv2a.h"
-#include "includes/xbox.h"
-#include "includes/xbox_usb.h"
+
+#include "debugger.h"
+
+#include "bitmap.h"
+
+#include <functional>
#define LOG_PCI
//#define LOG_AUDIO
diff --git a/src/mame/machine/xbox_usb.cpp b/src/mame/machine/xbox_usb.cpp
index 96d18b1f5bb..41356020862 100644
--- a/src/mame/machine/xbox_usb.cpp
+++ b/src/mame/machine/xbox_usb.cpp
@@ -2,13 +2,8 @@
// copyright-holders:Samuele Zannoli
#include "emu.h"
-#include "machine/pic8259.h"
-#include "machine/idectrl.h"
-#include "video/poly.h"
-#include "bitmap.h"
-#include "includes/xbox_nv2a.h"
-#include "includes/xbox.h"
#include "includes/xbox_usb.h"
+#include "includes/xbox.h"
//#define LOG_OHCI
@@ -43,7 +38,7 @@ static const char *const usbregnames[] = {
};
#endif
-const device_type OHCI_USB_CONTROLLER = &device_creator<ohci_usb_controller>;
+const device_type OHCI_USB_CONTROLLER = device_creator<ohci_usb_controller>;
ohci_usb_controller::ohci_usb_controller(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, OHCI_USB_CONTROLLER, "OHCI USB CONTROLLER", tag, owner, clock, "ohciusb", __FILE__),
@@ -1391,7 +1386,7 @@ const USBStandardInterfaceDescriptor ohci_game_controller_device::intdesc = { 9,
const USBStandardEndpointDescriptor ohci_game_controller_device::enddesc82 = { 7,5,0x82,3,0x20,4 };
const USBStandardEndpointDescriptor ohci_game_controller_device::enddesc02 = { 7,5,0x02,3,0x20,4 };
-const device_type OHCI_GAME_CONTROLLER = &device_creator<ohci_game_controller_device>;
+const device_type OHCI_GAME_CONTROLLER = device_creator<ohci_game_controller_device>;
ohci_game_controller_device::ohci_game_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, OHCI_GAME_CONTROLLER, "OHCI Game Controller", tag, owner, clock, "ohci_gc", __FILE__),
diff --git a/src/mame/machine/znmcu.cpp b/src/mame/machine/znmcu.cpp
index 3ef5f405388..8e4d1d8ba2c 100644
--- a/src/mame/machine/znmcu.cpp
+++ b/src/mame/machine/znmcu.cpp
@@ -3,7 +3,7 @@
#include "emu.h"
#include "znmcu.h"
-const device_type ZNMCU = &device_creator<znmcu_device>;
+const device_type ZNMCU = device_creator<znmcu_device>;
znmcu_device::znmcu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, ZNMCU, "Sony ZN MCU", tag, owner, clock, "znmcu", __FILE__),
diff --git a/src/mame/machine/zorbakbd.cpp b/src/mame/machine/zorbakbd.cpp
index d25636a8947..b0aa346a688 100644
--- a/src/mame/machine/zorbakbd.cpp
+++ b/src/mame/machine/zorbakbd.cpp
@@ -8,12 +8,12 @@
* switches are only read on startup. The row select outputs are
* decoded by a 74159 so only one row can be driven at a time.
*
- * The keyboard has an unpopulated PCB location for the DIP switches,
- * but they're unpopulated so all the switches are always off unless you
- * add them or solder in wire links. The keyclick/bell beeper also
- * appears to be unpopulated. The 300 Baud option is probably to allow
- * the MCU program to be used with other CP/M systems (e.g. Kaypro
- * expects this Baud rate).
+ * The keyboard has a PCB location for the DIP switches, but they're
+ * unpopulated so all the switches are always off unless you add them or
+ * solder in wire links. The keyclick/bell beeper also appears to be
+ * unpopulated. The 300 Baud option is probably to allow the same MCU
+ * program to be used with other CP/M systems (e.g. Kaypro expects this
+ * Baud rate).
*
* In addition to the asynchronous serial output, the program supports
* synchronous output. If enabled with DIP switches, characters are
@@ -74,6 +74,7 @@
#include "zorbakbd.h"
#include "cpu/m6805/m68705.h"
+#include "speaker.h"
namespace {
@@ -259,7 +260,7 @@ ROM_END
} // anonymous namespace
-device_type const ZORBA_KEYBOARD = &device_creator<zorba_keyboard_device>;
+device_type const ZORBA_KEYBOARD = device_creator<zorba_keyboard_device>;
zorba_keyboard_device::zorba_keyboard_device(
diff --git a/src/mame/machine/zs01.cpp b/src/mame/machine/zs01.cpp
index 1c2d60343e4..57d938939d3 100644
--- a/src/mame/machine/zs01.cpp
+++ b/src/mame/machine/zs01.cpp
@@ -28,7 +28,7 @@ inline void ATTR_PRINTF( 3, 4 ) zs01_device::verboselog( int n_level, const char
}
// device type definition
-const device_type ZS01 = &device_creator<zs01_device>;
+const device_type ZS01 = device_creator<zs01_device>;
zs01_device::zs01_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock )
: device_t( mconfig, ZS01, "Konami ZS01 PIC", tag, owner, clock, "zs01", __FILE__ ),
diff --git a/src/mame/machine/zx8302.cpp b/src/mame/machine/zx8302.cpp
index d7ae084ce7f..e4680ef865f 100644
--- a/src/mame/machine/zx8302.cpp
+++ b/src/mame/machine/zx8302.cpp
@@ -41,7 +41,7 @@ static const int RTC_BASE_ADJUST = 283996800;
// DEVICE DEFINITIONS
//**************************************************************************
-const device_type ZX8302 = &device_creator<zx8302_device>;
+const device_type ZX8302 = device_creator<zx8302_device>;
//**************************************************************************
// INLINE HELPERS