From a910dafd37ea14c420db197579eb9bd4fe440950 Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Thu, 1 May 2008 13:52:28 +0000 Subject: From: Atari Ace [mailto:atari_ace@verizon.net] Subject: [patch] Small deprecat.h related cleanup Hi mamedev, While doing some work on eliminating some uses of deprecat.h, I came across a few files that didn't have it that used deprecated features. A little investigation revealed they were getting it through debugger.h, typically by referencing m68000.h. Since deprecat.h is intended to document the files that need updating (otherwise it would just be included in a common header), I reworked debugger.h to not import it when the debugger is not enabled, and fixed the files that broke as a result. ~aa --- src/emu/cpu/g65816/g65816op.h | 2 ++ src/emu/cpu/m37710/m37710.c | 1 + src/emu/cpu/m6502/m6502.c | 1 + src/emu/cpu/m6502/m6509.c | 1 + src/emu/cpu/m68000/m68kcpu.c | 2 ++ src/emu/cpu/powerpc/ppc403.c | 2 +- src/emu/debugger.h | 2 ++ src/emu/deprecat.h | 1 + src/mame/drivers/armedf.c | 1 + src/mame/drivers/cps2.c | 1 + src/mame/drivers/fcrash.c | 1 + src/mame/drivers/gaelco2.c | 1 + src/mame/drivers/targeth.c | 1 + src/mame/drivers/xorworld.c | 1 + src/mame/machine/s24fd.c | 1 + 15 files changed, 18 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/emu/cpu/g65816/g65816op.h b/src/emu/cpu/g65816/g65816op.h index 173da329bd2..e71e4958846 100644 --- a/src/emu/cpu/g65816/g65816op.h +++ b/src/emu/cpu/g65816/g65816op.h @@ -1,3 +1,5 @@ +#include "deprecat.h" + /* ======================================================================== */ /* ============================= CONFIGURATION ============================ */ /* ======================================================================== */ diff --git a/src/emu/cpu/m37710/m37710.c b/src/emu/cpu/m37710/m37710.c index 795d27f0654..24389699816 100644 --- a/src/emu/cpu/m37710/m37710.c +++ b/src/emu/cpu/m37710/m37710.c @@ -51,6 +51,7 @@ added save state support. */ +#include "deprecat.h" #include "debugger.h" #include "m37710cm.h" diff --git a/src/emu/cpu/m6502/m6502.c b/src/emu/cpu/m6502/m6502.c index 10bfcee86b9..a2711726824 100644 --- a/src/emu/cpu/m6502/m6502.c +++ b/src/emu/cpu/m6502/m6502.c @@ -29,6 +29,7 @@ #define HAS_M65C02 1 #endif +#include "deprecat.h" #include "debugger.h" #include "m6502.h" #include "ops02.h" diff --git a/src/emu/cpu/m6502/m6509.c b/src/emu/cpu/m6502/m6509.c index ba811d203ec..fc4e026d54a 100644 --- a/src/emu/cpu/m6502/m6509.c +++ b/src/emu/cpu/m6502/m6509.c @@ -37,6 +37,7 @@ addresses take place. */ +#include "deprecat.h" #include "debugger.h" #include "m6509.h" diff --git a/src/emu/cpu/m68000/m68kcpu.c b/src/emu/cpu/m68000/m68kcpu.c index 6e1f08c10d1..77089aa4522 100644 --- a/src/emu/cpu/m68000/m68kcpu.c +++ b/src/emu/cpu/m68000/m68kcpu.c @@ -972,6 +972,8 @@ void m68k_set_context(void* src) #if M68K_COMPILE_FOR_MAME == OPT_ON +#include "deprecat.h" + static struct { UINT16 sr; UINT8 stopped; diff --git a/src/emu/cpu/powerpc/ppc403.c b/src/emu/cpu/powerpc/ppc403.c index 3dedb4f7c7f..5bfaac3dd90 100644 --- a/src/emu/cpu/powerpc/ppc403.c +++ b/src/emu/cpu/powerpc/ppc403.c @@ -678,7 +678,7 @@ static void ppc403_spu_w(UINT32 a, UINT8 d) case 0x9: ppc.spu.sptb = d; - ppc403_spu_tx_callback(Machine, NULL, cpu_getactivecpu()); + ppc403_spu_tx_callback(NULL/* Machine */, NULL, cpu_getactivecpu()); break; default: diff --git a/src/emu/debugger.h b/src/emu/debugger.h index 02c345763bf..513c6eb613f 100644 --- a/src/emu/debugger.h +++ b/src/emu/debugger.h @@ -16,7 +16,9 @@ #include "mame.h" #include "memory.h" +#ifdef ENABLE_DEBUGGER #include "deprecat.h" +#endif /*************************************************************************** diff --git a/src/emu/deprecat.h b/src/emu/deprecat.h index e01b74676ad..17a75cede01 100644 --- a/src/emu/deprecat.h +++ b/src/emu/deprecat.h @@ -15,6 +15,7 @@ #ifndef __DEPRECAT_H__ #define __DEPRECAT_H__ +#include "mamecore.h" /************************************* diff --git a/src/mame/drivers/armedf.c b/src/mame/drivers/armedf.c index 0f64832582f..4af69f3a491 100644 --- a/src/mame/drivers/armedf.c +++ b/src/mame/drivers/armedf.c @@ -152,6 +152,7 @@ Stephh's notes (based on the games M68000 code and some tests) : */ #include "driver.h" +#include "deprecat.h" #include "cpu/m68000/m68000.h" #include "cpu/z80/z80.h" #include "sound/dac.h" diff --git a/src/mame/drivers/cps2.c b/src/mame/drivers/cps2.c index 8f7da41d938..7923669cd45 100644 --- a/src/mame/drivers/cps2.c +++ b/src/mame/drivers/cps2.c @@ -584,6 +584,7 @@ Stephh's inputs notes (based on some tests on the "parent" set) : ***************************************************************************/ #include "driver.h" +#include "deprecat.h" #include "machine/eeprom.h" #include "cpu/m68000/m68000.h" #include "sound/qsound.h" diff --git a/src/mame/drivers/fcrash.c b/src/mame/drivers/fcrash.c index acff91f2ea2..f5c7c878665 100644 --- a/src/mame/drivers/fcrash.c +++ b/src/mame/drivers/fcrash.c @@ -33,6 +33,7 @@ from 2.bin to 9.bin program eproms */ #include "driver.h" +#include "deprecat.h" #include "cpu/m68000/m68kmame.h" #include "cps1.h" #include "sound/2203intf.h" diff --git a/src/mame/drivers/gaelco2.c b/src/mame/drivers/gaelco2.c index 8c295d891d5..8492500bb5d 100644 --- a/src/mame/drivers/gaelco2.c +++ b/src/mame/drivers/gaelco2.c @@ -19,6 +19,7 @@ ***************************************************************************/ #include "driver.h" +#include "deprecat.h" #include "cpu/m68000/m68000.h" #include "sound/gaelco.h" #include "rendlay.h" diff --git a/src/mame/drivers/targeth.c b/src/mame/drivers/targeth.c index 48cd45dfc33..417f75e1798 100644 --- a/src/mame/drivers/targeth.c +++ b/src/mame/drivers/targeth.c @@ -9,6 +9,7 @@ The DS5002FP has 32KB undumped gameplay code making the game unplayable :_( ***************************************************************************/ #include "driver.h" +#include "deprecat.h" #include "cpu/m68000/m68000.h" #include "sound/okim6295.h" diff --git a/src/mame/drivers/xorworld.c b/src/mame/drivers/xorworld.c index 4488294871d..dffd6043e0d 100644 --- a/src/mame/drivers/xorworld.c +++ b/src/mame/drivers/xorworld.c @@ -31,6 +31,7 @@ EEPROM chip: 93C46 ***************************************************************************/ #include "driver.h" +#include "deprecat.h" #include "machine/eeprom.h" #include "cpu/m68000/m68000.h" #include "sound/saa1099.h" diff --git a/src/mame/machine/s24fd.c b/src/mame/machine/s24fd.c index e87300bf0a2..5aa014dae70 100644 --- a/src/mame/machine/s24fd.c +++ b/src/mame/machine/s24fd.c @@ -6,6 +6,7 @@ this could get messy if games change their own code after initial loading as we' */ #include "driver.h" +#include "deprecat.h" #include "cpu/m68000/m68000.h" #include "machine/fd1094.h" -- cgit v1.2.3