From 2971f4cdbf411e256a102d1c3b7dea9db8e7f288 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Tue, 3 Jul 2018 04:05:39 +1000 Subject: emu.h must be the first thing in a compilation unit and nowhere else, or behaviour becomes inconsistent between MSVC and GCC due to how pre-compiled headers are handled in MAME (nw) --- src/mame/drivers/apexc.cpp | 1 + src/mame/drivers/pgm2.cpp | 1 + src/mame/includes/apexc.h | 1 - src/mame/includes/pgm2.h | 5 ++--- src/mame/includes/poly.h | 1 - src/mame/machine/apexc.cpp | 1 + src/mame/machine/apexc.h | 15 ++------------- src/mame/machine/iopdma.cpp | 1 + src/mame/machine/iopdma.h | 3 +-- src/mame/machine/ioptimer.cpp | 1 + src/mame/machine/ioptimer.h | 3 +-- src/mame/machine/ps2timer.cpp | 1 + src/mame/video/apexc.cpp | 1 + src/mame/video/pgm2.cpp | 1 + 14 files changed, 14 insertions(+), 22 deletions(-) diff --git a/src/mame/drivers/apexc.cpp b/src/mame/drivers/apexc.cpp index d039f50277e..fd984fcfb12 100644 --- a/src/mame/drivers/apexc.cpp +++ b/src/mame/drivers/apexc.cpp @@ -8,6 +8,7 @@ see cpu/apexc.c for background and tech info */ +#include "emu.h" #include "includes/apexc.h" /*static*/ const device_timer_id apexc_state::TIMER_POLL_INPUTS = 1; diff --git a/src/mame/drivers/pgm2.cpp b/src/mame/drivers/pgm2.cpp index bef6200e211..8f57ccbbfa6 100644 --- a/src/mame/drivers/pgm2.cpp +++ b/src/mame/drivers/pgm2.cpp @@ -91,6 +91,7 @@ */ +#include "emu.h" #include "includes/pgm2.h" // checked on startup, or doesn't boot diff --git a/src/mame/includes/apexc.h b/src/mame/includes/apexc.h index b7af1e75294..f6e938c7f8b 100644 --- a/src/mame/includes/apexc.h +++ b/src/mame/includes/apexc.h @@ -6,7 +6,6 @@ #pragma once -#include "emu.h" #include "cpu/apexc/apexc.h" #include "machine/apexc.h" #include "emupal.h" diff --git a/src/mame/includes/pgm2.h b/src/mame/includes/pgm2.h index 4658367dcf5..a3fbbcc6d33 100644 --- a/src/mame/includes/pgm2.h +++ b/src/mame/includes/pgm2.h @@ -6,7 +6,6 @@ #pragma once -#include "emu.h" #include "cpu/arm7/arm7.h" #include "cpu/arm7/arm7core.h" #include "sound/ymz770.h" @@ -30,8 +29,8 @@ struct kov3_module_key class pgm2_state : public driver_device { public: - pgm2_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), + pgm2_state(const machine_config &mconfig, device_type type, const char *tag) : + driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), m_screen(*this, "screen"), m_lineram(*this, "lineram"), diff --git a/src/mame/includes/poly.h b/src/mame/includes/poly.h index bbffab7b96a..bdf38bcc5e4 100644 --- a/src/mame/includes/poly.h +++ b/src/mame/includes/poly.h @@ -33,7 +33,6 @@ #ifndef MAME_INCLUDES_POLY_H #define MAME_INCLUDES_POLY_H -#include "emu.h" #include "cpu/m6809/m6809.h" #include "machine/6821pia.h" #include "machine/6840ptm.h" diff --git a/src/mame/machine/apexc.cpp b/src/mame/machine/apexc.cpp index c36d2daf980..e5b2b5a0f2f 100644 --- a/src/mame/machine/apexc.cpp +++ b/src/mame/machine/apexc.cpp @@ -8,6 +8,7 @@ see cpu/apexc.c for background and tech info */ +#include "emu.h" #include "machine/apexc.h" DEFINE_DEVICE_TYPE(APEXC_CYLINDER, apexc_cylinder_image_device, "apexc_cylinder_image", "APEXC Cylinder") diff --git a/src/mame/machine/apexc.h b/src/mame/machine/apexc.h index 7a46c76ad34..8d1d9587a2d 100644 --- a/src/mame/machine/apexc.h +++ b/src/mame/machine/apexc.h @@ -13,7 +13,6 @@ #pragma once -#include "emu.h" /* APEXC RAM loading/saving from cylinder image @@ -30,12 +29,7 @@ class apexc_cylinder_image_device : public device_t, public device_image_interfa { public: // construction/destruction - apexc_cylinder_image_device(const machine_config &mconfig, const char *tag, device_t *owner) - : apexc_cylinder_image_device(mconfig, tag, owner, (uint32_t)0) - { - } - - apexc_cylinder_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + apexc_cylinder_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); // image-level overrides virtual iodevice_t image_type() const override { return IO_CYLINDER; } @@ -105,12 +99,7 @@ class apexc_tape_puncher_image_device : public device_t, public device_image_int { public: // construction/destruction - apexc_tape_puncher_image_device(const machine_config &mconfig, const char *tag, device_t *owner) - : apexc_tape_puncher_image_device(mconfig, tag, owner, (uint32_t)0) - { - } - - apexc_tape_puncher_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + apexc_tape_puncher_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); // image-level overrides virtual iodevice_t image_type() const override { return IO_PUNCHTAPE; } diff --git a/src/mame/machine/iopdma.cpp b/src/mame/machine/iopdma.cpp index 552b2148f45..dbf1374cd01 100644 --- a/src/mame/machine/iopdma.cpp +++ b/src/mame/machine/iopdma.cpp @@ -9,6 +9,7 @@ * */ +#include "emu.h" #include "iopdma.h" DEFINE_DEVICE_TYPE(SONYIOP_DMA, iop_dma_device, "iopdma", "Sony IOP DMA") diff --git a/src/mame/machine/iopdma.h b/src/mame/machine/iopdma.h index f199e75df05..d39c3f88160 100644 --- a/src/mame/machine/iopdma.h +++ b/src/mame/machine/iopdma.h @@ -14,7 +14,6 @@ #pragma once -#include "emu.h" class iop_dma_device : public device_t { @@ -55,4 +54,4 @@ protected: DECLARE_DEVICE_TYPE(SONYIOP_DMA, iop_dma_device) -#endif // MAME_MACHINE_IOPDMA_H \ No newline at end of file +#endif // MAME_MACHINE_IOPDMA_H diff --git a/src/mame/machine/ioptimer.cpp b/src/mame/machine/ioptimer.cpp index 13246ae72f7..244797d7b41 100644 --- a/src/mame/machine/ioptimer.cpp +++ b/src/mame/machine/ioptimer.cpp @@ -9,6 +9,7 @@ * */ +#include "emu.h" #include "ioptimer.h" DEFINE_DEVICE_TYPE(SONYIOP_TIMER, iop_timer_device, "ioptimer", "Sony IOP Timer") diff --git a/src/mame/machine/ioptimer.h b/src/mame/machine/ioptimer.h index 34137c2eab6..e3a45ca2a0b 100644 --- a/src/mame/machine/ioptimer.h +++ b/src/mame/machine/ioptimer.h @@ -14,7 +14,6 @@ #pragma once -#include "emu.h" #define MCFG_IOP_TIMER_IRQ_CALLBACK(_write) \ devcb = &downcast(*device).set_int_cb(DEVCB_##_write); @@ -97,4 +96,4 @@ protected: DECLARE_DEVICE_TYPE(SONYIOP_TIMER, iop_timer_device) -#endif // MAME_MACHINE_IOPTIMER_H \ No newline at end of file +#endif // MAME_MACHINE_IOPTIMER_H diff --git a/src/mame/machine/ps2timer.cpp b/src/mame/machine/ps2timer.cpp index ec3d6bb5f37..01820d203c7 100644 --- a/src/mame/machine/ps2timer.cpp +++ b/src/mame/machine/ps2timer.cpp @@ -9,6 +9,7 @@ * */ +#include "emu.h" #include "ps2timer.h" DEFINE_DEVICE_TYPE(SONYPS2_TIMER, ps2_timer_device, "ps2timer", "EE Core Timer") diff --git a/src/mame/video/apexc.cpp b/src/mame/video/apexc.cpp index 3e14657b9e3..5e933a25519 100644 --- a/src/mame/video/apexc.cpp +++ b/src/mame/video/apexc.cpp @@ -8,6 +8,7 @@ Additionally, We display one page of teletyper output. */ +#include "emu.h" #include "includes/apexc.h" /*static*/ const rgb_t apexc_state::palette_table[] = diff --git a/src/mame/video/pgm2.cpp b/src/mame/video/pgm2.cpp index 563594fbd2f..081a730668e 100644 --- a/src/mame/video/pgm2.cpp +++ b/src/mame/video/pgm2.cpp @@ -1,6 +1,7 @@ // license:BSD-3-Clause // copyright-holders:David Haywood +#include "emu.h" #include "includes/pgm2.h" inline void pgm2_state::draw_sprite_pixel(const rectangle &cliprect, int palette_offset, int realx, int realy, int pal) -- cgit v1.2.3