From 4498faacd93cbb7f204d1b47e5d12bd417cf43b3 Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Sun, 10 Jan 2010 00:29:26 +0000 Subject: First round of an attempted cleanup of header files in the system. - Created new central header "emu.h"; this should be included by pretty much any driver or device as the first include. This file in turn includes pretty much everything a driver or device will need, minus any other devices it references. Note that emu.h should *never* be included by another header file. - Updated all files in the core (src/emu) to use emu.h. - Removed a ton of redundant and poorly-tracked header includes from within other header files. - Temporarily changed driver.h to map to emu.h until we update files outside of the core. Added class wrapper around tagmap so it can be directly included and accessed within objects that need it. Updated all users to embed tagmap objects and changed them to call through the class. Added nicer functions for finding devices, ports, and regions in a machine: machine->device("tag") -- return the named device, or NULL machine->port("tag") -- return the named port, or NULL machine->region("tag"[, &length[, &flags]]) -- return the named region and optionally its length and flags Made the device tag an astring. This required touching a lot of code that printed the device to explicitly fetch the C-string from it. (Thank you gcc for flagging that issue!) --- src/emu/cpu/pdp1/pdp1.c | 1 + src/emu/cpu/pdp1/pdp1.h | 1 - src/emu/cpu/pdp1/pdp1dasm.c | 1 + src/emu/cpu/pdp1/tx0.c | 2 +- src/emu/cpu/pdp1/tx0.h | 1 - src/emu/cpu/pdp1/tx0dasm.c | 1 + 6 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src/emu/cpu/pdp1') diff --git a/src/emu/cpu/pdp1/pdp1.c b/src/emu/cpu/pdp1/pdp1.c index 10fbd995ed4..d326ad5cbc7 100644 --- a/src/emu/cpu/pdp1/pdp1.c +++ b/src/emu/cpu/pdp1/pdp1.c @@ -335,6 +335,7 @@ */ +#include "emu.h" #include "debugger.h" #include "pdp1.h" diff --git a/src/emu/cpu/pdp1/pdp1.h b/src/emu/cpu/pdp1/pdp1.h index 1a33984bc51..444f2b49b6e 100644 --- a/src/emu/cpu/pdp1/pdp1.h +++ b/src/emu/cpu/pdp1/pdp1.h @@ -3,7 +3,6 @@ #ifndef __PDP1_H__ #define __PDP1_H__ -#include "cpuintrf.h" /* register ids for pdp1_get_reg/pdp1_set_reg */ diff --git a/src/emu/cpu/pdp1/pdp1dasm.c b/src/emu/cpu/pdp1/pdp1dasm.c index bcb0dc604be..bd86e130db4 100644 --- a/src/emu/cpu/pdp1/pdp1dasm.c +++ b/src/emu/cpu/pdp1/pdp1dasm.c @@ -1,5 +1,6 @@ #include #include +#include "emu.h" #include "cpu/pdp1/pdp1.h" /* PDP1 registers */ diff --git a/src/emu/cpu/pdp1/tx0.c b/src/emu/cpu/pdp1/tx0.c index 1c068ad9995..1cf80902857 100644 --- a/src/emu/cpu/pdp1/tx0.c +++ b/src/emu/cpu/pdp1/tx0.c @@ -8,7 +8,7 @@ Raphael Nabet 2004 */ -#include "cpuintrf.h" +#include "emu.h" #include "debugger.h" #include "tx0.h" diff --git a/src/emu/cpu/pdp1/tx0.h b/src/emu/cpu/pdp1/tx0.h index 1db1fc64932..df1c5ed9227 100644 --- a/src/emu/cpu/pdp1/tx0.h +++ b/src/emu/cpu/pdp1/tx0.h @@ -3,7 +3,6 @@ #ifndef __TX0_H__ #define __TX0_H__ -#include "cpuintrf.h" /* register ids for tx0_get_reg/tx0_set_reg */ diff --git a/src/emu/cpu/pdp1/tx0dasm.c b/src/emu/cpu/pdp1/tx0dasm.c index 08bf935e4fd..6d50c24a4ed 100644 --- a/src/emu/cpu/pdp1/tx0dasm.c +++ b/src/emu/cpu/pdp1/tx0dasm.c @@ -1,5 +1,6 @@ #include #include +#include "emu.h" #include "cpu/pdp1/tx0.h" CPU_DISASSEMBLE( tx0_64kw ) -- cgit v1.2.3-70-g09d2