summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--src/emu/cpu/cosmac/cosdasm.c4
-rw-r--r--src/emu/cpu/i386/cycles.h4
-rw-r--r--src/emu/cpu/i386/i386priv.h24
-rw-r--r--src/emu/cpu/i86/i286.c4
-rw-r--r--src/emu/cpu/i86/i86priv.h8
-rw-r--r--src/emu/cpu/lh5801/5801dasm.c12
-rw-r--r--src/emu/cpu/mb86233/mb86233.c4
-rw-r--r--src/emu/cpu/nec/necpriv.h16
-rw-r--r--src/emu/cpu/nec/v25priv.h20
-rw-r--r--src/emu/cpu/powerpc/ppc.c8
-rw-r--r--src/emu/cpu/rsp/rsp.h8
-rw-r--r--src/emu/cpu/saturn/saturnds.c4
-rw-r--r--src/emu/cpu/sc61860/scdasm.c4
-rw-r--r--src/emu/cpu/sharc/sharc.c4
-rw-r--r--src/emu/cpu/sharc/sharc.h4
-rw-r--r--src/emu/cpu/tms7000/7000dasm.c2
-rw-r--r--src/emu/cpu/tms9900/9900dasm.c4
-rw-r--r--src/emu/cpu/tms9900/99xxcore.h4
-rw-r--r--src/emu/cpu/upd7810/upd7810.h4
-rw-r--r--src/emu/cpu/v30mz/v30mz.c8
-rw-r--r--src/emu/eigccx86.h4
-rw-r--r--src/emu/machine/8042kbdc.h4
-rw-r--r--src/emu/machine/m6m80011ap.h4
-rw-r--r--src/emu/machine/pckeybrd.h4
-rw-r--r--src/emu/machine/pic8259.c4
-rw-r--r--src/emu/machine/rtc9701.h4
-rw-r--r--src/emu/machine/s3520cf.h4
-rw-r--r--src/emu/sound/aica.c2
-rw-r--r--src/emu/sound/discrete.h4
-rw-r--r--src/emu/sound/multipcm.c2
-rw-r--r--src/emu/sound/scsp.c2
-rw-r--r--src/emu/sound/sid6581.h4
-rw-r--r--src/emu/video/m50458.h4
-rw-r--r--src/lib/util/opresolv.h4
-rw-r--r--src/mame/drivers/quizpun2.c2
-rw-r--r--src/mame/machine/md_cart.c4
-rw-r--r--src/mame/machine/scudsp.c8
-rw-r--r--src/mame/machine/stvcd.c8
-rw-r--r--src/mame/video/hng64.c4
-rw-r--r--src/mame/video/namcos22.c4
-rw-r--r--src/mame/video/vdc.c4
-rw-r--r--src/mess/audio/mea8000.c4
-rw-r--r--src/mess/audio/svision.c4
-rw-r--r--src/mess/drivers/pcw16.c4
-rw-r--r--src/mess/formats/spec_snqk.h8
-rw-r--r--src/mess/includes/apple2.h8
-rw-r--r--src/mess/includes/apple2gs.h8
-rw-r--r--src/mess/includes/dgn_beta.h4
-rw-r--r--src/mess/includes/hp48.h4
-rw-r--r--src/mess/includes/mac.h8
-rw-r--r--src/mess/includes/macpci.h4
-rw-r--r--src/mess/includes/z80ne.h4
-rw-r--r--src/mess/machine/applefdc.c4
-rw-r--r--src/mess/machine/ay31015.c4
-rw-r--r--src/mess/machine/ay31015.h12
-rw-r--r--src/mess/machine/coco_fdc.h4
-rw-r--r--src/mess/machine/ds1315.c4
-rw-r--r--src/mess/machine/i8271.c4
-rw-r--r--src/mess/machine/kr2376.h8
-rw-r--r--src/mess/machine/thomson.c4
-rw-r--r--src/mess/machine/upd765.c8
-rw-r--r--src/mess/machine/upd765.h4
-rw-r--r--src/mess/tools/imgtool/charconv.h4
-rw-r--r--src/mess/tools/imgtool/imgterrs.h4
-rw-r--r--src/mess/tools/imgtool/library.h16
-rw-r--r--src/mess/tools/imgtool/modules/amiga.c8
-rw-r--r--src/mess/tools/imgtool/modules/fat.c8
-rw-r--r--src/mess/tools/imgtool/modules/mac.c6
-rw-r--r--src/mess/tools/imgtool/modules/macutil.h8
-rw-r--r--src/mess/tools/imgtool/modules/os9.c4
-rw-r--r--src/mess/tools/imgtool/modules/prodos.c4
-rw-r--r--src/mess/tools/imgtool/modules/thomson.c4
-rw-r--r--src/mess/tools/imgtool/modules/ti99.c4
-rw-r--r--src/mess/tools/imgtool/stream.c4
-rw-r--r--src/mess/video/911_vdt.h6
-rw-r--r--src/mess/video/vic4567.h4
-rw-r--r--src/mess/video/vic6567.h4
-rw-r--r--src/osd/sdl/gl_shader_mgr.h8
-rw-r--r--src/osd/sdl/gl_shader_tool.h4
79 files changed, 225 insertions, 225 deletions
diff --git a/src/emu/cpu/cosmac/cosdasm.c b/src/emu/cpu/cosmac/cosdasm.c
index aa5dbe4a8fd..c7a7aa31c9e 100644
--- a/src/emu/cpu/cosmac/cosdasm.c
+++ b/src/emu/cpu/cosmac/cosdasm.c
@@ -24,7 +24,7 @@
#include "cosmac.h"
-typedef enum
+enum Adr
{
Ill,
Imm,
@@ -33,7 +33,7 @@ typedef enum
Imp3, // bit 0,1,2 1..7 contains n0,n1,n2 level
Low, // only low byte of address specified
Abs
-} Adr;
+};
static const struct { const char *mnemonic; Adr adr; } table[]={
{ "IDL", Imp }, { "LDN", Imp2},{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
diff --git a/src/emu/cpu/i386/cycles.h b/src/emu/cpu/i386/cycles.h
index 1cf8c46204a..5ccaa928b62 100644
--- a/src/emu/cpu/i386/cycles.h
+++ b/src/emu/cpu/i386/cycles.h
@@ -3,7 +3,7 @@
#ifndef __CYCLES_H__
#define __CYCLES_H__
-typedef enum
+enum X86_CYCLES
{
CYCLES_MOV_REG_REG,
CYCLES_MOV_REG_MEM,
@@ -327,7 +327,7 @@ typedef enum
CYCLES_XADD_REG_MEM,
CYCLES_NUM_OPCODES
-} X86_CYCLES;
+};
#define X86_NUM_CPUS 4
diff --git a/src/emu/cpu/i386/i386priv.h b/src/emu/cpu/i386/i386priv.h
index 8344f3075c1..ee530363fb2 100644
--- a/src/emu/cpu/i386/i386priv.h
+++ b/src/emu/cpu/i386/i386priv.h
@@ -17,9 +17,9 @@
extern int i386_dasm_one(char *buffer, UINT32 pc, const UINT8 *oprom, int mode);
-typedef enum { ES, CS, SS, DS, FS, GS } SREGS;
+enum SREGS { ES, CS, SS, DS, FS, GS };
-typedef enum
+enum BREGS
{
AL = NATIVE_ENDIAN_VALUE_LE_BE(0,3),
AH = NATIVE_ENDIAN_VALUE_LE_BE(1,2),
@@ -29,9 +29,9 @@ typedef enum
DH = NATIVE_ENDIAN_VALUE_LE_BE(9,10),
BL = NATIVE_ENDIAN_VALUE_LE_BE(12,15),
BH = NATIVE_ENDIAN_VALUE_LE_BE(13,14)
-} BREGS;
+};
-typedef enum
+enum WREGS
{
AX = NATIVE_ENDIAN_VALUE_LE_BE(0,1),
CX = NATIVE_ENDIAN_VALUE_LE_BE(2,3),
@@ -41,9 +41,9 @@ typedef enum
BP = NATIVE_ENDIAN_VALUE_LE_BE(10,11),
SI = NATIVE_ENDIAN_VALUE_LE_BE(12,13),
DI = NATIVE_ENDIAN_VALUE_LE_BE(14,15)
-} WREGS;
+};
-typedef enum { EAX, ECX, EDX, EBX, ESP, EBP, ESI, EDI } DREGS;
+enum DREGS { EAX, ECX, EDX, EBX, ESP, EBP, ESI, EDI };
enum
{
@@ -229,26 +229,26 @@ struct I386_SEG_DESC {
UINT32 limit;
};
-typedef union {
+union I386_GPR {
UINT32 d[8];
UINT16 w[16];
UINT8 b[32];
-} I386_GPR;
+};
-typedef union {
+union X87_REG {
UINT64 i;
double f;
-} X87_REG;
+};
typedef UINT64 MMX_REG;
-typedef union {
+union XMM_REG {
UINT32 d[4];
UINT16 w[8];
UINT8 b[16];
UINT64 q[2];
float f[4];
-} XMM_REG;
+};
struct i386_state
{
diff --git a/src/emu/cpu/i86/i286.c b/src/emu/cpu/i86/i286.c
index 99341b69f4a..0c3f9ab7a1b 100644
--- a/src/emu/cpu/i86/i286.c
+++ b/src/emu/cpu/i86/i286.c
@@ -26,11 +26,11 @@
/* cpu state */
/***************************************************************************/
/* I86 registers */
-typedef union
+union i80286basicregs
{ /* eight general registers */
UINT16 w[8]; /* viewed as 16 bits registers */
UINT8 b[16]; /* or as 8 bit registers */
-} i80286basicregs;
+};
struct i80286_state
{
diff --git a/src/emu/cpu/i86/i86priv.h b/src/emu/cpu/i86/i86priv.h
index 0c51e3bc571..c2dcbfbdc3c 100644
--- a/src/emu/cpu/i86/i86priv.h
+++ b/src/emu/cpu/i86/i86priv.h
@@ -10,8 +10,8 @@
#define I8086_NMI_INT_VECTOR 2
-typedef enum { ES, CS, SS, DS } SREGS;
-typedef enum { AX, CX, DX, BX, SP, BP, SI, DI } WREGS;
+enum SREGS { ES, CS, SS, DS };
+enum WREGS { AX, CX, DX, BX, SP, BP, SI, DI };
#ifndef FALSE
#define FALSE 0
@@ -19,7 +19,7 @@ typedef enum { AX, CX, DX, BX, SP, BP, SI, DI } WREGS;
#endif
-typedef enum {
+enum BREGS {
AL = NATIVE_ENDIAN_VALUE_LE_BE(0x0, 0x1),
AH = NATIVE_ENDIAN_VALUE_LE_BE(0x1, 0x0),
CL = NATIVE_ENDIAN_VALUE_LE_BE(0x2, 0x3),
@@ -36,7 +36,7 @@ typedef enum {
SIH = NATIVE_ENDIAN_VALUE_LE_BE(0xd, 0xc),
DIL = NATIVE_ENDIAN_VALUE_LE_BE(0xe, 0xf),
DIH = NATIVE_ENDIAN_VALUE_LE_BE(0xf, 0xe)
-} BREGS;
+};
/* parameter x = result, y = source 1, z = source 2 */
diff --git a/src/emu/cpu/lh5801/5801dasm.c b/src/emu/cpu/lh5801/5801dasm.c
index 6e6a50bffdf..6d669000490 100644
--- a/src/emu/cpu/lh5801/5801dasm.c
+++ b/src/emu/cpu/lh5801/5801dasm.c
@@ -24,7 +24,7 @@
#include "lh5801.h"
-typedef enum
+enum Adr
{
Imp,
Reg,
@@ -44,9 +44,9 @@ typedef enum
ME1AbsImm,
RelP,
RelM
-} Adr;
+};
-typedef enum
+enum Regs
{
RegNone,
A,
@@ -54,7 +54,7 @@ typedef enum
YL, YH, Y,
UL, UH, U,
P, S
-} Regs;
+};
static const char *const RegNames[]= {
0, "A", "XL", "XH", "X", "YL", "YH", "Y", "UL", "UH", "U", "P", "S"
@@ -64,7 +64,7 @@ static const char *const RegNames[]= {
#undef SEC
#endif
-typedef enum
+enum Ins
{
ILL, ILL2, PREFD, NOP,
@@ -97,7 +97,7 @@ typedef enum
RDP, SDP,// reset display flip flop
RPU, SPU,// flip flop pu off
RPV, SPV,// flip flop pv off
-} Ins;
+};
static const char *const InsNames[]={
"ILL", "ILL", 0, "NOP",
diff --git a/src/emu/cpu/mb86233/mb86233.c b/src/emu/cpu/mb86233/mb86233.c
index 3607688334f..0f309f6be1a 100644
--- a/src/emu/cpu/mb86233/mb86233.c
+++ b/src/emu/cpu/mb86233/mb86233.c
@@ -23,12 +23,12 @@ CPU_DISASSEMBLE( mb86233 );
STRUCTURES & TYPEDEFS
***************************************************************************/
-typedef union
+union MB86233_REG
{
INT32 i;
UINT32 u;
float f;
-} MB86233_REG;
+};
struct mb86233_state
{
diff --git a/src/emu/cpu/nec/necpriv.h b/src/emu/cpu/nec/necpriv.h
index e0ffe8297de..e3e3f4d6600 100644
--- a/src/emu/cpu/nec/necpriv.h
+++ b/src/emu/cpu/nec/necpriv.h
@@ -19,19 +19,19 @@ enum
};
/* interrupt sources */
-typedef enum
+enum INTSOURCES
{
BRK = 0,
INT_IRQ = 1,
NMI_IRQ = 2,
-} INTSOURCES;
+};
/* NEC registers */
-typedef union
+union necbasicregs
{ /* eight general registers */
UINT16 w[8]; /* viewed as 16 bits registers */
UINT8 b[16]; /* or as 8 bit registers */
-} necbasicregs;
+};
struct nec_state_t
{
@@ -71,9 +71,9 @@ struct nec_state_t
UINT8 seg_prefix; /* prefix segment indicator */
};
-typedef enum { DS1, PS, SS, DS0 } SREGS;
-typedef enum { AW, CW, DW, BW, SP, BP, IX, IY } WREGS;
-typedef enum {
+enum SREGS { DS1, PS, SS, DS0 };
+enum WREGS { AW, CW, DW, BW, SP, BP, IX, IY };
+enum BREGS {
AL = NATIVE_ENDIAN_VALUE_LE_BE(0x0, 0x1),
AH = NATIVE_ENDIAN_VALUE_LE_BE(0x1, 0x0),
CL = NATIVE_ENDIAN_VALUE_LE_BE(0x2, 0x3),
@@ -82,7 +82,7 @@ typedef enum {
DH = NATIVE_ENDIAN_VALUE_LE_BE(0x5, 0x4),
BL = NATIVE_ENDIAN_VALUE_LE_BE(0x6, 0x7),
BH = NATIVE_ENDIAN_VALUE_LE_BE(0x7, 0x6),
-} BREGS;
+};
#define Sreg(x) nec_state->sregs[x]
#define Wreg(x) nec_state->regs.w[x]
diff --git a/src/emu/cpu/nec/v25priv.h b/src/emu/cpu/nec/v25priv.h
index 685792bf2ff..5b4fe851c55 100644
--- a/src/emu/cpu/nec/v25priv.h
+++ b/src/emu/cpu/nec/v25priv.h
@@ -35,7 +35,7 @@ enum
};
/* interrupt sources */
-typedef enum
+enum INTSOURCES
{
BRK = 0,
INT_IRQ = 1,
@@ -57,14 +57,14 @@ typedef enum
INTTB = 1 << 16,
BRKN = 1 << 17,
BRKS = 1 << 18
-} INTSOURCES;
+};
/* internal RAM and register banks */
-typedef union
+union internalram
{
UINT16 w[128];
UINT8 b[256];
-} internalram;
+};
struct v25_state_t
{
@@ -127,14 +127,14 @@ enum {
PC_SAVE = 0x06/2
};
-typedef enum {
+enum SREGS {
DS1 = 0x0E/2,
PS = 0x0C/2,
SS = 0x0A/2,
DS0 = 0x08/2
-} SREGS;
+};
-typedef enum {
+enum WREGS {
AW = 0x1E/2,
CW = 0x1C/2,
DW = 0x1A/2,
@@ -143,9 +143,9 @@ typedef enum {
BP = 0x14/2,
IX = 0x12/2,
IY = 0x10/2
-} WREGS;
+};
-typedef enum {
+enum BREGS {
AL = NATIVE_ENDIAN_VALUE_LE_BE(0x1E, 0x1F),
AH = NATIVE_ENDIAN_VALUE_LE_BE(0x1F, 0x1E),
CL = NATIVE_ENDIAN_VALUE_LE_BE(0x1C, 0x1D),
@@ -154,7 +154,7 @@ typedef enum {
DH = NATIVE_ENDIAN_VALUE_LE_BE(0x1B, 0x1A),
BL = NATIVE_ENDIAN_VALUE_LE_BE(0x18, 0x19),
BH = NATIVE_ENDIAN_VALUE_LE_BE(0x19, 0x18)
-} BREGS;
+};
#define SetRB(x) do { nec_state->RBW = (x) << 4; nec_state->RBB = (x) << 5; } while (0)
diff --git a/src/emu/cpu/powerpc/ppc.c b/src/emu/cpu/powerpc/ppc.c
index 44a59f72b3d..2cecbab2d8b 100644
--- a/src/emu/cpu/powerpc/ppc.c
+++ b/src/emu/cpu/powerpc/ppc.c
@@ -216,15 +216,15 @@ struct SPU_REGS {
emu_timer *tx_timer;
};
-typedef union {
+union FPR {
UINT64 id;
double fd;
-} FPR;
+};
-typedef union {
+union FPR32 {
UINT32 i;
float f;
-} FPR32;
+};
struct BATENT {
UINT32 u;
diff --git a/src/emu/cpu/rsp/rsp.h b/src/emu/cpu/rsp/rsp.h
index 1d0ae9ae50b..308b3ed86e2 100644
--- a/src/emu/cpu/rsp/rsp.h
+++ b/src/emu/cpu/rsp/rsp.h
@@ -138,20 +138,20 @@ void rspdrc_add_imem(device_t *device, UINT32 *base);
#define RSPDRC_STRICT_VERIFY 0x0001 /* verify all instructions */
-typedef union
+union VECTOR_REG
{
UINT64 d[2];
UINT32 l[4];
INT16 s[8];
UINT8 b[16];
-} VECTOR_REG;
+};
-typedef union
+union ACCUMULATOR_REG
{
INT64 q;
INT32 l[2];
INT16 w[4];
-} ACCUMULATOR_REG;
+};
typedef struct _rspimp_state rspimp_state;
struct rsp_state
diff --git a/src/emu/cpu/saturn/saturnds.c b/src/emu/cpu/saturn/saturnds.c
index a5aa9f555c0..46e1760549a 100644
--- a/src/emu/cpu/saturn/saturnds.c
+++ b/src/emu/cpu/saturn/saturnds.c
@@ -71,7 +71,7 @@ static const char number_2_hex[]=
// don't split branch and return, source relies on this ordering
-typedef enum
+enum MNEMONICS
{
Return, ReturnSetXM, ReturnSetCarry, ReturnClearCarry, ReturnFromInterrupt,
jump3,jump4,jump,
@@ -197,7 +197,7 @@ typedef enum
negateA, negateB, negateC, negateD,
notA, notB, notC, notD
-} MNEMONICS;
+};
static const struct {
const char *name[2];
diff --git a/src/emu/cpu/sc61860/scdasm.c b/src/emu/cpu/sc61860/scdasm.c
index 1ac4137bf72..1ebe8005a73 100644
--- a/src/emu/cpu/sc61860/scdasm.c
+++ b/src/emu/cpu/sc61860/scdasm.c
@@ -79,7 +79,7 @@
*/
-typedef enum
+enum Adr
{
Ill,
Imp,
@@ -90,7 +90,7 @@ typedef enum
Etc,
Cal,
Lp
-} Adr;
+};
static const struct { const char *mnemonic; Adr adr; } table[]={
{ "LII", Imm }, { "LIJ", Imm }, { "LIA", Imm }, { "LIB", Imm },
diff --git a/src/emu/cpu/sharc/sharc.c b/src/emu/cpu/sharc/sharc.c
index 22cf6fd5167..c844825dc7d 100644
--- a/src/emu/cpu/sharc/sharc.c
+++ b/src/emu/cpu/sharc/sharc.c
@@ -47,11 +47,11 @@ struct SHARC_DAG
UINT32 l[8];
};
-typedef union
+union SHARC_REG
{
INT32 r;
float f;
-} SHARC_REG;
+};
struct DMA_REGS
{
diff --git a/src/emu/cpu/sharc/sharc.h b/src/emu/cpu/sharc/sharc.h
index 1a858d85957..84bda15bb77 100644
--- a/src/emu/cpu/sharc/sharc.h
+++ b/src/emu/cpu/sharc/sharc.h
@@ -9,13 +9,13 @@
#define SHARC_INPUT_FLAG2 5
#define SHARC_INPUT_FLAG3 6
-typedef enum
+enum SHARC_BOOT_MODE
{
BOOT_MODE_EPROM,
BOOT_MODE_HOST,
BOOT_MODE_LINK,
BOOT_MODE_NOBOOT
-} SHARC_BOOT_MODE;
+};
struct sharc_config {
SHARC_BOOT_MODE boot_mode;
diff --git a/src/emu/cpu/tms7000/7000dasm.c b/src/emu/cpu/tms7000/7000dasm.c
index 380cc43aae1..a06a5b03267 100644
--- a/src/emu/cpu/tms7000/7000dasm.c
+++ b/src/emu/cpu/tms7000/7000dasm.c
@@ -2,7 +2,7 @@
#include "debugger.h"
#include "tms7000.h"
-typedef enum { DONE, NONE, UI8, I8, UI16, I16, PCREL, PCABS, TRAP } operandtype;
+enum operandtype { DONE, NONE, UI8, I8, UI16, I16, PCREL, PCABS, TRAP };
struct oprandinfo {
char opstr[4][12];
diff --git a/src/emu/cpu/tms9900/9900dasm.c b/src/emu/cpu/tms9900/9900dasm.c
index 045d6431209..6be25b8a40b 100644
--- a/src/emu/cpu/tms9900/9900dasm.c
+++ b/src/emu/cpu/tms9900/9900dasm.c
@@ -27,7 +27,7 @@
#define MASK 0x0000ffff
#define BITS(val,n1,n2) ((val>>(15-(n2))) & (MASK>>(15-((n2)-(n1)))))
-typedef enum
+enum format_t
{
format_1, /* 2 address instructions */
format_2a, /* jump instructions */
@@ -55,7 +55,7 @@ typedef enum
format_21, /* extend precision instruction */
illegal
-} format_t;
+};
/* definitions for flags */
enum
diff --git a/src/emu/cpu/tms9900/99xxcore.h b/src/emu/cpu/tms9900/99xxcore.h
index fd52e414caf..6bc090d0518 100644
--- a/src/emu/cpu/tms9900/99xxcore.h
+++ b/src/emu/cpu/tms9900/99xxcore.h
@@ -1993,11 +1993,11 @@ static void set_flag1(tms99xx_state *cpustate, int val)
#endif
-typedef enum
+enum cru_error_code
{
CRU_OK = 0,
CRU_PRIVILEGE_VIOLATION = -1
-} cru_error_code;
+};
#define WRITEPORT(cs, port, data) (cs)->io->write_byte(port, data)
diff --git a/src/emu/cpu/upd7810/upd7810.h b/src/emu/cpu/upd7810/upd7810.h
index ab147ac3ebe..c2da1d43f70 100644
--- a/src/emu/cpu/upd7810/upd7810.h
+++ b/src/emu/cpu/upd7810/upd7810.h
@@ -11,7 +11,7 @@
*/
// unfortunatly memory configuration differs with internal rom size
-typedef enum
+enum UPD7810_TYPE
{
TYPE_7801,
TYPE_78C05,
@@ -24,7 +24,7 @@ typedef enum
// TYPE_78K0,
// TYPE_78K0S
// millions of subtypes
-} UPD7810_TYPE;
+};
/* Supply an instance of this function in your driver code:
* It will be called whenever an output signal changes or a new
diff --git a/src/emu/cpu/v30mz/v30mz.c b/src/emu/cpu/v30mz/v30mz.c
index 7ee243d0ff4..793ba36034c 100644
--- a/src/emu/cpu/v30mz/v30mz.c
+++ b/src/emu/cpu/v30mz/v30mz.c
@@ -45,12 +45,12 @@
#include "v30mz.h"
-typedef enum { ES=0, CS, SS, DS } SREGS;
-typedef enum { AW=0, CW, DW, BW, SP, BP, IX, IY } WREGS;
+enum SREGS { ES=0, CS, SS, DS };
+enum WREGS { AW=0, CW, DW, BW, SP, BP, IX, IY };
#define NEC_NMI_INT_VECTOR 2
-typedef enum {
+enum BREGS {
AL = NATIVE_ENDIAN_VALUE_LE_BE(0x0, 0x1),
AH = NATIVE_ENDIAN_VALUE_LE_BE(0x1, 0x0),
CL = NATIVE_ENDIAN_VALUE_LE_BE(0x2, 0x3),
@@ -67,7 +67,7 @@ typedef enum {
IXH = NATIVE_ENDIAN_VALUE_LE_BE(0xd, 0xc),
IYL = NATIVE_ENDIAN_VALUE_LE_BE(0xe, 0xf),
IYH = NATIVE_ENDIAN_VALUE_LE_BE(0xf, 0xe)
-} BREGS;
+};
#define CF (m_CarryVal!=0)
diff --git a/src/emu/eigccx86.h b/src/emu/eigccx86.h
index 43e3c49ab51..fc0af12fbfa 100644
--- a/src/emu/eigccx86.h
+++ b/src/emu/eigccx86.h
@@ -27,13 +27,13 @@
INLINE MATH FUNCTIONS
***************************************************************************/
-typedef union
+union _x86_union
{
UINT64 u64;
struct {
UINT32 l, h;
} u32;
-} _x86_union;
+};
/*-------------------------------------------------
mul_32x32 - perform a signed 32 bit x 32 bit
diff --git a/src/emu/machine/8042kbdc.h b/src/emu/machine/8042kbdc.h
index d3efc82d36a..607b931b727 100644
--- a/src/emu/machine/8042kbdc.h
+++ b/src/emu/machine/8042kbdc.h
@@ -10,12 +10,12 @@
#ifndef KBDC8042_H
#define KBDC8042_H
-typedef enum
+enum kbdc8042_type_t
{
KBDC8042_STANDARD,
KBDC8042_PS2, /* another timing of integrated controller */
KBDC8042_AT386 /* hack for at386 driver */
-} kbdc8042_type_t;
+};
struct kbdc8042_interface
diff --git a/src/emu/machine/m6m80011ap.h b/src/emu/machine/m6m80011ap.h
index 15d690a7401..47abaf05c03 100644
--- a/src/emu/machine/m6m80011ap.h
+++ b/src/emu/machine/m6m80011ap.h
@@ -24,7 +24,7 @@ Template for skeleton device
// TYPE DEFINITIONS
//**************************************************************************
-typedef enum
+enum eeprom_cmd_t
{
EEPROM_GET_CMD = 0,
EEPROM_READ,
@@ -32,7 +32,7 @@ typedef enum
EEPROM_WRITE_ENABLE,
EEPROM_WRITE_DISABLE,
EEPROM_STATUS_OUTPUT
-} eeprom_cmd_t;
+};
// ======================> m6m80011ap_device
diff --git a/src/emu/machine/pckeybrd.h b/src/emu/machine/pckeybrd.h
index ed1f4c4439a..28575cb151d 100644
--- a/src/emu/machine/pckeybrd.h
+++ b/src/emu/machine/pckeybrd.h
@@ -12,12 +12,12 @@
#ifndef PCKEYBRD_H
#define PCKEYBRD_H
-typedef enum
+enum AT_KEYBOARD_TYPE
{
AT_KEYBOARD_TYPE_PC,
AT_KEYBOARD_TYPE_AT,
AT_KEYBOARD_TYPE_MF2
-} AT_KEYBOARD_TYPE;
+};
void at_keyboard_init(running_machine &machine, AT_KEYBOARD_TYPE type);
diff --git a/src/emu/machine/pic8259.c b/src/emu/machine/pic8259.c
index 2f52daf52df..aef316bcccc 100644
--- a/src/emu/machine/pic8259.c
+++ b/src/emu/machine/pic8259.c
@@ -20,14 +20,14 @@
#define LOG_OCW 0
#define LOG_GENERAL 0
-typedef enum
+enum pic8259_state_t
{
STATE_ICW1,
STATE_ICW2,
STATE_ICW3,
STATE_ICW4,
STATE_READY
-} pic8259_state_t;
+};
typedef struct pic8259 pic8259_t;
diff --git a/src/emu/machine/rtc9701.h b/src/emu/machine/rtc9701.h
index 3f1e07d9bad..8f08891beed 100644
--- a/src/emu/machine/rtc9701.h
+++ b/src/emu/machine/rtc9701.h
@@ -26,7 +26,7 @@
//**************************************************************************
-typedef enum
+enum rtc9701_state_t
{
RTC9701_CMD_WAIT = 0,
RTC9701_RTC_READ,
@@ -35,7 +35,7 @@ typedef enum
RTC9701_EEPROM_WRITE,
RTC9701_AFTER_WRITE_ENABLE,
-} rtc9701_state_t;
+};
struct rtc_regs_t
{
diff --git a/src/emu/machine/s3520cf.h b/src/emu/machine/s3520cf.h
index e7c1d58eee5..2f231f404b1 100644
--- a/src/emu/machine/s3520cf.h
+++ b/src/emu/machine/s3520cf.h
@@ -23,11 +23,11 @@ Template for skeleton device
// TYPE DEFINITIONS
//**************************************************************************
-typedef enum
+enum s3520cf_state_t
{
RTC_SET_ADDRESS = 0,
RTC_SET_DATA
-} s3520cf_state_t;
+};
struct rtc_regs_t
{
diff --git a/src/emu/sound/aica.c b/src/emu/sound/aica.c
index dac69178d21..1d660884f26 100644
--- a/src/emu/sound/aica.c
+++ b/src/emu/sound/aica.c
@@ -81,7 +81,7 @@ static const double DRTimes[64]={100000/*infinity*/,100000/*infinity*/,118200.0,
28.0,25.0,22.0,18.0,14.0,12.0,11.0,8.5,7.1,6.1,5.4,4.3,3.6,3.1};
static INT32 EG_TABLE[0x400];
-typedef enum {ATTACK,DECAY1,DECAY2,RELEASE} _STATE;
+enum _STATE {ATTACK,DECAY1,DECAY2,RELEASE};
struct _EG
{
int volume; //
diff --git a/src/emu/sound/discrete.h b/src/emu/sound/discrete.h
index d59ca5e12a4..97837f5434c 100644
--- a/src/emu/sound/discrete.h
+++ b/src/emu/sound/discrete.h
@@ -4139,7 +4139,7 @@ enum {
*
*************************************/
-typedef enum
+enum discrete_node_type
{
DSS_NULL, /* Nothing, nill, zippo, only to be used as terminating node */
DSS_NOP, /* just do nothing, placeholder for potential DISCRETE_REPLACE in parent block */
@@ -4169,7 +4169,7 @@ typedef enum
/* Marks end of this enum -- must be last entry ! */
DSO_LAST
-} discrete_node_type;
+};
/*************************************
*
diff --git a/src/emu/sound/multipcm.c b/src/emu/sound/multipcm.c
index eae6fd797bf..1f86058e85b 100644
--- a/src/emu/sound/multipcm.c
+++ b/src/emu/sound/multipcm.c
@@ -48,7 +48,7 @@ struct _Sample
unsigned char AM;
};
-typedef enum {ATTACK,DECAY1,DECAY2,RELEASE} _STATE;
+enum _STATE {ATTACK,DECAY1,DECAY2,RELEASE};
ALLOW_SAVE_TYPE(_STATE); // allow save_item on a non-fundamental type
struct _EG
{
diff --git a/src/emu/sound/scsp.c b/src/emu/sound/scsp.c
index 95a5f0f0eaa..3adf4b9fb8c 100644
--- a/src/emu/sound/scsp.c
+++ b/src/emu/sound/scsp.c
@@ -111,7 +111,7 @@ static const double DRTimes[64]={100000/*infinity*/,100000/*infinity*/,118200.0,
28.0,25.0,22.0,18.0,14.0,12.0,11.0,8.5,7.1,6.1,5.4,4.3,3.6,3.1};
static INT32 EG_TABLE[0x400];
-typedef enum {ATTACK,DECAY1,DECAY2,RELEASE} _STATE;
+enum _STATE {ATTACK,DECAY1,DECAY2,RELEASE};
struct _EG
{
int volume; //
diff --git a/src/emu/sound/sid6581.h b/src/emu/sound/sid6581.h
index 566bfab9519..53f37e713c0 100644
--- a/src/emu/sound/sid6581.h
+++ b/src/emu/sound/sid6581.h
@@ -14,11 +14,11 @@
#include "devlegcy.h"
-typedef enum
+enum SIDTYPE
{
MOS6581,
MOS8580
-} SIDTYPE;
+};
#define MOS6581_INTERFACE(name) \
const sid6581_interface (name) =
diff --git a/src/emu/video/m50458.h b/src/emu/video/m50458.h
index 192b5cd2753..bce73ccd5c0 100644
--- a/src/emu/video/m50458.h
+++ b/src/emu/video/m50458.h
@@ -28,11 +28,11 @@ Mitsubishi M50458 OSD chip
// TYPE DEFINITIONS
//**************************************************************************
-typedef enum
+enum m50458_state_t
{
OSD_SET_ADDRESS = 0,
OSD_SET_DATA
-} m50458_state_t;
+};
// ======================> upd7220_interface
diff --git a/src/lib/util/opresolv.h b/src/lib/util/opresolv.h
index c5aad88ba2c..3cc3ad1cc24 100644
--- a/src/lib/util/opresolv.h
+++ b/src/lib/util/opresolv.h
@@ -91,7 +91,7 @@ struct option_guide
#define OPTION_ENUM_END
-typedef enum
+enum optreserr_t
{
OPTIONRESOLUTION_ERROR_SUCCESS,
OPTIONRESOLUTION_ERROR_OUTOFMEMORY,
@@ -102,7 +102,7 @@ typedef enum
OPTIONRESOLUTION_ERROR_BADPARAM,
OPTIONRESOLUTION_ERROR_SYNTAX,
OPTIONRESOLTUION_ERROR_INTERNAL
-} optreserr_t;
+};
diff --git a/src/mame/drivers/quizpun2.c b/src/mame/drivers/quizpun2.c
index 6d0ce580939..ea52a2cfb44 100644
--- a/src/mame/drivers/quizpun2.c
+++ b/src/mame/drivers/quizpun2.c
@@ -79,7 +79,7 @@ Notes:
#include "sound/2203intf.h"
-typedef enum { STATE_IDLE = 0, STATE_ADDR_R, STATE_ROM_R, STATE_EEPROM_R, STATE_EEPROM_W } prot_state;
+enum prot_state { STATE_IDLE = 0, STATE_ADDR_R, STATE_ROM_R, STATE_EEPROM_R, STATE_EEPROM_W };
struct prot_t {
prot_state state;
int wait_param;
diff --git a/src/mame/machine/md_cart.c b/src/mame/machine/md_cart.c
index f4e654f212b..209c3a739c6 100644
--- a/src/mame/machine/md_cart.c
+++ b/src/mame/machine/md_cart.c
@@ -1044,7 +1044,7 @@ static WRITE16_HANDLER( codemasters_eeprom_w )
/* ST M95320 32Kbit serial EEPROM implementation */
#define M95320_SIZE 0x1000
-typedef enum
+enum STMSTATE
{
IDLE = 0,
CMD_WRSR,
@@ -1053,7 +1053,7 @@ typedef enum
CMD_WRITE,
READING,
WRITING
-} STMSTATE;
+};
class stm95_device
{
diff --git a/src/mame/machine/scudsp.c b/src/mame/machine/scudsp.c
index 2d5ba1f4775..1626d4c1aeb 100644
--- a/src/mame/machine/scudsp.c
+++ b/src/mame/machine/scudsp.c
@@ -93,15 +93,15 @@ Changelog:
#define SET_Z(_val) (state->m_scu_regs[32] = ((state->m_scu_regs[32] & ~0x00200000) | ((_val) ? 0x00200000 : 0)))
#define SET_V(_val) (state->m_scu_regs[32] = ((state->m_scu_regs[32] & ~0x00080000) | ((_val) ? 0x00080000 : 0)))
-typedef union {
+union SCUDSPREG32 {
INT32 si;
UINT32 ui;
-} SCUDSPREG32;
+};
-typedef union {
+union SCUDSPREG16 {
INT16 si;
UINT16 ui;
-} SCUDSPREG16;
+};
static struct {
UINT8 pc; /*Program Counter*/
diff --git a/src/mame/machine/stvcd.c b/src/mame/machine/stvcd.c
index 9189d5d14c7..0631dcc6641 100644
--- a/src/mame/machine/stvcd.c
+++ b/src/mame/machine/stvcd.c
@@ -101,7 +101,7 @@ struct partitionT
};
// 16-bit transfer types
-typedef enum
+enum transT
{
XFERTYPE_INVALID,
XFERTYPE_TOC,
@@ -109,15 +109,15 @@ typedef enum
XFERTYPE_FILEINFO_254,
XFERTYPE_SUBQ,
XFERTYPE_SUBRW
-} transT;
+};
// 32-bit transfer types
-typedef enum
+enum trans32T
{
XFERTYPE32_INVALID,
XFERTYPE32_GETSECTOR,
XFERTYPE32_GETDELETESECTOR
-} trans32T;
+};
// local variables
static timer_device *sector_timer;
diff --git a/src/mame/video/hng64.c b/src/mame/video/hng64.c
index 3a3ed867f13..2053434cce4 100644
--- a/src/mame/video/hng64.c
+++ b/src/mame/video/hng64.c
@@ -681,12 +681,12 @@ WRITE32_MEMBER(hng64_state::hng64_videoram_w)
}
/* internal set of transparency states for rendering */
-typedef enum
+enum hng64trans_t
{
HNG64_TILEMAP_NORMAL = 1,
HNG64_TILEMAP_ADDITIVE,
HNG64_TILEMAP_ALPHA
-} hng64trans_t;
+};
struct blit_parameters
diff --git a/src/mame/video/namcos22.c b/src/mame/video/namcos22.c
index 1568bdd137e..f51af55e499 100644
--- a/src/mame/video/namcos22.c
+++ b/src/mame/video/namcos22.c
@@ -953,12 +953,12 @@ static struct
int power; /* 0.0..1.0 */
} mCamera;
-typedef enum
+enum SceneNodeType
{
eSCENENODE_NONLEAF,
eSCENENODE_QUAD3D,
eSCENENODE_SPRITE
-} SceneNodeType;
+};
#define RADIX_BITS 4
#define RADIX_BUCKETS (1<<RADIX_BITS)
diff --git a/src/mame/video/vdc.c b/src/mame/video/vdc.c
index 5ee66b62631..99915c8c55d 100644
--- a/src/mame/video/vdc.c
+++ b/src/mame/video/vdc.c
@@ -8,7 +8,7 @@
#define STATE_VCR 3
/* todo: replace this with the PAIR structure */
-typedef union
+union pair
{
#ifdef LSB_FIRST
struct { unsigned char l,h; } b;
@@ -16,7 +16,7 @@ typedef union
struct { unsigned char h,l; } b;
#endif
unsigned short int w;
-}pair;
+};
/* the VDC context */
diff --git a/src/mess/audio/mea8000.c b/src/mess/audio/mea8000.c
index aa57cd0a900..2f289939a20 100644
--- a/src/mess/audio/mea8000.c
+++ b/src/mess/audio/mea8000.c
@@ -44,13 +44,13 @@
/* finite machine state controling frames */
-typedef enum
+enum mea8000_state
{
MEA8000_STOPPED, /* nothing to do, timer disabled */
MEA8000_WAIT_FIRST, /* received pitch, wait for first full trame, timer disabled */
MEA8000_STARTED, /* playing a frame, timer on */
MEA8000_SLOWING, /* repating last frame with decreasing amplitude, timer on */
-} mea8000_state;
+};
ALLOW_SAVE_TYPE( mea8000_state );
diff --git a/src/mess/audio/svision.c b/src/mess/audio/svision.c
index bccb8c574b3..ad0be994e8b 100644
--- a/src/mess/audio/svision.c
+++ b/src/mess/audio/svision.c
@@ -7,11 +7,11 @@
#include "emu.h"
#include "includes/svision.h"
-typedef enum
+enum SVISION_NOISE_Type
{
SVISION_NOISE_Type7Bit,
SVISION_NOISE_Type14Bit
-} SVISION_NOISE_Type;
+};
struct SVISION_NOISE
{
diff --git a/src/mess/drivers/pcw16.c b/src/mess/drivers/pcw16.c
index 214229ebeeb..ae545256695 100644
--- a/src/mess/drivers/pcw16.c
+++ b/src/mess/drivers/pcw16.c
@@ -347,7 +347,7 @@ static const struct { write8_space_func func; const char *name; } pcw16_flash1_b
{ FUNC(pcw16_flash1_bank_handler3_w) }
};
-typedef enum
+enum PCW16_RAM_TYPE
{
/* rom which is really first block of flash0 */
PCW16_MEM_ROM,
@@ -359,7 +359,7 @@ typedef enum
PCW16_MEM_DRAM,
/* no mem. i.e. unexpanded pcw16 */
PCW16_MEM_NONE
-} PCW16_RAM_TYPE;
+};
READ8_MEMBER(pcw16_state::pcw16_no_mem_r)
{
diff --git a/src/mess/formats/spec_snqk.h b/src/mess/formats/spec_snqk.h
index 439f29d37dc..8894e58713e 100644
--- a/src/mess/formats/spec_snqk.h
+++ b/src/mess/formats/spec_snqk.h
@@ -141,23 +141,23 @@ void spectrum_setup_raw(running_machine &machine, UINT8 *quickdata, UINT32 quick
#define FRZ_HDR 42
#define FRZ_SIZE (FRZ_HDR + 8*SPECTRUM_BANK)
-typedef enum
+enum SPECTRUM_SNAPSHOT_TYPE
{
SPECTRUM_SNAPSHOT_NONE,
SPECTRUM_SNAPSHOT_SNA,
SPECTRUM_SNAPSHOT_Z80,
SPECTRUM_SNAPSHOT_SP,
SPECTRUM_TAPEFILE_TAP
-} SPECTRUM_SNAPSHOT_TYPE;
+};
-typedef enum {
+enum SPECTRUM_Z80_SNAPSHOT_TYPE {
SPECTRUM_Z80_SNAPSHOT_INVALID,
SPECTRUM_Z80_SNAPSHOT_48K_OLD,
SPECTRUM_Z80_SNAPSHOT_48K,
SPECTRUM_Z80_SNAPSHOT_SAMRAM,
SPECTRUM_Z80_SNAPSHOT_128K,
SPECTRUM_Z80_SNAPSHOT_TS2068
-} SPECTRUM_Z80_SNAPSHOT_TYPE;
+};
/*****************************************************************************
*
diff --git a/src/mess/includes/apple2.h b/src/mess/includes/apple2.h
index c5b3e15362b..a75e950df5c 100644
--- a/src/mess/includes/apple2.h
+++ b/src/mess/includes/apple2.h
@@ -72,21 +72,21 @@
#define APPLE2_MEM_FLOATING 0xFFFFFFFF
#define APPLE2_MEM_MASK 0x00FFFFFF
-typedef enum
+enum machine_type_t
{
APPLE_II, // Apple II/II+
APPLE_IIEPLUS, // Apple IIe/IIc/IIgs/IIc+
TK2000, // Microdigital TK2000
LASER128, // Laser 128/128EX/128EX2
SPACE84 // "Space 84" with flipped text mode
-} machine_type_t;
+};
-typedef enum
+enum bank_disposition_t
{
A2MEM_IO = 0, /* this is always handlers; never banked memory */
A2MEM_MONO = 1, /* this is a bank where read and write are always in unison */
A2MEM_DUAL = 2 /* this is a bank where read and write can go different places */
-} bank_disposition_t;
+};
struct apple2_meminfo
{
diff --git a/src/mess/includes/apple2gs.h b/src/mess/includes/apple2gs.h
index 66b5daf5c77..cd97d72b184 100644
--- a/src/mess/includes/apple2gs.h
+++ b/src/mess/includes/apple2gs.h
@@ -24,22 +24,22 @@
#define BORDER_TOP (16) // (plus bottom)
-typedef enum
+enum apple2gs_clock_mode
{
CLOCKMODE_IDLE,
CLOCKMODE_TIME,
CLOCKMODE_INTERNALREGS,
CLOCKMODE_BRAM1,
CLOCKMODE_BRAM2
-} apple2gs_clock_mode;
+};
-typedef enum
+enum adbstate_t
{
ADBSTATE_IDLE,
ADBSTATE_INCOMMAND,
ADBSTATE_INRESPONSE
-} adbstate_t;
+};
#define IRQ_KBD_SRQ 0x01
#define IRQ_ADB_DATA 0x02
diff --git a/src/mess/includes/dgn_beta.h b/src/mess/includes/dgn_beta.h
index ac06c04bac4..f9077d09910 100644
--- a/src/mess/includes/dgn_beta.h
+++ b/src/mess/includes/dgn_beta.h
@@ -63,14 +63,14 @@
/***** Video Modes *****/
-typedef enum
+enum BETA_VID_MODES
{
TEXT_40x25, /* Text mode 40x25 */
TEXT_80x25, /* Text mode 80x25 */
GRAPH_320x256x4, /* Graphics 320x256x4 */
GRAPH_320x256x16, /* Graphics 320x256x16 */
GRAPH_640x512x2 /* Graphics 640X512X2 */
-} BETA_VID_MODES;
+};
#define iosize (0xfEFF-0xfc00)
diff --git a/src/mess/includes/hp48.h b/src/mess/includes/hp48.h
index 9b0ea2804d2..fc4e13b7364 100644
--- a/src/mess/includes/hp48.h
+++ b/src/mess/includes/hp48.h
@@ -11,13 +11,13 @@
#endif
/* model */
-typedef enum {
+enum hp48_models {
HP48_S,
HP48_SX,
HP48_G,
HP48_GX,
HP48_GP,
-} hp48_models;
+};
/* memory module configuration */
struct hp48_module
diff --git a/src/mess/includes/mac.h b/src/mess/includes/mac.h
index 490e3789d69..1fae2a49aaf 100644
--- a/src/mess/includes/mac.h
+++ b/src/mess/includes/mac.h
@@ -37,14 +37,14 @@
#define ADB_IS_PM_CLASS ((m_model >= MODEL_MAC_PORTABLE && m_model <= MODEL_MAC_PB100) || (m_model >= MODEL_MAC_PB140 && m_model <= MODEL_MAC_PBDUO_270c))
/* for Egret and CUDA streaming MCU commands, command types */
-typedef enum
+enum mac_streaming_t
{
MCU_STREAMING_NONE = 0,
MCU_STREAMING_PRAMRD,
MCU_STREAMING_PRAMWR,
MCU_STREAMING_WRAMRD,
MCU_STREAMING_WRAMWR
-} mac_streaming_t;
+};
enum
{
@@ -55,7 +55,7 @@ enum
};
/* tells which model is being emulated (set by macxxx_init) */
-typedef enum
+enum model_t
{
MODEL_MAC_128K512K, // 68000 machines
MODEL_MAC_512KE,
@@ -124,7 +124,7 @@ typedef enum
MODEL_MAC_POWERMAC_6100, // NuBus PowerMacs
MODEL_MAC_POWERMAC_7100,
MODEL_MAC_POWERMAC_8100
-} model_t;
+};
// video parameters for classic Macs
#define MAC_H_VIS (512)
diff --git a/src/mess/includes/macpci.h b/src/mess/includes/macpci.h
index a2e37f9bdaa..17832aab5c3 100644
--- a/src/mess/includes/macpci.h
+++ b/src/mess/includes/macpci.h
@@ -24,7 +24,7 @@
#define MAC_539X_2_TAG "539x_2"
/* tells which model is being emulated (set by macxxx_init) */
-typedef enum
+enum model_t
{
PCIMODEL_MAC_PM5200,
PCIMODEL_MAC_PM6200,
@@ -66,7 +66,7 @@ typedef enum
PCIMODEL_MAC_PIPPIN, // Apple/Bandai Pippin
-} model_t;
+};
/*----------- defined in machine/pcimac.c -----------*/
diff --git a/src/mess/includes/z80ne.h b/src/mess/includes/z80ne.h
index 1b7ddaa44d2..26925192abc 100644
--- a/src/mess/includes/z80ne.h
+++ b/src/mess/includes/z80ne.h
@@ -26,12 +26,12 @@
#define LX385_TAPE_SAMPLE_FREQ 38400
/* wave duration threshold */
-typedef enum
+enum z80netape_speed
{
TAPE_300BPS = 300, /* 300 bps */
TAPE_600BPS = 600, /* 600 bps */
TAPE_1200BPS = 1200 /* 1200 bps */
-} z80netape_speed;
+};
struct cass_data_t {
struct {
diff --git a/src/mess/machine/applefdc.c b/src/mess/machine/applefdc.c
index 20456ceccc2..a5300b02d1c 100644
--- a/src/mess/machine/applefdc.c
+++ b/src/mess/machine/applefdc.c
@@ -58,12 +58,12 @@
#define IWM_Q6 0x40
#define IWM_Q7 0x80
-typedef enum
+enum applefdc_t
{
APPLEFDC_APPLE2, /* classic Apple II disk controller (pre-IWM) */
APPLEFDC_IWM, /* Integrated Woz Machine */
APPLEFDC_SWIM /* Sander/Woz Integrated Machine */
-} applefdc_t;
+};
static UINT8 swim_default_parms[16] =
diff --git a/src/mess/machine/ay31015.c b/src/mess/machine/ay31015.c
index f9fd31dd5a0..30dbb2a8d5f 100644
--- a/src/mess/machine/ay31015.c
+++ b/src/mess/machine/ay31015.c
@@ -72,7 +72,7 @@ Start bit (low), Bit 0, Bit 1... highest bit, Parity bit (if enabled), 1-2 stop
#include "emu.h"
#include "ay31015.h"
-typedef enum
+enum state_t
{
IDLE,
START_BIT,
@@ -81,7 +81,7 @@ typedef enum
FIRST_STOP_BIT,
SECOND_STOP_BIT,
PREP_TIME
-} state_t;
+};
struct ay31015_t
diff --git a/src/mess/machine/ay31015.h b/src/mess/machine/ay31015.h
index 78bd37ea790..b7b8dbc18e1 100644
--- a/src/mess/machine/ay31015.h
+++ b/src/mess/machine/ay31015.h
@@ -12,17 +12,17 @@
***************************************************************************/
-typedef enum
+enum ay31015_type_t
{
/* For AY-3-1014A, AY-3-1015(D) and HD6402 variants */
AY_3_1015,
/* For AY-3-1014, AY-5-1013 and AY-6-1013 variants */
AY_5_1013
-} ay31015_type_t;
+};
-typedef enum
+enum ay31015_input_pin_t
{
AY31015_SWE=16, /* -SWE - Pin 16 - Status word enable */
AY31015_RDAV=18, /* -RDAV - Pin 18 - Reset data available */
@@ -34,10 +34,10 @@ typedef enum
AY31015_NB1=37, /* NB1 - Pin 37 - Number of bits #1 */
AY31015_NB2=38, /* NB2 - Pin 38 - Number of bits #2 */
AY31015_EPS=39 /* EPS - Pin 39 - Odd/Even parity select */
-} ay31015_input_pin_t;
+};
-typedef enum
+enum ay31015_output_pin_t
{
AY31015_PE=13, /* PE - Pin 13 - Parity error */
AY31015_FE=14, /* FE - Pin 14 - Framing error */
@@ -46,7 +46,7 @@ typedef enum
AY31015_TBMT=22, /* TBMT - Pin 22 - Transmit buffer empty */
AY31015_EOC=24, /* EOC - Pin 24 - End of character */
AY31015_SO=25 /* SO - Pin 25 - Serial output */
-} ay31015_output_pin_t;
+};
struct ay31015_config
diff --git a/src/mess/machine/coco_fdc.h b/src/mess/machine/coco_fdc.h
index c4ec20d921d..0200ed1c359 100644
--- a/src/mess/machine/coco_fdc.h
+++ b/src/mess/machine/coco_fdc.h
@@ -13,13 +13,13 @@
// ======================> coco_rtc_type_t
-typedef enum
+enum coco_rtc_type_t
{
RTC_DISTO = 0x00,
RTC_CLOUD9 = 0x01,
RTC_NONE = 0xFF
-} coco_rtc_type_t;
+};
// ======================> coco_fdc_device
diff --git a/src/mess/machine/ds1315.c b/src/mess/machine/ds1315.c
index 561defee36d..a6f0023a0ed 100644
--- a/src/mess/machine/ds1315.c
+++ b/src/mess/machine/ds1315.c
@@ -15,11 +15,11 @@
TYPE DEFINITIONS
***************************************************************************/
-typedef enum
+enum ds1315_mode_t
{
DS_SEEK_MATCHING,
DS_CALENDAR_IO
-} ds1315_mode_t;
+};
struct ds1315_t
diff --git a/src/mess/machine/i8271.c b/src/mess/machine/i8271.c
index f207abbc729..4ee54be8e0d 100644
--- a/src/mess/machine/i8271.c
+++ b/src/mess/machine/i8271.c
@@ -89,11 +89,11 @@ struct i8271_t
emu_timer *command_complete_timer;
};
-typedef enum
+enum I8271_STATE_t
{
I8271_STATE_EXECUTION_READ = 0,
I8271_STATE_EXECUTION_WRITE
-} I8271_STATE_t;
+};
/* commands accepted */
#define I8271_COMMAND_SPECIFY 0x035
diff --git a/src/mess/machine/kr2376.h b/src/mess/machine/kr2376.h
index 77abb9bb7da..0b53c5760f3 100644
--- a/src/mess/machine/kr2376.h
+++ b/src/mess/machine/kr2376.h
@@ -66,17 +66,17 @@ extern const device_type KR2376;
/*
* Input pins
*/
-typedef enum
+enum kr2376_input_pin_t
{
KR2376_DSII=20, /* DSII - Pin 20 - Data & Strobe Invert Input */
KR2376_PII=6 /* PII - Pin 6 - Parity Invert Input */
-} kr2376_input_pin_t;
+};
-typedef enum
+enum kr2376_output_pin_t
{
KR2376_SO=16, /* SO - Pin 16 - Strobe Output */
KR2376_PO=7 /* PO - Pin 7 - Parity Output */
-} kr2376_output_pin_t;
+};
/* interface */
struct kr2376_interface
diff --git a/src/mess/machine/thomson.c b/src/mess/machine/thomson.c
index 9f5e3ef5aed..d9ffb02d6db 100644
--- a/src/mess/machine/thomson.c
+++ b/src/mess/machine/thomson.c
@@ -681,12 +681,12 @@ const pia6821_interface to7_pia6821_sys =
-typedef enum
+enum to7_io_dev
{
TO7_IO_NONE,
TO7_IO_CENTRONICS,
TO7_IO_RS232
-} to7_io_dev;
+};
/* test whether a parallel or a serial device is connected: both cannot
be exploited at the same time!
diff --git a/src/mess/machine/upd765.c b/src/mess/machine/upd765.c
index fb2e2681782..74615c56119 100644
--- a/src/mess/machine/upd765.c
+++ b/src/mess/machine/upd765.c
@@ -30,23 +30,23 @@
#include "machine/upd765.h"
-typedef enum
+enum UPD765_PHASE
{
UPD765_COMMAND_PHASE_FIRST_BYTE,
UPD765_COMMAND_PHASE_BYTES,
UPD765_RESULT_PHASE,
UPD765_EXECUTION_PHASE_READ,
UPD765_EXECUTION_PHASE_WRITE
-} UPD765_PHASE;
+};
/* supported versions */
-typedef enum
+enum UPD765_VERSION
{
TYPE_UPD765A = 0,
TYPE_UPD765B = 1,
TYPE_SMC37C78 = 2,
TYPE_UPD72065 = 3
-} UPD765_VERSION;
+};
/* uncomment the following line for verbose information */
diff --git a/src/mess/machine/upd765.h b/src/mess/machine/upd765.h
index d9de40de007..88101db4b5d 100644
--- a/src/mess/machine/upd765.h
+++ b/src/mess/machine/upd765.h
@@ -78,11 +78,11 @@ extern const device_type UPD72065;
***************************************************************************/
/* RDY pin connected state */
-typedef enum
+enum UPD765_RDY_PIN
{
UPD765_RDY_PIN_NOT_CONNECTED = 0,
UPD765_RDY_PIN_CONNECTED = 1
-} UPD765_RDY_PIN;
+};
#define UPD765_DAM_DELETED_DATA 0x0f8
#define UPD765_DAM_DATA 0x0fb
diff --git a/src/mess/tools/imgtool/charconv.h b/src/mess/tools/imgtool/charconv.h
index fcc6fd9af1f..6a2b3042ff3 100644
--- a/src/mess/tools/imgtool/charconv.h
+++ b/src/mess/tools/imgtool/charconv.h
@@ -12,11 +12,11 @@
/* Supported character sets */
-typedef enum
+enum imgtool_charset
{
IMGTOOL_CHARSET_UTF8,
IMGTOOL_CHARSET_ISO_8859_1,
-} imgtool_charset;
+};
/* Convert specified charset to UTF-8 */
diff --git a/src/mess/tools/imgtool/imgterrs.h b/src/mess/tools/imgtool/imgterrs.h
index 00ee7c49a81..fe75b46c273 100644
--- a/src/mess/tools/imgtool/imgterrs.h
+++ b/src/mess/tools/imgtool/imgterrs.h
@@ -10,7 +10,7 @@
#define IMGTERRS_H
/* Error codes */
-typedef enum
+enum imgtoolerr_t
{
IMGTOOLERR_SUCCESS,
IMGTOOLERR_OUTOFMEMORY,
@@ -41,7 +41,7 @@ typedef enum
IMGTOOLERR_NOFORKS,
IMGTOOLERR_FORKNOTFOUND,
IMGTOOLERR_INVALIDPARTITION
-} imgtoolerr_t;
+};
diff --git a/src/mess/tools/imgtool/library.h b/src/mess/tools/imgtool/library.h
index 6efec70b578..2a785a6b26d 100644
--- a/src/mess/tools/imgtool/library.h
+++ b/src/mess/tools/imgtool/library.h
@@ -30,12 +30,12 @@ typedef struct _imgtool_partition imgtool_partition;
typedef struct _imgtool_directory imgtool_directory;
typedef struct _imgtool_library imgtool_library;
-typedef enum
+enum imgtool_suggestion_viability_t
{
SUGGESTION_END,
SUGGESTION_POSSIBLE,
SUGGESTION_RECOMMENDED
-} imgtool_suggestion_viability_t;
+};
union filterinfo
{
@@ -51,11 +51,11 @@ union filterinfo
typedef void (*filter_getinfoproc)(UINT32 state, union filterinfo *info);
-typedef enum
+enum imgtool_libsort_t
{
ITLS_NAME,
ITLS_DESCRIPTION
-} imgtool_libsort_t;
+};
struct imgtool_dirent
{
@@ -83,13 +83,13 @@ struct imgtool_chainent
UINT64 block;
};
-typedef enum
+enum imgtool_forktype_t
{
FORK_END,
FORK_DATA,
FORK_RESOURCE,
FORK_ALTERNATE
-} imgtool_forktype_t;
+};
struct imgtool_forkent
{
@@ -134,11 +134,11 @@ enum
IMGTOOLATTR_TIME_LASTMODIFIED
};
-typedef union
+union imgtool_attribute
{
INT64 i;
time_t t;
-} imgtool_attribute;
+};
struct imgtool_iconinfo
{
diff --git a/src/mess/tools/imgtool/modules/amiga.c b/src/mess/tools/imgtool/modules/amiga.c
index c2c9f7cb993..df6af54426f 100644
--- a/src/mess/tools/imgtool/modules/amiga.c
+++ b/src/mess/tools/imgtool/modules/amiga.c
@@ -33,7 +33,7 @@
#define MSIZE ((BSIZE/4) - 1) /* Size of bitmaps */
-typedef enum
+enum disk_type
{
DT_UNKNOWN = -1,
DT_OFS = 0,
@@ -42,7 +42,7 @@ typedef enum
DT_FFS_INTL = 3,
DT_OFS_INTL_DIRC = 4,
DT_FFS_INTL_DIRC = 5
-} disk_type;
+};
enum
@@ -55,7 +55,7 @@ enum
};
-typedef enum
+enum sec_type
{
ST_INVALID = 0,
ST_ROOT = 1,
@@ -64,7 +64,7 @@ typedef enum
ST_LINKFILE = -4,
ST_LINKDIR = 4,
ST_SOFTLINK = 3
-} sec_type;
+};
struct amiga_date
diff --git a/src/mess/tools/imgtool/modules/fat.c b/src/mess/tools/imgtool/modules/fat.c
index 0359582cd96..5bd21f2ba02 100644
--- a/src/mess/tools/imgtool/modules/fat.c
+++ b/src/mess/tools/imgtool/modules/fat.c
@@ -201,12 +201,12 @@ struct fat_mediatype
UINT8 sectors;
};
-typedef enum
+enum creation_policy_t
{
CREATE_NONE,
CREATE_FILE,
CREATE_DIR
-} creation_policy_t;
+};
@@ -1395,12 +1395,12 @@ static imgtoolerr_t fat_read_dirent(imgtool_partition *partition, fat_file *file
-typedef enum
+enum sfn_disposition_t
{
SFN_SUFFICIENT, /* name fully representable in short file name */
SFN_DERIVATIVE, /* name not fully representable in short file name, but no need to tildize */
SFN_MANGLED /* name not representable in short file name; must tildize */
-} sfn_disposition_t;
+};
static imgtoolerr_t fat_construct_dirent(const char *filename, creation_policy_t create,
UINT8 **entry, size_t *entry_len)
diff --git a/src/mess/tools/imgtool/modules/mac.c b/src/mess/tools/imgtool/modules/mac.c
index c72746f18b0..fd7c8c349fe 100644
--- a/src/mess/tools/imgtool/modules/mac.c
+++ b/src/mess/tools/imgtool/modules/mac.c
@@ -744,13 +744,13 @@ static imgtoolerr_t image_write_tag(mac_l1_imgref *image, UINT32 block, const vo
#pragma mark MFS/HFS WRAPPERS
#endif
-typedef enum
+enum mac_format
{
L2I_MFS,
L2I_HFS
-} mac_format;
+};
-typedef enum { data_fork = 0x00, rsrc_fork = 0xff } mac_forkID;
+enum mac_forkID { data_fork = 0x00, rsrc_fork = 0xff };
typedef struct mac_l2_imgref mac_l2_imgref;
diff --git a/src/mess/tools/imgtool/modules/macutil.h b/src/mess/tools/imgtool/modules/macutil.h
index e4d37deed74..1156a08bc05 100644
--- a/src/mess/tools/imgtool/modules/macutil.h
+++ b/src/mess/tools/imgtool/modules/macutil.h
@@ -12,18 +12,18 @@
#include "imgtool.h"
-typedef enum
+enum mac_fork_t
{
MAC_FORK_DATA,
MAC_FORK_RESOURCE
-} mac_fork_t;
+};
-typedef enum
+enum mac_filecategory_t
{
MAC_FILECATEGORY_DATA,
MAC_FILECATEGORY_TEXT,
MAC_FILECATEGORY_FORKED
-} mac_filecategory_t;
+};
/* converting Classic Mac OS time <==> Imgtool time */
diff --git a/src/mess/tools/imgtool/modules/os9.c b/src/mess/tools/imgtool/modules/os9.c
index 3d4dafe8d97..0a099bff9db 100644
--- a/src/mess/tools/imgtool/modules/os9.c
+++ b/src/mess/tools/imgtool/modules/os9.c
@@ -13,12 +13,12 @@
#include "formats/coco_dsk.h"
#include "iflopimg.h"
-typedef enum
+enum creation_policy_t
{
CREATE_NONE,
CREATE_FILE,
CREATE_DIR
-} creation_policy_t;
+};
struct os9_diskinfo
{
diff --git a/src/mess/tools/imgtool/modules/prodos.c b/src/mess/tools/imgtool/modules/prodos.c
index fa8e026f849..788c028ff9a 100644
--- a/src/mess/tools/imgtool/modules/prodos.c
+++ b/src/mess/tools/imgtool/modules/prodos.c
@@ -175,12 +175,12 @@ struct prodos_dirent
UINT32 putaway_directory;
};
-typedef enum
+enum creation_policy_t
{
CREATE_NONE,
CREATE_FILE,
CREATE_DIR
-} creation_policy_t;
+};
diff --git a/src/mess/tools/imgtool/modules/thomson.c b/src/mess/tools/imgtool/modules/thomson.c
index 04ad20003af..35670cd7c90 100644
--- a/src/mess/tools/imgtool/modules/thomson.c
+++ b/src/mess/tools/imgtool/modules/thomson.c
@@ -133,14 +133,14 @@ struct thom_floppy {
};
-typedef enum {
+enum thom_dirent_type {
THOM_DIRENT_END,
THOM_DIRENT_FREE,
THOM_DIRENT_FILE,
THOM_DIRENT_INVALID,
-} thom_dirent_type;
+};
struct thom_dirent {
diff --git a/src/mess/tools/imgtool/modules/ti99.c b/src/mess/tools/imgtool/modules/ti99.c
index d6fc8aa6344..0b1172d4f31 100644
--- a/src/mess/tools/imgtool/modules/ti99.c
+++ b/src/mess/tools/imgtool/modules/ti99.c
@@ -528,14 +528,14 @@ typedef struct dsk_vib
/* of byte 1, etc.) */
} dsk_vib;
-typedef enum
+enum ti99_img_format
{
if_mess,
if_v9t9,
if_pc99_fm,
if_pc99_mfm,
if_harddisk
-} ti99_img_format;
+};
/*
level-1 disk image descriptor
diff --git a/src/mess/tools/imgtool/stream.c b/src/mess/tools/imgtool/stream.c
index bd183f5b156..95c385d3ee8 100644
--- a/src/mess/tools/imgtool/stream.c
+++ b/src/mess/tools/imgtool/stream.c
@@ -14,11 +14,11 @@
#include "osdcore.h"
#include "imgtool.h"
-typedef enum
+enum imgtype_t
{
IMG_FILE,
IMG_MEM
-} imgtype_t;
+};
struct _imgtool_stream
{
diff --git a/src/mess/video/911_vdt.h b/src/mess/video/911_vdt.h
index 91230cb5693..a9ea3e425bb 100644
--- a/src/mess/video/911_vdt.h
+++ b/src/mess/video/911_vdt.h
@@ -19,8 +19,8 @@ enum
GFXDECODE_EXTERN( vdt911 );
-typedef enum { char_960, char_1920 } vdt911_screen_size_t;
-typedef enum
+enum vdt911_screen_size_t { char_960, char_1920 };
+enum vdt911_model_t
{
vdt911_model_US,
vdt911_model_UK,
@@ -31,7 +31,7 @@ typedef enum
vdt911_model_Japanese, /* Katakana Japanese */
/*vdt911_model_Arabic,*//* Arabic */
vdt911_model_FrenchWP /* French word processing */
-} vdt911_model_t;
+};
typedef struct vdt911_init_params_t
{
diff --git a/src/mess/video/vic4567.h b/src/mess/video/vic4567.h
index e77f980b13c..9116e3c3432 100644
--- a/src/mess/video/vic4567.h
+++ b/src/mess/video/vic4567.h
@@ -26,11 +26,11 @@ typedef void (*vic3_port_changed_callback) (running_machine &, int);
typedef UINT8 (*vic3_c64mem_callback)(running_machine &machine, int offset);
-typedef enum
+enum vic3_type
{
VIC4567_NTSC,
VIC4567_PAL
-} vic3_type;
+};
struct vic3_interface
{
diff --git a/src/mess/video/vic6567.h b/src/mess/video/vic6567.h
index 153f47a95c3..ebdb5183c8d 100644
--- a/src/mess/video/vic6567.h
+++ b/src/mess/video/vic6567.h
@@ -14,13 +14,13 @@
TYPE DEFINITIONS
***************************************************************************/
-typedef enum
+enum vic2_type
{
VIC6567, // VIC II NTSC
VIC6569, // VIC II PAL
VIC8564, // VIC IIe NTSC
VIC8566 // VIC IIe PAL
-} vic2_type;
+};
struct vic2_interface
{
diff --git a/src/osd/sdl/gl_shader_mgr.h b/src/osd/sdl/gl_shader_mgr.h
index 595e0a68e49..2bb37888845 100644
--- a/src/osd/sdl/gl_shader_mgr.h
+++ b/src/osd/sdl/gl_shader_mgr.h
@@ -4,20 +4,20 @@
// #define GLSL_SOURCE_ON_DISK 1
-typedef enum {
+enum GLSL_SHADER_TYPE {
GLSL_SHADER_TYPE_IDX16,
GLSL_SHADER_TYPE_RGB32_LUT,
GLSL_SHADER_TYPE_RGB32_DIRECT,
GLSL_SHADER_TYPE_NUMBER
-} GLSL_SHADER_TYPE;
+};
-typedef enum {
+enum GLSL_SHADER_FEATURE {
GLSL_SHADER_FEAT_PLAIN,
GLSL_SHADER_FEAT_BILINEAR,
GLSL_SHADER_FEAT_INT_NUMBER,
GLSL_SHADER_FEAT_CUSTOM = GLSL_SHADER_FEAT_INT_NUMBER,
GLSL_SHADER_FEAT_MAX_NUMBER,
-} GLSL_SHADER_FEATURE;
+};
// old code passed sdl_info * to functions here
// however the parameter was not used
diff --git a/src/osd/sdl/gl_shader_tool.h b/src/osd/sdl/gl_shader_tool.h
index dd59906ae1e..84174a40d7f 100644
--- a/src/osd/sdl/gl_shader_tool.h
+++ b/src/osd/sdl/gl_shader_tool.h
@@ -73,11 +73,11 @@ typedef void * (APIENTRYP PFNGLGETPROCADDRESSOS)(const char *procName);
*/
int gl_shader_loadExtention(PFNGLGETPROCADDRESSOS GetProcAddress);
-typedef enum {
+enum GLSLCheckMode {
CHECK_QUIET, /* just return 0, if no error, otherwise the GL error code, no stderr output */
CHECK_VERBOSE, /* same as CHECK_QUIET, but in the case of an error, use stderr to be verbose */
CHECK_ALWAYS_VERBOSE /* always print out all information available */
-} GLSLCheckMode;
+};
#define GL_CHECK_ERROR_VERBOSE() gl_check_error(CHECK_ALWAYS_VERBOSE,__FILE__,__LINE__)
#define GL_CHECK_ERROR_NORMAL() gl_check_error(CHECK_VERBOSE,__FILE__,__LINE__)