diff options
author | 2008-09-04 08:55:01 +0000 | |
---|---|---|
committer | 2008-09-04 08:55:01 +0000 | |
commit | cffe2010943845358cf44ae1c4b1f5dc55e845ae (patch) | |
tree | 8b2e8f0bac8eb33dba922065284e6fb64bd387e6 /src | |
parent | c1f0164f5d02bf60dce10b58503bd2fea2cec951 (diff) |
From Oliver Stoeneberg [oliverst@online.de]
This contains three different patches:
20080829.patch
Introducing the running_machine* parameter in a few more places. Next
step would be to make the execute_* function aware of it, if that's
OK. Also used the machine parameter in memory.c were it's available.
20080829_1.patch
The already discussed and probably being rejected removal of
dreprecat.h from debugger.h. I think this is a low-risk patch (we had
worse cleanups) and it lowers the risk of new code using deprecated
function beign introduced in MAME/MESS, because there is no invisible
inclusion of deprecat.h anymore (I think one driver - kofball.c - got
it with deprecated code).
20080829_2.patch
The last Machine -> machine conversion I had sitting in my local
tree. I know the proper way is to turn them into devices, but I still
haven't looked into that.
Diffstat (limited to 'src')
85 files changed, 273 insertions, 212 deletions
diff --git a/src/emu/cpu/adsp2100/adsp2100.c b/src/emu/cpu/adsp2100/adsp2100.c index 2ed147634c5..aae6ce1b8ed 100644 --- a/src/emu/cpu/adsp2100/adsp2100.c +++ b/src/emu/cpu/adsp2100/adsp2100.c @@ -96,6 +96,7 @@ ***************************************************************************/ #include "debugger.h" +#include "deprecat.h" #include "adsp2100.h" #include <stddef.h> diff --git a/src/emu/cpu/alph8201/alph8201.c b/src/emu/cpu/alph8201/alph8201.c index 955f02ec79e..4360a10a8a8 100644 --- a/src/emu/cpu/alph8201/alph8201.c +++ b/src/emu/cpu/alph8201/alph8201.c @@ -148,6 +148,7 @@ Timming ****************************************************************************/ #include "debugger.h" +#include "deprecat.h" #include "alph8201.h" /* instruction cycle count */ diff --git a/src/emu/cpu/apexc/apexc.c b/src/emu/cpu/apexc/apexc.c index 286341314ae..8eab48f992f 100644 --- a/src/emu/cpu/apexc/apexc.c +++ b/src/emu/cpu/apexc/apexc.c @@ -325,6 +325,7 @@ field: X address D Function Y address D (part 2) #include "cpuintrf.h" #include "debugger.h" +#include "deprecat.h" #include "apexc.h" typedef struct diff --git a/src/emu/cpu/arm/arm.c b/src/emu/cpu/arm/arm.c index 4be8b399915..b219a3c59ea 100644 --- a/src/emu/cpu/arm/arm.c +++ b/src/emu/cpu/arm/arm.c @@ -17,6 +17,7 @@ #include "arm.h" #include "debugger.h" +#include "deprecat.h" #define READ8(addr) cpu_read8(addr) #define WRITE8(addr,data) cpu_write8(addr,data) diff --git a/src/emu/cpu/asap/asap.c b/src/emu/cpu/asap/asap.c index eb2e8cdbe25..a6ba2c99604 100644 --- a/src/emu/cpu/asap/asap.c +++ b/src/emu/cpu/asap/asap.c @@ -10,6 +10,7 @@ ***************************************************************************/ #include "debugger.h" +#include "deprecat.h" #include "asap.h" diff --git a/src/emu/cpu/ccpu/ccpu.c b/src/emu/cpu/ccpu/ccpu.c index a86596d4d59..bba11dd5918 100644 --- a/src/emu/cpu/ccpu/ccpu.c +++ b/src/emu/cpu/ccpu/ccpu.c @@ -9,6 +9,7 @@ ***************************************************************************/ #include "debugger.h" +#include "deprecat.h" #include "ccpu.h" diff --git a/src/emu/cpu/cop400/cop410.c b/src/emu/cpu/cop400/cop410.c index ed44f4dbb04..34cf8deb6f1 100644 --- a/src/emu/cpu/cop400/cop410.c +++ b/src/emu/cpu/cop400/cop410.c @@ -23,6 +23,7 @@ #include "driver.h" #include "cpuintrf.h" #include "debugger.h" +#include "deprecat.h" #include "cop400.h" /* The opcode table now is a combination of cycle counts and function pointers */ diff --git a/src/emu/cpu/cop400/cop420.c b/src/emu/cpu/cop400/cop420.c index 8ae93af0633..a618db11ed0 100644 --- a/src/emu/cpu/cop400/cop420.c +++ b/src/emu/cpu/cop400/cop420.c @@ -26,6 +26,7 @@ #include "cpuintrf.h" #include "debugger.h" +#include "deprecat.h" #include "cop400.h" /* The opcode table now is a combination of cycle counts and function pointers */ diff --git a/src/emu/cpu/drcbec.c b/src/emu/cpu/drcbec.c index 2bce6fc9c10..e8e1e8257b9 100644 --- a/src/emu/cpu/drcbec.c +++ b/src/emu/cpu/drcbec.c @@ -14,6 +14,7 @@ #include "drcbeut.h" #include "eminline.h" #include "debugger.h" +#include "deprecat.h" #include <math.h> #ifdef _MSC_VER diff --git a/src/emu/cpu/drcbex86.c b/src/emu/cpu/drcbex86.c index c6d790fa834..534a0184c1a 100644 --- a/src/emu/cpu/drcbex86.c +++ b/src/emu/cpu/drcbex86.c @@ -89,6 +89,7 @@ #include "drcuml.h" #include "drcbeut.h" #include "debugger.h" +#include "deprecat.h" #include "x86emit.h" #include "eminline.h" #undef REG_SP diff --git a/src/emu/cpu/dsp32/dsp32.c b/src/emu/cpu/dsp32/dsp32.c index cc89497034f..e26815276a3 100644 --- a/src/emu/cpu/dsp32/dsp32.c +++ b/src/emu/cpu/dsp32/dsp32.c @@ -28,6 +28,7 @@ ***************************************************************************/ #include "debugger.h" +#include "deprecat.h" #include "dsp32.h" diff --git a/src/emu/cpu/dsp56k/dsp56k.c b/src/emu/cpu/dsp56k/dsp56k.c index 15bfa4e8bb1..80fdd022b3f 100644 --- a/src/emu/cpu/dsp56k/dsp56k.c +++ b/src/emu/cpu/dsp56k/dsp56k.c @@ -30,6 +30,7 @@ ***************************************************************************/ #include "debugger.h" +#include "deprecat.h" #include "dsp56k.h" #include "dsp56def.h" diff --git a/src/emu/cpu/e132xs/e132xs.c b/src/emu/cpu/e132xs/e132xs.c index b5d882a2956..6fd4d5b9918 100644 --- a/src/emu/cpu/e132xs/e132xs.c +++ b/src/emu/cpu/e132xs/e132xs.c @@ -212,6 +212,7 @@ *********************************************************************/ #include "debugger.h" +#include "deprecat.h" #include "eminline.h" #include "e132xs.h" #include "osd_cpu.h" diff --git a/src/emu/cpu/f8/f8.c b/src/emu/cpu/f8/f8.c index 67a76c73b91..f2a0c858fe3 100644 --- a/src/emu/cpu/f8/f8.c +++ b/src/emu/cpu/f8/f8.c @@ -27,6 +27,7 @@ */ #include "debugger.h" +#include "deprecat.h" #include "f8.h" #define S 0x01 diff --git a/src/emu/cpu/g65816/g65816.h b/src/emu/cpu/g65816/g65816.h index 8dbed092954..cfd6c258758 100644 --- a/src/emu/cpu/g65816/g65816.h +++ b/src/emu/cpu/g65816/g65816.h @@ -81,6 +81,7 @@ void g65816_branching(unsigned int new_pc); #include "cpuintrf.h" #include "debugger.h" +#include "deprecat.h" enum { diff --git a/src/emu/cpu/h6280/h6280.c b/src/emu/cpu/h6280/h6280.c index dd25d952272..8335548aca8 100644 --- a/src/emu/cpu/h6280/h6280.c +++ b/src/emu/cpu/h6280/h6280.c @@ -108,6 +108,7 @@ ******************************************************************************/ #include "debugger.h" +#include "deprecat.h" #include "h6280.h" static int h6280_ICount = 0; diff --git a/src/emu/cpu/i8085/i8085.c b/src/emu/cpu/i8085/i8085.c index 1f2b11a7090..db53313893a 100644 --- a/src/emu/cpu/i8085/i8085.c +++ b/src/emu/cpu/i8085/i8085.c @@ -125,6 +125,7 @@ /*int survival_prot = 0; */ #include "debugger.h" +#include "deprecat.h" #include "i8085.h" #include "i8085cpu.h" #include "i8085daa.h" diff --git a/src/emu/cpu/i86/i286.c b/src/emu/cpu/i86/i286.c index a79f50702fa..b0e1b71fb84 100644 --- a/src/emu/cpu/i86/i286.c +++ b/src/emu/cpu/i86/i286.c @@ -4,6 +4,7 @@ ****************************************************************************/ #include "debugger.h" +#include "deprecat.h" #include "host.h" diff --git a/src/emu/cpu/i86/i86.c b/src/emu/cpu/i86/i86.c index 2b992c5d4c4..c99c86a67aa 100644 --- a/src/emu/cpu/i86/i86.c +++ b/src/emu/cpu/i86/i86.c @@ -5,6 +5,7 @@ /* 26.March 2000 PeT changed set_irq_line */ #include "debugger.h" +#include "deprecat.h" #include "cpuintrf.h" #include "host.h" diff --git a/src/emu/cpu/i8x41/i8x41.c b/src/emu/cpu/i8x41/i8x41.c index f4740359027..c49fcfe9e8f 100644 --- a/src/emu/cpu/i8x41/i8x41.c +++ b/src/emu/cpu/i8x41/i8x41.c @@ -103,6 +103,7 @@ *****************************************************************************/ #include "debugger.h" +#include "deprecat.h" #include "i8x41.h" typedef struct { diff --git a/src/emu/cpu/i960/i960.c b/src/emu/cpu/i960/i960.c index 13cd6188d88..ae9e64793bd 100644 --- a/src/emu/cpu/i960/i960.c +++ b/src/emu/cpu/i960/i960.c @@ -1,4 +1,5 @@ #include "debugger.h" +#include "deprecat.h" #include "i960.h" #include "i960dis.h" #include <math.h> diff --git a/src/emu/cpu/konami/konami.c b/src/emu/cpu/konami/konami.c index 1cc2a0c06fb..a9107848c7d 100644 --- a/src/emu/cpu/konami/konami.c +++ b/src/emu/cpu/konami/konami.c @@ -35,6 +35,7 @@ *****************************************************************************/ #include "debugger.h" +#include "deprecat.h" #include "konami.h" #define VERBOSE 0 diff --git a/src/emu/cpu/lh5801/lh5801.c b/src/emu/cpu/lh5801/lh5801.c index 80806254c07..dd000780c1e 100644 --- a/src/emu/cpu/lh5801/lh5801.c +++ b/src/emu/cpu/lh5801/lh5801.c @@ -18,6 +18,7 @@ * *****************************************************************************/ #include "debugger.h" +#include "deprecat.h" #include "lh5801.h" diff --git a/src/emu/cpu/lr35902/lr35902.c b/src/emu/cpu/lr35902/lr35902.c index fc9143313d2..4f189361e9c 100644 --- a/src/emu/cpu/lr35902/lr35902.c +++ b/src/emu/cpu/lr35902/lr35902.c @@ -37,6 +37,7 @@ /** **/ /*************************************************************/ #include "debugger.h" +#include "deprecat.h" #include "lr35902.h" #define FLAG_Z 0x80 diff --git a/src/emu/cpu/m37710/m37710op.h b/src/emu/cpu/m37710/m37710op.h index fa97ee7f4db..3ab778825fc 100644 --- a/src/emu/cpu/m37710/m37710op.h +++ b/src/emu/cpu/m37710/m37710op.h @@ -2,6 +2,7 @@ /* ============================= CONFIGURATION ============================ */ /* ======================================================================== */ +#include "deprecat.h" #undef FLAG_SET_M #undef FLAG_SET_X diff --git a/src/emu/cpu/m6502/m4510.c b/src/emu/cpu/m6502/m4510.c index e3078b6d0ca..29db50565a2 100644 --- a/src/emu/cpu/m6502/m4510.c +++ b/src/emu/cpu/m6502/m4510.c @@ -101,6 +101,7 @@ z: xxxx address bits a19 .. a16 for memory accesses with a15 1 ? */ #include "debugger.h" +#include "deprecat.h" #include "m6502.h" #include "m4510.h" diff --git a/src/emu/cpu/m6502/m6502.c b/src/emu/cpu/m6502/m6502.c index a1a341a3fd3..2f346c42a32 100644 --- a/src/emu/cpu/m6502/m6502.c +++ b/src/emu/cpu/m6502/m6502.c @@ -30,6 +30,7 @@ #endif #include "debugger.h" +#include "deprecat.h" #include "m6502.h" #include "ops02.h" #include "ill02.h" diff --git a/src/emu/cpu/m6502/m6509.c b/src/emu/cpu/m6502/m6509.c index fac40436cce..6f3a2af9f65 100644 --- a/src/emu/cpu/m6502/m6509.c +++ b/src/emu/cpu/m6502/m6509.c @@ -38,6 +38,7 @@ addresses take place. */ #include "debugger.h" +#include "deprecat.h" #include "m6509.h" #include "ops02.h" diff --git a/src/emu/cpu/m6502/m65ce02.c b/src/emu/cpu/m6502/m65ce02.c index 1acea42d01d..821719399ac 100644 --- a/src/emu/cpu/m6502/m65ce02.c +++ b/src/emu/cpu/m6502/m65ce02.c @@ -38,6 +38,7 @@ */ #include "debugger.h" +#include "deprecat.h" #include "m65ce02.h" #include "mincce02.h" diff --git a/src/emu/cpu/m6800/m6800.c b/src/emu/cpu/m6800/m6800.c index c87f4ff11d8..0c7a4d3931c 100644 --- a/src/emu/cpu/m6800/m6800.c +++ b/src/emu/cpu/m6800/m6800.c @@ -74,6 +74,7 @@ TODO: */ #include "debugger.h" +#include "deprecat.h" #include "m6800.h" #define VERBOSE 0 diff --git a/src/emu/cpu/m68000/m68kmame.h b/src/emu/cpu/m68000/m68kmame.h index 6e690eaffce..0d9425f302f 100644 --- a/src/emu/cpu/m68000/m68kmame.h +++ b/src/emu/cpu/m68000/m68kmame.h @@ -8,6 +8,7 @@ /* ======================================================================== */ #include "debugger.h" +#include "deprecat.h" #include "m68000.h" /* Configuration switches (see m68kconf.h for explanation) */ diff --git a/src/emu/cpu/m6805/m6805.c b/src/emu/cpu/m6805/m6805.c index 74c1d7ff044..eed7e3c976d 100644 --- a/src/emu/cpu/m6805/m6805.c +++ b/src/emu/cpu/m6805/m6805.c @@ -32,6 +32,7 @@ #include "debugger.h" +#include "deprecat.h" #include "m6805.h" #define IRQ_LEVEL_DETECT 0 diff --git a/src/emu/cpu/m6809/m6809.c b/src/emu/cpu/m6809/m6809.c index 4dfc0f4f2e7..33616c1f4d9 100644 --- a/src/emu/cpu/m6809/m6809.c +++ b/src/emu/cpu/m6809/m6809.c @@ -71,6 +71,7 @@ *****************************************************************************/ #include "debugger.h" +#include "deprecat.h" #include "m6809.h" /* Enable big switch statement for the main opcodes */ diff --git a/src/emu/cpu/mb86233/mb86233.c b/src/emu/cpu/mb86233/mb86233.c index 26a8eeac274..64f88609a4f 100644 --- a/src/emu/cpu/mb86233/mb86233.c +++ b/src/emu/cpu/mb86233/mb86233.c @@ -15,6 +15,7 @@ #include "mb86233.h" #include "debugger.h" +#include "deprecat.h" /*************************************************************************** STRUCTURES & TYPEDEFS diff --git a/src/emu/cpu/mb88xx/mb88xx.c b/src/emu/cpu/mb88xx/mb88xx.c index 0b15818bdea..a74e911174f 100644 --- a/src/emu/cpu/mb88xx/mb88xx.c +++ b/src/emu/cpu/mb88xx/mb88xx.c @@ -14,6 +14,7 @@ ***************************************************************************/ #include "debugger.h" +#include "deprecat.h" #include "mb88xx.h" /*************************************************************************** diff --git a/src/emu/cpu/mc68hc11/mc68hc11.c b/src/emu/cpu/mc68hc11/mc68hc11.c index 272d60a4e81..66f1f61a9ea 100644 --- a/src/emu/cpu/mc68hc11/mc68hc11.c +++ b/src/emu/cpu/mc68hc11/mc68hc11.c @@ -5,6 +5,7 @@ */ #include "debugger.h" +#include "deprecat.h" #include "mc68hc11.h" enum diff --git a/src/emu/cpu/mcs48/mcs48.c b/src/emu/cpu/mcs48/mcs48.c index d6087b36e31..e078c012724 100644 --- a/src/emu/cpu/mcs48/mcs48.c +++ b/src/emu/cpu/mcs48/mcs48.c @@ -43,6 +43,7 @@ T0 output clock ***************************************************************************/ #include "debugger.h" +#include "deprecat.h" #include "mcs48.h" diff --git a/src/emu/cpu/minx/minx.c b/src/emu/cpu/minx/minx.c index cb92fb3f403..9e2aeae4323 100644 --- a/src/emu/cpu/minx/minx.c +++ b/src/emu/cpu/minx/minx.c @@ -44,6 +44,7 @@ TODO: #include "minx.h" #include "debugger.h" +#include "deprecat.h" #define FLAG_I 0x80 #define FLAG_D 0x40 diff --git a/src/emu/cpu/mips/r3000.c b/src/emu/cpu/mips/r3000.c index 8c08a58ed88..0407e156041 100644 --- a/src/emu/cpu/mips/r3000.c +++ b/src/emu/cpu/mips/r3000.c @@ -7,6 +7,7 @@ ***************************************************************************/ #include "debugger.h" +#include "deprecat.h" #include "r3000.h" diff --git a/src/emu/cpu/nec/nec.c b/src/emu/cpu/nec/nec.c index ab32e2eeb77..7dd6d66427a 100644 --- a/src/emu/cpu/nec/nec.c +++ b/src/emu/cpu/nec/nec.c @@ -104,6 +104,7 @@ ****************************************************************************/ #include "debugger.h" +#include "deprecat.h" typedef UINT8 BOOLEAN; typedef UINT8 BYTE; diff --git a/src/emu/cpu/pdp1/pdp1.c b/src/emu/cpu/pdp1/pdp1.c index e9e0e5d1979..fe67d478859 100644 --- a/src/emu/cpu/pdp1/pdp1.c +++ b/src/emu/cpu/pdp1/pdp1.c @@ -336,6 +336,7 @@ #include "debugger.h" +#include "deprecat.h" #include "pdp1.h" #define LOG 0 diff --git a/src/emu/cpu/pdp1/tx0.c b/src/emu/cpu/pdp1/tx0.c index 6b3eb55dfbd..d6b162eb970 100644 --- a/src/emu/cpu/pdp1/tx0.c +++ b/src/emu/cpu/pdp1/tx0.c @@ -10,6 +10,7 @@ #include "cpuintrf.h" #include "debugger.h" +#include "deprecat.h" #include "tx0.h" #define LOG 0 diff --git a/src/emu/cpu/pic16c5x/pic16c5x.c b/src/emu/cpu/pic16c5x/pic16c5x.c index 317da258526..89b026804e6 100644 --- a/src/emu/cpu/pic16c5x/pic16c5x.c +++ b/src/emu/cpu/pic16c5x/pic16c5x.c @@ -54,6 +54,7 @@ #include "debugger.h" +#include "deprecat.h" #include "pic16c5x.h" diff --git a/src/emu/cpu/s2650/s2650.c b/src/emu/cpu/s2650/s2650.c index 204e0d8fc09..7b0a2dbc4c2 100644 --- a/src/emu/cpu/s2650/s2650.c +++ b/src/emu/cpu/s2650/s2650.c @@ -13,6 +13,7 @@ *************************************************************************/ #include "debugger.h" +#include "deprecat.h" #include "s2650.h" #include "s2650cpu.h" diff --git a/src/emu/cpu/saturn/saturn.c b/src/emu/cpu/saturn/saturn.c index 151029064e5..62886b82ed4 100644 --- a/src/emu/cpu/saturn/saturn.c +++ b/src/emu/cpu/saturn/saturn.c @@ -22,6 +22,7 @@ * *****************************************************************************/ #include "debugger.h" +#include "deprecat.h" #include "saturn.h" diff --git a/src/emu/cpu/sc61860/sc61860.c b/src/emu/cpu/sc61860/sc61860.c index 58481475710..9733e5e7d7e 100644 --- a/src/emu/cpu/sc61860/sc61860.c +++ b/src/emu/cpu/sc61860/sc61860.c @@ -28,6 +28,7 @@ *****************************************************************************/ #include "debugger.h" +#include "deprecat.h" #include "sc61860.h" #include "sc.h" diff --git a/src/emu/cpu/se3208/se3208.c b/src/emu/cpu/se3208/se3208.c index 63201c69c34..af93b1ae70d 100644 --- a/src/emu/cpu/se3208/se3208.c +++ b/src/emu/cpu/se3208/se3208.c @@ -1,4 +1,5 @@ #include "debugger.h" +#include "deprecat.h" #include "se3208.h" /* diff --git a/src/emu/cpu/sharc/sharc.c b/src/emu/cpu/sharc/sharc.c index b0c4daab21b..65f900bcd34 100644 --- a/src/emu/cpu/sharc/sharc.c +++ b/src/emu/cpu/sharc/sharc.c @@ -5,6 +5,7 @@ #include "sharc.h" #include "debugger.h" +#include "deprecat.h" static offs_t sharc_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); diff --git a/src/emu/cpu/sm8500/sm8500.c b/src/emu/cpu/sm8500/sm8500.c index f497b8d5c27..eea3c7061d4 100644 --- a/src/emu/cpu/sm8500/sm8500.c +++ b/src/emu/cpu/sm8500/sm8500.c @@ -10,6 +10,7 @@ */ #include "debugger.h" +#include "deprecat.h" #include "sm8500.h" #define FLAG_C 0x80 diff --git a/src/emu/cpu/spc700/spc700.c b/src/emu/cpu/spc700/spc700.c index e1a6318524a..2aa97708665 100644 --- a/src/emu/cpu/spc700/spc700.c +++ b/src/emu/cpu/spc700/spc700.c @@ -62,6 +62,7 @@ Address Function Register R/W When Reset Remarks #include <limits.h> #include "debugger.h" +#include "deprecat.h" #include "spc700.h" /* ======================================================================== */ diff --git a/src/emu/cpu/ssp1601/ssp1601.c b/src/emu/cpu/ssp1601/ssp1601.c index 39a5ca20800..05d2df3ed20 100644 --- a/src/emu/cpu/ssp1601/ssp1601.c +++ b/src/emu/cpu/ssp1601/ssp1601.c @@ -18,6 +18,7 @@ */ #include "debugger.h" +#include "deprecat.h" #include "ssp1601.h" diff --git a/src/emu/cpu/t11/t11.c b/src/emu/cpu/t11/t11.c index 7a24ae13a4a..7d29924af1a 100644 --- a/src/emu/cpu/t11/t11.c +++ b/src/emu/cpu/t11/t11.c @@ -12,6 +12,7 @@ *****************************************************************************/ #include "debugger.h" +#include "deprecat.h" #include "t11.h" diff --git a/src/emu/cpu/tlcs90/tlcs90.c b/src/emu/cpu/tlcs90/tlcs90.c index 61e9a440826..efa2f620d72 100644 --- a/src/emu/cpu/tlcs90/tlcs90.c +++ b/src/emu/cpu/tlcs90/tlcs90.c @@ -7,6 +7,7 @@ *************************************************************************************************************/ #include "debugger.h" +#include "deprecat.h" #include "tlcs90.h" typedef struct diff --git a/src/emu/cpu/tms32010/tms32010.c b/src/emu/cpu/tms32010/tms32010.c index ff446a982a2..cb8b776039d 100644 --- a/src/emu/cpu/tms32010/tms32010.c +++ b/src/emu/cpu/tms32010/tms32010.c @@ -54,6 +54,7 @@ #include "debugger.h" +#include "deprecat.h" #include "tms32010.h" diff --git a/src/emu/cpu/tms32025/tms32025.c b/src/emu/cpu/tms32025/tms32025.c index d0d137100e3..6a97a919ed7 100644 --- a/src/emu/cpu/tms32025/tms32025.c +++ b/src/emu/cpu/tms32025/tms32025.c @@ -119,6 +119,7 @@ Table 3-2. TMS32025/26 Memory Blocks #include "debugger.h" +#include "deprecat.h" #include "tms32025.h" diff --git a/src/emu/cpu/tms32031/tms32031.c b/src/emu/cpu/tms32031/tms32031.c index 9078e6eba18..ddb187c616e 100644 --- a/src/emu/cpu/tms32031/tms32031.c +++ b/src/emu/cpu/tms32031/tms32031.c @@ -7,6 +7,7 @@ ***************************************************************************/ #include "debugger.h" +#include "deprecat.h" #include "tms32031.h" #include "eminline.h" diff --git a/src/emu/cpu/tms32051/tms32051.c b/src/emu/cpu/tms32051/tms32051.c index 623910bbfe1..4d0ea01fe33 100644 --- a/src/emu/cpu/tms32051/tms32051.c +++ b/src/emu/cpu/tms32051/tms32051.c @@ -5,6 +5,7 @@ */ #include "debugger.h" +#include "deprecat.h" #include "cpuintrf.h" #include "tms32051.h" diff --git a/src/emu/cpu/upd7810/upd7810.c b/src/emu/cpu/upd7810/upd7810.c index d2228499e0e..c4b72714b61 100644 --- a/src/emu/cpu/upd7810/upd7810.c +++ b/src/emu/cpu/upd7810/upd7810.c @@ -406,6 +406,7 @@ STOP 01001000 10111011 12 stop #include "debugger.h" +#include "deprecat.h" #include "upd7810.h" static UPD7810 upd7810; diff --git a/src/emu/cpu/v30mz/v30mz.c b/src/emu/cpu/v30mz/v30mz.c index f9fb4e5694a..37016f9e167 100644 --- a/src/emu/cpu/v30mz/v30mz.c +++ b/src/emu/cpu/v30mz/v30mz.c @@ -41,6 +41,7 @@ ****************************************************************************/ #include "debugger.h" +#include "deprecat.h" typedef UINT8 BOOLEAN; typedef UINT8 BYTE; diff --git a/src/emu/cpu/v60/v60.c b/src/emu/cpu/v60/v60.c index b3a10ac8c12..75f96483ace 100644 --- a/src/emu/cpu/v60/v60.c +++ b/src/emu/cpu/v60/v60.c @@ -4,6 +4,7 @@ // Portability fixes by Richter Belmont #include "debugger.h" +#include "deprecat.h" #include "v60.h" // memory accessors diff --git a/src/emu/cpu/v810/v810.c b/src/emu/cpu/v810/v810.c index 5752f999e6e..510b8a286c5 100644 --- a/src/emu/cpu/v810/v810.c +++ b/src/emu/cpu/v810/v810.c @@ -17,6 +17,7 @@ ********************************************/ #include "debugger.h" +#include "deprecat.h" #include "v810.h" #define clkIF 3 diff --git a/src/emu/cpu/z180/z180.c b/src/emu/cpu/z180/z180.c index 6992499be9b..ddc4ae59a37 100644 --- a/src/emu/cpu/z180/z180.c +++ b/src/emu/cpu/z180/z180.c @@ -77,6 +77,7 @@ Hitachi HD647180 series: *****************************************************************************/ #include "debugger.h" +#include "deprecat.h" #include "z180.h" #include "cpu/z80/z80daisy.h" diff --git a/src/emu/cpu/z80/z80.c b/src/emu/cpu/z80/z80.c index 1186f970611..17df594c87f 100644 --- a/src/emu/cpu/z80/z80.c +++ b/src/emu/cpu/z80/z80.c @@ -94,6 +94,7 @@ *****************************************************************************/ #include "debugger.h" +#include "deprecat.h" #include "z80.h" #include "z80daisy.h" diff --git a/src/emu/cpu/z8000/z8000.c b/src/emu/cpu/z8000/z8000.c index bcfb1ca74a3..d6cdc207819 100644 --- a/src/emu/cpu/z8000/z8000.c +++ b/src/emu/cpu/z8000/z8000.c @@ -44,6 +44,7 @@ *****************************************************************************/ #include "debugger.h" +#include "deprecat.h" #include "z8000.h" #include "z8000cpu.h" #include "osd_cpu.h" diff --git a/src/emu/debug/debugcmd.c b/src/emu/debug/debugcmd.c index bd9f61ccec3..de3d709f380 100644 --- a/src/emu/debug/debugcmd.c +++ b/src/emu/debug/debugcmd.c @@ -259,7 +259,7 @@ void debug_command_init(running_machine *machine) /* set up the initial debugscript if specified */ name = options_get_string(mame_options(), OPTION_DEBUGSCRIPT); if (name[0] != 0) - debug_cpu_source_script(name); + debug_cpu_source_script(machine, name); } @@ -966,7 +966,7 @@ static void execute_comment_del(int ref, int params, const char *param[]) static void execute_comment_save(int ref, int params, const char *param[]) { - if (debug_comment_save()) + if (debug_comment_save(Machine)) debug_console_printf("Comments successfully saved\n"); } @@ -1003,7 +1003,7 @@ static void execute_bpset(int ref, int params, const char *param[]) return; /* set the breakpoint */ - bpnum = debug_cpu_breakpoint_set(cpu_getactivecpu(), address, condition, action); + bpnum = debug_cpu_breakpoint_set(Machine, cpu_getactivecpu(), address, condition, action); debug_console_printf("Breakpoint %X set\n", bpnum); } @@ -1029,7 +1029,7 @@ static void execute_bpclear(int ref, int params, const char *param[]) { debug_cpu_breakpoint *bp; while ((bp = cpuinfo->bplist) != NULL) - debug_cpu_breakpoint_clear(bp->index); + debug_cpu_breakpoint_clear(Machine, bp->index); } } debug_console_printf("Cleared all breakpoints\n"); @@ -1040,7 +1040,7 @@ static void execute_bpclear(int ref, int params, const char *param[]) return; else { - int found = debug_cpu_breakpoint_clear(bpindex); + int found = debug_cpu_breakpoint_clear(Machine, bpindex); if (found) debug_console_printf("Breakpoint %X cleared\n", (UINT32)bpindex); else @@ -1070,7 +1070,7 @@ static void execute_bpdisenable(int ref, int params, const char *param[]) { debug_cpu_breakpoint *bp; for (bp = cpuinfo->bplist; bp != NULL; bp = bp->next) - debug_cpu_breakpoint_enable(bp->index, ref); + debug_cpu_breakpoint_enable(Machine, bp->index, ref); } } if (ref == 0) @@ -1084,7 +1084,7 @@ static void execute_bpdisenable(int ref, int params, const char *param[]) return; else { - int found = debug_cpu_breakpoint_enable(bpindex, ref); + int found = debug_cpu_breakpoint_enable(Machine, bpindex, ref); if (found) debug_console_printf("Breakpoint %X %s\n", (UINT32)bpindex, ref ? "enabled" : "disabled"); else @@ -1177,7 +1177,7 @@ static void execute_wpset(int ref, int params, const char *param[]) return; /* set the watchpoint */ - wpnum = debug_cpu_watchpoint_set(cpu_getactivecpu(), ref, type, address, length, condition, action); + wpnum = debug_cpu_watchpoint_set(Machine, cpu_getactivecpu(), ref, type, address, length, condition, action); debug_console_printf("Watchpoint %X set\n", wpnum); } @@ -1207,7 +1207,7 @@ static void execute_wpclear(int ref, int params, const char *param[]) { debug_cpu_watchpoint *wp; while ((wp = cpuinfo->space[spacenum].wplist) != NULL) - debug_cpu_watchpoint_clear(wp->index); + debug_cpu_watchpoint_clear(Machine, wp->index); } } } @@ -1219,7 +1219,7 @@ static void execute_wpclear(int ref, int params, const char *param[]) return; else { - int found = debug_cpu_watchpoint_clear(wpindex); + int found = debug_cpu_watchpoint_clear(Machine, wpindex); if (found) debug_console_printf("Watchpoint %X cleared\n", (UINT32)wpindex); else @@ -1253,7 +1253,7 @@ static void execute_wpdisenable(int ref, int params, const char *param[]) { debug_cpu_watchpoint *wp; for (wp = cpuinfo->space[spacenum].wplist; wp != NULL; wp = wp->next) - debug_cpu_watchpoint_enable(wp->index, ref); + debug_cpu_watchpoint_enable(Machine, wp->index, ref); } } } @@ -1268,7 +1268,7 @@ static void execute_wpdisenable(int ref, int params, const char *param[]) return; else { - int found = debug_cpu_watchpoint_enable(wpindex, ref); + int found = debug_cpu_watchpoint_enable(Machine, wpindex, ref); if (found) debug_console_printf("Watchpoint %X %s\n", (UINT32)wpindex, ref ? "enabled" : "disabled"); else @@ -1351,7 +1351,7 @@ static void execute_hotspot(int ref, int params, const char *param[]) if (cpuinfo->valid && cpuinfo->hotspots) { - debug_cpu_hotspot_track(cpunum, 0, 0); + debug_cpu_hotspot_track(Machine, cpunum, 0, 0); debug_console_printf("Cleared hotspot tracking on CPU %d\n", (int)cpunum); cleared = TRUE; } @@ -1374,7 +1374,7 @@ static void execute_hotspot(int ref, int params, const char *param[]) return; /* attempt to install */ - if (debug_cpu_hotspot_track(cpunum, count, threshhold)) + if (debug_cpu_hotspot_track(Machine, cpunum, count, threshhold)) debug_console_printf("Now tracking hotspots on CPU %d using %d slots with a threshhold of %d\n", (int)cpunum, (int)count, (int)threshhold); else debug_console_printf("Error setting up the hotspot tracking\n"); @@ -2050,7 +2050,7 @@ static void execute_snap(int ref, int params, const char *param[]) static void execute_source(int ref, int params, const char *param[]) { - debug_cpu_source_script(param[0]); + debug_cpu_source_script(Machine, param[0]); } diff --git a/src/emu/debug/debugcmt.c b/src/emu/debug/debugcmt.c index e8ce725d924..e07d8e4df3b 100644 --- a/src/emu/debug/debugcmt.c +++ b/src/emu/debug/debugcmt.c @@ -26,7 +26,6 @@ #include "debugcpu.h" #include "debugvw.h" #include "info.h" -#include "deprecat.h" #include <zlib.h> @@ -84,7 +83,7 @@ static comment_group *debug_comments; FUNCTION PROTOTYPES ***************************************************************************/ -static int debug_comment_load_xml(mame_file *file); +static int debug_comment_load_xml(running_machine *machine, mame_file *file); static void debug_comment_exit(running_machine *machine); static void debug_comment_free(void); @@ -110,7 +109,7 @@ int debug_comment_init(running_machine *machine) memset(debug_comments, 0, cpu_gettotalcpu() * sizeof(comment_group)); /* automatically load em up */ - debug_comment_load(); + debug_comment_load(machine); add_exit_callback(machine, debug_comment_exit); } @@ -379,7 +378,7 @@ void debug_comment_dump(int cpu_num, offs_t addr) debug_comment_save - comment file saving -------------------------------------------------------------------------*/ -int debug_comment_save(void) +int debug_comment_save(running_machine *machine) { int i, j; char crc_buf[20]; @@ -401,7 +400,7 @@ int debug_comment_save(void) systemnode = xml_add_child(commentnode, "system", NULL); if (!systemnode) goto error; - xml_set_attribute(systemnode, "name", Machine->gamedrv->name); + xml_set_attribute(systemnode, "name", machine->gamedrv->name); /* for each cpu */ for (i = 0; i < cpu_gettotalcpu(); i++) @@ -431,7 +430,7 @@ int debug_comment_save(void) astring *fname; mame_file *fp; - fname = astring_assemble_2(astring_alloc(), Machine->basename, ".cmt"); + fname = astring_assemble_2(astring_alloc(), machine->basename, ".cmt"); filerr = mame_fopen(SEARCHPATH_COMMENT, astring_c(fname), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS, &fp); astring_free(fname); @@ -456,24 +455,24 @@ error: debug_comment_load(_xml) - comment file loading -------------------------------------------------------------------------*/ -int debug_comment_load(void) +int debug_comment_load(running_machine *machine) { file_error filerr; mame_file *fp; astring *fname; - fname = astring_assemble_2(astring_alloc(), Machine->basename, ".cmt"); + fname = astring_assemble_2(astring_alloc(), machine->basename, ".cmt"); filerr = mame_fopen(SEARCHPATH_COMMENT, astring_c(fname), OPEN_FLAG_READ, &fp); astring_free(fname); if (filerr != FILERR_NONE) return 0; - debug_comment_load_xml(fp); + debug_comment_load_xml(machine, fp); mame_fclose(fp); return 1; } -static int debug_comment_load_xml(mame_file *fp) +static int debug_comment_load_xml(running_machine *machine, mame_file *fp) { int i, j; xml_data_node *root, *commentnode, *systemnode, *cpunode, *datanode; @@ -498,7 +497,7 @@ static int debug_comment_load_xml(mame_file *fp) /* check to make sure the file is applicable */ systemnode = xml_get_sibling(commentnode->child, "system"); name = xml_get_attribute_string(systemnode, "name", ""); - if (strcmp(name, Machine->gamedrv->name) != 0) + if (strcmp(name, machine->gamedrv->name) != 0) goto error; i = 0; @@ -544,7 +543,7 @@ error: static void debug_comment_exit(running_machine *machine) { - debug_comment_save(); + debug_comment_save(machine); debug_comment_free(); } diff --git a/src/emu/debug/debugcmt.h b/src/emu/debug/debugcmt.h index 982a99182fd..4605c9c54bf 100644 --- a/src/emu/debug/debugcmt.h +++ b/src/emu/debug/debugcmt.h @@ -21,8 +21,8 @@ int debug_comment_init(running_machine *machine); /* load and save */ -int debug_comment_save(void); -int debug_comment_load(void); +int debug_comment_save(running_machine *machine); +int debug_comment_load(running_machine *machine); /* comment interface functions */ int debug_comment_add(int cpu_num, offs_t addr, const char *comment, rgb_t color, UINT32 c_crc); diff --git a/src/emu/debug/debugcpu.c b/src/emu/debug/debugcpu.c index 1c39303c642..c83654d0c92 100644 --- a/src/emu/debug/debugcpu.c +++ b/src/emu/debug/debugcpu.c @@ -94,7 +94,7 @@ static void perform_trace(debug_cpu_info *info); static void prepare_for_step_overout(debug_cpu_info *info); static void process_source_file(void); static void breakpoint_check(debug_cpu_info *info, offs_t pc); -static void watchpoint_check(int cpunum, int spacenum, int type, offs_t address, UINT64 value_to_write, UINT64 mem_mask); +static void watchpoint_check(running_machine *machine, int cpunum, int spacenum, int type, offs_t address, UINT64 value_to_write, UINT64 mem_mask); static void check_hotspots(int cpunum, int spacenum, offs_t address); /* expression handlers */ @@ -331,14 +331,14 @@ static void debug_cpu_exit(running_machine *machine) /* free all breakpoints */ while (info->bplist) - debug_cpu_breakpoint_clear(info->bplist->index); + debug_cpu_breakpoint_clear(machine, info->bplist->index); /* loop over all address spaces */ for (spacenum = 0; spacenum < ADDRESS_SPACES; spacenum++) { /* free all watchpoints */ while (info->space[spacenum].wplist) - debug_cpu_watchpoint_clear(info->space[spacenum].wplist->index); + debug_cpu_watchpoint_clear(machine, info->space[spacenum].wplist->index); } } @@ -645,7 +645,7 @@ void debug_cpu_memory_read_hook(running_machine *machine, int cpunum, int spacen /* check watchpoints */ if ((info->flags & (DEBUG_FLAG_LIVE_WPR_PROGRAM << spacenum)) != 0) - watchpoint_check(cpunum, spacenum, WATCHPOINT_READ, address, 0, mem_mask); + watchpoint_check(machine, cpunum, spacenum, WATCHPOINT_READ, address, 0, mem_mask); /* check hotspots */ if (info->hotspots != NULL) @@ -665,7 +665,7 @@ void debug_cpu_memory_write_hook(running_machine *machine, int cpunum, int space /* check watchpoints */ if ((info->flags & (DEBUG_FLAG_LIVE_WPW_PROGRAM << spacenum)) != 0) - watchpoint_check(cpunum, spacenum, WATCHPOINT_WRITE, address, data, mem_mask); + watchpoint_check(machine, cpunum, spacenum, WATCHPOINT_WRITE, address, data, mem_mask); } @@ -1148,7 +1148,7 @@ void debug_cpu_set_instruction_hook(int cpunum, int (*hook)(offs_t pc)) breakpoint flags -------------------------------------------------*/ -static void breakpoint_update_flags(debug_cpu_info *info) +static void breakpoint_update_flags(running_machine *machine, debug_cpu_info *info) { debug_cpu_breakpoint *bp; @@ -1163,7 +1163,7 @@ static void breakpoint_update_flags(debug_cpu_info *info) /* push the flags out globally */ if (global.livecpu != NULL) - compute_debug_flags(Machine, global.livecpu); + compute_debug_flags(machine, global.livecpu); } @@ -1203,7 +1203,7 @@ static void breakpoint_check(debug_cpu_info *info, offs_t pc) debug_cpu_breakpoint_set - set a new breakpoint -------------------------------------------------*/ -int debug_cpu_breakpoint_set(int cpunum, offs_t address, parsed_expression *condition, const char *action) +int debug_cpu_breakpoint_set(running_machine *machine, int cpunum, offs_t address, parsed_expression *condition, const char *action) { debug_cpu_info *info = &global.cpuinfo[cpunum]; debug_cpu_breakpoint *bp; @@ -1228,7 +1228,7 @@ int debug_cpu_breakpoint_set(int cpunum, offs_t address, parsed_expression *cond info->bplist = bp; /* ensure the live breakpoint flag is set */ - breakpoint_update_flags(info); + breakpoint_update_flags(machine, info); return bp->index; } @@ -1237,7 +1237,7 @@ int debug_cpu_breakpoint_set(int cpunum, offs_t address, parsed_expression *cond debug_cpu_breakpoint_clear - clear a breakpoint -------------------------------------------------*/ -int debug_cpu_breakpoint_clear(int bpnum) +int debug_cpu_breakpoint_clear(running_machine *machine, int bpnum) { debug_cpu_breakpoint *bp, *pbp; int cpunum; @@ -1263,7 +1263,7 @@ int debug_cpu_breakpoint_clear(int bpnum) free(bp); /* update the flags */ - breakpoint_update_flags(info); + breakpoint_update_flags(machine, info); return 1; } } @@ -1278,7 +1278,7 @@ int debug_cpu_breakpoint_clear(int bpnum) breakpoint -------------------------------------------------*/ -int debug_cpu_breakpoint_enable(int bpnum, int enable) +int debug_cpu_breakpoint_enable(running_machine *machine, int bpnum, int enable) { debug_cpu_breakpoint *bp; int cpunum; @@ -1291,7 +1291,7 @@ int debug_cpu_breakpoint_enable(int bpnum, int enable) if (bp->index == bpnum) { bp->enabled = (enable != 0); - breakpoint_update_flags(info); + breakpoint_update_flags(machine, info); return 1; } } @@ -1310,7 +1310,7 @@ int debug_cpu_breakpoint_enable(int bpnum, int enable) watchpoint flags -------------------------------------------------*/ -static void watchpoint_update_flags(debug_cpu_info *info, int spacenum) +static void watchpoint_update_flags(running_machine *machine, debug_cpu_info *info, int spacenum) { UINT32 writeflag = DEBUG_FLAG_LIVE_WPW_PROGRAM << spacenum; UINT32 readflag = DEBUG_FLAG_LIVE_WPR_PROGRAM << spacenum; @@ -1344,7 +1344,7 @@ static void watchpoint_update_flags(debug_cpu_info *info, int spacenum) /* push the flags out globally */ if (global.livecpu != NULL) - compute_debug_flags(Machine, global.livecpu); + compute_debug_flags(machine, global.livecpu); } @@ -1353,7 +1353,7 @@ static void watchpoint_update_flags(debug_cpu_info *info, int spacenum) for a given CPU and address space -------------------------------------------------*/ -static void watchpoint_check(int cpunum, int spacenum, int type, offs_t address, UINT64 value_to_write, UINT64 mem_mask) +static void watchpoint_check(running_machine *machine, int cpunum, int spacenum, int type, offs_t address, UINT64 value_to_write, UINT64 mem_mask) { const debug_cpu_info *info = &global.cpuinfo[cpunum]; debug_cpu_watchpoint *wp; @@ -1430,7 +1430,7 @@ static void watchpoint_check(int cpunum, int spacenum, int type, offs_t address, else sprintf(buffer, "Stopped at watchpoint %X reading %s from %08X (PC=%X)", wp->index, sizes[size], BYTE2ADDR(address, &global.cpuinfo[cpunum], spacenum), activecpu_get_pc()); debug_console_printf("%s\n", buffer); - compute_debug_flags(Machine, info); + compute_debug_flags(machine, info); } break; } @@ -1443,7 +1443,7 @@ static void watchpoint_check(int cpunum, int spacenum, int type, offs_t address, debug_cpu_watchpoint_set - set a new watchpoint -------------------------------------------------*/ -int debug_cpu_watchpoint_set(int cpunum, int spacenum, int type, offs_t address, offs_t length, parsed_expression *condition, const char *action) +int debug_cpu_watchpoint_set(running_machine *machine, int cpunum, int spacenum, int type, offs_t address, offs_t length, parsed_expression *condition, const char *action) { debug_cpu_info *info = &global.cpuinfo[cpunum]; debug_cpu_watchpoint *wp = malloc_or_die(sizeof(*wp)); @@ -1466,7 +1466,7 @@ int debug_cpu_watchpoint_set(int cpunum, int spacenum, int type, offs_t address, wp->next = info->space[spacenum].wplist; info->space[spacenum].wplist = wp; - watchpoint_update_flags(info, spacenum); + watchpoint_update_flags(machine, info, spacenum); return wp->index; } @@ -1476,7 +1476,7 @@ int debug_cpu_watchpoint_set(int cpunum, int spacenum, int type, offs_t address, debug_cpu_watchpoint_clear - clear a watchpoint -------------------------------------------------*/ -int debug_cpu_watchpoint_clear(int wpnum) +int debug_cpu_watchpoint_clear(running_machine *machine, int wpnum) { debug_cpu_watchpoint *wp, *pwp; int cpunum, spacenum; @@ -1503,7 +1503,7 @@ int debug_cpu_watchpoint_clear(int wpnum) free(wp->action); free(wp); - watchpoint_update_flags(info, spacenum); + watchpoint_update_flags(machine, info, spacenum); return 1; } } @@ -1518,7 +1518,7 @@ int debug_cpu_watchpoint_clear(int wpnum) watchpoint -------------------------------------------------*/ -int debug_cpu_watchpoint_enable(int wpnum, int enable) +int debug_cpu_watchpoint_enable(running_machine *machine, int wpnum, int enable) { debug_cpu_watchpoint *wp; int cpunum, spacenum; @@ -1533,7 +1533,7 @@ int debug_cpu_watchpoint_enable(int wpnum, int enable) if (wp->index == wpnum) { wp->enabled = (enable != 0); - watchpoint_update_flags(info, spacenum); + watchpoint_update_flags(machine, info, spacenum); return 1; } } @@ -1551,7 +1551,7 @@ int debug_cpu_watchpoint_enable(int wpnum, int enable) of hotspots -------------------------------------------------*/ -int debug_cpu_hotspot_track(int cpunum, int numspots, int threshhold) +int debug_cpu_hotspot_track(running_machine *machine, int cpunum, int numspots, int threshhold) { debug_cpu_info *info = &global.cpuinfo[cpunum]; @@ -1572,7 +1572,7 @@ int debug_cpu_hotspot_track(int cpunum, int numspots, int threshhold) info->hotspot_threshhold = threshhold; } - watchpoint_update_flags(info, ADDRESS_SPACE_PROGRAM); + watchpoint_update_flags(machine, info, ADDRESS_SPACE_PROGRAM); return 1; } @@ -2661,7 +2661,7 @@ void debug_cpu_trace_printf(int cpunum, const char *fmt, ...) script to use -------------------------------------------------*/ -void debug_cpu_source_script(const char *file) +void debug_cpu_source_script(running_machine *machine, const char *file) { if (debug_source_file) { @@ -2674,7 +2674,7 @@ void debug_cpu_source_script(const char *file) debug_source_file = fopen(file, "r"); if (!debug_source_file) { - if (mame_get_phase(Machine) == MAME_PHASE_RUNNING) + if (mame_get_phase(machine) == MAME_PHASE_RUNNING) debug_console_printf("Cannot open command file '%s'\n", file); else fatalerror("Cannot open command file '%s'", file); diff --git a/src/emu/debug/debugcpu.h b/src/emu/debug/debugcpu.h index fc475ecd2bc..b4985354c31 100644 --- a/src/emu/debug/debugcpu.h +++ b/src/emu/debug/debugcpu.h @@ -250,7 +250,7 @@ const debug_cpu_info *debug_get_cpu_info(int cpunum); void debug_cpu_halt_on_next_instruction(running_machine *machine, const char *fmt, ...) ATTR_PRINTF(2,3); int debug_cpu_is_stopped(running_machine *machine); void debug_cpu_trace_printf(int cpunum, const char *fmt, ...) ATTR_PRINTF(2,3); -void debug_cpu_source_script(const char *file); +void debug_cpu_source_script(running_machine *machine, const char *file); void debug_cpu_flush_traces(void); /* debugging hooks */ @@ -272,17 +272,17 @@ void debug_cpu_ignore_cpu(int cpunum, int ignore); void debug_cpu_trace(int cpunum, FILE *file, int trace_over, const char *action); /* breakpoints */ -int debug_cpu_breakpoint_set(int cpunum, offs_t address, parsed_expression *condition, const char *action); -int debug_cpu_breakpoint_clear(int bpnum); -int debug_cpu_breakpoint_enable(int bpnum, int enable); +int debug_cpu_breakpoint_set(running_machine *machine, int cpunum, offs_t address, parsed_expression *condition, const char *action); +int debug_cpu_breakpoint_clear(running_machine *machine, int bpnum); +int debug_cpu_breakpoint_enable(running_machine *machine, int bpnum, int enable); /* watchpoints */ -int debug_cpu_watchpoint_set(int cpunum, int spacenum, int type, offs_t address, offs_t length, parsed_expression *condition, const char *action); -int debug_cpu_watchpoint_clear(int wpnum); -int debug_cpu_watchpoint_enable(int wpnum, int enable); +int debug_cpu_watchpoint_set(running_machine *machine, int cpunum, int spacenum, int type, offs_t address, offs_t length, parsed_expression *condition, const char *action); +int debug_cpu_watchpoint_clear(running_machine *machine, int wpnum); +int debug_cpu_watchpoint_enable(running_machine *machine, int wpnum, int enable); /* hotspots */ -int debug_cpu_hotspot_track(int cpunum, int numspots, int threshhold); +int debug_cpu_hotspot_track(running_machine *machine, int cpunum, int numspots, int threshhold); /* memory accessors */ UINT8 debug_read_byte(int spacenum, offs_t address, int apply_translation); diff --git a/src/emu/debugger.h b/src/emu/debugger.h index 3d9138db158..247e7bd8601 100644 --- a/src/emu/debugger.h +++ b/src/emu/debugger.h @@ -15,7 +15,6 @@ #define __DEBUGGER_H__ #include "mame.h" -#include "deprecat.h" #include "debug/debugcpu.h" diff --git a/src/emu/machine/6840ptm.c b/src/emu/machine/6840ptm.c index 63a08316e46..0bf2ae2691f 100644 --- a/src/emu/machine/6840ptm.c +++ b/src/emu/machine/6840ptm.c @@ -33,7 +33,6 @@ **********************************************************************/ #include "driver.h" -#include "deprecat.h" #include "6840ptm.h" // Defines ///////////////////////////////////////////////////////////// @@ -376,12 +375,12 @@ static void reload_count(running_machine *machine, int which, int idx) // // /////////////////////////////////////////////////////////////////////////// -void ptm6840_config(int which, const ptm6840_interface *intf) +void ptm6840_config(running_machine *machine, int which, const ptm6840_interface *intf) { int i; ptm6840 *currptr = ptm + which; - assert_always(mame_get_phase(Machine) == MAME_PHASE_INIT, "Can only call ptm6840_config at init time!"); + assert_always(mame_get_phase(machine) == MAME_PHASE_INIT, "Can only call ptm6840_config at init time!"); assert_always((which >= 0) && (which < PTM_6840_MAX), "ptm6840_config called on an invalid PTM!"); assert_always(intf, "ptm6840_config called with an invalid interface!"); ptm[which].intf = intf; @@ -457,7 +456,7 @@ void ptm6840_reset(int which) // // /////////////////////////////////////////////////////////////////////////// -int ptm6840_read(int which, int offset) +int ptm6840_read(running_machine *machine, int which, int offset) { int val; ptm6840 *currptr = ptm + which; @@ -489,7 +488,7 @@ int ptm6840_read(int which, int offset) if (currptr->status_read_since_int & (1 << idx)) { currptr->status_reg &= ~(1 << idx); - update_interrupts(Machine, which); + update_interrupts(machine, which); } currptr->lsb_buffer = result & 0xff; @@ -523,7 +522,7 @@ int ptm6840_read(int which, int offset) // // /////////////////////////////////////////////////////////////////////////// -void ptm6840_write (int which, int offset, int data) +void ptm6840_write (running_machine *machine, int which, int offset, int data) { ptm6840 *currptr = ptm + which; @@ -553,7 +552,7 @@ void ptm6840_write (int which, int offset, int data) if ( currptr->intf ) { if ( currptr->intf->out_func[idx] ) - currptr->intf->out_func[idx](Machine, 0, 0); + currptr->intf->out_func[idx](machine, 0, 0); } } /* Reset? */ @@ -573,15 +572,15 @@ void ptm6840_write (int which, int offset, int data) else { for (i = 0; i < 3; i++) - reload_count(Machine, which, i); + reload_count(machine, which, i); } currptr->status_reg = 0; - update_interrupts(Machine, which); + update_interrupts(machine, which); /* Changing the clock source? (e.g. Zwackery) */ if (diffs & 0x02) - reload_count(Machine, which, idx); + reload_count(machine, which, idx); } break; } @@ -604,11 +603,11 @@ void ptm6840_write (int which, int offset, int data) /* Clear the interrupt */ currptr->status_reg &= ~(1 << idx); - update_interrupts(Machine, which); + update_interrupts(machine, which); /* Reload the count if in an appropriate mode */ if (!(currptr->control_reg[idx] & 0x10)) - reload_count(Machine, which,idx); + reload_count(machine, which,idx); PLOG(("%06X:MC6840 #%d: Counter %d latch = %04X\n", activecpu_get_previouspc(), which, idx, currptr->latch[idx])); break; @@ -689,9 +688,9 @@ INLINE void ptm6840_set_gate(running_machine *machine, int which, int state, int p->gate[idx] = state; } -void ptm6840_set_g1(int which, int state) { ptm6840_set_gate(Machine, which, state, 0); } -void ptm6840_set_g2(int which, int state) { ptm6840_set_gate(Machine, which, state, 1); } -void ptm6840_set_g3(int which, int state) { ptm6840_set_gate(Machine, which, state, 2); } +void ptm6840_set_g1(running_machine *machine, int which, int state) { ptm6840_set_gate(machine, which, state, 0); } +void ptm6840_set_g2(running_machine *machine, int which, int state) { ptm6840_set_gate(machine, which, state, 1); } +void ptm6840_set_g3(running_machine *machine, int which, int state) { ptm6840_set_gate(machine, which, state, 2); } /////////////////////////////////////////////////////////////////////////// // // @@ -778,38 +777,38 @@ int ptm6840_get_ext_clock(int which, int counter) return currptr->external_clock[counter]; } -void ptm6840_set_c1(int which, int state) { ptm6840_set_clock(Machine, which, state, 0); } -void ptm6840_set_c2(int which, int state) { ptm6840_set_clock(Machine, which, state, 1); } -void ptm6840_set_c3(int which, int state) { ptm6840_set_clock(Machine, which, state, 2); } +void ptm6840_set_c1(running_machine *machine, int which, int state) { ptm6840_set_clock(machine, which, state, 0); } +void ptm6840_set_c2(running_machine *machine, int which, int state) { ptm6840_set_clock(machine, which, state, 1); } +void ptm6840_set_c3(running_machine *machine, int which, int state) { ptm6840_set_clock(machine, which, state, 2); } ///////////////////////////////////////////////////////////////////////////////// -READ8_HANDLER( ptm6840_0_r ) { return ptm6840_read(0, offset); } -READ8_HANDLER( ptm6840_1_r ) { return ptm6840_read(1, offset); } -READ8_HANDLER( ptm6840_2_r ) { return ptm6840_read(2, offset); } -READ8_HANDLER( ptm6840_3_r ) { return ptm6840_read(3, offset); } - -WRITE8_HANDLER( ptm6840_0_w ) { ptm6840_write(0, offset, data); } -WRITE8_HANDLER( ptm6840_1_w ) { ptm6840_write(1, offset, data); } -WRITE8_HANDLER( ptm6840_2_w ) { ptm6840_write(2, offset, data); } -WRITE8_HANDLER( ptm6840_3_w ) { ptm6840_write(3, offset, data); } - -READ16_HANDLER( ptm6840_0_msb_r ) { return ptm6840_read(0, offset) << 8; } -READ16_HANDLER( ptm6840_1_msb_r ) { return ptm6840_read(1, offset) << 8; } -READ16_HANDLER( ptm6840_2_msb_r ) { return ptm6840_read(2, offset) << 8; } -READ16_HANDLER( ptm6840_3_msb_r ) { return ptm6840_read(3, offset) << 8; } - -WRITE16_HANDLER( ptm6840_0_msb_w ) { if (ACCESSING_BITS_8_15) ptm6840_write(0, offset, data >> 8); } -WRITE16_HANDLER( ptm6840_1_msb_w ) { if (ACCESSING_BITS_8_15) ptm6840_write(1, offset, data >> 8); } -WRITE16_HANDLER( ptm6840_2_msb_w ) { if (ACCESSING_BITS_8_15) ptm6840_write(2, offset, data >> 8); } -WRITE16_HANDLER( ptm6840_3_msb_w ) { if (ACCESSING_BITS_8_15) ptm6840_write(3, offset, data >> 8); } - -READ16_HANDLER( ptm6840_0_lsb_r ) { return ptm6840_read(0, offset); } -READ16_HANDLER( ptm6840_1_lsb_r ) { return ptm6840_read(1, offset); } -READ16_HANDLER( ptm6840_2_lsb_r ) { return ptm6840_read(2, offset); } -READ16_HANDLER( ptm6840_3_lsb_r ) { return ptm6840_read(3, offset); } - -WRITE16_HANDLER( ptm6840_0_lsb_w ) { if (ACCESSING_BITS_0_7) ptm6840_write(0, offset, data & 0xff); } -WRITE16_HANDLER( ptm6840_1_lsb_w ) { if (ACCESSING_BITS_0_7) ptm6840_write(1, offset, data & 0xff); } -WRITE16_HANDLER( ptm6840_2_lsb_w ) { if (ACCESSING_BITS_0_7) ptm6840_write(2, offset, data & 0xff); } -WRITE16_HANDLER( ptm6840_3_lsb_w ) { if (ACCESSING_BITS_0_7) ptm6840_write(3, offset, data & 0xff); } +READ8_HANDLER( ptm6840_0_r ) { return ptm6840_read(machine, 0, offset); } +READ8_HANDLER( ptm6840_1_r ) { return ptm6840_read(machine, 1, offset); } +READ8_HANDLER( ptm6840_2_r ) { return ptm6840_read(machine, 2, offset); } +READ8_HANDLER( ptm6840_3_r ) { return ptm6840_read(machine, 3, offset); } + +WRITE8_HANDLER( ptm6840_0_w ) { ptm6840_write(machine, 0, offset, data); } +WRITE8_HANDLER( ptm6840_1_w ) { ptm6840_write(machine, 1, offset, data); } +WRITE8_HANDLER( ptm6840_2_w ) { ptm6840_write(machine, 2, offset, data); } +WRITE8_HANDLER( ptm6840_3_w ) { ptm6840_write(machine, 3, offset, data); } + +READ16_HANDLER( ptm6840_0_msb_r ) { return ptm6840_read(machine, 0, offset) << 8; } +READ16_HANDLER( ptm6840_1_msb_r ) { return ptm6840_read(machine, 1, offset) << 8; } +READ16_HANDLER( ptm6840_2_msb_r ) { return ptm6840_read(machine, 2, offset) << 8; } +READ16_HANDLER( ptm6840_3_msb_r ) { return ptm6840_read(machine, 3, offset) << 8; } + +WRITE16_HANDLER( ptm6840_0_msb_w ) { if (ACCESSING_BITS_8_15) ptm6840_write(machine, 0, offset, data >> 8); } +WRITE16_HANDLER( ptm6840_1_msb_w ) { if (ACCESSING_BITS_8_15) ptm6840_write(machine, 1, offset, data >> 8); } +WRITE16_HANDLER( ptm6840_2_msb_w ) { if (ACCESSING_BITS_8_15) ptm6840_write(machine, 2, offset, data >> 8); } +WRITE16_HANDLER( ptm6840_3_msb_w ) { if (ACCESSING_BITS_8_15) ptm6840_write(machine, 3, offset, data >> 8); } + +READ16_HANDLER( ptm6840_0_lsb_r ) { return ptm6840_read(machine, 0, offset); } +READ16_HANDLER( ptm6840_1_lsb_r ) { return ptm6840_read(machine, 1, offset); } +READ16_HANDLER( ptm6840_2_lsb_r ) { return ptm6840_read(machine, 2, offset); } +READ16_HANDLER( ptm6840_3_lsb_r ) { return ptm6840_read(machine, 3, offset); } + +WRITE16_HANDLER( ptm6840_0_lsb_w ) { if (ACCESSING_BITS_0_7) ptm6840_write(machine, 0, offset, data & 0xff); } +WRITE16_HANDLER( ptm6840_1_lsb_w ) { if (ACCESSING_BITS_0_7) ptm6840_write(machine, 1, offset, data & 0xff); } +WRITE16_HANDLER( ptm6840_2_lsb_w ) { if (ACCESSING_BITS_0_7) ptm6840_write(machine, 2, offset, data & 0xff); } +WRITE16_HANDLER( ptm6840_3_lsb_w ) { if (ACCESSING_BITS_0_7) ptm6840_write(machine, 3, offset, data & 0xff); } diff --git a/src/emu/machine/6840ptm.h b/src/emu/machine/6840ptm.h index c70b4921513..bc2a1061f28 100644 --- a/src/emu/machine/6840ptm.h +++ b/src/emu/machine/6840ptm.h @@ -23,10 +23,10 @@ struct _ptm6840_interface void (*irq_func)(running_machine *machine, int state); // function called if IRQ line changes }; -void ptm6840_config( int which, const ptm6840_interface *intf); +void ptm6840_config( running_machine *machine, int which, const ptm6840_interface *intf); void ptm6840_reset( int which); -int ptm6840_read( int which, int offset); -void ptm6840_write( int which, int offset, int data); +int ptm6840_read( running_machine *machine, int which, int offset); +void ptm6840_write( running_machine *machine, int which, int offset, int data); int ptm6840_get_status(int which, int clock); // get whether timer is enabled int ptm6840_get_irq(int which); // get IRQ state @@ -34,14 +34,14 @@ UINT16 ptm6840_get_count(int which,int counter);// get counter value void ptm6840_set_ext_clock(int which, int counter, int clock); // set clock frequency int ptm6840_get_ext_clock(int which, int counter);// get clock frequency -void ptm6840_set_g1(int which, int state); // set gate1 state -void ptm6840_set_c1(int which, int state); // set clock1 state +void ptm6840_set_g1(running_machine *machine, int which, int state); // set gate1 state +void ptm6840_set_c1(running_machine *machine, int which, int state); // set clock1 state -void ptm6840_set_g2(int which, int state); // set gate2 state -void ptm6840_set_c2(int which, int state); // set clock2 state +void ptm6840_set_g2(running_machine *machine, int which, int state); // set gate2 state +void ptm6840_set_c2(running_machine *machine, int which, int state); // set clock2 state -void ptm6840_set_g3(int which, int state); // set gate3 state -void ptm6840_set_c3(int which, int state); // set clock3 state +void ptm6840_set_g3(running_machine *machine, int which, int state); // set gate3 state +void ptm6840_set_c3(running_machine *machine, int which, int state); // set clock3 state /*-------------------------------------------------------------------------*/ diff --git a/src/emu/machine/z80pio.c b/src/emu/machine/z80pio.c index 835484e057c..15c798ccea4 100644 --- a/src/emu/machine/z80pio.c +++ b/src/emu/machine/z80pio.c @@ -221,7 +221,7 @@ void z80pio_reset(int which) CONTROL REGISTER READ/WRITE ***************************************************************************/ -void z80pio_c_w(int which, int ch, UINT8 data) +void z80pio_c_w(running_machine *machine, int which, int ch, UINT8 data) { z80pio *pio = pios + which; @@ -278,7 +278,7 @@ void z80pio_c_w(int which, int ch, UINT8 data) } /* interrupt check */ - update_irq_state(Machine, pio, ch); + update_irq_state(machine, pio, ch); } @@ -294,20 +294,20 @@ UINT8 z80pio_c_r(int which, int ch) DATA REGISTER READ/WRITE ***************************************************************************/ -void z80pio_d_w(int which, int ch, UINT8 data) +void z80pio_d_w(running_machine *machine, int which, int ch, UINT8 data) { z80pio *pio = pios + which; pio->out[ch] = data; /* latch out data */ if(pio->port_write[ch]) - pio->port_write[ch](Machine, 0, data); + pio->port_write[ch](machine, 0, data); switch (pio->mode[ch]) { case PIO_MODE0: /* mode 0 output */ case PIO_MODE2: /* mode 2 i/o */ set_rdy(pio, ch, 1); /* ready = H */ - update_irq_state(Machine, pio, ch); + update_irq_state(machine, pio, ch); return; case PIO_MODE1: /* mode 1 input */ @@ -320,7 +320,7 @@ void z80pio_d_w(int which, int ch, UINT8 data) } -UINT8 z80pio_d_r(int which, int ch) +UINT8 z80pio_d_r(running_machine *machine, int which, int ch) { z80pio *pio = pios + which; @@ -332,21 +332,21 @@ UINT8 z80pio_d_r(int which, int ch) case PIO_MODE1: /* mode 1 input */ set_rdy(pio, ch, 1); /* ready = H */ if(pio->port_read[ch]) - pio->in[ch] = pio->port_read[ch](Machine, 0); - update_irq_state(Machine, pio, ch); + pio->in[ch] = pio->port_read[ch](machine, 0); + update_irq_state(machine, pio, ch); return pio->in[ch]; case PIO_MODE2: /* mode 2 i/o */ if (ch) VPRINTF(("PIO-B mode 2 \n")); set_rdy(pio, 1, 1); /* brdy = H */ if(pio->port_read[ch]) - pio->in[ch] = pio->port_read[ch](Machine, 0); - update_irq_state(Machine, pio, ch); + pio->in[ch] = pio->port_read[ch](machine, 0); + update_irq_state(machine, pio, ch); return pio->in[ch]; case PIO_MODE3: /* mode 3 bit */ if(pio->port_read[ch]) - pio->in[ch] = pio->port_read[ch](Machine, 0); + pio->in[ch] = pio->port_read[ch](machine, 0); return (pio->in[ch] & pio->dir[ch]) | (pio->out[ch] & ~pio->dir[ch]); } VPRINTF(("PIO-%c data read,bad mode\n",'A'+ch )); @@ -359,7 +359,7 @@ UINT8 z80pio_d_r(int which, int ch) PORT I/O ***************************************************************************/ -void z80pio_p_w(int which, UINT8 ch, UINT8 data) +void z80pio_p_w(running_machine *machine, int which, UINT8 ch, UINT8 data) { z80pio *pio = pios + which; @@ -375,18 +375,18 @@ void z80pio_p_w(int which, UINT8 ch, UINT8 data) case PIO_MODE1: set_rdy(pio, ch, 0); - update_irq_state(Machine, pio, ch); + update_irq_state(machine, pio, ch); break; case PIO_MODE3: /* irq check */ - update_irq_state(Machine, pio, ch); + update_irq_state(machine, pio, ch); break; } } -int z80pio_p_r(int which, UINT8 ch) +int z80pio_p_r(running_machine *machine, int which, UINT8 ch) { z80pio *pio = pios + which; @@ -395,7 +395,7 @@ int z80pio_p_r(int which, UINT8 ch) case PIO_MODE2: /* port A only */ case PIO_MODE0: set_rdy(pio, ch, 0); - update_irq_state(Machine, pio, ch); + update_irq_state(machine, pio, ch); break; case PIO_MODE1: @@ -409,15 +409,15 @@ int z80pio_p_r(int which, UINT8 ch) } -WRITE8_HANDLER( z80pioA_0_p_w ) { z80pio_p_w(0, 0, data); } -WRITE8_HANDLER( z80pioB_0_p_w ) { z80pio_p_w(0, 1, data); } -READ8_HANDLER( z80pioA_0_p_r ) { return z80pio_p_r(0, 0); } -READ8_HANDLER( z80pioB_0_p_r ) { return z80pio_p_r(0, 1); } +WRITE8_HANDLER( z80pioA_0_p_w ) { z80pio_p_w(machine, 0, 0, data); } +WRITE8_HANDLER( z80pioB_0_p_w ) { z80pio_p_w(machine, 0, 1, data); } +READ8_HANDLER( z80pioA_0_p_r ) { return z80pio_p_r(machine, 0, 0); } +READ8_HANDLER( z80pioB_0_p_r ) { return z80pio_p_r(machine, 0, 1); } -WRITE8_HANDLER( z80pioA_1_p_w ) { z80pio_p_w(1, 0, data); } -WRITE8_HANDLER( z80pioB_1_p_w ) { z80pio_p_w(1, 1, data); } -READ8_HANDLER( z80pioA_1_p_r ) { return z80pio_p_r(1, 0); } -READ8_HANDLER( z80pioB_1_p_r ) { return z80pio_p_r(1, 1); } +WRITE8_HANDLER( z80pioA_1_p_w ) { z80pio_p_w(machine, 1, 0, data); } +WRITE8_HANDLER( z80pioB_1_p_w ) { z80pio_p_w(machine, 1, 1, data); } +READ8_HANDLER( z80pioA_1_p_r ) { return z80pio_p_r(machine, 1, 0); } +READ8_HANDLER( z80pioB_1_p_r ) { return z80pio_p_r(machine, 1, 1); } @@ -425,7 +425,7 @@ READ8_HANDLER( z80pioB_1_p_r ) { return z80pio_p_r(1, 1); } STROBE STATE MANAGEMENT ***************************************************************************/ -static void z80pio_update_strobe(int which, int ch, int state) +static void z80pio_update_strobe(running_machine *machine, int which, int ch, int state) { z80pio *pio = pios + which; @@ -463,7 +463,7 @@ static void z80pio_update_strobe(int which, int ch, int state) pio->strobe[ch] = state; /* check interrupt */ - interrupt_check(Machine, which); + interrupt_check(machine, which); } break; @@ -476,8 +476,8 @@ static void z80pio_update_strobe(int which, int ch, int state) } -void z80pio_astb_w(int which, int state) { z80pio_update_strobe(which, 0, state); } -void z80pio_bstb_w(int which, int state) { z80pio_update_strobe(which, 1, state); } +void z80pio_astb_w(running_machine *machine, int which, int state) { z80pio_update_strobe(machine, which, 0, state); } +void z80pio_bstb_w(running_machine *machine, int which, int state) { z80pio_update_strobe(machine, which, 1, state); } @@ -553,26 +553,26 @@ void z80pio_irq_reti(int which) ***************************************************************************/ READ8_HANDLER(z80pio_0_r) { - return (offset & 2) ? z80pio_c_r(0, offset & 1) : z80pio_d_r(0, offset & 1); + return (offset & 2) ? z80pio_c_r(0, offset & 1) : z80pio_d_r(machine, 0, offset & 1); } WRITE8_HANDLER(z80pio_0_w) { if (offset & 2) - z80pio_c_w(0, offset & 1, data); + z80pio_c_w(machine, 0, offset & 1, data); else - z80pio_d_w(0, offset & 1, data); + z80pio_d_w(machine, 0, offset & 1, data); } READ8_HANDLER(z80pio_1_r) { - return (offset & 2) ? z80pio_c_r(1, offset & 1) : z80pio_d_r(1, offset & 1); + return (offset & 2) ? z80pio_c_r(1, offset & 1) : z80pio_d_r(machine, 1, offset & 1); } WRITE8_HANDLER(z80pio_1_w) { if (offset & 2) - z80pio_c_w(1, offset & 1, data); + z80pio_c_w(machine, 1, offset & 1, data); else - z80pio_d_w(1, offset & 1, data); + z80pio_d_w(machine, 1, offset & 1, data); } diff --git a/src/emu/machine/z80pio.h b/src/emu/machine/z80pio.h index a7bea5a242e..0a6c17dfd86 100644 --- a/src/emu/machine/z80pio.h +++ b/src/emu/machine/z80pio.h @@ -46,7 +46,7 @@ void z80pio_reset(int which); CONTROL REGISTER READ/WRITE ***************************************************************************/ -void z80pio_c_w(int which, int ch, UINT8 data); +void z80pio_c_w(running_machine *machine, int which, int ch, UINT8 data); UINT8 z80pio_c_r(int which, int ch); @@ -55,8 +55,8 @@ UINT8 z80pio_c_r(int which, int ch); DATA REGISTER READ/WRITE ***************************************************************************/ -void z80pio_d_w(int which, int ch, UINT8 data); -UINT8 z80pio_d_r(int which, int ch); +void z80pio_d_w(running_machine *machine, int which, int ch, UINT8 data); +UINT8 z80pio_d_r(running_machine *machine, int which, int ch); @@ -64,8 +64,8 @@ UINT8 z80pio_d_r(int which, int ch); PORT I/O ***************************************************************************/ -void z80pio_p_w(int which, UINT8 ch, UINT8 data); -int z80pio_p_r(int which, UINT8 ch); +void z80pio_p_w(running_machine *machine, int which, UINT8 ch, UINT8 data); +int z80pio_p_r(running_machine *machine, int which, UINT8 ch); WRITE8_HANDLER( z80pioA_0_p_w ); WRITE8_HANDLER( z80pioB_0_p_w ); @@ -82,8 +82,8 @@ READ8_HANDLER( z80pioB_1_p_r ); STROBE STATE MANAGEMENT ***************************************************************************/ -void z80pio_astb_w(int which, int state); -void z80pio_bstb_w(int which, int state); +void z80pio_astb_w(running_machine *machine, int which, int state); +void z80pio_bstb_w(running_machine *machine, int which, int state); diff --git a/src/emu/machine/z80sio.c b/src/emu/machine/z80sio.c index 45fee492c48..0e5ad0313ba 100644 --- a/src/emu/machine/z80sio.c +++ b/src/emu/machine/z80sio.c @@ -360,7 +360,7 @@ void z80sio_reset(int which) z80sio_c_w - write to a control register -------------------------------------------------*/ -void z80sio_c_w(int which, int ch, UINT8 data) +void z80sio_c_w(running_machine *machine, int which, int ch, UINT8 data) { z80sio *sio = sios + which; sio_channel *chan = &sio->chan[ch]; @@ -386,44 +386,44 @@ void z80sio_c_w(int which, int ch, UINT8 data) { case SIO_WR0_COMMAND_CH_RESET: VPRINTF(("%04X:SIO reset channel %c\n", activecpu_get_pc(), 'A' + ch)); - reset_channel(Machine, sio, ch); + reset_channel(machine, sio, ch); break; case SIO_WR0_COMMAND_RES_STATUS_INT: sio->int_state[INT_CHA_STATUS - 4*ch] &= ~Z80_DAISY_INT; - interrupt_check(Machine, sio); + interrupt_check(machine, sio); break; case SIO_WR0_COMMAND_ENA_RX_INT: chan->int_on_next_rx = TRUE; - interrupt_check(Machine, sio); + interrupt_check(machine, sio); break; case SIO_WR0_COMMAND_RES_TX_INT: sio->int_state[INT_CHA_TRANSMIT - 4*ch] &= ~Z80_DAISY_INT; - interrupt_check(Machine, sio); + interrupt_check(machine, sio); break; case SIO_WR0_COMMAND_RES_ERROR: sio->int_state[INT_CHA_ERROR - 4*ch] &= ~Z80_DAISY_INT; - interrupt_check(Machine, sio); + interrupt_check(machine, sio); break; } break; /* SIO write register 1 */ case 1: - interrupt_check(Machine, sio); + interrupt_check(machine, sio); break; /* SIO write register 5 */ case 5: if (((old ^ data) & SIO_WR5_DTR) && sio->dtr_changed_cb) - (*sio->dtr_changed_cb)(Machine, ch, (data & SIO_WR5_DTR) != 0); + (*sio->dtr_changed_cb)(machine, ch, (data & SIO_WR5_DTR) != 0); if (((old ^ data) & SIO_WR5_SEND_BREAK) && sio->break_changed_cb) - (*sio->break_changed_cb)(Machine, ch, (data & SIO_WR5_SEND_BREAK) != 0); + (*sio->break_changed_cb)(machine, ch, (data & SIO_WR5_SEND_BREAK) != 0); if (((old ^ data) & SIO_WR5_RTS) && sio->rts_changed_cb) - (*sio->rts_changed_cb)(Machine, ch, (data & SIO_WR5_RTS) != 0); + (*sio->rts_changed_cb)(machine, ch, (data & SIO_WR5_RTS) != 0); break; } } @@ -467,7 +467,7 @@ UINT8 z80sio_c_r(int which, int ch) z80sio_d_w - write to a data register -------------------------------------------------*/ -void z80sio_d_w(int which, int ch, UINT8 data) +void z80sio_d_w(running_machine *machine, int which, int ch, UINT8 data) { z80sio *sio = sios + which; sio_channel *chan = &sio->chan[ch]; @@ -483,7 +483,7 @@ void z80sio_d_w(int which, int ch, UINT8 data) /* reset the transmit interrupt */ sio->int_state[INT_CHA_TRANSMIT - 4*ch] &= ~Z80_DAISY_INT; - interrupt_check(Machine, sio); + interrupt_check(machine, sio); /* stash the character */ chan->outbuf = data; @@ -494,7 +494,7 @@ void z80sio_d_w(int which, int ch, UINT8 data) z80sio_d_r - read from a data register -------------------------------------------------*/ -UINT8 z80sio_d_r(int which, int ch) +UINT8 z80sio_d_r(running_machine *machine, int which, int ch) { z80sio *sio = sios + which; sio_channel *chan = &sio->chan[ch]; @@ -504,7 +504,7 @@ UINT8 z80sio_d_r(int which, int ch) /* reset the receive interrupt */ sio->int_state[INT_CHA_RECEIVE - 4*ch] &= ~Z80_DAISY_INT; - interrupt_check(Machine, sio); + interrupt_check(machine, sio); VPRINTF(("%04X:sio_data_r(%c) = %02X\n", activecpu_get_pc(), 'A' + ch, chan->inbuf)); diff --git a/src/emu/machine/z80sio.h b/src/emu/machine/z80sio.h index b2660fe0417..01fd087f73d 100644 --- a/src/emu/machine/z80sio.h +++ b/src/emu/machine/z80sio.h @@ -46,7 +46,7 @@ void z80sio_reset(int which); CONTROL REGISTER READ/WRITE ***************************************************************************/ -void z80sio_c_w(int which, int ch, UINT8 data); +void z80sio_c_w(running_machine *machine, int which, int ch, UINT8 data); UINT8 z80sio_c_r(int which, int ch); @@ -55,8 +55,8 @@ UINT8 z80sio_c_r(int which, int ch); DATA REGISTER READ/WRITE ***************************************************************************/ -void z80sio_d_w(int which, int ch, UINT8 data); -UINT8 z80sio_d_r(int which, int ch); +void z80sio_d_w(running_machine *machine, int which, int ch, UINT8 data); +UINT8 z80sio_d_r(running_machine *machine, int which, int ch); diff --git a/src/emu/memory.c b/src/emu/memory.c index 773b9d1c48e..56a02716d75 100644 --- a/src/emu/memory.c +++ b/src/emu/memory.c @@ -2602,8 +2602,8 @@ static void *allocate_memory_block(running_machine *machine, int cpunum, int spa /* register for saving, but only if we're not part of a memory region */ for (region = memory_region_next(machine, NULL); region != NULL; region = memory_region_next(machine, region)) { - UINT8 *region_base = memory_region(Machine, region); - UINT32 region_length = memory_region_length(Machine, region); + UINT8 *region_base = memory_region(machine, region); + UINT32 region_length = memory_region_length(machine, region); if (region_base != NULL && region_length != 0 && (UINT8 *)memory >= region_base && ((UINT8 *)memory + (byteend - bytestart + 1)) < region_base + region_length) { VPRINTF(("skipping save of this memory block as it is covered by a memory region\n")); diff --git a/src/mame/drivers/cchasm.c b/src/mame/drivers/cchasm.c index f8b48ce9bb8..95bd9733c37 100644 --- a/src/mame/drivers/cchasm.c +++ b/src/mame/drivers/cchasm.c @@ -123,7 +123,7 @@ INPUT_PORTS_END static MACHINE_START( cchasm ) { - ptm6840_config(0, &cchasm_6840_intf ); + ptm6840_config(machine, 0, &cchasm_6840_intf ); } diff --git a/src/mame/drivers/dlair.c b/src/mame/drivers/dlair.c index 35275422e78..4b991e8a8db 100644 --- a/src/mame/drivers/dlair.c +++ b/src/mame/drivers/dlair.c @@ -367,16 +367,16 @@ static WRITE8_HANDLER( laserdisc_w ) static READ8_HANDLER( sio_r ) { - return (offset & 1) ? z80sio_c_r(0, (offset >> 1) & 1) : z80sio_d_r(0, (offset >> 1) & 1); + return (offset & 1) ? z80sio_c_r(0, (offset >> 1) & 1) : z80sio_d_r(machine, 0, (offset >> 1) & 1); } static WRITE8_HANDLER( sio_w ) { if (offset & 1) - z80sio_c_w(0, (offset >> 1) & 1, data); + z80sio_c_w(machine, 0, (offset >> 1) & 1, data); else - z80sio_d_w(0, (offset >> 1) & 1, data); + z80sio_d_w(machine, 0, (offset >> 1) & 1, data); } diff --git a/src/mame/drivers/guab.c b/src/mame/drivers/guab.c index a3df0342146..3750a57d3c0 100644 --- a/src/mame/drivers/guab.c +++ b/src/mame/drivers/guab.c @@ -735,7 +735,7 @@ INPUT_PORTS_END static MACHINE_START( guab ) { fdc_timer = timer_alloc(fdc_data_callback, NULL); - ptm6840_config(0, &ptm_intf); + ptm6840_config(machine, 0, &ptm_intf); } static MACHINE_RESET( guab ) diff --git a/src/mame/drivers/meritm.c b/src/mame/drivers/meritm.c index 0ef274a825d..2305a53bab5 100644 --- a/src/mame/drivers/meritm.c +++ b/src/mame/drivers/meritm.c @@ -297,7 +297,7 @@ static void meritm_vdp0_interrupt(running_machine *machine, int i) meritm_vint |= 0x08; if(i) - z80pio_p_w(0, 0, meritm_vint); + z80pio_p_w(machine, 0, 0, meritm_vint); } } @@ -312,7 +312,7 @@ static void meritm_vdp1_interrupt(running_machine *machine, int i) meritm_vint |= 0x10; if(i) - z80pio_p_w(0, 0, meritm_vint); + z80pio_p_w(machine, 0, 0, meritm_vint); } } @@ -822,7 +822,7 @@ static const z80pio_interface meritm_io_pio_intf = #ifdef UNUSED_FUNCTION static void meritm_pio1_portb_input_changed_callback(void *param, UINT32 oldval, UINT32 newval) { - z80pio_p_w(1, 1, (UINT8)newval); + z80pio_p_w(Machine, 1, 1, (UINT8)newval); } #endif diff --git a/src/mame/drivers/mpu4.c b/src/mame/drivers/mpu4.c index ae39cf7bc44..255dce1b59c 100644 --- a/src/mame/drivers/mpu4.c +++ b/src/mame/drivers/mpu4.c @@ -480,7 +480,7 @@ static READ8_HANDLER( bankswitch_r ) /* IC2 6840 PTM handler */ static WRITE8_HANDLER( ic2_o1_callback ) { - ptm6840_set_c2(0,data); + ptm6840_set_c2(machine,0,data); /* copy output value to IC2 c2 this output is the clock for timer2 */ @@ -492,7 +492,7 @@ static WRITE8_HANDLER( ic2_o2_callback ) pia_set_input_ca1(0, data); /* copy output value to IC3 ca1 */ /* the output from timer2 is the input clock for timer3 */ - ptm6840_set_c3( 0, data); + ptm6840_set_c3( machine, 0, data); } @@ -501,7 +501,7 @@ static WRITE8_HANDLER( ic2_o3_callback ) /* the output from timer3 is used as a square wave for the alarm output and as an external clock source for timer 1! */ - ptm6840_set_c1( 0, data); + ptm6840_set_c1( machine, 0, data); } @@ -1238,7 +1238,7 @@ static const stepper_interface barcrest_reel_interface = }; /* Common configurations */ -static void mpu4_config_common(void) +static void mpu4_config_common(running_machine *machine) { pia_config(0,&pia_ic3_intf); pia_config(1,&pia_ic4_intf); @@ -1249,12 +1249,12 @@ static void mpu4_config_common(void) ic24_timer = timer_alloc(ic24_timeout, NULL); /* setup 6840ptm */ - ptm6840_config(0, &ptm_ic2_intf ); + ptm6840_config(machine, 0, &ptm_ic2_intf ); } static MACHINE_START( mpu4mod2 ) { - mpu4_config_common(); + mpu4_config_common(machine); pia_reset(); serial_card_connected=0; diff --git a/src/mame/drivers/mpu4drvr.c b/src/mame/drivers/mpu4drvr.c index 1f3ba12b135..82907e3b0a8 100644 --- a/src/mame/drivers/mpu4drvr.c +++ b/src/mame/drivers/mpu4drvr.c @@ -329,7 +329,7 @@ static void cpu1_ptm_irq(running_machine *machine, int state) static WRITE8_HANDLER( vid_o1_callback ) { - ptm6840_set_c2( 1, data); /* this output is the clock for timer2 */ + ptm6840_set_c2( machine, 1, data); /* this output is the clock for timer2 */ if (data) { @@ -343,13 +343,13 @@ static WRITE8_HANDLER( vid_o1_callback ) static WRITE8_HANDLER( vid_o2_callback ) { - ptm6840_set_c3( 1, data); /* this output is the clock for timer3 */ + ptm6840_set_c3( machine, 1, data); /* this output is the clock for timer3 */ } static WRITE8_HANDLER( vid_o3_callback ) { - ptm6840_set_c1( 1, data); /* this output is the clock for timer1 */ + ptm6840_set_c1( machine, 1, data); /* this output is the clock for timer1 */ } @@ -1349,10 +1349,10 @@ static INTERRUPT_GEN(mpu4_vid_irq) /* machine start (called only once) */ MACHINE_START( mpu4_vid ) { - mpu4_config_common(); + mpu4_config_common(machine); pia_reset(); - ptm6840_config(1, &ptm_vid_intf ); + ptm6840_config(machine, 1, &ptm_vid_intf ); /* setup communications */ serial_card_connected=1; diff --git a/src/mame/drivers/senjyo.c b/src/mame/drivers/senjyo.c index cc8c7704064..fc0c60c01a4 100644 --- a/src/mame/drivers/senjyo.c +++ b/src/mame/drivers/senjyo.c @@ -291,14 +291,14 @@ ADDRESS_MAP_END static WRITE8_HANDLER( pio_w ) { if (offset & 1) - z80pio_c_w(0, (offset >> 1) & 1, data); + z80pio_c_w(machine, 0, (offset >> 1) & 1, data); else - z80pio_d_w(0, (offset >> 1) & 1, data); + z80pio_d_w(machine, 0, (offset >> 1) & 1, data); } static READ8_HANDLER( pio_r ) { - return (offset & 1) ? z80pio_c_r(0, (offset >> 1) & 1) : z80pio_d_r(0, (offset >> 1) & 1); + return (offset & 1) ? z80pio_c_r(0, (offset >> 1) & 1) : z80pio_d_r(machine, 0, (offset >> 1) & 1); } static ADDRESS_MAP_START( sound_io_map, ADDRESS_SPACE_IO, 8 ) diff --git a/src/mame/machine/mcr.c b/src/mame/machine/mcr.c index a4291469305..cf14b736b72 100644 --- a/src/mame/machine/mcr.c +++ b/src/mame/machine/mcr.c @@ -936,46 +936,46 @@ static WRITE8_HANDLER( ipu_break_changed ) READ8_HANDLER( mcr_ipu_pio_0_r ) { - return (offset & 2) ? z80pio_c_r(0, offset & 1) : z80pio_d_r(0, offset & 1); + return (offset & 2) ? z80pio_c_r(0, offset & 1) : z80pio_d_r(machine, 0, offset & 1); } READ8_HANDLER( mcr_ipu_pio_1_r ) { - return (offset & 2) ? z80pio_c_r(1, offset & 1) : z80pio_d_r(1, offset & 1); + return (offset & 2) ? z80pio_c_r(1, offset & 1) : z80pio_d_r(machine, 1, offset & 1); } READ8_HANDLER( mcr_ipu_sio_r ) { - return (offset & 2) ? z80sio_c_r(0, offset & 1) : z80sio_d_r(0, offset & 1); + return (offset & 2) ? z80sio_c_r(0, offset & 1) : z80sio_d_r(machine, 0, offset & 1); } WRITE8_HANDLER( mcr_ipu_pio_0_w ) { if (offset & 2) - z80pio_c_w(0, offset & 1, data); + z80pio_c_w(machine, 0, offset & 1, data); else - z80pio_d_w(0, offset & 1, data); + z80pio_d_w(machine, 0, offset & 1, data); } WRITE8_HANDLER( mcr_ipu_pio_1_w ) { if (offset & 2) - z80pio_c_w(1, offset & 1, data); + z80pio_c_w(machine, 1, offset & 1, data); else - z80pio_d_w(1, offset & 1, data); + z80pio_d_w(machine, 1, offset & 1, data); } WRITE8_HANDLER( mcr_ipu_sio_w ) { if (offset & 2) - z80sio_c_w(0, offset & 1, data); + z80sio_c_w(machine, 0, offset & 1, data); else - z80sio_d_w(0, offset & 1, data); + z80sio_d_w(machine, 0, offset & 1, data); } |