diff --git a/src/emu/cpu/alph8201/8201dasm.c b/src/emu/cpu/alph8201/8201dasm.c index 4cdd76075a0..89077aa9f04 100644 --- a/src/emu/cpu/alph8201/8201dasm.c +++ b/src/emu/cpu/alph8201/8201dasm.c @@ -259,14 +259,14 @@ static const char *const Formats[] = { #define MAX_OPS (((sizeof(Formats) / sizeof(Formats[0])) - 1) / PTRS_PER_FORMAT) -typedef struct opcode { +struct AD8201Opcode { byte mask; byte bits; byte type; byte pmask; byte pdown; const char *fmt; -} AD8201Opcode; +}; static AD8201Opcode Op[MAX_OPS+1]; static int OpInizialized = 0; diff --git a/src/emu/cpu/arm/arm.c b/src/emu/cpu/arm/arm.c index 9dc5ce945bd..7fce7199798 100644 --- a/src/emu/cpu/arm/arm.c +++ b/src/emu/cpu/arm/arm.c @@ -227,7 +227,7 @@ enum /* Private Data */ /* sArmRegister defines the CPU state */ -typedef struct +struct ARM_REGS { int icount; UINT32 sArmRegister[kNumRegisters]; @@ -239,7 +239,7 @@ typedef struct address_space *program; direct_read_data *direct; endianness_t endian; -} ARM_REGS; +}; /* Prototypes */ static void HandleALU( ARM_REGS* cpustate, UINT32 insn); diff --git a/src/emu/cpu/arm7/arm7core.h b/src/emu/cpu/arm7/arm7core.h index b1bdf1bc4ea..926c83726f7 100644 --- a/src/emu/cpu/arm7/arm7core.h +++ b/src/emu/cpu/arm7/arm7core.h @@ -185,7 +185,7 @@ enum /* CPU state struct */ -typedef struct +struct arm_state { ARM7CORE_REGS // these must be included in your cpu specific register implementation ARM7COPRO_REGS @@ -196,7 +196,7 @@ typedef struct #if ARM7_MMU_ENABLE_HACK UINT32 mmu_enable_addr; // workaround for "MMU is enabled when PA != VA" problem #endif -} arm_state; +}; /**************************************************************************************************** * VARIOUS INTERNAL STRUCS/DEFINES/ETC.. diff --git a/src/emu/cpu/cubeqcpu/cubeqcpu.c b/src/emu/cpu/cubeqcpu/cubeqcpu.c index edcf847924d..e88a5950561 100644 --- a/src/emu/cpu/cubeqcpu/cubeqcpu.c +++ b/src/emu/cpu/cubeqcpu/cubeqcpu.c @@ -71,7 +71,7 @@ enum alu_dst STRUCTURES & TYPEDEFS ***************************************************************************/ -typedef struct +struct cquestsnd_state { /* AM2901 internals */ UINT16 ram[16]; @@ -101,10 +101,10 @@ typedef struct address_space *program; direct_read_data *direct; int icount; -} cquestsnd_state; +}; -typedef struct +struct cquestrot_state { /* AM2901 internals */ UINT16 ram[16]; @@ -143,10 +143,10 @@ typedef struct address_space *program; direct_read_data *direct; int icount; -} cquestrot_state; +}; -typedef struct +struct cquestlin_state { /* 12-bit AM2901 internals */ UINT16 ram[16]; @@ -190,7 +190,7 @@ typedef struct address_space *program; direct_read_data *direct; int icount; -} cquestlin_state; +}; /*************************************************************************** STATE ACCESSORS diff --git a/src/emu/cpu/dsp56k/dsp56k.h b/src/emu/cpu/dsp56k/dsp56k.h index 16f768d8a89..5a7715a5d65 100644 --- a/src/emu/cpu/dsp56k/dsp56k.h +++ b/src/emu/cpu/dsp56k/dsp56k.h @@ -30,7 +30,7 @@ DECLARE_LEGACY_CPU_DEVICE(DSP56156, dsp56k); STRUCTURES & TYPEDEFS ***************************************************************************/ // 5-4 Host Interface -typedef struct +struct dsp56k_host_interface { // **** Dsp56k side **** // // Host Control Register @@ -62,10 +62,10 @@ typedef struct // HACK - Host interface bootstrap write offset UINT16 bootstrap_offset; -} dsp56k_host_interface; +}; // 1-9 ALU -typedef struct +struct dsp56k_data_alu { // Four 16-bit input registers (can be accessed as 2 32-bit registers) PAIR x; @@ -79,10 +79,10 @@ typedef struct // One data bus shifter/limiter // A parallel, single cycle, non-pipelined Multiply-Accumulator (MAC) unit // Basics -} dsp56k_data_alu; +}; // 1-10 Address Generation Unit (AGU) -typedef struct +struct dsp56k_agu { // Four address registers UINT16 r0; @@ -109,10 +109,10 @@ typedef struct // UINT8 status; // Basics -} dsp56k_agu; +}; // 1-11 Program Control Unit (PCU) -typedef struct +struct dsp56k_pcu { // Program Counter UINT16 pc; @@ -146,10 +146,10 @@ typedef struct // Other PCU internals UINT16 reset_vector; -} dsp56k_pcu; +}; // 1-8 The dsp56156 CORE -typedef struct +struct dsp56k_core { // PROGRAM CONTROLLER dsp56k_pcu PCU; @@ -197,7 +197,7 @@ typedef struct UINT16 peripheral_ram[0x40]; UINT16 program_ram[0x800]; -} dsp56k_core; +}; INLINE dsp56k_core *get_safe_token(device_t *device) diff --git a/src/emu/cpu/dsp56k/dsp56pcu.c b/src/emu/cpu/dsp56k/dsp56pcu.c index 2460beb056c..cde4d69924e 100644 --- a/src/emu/cpu/dsp56k/dsp56pcu.c +++ b/src/emu/cpu/dsp56k/dsp56pcu.c @@ -236,11 +236,11 @@ void pcu_reset(dsp56k_core* cpustate) /*************************************************************************** INTERRUPT HANDLING ***************************************************************************/ -typedef struct +struct dsp56k_irq_data { UINT16 irq_vector; char irq_source[128]; -} dsp56k_irq_data; +}; dsp56k_irq_data dsp56k_interrupt_sources[32]; diff --git a/src/emu/cpu/esrip/esrip.c b/src/emu/cpu/esrip/esrip.c index c06a5ee2ef4..6f97a70d9b9 100644 --- a/src/emu/cpu/esrip/esrip.c +++ b/src/emu/cpu/esrip/esrip.c @@ -61,7 +61,7 @@ CPU_DISASSEMBLE( esrip ); STRUCTURES & TYPEDEFS ***************************************************************************/ -typedef struct +struct esrip_state { UINT16 ram[32]; UINT16 acc; @@ -118,7 +118,7 @@ typedef struct write16_device_func fdt_w; UINT8 (*status_in)(running_machine &machine); int (*draw)(running_machine &machine, int l, int r, int fig, int attr, int addr, int col, int x_scale, int bank); -} esrip_state; +}; INLINE esrip_state *get_safe_token(device_t *device) diff --git a/src/emu/cpu/g65816/g65816ds.c b/src/emu/cpu/g65816/g65816ds.c index 545132b46e2..aefeab523cc 100644 --- a/src/emu/cpu/g65816/g65816ds.c +++ b/src/emu/cpu/g65816/g65816ds.c @@ -26,12 +26,12 @@ author (Karl Stenerud) at karl@higashiyama-unet.ocn.ne.jp. #define ADDRESS_65816(A) ((A)&0xffffff) -typedef struct +struct opcode_struct { unsigned char name; unsigned char flag; unsigned char ea; -} opcode_struct; +}; enum { diff --git a/src/emu/cpu/h6280/h6280.h b/src/emu/cpu/h6280/h6280.h index fe1a2f4e686..f2a3434fa45 100644 --- a/src/emu/cpu/h6280/h6280.h +++ b/src/emu/cpu/h6280/h6280.h @@ -37,7 +37,7 @@ enum /**************************************************************************** * The 6280 registers. ****************************************************************************/ -typedef struct +struct h6280_Regs { int ICount; @@ -70,7 +70,7 @@ typedef struct INT32 NZ; /* last value (lazy N and Z flag) */ #endif UINT8 io_buffer; /* last value written to the PSG, timer, and interrupt pages */ -} h6280_Regs; +}; DECLARE_LEGACY_CPU_DEVICE(H6280, h6280); diff --git a/src/emu/cpu/h83002/h8priv.h b/src/emu/cpu/h83002/h8priv.h index ca622305a9d..1453bd5ee72 100644 --- a/src/emu/cpu/h83002/h8priv.h +++ b/src/emu/cpu/h83002/h8priv.h @@ -11,30 +11,30 @@ #define H8_MAX_PORTS (16) // number of I/O ports defined architecturally (1-9 and A-G = 16) -typedef struct +struct H8S2XXX_TPU_ITEM { UINT32 tgr, irq, out; -} H8S2XXX_TPU_ITEM; +}; -typedef struct +struct H8S2XXX_TPU { emu_timer *timer; int cycles_per_tick; UINT64 timer_cycles; -} H8S2XXX_TPU; +}; -typedef struct +struct H8S2XXX_SCI { emu_timer *timer; UINT32 bitrate; -} H8S2XXX_SCI; +}; -typedef struct +struct H8S2XXX_TMR { emu_timer *timer; int cycles_per_tick; UINT64 timer_cycles; -} H8S2XXX_TMR; +}; struct h83xx_state { diff --git a/src/emu/cpu/h83002/h8speriph.c b/src/emu/cpu/h83002/h8speriph.c index 516aa01bc21..df6ca015e65 100644 --- a/src/emu/cpu/h83002/h8speriph.c +++ b/src/emu/cpu/h83002/h8speriph.c @@ -1158,13 +1158,13 @@ static TIMER_CALLBACK( h8s_tpu_callback) // SERIAL CONTROLLER INTERFACE // ///////////////////////////////// -typedef struct +struct H8S_SCI_ENTRY { UINT32 reg_smr, reg_brr, reg_scr, reg_tdr, reg_ssr, reg_rdr; UINT32 reg_pdr, reg_port; UINT8 port_mask_sck, port_mask_txd, port_mask_rxd; UINT8 int_tx, int_rx; -} H8S_SCI_ENTRY; +}; const H8S_SCI_ENTRY H8S_SCI_TABLE[] = { diff --git a/src/emu/cpu/hcd62121/hcd62121d.c b/src/emu/cpu/hcd62121/hcd62121d.c index 6a4c3a6ce55..ae7845be1fc 100644 --- a/src/emu/cpu/hcd62121/hcd62121d.c +++ b/src/emu/cpu/hcd62121/hcd62121d.c @@ -32,12 +32,12 @@ enum _4, /* for nibble shifts */ }; -typedef struct +struct hcd62121_dasm { const char *str; UINT8 arg1; UINT8 arg2; -} hcd62121_dasm; +}; static const hcd62121_dasm hcd62121_ops[256] = diff --git a/src/emu/cpu/hd61700/hd61700d.c b/src/emu/cpu/hd61700/hd61700d.c index 3cb4cb800c5..5243649f3dc 100644 --- a/src/emu/cpu/hd61700/hd61700d.c +++ b/src/emu/cpu/hd61700/hd61700d.c @@ -39,13 +39,13 @@ enum OP_RSIR, }; -typedef struct +struct hd61700_dasm { const char *str; UINT8 arg1; UINT8 arg2; bool optjr; -} hd61700_dasm; +}; static const hd61700_dasm hd61700_ops[256] = { diff --git a/src/emu/cpu/hd6309/6309dasm.c b/src/emu/cpu/hd6309/6309dasm.c index f15405368c5..07b28d6efa7 100644 --- a/src/emu/cpu/hd6309/6309dasm.c +++ b/src/emu/cpu/hd6309/6309dasm.c @@ -25,14 +25,14 @@ #include "hd6309.h" // Opcode structure -typedef struct +struct opcodeinfo { UINT8 opcode; // 8-bit opcode value UINT8 length; // Opcode length in bytes char name[6]; // Opcode name UINT8 mode; // Addressing mode unsigned flags; // Disassembly flags -} opcodeinfo; +}; enum hd6309_addressing_modes { diff --git a/src/emu/cpu/i386/cycles.h b/src/emu/cpu/i386/cycles.h index f459cbb9f20..1cf8c46204a 100644 --- a/src/emu/cpu/i386/cycles.h +++ b/src/emu/cpu/i386/cycles.h @@ -337,11 +337,11 @@ typedef enum #define CPU_CYCLES_MEDIAGX 3 -typedef struct +struct X86_CYCLE_TABLE { X86_CYCLES op; UINT8 cpu_cycles[X86_NUM_CPUS][2]; -} X86_CYCLE_TABLE; +}; static const X86_CYCLE_TABLE x86_cycle_table[] = { diff --git a/src/emu/cpu/i386/i386dasm.c b/src/emu/cpu/i386/i386dasm.c index d2a1af047d8..dd81f47f9d3 100644 --- a/src/emu/cpu/i386/i386dasm.c +++ b/src/emu/cpu/i386/i386dasm.c @@ -90,19 +90,19 @@ enum #define SPECIAL64 0x800 #define SPECIAL64_ENT(x) (SPECIAL64 | ((x) << 24)) -typedef struct { +struct I386_OPCODE { const char *mnemonic; UINT32 flags; UINT32 param1; UINT32 param2; UINT32 param3; offs_t dasm_flags; -} I386_OPCODE; +}; -typedef struct { +struct GROUP_OP { char mnemonic[32]; const I386_OPCODE *opcode; -} GROUP_OP; +}; static const UINT8 *opcode_ptr; static const UINT8 *opcode_ptr_base; diff --git a/src/emu/cpu/i386/i386ops.h b/src/emu/cpu/i386/i386ops.h index 25ca44c754d..1c8505f49bf 100644 --- a/src/emu/cpu/i386/i386ops.h +++ b/src/emu/cpu/i386/i386ops.h @@ -1,9 +1,9 @@ -typedef struct { +struct X86_OPCODE { UINT8 opcode; UINT32 flags; void (*handler16)(i386_state *cpustate); void (*handler32)(i386_state *cpustate); -} X86_OPCODE; +}; #define OP_I386 0x1 #define OP_FPU 0x2 diff --git a/src/emu/cpu/i386/i386priv.h b/src/emu/cpu/i386/i386priv.h index 9c71d3b46be..8344f3075c1 100644 --- a/src/emu/cpu/i386/i386priv.h +++ b/src/emu/cpu/i386/i386priv.h @@ -197,16 +197,16 @@ enum #define MXCSR_RC (3<<13) // Rounding Control #define MXCSR_FZ (1<<15) // Flush to Zero -typedef struct { +struct I386_SREG { UINT16 selector; UINT16 flags; UINT32 base; UINT32 limit; int d; // Operand size bool valid; -} I386_SREG; +}; -typedef struct +struct I386_CALL_GATE { UINT16 segment; UINT16 selector; @@ -215,19 +215,19 @@ typedef struct UINT8 dpl; UINT8 dword_count; UINT8 present; -} I386_CALL_GATE; +}; -typedef struct { +struct I386_SYS_TABLE { UINT32 base; UINT16 limit; -} I386_SYS_TABLE; +}; -typedef struct { +struct I386_SEG_DESC { UINT16 segment; UINT16 flags; UINT32 base; UINT32 limit; -} I386_SEG_DESC; +}; typedef union { UINT32 d[8]; @@ -420,7 +420,7 @@ static int i386_limit_check(i386_state *cpustate, int seg, UINT32 offset); /***********************************************************************************/ -typedef struct { +struct MODRM_TABLE { struct { int b; int w; @@ -431,7 +431,7 @@ typedef struct { int w; int d; } rm; -} MODRM_TABLE; +}; extern MODRM_TABLE i386_MODRM_table[256]; diff --git a/src/emu/cpu/i860/i860dec.c b/src/emu/cpu/i860/i860dec.c index 4277eecda8a..05d2c109331 100644 --- a/src/emu/cpu/i860/i860dec.c +++ b/src/emu/cpu/i860/i860dec.c @@ -4073,13 +4073,13 @@ enum { }; -typedef struct { +struct decode_tbl_t { /* Execute function for this opcode. */ void (*insn_exec)(i860s *, UINT32); /* Flags for this opcode. */ char flags; -} decode_tbl_t; +}; /* First-level decode table (i.e., for the 6 primary opcode bits). */ diff --git a/src/emu/cpu/i860/i860dis.c b/src/emu/cpu/i860/i860dis.c index 8fb32b7beb4..4e5b36d5649 100644 --- a/src/emu/cpu/i860/i860dis.c +++ b/src/emu/cpu/i860/i860dis.c @@ -374,7 +374,7 @@ enum }; -typedef struct +struct decode_tbl_t { /* Disassembly function for this opcode. Call with buffer, mnemonic, pc, insn. */ @@ -386,7 +386,7 @@ typedef struct /* Mnemonic of this opcode (sometimes partial when more decode is done in disassembly routines-- e.g., loads and stores). */ const char *mnemonic; -} decode_tbl_t; +}; /* First-level decode table (i.e., for the 6 primary opcode bits). */ diff --git a/src/emu/cpu/i960/i960dis.c b/src/emu/cpu/i960/i960dis.c index b27b0fdc6ff..2523eb63278 100644 --- a/src/emu/cpu/i960/i960dis.c +++ b/src/emu/cpu/i960/i960dis.c @@ -8,11 +8,11 @@ #include "i960.h" #include "i960dis.h" -typedef struct +struct mnemonic_t { const char *mnem; unsigned short type; -} mnemonic_t; +}; static const mnemonic_t mnemonic[256] = { diff --git a/src/emu/cpu/konami/knmidasm.c b/src/emu/cpu/konami/knmidasm.c index a3def422110..511e8b230b3 100644 --- a/src/emu/cpu/konami/knmidasm.c +++ b/src/emu/cpu/konami/knmidasm.c @@ -1581,10 +1581,10 @@ static void absd( char *buf ) { *********************************************************************************/ -typedef struct { +struct konami_opcode_def { void (*decode)( char *buf ); int confirmed; -} konami_opcode_def; +}; static const konami_opcode_def op_table[256] = { /* 00 */ { illegal, 0 }, diff --git a/src/emu/cpu/lh5801/5801dasm.c b/src/emu/cpu/lh5801/5801dasm.c index 840205042fd..6e6a50bffdf 100644 --- a/src/emu/cpu/lh5801/5801dasm.c +++ b/src/emu/cpu/lh5801/5801dasm.c @@ -131,7 +131,7 @@ static const char *const InsNames[]={ "RPV", "SPV", }; -typedef struct { Ins ins; Adr adr; Regs reg; } Entry; +struct Entry { Ins ins; Adr adr; Regs reg; }; static const Entry table[0x100]={ { SBC, Reg, XL }, // 0 diff --git a/src/emu/cpu/m37710/m7700ds.c b/src/emu/cpu/m37710/m7700ds.c index a76b45ef1c2..001198243e7 100644 --- a/src/emu/cpu/m37710/m7700ds.c +++ b/src/emu/cpu/m37710/m7700ds.c @@ -16,12 +16,12 @@ Based on G65C816 CPU Emulator by Karl Stenerud #define ADDRESS_24BIT(A) ((A)&0xffffff) -typedef struct +struct opcode_struct { unsigned char name; unsigned char flag; unsigned char ea; -} opcode_struct; +}; enum { diff --git a/src/emu/cpu/m68000/m68k_in.c b/src/emu/cpu/m68000/m68k_in.c index af18f1a95f2..7eb1cb6cad2 100644 --- a/src/emu/cpu/m68000/m68k_in.c +++ b/src/emu/cpu/m68000/m68k_in.c @@ -128,13 +128,13 @@ void (*m68ki_instruction_jump_table[NUM_CPU_TYPES][0x10000])(m68ki_cpu_core *m68 unsigned char m68ki_cycles[NUM_CPU_TYPES][0x10000]; /* Cycles used by CPU type */ /* This is used to generate the opcode handler jump table */ -typedef struct +struct opcode_handler_struct { void (*opcode_handler)(m68ki_cpu_core *m68k); /* handler function */ unsigned int mask; /* mask on opcode */ unsigned int match; /* what to match after masking */ unsigned char cycles[NUM_CPU_TYPES]; /* cycles each cpu type takes */ -} opcode_handler_struct; +}; /* Opcode handler table */ diff --git a/src/emu/cpu/m68000/m68kdasm.c b/src/emu/cpu/m68000/m68kdasm.c index 94b4ccf5c5d..a43310db8cd 100644 --- a/src/emu/cpu/m68000/m68kdasm.c +++ b/src/emu/cpu/m68000/m68kdasm.c @@ -174,13 +174,13 @@ static int valid_ea(UINT32 opcode, UINT32 mask); static int DECL_SPEC compare_nof_true_bits(const void *aptr, const void *bptr); /* used to build opcode handler jump table */ -typedef struct +struct opcode_struct { void (*opcode_handler)(void); /* handler function */ UINT32 mask; /* mask on opcode */ UINT32 match; /* what to match after masking */ UINT32 ea_mask; /* what ea modes are allowed */ -} opcode_struct; +}; diff --git a/src/emu/cpu/m68000/m68kmake.c b/src/emu/cpu/m68000/m68kmake.c index 63791cad6bd..bb3179265fc 100644 --- a/src/emu/cpu/m68000/m68kmake.c +++ b/src/emu/cpu/m68000/m68kmake.c @@ -175,7 +175,7 @@ enum /* Everything we need to know about an opcode */ -typedef struct +struct opcode_struct { char name[MAX_NAME_LENGTH]; /* opcode handler name */ unsigned char size; /* Size of operation */ @@ -188,33 +188,33 @@ typedef struct char cpu_mode[NUM_CPUS]; /* User or supervisor mode */ char cpus[NUM_CPUS+1]; /* Allowed CPUs */ unsigned char cycles[NUM_CPUS]; /* cycles for 000, 010, 020, 030, 040 */ -} opcode_struct; +}; /* All modifications necessary for a specific EA mode of an instruction */ -typedef struct +struct ea_info_struct { const char* fname_add; const char* ea_add; unsigned int mask_add; unsigned int match_add; -} ea_info_struct; +}; /* Holds the body of a function */ -typedef struct +struct body_struct { char body[MAX_BODY_LENGTH][MAX_LINE_LENGTH+1]; int length; -} body_struct; +}; /* Holds a sequence of search / replace strings */ -typedef struct +struct replace_struct { char replace[MAX_REPLACE_LENGTH][2][MAX_LINE_LENGTH+1]; int length; -} replace_struct; +}; /* Function Prototypes */ diff --git a/src/emu/cpu/m6805/m6805.c b/src/emu/cpu/m6805/m6805.c index b2157809a89..eb0796693ad 100644 --- a/src/emu/cpu/m6805/m6805.c +++ b/src/emu/cpu/m6805/m6805.c @@ -45,7 +45,7 @@ enum }; /* 6805 Registers */ -typedef struct +struct m6805_Regs { /* Pre-pointerafied public globals */ int iCount; @@ -67,7 +67,7 @@ typedef struct direct_read_data *direct; int irq_state[9]; /* KW Additional lines for HD63705 */ int nmi_state; -} m6805_Regs; +}; INLINE m6805_Regs *get_safe_token(device_t *device) { diff --git a/src/emu/cpu/m6809/6809dasm.c b/src/emu/cpu/m6809/6809dasm.c index cb77184a4e2..b0c74e869a4 100644 --- a/src/emu/cpu/m6809/6809dasm.c +++ b/src/emu/cpu/m6809/6809dasm.c @@ -20,14 +20,14 @@ #include "m6809.h" // Opcode structure -typedef struct +struct opcodeinfo { UINT8 opcode; // 8-bit opcode value UINT8 length; // Opcode length in bytes char name[6]; // Opcode name UINT8 mode; // Addressing mode unsigned flags; // Disassembly flags -} opcodeinfo; +}; enum m6809_addressing_modes { diff --git a/src/emu/cpu/mc68hc11/hc11dasm.c b/src/emu/cpu/mc68hc11/hc11dasm.c index 07c154c9e6d..ae6683ffb9d 100644 --- a/src/emu/cpu/mc68hc11/hc11dasm.c +++ b/src/emu/cpu/mc68hc11/hc11dasm.c @@ -26,10 +26,10 @@ enum PAGE4, }; -typedef struct { +struct M68HC11_OPCODE { char mnemonic[32]; int address_mode; -} M68HC11_OPCODE; +}; static const M68HC11_OPCODE opcode_table[256] = { diff --git a/src/emu/cpu/minx/minx.c b/src/emu/cpu/minx/minx.c index b682bf83163..5e82dde3cff 100644 --- a/src/emu/cpu/minx/minx.c +++ b/src/emu/cpu/minx/minx.c @@ -65,7 +65,7 @@ TODO: #define EXEC_01 0x01 -typedef struct { +struct minx_state { // MINX_CONFIG config; UINT16 PC; UINT16 SP; @@ -87,7 +87,7 @@ typedef struct { legacy_cpu_device *device; address_space *program; int icount; -} minx_state; +}; #define RD(offset) minx->program->read_byte( offset ) #define WR(offset,data) minx->program->write_byte( offset, data ) diff --git a/src/emu/cpu/mips/mips3.c b/src/emu/cpu/mips/mips3.c index 58f62b3a3dd..c40e7d03d30 100644 --- a/src/emu/cpu/mips/mips3.c +++ b/src/emu/cpu/mips/mips3.c @@ -86,7 +86,7 @@ ***************************************************************************/ /* MIPS3 Registers */ -typedef struct +struct mips3_regs { /* core state */ mips3_state core; @@ -112,7 +112,7 @@ typedef struct void (*ldr)(UINT32 op); void (*sdl)(UINT32 op); void (*sdr)(UINT32 op); -} mips3_regs; +}; diff --git a/src/emu/cpu/nec/necdasm.c b/src/emu/cpu/nec/necdasm.c index 9f9631a2898..21b964a2984 100644 --- a/src/emu/cpu/nec/necdasm.c +++ b/src/emu/cpu/nec/necdasm.c @@ -74,19 +74,19 @@ enum SEG_SS }; -typedef struct { +struct I386_OPCODE { char mnemonic[32]; UINT32 flags; UINT32 param1; UINT32 param2; UINT32 param3; offs_t dasm_flags; -} I386_OPCODE; +}; -typedef struct { +struct GROUP_OP { char mnemonic[32]; const I386_OPCODE *opcode; -} GROUP_OP; +}; static const UINT8 *opcode_ptr; static const UINT8 *opcode_ptr_base; diff --git a/src/emu/cpu/powerpc/ppc.c b/src/emu/cpu/powerpc/ppc.c index b65ad717d9a..44a59f72b3d 100644 --- a/src/emu/cpu/powerpc/ppc.c +++ b/src/emu/cpu/powerpc/ppc.c @@ -195,15 +195,15 @@ static UINT32 ppc_field_xlat[256]; #define BYTE_REVERSE16(x) ((((x) >> 8) & 0xff) | (((x) << 8) & 0xff00)) #define BYTE_REVERSE32(x) ((((x) >> 24) & 0xff) | (((x) >> 8) & 0xff00) | (((x) << 8) & 0xff0000) | (((x) << 24) & 0xff000000)) -typedef struct { +struct DMA_REGS { UINT32 cr; UINT32 da; UINT32 sa; UINT32 ct; UINT32 cc; -} DMA_REGS; +}; -typedef struct { +struct SPU_REGS { UINT8 spls; UINT8 sphs; UINT16 brd; @@ -214,7 +214,7 @@ typedef struct { UINT8 sptb; emu_timer *rx_timer; emu_timer *tx_timer; -} SPU_REGS; +}; typedef union { UINT64 id; @@ -226,13 +226,13 @@ typedef union { float f; } FPR32; -typedef struct { +struct BATENT { UINT32 u; UINT32 l; -} BATENT; +}; -typedef struct { +struct PPC_REGS { UINT32 r[32]; UINT32 pc; UINT32 npc; @@ -350,15 +350,15 @@ typedef struct { void (* optable59[1024])(UINT32); void (* optable63[1024])(UINT32); void (* optable[64])(UINT32); -} PPC_REGS; +}; -typedef struct { +struct PPC_OPCODE { int code; int subcode; void (* handler)(UINT32); -} PPC_OPCODE; +}; diff --git a/src/emu/cpu/powerpc/ppc_dasm.c b/src/emu/cpu/powerpc/ppc_dasm.c index c53a446f06b..0b0168efda4 100644 --- a/src/emu/cpu/powerpc/ppc_dasm.c +++ b/src/emu/cpu/powerpc/ppc_dasm.c @@ -102,7 +102,7 @@ enum * Describes the layout of an instruction. */ -typedef struct +struct IDESCR { char mnem[32]; // mnemonic UINT32 match; // bit pattern of instruction after it has been masked @@ -110,7 +110,7 @@ typedef struct // bit pattern to determine a match) int format; // operand format int flags; // flags -} IDESCR; +}; /* * Instruction Table diff --git a/src/emu/cpu/saturn/saturnds.c b/src/emu/cpu/saturn/saturnds.c index e0889250027..a5aa9f555c0 100644 --- a/src/emu/cpu/saturn/saturnds.c +++ b/src/emu/cpu/saturn/saturnds.c @@ -586,12 +586,12 @@ enum _opcode_adr }; typedef enum _opcode_adr opcode_adr; -typedef struct +struct OPCODE { opcode_sel sel; opcode_adr adr; MNEMONICS mnemonic; -} OPCODE; +}; static const char *field_2_string(int adr_enum) { diff --git a/src/emu/cpu/scudsp/scudspdasm.c b/src/emu/cpu/scudsp/scudspdasm.c index b696f99f392..7e31879efbe 100644 --- a/src/emu/cpu/scudsp/scudspdasm.c +++ b/src/emu/cpu/scudsp/scudspdasm.c @@ -26,12 +26,12 @@ enum EA_MVIDSTMEM, }; -typedef struct { +struct SCUDSP_OPCODE { char mnemonic[32]; int address_mode_1; int address_mode_2; int address_mode_3, -} SCUDSP_OPCODE; +}; static const SCUDSP_OPCODE alu_table[16] = { diff --git a/src/emu/cpu/sh2/sh2comn.h b/src/emu/cpu/sh2/sh2comn.h index af1e6d5b7ef..9355d9e00ec 100644 --- a/src/emu/cpu/sh2/sh2comn.h +++ b/src/emu/cpu/sh2/sh2comn.h @@ -90,7 +90,7 @@ do { \ sh2_exception(sh2,message,irq); \ } while(0) -typedef struct +struct sh2_state { UINT32 ppc; UINT32 pc; @@ -182,7 +182,7 @@ typedef struct uml::code_handle * nocode; /* nocode */ uml::code_handle * out_of_cycles; /* out of cycles exception handler */ #endif -} sh2_state; +}; #ifdef USE_SH2DRC class sh2_frontend : public drc_frontend diff --git a/src/emu/cpu/sh4/sh4comn.h b/src/emu/cpu/sh4/sh4comn.h index 04a42f84d01..b71e6fa826d 100644 --- a/src/emu/cpu/sh4/sh4comn.h +++ b/src/emu/cpu/sh4/sh4comn.h @@ -49,7 +49,7 @@ class sh4_frontend; #endif -typedef struct +struct sh4_state { UINT32 ppc; UINT32 pc, spc; @@ -208,7 +208,7 @@ typedef struct UINT32 prefadr; UINT32 target; #endif -} sh4_state; +}; #ifdef USE_SH4DRC class sh4_frontend : public drc_frontend diff --git a/src/emu/cpu/sharc/sharc.c b/src/emu/cpu/sharc/sharc.c index 161ecc411ce..22cf6fd5167 100644 --- a/src/emu/cpu/sharc/sharc.c +++ b/src/emu/cpu/sharc/sharc.c @@ -39,13 +39,13 @@ enum SHARC_B12, SHARC_B13, SHARC_B14, SHARC_B15, }; -typedef struct +struct SHARC_DAG { UINT32 i[8]; UINT32 m[8]; UINT32 b[8]; UINT32 l[8]; -} SHARC_DAG; +}; typedef union { @@ -53,7 +53,7 @@ typedef union float f; } SHARC_REG; -typedef struct +struct DMA_REGS { UINT32 control; UINT32 int_index; @@ -64,16 +64,16 @@ typedef struct UINT32 ext_index; UINT32 ext_modifier; UINT32 ext_count; -} DMA_REGS; +}; -typedef struct +struct LADDR { UINT32 addr; UINT32 code; UINT32 loop_type; -} LADDR; +}; -typedef struct +struct DMA_OP { UINT32 src; UINT32 dst; @@ -86,7 +86,7 @@ typedef struct INT32 chained_direction; emu_timer *timer; bool active; -} DMA_OP; +}; typedef struct _SHARC_REGS SHARC_REGS; struct _SHARC_REGS diff --git a/src/emu/cpu/sharc/sharc.h b/src/emu/cpu/sharc/sharc.h index 1150c74bda4..1a858d85957 100644 --- a/src/emu/cpu/sharc/sharc.h +++ b/src/emu/cpu/sharc/sharc.h @@ -17,9 +17,9 @@ typedef enum BOOT_MODE_NOBOOT } SHARC_BOOT_MODE; -typedef struct { +struct sharc_config { SHARC_BOOT_MODE boot_mode; -} sharc_config; +}; extern void sharc_set_flag_input(device_t *device, int flag_num, int state); diff --git a/src/emu/cpu/sharc/sharcdsm.h b/src/emu/cpu/sharc/sharcdsm.h index d84563943ad..c7edef8b7ac 100644 --- a/src/emu/cpu/sharc/sharcdsm.h +++ b/src/emu/cpu/sharc/sharcdsm.h @@ -69,9 +69,9 @@ static const char mr_regnames[16][8] = "???", "???", "???", "???", "???", "???", "???", "???" }; -typedef struct +struct SHARC_DASM_OP { UINT32 op_mask; UINT32 op_bits; UINT32 (* handler)(UINT32, UINT64); -} SHARC_DASM_OP; +}; diff --git a/src/emu/cpu/sharc/sharcops.h b/src/emu/cpu/sharc/sharcops.h index 115cfb757b9..1152646f309 100644 --- a/src/emu/cpu/sharc/sharcops.h +++ b/src/emu/cpu/sharc/sharcops.h @@ -1,9 +1,9 @@ -typedef struct +struct SHARC_OP { UINT32 op_mask; UINT32 op_bits; void (*handler)(SHARC_REGS *cpustate); -} SHARC_OP; +}; static const SHARC_OP sharc_opcode_table[] = { diff --git a/src/emu/cpu/sm8500/sm8500.h b/src/emu/cpu/sm8500/sm8500.h index 7e942b6b68f..0a31924f607 100644 --- a/src/emu/cpu/sm8500/sm8500.h +++ b/src/emu/cpu/sm8500/sm8500.h @@ -4,10 +4,10 @@ #define __SM8500_H__ -typedef struct { +struct SM8500_CONFIG { void (*handle_dma)(device_t *device, int cycles); void (*handle_timers)(device_t *device, int cycles); -} SM8500_CONFIG; +}; /* interrupts */ #define ILL_INT 0 diff --git a/src/emu/cpu/spc700/spc700.c b/src/emu/cpu/spc700/spc700.c index cb8a25fd9c7..c35ef4ad2ec 100644 --- a/src/emu/cpu/spc700/spc700.c +++ b/src/emu/cpu/spc700/spc700.c @@ -66,7 +66,7 @@ Address Function Register R/W When Reset Remarks #include "spc700.h" /* CPU Structure */ -typedef struct +struct spc700i_cpu { uint a; /* Accumulator */ uint x; /* Index Register X */ @@ -96,7 +96,7 @@ typedef struct uint temp1, temp2, temp3; short spc_int16; int spc_int32; -} spc700i_cpu; +}; INLINE spc700i_cpu *get_safe_token(device_t *device) { diff --git a/src/emu/cpu/spc700/spc700ds.c b/src/emu/cpu/spc700/spc700ds.c index fc7d80e2422..5073154083e 100644 --- a/src/emu/cpu/spc700/spc700ds.c +++ b/src/emu/cpu/spc700/spc700ds.c @@ -20,11 +20,11 @@ author (Karl Stenerud) at karl@higashiyama-unet.ocn.ne.jp. -typedef struct +struct opcode_struct { unsigned char name; unsigned char args[2]; -} opcode_struct; +}; enum { diff --git a/src/emu/cpu/superfx/superfx.c b/src/emu/cpu/superfx/superfx.c index 9925afeb96d..795934e11db 100644 --- a/src/emu/cpu/superfx/superfx.c +++ b/src/emu/cpu/superfx/superfx.c @@ -2,18 +2,18 @@ #include "debugger.h" #include "superfx.h" -typedef struct +struct pixelcache_t { UINT16 offset; UINT8 bitpend; UINT8 data[8]; -} pixelcache_t; +}; -typedef struct +struct cache_t { UINT8 buffer[0x200]; UINT8 valid[0x20]; -} cache_t; +}; struct superfx_state { diff --git a/src/emu/cpu/tlcs900/900tbl.c b/src/emu/cpu/tlcs900/900tbl.c index e28ef8d5169..40742589aa3 100644 --- a/src/emu/cpu/tlcs900/900tbl.c +++ b/src/emu/cpu/tlcs900/900tbl.c @@ -3852,13 +3852,13 @@ static void _ZCF(tlcs900_state *cpustate) } -typedef struct +struct tlcs900inst { void (*opfunc)(tlcs900_state *cpustate); int operand1; int operand2; int cycles; -} tlcs900inst; +}; static void prepare_operands(tlcs900_state *cpustate, const tlcs900inst *inst) diff --git a/src/emu/cpu/tlcs900/dasm900.c b/src/emu/cpu/tlcs900/dasm900.c index 3eed2d317cc..063a9444c75 100644 --- a/src/emu/cpu/tlcs900/dasm900.c +++ b/src/emu/cpu/tlcs900/dasm900.c @@ -88,12 +88,12 @@ enum e_operand }; -typedef struct +struct tlcs900inst { e_mnemonics mnemonic; e_operand operand1; e_operand operand2; -} tlcs900inst; +}; static const tlcs900inst mnemonic_80[256] = diff --git a/src/emu/cpu/tms32051/tms32051.c b/src/emu/cpu/tms32051/tms32051.c index d0167a4c832..c3429f54878 100644 --- a/src/emu/cpu/tms32051/tms32051.c +++ b/src/emu/cpu/tms32051/tms32051.c @@ -46,7 +46,7 @@ enum TMS32051_AR7, }; -typedef struct +struct PMST { UINT16 iptr; UINT16 avis; @@ -56,18 +56,18 @@ typedef struct UINT16 ndx; UINT16 trm; UINT16 braf; -} PMST; +}; -typedef struct +struct ST0 { UINT16 dp; UINT16 intm; UINT16 ovm; UINT16 ov; UINT16 arp; -} ST0; +}; -typedef struct +struct ST1 { UINT16 arb; UINT16 cnf; @@ -77,7 +77,7 @@ typedef struct UINT16 hm; UINT16 xf; UINT16 pm; -} ST1; +}; struct tms32051_state { diff --git a/src/emu/cpu/tms57002/tmsmake.c b/src/emu/cpu/tms57002/tmsmake.c index 20b7002524c..9106fcebadb 100644 --- a/src/emu/cpu/tms57002/tmsmake.c +++ b/src/emu/cpu/tms57002/tmsmake.c @@ -31,26 +31,26 @@ enum { enum { PA, PC, PD, PD24, PI, PML, PMO, PMV, PB, PWA, PWC, PWD, SFAI }; -typedef struct { +struct instr { char *name; char *dasm; char *run; int line, cycles, type, baseval, variants; unsigned int flags; -} instr; +}; -typedef struct { +struct pdesc { const char *opt; int pcount, id; -} pdesc; +}; -typedef struct { +struct pinf { const char *start; int size; int id; int pcount; int ppos[4]; -} pinf; +}; static const pdesc pp_r[] = { { "a", 0, PA }, @@ -74,12 +74,12 @@ static instr cat1[0x40], cat2[0x80], cat3[0x80]; static pinf parse_res[4096]; static int parse_count; -typedef struct { +struct vinfo { unsigned int mask; int variants; const char *name; const char *getter; -} vinfo; +}; enum { IxCMODE, IxDMODE, IxSFAI, IxCRM, IxDBP, IxSFAO, IxSFMO, IxRND, IxMOVM, IxSFMA, IxCOUNT }; diff --git a/src/emu/cpu/tms7000/7000dasm.c b/src/emu/cpu/tms7000/7000dasm.c index 8ab0b0d94f6..380cc43aae1 100644 --- a/src/emu/cpu/tms7000/7000dasm.c +++ b/src/emu/cpu/tms7000/7000dasm.c @@ -4,17 +4,17 @@ typedef enum { DONE, NONE, UI8, I8, UI16, I16, PCREL, PCABS, TRAP } operandtype; -typedef struct { +struct oprandinfo { char opstr[4][12]; operandtype decode[4]; -} oprandinfo; +}; -typedef struct { +struct opcodeinfo { int opcode; char name[8]; int operand; UINT32 s_flag; -} opcodeinfo; +}; static const oprandinfo of[] = { /* 00 */ { {" B,A", "", "", ""}, {NONE, DONE, DONE, DONE} }, diff --git a/src/emu/cpu/upd7810/upd7810.h b/src/emu/cpu/upd7810/upd7810.h index 4bb2ba2e062..ab147ac3ebe 100644 --- a/src/emu/cpu/upd7810/upd7810.h +++ b/src/emu/cpu/upd7810/upd7810.h @@ -33,10 +33,10 @@ typedef enum typedef int (*upd7810_io_callback)(device_t *device, int ioline, int state); // use it as reset parameter in the Machine struct -typedef struct { +struct UPD7810_CONFIG { UPD7810_TYPE type; upd7810_io_callback io_callback; -} UPD7810_CONFIG; +}; enum { diff --git a/src/emu/drawgfxm.h b/src/emu/drawgfxm.h index bd16e4e96c2..5686f788882 100644 --- a/src/emu/drawgfxm.h +++ b/src/emu/drawgfxm.h @@ -56,7 +56,7 @@ /* special priority type meaning "none" */ -typedef struct { char dummy[3]; } NO_PRIORITY; +struct NO_PRIORITY { char dummy[3]; }; extern bitmap_ind8 drawgfx_dummy_priority_bitmap; #define DECLARE_NO_PRIORITY bitmap_t &priority = drawgfx_dummy_priority_bitmap; diff --git a/src/emu/machine/68681.c b/src/emu/machine/68681.c index 395d244b073..45ecfa325bf 100644 --- a/src/emu/machine/68681.c +++ b/src/emu/machine/68681.c @@ -44,7 +44,7 @@ static const char *const duart68681_reg_write_names[0x10] = #define RX_FIFO_SIZE 3 -typedef struct +struct DUART68681_CHANNEL { /* Registers */ UINT8 CR; /* Command register */ @@ -70,9 +70,9 @@ typedef struct UINT8 tx_ready; emu_timer *tx_timer; -} DUART68681_CHANNEL; +}; -typedef struct +struct duart68681_state { /* device */ device_t *device; @@ -99,7 +99,7 @@ typedef struct /* UART channels */ DUART68681_CHANNEL channel[2]; -} duart68681_state; +}; INLINE duart68681_state *get_safe_token(device_t *device) { diff --git a/src/emu/machine/matsucd.c b/src/emu/machine/matsucd.c index 7778eb5b0db..f913812822b 100644 --- a/src/emu/machine/matsucd.c +++ b/src/emu/machine/matsucd.c @@ -27,7 +27,7 @@ can be expanded with support for the other drives as needed. #define MATSU_STATUS_MEDIA ( 1 << 6 ) /* media present (in caddy or tray) */ #define MATSU_STATUS_DOORCLOSED ( 1 << 7 ) /* tray status */ -typedef struct +struct matsucd { UINT8 enabled; /* /ENABLE - Unit enabled */ UINT8 cmd_signal; /* /CMD - Command mode */ @@ -53,7 +53,7 @@ typedef struct cdrom_file *cdrom; device_t *cdda; emu_timer *frame_timer; -} matsucd; +}; static matsucd cd; diff --git a/src/emu/machine/msm6242.h b/src/emu/machine/msm6242.h index 25e8b5f82bd..7e6fa35ad60 100644 --- a/src/emu/machine/msm6242.h +++ b/src/emu/machine/msm6242.h @@ -30,11 +30,11 @@ struct msm6242_interface devcb_write_line m_out_int_cb; }; -typedef struct +struct rtc_regs_t { UINT8 sec, min, hour, day, wday, month; UINT16 year; -} rtc_regs_t; +}; // ======================> msm6242_device diff --git a/src/emu/machine/pc16552d.c b/src/emu/machine/pc16552d.c index 00f7e4b68f5..50cbb9cc71b 100644 --- a/src/emu/machine/pc16552d.c +++ b/src/emu/machine/pc16552d.c @@ -34,7 +34,7 @@ #define INT_ENABLE_RX_LINE_STATUS 0x04 #define INT_ENABLE_MODEM_STATUS 0x08 -typedef struct +struct PC16552D_CHANNEL { UINT16 divisor; UINT8 reg[8]; @@ -48,15 +48,15 @@ typedef struct int tx_fifo_write_ptr; int tx_fifo_num; emu_timer *tx_fifo_timer; -} PC16552D_CHANNEL; +}; -typedef struct +struct PC16552D_REGS { PC16552D_CHANNEL ch[2]; int frequency; void (* irq_handler)(running_machine &machine, int channel, int value); void (* tx_callback)(running_machine &machine, int channel, int count, UINT8* data); -} PC16552D_REGS; +}; #define MAX_PC16552D_CHIPS 4 diff --git a/src/emu/machine/rtc9701.h b/src/emu/machine/rtc9701.h index 9c5b96be74c..3f1e07d9bad 100644 --- a/src/emu/machine/rtc9701.h +++ b/src/emu/machine/rtc9701.h @@ -37,10 +37,10 @@ typedef enum } rtc9701_state_t; -typedef struct +struct rtc_regs_t { UINT8 sec, min, hour, day, wday, month, year; -} rtc_regs_t; +}; // ======================> rtc9701_device diff --git a/src/emu/machine/s3520cf.h b/src/emu/machine/s3520cf.h index e2808300da4..e7c1d58eee5 100644 --- a/src/emu/machine/s3520cf.h +++ b/src/emu/machine/s3520cf.h @@ -29,10 +29,10 @@ typedef enum RTC_SET_DATA } s3520cf_state_t; -typedef struct +struct rtc_regs_t { UINT8 sec, min, hour, day, wday, month, year; -} rtc_regs_t; +}; // ======================> s3520cf_device diff --git a/src/emu/machine/s3c2400.h b/src/emu/machine/s3c2400.h index 7cf177f41aa..d59e5ee4120 100644 --- a/src/emu/machine/s3c2400.h +++ b/src/emu/machine/s3c2400.h @@ -407,17 +407,17 @@ void s3c2400_uart_fifo_w( device_t *device, int uart, UINT8 data); TYPE DEFINITIONS *******************************************************************************/ -typedef struct +struct s3c24xx_memcon_regs_t { UINT32 data[0x34/4]; -} s3c24xx_memcon_regs_t; +}; -typedef struct +struct s3c24xx_usbhost_regs_t { UINT32 data[0x5C/4]; -} s3c24xx_usbhost_regs_t; +}; -typedef struct +struct s3c24xx_irq_regs_t { UINT32 srcpnd; UINT32 intmod; @@ -425,9 +425,9 @@ typedef struct UINT32 priority; UINT32 intpnd; UINT32 intoffset; -} s3c24xx_irq_regs_t; +}; -typedef struct +struct s3c24xx_dma_regs_t { UINT32 disrc; UINT32 didst; @@ -436,9 +436,9 @@ typedef struct UINT32 dcsrc; UINT32 dcdst; UINT32 dmasktrig; -} s3c24xx_dma_regs_t; +}; -typedef struct +struct s3c24xx_clkpow_regs_t { UINT32 locktime; UINT32 mpllcon; @@ -446,9 +446,9 @@ typedef struct UINT32 clkcon; UINT32 clkslow; UINT32 clkdivn; -} s3c24xx_clkpow_regs_t; +}; -typedef struct +struct s3c24xx_lcd_regs_t { UINT32 lcdcon1; UINT32 lcdcon2; @@ -464,14 +464,14 @@ typedef struct UINT32 reserved[8]; UINT32 dithmode; UINT32 tpal; -} s3c24xx_lcd_regs_t; +}; -typedef struct +struct s3c24xx_lcdpal_regs_t { UINT32 data[0x400/4]; -} s3c24xx_lcdpal_regs_t; +}; -typedef struct +struct s3c24xx_uart_regs_t { UINT32 ulcon; UINT32 ucon; @@ -484,9 +484,9 @@ typedef struct UINT32 utxh; UINT32 urxh; UINT32 ubrdiv; -} s3c24xx_uart_regs_t; +}; -typedef struct +struct s3c24xx_pwm_regs_t { UINT32 tcfg0; UINT32 tcfg1; @@ -505,38 +505,38 @@ typedef struct UINT32 tcnto3; UINT32 tcntb4; UINT32 tcnto4; -} s3c24xx_pwm_regs_t; +}; -typedef struct +struct s3c24xx_usbdev_regs_t { UINT32 data[0xBC/4]; -} s3c24xx_usbdev_regs_t; +}; -typedef struct +struct s3c24xx_wdt_regs_t { UINT32 wtcon; UINT32 wtdat; UINT32 wtcnt; -} s3c24xx_wdt_regs_t; +}; -typedef struct +struct s3c24xx_iic_regs_t { UINT32 iiccon; UINT32 iicstat; UINT32 iicadd; UINT32 iicds; -} s3c24xx_iic_regs_t; +}; -typedef struct +struct s3c24xx_iis_regs_t { UINT32 iiscon; UINT32 iismod; UINT32 iispsr; UINT32 iisfcon; UINT32 iisfifo; -} s3c24xx_iis_regs_t; +}; -typedef struct +struct s3c24xx_gpio_regs_t { UINT32 gpacon; UINT32 gpadat; @@ -561,9 +561,9 @@ typedef struct UINT32 opencr; UINT32 misccr; UINT32 extint; -} s3c24xx_gpio_regs_t; +}; -typedef struct +struct s3c24xx_rtc_regs_t { UINT32 rtccon; UINT32 ticnt; @@ -583,15 +583,15 @@ typedef struct UINT32 bcddow; UINT32 bcdmon; UINT32 bcdyear; -} s3c24xx_rtc_regs_t; +}; -typedef struct +struct s3c24xx_adc_regs_t { UINT32 adccon; UINT32 adcdat; -} s3c24xx_adc_regs_t; +}; -typedef struct +struct s3c24xx_spi_regs_t { UINT32 spcon; UINT32 spsta; @@ -599,41 +599,41 @@ typedef struct UINT32 sppre; UINT32 sptdat; UINT32 sprdat; -} s3c24xx_spi_regs_t; +}; -typedef struct +struct s3c24xx_mmc_regs_t { UINT32 data[0x40/4]; -} s3c24xx_mmc_regs_t; +}; -typedef struct +struct s3c24xx_memcon_t { s3c24xx_memcon_regs_t regs; -} s3c24xx_memcon_t; +}; -typedef struct +struct s3c24xx_usbhost_t { s3c24xx_usbhost_regs_t regs; -} s3c24xx_usbhost_t; +}; -typedef struct +struct s3c24xx_irq_t { s3c24xx_irq_regs_t regs; int line_irq, line_fiq; -} s3c24xx_irq_t; +}; -typedef struct +struct s3c24xx_dma_t { s3c24xx_dma_regs_t regs; emu_timer *timer; -} s3c24xx_dma_t; +}; -typedef struct +struct s3c24xx_clkpow_t { s3c24xx_clkpow_regs_t regs; -} s3c24xx_clkpow_t; +}; -typedef struct +struct s3c24xx_lcd_t { s3c24xx_lcd_regs_t regs; emu_timer *timer; @@ -650,81 +650,81 @@ typedef struct UINT32 tpal; UINT32 hpos_min, hpos_max, vpos_min, vpos_max; UINT32 dma_data, dma_bits; -} s3c24xx_lcd_t; +}; -typedef struct +struct s3c24xx_lcdpal_t { s3c24xx_lcdpal_regs_t regs; -} s3c24xx_lcdpal_t; +}; -typedef struct +struct s3c24xx_uart_t { s3c24xx_uart_regs_t regs; -} s3c24xx_uart_t; +}; -typedef struct +struct s3c24xx_pwm_t { s3c24xx_pwm_regs_t regs; emu_timer *timer[5]; UINT32 cnt[5]; UINT32 cmp[5]; UINT32 freq[5]; -} s3c24xx_pwm_t; +}; -typedef struct +struct s3c24xx_usbdev_t { s3c24xx_usbdev_regs_t regs; -} s3c24xx_usbdev_t; +}; -typedef struct +struct s3c24xx_wdt_t { s3c24xx_wdt_regs_t regs; emu_timer *timer; -} s3c24xx_wdt_t; +}; -typedef struct +struct s3c24xx_iic_t { s3c24xx_iic_regs_t regs; emu_timer *timer; int count; -} s3c24xx_iic_t; +}; -typedef struct +struct s3c24xx_iis_t { s3c24xx_iis_regs_t regs; emu_timer *timer; UINT16 fifo[16/2]; int fifo_index; -} s3c24xx_iis_t; +}; -typedef struct +struct s3c24xx_gpio_t { s3c24xx_gpio_regs_t regs; -} s3c24xx_gpio_t; +}; -typedef struct +struct s3c24xx_rtc_t { s3c24xx_rtc_regs_t regs; emu_timer *timer_tick_count; emu_timer *timer_update; -} s3c24xx_rtc_t; +}; -typedef struct +struct s3c24xx_adc_t { s3c24xx_adc_regs_t regs; -} s3c24xx_adc_t; +}; -typedef struct +struct s3c24xx_spi_t { s3c24xx_spi_regs_t regs; -} s3c24xx_spi_t; +}; -typedef struct +struct s3c24xx_mmc_t { s3c24xx_mmc_regs_t regs; -} s3c24xx_mmc_t; +}; -typedef struct +struct s3c24xx_t { const s3c2400_interface *iface; s3c24xx_memcon_t memcon; @@ -745,6 +745,6 @@ typedef struct s3c24xx_adc_t adc; s3c24xx_spi_t spi[S3C24XX_SPI_COUNT]; s3c24xx_mmc_t mmc; -} s3c24xx_t; +}; #endif diff --git a/src/emu/machine/s3c2410.h b/src/emu/machine/s3c2410.h index b446f970194..0054f2c026c 100644 --- a/src/emu/machine/s3c2410.h +++ b/src/emu/machine/s3c2410.h @@ -498,17 +498,17 @@ static const UINT32 MAP_SUBINT_TO_INT[11] = TYPE DEFINITIONS *******************************************************************************/ -typedef struct +struct s3c24xx_memcon_regs_t { UINT32 data[0x34/4]; -} s3c24xx_memcon_regs_t; +}; -typedef struct +struct s3c24xx_usbhost_regs_t { UINT32 data[0x5C/4]; -} s3c24xx_usbhost_regs_t; +}; -typedef struct +struct s3c24xx_irq_regs_t { UINT32 srcpnd; UINT32 intmod; @@ -518,9 +518,9 @@ typedef struct UINT32 intoffset; UINT32 subsrcpnd; UINT32 intsubmsk; -} s3c24xx_irq_regs_t; +}; -typedef struct +struct s3c24xx_dma_regs_t { UINT32 disrc; UINT32 disrcc; @@ -531,9 +531,9 @@ typedef struct UINT32 dcsrc; UINT32 dcdst; UINT32 dmasktrig; -} s3c24xx_dma_regs_t; +}; -typedef struct +struct s3c24xx_clkpow_regs_t { UINT32 locktime; UINT32 mpllcon; @@ -541,9 +541,9 @@ typedef struct UINT32 clkcon; UINT32 clkslow; UINT32 clkdivn; -} s3c24xx_clkpow_regs_t; +}; -typedef struct +struct s3c24xx_lcd_regs_t { UINT32 lcdcon1; UINT32 lcdcon2; @@ -563,14 +563,14 @@ typedef struct UINT32 lcdsrcpnd; UINT32 lcdintmsk; UINT32 lpcsel; -} s3c24xx_lcd_regs_t; +}; -typedef struct +struct s3c24xx_lcdpal_regs_t { UINT32 data[0x400/4]; -} s3c24xx_lcdpal_regs_t; +}; -typedef struct +struct s3c24xx_nand_regs_t { UINT32 nfconf; UINT32 nfcmd; @@ -578,9 +578,9 @@ typedef struct UINT32 nfdata; UINT32 nfstat; UINT32 nfecc; -} s3c24xx_nand_regs_t; +}; -typedef struct +struct s3c24xx_uart_regs_t { UINT32 ulcon; UINT32 ucon; @@ -593,9 +593,9 @@ typedef struct UINT32 utxh; UINT32 urxh; UINT32 ubrdiv; -} s3c24xx_uart_regs_t; +}; -typedef struct +struct s3c24xx_pwm_regs_t { UINT32 tcfg0; UINT32 tcfg1; @@ -614,38 +614,38 @@ typedef struct UINT32 tcnto3; UINT32 tcntb4; UINT32 tcnto4; -} s3c24xx_pwm_regs_t; +}; -typedef struct +struct s3c24xx_usbdev_regs_t { UINT32 data[0x130/4]; -} s3c24xx_usbdev_regs_t; +}; -typedef struct +struct s3c24xx_wdt_regs_t { UINT32 wtcon; UINT32 wtdat; UINT32 wtcnt; -} s3c24xx_wdt_regs_t; +}; -typedef struct +struct s3c24xx_iic_regs_t { UINT32 iiccon; UINT32 iicstat; UINT32 iicadd; UINT32 iicds; -} s3c24xx_iic_regs_t; +}; -typedef struct +struct s3c24xx_iis_regs_t { UINT32 iiscon; UINT32 iismod; UINT32 iispsr; UINT32 iisfcon; UINT32 iisfifo; -} s3c24xx_iis_regs_t; +}; -typedef struct +struct s3c24xx_gpio_regs_t { UINT32 gpacon; UINT32 gpadat; @@ -695,9 +695,9 @@ typedef struct UINT32 gstatus2; UINT32 gstatus3; UINT32 gstatus4; -} s3c24xx_gpio_regs_t; +}; -typedef struct +struct s3c24xx_rtc_regs_t { UINT32 rtccon; UINT32 ticnt; @@ -717,18 +717,18 @@ typedef struct UINT32 bcddow; UINT32 bcdmon; UINT32 bcdyear; -} s3c24xx_rtc_regs_t; +}; -typedef struct +struct s3c24xx_adc_regs_t { UINT32 adccon; UINT32 adctsc; UINT32 adcdly; UINT32 adcdat0; UINT32 adcdat1; -} s3c24xx_adc_regs_t; +}; -typedef struct +struct s3c24xx_spi_regs_t { UINT32 spcon; UINT32 spsta; @@ -736,41 +736,41 @@ typedef struct UINT32 sppre; UINT32 sptdat; UINT32 sprdat; -} s3c24xx_spi_regs_t; +}; -typedef struct +struct s3c24xx_sdi_regs_t { UINT32 data[0x44/4]; -} s3c24xx_sdi_regs_t; +}; -typedef struct +struct s3c24xx_memcon_t { s3c24xx_memcon_regs_t regs; -} s3c24xx_memcon_t; +}; -typedef struct +struct s3c24xx_usbhost_t { s3c24xx_usbhost_regs_t regs; -} s3c24xx_usbhost_t; +}; -typedef struct +struct s3c24xx_irq_t { s3c24xx_irq_regs_t regs; int line_irq, line_fiq; -} s3c24xx_irq_t; +}; -typedef struct +struct s3c24xx_dma_t { s3c24xx_dma_regs_t regs; emu_timer *timer; -} s3c24xx_dma_t; +}; -typedef struct +struct s3c24xx_clkpow_t { s3c24xx_clkpow_regs_t regs; -} s3c24xx_clkpow_t; +}; -typedef struct +struct s3c24xx_lcd_t { s3c24xx_lcd_regs_t regs; emu_timer *timer; @@ -787,89 +787,89 @@ typedef struct UINT32 tpal; UINT32 hpos_min, hpos_max, vpos_min, vpos_max; UINT32 dma_data, dma_bits; -} s3c24xx_lcd_t; +}; -typedef struct +struct s3c24xx_lcdpal_t { s3c24xx_lcdpal_regs_t regs; -} s3c24xx_lcdpal_t; +}; -typedef struct +struct s3c24xx_nand_t { s3c24xx_nand_regs_t regs; UINT8 mecc[3]; int ecc_pos, data_count; -} s3c24xx_nand_t; +}; -typedef struct +struct s3c24xx_uart_t { s3c24xx_uart_regs_t regs; -} s3c24xx_uart_t; +}; -typedef struct +struct s3c24xx_pwm_t { s3c24xx_pwm_regs_t regs; emu_timer *timer[5]; UINT32 cnt[5]; UINT32 cmp[5]; UINT32 freq[5]; -} s3c24xx_pwm_t; +}; -typedef struct +struct s3c24xx_usbdev_t { s3c24xx_usbdev_regs_t regs; -} s3c24xx_usbdev_t; +}; -typedef struct +struct s3c24xx_wdt_t { s3c24xx_wdt_regs_t regs; emu_timer *timer; UINT32 freq, cnt; -} s3c24xx_wdt_t; +}; -typedef struct +struct s3c24xx_iic_t { s3c24xx_iic_regs_t regs; emu_timer *timer; int count; -} s3c24xx_iic_t; +}; -typedef struct +struct s3c24xx_iis_t { s3c24xx_iis_regs_t regs; emu_timer *timer; UINT16 fifo[16/2]; int fifo_index; -} s3c24xx_iis_t; +}; -typedef struct +struct s3c24xx_gpio_t { s3c24xx_gpio_regs_t regs; -} s3c24xx_gpio_t; +}; -typedef struct +struct s3c24xx_rtc_t { s3c24xx_rtc_regs_t regs; emu_timer *timer_tick_count; emu_timer *timer_update; -} s3c24xx_rtc_t; +}; -typedef struct +struct s3c24xx_adc_t { s3c24xx_adc_regs_t regs; -} s3c24xx_adc_t; +}; -typedef struct +struct s3c24xx_spi_t { s3c24xx_spi_regs_t regs; -} s3c24xx_spi_t; +}; -typedef struct +struct s3c24xx_sdi_t { s3c24xx_sdi_regs_t regs; -} s3c24xx_sdi_t; +}; -typedef struct +struct s3c24xx_t { const s3c2410_interface *iface; UINT8 steppingstone[4*1024]; @@ -892,6 +892,6 @@ typedef struct s3c24xx_adc_t adc; s3c24xx_spi_t spi[S3C24XX_SPI_COUNT]; s3c24xx_sdi_t sdi; -} s3c24xx_t; +}; #endif diff --git a/src/emu/machine/s3c2440.h b/src/emu/machine/s3c2440.h index 26994b73d38..3f386d77852 100644 --- a/src/emu/machine/s3c2440.h +++ b/src/emu/machine/s3c2440.h @@ -527,17 +527,17 @@ static const UINT32 MAP_SUBINT_TO_INT[15] = TYPE DEFINITIONS *******************************************************************************/ -typedef struct +struct s3c24xx_memcon_regs_t { UINT32 data[0x34/4]; -} s3c24xx_memcon_regs_t; +}; -typedef struct +struct s3c24xx_usbhost_regs_t { UINT32 data[0x5C/4]; -} s3c24xx_usbhost_regs_t; +}; -typedef struct +struct s3c24xx_irq_regs_t { UINT32 srcpnd; UINT32 intmod; @@ -547,9 +547,9 @@ typedef struct UINT32 intoffset; UINT32 subsrcpnd; UINT32 intsubmsk; -} s3c24xx_irq_regs_t; +}; -typedef struct +struct s3c24xx_dma_regs_t { UINT32 disrc; UINT32 disrcc; @@ -560,9 +560,9 @@ typedef struct UINT32 dcsrc; UINT32 dcdst; UINT32 dmasktrig; -} s3c24xx_dma_regs_t; +}; -typedef struct +struct s3c24xx_clkpow_regs_t { UINT32 locktime; UINT32 mpllcon; @@ -571,9 +571,9 @@ typedef struct UINT32 clkslow; UINT32 clkdivn; UINT32 camdivn; -} s3c24xx_clkpow_regs_t; +}; -typedef struct +struct s3c24xx_lcd_regs_t { UINT32 lcdcon1; UINT32 lcdcon2; @@ -593,14 +593,14 @@ typedef struct UINT32 lcdsrcpnd; UINT32 lcdintmsk; UINT32 tconsel; -} s3c24xx_lcd_regs_t; +}; -typedef struct +struct s3c24xx_lcdpal_regs_t { UINT32 data[0x400/4]; -} s3c24xx_lcdpal_regs_t; +}; -typedef struct +struct s3c24xx_nand_regs_t { UINT32 nfconf; UINT32 nfcont; @@ -618,14 +618,14 @@ typedef struct UINT32 nfsecc; UINT32 nfsblk; UINT32 nfeblk; -} s3c24xx_nand_regs_t; +}; -typedef struct +struct s3c24xx_cam_regs_t { UINT32 data[0xA4/4]; -} s3c24xx_cam_regs_t; +}; -typedef struct +struct s3c24xx_uart_regs_t { UINT32 ulcon; UINT32 ucon; @@ -638,9 +638,9 @@ typedef struct UINT32 utxh; UINT32 urxh; UINT32 ubrdiv; -} s3c24xx_uart_regs_t; +}; -typedef struct +struct s3c24xx_pwm_regs_t { UINT32 tcfg0; UINT32 tcfg1; @@ -659,39 +659,39 @@ typedef struct UINT32 tcnto3; UINT32 tcntb4; UINT32 tcnto4; -} s3c24xx_pwm_regs_t; +}; -typedef struct +struct s3c24xx_usbdev_regs_t { UINT32 data[0x130/4]; -} s3c24xx_usbdev_regs_t; +}; -typedef struct +struct s3c24xx_wdt_regs_t { UINT32 wtcon; UINT32 wtdat; UINT32 wtcnt; -} s3c24xx_wdt_regs_t; +}; -typedef struct +struct s3c24xx_iic_regs_t { UINT32 iiccon; UINT32 iicstat; UINT32 iicadd; UINT32 iicds; UINT32 iiclc; -} s3c24xx_iic_regs_t; +}; -typedef struct +struct s3c24xx_iis_regs_t { UINT32 iiscon; UINT32 iismod; UINT32 iispsr; UINT32 iisfcon; UINT32 iisfifo; -} s3c24xx_iis_regs_t; +}; -typedef struct +struct s3c24xx_gpio_regs_t { UINT32 gpacon; UINT32 gpadat; @@ -748,9 +748,9 @@ typedef struct UINT32 gpjcon; UINT32 gpjdat; UINT32 gpjup; -} s3c24xx_gpio_regs_t; +}; -typedef struct +struct s3c24xx_rtc_regs_t { UINT32 rtccon; UINT32 ticnt; @@ -770,9 +770,9 @@ typedef struct UINT32 bcddow; UINT32 bcdmon; UINT32 bcdyear; -} s3c24xx_rtc_regs_t; +}; -typedef struct +struct s3c24xx_adc_regs_t { UINT32 adccon; UINT32 adctsc; @@ -780,9 +780,9 @@ typedef struct UINT32 adcdat0; UINT32 adcdat1; UINT32 adcupdn; -} s3c24xx_adc_regs_t; +}; -typedef struct +struct s3c24xx_spi_regs_t { UINT32 spcon; UINT32 spsta; @@ -790,46 +790,46 @@ typedef struct UINT32 sppre; UINT32 sptdat; UINT32 sprdat; -} s3c24xx_spi_regs_t; +}; -typedef struct +struct s3c24xx_sdi_regs_t { UINT32 data[0x44/4]; -} s3c24xx_sdi_regs_t; +}; -typedef struct +struct s3c24xx_ac97_regs_t { UINT32 data[0x20/4]; -} s3c24xx_ac97_regs_t; +}; -typedef struct +struct s3c24xx_memcon_t { s3c24xx_memcon_regs_t regs; -} s3c24xx_memcon_t; +}; -typedef struct +struct s3c24xx_usbhost_t { s3c24xx_usbhost_regs_t regs; -} s3c24xx_usbhost_t; +}; -typedef struct +struct s3c24xx_irq_t { s3c24xx_irq_regs_t regs; int line_irq, line_fiq; -} s3c24xx_irq_t; +}; -typedef struct +struct s3c24xx_dma_t { s3c24xx_dma_regs_t regs; emu_timer *timer; -} s3c24xx_dma_t; +}; -typedef struct +struct s3c24xx_clkpow_t { s3c24xx_clkpow_regs_t regs; -} s3c24xx_clkpow_t; +}; -typedef struct +struct s3c24xx_lcd_t { s3c24xx_lcd_regs_t regs; emu_timer *timer; @@ -846,99 +846,99 @@ typedef struct UINT32 tpal; UINT32 hpos_min, hpos_max, vpos_min, vpos_max; UINT32 dma_data, dma_bits; -} s3c24xx_lcd_t; +}; -typedef struct +struct s3c24xx_lcdpal_t { s3c24xx_lcdpal_regs_t regs; -} s3c24xx_lcdpal_t; +}; -typedef struct +struct s3c24xx_nand_t { s3c24xx_nand_regs_t regs; UINT8 mecc[4]; UINT8 secc[2]; int ecc_pos, data_count; -} s3c24xx_nand_t; +}; -typedef struct +struct s3c24xx_cam_t { s3c24xx_cam_regs_t regs; -} s3c24xx_cam_t; +}; -typedef struct +struct s3c24xx_uart_t { s3c24xx_uart_regs_t regs; -} s3c24xx_uart_t; +}; -typedef struct +struct s3c24xx_pwm_t { s3c24xx_pwm_regs_t regs; emu_timer *timer[5]; UINT32 cnt[5]; UINT32 cmp[5]; UINT32 freq[5]; -} s3c24xx_pwm_t; +}; -typedef struct +struct s3c24xx_usbdev_t { s3c24xx_usbdev_regs_t regs; -} s3c24xx_usbdev_t; +}; -typedef struct +struct s3c24xx_wdt_t { s3c24xx_wdt_regs_t regs; emu_timer *timer; -} s3c24xx_wdt_t; +}; -typedef struct +struct s3c24xx_iic_t { s3c24xx_iic_regs_t regs; emu_timer *timer; int count; -} s3c24xx_iic_t; +}; -typedef struct +struct s3c24xx_iis_t { s3c24xx_iis_regs_t regs; emu_timer *timer; UINT16 fifo[16/2]; int fifo_index; -} s3c24xx_iis_t; +}; -typedef struct +struct s3c24xx_gpio_t { s3c24xx_gpio_regs_t regs; -} s3c24xx_gpio_t; +}; -typedef struct +struct s3c24xx_rtc_t { s3c24xx_rtc_regs_t regs; emu_timer *timer_tick_count; emu_timer *timer_update; -} s3c24xx_rtc_t; +}; -typedef struct +struct s3c24xx_adc_t { s3c24xx_adc_regs_t regs; -} s3c24xx_adc_t; +}; -typedef struct +struct s3c24xx_spi_t { s3c24xx_spi_regs_t regs; -} s3c24xx_spi_t; +}; -typedef struct +struct s3c24xx_sdi_t { s3c24xx_sdi_regs_t regs; -} s3c24xx_sdi_t; +}; -typedef struct +struct s3c24xx_ac97_t { s3c24xx_ac97_regs_t regs; -} s3c24xx_ac97_t; +}; -typedef struct +struct s3c24xx_t { const s3c2440_interface *iface; UINT8 steppingstone[4*1024]; @@ -963,6 +963,6 @@ typedef struct s3c24xx_spi_t spi[S3C24XX_SPI_COUNT]; s3c24xx_sdi_t sdi; s3c24xx_ac97_t ac97; -} s3c24xx_t; +}; #endif diff --git a/src/emu/machine/scsibus.h b/src/emu/machine/scsibus.h index b722ed1fe8f..559507acad0 100644 --- a/src/emu/machine/scsibus.h +++ b/src/emu/machine/scsibus.h @@ -100,7 +100,7 @@ #define SCSI_SENSE_SIZE 4 -typedef struct +struct adaptec_sense_t { // parameter list UINT8 reserved1[3]; @@ -121,7 +121,7 @@ typedef struct UINT8 step_pulse_code; UINT8 bit_flags; UINT8 sectors_per_track; -} adaptec_sense_t; +}; class scsibus_device : public device_t { diff --git a/src/emu/machine/v3021.h b/src/emu/machine/v3021.h index af826448fbd..e67d0d3eced 100644 --- a/src/emu/machine/v3021.h +++ b/src/emu/machine/v3021.h @@ -27,10 +27,10 @@ // TYPE DEFINITIONS //************************************************************************** -typedef struct +struct rtc_regs_t { UINT8 sec, min, hour, day, wday, month, year; -} rtc_regs_t; +}; // ======================> v3021_device diff --git a/src/emu/sound/c140.c b/src/emu/sound/c140.c index af7958aa399..4c50b1f6bee 100644 --- a/src/emu/sound/c140.c +++ b/src/emu/sound/c140.c @@ -65,7 +65,7 @@ struct voice_registers UINT8 reserved[4]; }; -typedef struct +struct VOICE { long ptoffset; long pos; @@ -84,7 +84,7 @@ typedef struct long sample_start; long sample_end; long sample_loop; -} VOICE; +}; struct c140_state { diff --git a/src/emu/sound/c352.h b/src/emu/sound/c352.h index 7a018bd845b..3341884ae89 100644 --- a/src/emu/sound/c352.h +++ b/src/emu/sound/c352.h @@ -63,7 +63,7 @@ private: C352_FLG_REVERSE = 0x0001, // play sample backwards }; - typedef struct + struct c352_ch_t { UINT8 vol_l; UINT8 vol_r; @@ -83,7 +83,7 @@ private: UINT16 repeat; UINT32 current_addr; UINT32 pos; - } c352_ch_t; + }; c352_ch_t m_c352_ch[32]; int m_sample_rate_base; diff --git a/src/emu/sound/c6280.c b/src/emu/sound/c6280.c index 1af7c056442..42244662734 100644 --- a/src/emu/sound/c6280.c +++ b/src/emu/sound/c6280.c @@ -56,7 +56,7 @@ #include "emu.h" #include "c6280.h" -typedef struct { +struct t_channel { UINT16 frequency; UINT8 control; UINT8 balance; @@ -66,9 +66,9 @@ typedef struct { UINT8 noise_control; UINT32 noise_counter; UINT32 counter; -} t_channel; +}; -typedef struct { +struct c6280_t { sound_stream *stream; device_t *device; device_t *cpudevice; @@ -80,7 +80,7 @@ typedef struct { INT16 volume_table[32]; UINT32 noise_freq_tab[32]; UINT32 wave_freq_tab[4096]; -} c6280_t; +}; INLINE c6280_t *get_safe_token(device_t *device) { diff --git a/src/emu/sound/digitalk.c b/src/emu/sound/digitalk.c index 726bd3d5285..776eaacb611 100644 --- a/src/emu/sound/digitalk.c +++ b/src/emu/sound/digitalk.c @@ -237,7 +237,7 @@ complete set of waveforms is repeated R times. */ -typedef struct { +struct digitalker { const UINT8 *rom; device_t *device; sound_stream *stream; @@ -258,7 +258,7 @@ typedef struct { UINT8 dac_index; // 128 for done INT16 dac[128]; -} digitalker; +}; // Quantized intensity values, first index is the volume, second the // intensity (positive half only, real value goes -8..7) diff --git a/src/emu/sound/discrete.c b/src/emu/sound/discrete.c index 239162a96b9..4ff682c33ae 100644 --- a/src/emu/sound/discrete.c +++ b/src/emu/sound/discrete.c @@ -83,20 +83,20 @@ const device_type DISCRETE = &device_creator; * *************************************/ -typedef struct +struct output_buffer { double *node_buf; const double *source; volatile double *ptr; int node_num; -} output_buffer; +}; -typedef struct +struct input_buffer { volatile const double *ptr; /* pointer into linked_outbuf.nodebuf */ output_buffer * linked_outbuf; /* what output are we connected to ? */ double buffer; /* input[] will point here */ -} input_buffer; +}; class discrete_task { diff --git a/src/emu/sound/es5503.h b/src/emu/sound/es5503.h index 8fb1e6ff67d..86595e6ffeb 100644 --- a/src/emu/sound/es5503.h +++ b/src/emu/sound/es5503.h @@ -67,7 +67,7 @@ private: MODE_SWAP = 3 }; - typedef struct + struct ES5503Osc { UINT16 freq; UINT16 wtsize; @@ -80,7 +80,7 @@ private: UINT32 accumulator; UINT8 irqpend; - } ES5503Osc; + }; ES5503Osc oscillators[32]; diff --git a/src/emu/sound/fm.c b/src/emu/sound/fm.c index 6aa5806d873..e273e937c1c 100644 --- a/src/emu/sound/fm.c +++ b/src/emu/sound/fm.c @@ -519,7 +519,7 @@ static FILE *sample[1]; /* struct describing a single operator (SLOT) */ -typedef struct +struct FM_SLOT { INT32 *DT; /* detune :dt_tab[DT] */ UINT8 KSR; /* key scale rate :3-KSR */ @@ -558,9 +558,9 @@ typedef struct /* LFO */ UINT32 AMmask; /* AM enable flag */ -} FM_SLOT; +}; -typedef struct +struct FM_CH { FM_SLOT SLOT[4]; /* four SLOTs (operators) */ @@ -582,10 +582,10 @@ typedef struct UINT32 fc; /* fnum,blk:adjusted to sample rate */ UINT8 kcode; /* key code: */ UINT32 block_fnum; /* current blk/fnum value for this slot (can be different betweeen slots of one channel in 3slot mode) */ -} FM_CH; +}; -typedef struct +struct FM_ST { device_t *device; void * param; /* this chip parameter */ @@ -613,7 +613,7 @@ typedef struct FM_TIMERHANDLER timer_handler; FM_IRQHANDLER IRQ_Handler; const ssg_callbacks *SSG; -} FM_ST; +}; @@ -622,16 +622,16 @@ typedef struct /***********************************************************/ /* OPN 3slot struct */ -typedef struct +struct FM_3SLOT { UINT32 fc[3]; /* fnum3,blk3: calculated */ UINT8 fn_h; /* freq3 latch */ UINT8 kcode[3]; /* key code */ UINT32 block_fnum[3]; /* current fnum value for this slot (can be different betweeen slots of one channel in 3slot mode) */ -} FM_3SLOT; +}; /* OPN/A/B common state */ -typedef struct +struct FM_OPN { UINT8 type; /* chip type */ FM_ST ST; /* general state */ @@ -669,7 +669,7 @@ typedef struct INT32 out_adpcm[4]; /* channel output NONE,LEFT,RIGHT or CENTER for YM2608/YM2610 ADPCM */ INT32 out_delta[4]; /* channel output NONE,LEFT,RIGHT or CENTER for YM2608/YM2610 DELTAT*/ #endif -} FM_OPN; +}; @@ -2089,12 +2089,12 @@ static void OPNPrescaler_w(FM_OPN *OPN , int addr, int pre_divider) /*****************************************************************************/ /* here's the virtual YM2203(OPN) */ -typedef struct +struct YM2203 { UINT8 REGS[256]; /* registers */ FM_OPN OPN; /* OPN state */ FM_CH CH[3]; /* channel state */ -} YM2203; +}; /* Generate samples for one of the YM2203s */ void ym2203_update_one(void *chip, FMSAMPLE *buffer, int length) @@ -2385,7 +2385,7 @@ int ym2203_timer_over(void *chip,int c) #if (BUILD_YM2608||BUILD_YM2610||BUILD_YM2610B) /* ADPCM type A channel struct */ -typedef struct +struct ADPCM_CH { UINT8 flag; /* port state */ UINT8 flagMask; /* arrived flag mask */ @@ -2402,10 +2402,10 @@ typedef struct INT8 vol_mul; /* volume in "0.75dB" steps */ UINT8 vol_shift; /* volume in "-6dB" steps */ INT32 *pan; /* &out_adpcm[OPN_xxxx] */ -} ADPCM_CH; +}; /* here's the virtual YM2610 */ -typedef struct +struct YM2610 { UINT8 REGS[512]; /* registers */ FM_OPN OPN; /* OPN state */ @@ -2423,7 +2423,7 @@ typedef struct UINT8 flagmask; /* YM2608 only */ UINT8 irqmask; /* YM2608 only */ -} YM2610; +}; /* here is the virtual YM2608 */ typedef YM2610 YM2608; diff --git a/src/emu/sound/fm2612.c b/src/emu/sound/fm2612.c index e7175a49ea4..a3e6fa9b4c1 100644 --- a/src/emu/sound/fm2612.c +++ b/src/emu/sound/fm2612.c @@ -531,7 +531,7 @@ static FILE *sample[1]; /* struct describing a single operator (SLOT) */ -typedef struct +struct FM_SLOT { INT32 *DT; /* detune :dt_tab[DT] */ UINT8 KSR; /* key scale rate :3-KSR */ @@ -570,9 +570,9 @@ typedef struct /* LFO */ UINT32 AMmask; /* AM enable flag */ -} FM_SLOT; +}; -typedef struct +struct FM_CH { FM_SLOT SLOT[4]; /* four SLOTs (operators) */ @@ -594,10 +594,10 @@ typedef struct UINT32 fc; /* fnum,blk:adjusted to sample rate */ UINT8 kcode; /* key code: */ UINT32 block_fnum; /* current blk/fnum value for this slot (can be different betweeen slots of one channel in 3slot mode) */ -} FM_CH; +}; -typedef struct +struct FM_ST { device_t *device; void * param; /* this chip parameter */ @@ -625,7 +625,7 @@ typedef struct FM_TIMERHANDLER timer_handler; FM_IRQHANDLER IRQ_Handler; const ssg_callbacks *SSG; -} FM_ST; +}; @@ -634,17 +634,17 @@ typedef struct /***********************************************************/ /* OPN 3slot struct */ -typedef struct +struct FM_3SLOT { UINT32 fc[3]; /* fnum3,blk3: calculated */ UINT8 fn_h; /* freq3 latch */ UINT8 kcode[3]; /* key code */ UINT32 block_fnum[3]; /* current fnum value for this slot (can be different betweeen slots of one channel in 3slot mode) */ UINT8 key_csm; /* CSM mode Key-ON flag */ -} FM_3SLOT; +}; /* OPN/A/B common state */ -typedef struct +struct FM_OPN { UINT8 type; /* chip type */ FM_ST ST; /* general state */ @@ -675,10 +675,10 @@ typedef struct INT32 mem; /* one sample delay memory */ INT32 out_fm[8]; /* outputs of working channels */ -} FM_OPN; +}; /* here's the virtual YM2612 */ -typedef struct +struct YM2612 { UINT8 REGS[512]; /* registers */ FM_OPN OPN; /* OPN state */ @@ -688,7 +688,7 @@ typedef struct /* dac output (YM2612) */ int dacen; INT32 dacout; -} YM2612; +}; /* log output level */ #define LOG_ERR 3 /* ERROR */ diff --git a/src/emu/sound/fmopl.c b/src/emu/sound/fmopl.c index d3cdc743c1c..59d4bc644ad 100644 --- a/src/emu/sound/fmopl.c +++ b/src/emu/sound/fmopl.c @@ -198,7 +198,7 @@ static FILE * cymfile = NULL; -typedef struct +struct OPL_SLOT { UINT32 ar; /* attack rate: AR<<2 */ UINT32 dr; /* decay rate: DR<<2 */ @@ -237,9 +237,9 @@ typedef struct /* waveform select */ UINT16 wavetable; -} OPL_SLOT; +}; -typedef struct +struct OPL_CH { OPL_SLOT SLOT[2]; /* phase generator state */ @@ -247,10 +247,10 @@ typedef struct UINT32 fc; /* Freq. Increment base */ UINT32 ksl_base; /* KeyScaleLevel Base step */ UINT8 kcode; /* key code (for key scaling) */ -} OPL_CH; +}; /* OPL state */ -typedef struct +struct FM_OPL { /* FM channel slots */ OPL_CH P_CH[9]; /* OPL/OPL2 chips have 9 channels*/ @@ -325,7 +325,7 @@ typedef struct #if BUILD_Y8950 INT32 output_deltat[4]; /* for Y8950 DELTA-T, chip is mono, that 4 here is just for safety */ #endif -} FM_OPL; +}; diff --git a/src/emu/sound/i5000.h b/src/emu/sound/i5000.h index 462142631dc..358edd1749a 100644 --- a/src/emu/sound/i5000.h +++ b/src/emu/sound/i5000.h @@ -47,7 +47,7 @@ protected: virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples); private: - typedef struct + struct channel_t { bool is_playing; oki_adpcm_state m_adpcm; @@ -65,7 +65,7 @@ private: int output_r; int output_l; - } channel_t; + }; channel_t m_channels[16]; diff --git a/src/emu/sound/k005289.c b/src/emu/sound/k005289.c index f923519727f..f8a52327fac 100644 --- a/src/emu/sound/k005289.c +++ b/src/emu/sound/k005289.c @@ -31,13 +31,13 @@ #define FREQBASEBITS 16 /* this structure defines the parameters for a channel */ -typedef struct +struct k005289_sound_channel { int frequency; int counter; int volume; const unsigned char *wave; -} k005289_sound_channel; +}; struct k005289_state { diff --git a/src/emu/sound/k051649.c b/src/emu/sound/k051649.c index bded6d17a0b..4c072b53b9b 100644 --- a/src/emu/sound/k051649.c +++ b/src/emu/sound/k051649.c @@ -30,14 +30,14 @@ /* this structure defines the parameters for a channel */ -typedef struct +struct k051649_sound_channel { unsigned long counter; int frequency; int volume; int key; signed char waveram[32]; -} k051649_sound_channel; +}; struct k051649_state { diff --git a/src/emu/sound/msm5232.c b/src/emu/sound/msm5232.c index e9237e7b379..71bee8bf1d3 100644 --- a/src/emu/sound/msm5232.c +++ b/src/emu/sound/msm5232.c @@ -9,7 +9,7 @@ 8 channel tone generator */ -typedef struct { +struct VOICE { UINT8 mode; int TG_count_period; @@ -35,10 +35,10 @@ typedef struct { int pitch; /* current pitch data */ int GF; -} VOICE; +}; -typedef struct { +struct msm5232_state { sound_stream *stream; VOICE voi[8]; @@ -71,7 +71,7 @@ typedef struct { device_t *device; void (*gate_handler)(device_t *device, int state); /* callback called when the GATE output pin changes state */ -} msm5232_state; +}; INLINE msm5232_state *get_safe_token(device_t *device) diff --git a/src/emu/sound/n63701x.c b/src/emu/sound/n63701x.c index 8755e198231..65780163b71 100644 --- a/src/emu/sound/n63701x.c +++ b/src/emu/sound/n63701x.c @@ -17,7 +17,7 @@ silence compression: '00 nn' must be replaced by nn+1 times '80'. #include "n63701x.h" -typedef struct +struct voice { int select; int playing; @@ -25,7 +25,7 @@ typedef struct int position; int volume; int silence_counter; -} voice; +}; struct namco_63701x diff --git a/src/emu/sound/namco.c b/src/emu/sound/namco.c index 0886c81b5c1..0bc916a899f 100644 --- a/src/emu/sound/namco.c +++ b/src/emu/sound/namco.c @@ -36,7 +36,7 @@ /* this structure defines the parameters for a channel */ -typedef struct +struct sound_channel { UINT32 frequency; UINT32 counter; @@ -47,7 +47,7 @@ typedef struct UINT32 noise_counter; INT32 noise_hold; INT32 waveform_select; -} sound_channel; +}; struct namco_sound diff --git a/src/emu/sound/s14001a.c b/src/emu/sound/s14001a.c index e66d670bc81..68a78ff2fbd 100644 --- a/src/emu/sound/s14001a.c +++ b/src/emu/sound/s14001a.c @@ -237,7 +237,7 @@ and off as it normally does during speech). Once START has gone low-high-low, th #include "emu.h" #include "s14001a.h" -typedef struct +struct S14001AChip { sound_stream * stream; @@ -262,7 +262,7 @@ typedef struct UINT8 *SpeechRom; // array to hold rom contents, mame will not need this, will use a pointer INT16 filtervals[8]; UINT8 VSU1000_amp; // amplitude setting on VSU-1000 board -} S14001AChip; +}; INLINE S14001AChip *get_safe_token(device_t *device) { diff --git a/src/emu/sound/x1_010.c b/src/emu/sound/x1_010.c index 83f6de4ef26..03cf395a694 100644 --- a/src/emu/sound/x1_010.c +++ b/src/emu/sound/x1_010.c @@ -67,7 +67,7 @@ Registers: #define VOL_BASE (2*32*256/30) // Volume base /* this structure defines the parameters for a channel */ -typedef struct { +struct X1_010_CHANNEL { unsigned char status; unsigned char volume; // volume / wave form no. unsigned char frequency; // frequency / pitch lo @@ -75,7 +75,7 @@ typedef struct { unsigned char start; // start address / envelope time unsigned char end; // end address / envelope no. unsigned char reserve[2]; -} X1_010_CHANNEL; +}; struct x1_010_state { diff --git a/src/emu/sound/ym2151.c b/src/emu/sound/ym2151.c index f3945cf39c1..52dda68c749 100644 --- a/src/emu/sound/ym2151.c +++ b/src/emu/sound/ym2151.c @@ -23,7 +23,7 @@ static FILE * cymfile = NULL; /* struct describing a single operator */ -typedef struct +struct YM2151Operator { UINT32 phase; /* accumulated operator phase */ UINT32 freq; /* operator frequency count */ @@ -73,10 +73,10 @@ typedef struct UINT32 reserved0; /**/ UINT32 reserved1; /**/ -} YM2151Operator; +}; -typedef struct +struct YM2151 { signed int chanout[8]; signed int m2,c1,c2; /* Phase Modulation input for operators 2,3,4 */ @@ -168,7 +168,7 @@ typedef struct device_t *device; unsigned int clock; /* chip clock in Hz (passed from 2151intf.c) */ unsigned int sampfreq; /* sampling frequency in Hz (passed from 2151intf.c) */ -} YM2151; +}; #define FREQ_SH 16 /* 16.16 fixed point (frequency calculations) */ diff --git a/src/emu/sound/ym2413.c b/src/emu/sound/ym2413.c index 55ccbf11d94..c9966ad5d7f 100644 --- a/src/emu/sound/ym2413.c +++ b/src/emu/sound/ym2413.c @@ -164,7 +164,7 @@ static FILE * cymfile = NULL; -typedef struct +struct OPLL_SLOT { UINT32 ar; /* attack rate: AR<<2 */ UINT32 dr; /* decay rate: DR<<2 */ @@ -207,9 +207,9 @@ typedef struct /* waveform select */ unsigned int wavetable; -} OPLL_SLOT; +}; -typedef struct +struct OPLL_CH { OPLL_SLOT SLOT[2]; /* phase generator state */ @@ -218,10 +218,10 @@ typedef struct UINT32 ksl_base; /* KeyScaleLevel Base step */ UINT8 kcode; /* key code (for key scaling) */ UINT8 sus; /* sus on/off (release speed in percussive mode)*/ -} OPLL_CH; +}; /* chip state */ -typedef struct +struct YM2413 { OPLL_CH P_CH[9]; /* OPLL chips have 9 channels*/ UINT8 instvol_r[9]; /* instrument/volume (or volume/volume in percussive mode)*/ @@ -272,7 +272,7 @@ typedef struct signed int output[2]; signed int outchan; -} YM2413; +}; /* key scale level */ /* table is 3dB/octave, DV converts this into 6dB/octave */ diff --git a/src/emu/sound/ymf262.c b/src/emu/sound/ymf262.c index 19aa511cdbb..c24fd4280bf 100644 --- a/src/emu/sound/ymf262.c +++ b/src/emu/sound/ymf262.c @@ -141,7 +141,7 @@ static FILE * cymfile = NULL; #define OPL3_TYPE_YMF262 (0) /* 36 operators, 8 waveforms */ -typedef struct +struct OPL3_SLOT { UINT32 ar; /* attack rate: AR<<2 */ UINT32 dr; /* decay rate: DR<<2 */ @@ -190,9 +190,9 @@ typedef struct //unsigned char reserved[128-84];//speedup: pump up the struct size to power of 2 unsigned char reserved[128-100];//speedup: pump up the struct size to power of 2 -} OPL3_SLOT; +}; -typedef struct +struct OPL3_CH { OPL3_SLOT SLOT[2]; @@ -215,10 +215,10 @@ typedef struct unsigned char reserved[512-272];//speedup:pump up the struct size to power of 2 -} OPL3_CH; +}; /* OPL3 state */ -typedef struct +struct OPL3 { OPL3_CH P_CH[18]; /* OPL3 chips have 18 channels */ @@ -278,7 +278,7 @@ typedef struct double freqbase; /* frequency base */ attotime TimerBase; /* Timer base time (==sampling time)*/ device_t *device; -} OPL3; +}; diff --git a/src/emu/sound/ymf271.c b/src/emu/sound/ymf271.c index c52e62a06e0..a1c8ededf21 100644 --- a/src/emu/sound/ymf271.c +++ b/src/emu/sound/ymf271.c @@ -33,7 +33,7 @@ //#define log2(n) (log((float) n)/log((float) 2)) -typedef struct +struct YMF271Slot { INT8 extout; UINT8 lfoFreq; @@ -80,14 +80,14 @@ typedef struct INT32 lfo_phase, lfo_step; INT32 lfo_amplitude; double lfo_phasemod; -} YMF271Slot; +}; -typedef struct +struct YMF271Group { INT8 sync, pfm; -} YMF271Group; +}; -typedef struct +struct YMF271Chip { YMF271Slot slots[48]; YMF271Group groups[12]; @@ -112,7 +112,7 @@ typedef struct UINT32 clock; sound_stream * stream; device_t *device; -} YMF271Chip; +}; // slot mapping assists static const int fm_tab[] = { 0, 1, 2, -1, 3, 4, 5, -1, 6, 7, 8, -1, 9, 10, 11, -1 }; diff --git a/src/emu/sound/ymf278b.c b/src/emu/sound/ymf278b.c index d49f59981d1..07875b3da6d 100644 --- a/src/emu/sound/ymf278b.c +++ b/src/emu/sound/ymf278b.c @@ -71,7 +71,7 @@ #define VERBOSE 0 #define LOG(x) do { if (VERBOSE) logerror x; } while (0) -typedef struct +struct YMF278BSlot { INT16 wave; /* wavetable number */ INT16 F_NUMBER; /* frequency */ @@ -111,7 +111,7 @@ typedef struct int num; /* slot number (for debug only) */ struct _YMF278BChip *chip; /* pointer back to parent chip */ -} YMF278BSlot; +}; typedef struct _YMF278BChip { diff --git a/src/emu/sound/ymz770.h b/src/emu/sound/ymz770.h index 8d7308ee965..320d89b47c0 100644 --- a/src/emu/sound/ymz770.h +++ b/src/emu/sound/ymz770.h @@ -34,7 +34,7 @@ class amm; class ymz770_device : public device_t, public device_sound_interface { - typedef struct + struct ymz_channel { UINT8 phrase; UINT8 pan; @@ -55,7 +55,7 @@ class ymz770_device : public device_t, public device_sound_interface UINT8 *seqdata; bool is_seq_playing; - } ymz_channel; + }; public: diff --git a/src/emu/video/rgbgen.h b/src/emu/video/rgbgen.h index 93313d22646..e90b4109f76 100644 --- a/src/emu/video/rgbgen.h +++ b/src/emu/video/rgbgen.h @@ -18,10 +18,10 @@ ***************************************************************************/ /* intermediate RGB values are stored in a struct */ -typedef struct { INT16 dummy, r, g, b; } rgbint; +struct rgbint { INT16 dummy, r, g, b; }; /* intermediate RGB values are stored in a struct */ -typedef struct { INT16 a, r, g, b; } rgbaint; +struct rgbaint { INT16 a, r, g, b; }; diff --git a/src/emu/video/vector.c b/src/emu/video/vector.c index ad9cbf68491..af3e2e5b0a8 100644 --- a/src/emu/video/vector.c +++ b/src/emu/video/vector.c @@ -127,14 +127,14 @@ static render_texture *get_vector_texture(float dx, float dy, float intensity) #define VCLIP 2 /* The vertices are buffered here */ -typedef struct +struct point { int x; int y; rgb_t col; int intensity; int arg1; int arg2; /* start/end in pixel array or clipping info */ int status; /* for dirty and clipping handling */ -} point; +}; diff --git a/src/lib/formats/ace_tap.h b/src/lib/formats/ace_tap.h index 8d180a0255c..8b286473e48 100644 --- a/src/lib/formats/ace_tap.h +++ b/src/lib/formats/ace_tap.h @@ -11,7 +11,7 @@ #include "cassimg.h" -typedef struct +struct ace_tape_t { UINT8 hdr_type; UINT8 hdr_name[10]; @@ -21,7 +21,7 @@ typedef struct UINT8 hdr_3c4c; UINT8 hdr_3c4d; UINT16 dat_len; -} ace_tape_t; +}; CASSETTE_FORMATLIST_EXTERN(ace_cassette_formats); diff --git a/src/mame/audio/cage.c b/src/mame/audio/cage.c index 1c979bb15ed..b894c636e48 100644 --- a/src/mame/audio/cage.c +++ b/src/mame/audio/cage.c @@ -34,7 +34,7 @@ *************************************/ -typedef struct +struct cage_t { cpu_device *cpu; attotime cpu_h1_clock_period; @@ -59,7 +59,7 @@ typedef struct UINT32 *speedup_ram; dmadac_sound_device *dmadac[DAC_BUFFER_CHANNELS]; -} cage_t; +}; static cage_t cage; diff --git a/src/mame/audio/exidy440.c b/src/mame/audio/exidy440.c index 9e6f4f089cf..e709f2bcc02 100644 --- a/src/mame/audio/exidy440.c +++ b/src/mame/audio/exidy440.c @@ -71,7 +71,7 @@ typedef struct sound_cache_entry -typedef struct +struct exidy440_audio_state { UINT8 sound_command; UINT8 sound_command_ack; @@ -100,7 +100,7 @@ typedef struct /* channel frequency is configurable */ int channel_frequency[4]; -} exidy440_audio_state; +}; /* constant channel parameters */ static const int channel_bits[4] = diff --git a/src/mame/audio/flower.c b/src/mame/audio/flower.c index ccf7821b572..f49968c07cd 100644 --- a/src/mame/audio/flower.c +++ b/src/mame/audio/flower.c @@ -20,7 +20,7 @@ TODO: /* this structure defines the parameters for a channel */ -typedef struct +struct sound_channel { UINT32 start; UINT32 pos; @@ -32,7 +32,7 @@ typedef struct UINT8 effect; UINT32 ecount; -} sound_channel; +}; struct flower_sound_state diff --git a/src/mame/audio/gomoku.c b/src/mame/audio/gomoku.c index 9d440e7c1ff..8c2443c192c 100644 --- a/src/mame/audio/gomoku.c +++ b/src/mame/audio/gomoku.c @@ -19,14 +19,14 @@ static const int defgain = 48; /* this structure defines the parameters for a channel */ -typedef struct +struct sound_channel { int channel; int frequency; int counter; int volume; int oneshotplaying; -} sound_channel; +}; struct gomoku_sound_state diff --git a/src/mame/audio/wiping.c b/src/mame/audio/wiping.c index dee082cd651..cbed8707844 100644 --- a/src/mame/audio/wiping.c +++ b/src/mame/audio/wiping.c @@ -19,7 +19,7 @@ static const int defgain = 48; /* this structure defines the parameters for a channel */ -typedef struct +struct sound_channel { int frequency; int counter; @@ -27,7 +27,7 @@ typedef struct const UINT8 *wave; int oneshot; int oneshotplaying; -} sound_channel; +}; diff --git a/src/mame/drivers/firebeat.c b/src/mame/drivers/firebeat.c index 03a69babd89..ba7523954db 100644 --- a/src/mame/drivers/firebeat.c +++ b/src/mame/drivers/firebeat.c @@ -121,25 +121,25 @@ #include "firebeat.lh" -typedef struct +struct GCU_REGS { UINT32 *vram; UINT32 vram_read_address; UINT32 vram_write_fifo_address; UINT32 visible_area; -} GCU_REGS; +}; -typedef struct +struct IBUTTON_SUBKEY { UINT8 identifier[8]; UINT8 password[8]; UINT8 data[0x30]; -} IBUTTON_SUBKEY; +}; -typedef struct +struct IBUTTON { IBUTTON_SUBKEY subkey[3]; -} IBUTTON; +}; diff --git a/src/mame/drivers/konamigx.c b/src/mame/drivers/konamigx.c index bbab9fc1e80..21d8edbb37a 100644 --- a/src/mame/drivers/konamigx.c +++ b/src/mame/drivers/konamigx.c @@ -3660,14 +3660,14 @@ MACHINE_RESET_MEMBER(konamigx_state,konamigx) } } -typedef struct +struct GXGameInfoT { const char *romname; UINT32 cfgport; UINT32 sndhack; UINT32 special; UINT32 readback; -} GXGameInfoT; +}; #define BPP4 0 #define BPP5 1 diff --git a/src/mame/drivers/konamim2.c b/src/mame/drivers/konamim2.c index b44192efc34..c6fde52df7a 100644 --- a/src/mame/drivers/konamim2.c +++ b/src/mame/drivers/konamim2.c @@ -191,14 +191,14 @@ Notes: #include "cpu/powerpc/ppc.h" -typedef struct +struct CDE_DMA { UINT32 dst_addr; int length; UINT32 next_dst_addr; int next_length; int dma_done; -} CDE_DMA; +}; class konamim2_state : public driver_device { diff --git a/src/mame/drivers/maygayv1.c b/src/mame/drivers/maygayv1.c index 52bec4e4029..0536b1473c3 100644 --- a/src/mame/drivers/maygayv1.c +++ b/src/mame/drivers/maygayv1.c @@ -193,16 +193,16 @@ static const UINT32 banks[4] = { 0, 0x40000/2, 0x20000/2, 0x60000/2 }; #define DRAM_BANK_SEL (banks[(VREG(DSBA) >> 7) & 3]) -typedef struct +struct i82716_t { UINT16 r[16]; UINT16 *dram; UINT8 *line_buf; // there's actually two -} i82716_t; +}; -typedef struct +struct i8279_t { UINT8 command; UINT8 mode; @@ -211,7 +211,7 @@ typedef struct UINT8 clear; UINT8 fifo[8]; UINT8 ram[16]; -} i8279_t; +}; class maygayv1_state : public driver_device { diff --git a/src/mame/drivers/meritm.c b/src/mame/drivers/meritm.c index 4b929375e52..5bfbd1f48a4 100644 --- a/src/mame/drivers/meritm.c +++ b/src/mame/drivers/meritm.c @@ -164,7 +164,7 @@ Not all regional versions are available for each Megatouch series #include "machine/nvram.h" -typedef struct +struct ds1204_t { int state; int read_ptr; @@ -174,7 +174,7 @@ typedef struct int out_bit; UINT8 command[3]; -} ds1204_t; +}; class meritm_state : public driver_device { diff --git a/src/mame/drivers/namcos23.c b/src/mame/drivers/namcos23.c index 6697bf01891..13d48fec898 100644 --- a/src/mame/drivers/namcos23.c +++ b/src/mame/drivers/namcos23.c @@ -1269,42 +1269,42 @@ struct namcos23_poly_entry { enum { RENDER_MAX_ENTRIES = 1000, POLY_MAX_ENTRIES = 10000 }; -typedef struct +struct c417_t { UINT16 ram[0x10000]; UINT16 adr; UINT32 pointrom_adr; -} c417_t; +}; -typedef struct +struct c412_t { UINT16 sdram_a[0x100000]; // Framebuffers, probably UINT16 sdram_b[0x100000]; UINT16 sram[0x20000]; // Ram-based tiles for rendering UINT16 pczram[0x200]; // Ram-based tilemap for rendering, or something else UINT32 adr; -} c412_t; +}; -typedef struct +struct c421_t { UINT16 dram_a[0x40000]; UINT16 dram_b[0x40000]; UINT16 sram[0x8000]; UINT32 adr; -} c421_t; +}; -typedef struct +struct c422_t { INT16 regs[0x10]; -} c422_t; +}; -typedef struct +struct c361_t { emu_timer *timer; int scanline; -} c361_t; +}; -typedef struct +struct render_t { poly_manager *polymgr; int cur; @@ -1313,7 +1313,7 @@ typedef struct namcos23_render_entry entries[2][RENDER_MAX_ENTRIES]; namcos23_poly_entry polys[POLY_MAX_ENTRIES]; namcos23_poly_entry *poly_order[POLY_MAX_ENTRIES]; -} render_t; +}; class namcos23_state : public driver_device { diff --git a/src/mame/drivers/taitotz.c b/src/mame/drivers/taitotz.c index b8a58ea8707..986ceefd6ce 100644 --- a/src/mame/drivers/taitotz.c +++ b/src/mame/drivers/taitotz.c @@ -373,10 +373,10 @@ struct taitotz_polydata int specular_r, specular_g, specular_b; }; -typedef struct +struct PLANE { float x, y, z, d; -} PLANE; +}; typedef float VECTOR3[3]; diff --git a/src/mame/drivers/vegas.c b/src/mame/drivers/vegas.c index 1fd6a6e8449..47399eebb07 100644 --- a/src/mame/drivers/vegas.c +++ b/src/mame/drivers/vegas.c @@ -442,7 +442,7 @@ -typedef struct +struct dynamic_address { offs_t start; offs_t end; @@ -453,7 +453,7 @@ typedef struct device_t *device; const char * rdname; const char * wrname; -} dynamic_address; +}; class vegas_state : public driver_device { diff --git a/src/mame/drivers/viper.c b/src/mame/drivers/viper.c index 596c630c146..6bc41e85839 100644 --- a/src/mame/drivers/viper.c +++ b/src/mame/drivers/viper.c @@ -447,7 +447,7 @@ static void mpc8240_interrupt(running_machine &machine, int irq); #define I2C_STATE_DATA_TRANSFER 2 -typedef struct +struct MPC8240_IRQ { UINT32 vector; int priority; @@ -455,18 +455,18 @@ typedef struct int active; int pending; int mask; -} MPC8240_IRQ; +}; -typedef struct +struct MPC8240_GLOBAL_TIMER { UINT32 base_count; int enable; emu_timer *timer; -} MPC8240_GLOBAL_TIMER; +}; -typedef struct +struct MPC8240_EPIC { UINT32 iack; UINT32 eicr; @@ -484,7 +484,7 @@ typedef struct MPC8240_GLOBAL_TIMER global_timer[4]; -} MPC8240_EPIC; +}; // TODO: move to viper_state static MPC8240_EPIC epic; diff --git a/src/mame/includes/3do.h b/src/mame/includes/3do.h index d540b867906..2de54ca28e0 100644 --- a/src/mame/includes/3do.h +++ b/src/mame/includes/3do.h @@ -7,7 +7,7 @@ #ifndef _3DO_H_ #define _3DO_H_ -typedef struct { +struct SLOW2 { /* 03180000 - 0318003f - configuration group */ /* 03180040 - 0318007f - diagnostic UART */ @@ -15,10 +15,10 @@ typedef struct { UINT8 cg_w_count; UINT32 cg_input; UINT32 cg_output; -} SLOW2; +}; -typedef struct { +struct MADAM { UINT32 revision; /* 03300000 */ UINT32 msysbits; /* 03300004 */ UINT32 mctl; /* 03300008 */ @@ -51,10 +51,10 @@ typedef struct { UINT32 mult[40]; /* 03300600-0330069c */ UINT32 mult_control; /* 033007f0-033007f4 */ UINT32 mult_status; /* 033007f8 */ -} MADAM; +}; -typedef struct { +struct CLIO { screen_device *screen; UINT32 revision; /* 03400000 */ @@ -150,13 +150,13 @@ typedef struct { UINT32 uncle_soft_rev; /* 0340c004 */ UINT32 uncle_addr; /* 0340c008 */ UINT32 uncle_rom; /* 0340c00c */ -} CLIO; +}; -typedef struct { +struct SVF { UINT32 sport[512]; UINT32 color; -} SVF; +}; class _3do_state : public driver_device diff --git a/src/mame/includes/atari.h b/src/mame/includes/atari.h index d259e1e262f..ee6d27e3f60 100644 --- a/src/mame/includes/atari.h +++ b/src/mame/includes/atari.h @@ -208,14 +208,14 @@ typedef struct { } ANTIC_W; /* write registers */ /* per scanline buffer for video data (and optimization variables) */ -typedef struct { +struct VIDEO { UINT32 cmd; /* antic command for this scanline */ UINT16 data[HWIDTH]; /* graphics data buffer (text through chargen) */ -} VIDEO; +}; typedef void (*atari_renderer_func)(address_space *space, VIDEO *video); -typedef struct { +struct ANTIC { atari_renderer_func renderer; /* current renderer */ UINT32 cmd; /* currently executed display list command */ UINT32 steal_cycles; /* steal how many cpu cycles for this line ? */ @@ -261,7 +261,7 @@ typedef struct { UINT8 *uc_g2; /* used colors for gfx GTIA 2 */ UINT8 *uc_g3; /* used colors for gfx GTIA 3 */ bitmap_ind16 *bitmap; -} ANTIC; +}; #define RDANTIC(space) space->read_byte(antic.dpage+antic.doffs) #define RDVIDEO(space,o) space->read_byte(antic.vpage+((antic.voffs+(o))&VOFFS)) diff --git a/src/mame/includes/gstriker.h b/src/mame/includes/gstriker.h index 8b01b101a27..5a7503f83c2 100644 --- a/src/mame/includes/gstriker.h +++ b/src/mame/includes/gstriker.h @@ -5,20 +5,20 @@ #define MAX_VS920A 2 -typedef struct +struct sVS920A { tilemap_t* tmap; UINT16* vram; UINT16 pal_base; UINT8 gfx_region; -} sVS920A; +}; /*** MB60553 **********************************************/ #define MAX_MB60553 2 -typedef struct +struct tMB60553 { tilemap_t* tmap; UINT16* vram; @@ -27,20 +27,20 @@ typedef struct UINT16 pal_base; UINT8 gfx_region; -} tMB60553; +}; /*** CG10103 **********************************************/ #define MAX_CG10103 2 -typedef struct +struct tCG10103 { UINT16* vram; UINT16 pal_base; UINT8 gfx_region; UINT8 transpen; -} tCG10103; +}; class gstriker_state : public driver_device { diff --git a/src/mame/includes/model3.h b/src/mame/includes/model3.h index 54de373c64f..313a1426f69 100644 --- a/src/mame/includes/model3.h +++ b/src/mame/includes/model3.h @@ -6,9 +6,9 @@ typedef float MATRIX[4][4]; typedef float VECTOR[4]; typedef float VECTOR3[3]; -typedef struct { +struct PLANE { float x,y,z,d; -} PLANE; +}; typedef struct _cached_texture cached_texture; diff --git a/src/mame/includes/namcos1.h b/src/mame/includes/namcos1.h index 41f94a48baa..7c55c78928b 100644 --- a/src/mame/includes/namcos1.h +++ b/src/mame/includes/namcos1.h @@ -1,13 +1,13 @@ #define NAMCOS1_MAX_BANK 0x400 /* Bank handler definitions */ -typedef struct +struct bankhandler { read8_space_func bank_handler_r; write8_space_func bank_handler_w; int bank_offset; UINT8 *bank_pointer; -} bankhandler; +}; class namcos1_state : public driver_device { diff --git a/src/mame/includes/playch10.h b/src/mame/includes/playch10.h index 350556ff19b..1e1c50f53df 100644 --- a/src/mame/includes/playch10.h +++ b/src/mame/includes/playch10.h @@ -1,8 +1,8 @@ -typedef struct +struct chr_bank { int writable; // 1 for RAM, 0 for ROM UINT8* chr; // direct access to the memory -} chr_bank; +}; class playch10_state : public driver_device { diff --git a/src/mame/includes/suprnova.h b/src/mame/includes/suprnova.h index ea9bc48f5e9..88a0f3ad654 100644 --- a/src/mame/includes/suprnova.h +++ b/src/mame/includes/suprnova.h @@ -1,4 +1,4 @@ -typedef struct +struct hit_t { UINT16 x1p, y1p, z1p, x1s, y1s, z1s; UINT16 x2p, y2p, z2p, x2s, y2s, z2s; @@ -11,7 +11,7 @@ typedef struct UINT16 flag; UINT8 disconnect; -} hit_t; +}; class skns_state : public driver_device diff --git a/src/mame/includes/thief.h b/src/mame/includes/thief.h index f229008760f..3e155ab3908 100644 --- a/src/mame/includes/thief.h +++ b/src/mame/includes/thief.h @@ -1,9 +1,9 @@ -typedef struct { +struct coprocessor_t { UINT8 *context_ram; UINT8 bank; UINT8 *image_ram; UINT8 param[0x9]; -} coprocessor_t; +}; class thief_state : public driver_device { diff --git a/src/mame/machine/cdi070.h b/src/mame/machine/cdi070.h index f488d56e933..fa708904cc1 100644 --- a/src/mame/machine/cdi070.h +++ b/src/mame/machine/cdi070.h @@ -24,7 +24,7 @@ TODO: #include "emu.h" -typedef struct +struct scc68070_i2c_regs_t { UINT8 reserved0; UINT8 data_register; @@ -36,7 +36,7 @@ typedef struct UINT8 control_register; UINT8 reserved; UINT8 clock_control_register; -} scc68070_i2c_regs_t; +}; #define ISR_MST 0x80 // Master #define ISR_TRX 0x40 // Transmitter @@ -47,7 +47,7 @@ typedef struct #define ISR_AD0 0x02 // Address Zero #define ISR_LRB 0x01 // Last Received Bit -typedef struct +struct scc68070_uart_regs_t { UINT8 reserved0; UINT8 mode_register; @@ -69,7 +69,7 @@ typedef struct INT16 transmit_pointer; UINT8 transmit_buffer[32768]; emu_timer* tx_timer; -} scc68070_uart_regs_t; +}; #define UMR_OM 0xc0 #define UMR_OM_NORMAL 0x00 @@ -90,7 +90,7 @@ typedef struct #define USR_TXRDY 0x04 #define USR_RXRDY 0x01 -typedef struct +struct scc68070_timer_regs_t { UINT8 timer_status_register; UINT8 timer_control_register; @@ -99,7 +99,7 @@ typedef struct UINT16 timer1; UINT16 timer2; emu_timer* timer0_timer; -} scc68070_timer_regs_t; +}; #define TSR_OV0 0x80 #define TSR_MA1 0x40 @@ -130,7 +130,7 @@ typedef struct #define TCR_M2_CAPTURE 0x02 #define TCR_M2_COUNT 0x03 -typedef struct +struct scc68070_dma_channel_t { UINT8 channel_status; UINT8 channel_error; @@ -153,7 +153,7 @@ typedef struct UINT32 device_address_counter; UINT8 reserved3[40]; -} scc68070_dma_channel_t; +}; #define CSR_COC 0x80 #define CSR_NDT 0x20 @@ -193,21 +193,21 @@ typedef struct #define CCR_INE 0x08 #define CCR_IPL 0x07 -typedef struct +struct scc68070_dma_regs_t { scc68070_dma_channel_t channel[2]; -} scc68070_dma_regs_t; +}; -typedef struct +struct scc68070_mmu_desc_t { UINT16 attr; UINT16 length; UINT8 undefined; UINT8 segment; UINT16 base; -} scc68070_mmu_desc_t; +}; -typedef struct +struct scc68070_mmu_regs_t { UINT8 status; UINT8 control; @@ -215,9 +215,9 @@ typedef struct UINT8 reserved[0x3e]; scc68070_mmu_desc_t desc[8]; -} scc68070_mmu_regs_t; +}; -typedef struct +struct scc68070_regs_t { UINT16 lir; UINT8 picr1; @@ -228,7 +228,7 @@ typedef struct scc68070_timer_regs_t timers; scc68070_dma_regs_t dma; scc68070_mmu_regs_t mmu; -} scc68070_regs_t; +}; // Member functions TIMER_CALLBACK( scc68070_timer0_callback ); diff --git a/src/mame/machine/kaneko_calc3.c b/src/mame/machine/kaneko_calc3.c index 05a19e8a493..fc0e313962d 100644 --- a/src/mame/machine/kaneko_calc3.c +++ b/src/mame/machine/kaneko_calc3.c @@ -70,13 +70,13 @@ void kaneko_calc3_device::device_start() -typedef struct +struct calc3_t { int data_header[2]; -} calc3_t; +}; diff --git a/src/mame/machine/kaneko_calc3.h b/src/mame/machine/kaneko_calc3.h index 757be4215ba..9e3afcd0668 100644 --- a/src/mame/machine/kaneko_calc3.h +++ b/src/mame/machine/kaneko_calc3.h @@ -3,7 +3,7 @@ #define CALC3_VERBOSE_OUTPUT 0 -typedef struct +struct calc3_t { int mcu_status; int mcu_command_offset; @@ -23,7 +23,7 @@ typedef struct UINT16 eeprom_addr; UINT16 poll_addr; UINT16 checksumaddress; -} calc3_t; +}; diff --git a/src/mame/machine/kaneko_hit.h b/src/mame/machine/kaneko_hit.h index 2cc1c3d4dca..3cdd4bd981e 100644 --- a/src/mame/machine/kaneko_hit.h +++ b/src/mame/machine/kaneko_hit.h @@ -1,7 +1,7 @@ /* Kaneko Hit protection */ -typedef struct +struct calc1_hit_t { UINT16 x1p, y1p, x1s, y1s; UINT16 x2p, y2p, x2s, y2s; @@ -9,9 +9,9 @@ typedef struct INT16 x12, y12, x21, y21; UINT16 mult_a, mult_b; -} calc1_hit_t; +}; -typedef struct +struct calc3_hit_t { int x1p, y1p, z1p, x1s, y1s, z1s; int x2p, y2p, z2p, x2s, y2s, z2s; @@ -29,7 +29,7 @@ typedef struct UINT16 flags; UINT16 mode; -} calc3_hit_t; +}; diff --git a/src/mame/machine/pxa255.h b/src/mame/machine/pxa255.h index 46676491dcc..7c643d101c6 100644 --- a/src/mame/machine/pxa255.h +++ b/src/mame/machine/pxa255.h @@ -163,7 +163,7 @@ #define PXA255_DCMD_WIDTH_2 (0x00008000) #define PXA255_DCMD_WIDTH_4 (0x0000c000) -typedef struct +struct PXA255_DMA_Regs { UINT32 dcsr[16]; @@ -183,7 +183,7 @@ typedef struct UINT32 dcmd[16]; emu_timer* timer[16]; -} PXA255_DMA_Regs; +}; /* @@ -230,7 +230,7 @@ typedef struct #define PXA255_SADIV (PXA255_I2S_BASE_ADDR + 0x00000060) #define PXA255_SADR (PXA255_I2S_BASE_ADDR + 0x00000080) -typedef struct +struct PXA255_I2S_Regs { UINT32 sacr0; UINT32 sacr1; @@ -251,7 +251,7 @@ typedef struct UINT32 pad3[6]; UINT32 sadr; -} PXA255_I2S_Regs; +}; /* @@ -279,7 +279,7 @@ typedef struct #define PXA255_OIER_E2 (0x00000004) #define PXA255_OIER_E3 (0x00000008) -typedef struct +struct PXA255_OSTMR_Regs { UINT32 osmr[4]; UINT32 oscr; @@ -288,7 +288,7 @@ typedef struct UINT32 oier; emu_timer* timer[4]; -} PXA255_OSTMR_Regs; +}; /* @@ -331,7 +331,7 @@ typedef struct #define PXA255_INT_RTC_HZ (1 << 30) #define PXA255_INT_RTC_ALARM (1 << 31) -typedef struct +struct PXA255_INTC_Regs { UINT32 icip; UINT32 icmr; @@ -339,7 +339,7 @@ typedef struct UINT32 icfp; UINT32 icpr; UINT32 iccr; -} PXA255_INTC_Regs; +}; /* @@ -378,7 +378,7 @@ typedef struct #define PXA255_GAFR2_L (PXA255_GPIO_BASE_ADDR + 0x00000064) #define PXA255_GAFR2_U (PXA255_GPIO_BASE_ADDR + 0x00000068) -typedef struct +struct PXA255_GPIO_Regs { UINT32 gplr0; // GPIO Pin-Leve UINT32 gplr1; @@ -414,7 +414,7 @@ typedef struct UINT32 gafr1u; UINT32 gafr2l; UINT32 gafr2u; -} PXA255_GPIO_Regs; +}; /* @@ -476,16 +476,16 @@ typedef struct #define PXA255_FIDR1 (PXA255_LCD_BASE_ADDR + 0x00000218) #define PXA255_LDCMD1 (PXA255_LCD_BASE_ADDR + 0x0000021c) -typedef struct +struct PXA255_LCD_DMA_Regs { UINT32 fdadr; UINT32 fsadr; UINT32 fidr; UINT32 ldcmd; emu_timer *eof; -} PXA255_LCD_DMA_Regs; +}; -typedef struct +struct PXA255_LCD_Regs { UINT32 lccr0; UINT32 lccr1; @@ -506,4 +506,4 @@ typedef struct UINT32 pad2[110]; PXA255_LCD_DMA_Regs dma[2]; -} PXA255_LCD_Regs; +}; diff --git a/src/mame/machine/snes7110.c b/src/mame/machine/snes7110.c index 7f6de55d5e1..ae2deb69d0e 100644 --- a/src/mame/machine/snes7110.c +++ b/src/mame/machine/snes7110.c @@ -788,7 +788,7 @@ enum RTC_Mode static const UINT32 spc7110_months[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; -typedef struct +struct _snes_spc7110_t { //================== //decompression unit @@ -871,7 +871,7 @@ typedef struct UINT8 rtc_ram[16]; // 0-12 secs, min, hrs, etc.; 13-14-15 control registers UINT32 size; -} _snes_spc7110_t; +}; static _snes_spc7110_t snes_spc7110; diff --git a/src/mame/machine/snescx4.h b/src/mame/machine/snescx4.h index 4555d5c9e11..e780c7ffa48 100644 --- a/src/mame/machine/snescx4.h +++ b/src/mame/machine/snescx4.h @@ -8,7 +8,7 @@ ***************************************************************************/ -typedef struct +struct CX4 { UINT8 ram[0x0c00]; UINT8 reg[0x0100]; @@ -21,4 +21,4 @@ typedef struct double tanval; double c4x, c4y, c4z; double c4x2, c4y2, c4z2; -} CX4; +}; diff --git a/src/mame/machine/snessdd1.c b/src/mame/machine/snessdd1.c index fcf229b518e..0fc8d121873 100644 --- a/src/mame/machine/snessdd1.c +++ b/src/mame/machine/snessdd1.c @@ -178,12 +178,12 @@ static UINT8 SDD1_BG_getBit(SDD1_BG* thisptr, UINT8* endOfRun) } -typedef struct +struct SDD1_PEM_state { UINT8 code_num; UINT8 nextIfMPS; UINT8 nextIfLPS; -} SDD1_PEM_state; +}; static const SDD1_PEM_state SDD1_PEM_evolution_table[33] = { @@ -222,11 +222,11 @@ static const SDD1_PEM_state SDD1_PEM_evolution_table[33] = { 7,24,22} }; -typedef struct +struct SDD1_PEM_ContextInfo { UINT8 status; UINT8 MPS; -} SDD1_PEM_ContextInfo; +}; class SDD1_PEM //Probability Estimation Module { diff --git a/src/mame/machine/stvcd.c b/src/mame/machine/stvcd.c index bf21f645ec7..9189d5d14c7 100644 --- a/src/mame/machine/stvcd.c +++ b/src/mame/machine/stvcd.c @@ -46,7 +46,7 @@ static void cd_playdata(running_machine &machine); #define MAX_BLOCKS (200) #define MAX_DIR_SIZE (256*1024) -typedef struct +struct direntryT { UINT8 record_size; UINT8 xa_record_size; @@ -64,9 +64,9 @@ typedef struct UINT8 interleave_gap_size; UINT16 volume_sequencer_number; UINT8 name[128]; -} direntryT; +}; -typedef struct +struct filterT { UINT8 mode; UINT8 chan; @@ -79,9 +79,9 @@ typedef struct UINT8 condfalse; UINT32 fad; UINT32 range; -} filterT; +}; -typedef struct +struct blockT { INT32 size; // size of block INT32 FAD; // FAD on disc @@ -90,15 +90,15 @@ typedef struct UINT8 fnum; // file number UINT8 subm; // subchannel mode UINT8 cinf; // coding information -} blockT; +}; -typedef struct +struct partitionT { INT32 size; blockT *blocks[MAX_BLOCKS]; UINT8 bnum[MAX_BLOCKS]; UINT8 numblks; -} partitionT; +}; // 16-bit transfer types typedef enum diff --git a/src/mame/machine/znsec.c b/src/mame/machine/znsec.c index 4d03ef35e57..fc8fbd2696a 100644 --- a/src/mame/machine/znsec.c +++ b/src/mame/machine/znsec.c @@ -85,11 +85,11 @@ #include "emu.h" #include "znsec.h" -typedef struct { +struct znsec_state { const UINT8 *transform; UINT8 state; UINT8 bit; -} znsec_state; +}; static znsec_state zns[2]; diff --git a/src/mame/video/dc.c b/src/mame/video/dc.c index bf7f1e8141e..630e8c37cc0 100644 --- a/src/mame/video/dc.c +++ b/src/mame/video/dc.c @@ -150,13 +150,13 @@ typedef struct float x, y, w, u, v; } vert; -typedef struct +struct strip { int svert, evert; texinfo ti; -} strip; +}; -typedef struct { +struct receiveddata { vert verts[65536]; strip strips[65536]; @@ -166,9 +166,9 @@ typedef struct { UINT32 fbwsof2; int busy; int valid; -} receiveddata; +}; -typedef struct { +struct pvrta_state { int tafifo_pos, tafifo_mask, tafifo_vertexwords, tafifo_listtype; int start_render_received; int renderselect; @@ -184,7 +184,7 @@ typedef struct { UINT32 blend_mode, srcselect,dstselect,fogcontrol,colorclamp, use_alpha; UINT32 ignoretexalpha,flipuv,clampuv,filtermode,sstexture,mmdadjust,tsinstruction; UINT32 depthcomparemode,cullingmode,zwritedisable,cachebypass,dcalcctrl,volumeinstruction,mipmapped,vqcompressed,strideselect,paletteselector; -} pvrta_state; +}; enum { diff --git a/src/mame/video/kaneko_spr.h b/src/mame/video/kaneko_spr.h index a5e2fb11015..8a5e2df629e 100644 --- a/src/mame/video/kaneko_spr.h +++ b/src/mame/video/kaneko_spr.h @@ -11,10 +11,10 @@ -typedef struct +struct kaneko16_priority_t { int sprite[4]; -} kaneko16_priority_t; +}; struct tempsprite { diff --git a/src/mame/video/mcd212.h b/src/mame/video/mcd212.h index 4aeb20ab37c..1070678a8a7 100644 --- a/src/mame/video/mcd212.h +++ b/src/mame/video/mcd212.h @@ -24,7 +24,7 @@ TODO: #include "emu.h" -typedef struct +struct mcd212_channel_t { UINT8 csrr; UINT16 csrw; @@ -58,7 +58,7 @@ typedef struct UINT32 mosaic_hold_b; UINT8 weight_factor_a[768]; UINT8 weight_factor_b[768]; -} mcd212_channel_t; +}; typedef struct { diff --git a/src/mame/video/model2.c b/src/mame/video/model2.c index 99344704bf2..4dd560ea20a 100644 --- a/src/mame/video/model2.c +++ b/src/mame/video/model2.c @@ -104,21 +104,21 @@ * *******************************************/ -typedef struct +struct plane { poly_vertex normal; float distance; -} plane; +}; -typedef struct +struct texture_parameter { float diffuse; float ambient; UINT32 specular_control; float specular_scale; -} texture_parameter; +}; -typedef struct +struct triangle { void * next; poly_vertex v[3]; @@ -127,15 +127,15 @@ typedef struct UINT8 luma; INT16 viewport[4]; INT16 center[2]; -} triangle; +}; -typedef struct +struct _quad_m2 { poly_vertex v[4]; UINT16 z; UINT16 texheader[4]; UINT8 luma; -} _quad_m2; +}; struct poly_extra_data { diff --git a/src/mame/video/model3.c b/src/mame/video/model3.c index 79fb68e4fc0..21bf161b293 100644 --- a/src/mame/video/model3.c +++ b/src/mame/video/model3.c @@ -12,7 +12,7 @@ -typedef struct +struct TRIANGLE { poly_vertex v[3]; UINT8 texture_x, texture_y; @@ -21,7 +21,7 @@ typedef struct UINT8 texture_format, param; int intensity; UINT32 color; -} TRIANGLE; +}; struct _cached_texture { diff --git a/src/mame/video/namcos21.c b/src/mame/video/namcos21.c index 0758276e4c0..16fa39a0b18 100644 --- a/src/mame/video/namcos21.c +++ b/src/mame/video/namcos21.c @@ -233,17 +233,17 @@ SCREEN_UPDATE_IND16( namcos21 ) /*********************************************************************************************/ -typedef struct +struct vertex { double x,y; double z; -} vertex; +}; -typedef struct +struct edge { double x; double z; -} edge; +}; #define SWAP(T,A,B) { const T *temp = A; A = B; B = temp; } diff --git a/src/mame/video/namcos22.c b/src/mame/video/namcos22.c index 1b9764ee2f2..1568bdd137e 100644 --- a/src/mame/video/namcos22.c +++ b/src/mame/video/namcos22.c @@ -317,12 +317,12 @@ poly3d_NoClip( void ) mClip.scissor.set(0, 639, 0, 479); } -typedef struct +struct Poly3dVertex { float x,y,z; int u,v; /* 0..0xfff */ int bri; /* 0..0xff */ -} Poly3dVertex; +}; #define MIN_Z (10.0f) diff --git a/src/mame/video/vdc.c b/src/mame/video/vdc.c index 74308f76dd8..5ee66b62631 100644 --- a/src/mame/video/vdc.c +++ b/src/mame/video/vdc.c @@ -20,7 +20,7 @@ typedef union /* the VDC context */ -typedef struct +struct VDC { int dvssr_write; /* Set when the DVSSR register has been written to */ int physical_width; /* Width of the display */ @@ -39,30 +39,30 @@ typedef struct pair vdc_data[32]; int status; int y_scroll; -}VDC; +}; -typedef struct { +struct VCE { UINT8 vce_control; /* VCE control register */ pair vce_address; /* Current address in the palette */ pair vce_data[512]; /* Palette data */ int current_bitmap_line; /* The current line in the display we are on */ bitmap_ind16 *bmp; -}VCE; +}; -typedef struct { +struct VPC_PRIO { UINT8 prio; UINT8 vdc0_enabled; UINT8 vdc1_enabled; -} VPC_PRIO; +}; -typedef struct { +struct VPC { VPC_PRIO vpc_prio[4]; UINT8 prio_map[512]; /* Pre-calculated priority map */ pair priority; /* Priority settings registers */ pair window1; /* Window 1 setting */ pair window2; /* Window 2 setting */ UINT8 vdc_select; /* Which VDC do the ST0, ST1, and ST2 instructions write to */ -}VPC; +}; static VDC vdc[2]; static VCE vce; diff --git a/src/mame/video/vrender0.c b/src/mame/video/vrender0.c index c2b2fbc0b65..151b11f7d24 100644 --- a/src/mame/video/vrender0.c +++ b/src/mame/video/vrender0.c @@ -20,7 +20,7 @@ Missing: **************/ -typedef struct +struct _Quad { UINT16 *Dest; UINT32 Pitch; //in UINT16s @@ -48,9 +48,9 @@ typedef struct UINT32 SrcColor; UINT8 DstAlpha; UINT32 DstColor; -} _Quad; +}; -typedef struct +struct _RenderState { UINT32 Tx; UINT32 Ty; @@ -72,7 +72,7 @@ typedef struct UINT32 PixelFormat; UINT32 Width; UINT32 Height; -} _RenderState; +}; struct vr0video_state { diff --git a/src/mess/audio/lynx.c b/src/mess/audio/lynx.c index d5017901708..4bfd1e3ece8 100644 --- a/src/mess/audio/lynx.c +++ b/src/mess/audio/lynx.c @@ -81,7 +81,7 @@ AUD_A_RIGHT EQU %00000001 #define LYNX_AUDIO_CHANNELS 4 -typedef struct { +struct LYNX_AUDIO { struct { INT8 volume; UINT8 feedback; @@ -97,7 +97,7 @@ typedef struct { UINT16 shifter; // 12-bit float ticks; int count; -} LYNX_AUDIO; +}; struct lynx_sound_state { diff --git a/src/mess/audio/mea8000.c b/src/mess/audio/mea8000.c index 4907895eac3..aa57cd0a900 100644 --- a/src/mess/audio/mea8000.c +++ b/src/mess/audio/mea8000.c @@ -55,7 +55,7 @@ typedef enum ALLOW_SAVE_TYPE( mea8000_state ); -typedef struct +struct filter_t { #ifdef FLOAT_MODE double fm, last_fm; /* frequency, in Hz */ @@ -66,11 +66,11 @@ typedef struct UINT16 bw, last_bw; INT32 output, last_output; #endif -} filter_t; +}; -typedef struct +struct mea8000_t { /* configuration parameters */ @@ -102,7 +102,7 @@ typedef struct emu_timer *timer; -} mea8000_t; +}; diff --git a/src/mess/audio/socrates.c b/src/mess/audio/socrates.c index 4ac055fe014..347c7ee3ea8 100644 --- a/src/mess/audio/socrates.c +++ b/src/mess/audio/socrates.c @@ -10,7 +10,7 @@ #include "emu.h" #include "socrates.h" -typedef struct +struct SocratesASIC { sound_stream *stream; UINT8 freq[2]; /* channel 1,2 frequencies */ @@ -20,7 +20,7 @@ typedef struct UINT8 state[3]; /* output states for channels 1,2,3 */ UINT8 accum[3]; /* accumulators for channels 1,2,3 */ UINT16 DAC_output; /* output */ -} SocratesASIC; +}; INLINE SocratesASIC *get_safe_token(device_t *device) diff --git a/src/mess/audio/svision.c b/src/mess/audio/svision.c index b9c1ef7448a..bccb8c574b3 100644 --- a/src/mess/audio/svision.c +++ b/src/mess/audio/svision.c @@ -13,7 +13,7 @@ typedef enum SVISION_NOISE_Type14Bit } SVISION_NOISE_Type; -typedef struct +struct SVISION_NOISE { UINT8 reg[3]; int on, right, left, play; @@ -23,9 +23,9 @@ typedef struct int count; double step, pos; int value; // currently simple random function -} SVISION_NOISE; +}; -typedef struct +struct SVISION_DMA { UINT8 reg[5]; int on, right, left; @@ -33,9 +33,9 @@ typedef struct int start,size; double pos, step; int finished; -} SVISION_DMA; +}; -typedef struct +struct SVISION_CHANNEL { UINT8 reg[4]; int on; @@ -43,7 +43,7 @@ typedef struct int pos; int size; int count; -} SVISION_CHANNEL; +}; struct svision_sound_state { diff --git a/src/mess/audio/vboy.h b/src/mess/audio/vboy.h index 33de66466c7..fc2c38565f2 100644 --- a/src/mess/audio/vboy.h +++ b/src/mess/audio/vboy.h @@ -31,7 +31,7 @@ // TYPE DEFINITIONS //************************************************************************** -typedef struct { +struct s_snd_channel { INT8 playing; // the sound is playing // state when sound was enabled @@ -48,9 +48,9 @@ typedef struct { int time; // the duration that this sample is to be played UINT8 envelope; // Current envelope level (604) int env_time; // The duration between envelope decay/grow (608) -} s_snd_channel; +}; -typedef struct { +struct s_regchan { INT32 sINT; INT32 sLRV; INT32 sFQL; @@ -58,12 +58,12 @@ typedef struct { INT32 sEV0; INT32 sEV1; INT32 sRAM; -} s_regchan; +}; -typedef struct { +struct s_sreg { // Sound registers structure s_regchan c[4]; -} s_sreg; +}; // ======================> vboysnd_device diff --git a/src/mess/devices/sonydriv.c b/src/mess/devices/sonydriv.c index 4d7b4746a45..2fa59a61ae0 100644 --- a/src/mess/devices/sonydriv.c +++ b/src/mess/devices/sonydriv.c @@ -60,7 +60,7 @@ enum Structure that describes the state of a floppy drive, and the associated disk image */ -typedef struct +struct floppy_t { device_t *img; emu_file *fd; @@ -78,9 +78,9 @@ typedef struct int is_fdhd; /* is drive an FDHD? */ int is_400k; /* drive is single-sided, which means 400K */ -} floppy_t; +}; -typedef struct +struct sonydriv_t { int lines; /* four lines SONY_CA0 - SONY_LSTRB */ @@ -91,7 +91,7 @@ typedef struct unsigned int rotation_speed; /* drive rotation speed - ignored if ext_speed_control == 0 */ floppy_t floppy[2]; /* data for two floppy disk units */ -} sonydriv_t; +}; static sonydriv_t sony; /* bit of code used in several places - I am unsure why it is here */ diff --git a/src/mess/drivers/a2600.c b/src/mess/drivers/a2600.c index e0d938d3001..17352fd7388 100644 --- a/src/mess/drivers/a2600.c +++ b/src/mess/drivers/a2600.c @@ -15,7 +15,7 @@ #include "video/tia.h" #include "hashfile.h" -typedef struct { +struct df_t { UINT8 top; UINT8 bottom; UINT8 low; @@ -23,9 +23,9 @@ typedef struct { UINT8 flag; UINT8 music_mode; /* Only used by data fetchers 5,6, and 7 */ UINT8 osc_clk; /* Only used by data fetchers 5,6, and 7 */ -} df_t; +}; -typedef struct +struct dpc_t { df_t df[8]; UINT8 movamt; @@ -34,7 +34,7 @@ typedef struct UINT8 dlc; UINT8 shift_reg; emu_timer *oscillator; -} dpc_t; +}; class a2600_state : public driver_device diff --git a/src/mess/drivers/cgenie.c b/src/mess/drivers/cgenie.c index 227c4e10f11..fd1895a1146 100644 --- a/src/mess/drivers/cgenie.c +++ b/src/mess/drivers/cgenie.c @@ -626,7 +626,7 @@ ROM_END // GATL GAT Length // GATM GAT Mask // DDGA Disk Directory Granule Allocation -typedef struct +struct PDRIVE { UINT8 DDSL; // Disk Directory Start Lump (lump number of GAT) UINT8 GATL; // # of bytes used in the Granule Allocation Table sector @@ -638,7 +638,7 @@ typedef struct UINT8 FLAGS; // ???? some flags (SS/DS bit 6) UINT8 GPL; // Sectors per granule (always 5 for the Colour Genie) UINT8 DDGA; // Disk Directory Granule allocation (number of driectory granules) -} PDRIVE; +}; static const PDRIVE pd_list[12] = { {0x14, 0x28, 0x07, 0x28, 0x0A, 0x02, 0x00, 0x00, 0x05, 0x02}, // CMD"<0=A" 40 tracks, SS, SD diff --git a/src/mess/drivers/gba.c b/src/mess/drivers/gba.c index bb7feb99354..ad32ae03e15 100644 --- a/src/mess/drivers/gba.c +++ b/src/mess/drivers/gba.c @@ -2474,11 +2474,11 @@ static astring gba_chip_string( UINT32 chip) return str.trimspace(); } -typedef struct +struct gba_chip_fix_conflict_item { char game_code[5]; UINT32 chip; -} gba_chip_fix_conflict_item; +}; static const gba_chip_fix_conflict_item gba_chip_fix_conflict_list[] = { @@ -2518,10 +2518,10 @@ static const gba_chip_fix_conflict_item gba_chip_fix_conflict_list[] = { "BYUJ", GBA_CHIP_EEPROM_64K }, // 2322 - Yggdra Union (JPN) }; -typedef struct +struct gba_chip_fix_eeprom_item { char game_code[5]; -} gba_chip_fix_eeprom_item; +}; static const gba_chip_fix_eeprom_item gba_chip_fix_eeprom_list[] = { diff --git a/src/mess/drivers/hp49gp.c b/src/mess/drivers/hp49gp.c index ea276e14535..536155da7e1 100644 --- a/src/mess/drivers/hp49gp.c +++ b/src/mess/drivers/hp49gp.c @@ -24,13 +24,13 @@ INLINE void ATTR_PRINTF(3,4) verboselog( running_machine &machine, int n_level, } } -typedef struct +struct lcd_spi_t { int l1; int data; int l3; UINT32 shift, bits; -} lcd_spi_t; +}; class hp49gp_state : public driver_device { diff --git a/src/mess/drivers/ip20.c b/src/mess/drivers/ip20.c index 89d09cd6ccc..eca05f899ee 100644 --- a/src/mess/drivers/ip20.c +++ b/src/mess/drivers/ip20.c @@ -26,7 +26,7 @@ #include "machine/scsicd.h" #include "machine/wd33c93.h" -typedef struct +struct HPC_t { UINT8 nMiscStatus; UINT32 nParBufPtr; @@ -36,13 +36,13 @@ typedef struct UINT32 nVMEIntMask1; UINT32 nSCSI0Descriptor; UINT32 nSCSI0DMACtrl; -} HPC_t; +}; -typedef struct +struct RTC_t { UINT8 nRAM[32]; UINT8 nTemp; -} RTC_t; +}; class ip20_state : public driver_device { diff --git a/src/mess/drivers/ip22.c b/src/mess/drivers/ip22.c index 077e4317885..232a7a4cb10 100644 --- a/src/mess/drivers/ip22.c +++ b/src/mess/drivers/ip22.c @@ -57,14 +57,14 @@ #include "machine/scsihd.h" #include "machine/wd33c93.h" -typedef struct +struct RTC_t { UINT8 nRegs[0x80]; UINT8 nUserRAM[0x200]; UINT8 nRAM[0x800]; -} RTC_t; +}; -typedef struct +struct HPC3_t { UINT32 nenetr_nbdp; UINT32 nenetr_cbp; @@ -73,22 +73,22 @@ typedef struct UINT32 nIC_Unk0; UINT32 nSCSI0Descriptor; UINT32 nSCSI0DMACtrl; -} HPC3_t; +}; -typedef struct +struct HAL2_t { UINT32 nIAR; UINT32 nIDR[4]; -} HAL2_t; +}; -typedef struct +struct PBUS_DMA_t { UINT8 nActive; UINT32 nCurPtr; UINT32 nDescPtr; UINT32 nNextPtr; UINT32 nWordsLeft; -} PBUS_DMA_t; +}; class ip22_state : public driver_device { diff --git a/src/mess/drivers/juicebox.c b/src/mess/drivers/juicebox.c index 085bc639378..40719159f82 100644 --- a/src/mess/drivers/juicebox.c +++ b/src/mess/drivers/juicebox.c @@ -31,12 +31,12 @@ INLINE void ATTR_PRINTF(3,4) verboselog( running_machine &machine, int n_level, } } -typedef struct +struct smc_t { int add_latch; int cmd_latch; int busy; -} smc_t; +}; class juicebox_state : public driver_device { diff --git a/src/mess/drivers/ng_aes.c b/src/mess/drivers/ng_aes.c index ba72b8e23b0..cb1c22eb33d 100644 --- a/src/mess/drivers/ng_aes.c +++ b/src/mess/drivers/ng_aes.c @@ -44,7 +44,7 @@ static const char *audio_banks[4] = }; // CD-ROM / DMA control registers -typedef struct +struct neocd_ctrl_t { UINT8 area_sel; UINT8 pcm_bank_sel; @@ -54,7 +54,7 @@ typedef struct UINT16 fill_word; UINT32 word_count; UINT16 dma_mode[10]; -} neocd_ctrl_t; +}; class ng_aes_state : public neogeo_state { diff --git a/src/mess/drivers/pc8801.c b/src/mess/drivers/pc8801.c index 506be98aa47..dbb18c49024 100644 --- a/src/mess/drivers/pc8801.c +++ b/src/mess/drivers/pc8801.c @@ -271,19 +271,19 @@ #define UPD1990A_TAG "upd1990a" #define I8251_TAG "i8251" -typedef struct +struct crtc_t { UINT8 cmd,param_count,cursor_on,status,irq_mask; UINT8 param[8][5]; UINT8 inverse; -} crtc_t; +}; -typedef struct +struct mouse_t { UINT8 phase; UINT8 x,y; attotime time; -} mouse_t; +}; class pc8801_state : public driver_device { diff --git a/src/mess/drivers/pc88va.c b/src/mess/drivers/pc88va.c index db606a6d5ad..85d3a5bf768 100644 --- a/src/mess/drivers/pc88va.c +++ b/src/mess/drivers/pc88va.c @@ -29,7 +29,7 @@ #include "sound/2203intf.h" #include "formats/basicdsk.h" -typedef struct +struct tsp_t { UINT16 tvram_vreg_offset; UINT16 attr_offset; @@ -43,7 +43,7 @@ typedef struct UINT16 cur_pos_x,cur_pos_y; UINT8 curn; UINT8 curn_blink; -} tsp_t; +}; class pc88va_state : public driver_device diff --git a/src/mess/drivers/pockstat.c b/src/mess/drivers/pockstat.c index 8c227a81033..3f7d6849ec4 100644 --- a/src/mess/drivers/pockstat.c +++ b/src/mess/drivers/pockstat.c @@ -36,7 +36,7 @@ #define MAX_PS_TIMERS 3 -typedef struct +struct ps_ftlb_regs_t { UINT32 control; UINT32 stat; @@ -45,45 +45,45 @@ typedef struct UINT32 wait2; UINT32 entry[16]; UINT32 serial; -} ps_ftlb_regs_t; +}; -typedef struct +struct ps_intc_regs_t { UINT32 hold; UINT32 status; UINT32 enable; UINT32 mask; -} ps_intc_regs_t; +}; -typedef struct +struct ps_timer_t { UINT32 period; UINT32 count; UINT32 control; emu_timer *timer; -} ps_timer_t; +}; -typedef struct +struct ps_timer_regs_t { ps_timer_t timer[MAX_PS_TIMERS]; -} ps_timer_regs_t; +}; -typedef struct +struct ps_clock_regs_t { UINT32 mode; UINT32 control; -} ps_clock_regs_t; +}; #define PS_CLOCK_STEADY 0x10 -typedef struct +struct ps_rtc_regs_t { UINT32 mode; UINT32 control; UINT32 time; UINT32 date; emu_timer *timer; -} ps_rtc_regs_t; +}; diff --git a/src/mess/drivers/psx.c b/src/mess/drivers/psx.c index 94ae5a2b189..a25e78d59b3 100644 --- a/src/mess/drivers/psx.c +++ b/src/mess/drivers/psx.c @@ -19,7 +19,7 @@ #include "machine/psxcd.h" #include "machine/psxcard.h" -typedef struct +struct pad_t { UINT8 n_shiftin; UINT8 n_shiftout; @@ -28,7 +28,7 @@ typedef struct int n_byte; int b_lastclock; int b_ack; -} pad_t; +}; class psx1_state : public psx_state diff --git a/src/mess/drivers/ptcsol.c b/src/mess/drivers/ptcsol.c index 29d3fabe1ee..3373cec5c27 100644 --- a/src/mess/drivers/ptcsol.c +++ b/src/mess/drivers/ptcsol.c @@ -108,7 +108,7 @@ #include "machine/ay31015.h" -typedef struct { +struct cass_data_t { struct { int length; /* time cassette level is at input.level */ int level; /* cassette level */ @@ -119,7 +119,7 @@ typedef struct { int level; /* cassette level */ int bit; /* bit to to output */ } output; -} cass_data_t; +}; class sol20_state : public driver_device { diff --git a/src/mess/drivers/rvoice.c b/src/mess/drivers/rvoice.c index 37c89e1b828..92e36b2955c 100644 --- a/src/mess/drivers/rvoice.c +++ b/src/mess/drivers/rvoice.c @@ -18,7 +18,7 @@ /* Components */ -typedef struct +struct hd63701y0_t { UINT8 data[8]; UINT8 P1DDR; @@ -55,9 +55,9 @@ typedef struct UINT8 TSTREG; UINT8 P5DDR; UINT8 P6CSR; -} hd63701y0_t; +}; -typedef struct +struct rvoicepc_t { UINT8 data[8]; UINT8 port1; @@ -67,7 +67,7 @@ typedef struct UINT8 port5; UINT8 port6; UINT8 port7; -} rvoicepc_t; +}; class rvoice_state : public driver_device { diff --git a/src/mess/drivers/sgi_ip6.c b/src/mess/drivers/sgi_ip6.c index ac5ac710bd1..253b0f82b04 100644 --- a/src/mess/drivers/sgi_ip6.c +++ b/src/mess/drivers/sgi_ip6.c @@ -17,12 +17,12 @@ #include "cpu/mips/r3000.h" -typedef struct +struct ip6_regs_t { UINT16 unknown_half_0; UINT8 unknown_byte_0; UINT8 unknown_byte_1; -} ip6_regs_t; +}; class sgi_ip6_state : public driver_device { diff --git a/src/mess/formats/timex_dck.h b/src/mess/formats/timex_dck.h index 7ed66b5636a..d05c49cb650 100644 --- a/src/mess/formats/timex_dck.h +++ b/src/mess/formats/timex_dck.h @@ -18,12 +18,12 @@ enum TIMEX_CART_HOME }; -typedef struct +struct timex_cart_t { int type; UINT8 chunks; UINT8 *data; -} timex_cart_t; +}; const timex_cart_t *timex_cart_data(void); diff --git a/src/mess/includes/amstrad.h b/src/mess/includes/amstrad.h index ba85d6d7961..ab3f7fa5406 100644 --- a/src/mess/includes/amstrad.h +++ b/src/mess/includes/amstrad.h @@ -23,7 +23,7 @@ /**************************** * Gate Array data (CPC) - ****************************/ -typedef struct +struct gate_array_t { bitmap_ind16 *bitmap; /* The bitmap we work on */ UINT8 pen_selected; /* Pen selection */ @@ -55,12 +55,12 @@ typedef struct UINT16 line_ticks; UINT8 colour_ticks; UINT8 max_colour_ticks; -} gate_array_t; +}; /**************************** * ASIC data (CPC plus) ****************************/ -typedef struct +struct asic_t { UINT8 *ram; /* pointer to RAM used for the CPC+ ASIC memory-mapped registers */ UINT8 enabled; /* Are CPC plus features enabled/unlocked */ @@ -85,7 +85,7 @@ typedef struct UINT16 dma_addr[3]; /* DMA channel address */ UINT16 dma_loopcount[3]; /* Count loops taken on this channel */ UINT16 dma_pause[3]; /* DMA pause count */ -} asic_t; +}; class amstrad_state : public driver_device diff --git a/src/mess/includes/apple1.h b/src/mess/includes/apple1.h index 37a8412b6b0..727adf972e2 100644 --- a/src/mess/includes/apple1.h +++ b/src/mess/includes/apple1.h @@ -12,7 +12,7 @@ typedef short termchar_t; -typedef struct +struct terminal_t { tilemap_t *tm; int gfx; @@ -24,7 +24,7 @@ typedef struct int cur_offset; int cur_hidden; termchar_t mem[1]; -} terminal_t; +}; class apple1_state : public driver_device diff --git a/src/mess/includes/bebox.h b/src/mess/includes/bebox.h index a0f97a33e46..b26cdc07caa 100644 --- a/src/mess/includes/bebox.h +++ b/src/mess/includes/bebox.h @@ -13,13 +13,13 @@ #include "machine/8237dma.h" #include "machine/53c810.h" -typedef struct +struct bebox_devices_t { device_t *pic8259_master; device_t *pic8259_slave; device_t *dma8237_1; device_t *dma8237_2; -} bebox_devices_t; +}; class bebox_state : public driver_device diff --git a/src/mess/includes/c64_legacy.h b/src/mess/includes/c64_legacy.h index d9227403115..ca370b2d440 100644 --- a/src/mess/includes/c64_legacy.h +++ b/src/mess/includes/c64_legacy.h @@ -19,9 +19,9 @@ #define C64_MAX_ROMBANK 64 // .crt files contain multiple 'CHIPs', i.e. rom banks (of variable size) with headers. Known carts have at most 64 'CHIPs'. -typedef struct { +struct C64_ROM { int addr, size, index, start; -} C64_ROM; +}; struct c64_cart_t { C64_ROM bank[C64_MAX_ROMBANK]; diff --git a/src/mess/includes/c65.h b/src/mess/includes/c65.h index 1588ba101cb..f29335bc808 100644 --- a/src/mess/includes/c65.h +++ b/src/mess/includes/c65.h @@ -10,13 +10,13 @@ #include "includes/c64_legacy.h" #include "machine/6526cia.h" -typedef struct +struct dma_t { int version; UINT8 data[4]; -} dma_t; +}; -typedef struct +struct fdc_t { int state; @@ -30,12 +30,12 @@ typedef struct attotime time; int head,track,sector; -} fdc_t; +}; -typedef struct +struct expansion_ram_t { UINT8 reg; -} expansion_ram_t; +}; class c65_state : public legacy_c64_state { diff --git a/src/mess/includes/cgenie.h b/src/mess/includes/cgenie.h index 53353bb54c9..e5d88a615ca 100644 --- a/src/mess/includes/cgenie.h +++ b/src/mess/includes/cgenie.h @@ -10,7 +10,7 @@ #include "machine/wd17xx.h" // CRTC 6845 -typedef struct +struct CRTC6845 { UINT8 cursor_address_lo; UINT8 cursor_address_hi; @@ -31,7 +31,7 @@ typedef struct UINT8 idx; UINT8 cursor_visible; UINT8 cursor_phase; -} CRTC6845; +}; class cgenie_state : public driver_device diff --git a/src/mess/includes/channelf.h b/src/mess/includes/channelf.h index 614a09c81e1..17d6996d1d9 100644 --- a/src/mess/includes/channelf.h +++ b/src/mess/includes/channelf.h @@ -13,14 +13,14 @@ /* SKR - 2102 RAM chip on carts 10 and 18 I/O ports */ -typedef struct +struct r2102_t { UINT8 d; /* data bit:inverted logic, but reading/writing cancel out */ UINT8 r_w; /* inverted logic: 0 means read, 1 means write */ UINT8 a[10]; /* addr bits: inverted logic, but reading/writing cancel out */ UINT16 addr; /* calculated addr from addr bits */ UINT8 ram[1024]; /* RAM array */ -} r2102_t; +}; class channelf_state : public driver_device diff --git a/src/mess/includes/compis.h b/src/mess/includes/compis.h index 976ba189e70..e49a5947bdb 100644 --- a/src/mess/includes/compis.h +++ b/src/mess/includes/compis.h @@ -73,17 +73,17 @@ struct intr_state UINT16 ext[4]; }; -typedef struct +struct i186_state { struct timer_state timer[3]; struct dma_state dma[2]; struct intr_state intr; struct mem_state mem; -} i186_state; +}; /* Keyboard */ -typedef struct +struct TYP_COMPIS_KEYBOARD { UINT8 nationality; /* Character set, keyboard layout (Swedish) */ UINT8 release_time; /* Autorepeat release time (0.8) */ @@ -99,30 +99,30 @@ typedef struct UINT8 boot_order[4]; /* Boot device order (FD HD NW PD) */ UINT8 key_code; UINT8 key_status; -} TYP_COMPIS_KEYBOARD; +}; /* USART 8251 */ -typedef struct +struct TYP_COMPIS_USART { UINT8 status; UINT8 bytes_sent; -} TYP_COMPIS_USART; +}; /* Printer */ -typedef struct +struct TYP_COMPIS_PRINTER { UINT8 data; UINT8 strobe; -} TYP_COMPIS_PRINTER; +}; /* Main emulation */ -typedef struct +struct TYP_COMPIS { TYP_COMPIS_PRINTER printer; /* Printer */ TYP_COMPIS_USART usart; /* USART 8251 */ TYP_COMPIS_KEYBOARD keyboard; /* Keyboard */ -} TYP_COMPIS; +}; class compis_state : public driver_device diff --git a/src/mess/includes/concept.h b/src/mess/includes/concept.h index 7f2ee1f0fe9..42196b979ca 100644 --- a/src/mess/includes/concept.h +++ b/src/mess/includes/concept.h @@ -21,13 +21,13 @@ enum MaxKeyMessageLen = 1 }; -typedef struct +struct expansion_slot_t { read8_space_func reg_read; write8_space_func reg_write; read8_space_func rom_read; write8_space_func rom_write; -} expansion_slot_t; +}; class concept_state : public driver_device diff --git a/src/mess/includes/cxhumax.h b/src/mess/includes/cxhumax.h index 3b63f5eec14..d00fe40f37b 100644 --- a/src/mess/includes/cxhumax.h +++ b/src/mess/includes/cxhumax.h @@ -9,20 +9,20 @@ #define MAX_CX_TIMERS 16 -typedef struct +struct cx_timer_t { UINT32 value; UINT32 limit; UINT32 mode; UINT32 timebase; emu_timer *timer; -} cx_timer_t; +}; -typedef struct +struct cx_timer_regs_t { cx_timer_t timer[MAX_CX_TIMERS]; UINT32 timer_irq; -} cx_timer_regs_t; +}; class cxhumax_state : public driver_device { diff --git a/src/mess/includes/cybiko.h b/src/mess/includes/cybiko.h index 89674d1edda..769d1208a41 100644 --- a/src/mess/includes/cybiko.h +++ b/src/mess/includes/cybiko.h @@ -28,18 +28,18 @@ #include "machine/sst39vfx.h" #include "machine/ram.h" -typedef struct +struct CYBIKO_RS232_PINS { int sck; // serial clock int txd; // transmit data int rxd; // receive data -} CYBIKO_RS232_PINS; +}; -typedef struct +struct CYBIKO_RS232 { CYBIKO_RS232_PINS pin; UINT8 rx_bits, rx_byte, tx_byte, tx_bits; -} CYBIKO_RS232; +}; class cybiko_state : public driver_device { diff --git a/src/mess/includes/dgn_beta.h b/src/mess/includes/dgn_beta.h index d9c46e287ac..ac06c04bac4 100644 --- a/src/mess/includes/dgn_beta.h +++ b/src/mess/includes/dgn_beta.h @@ -74,11 +74,11 @@ typedef enum #define iosize (0xfEFF-0xfc00) -typedef struct +struct PageReg { int value; /* Value of the page register */ UINT8 *memory; /* The memory it actually points to */ -} PageReg; +}; class dgn_beta_state : public driver_device diff --git a/src/mess/includes/electron.h b/src/mess/includes/electron.h index 4bf7dde2c35..e86692f8685 100644 --- a/src/mess/includes/electron.h +++ b/src/mess/includes/electron.h @@ -23,7 +23,7 @@ /* ULA context */ -typedef struct +struct ULA { UINT8 interrupt_status; UINT8 interrupt_control; @@ -48,7 +48,7 @@ typedef struct int stop_bit; int tape_running; UINT8 tape_byte; -} ULA; +}; class electron_state : public driver_device diff --git a/src/mess/includes/fm7.h b/src/mess/includes/fm7.h index 04a1ff95a04..c41d0302310 100644 --- a/src/mess/includes/fm7.h +++ b/src/mess/includes/fm7.h @@ -30,7 +30,7 @@ #define KEY_MODE_FM16B 1 // FM-16B (FM-77AV and later only) #define KEY_MODE_SCAN 2 // Scancode Make/Break (PC-like) -typedef struct +struct fm7_encoder_t { UINT8 buffer[12]; UINT8 tx_count; @@ -40,18 +40,18 @@ typedef struct UINT8 latch; // 0=ready to receive UINT8 ack; UINT8 position; -} fm7_encoder_t; +}; -typedef struct +struct fm7_mmr_t { UINT8 bank_addr[8][16]; UINT8 segment; UINT8 window_offset; UINT8 enabled; UINT8 mode; -} fm7_mmr_t; +}; -typedef struct +struct fm7_video_t { UINT8 sub_busy; UINT8 sub_halt; @@ -75,9 +75,9 @@ typedef struct UINT8 active_video_page; UINT8 display_video_page; UINT8 vsync_flag; -} fm7_video_t; +}; -typedef struct +struct fm7_alu_t { UINT8 command; UINT8 lcolour; @@ -95,7 +95,7 @@ typedef struct UINT16 y0; UINT16 y1; UINT8 busy; -} fm7_alu_t; +}; class fm7_state : public driver_device diff --git a/src/mess/includes/gamecom.h b/src/mess/includes/gamecom.h index 93e2bfd8ce8..a10b95567de 100644 --- a/src/mess/includes/gamecom.h +++ b/src/mess/includes/gamecom.h @@ -149,7 +149,7 @@ enum SM8521_SG1W15 = 0x7F }; -typedef struct +struct GAMECOM_DMA { int enabled; int transfer_mode; @@ -180,17 +180,17 @@ typedef struct unsigned int dest_current; unsigned int dest_line; unsigned int dest_mask; -} GAMECOM_DMA; +}; -typedef struct +struct GAMECOM_TIMER { int enabled; int state_count; int state_limit; int check_value; -} GAMECOM_TIMER; +}; -typedef struct +struct gamecom_sound_t { UINT8 sgc; UINT8 sg0l; @@ -202,7 +202,7 @@ typedef struct UINT8 sgda; UINT8 sg0w[16]; UINT8 sg1w[16]; -} gamecom_sound_t; +}; class gamecom_state : public driver_device diff --git a/src/mess/includes/gamepock.h b/src/mess/includes/gamepock.h index 5188a45f7ad..4130d1f7255 100644 --- a/src/mess/includes/gamepock.h +++ b/src/mess/includes/gamepock.h @@ -1,13 +1,13 @@ #ifndef _GAMEPOCK_H_ #define _GAMEPOCK_H_ -typedef struct { +struct HD44102CH { UINT8 enabled; UINT8 start_page; UINT8 address; UINT8 y_inc; UINT8 ram[256]; /* There are actually 50 x 4 x 8 bits. This just makes addressing easier. */ -} HD44102CH; +}; class gamepock_state : public driver_device { diff --git a/src/mess/includes/gb.h b/src/mess/includes/gb.h index c6829ac5e4a..f7a348a6d83 100644 --- a/src/mess/includes/gb.h +++ b/src/mess/includes/gb.h @@ -51,7 +51,7 @@ struct layer_struct { INT16 bgline; }; -typedef struct { +struct gb_lcd_t { int window_lines_drawn; UINT8 gb_vid_regs[_NR_GB_VID_REGS]; @@ -101,7 +101,7 @@ typedef struct { UINT8 *gbc_chrgen; /* CGB Character generator */ UINT8 *gbc_bgdtab; /* CGB Background character table */ UINT8 *gbc_wndtab; /* CGB Window character table */ -} gb_lcd_t; +}; diff --git a/src/mess/includes/gmaster.h b/src/mess/includes/gmaster.h index 932ebd76fab..f1d5a91d166 100644 --- a/src/mess/includes/gmaster.h +++ b/src/mess/includes/gmaster.h @@ -1,7 +1,7 @@ #ifndef __GMASTER_H__ #define __GMASTER_H__ -typedef struct +struct GMASTER_VIDEO { UINT8 data[8]; int index; @@ -9,12 +9,12 @@ typedef struct /*bool*/int mode; // true read does not increase address /*bool*/int delayed; UINT8 pixels[8][64/*>=62 sure*/]; -} GMASTER_VIDEO; +}; -typedef struct +struct GMASTER_MACHINE { UINT8 ports[5]; -} GMASTER_MACHINE; +}; class gmaster_state : public driver_device diff --git a/src/mess/includes/gp32.h b/src/mess/includes/gp32.h index a7dd86e035b..e6fbb8ff291 100644 --- a/src/mess/includes/gp32.h +++ b/src/mess/includes/gp32.h @@ -34,7 +34,7 @@ #define INT_EINT1 1 #define INT_EINT0 0 -typedef struct +struct s3c240x_lcd_t { UINT32 vramaddr_cur; UINT32 vramaddr_max; @@ -45,9 +45,9 @@ typedef struct UINT32 bswp, hwswp; UINT32 hozval, lineval; int vpos, hpos; -} s3c240x_lcd_t; +}; -typedef struct +struct smc_t { int add_latch; int chip; @@ -59,27 +59,27 @@ typedef struct int busy; UINT8 datarx; UINT8 datatx; -} smc_t; +}; -typedef struct +struct i2s_t { int l3d; int l3m; int l3c; -} i2s_t; +}; -typedef struct +struct s3c240x_iic_t { UINT8 data[4]; int data_index; UINT16 address; -} s3c240x_iic_t; +}; -typedef struct +struct s3c240x_iis_t { UINT16 fifo[16/2]; int fifo_index; -} s3c240x_iis_t; +}; class gp32_state : public driver_device diff --git a/src/mess/includes/hp48.h b/src/mess/includes/hp48.h index 3b457859d3d..9b0ea2804d2 100644 --- a/src/mess/includes/hp48.h +++ b/src/mess/includes/hp48.h @@ -20,7 +20,7 @@ typedef enum { } hp48_models; /* memory module configuration */ -typedef struct +struct hp48_module { /* static part */ UINT32 off_mask; /* offset bit-mask, indicates the real size */ @@ -36,7 +36,7 @@ typedef struct UINT32 base; /* base address */ UINT32 mask; /* often improperly called size, it is an address select mask */ -} hp48_module; +}; /* screen image averaging */ diff --git a/src/mess/includes/intv.h b/src/mess/includes/intv.h index 2641cd7c41b..1192688187c 100644 --- a/src/mess/includes/intv.h +++ b/src/mess/includes/intv.h @@ -7,7 +7,7 @@ #ifndef INTV_H_ #define INTV_H_ -typedef struct +struct intv_sprite_type { int visible; int xpos; @@ -25,7 +25,7 @@ typedef struct int color; int doubleyres; int dirty; -} intv_sprite_type; +}; class intv_state : public driver_device { diff --git a/src/mess/includes/lynx.h b/src/mess/includes/lynx.h index e43c9da8d1b..bc803c04f61 100644 --- a/src/mess/includes/lynx.h +++ b/src/mess/includes/lynx.h @@ -15,7 +15,7 @@ class lynx_state; -typedef struct +struct BLITTER { UINT8 *mem; // global @@ -52,18 +52,18 @@ typedef struct int vstretch; int lefthanded; int busy; -} BLITTER; +}; -typedef struct +struct UART { UINT8 serctl; UINT8 data_received, data_to_send, buffer; int received; int sending; int buffer_loaded; -} UART; +}; -typedef struct +struct SUZY { UINT8 data[0x100]; UINT8 high; @@ -71,16 +71,16 @@ typedef struct int signed_math; int accumulate; int accumulate_overflow; -} SUZY; +}; -typedef struct +struct MIKEY { UINT8 data[0x100]; UINT16 disp_addr; UINT8 vb_rest; -} MIKEY; +}; -typedef struct +struct LYNX_TIMER { UINT8 bakup; UINT8 cntrl1; @@ -88,7 +88,7 @@ typedef struct UINT8 counter; emu_timer *timer; int timer_active; -} LYNX_TIMER; +}; #define NR_LYNX_TIMERS 8 diff --git a/src/mess/includes/mbc55x.h b/src/mess/includes/mbc55x.h index e236c1d39e3..9b7dc32e41f 100644 --- a/src/mess/includes/mbc55x.h +++ b/src/mess/includes/mbc55x.h @@ -75,13 +75,13 @@ #define FDC_TAG "wd1793" -typedef struct +struct keyboard_t { UINT8 keyrows[MBC55X_KEYROWS]; emu_timer *keyscan_timer; UINT8 key_special; -} keyboard_t; +}; class mbc55x_state : public driver_device @@ -161,9 +161,9 @@ public: /* IO chips */ -typedef struct +struct msm_rx_t { -} msm_rx_t; +}; /*----------- defined in drivers/mbc55x.c -----------*/ diff --git a/src/mess/includes/msx_slot.h b/src/mess/includes/msx_slot.h index b8889207282..535180c4076 100644 --- a/src/mess/includes/msx_slot.h +++ b/src/mess/includes/msx_slot.h @@ -15,12 +15,12 @@ enum { MSX_LAYOUT_LAST }; -typedef struct { +struct msx_slot_layout { int entry; int type; int slot_primary, slot_secondary, slot_page, page_extent; int size, option; -} msx_slot_layout; +}; #define MSX_LAYOUT_INIT(msx) \ static const msx_slot_layout msx_slot_layout_##msx[] = { @@ -112,7 +112,7 @@ enum msx_mem_type { MSX_MEM_HANDLER }; -typedef struct { +struct slot_state { int m_type; int m_start_page; int m_bank_mask; @@ -143,9 +143,9 @@ typedef struct { int mode; } sccp; } m_cart; -} slot_state; +}; -typedef struct { +struct msx_slot { int slot_type; int mem_type; char name[32]; @@ -155,7 +155,7 @@ typedef struct { void (*write)(running_machine &machine, slot_state*, UINT16, UINT8); int (*loadsram)(running_machine &machine, slot_state*); int (*savesram)(running_machine &machine, slot_state*); -} msx_slot; +}; extern const msx_slot msx_slot_list[]; @@ -239,10 +239,10 @@ const msx_slot msx_slot_list[] = { #define MSX_SLOT_SAVESRAM(nm) \ static int slot_##nm##_savesram (running_machine &machine, slot_state *state) -typedef struct { +struct msx_driver_struct { char name[9]; const msx_slot_layout *layout; -} msx_driver_struct; +}; extern const msx_driver_struct msx_driver_list[]; diff --git a/src/mess/includes/nascom1.h b/src/mess/includes/nascom1.h index 232b5e010c2..3f6abe0ed2b 100644 --- a/src/mess/includes/nascom1.h +++ b/src/mess/includes/nascom1.h @@ -10,18 +10,18 @@ #include "imagedev/snapquik.h" #include "machine/wd17xx.h" -typedef struct +struct nascom1_portstat_t { UINT8 stat_flags; UINT8 stat_count; -} nascom1_portstat_t; +}; -typedef struct +struct nascom2_fdc_t { UINT8 select; UINT8 irq; UINT8 drq; -} nascom2_fdc_t; +}; class nascom1_state : public driver_device diff --git a/src/mess/includes/nes.h b/src/mess/includes/nes.h index 3985fb97934..5e4c271ff7a 100644 --- a/src/mess/includes/nes.h +++ b/src/mess/includes/nes.h @@ -35,12 +35,12 @@ struct nes_input #define CHRROM 0 #define CHRRAM 1 -typedef struct +struct chr_bank { int source; //defines source of base pointer int origin; //defines offset of 0x400 byte segment at base pointer UINT8* access; //source translated + origin -> valid pointer! -} chr_bank; +}; /*PPU nametable fast banking constants and structures */ @@ -53,13 +53,13 @@ typedef struct #define NES_BATTERY 0 #define NES_WRAM 1 -typedef struct +struct name_table { int source; /* defines source of base pointer */ int origin; /* defines offset of 0x400 byte segment at base pointer */ int writable; /* ExRAM, at least, can be write-protected AND used as nametable */ UINT8* access; /* direct access when possible */ -} name_table; +}; typedef void (*nes_prg_callback)(running_machine &machine, int start, int bank); typedef void (*nes_chr_callback)(running_machine &machine, int start, int bank, int source); diff --git a/src/mess/includes/odyssey2.h b/src/mess/includes/odyssey2.h index 0c385146796..2dd88787ee9 100644 --- a/src/mess/includes/odyssey2.h +++ b/src/mess/includes/odyssey2.h @@ -54,7 +54,7 @@ typedef union { } s; } o2_vdc_t; -typedef struct +struct ef9341_t { UINT8 X; UINT8 Y; @@ -65,7 +65,7 @@ typedef struct UINT8 TB; UINT8 busy; UINT8 ram[1024]; -} ef9341_t; +}; class odyssey2_state : public driver_device diff --git a/src/mess/includes/oric.h b/src/mess/includes/oric.h index b6da858749a..3646d382459 100644 --- a/src/mess/includes/oric.h +++ b/src/mess/includes/oric.h @@ -30,17 +30,17 @@ enum TELESTRAT_MEM_BLOCK_ROM }; -typedef struct +struct telestrat_mem_block { int MemType; unsigned char *ptr; -} telestrat_mem_block; +}; /* current state of the display */ /* some attributes persist until they are turned off. This structure holds this persistant information */ -typedef struct +struct oric_vh_state { /* foreground and background colour used for rendering */ /* if flash attribute is set, these two will both be equal to background colour */ @@ -63,7 +63,7 @@ typedef struct /* if (1<<3), display graphics, if 0, hide graphics */ /* current count */ UINT8 flash_count; -} oric_vh_state; +}; class oric_state : public driver_device diff --git a/src/mess/includes/pce.h b/src/mess/includes/pce.h index ea2b9f8c247..9df0e86b795 100644 --- a/src/mess/includes/pce.h +++ b/src/mess/includes/pce.h @@ -31,7 +31,7 @@ /* the largest possible cartridge image (street fighter 2 - 2.5MB) */ #define PCE_ROM_MAXSIZE 0x280000 -typedef struct +struct pce_cd_t { UINT8 regs[16]; UINT8 *bram; @@ -101,7 +101,7 @@ typedef struct emu_timer *adpcm_fadeout_timer; emu_timer *adpcm_fadein_timer; double adpcm_volume; -} pce_cd_t; +}; class pce_state : public driver_device diff --git a/src/mess/includes/pet.h b/src/mess/includes/pet.h index 1b12111aaac..0c1d3b2d2fa 100644 --- a/src/mess/includes/pet.h +++ b/src/mess/includes/pet.h @@ -13,11 +13,11 @@ #include "machine/ieee488.h" #include "imagedev/cartslot.h" -typedef struct +struct spet_t { int bank; /* rambank to be switched in 0x9000 */ int rom; /* rom socket 6502? at 0x9000 */ -} spet_t; +}; class pet_state : public driver_device diff --git a/src/mess/includes/pokemini.h b/src/mess/includes/pokemini.h index 351b88df110..0e549d2a3c2 100644 --- a/src/mess/includes/pokemini.h +++ b/src/mess/includes/pokemini.h @@ -14,7 +14,7 @@ #include "rendlay.h" -typedef struct +struct PRC { UINT8 colors_inverted; UINT8 background_enabled; @@ -28,10 +28,10 @@ typedef struct UINT32 spr_tiles; UINT8 count; emu_timer *count_timer; -} PRC; +}; -typedef struct +struct TIMERS { emu_timer *seconds_timer; emu_timer *hz256_timer; @@ -41,7 +41,7 @@ typedef struct emu_timer *timer2_hi; /* Timer 2 high */ emu_timer *timer3; /* Timer 3 low or 16bit */ emu_timer *timer3_hi; /* Timer 3 high */ -} TIMERS; +}; class pokemini_state : public driver_device diff --git a/src/mess/includes/rmnimbus.h b/src/mess/includes/rmnimbus.h index 30351f2435f..7d25dbfeacc 100644 --- a/src/mess/includes/rmnimbus.h +++ b/src/mess/includes/rmnimbus.h @@ -26,16 +26,16 @@ /* Nimbus sub-bios structures for debugging */ -typedef struct +struct t_area_params { UINT16 ofs_brush; UINT16 seg_brush; UINT16 ofs_data; UINT16 seg_data; UINT16 count; -} t_area_params; +}; -typedef struct +struct t_plot_string_params { UINT16 ofs_font; UINT16 seg_font; @@ -44,9 +44,9 @@ typedef struct UINT16 x; UINT16 y; UINT16 length; -} t_plot_string_params; +}; -typedef struct +struct t_nimbus_brush { UINT16 style; UINT16 style_index; @@ -56,7 +56,7 @@ typedef struct UINT16 boundary_spec; UINT16 boundary_colour; UINT16 save_colour; -} t_nimbus_brush; +}; #define SCREEN_WIDTH_PIXELS 640 #define SCREEN_HEIGHT_LINES 250 @@ -110,25 +110,25 @@ struct intr_state UINT16 ext_vector[2]; // external vectors, when in cascade mode }; -typedef struct +struct i186_state { struct timer_state timer[3]; struct dma_state dma[2]; struct intr_state intr; struct mem_state mem; -} i186_state; +}; -typedef struct +struct keyboard_t { UINT8 keyrows[NIMBUS_KEYROWS]; emu_timer *keyscan_timer; UINT8 queue[KEYBOARD_QUEUE_SIZE]; UINT8 head; UINT8 tail; -} keyboard_t; +}; // Static data related to Floppy and SCSI hard disks -typedef struct +struct nimbus_drives_t { UINT8 reg400; UINT8 reg410_in; @@ -137,10 +137,10 @@ typedef struct UINT8 drq_ff; UINT8 int_ff; -} nimbus_drives_t; +}; /* 8031 Peripheral controler */ -typedef struct +struct ipc_interface_t { UINT8 ipc_in; UINT8 ipc_out; @@ -149,10 +149,10 @@ typedef struct UINT8 int_8c_pending; UINT8 int_8e_pending; UINT8 int_8f_pending; -} ipc_interface_t; +}; /* Mouse/Joystick */ -typedef struct +struct _mouse_joy_state { UINT8 m_mouse_px; UINT8 m_mouse_py; @@ -169,7 +169,7 @@ typedef struct UINT8 m_reg0a4; emu_timer *m_mouse_timer; -} _mouse_joy_state; +}; class rmnimbus_state : public driver_device diff --git a/src/mess/includes/sorcerer.h b/src/mess/includes/sorcerer.h index 6f46bddb0ea..b45501a4aae 100644 --- a/src/mess/includes/sorcerer.h +++ b/src/mess/includes/sorcerer.h @@ -23,7 +23,7 @@ #define SORCERER_USING_RS232 0 -typedef struct { +struct cass_data_t { struct { int length; /* time cassette level is at input.level */ int level; /* cassette level */ @@ -34,7 +34,7 @@ typedef struct { int level; /* cassette level */ int bit; /* bit to to output */ } output; -} cass_data_t; +}; class sorcerer_state : public driver_device diff --git a/src/mess/includes/spectrum.h b/src/mess/includes/spectrum.h index abe808ee4de..5aa120b689b 100644 --- a/src/mess/includes/spectrum.h +++ b/src/mess/includes/spectrum.h @@ -51,7 +51,7 @@ #define TS2068_RIGHT_BORDER 96 /* Number of right hand border pixels */ #define TS2068_SCREEN_WIDTH (TS2068_LEFT_BORDER + TS2068_DISPLAY_XSIZE + TS2068_RIGHT_BORDER) -typedef struct +struct EVENT_LIST_ITEM { /* driver defined ID for this write */ int Event_ID; @@ -59,7 +59,7 @@ typedef struct int Event_Data; /* time at which this write occurred */ int Event_Time; -} EVENT_LIST_ITEM; +}; class spectrum_state : public driver_device diff --git a/src/mess/includes/ssystem3.h b/src/mess/includes/ssystem3.h index c10854ad723..9cf33903358 100644 --- a/src/mess/includes/ssystem3.h +++ b/src/mess/includes/ssystem3.h @@ -8,7 +8,7 @@ #define SSYSTEM3_H_ -typedef struct +struct playfield_t { int signal; // int on; @@ -24,14 +24,14 @@ typedef struct } s; UINT8 data[7+8*8/2+5]; } u; -} playfield_t; +}; -typedef struct +struct lcd_t { UINT8 data[5]; int clock; int count; -} lcd_t; +}; class ssystem3_state : public driver_device diff --git a/src/mess/includes/svi318.h b/src/mess/includes/svi318.h index 5a02887c2aa..9689851b8df 100644 --- a/src/mess/includes/svi318.h +++ b/src/mess/includes/svi318.h @@ -13,7 +13,7 @@ #include "machine/ins8250.h" #include "machine/wd17xx.h" -typedef struct +struct SVI_318 { /* general */ UINT8 svi318; /* Are we dealing with an SVI-318 or a SVI-328 model. 0 = 328, 1 = 318 */ @@ -35,15 +35,15 @@ typedef struct UINT8 svi806_ram_enabled; memory_region *svi806_ram; UINT8 *svi806_gfx; -} SVI_318; +}; -typedef struct +struct SVI318_FDC_STRUCT { UINT8 driveselect; int drq; int irq; UINT8 heads[2]; -} SVI318_FDC_STRUCT; +}; class svi318_state : public driver_device diff --git a/src/mess/includes/svision.h b/src/mess/includes/svision.h index 6a908abd9a9..68defb725d7 100644 --- a/src/mess/includes/svision.h +++ b/src/mess/includes/svision.h @@ -7,25 +7,25 @@ #ifndef SVISION_H_ #define SVISION_H_ -typedef struct +struct svision_t { emu_timer *timer1; int timer_shot; -} svision_t; +}; -typedef struct +struct svision_pet_t { int state; int on, clock, data; UINT8 input; emu_timer *timer; -} svision_pet_t; +}; -typedef struct +struct tvlink_t { UINT32 palette[4/*0x40?*/]; /* rgb8 */ int palette_on; -} tvlink_t; +}; class svision_state : public driver_device diff --git a/src/mess/includes/vc4000.h b/src/mess/includes/vc4000.h index 09a65132e2d..391124593eb 100644 --- a/src/mess/includes/vc4000.h +++ b/src/mess/includes/vc4000.h @@ -19,12 +19,12 @@ #define ANALOG_HACK -typedef struct +struct SPRITE_HELPER { UINT8 bitmap[10],x1,x2,y1,y2, res1, res2; -} SPRITE_HELPER; +}; -typedef struct +struct SPRITE { const SPRITE_HELPER *data; int mask; @@ -35,9 +35,9 @@ typedef struct UINT8 scolor; int finished; int finished_now; -} SPRITE; +}; -typedef struct +struct vc4000_video_t { SPRITE sprites[4]; int line; @@ -66,7 +66,7 @@ typedef struct UINT8 sprite_collision; } d; } reg; -} vc4000_video_t; +} ; class vc4000_state : public driver_device { diff --git a/src/mess/includes/wswan.h b/src/mess/includes/wswan.h index 1f5a8786d88..cea55dc27cb 100644 --- a/src/mess/includes/wswan.h +++ b/src/mess/includes/wswan.h @@ -40,7 +40,7 @@ #include "machine/nvram.h" -typedef struct +struct EEPROM { UINT8 mode; /* eeprom mode */ UINT16 address; /* Read/write address */ @@ -50,9 +50,9 @@ typedef struct int size; /* size of eeprom/sram area */ UINT8 *data; /* pointer to start of sram/eeprom data */ UINT8 *page; /* pointer to current sram/eeprom page */ -} EEPROM; +}; -typedef struct +struct RTC { UINT8 present; /* Is an RTC present */ UINT8 setting; /* Timer setting byte */ @@ -64,16 +64,16 @@ typedef struct UINT8 minute; /* Minute */ UINT8 second; /* Second */ UINT8 index; /* index for reading/writing of current of alarm time */ -} RTC; +}; -typedef struct +struct SoundDMA { UINT32 source; /* Source address */ UINT16 size; /* Size */ UINT8 enable; /* Enabled */ -} SoundDMA; +}; -typedef struct +struct VDP { UINT8 layer_bg_enable; /* Background layer on/off */ UINT8 layer_fg_enable; /* Foreground layer on/off */ @@ -117,7 +117,7 @@ typedef struct UINT8 *palette_vram; /* pointer to start of palette area in ram/vram (set by MACHINE_RESET), WSC only */ int main_palette[8]; emu_timer *timer; -} VDP; +}; class wswan_state : public driver_device { diff --git a/src/mess/includes/x07.h b/src/mess/includes/x07.h index 0879825cd7a..99f63fbcbfd 100644 --- a/src/mess/includes/x07.h +++ b/src/mess/includes/x07.h @@ -86,12 +86,12 @@ static const UINT8 t6834_cmd_len[0x47] = 0x01, 0x09, 0x01, 0x03, 0x03, 0x01, 0x01 }; -typedef struct +struct x07_kb { const char *tag; //input port tag UINT8 mask; //bit mask UINT8 codes[7]; //port codes -} x07_kb; +}; static const x07_kb x07_keycodes[56] = { diff --git a/src/mess/includes/x1.h b/src/mess/includes/x1.h index dd50c71c1c7..cbf251285cf 100644 --- a/src/mess/includes/x1.h +++ b/src/mess/includes/x1.h @@ -44,7 +44,7 @@ private: virtual void z80daisy_irq_reti(); }; -typedef struct +struct scrn_reg_t { UINT8 gfx_bank; UINT8 disp_bank; @@ -54,20 +54,20 @@ typedef struct UINT8 pri; UINT8 blackclip; // x1 turbo specific -} scrn_reg_t; +}; -typedef struct +struct turbo_reg_t { UINT8 pal; UINT8 gfx_pal; UINT8 txt_pal[8]; UINT8 txt_disp; -} turbo_reg_t; +}; -typedef struct +struct x1_rtc_t { UINT8 sec, min, hour, day, wday, month, year; -} x1_rtc_t; +}; class x1_state : public driver_device diff --git a/src/mess/includes/z80ne.h b/src/mess/includes/z80ne.h index da2bb0bd011..1b7ddaa44d2 100644 --- a/src/mess/includes/z80ne.h +++ b/src/mess/includes/z80ne.h @@ -33,7 +33,7 @@ typedef enum TAPE_1200BPS = 1200 /* 1200 bps */ } z80netape_speed; -typedef struct { +struct cass_data_t { struct { int length; /* time cassette level is at input.level */ int level; /* cassette level */ @@ -49,14 +49,14 @@ typedef struct { int wave_length; int wave_short; int wave_long; -} cass_data_t; +}; -typedef struct { +struct wd17xx_state_t { int drq; int intrq; UINT8 drive; /* current drive */ UINT8 head; /* current head */ -} wd17xx_state_t; +}; class z80ne_state : public driver_device diff --git a/src/mess/machine/3c505.h b/src/mess/machine/3c505.h index fa1f4781f46..3d764181149 100644 --- a/src/mess/machine/3c505.h +++ b/src/mess/machine/3c505.h @@ -126,7 +126,7 @@ struct Memdump between the host and the adapter is done with these. (Except for the actual Ethernet data, which has different packaging.) */ -typedef struct +struct pcb_struct { UINT8 command; UINT8 length; @@ -147,7 +147,7 @@ typedef struct struct Memdump memdump; UINT8 raw[62]; } data; -} pcb_struct; +}; // ======================> threecom3c505_device diff --git a/src/mess/machine/amigacd.c b/src/mess/machine/amigacd.c index a0aba92fb52..802ea4390e0 100644 --- a/src/mess/machine/amigacd.c +++ b/src/mess/machine/amigacd.c @@ -59,7 +59,7 @@ DMAC controller. #define ISTR_FF_FLG (1<<1) /* FIFO-Full Flag */ #define ISTR_FE_FLG (1<<0) /* FIFO-Empty Flag */ -typedef struct +struct _dmac_data { UINT16 istr; /* Interrupt Status Register (R) */ UINT16 cntr; /* Control Register (RW) */ @@ -67,7 +67,7 @@ typedef struct UINT32 acr; /* Address Count Register (RW) */ UINT16 dawr; /* DACK Width Register (W) */ emu_timer *dma_timer; -} _dmac_data; +}; static _dmac_data dmac_data; diff --git a/src/mess/machine/amigacrt.c b/src/mess/machine/amigacrt.c index 84de5897c9a..258c5f029b1 100644 --- a/src/mess/machine/amigacrt.c +++ b/src/mess/machine/amigacrt.c @@ -24,12 +24,12 @@ enum ACTION_REPLAY_MKIII }; -typedef struct +struct amigacrt_t { int cart_type; int ar1_spurious; UINT16 ar23_mode; -} amigacrt_t; +}; static amigacrt_t amigacrt; /*************************************************************************** diff --git a/src/mess/machine/amigakbd.c b/src/mess/machine/amigakbd.c index 15044cf7106..9ff1fd6718b 100644 --- a/src/mess/machine/amigakbd.c +++ b/src/mess/machine/amigakbd.c @@ -13,13 +13,13 @@ #define KEYBOARD_BUFFER_SIZE 256 -typedef struct +struct amigakbd_t { UINT8 *buf; int buf_pos; int cur_pos; emu_timer *timer; -} amigakbd_t; +}; static amigakbd_t kbd; static void kbd_sendscancode( running_machine &machine, UINT8 scancode ) diff --git a/src/mess/machine/apollo_net.c b/src/mess/machine/apollo_net.c index ad3d068c2df..a16c3b8771f 100644 --- a/src/mess/machine/apollo_net.c +++ b/src/mess/machine/apollo_net.c @@ -21,13 +21,13 @@ #include "includes/apollo.h" #include "machine/3c505.h" -typedef struct { +struct ethernet_header { UINT8 dest[6]; UINT8 source[6]; UINT16 proto; -} ethernet_header; +}; -typedef struct +struct ip_header { UINT8 version; UINT8 tos; @@ -39,7 +39,7 @@ typedef struct UINT16 check; UINT32 saddr; UINT32 daddr; -} ip_header; +}; #define ETHERNET_HEADER_SIZE sizeof(ethernet_header) diff --git a/src/mess/machine/at45dbxx.c b/src/mess/machine/at45dbxx.c index a81ac23df94..b97d0468e55 100644 --- a/src/mess/machine/at45dbxx.c +++ b/src/mess/machine/at45dbxx.c @@ -36,7 +36,7 @@ enum TYPE DEFINITIONS ***************************************************************************/ -typedef struct +struct AT45DBXX_PINS { int cs; // chip select int sck; // serial clock @@ -45,18 +45,18 @@ typedef struct int wp; // write protect int reset; // reset int busy; // busy -} AT45DBXX_PINS; +}; -typedef struct +struct AT45DBXX_CMD { UINT8 data[8], size; -} AT45DBXX_CMD; +}; -typedef struct +struct AT45DBXX_IO { UINT8 *data; UINT32 size, pos; -} AT45DBXX_IO; +}; struct at45dbxx_t { diff --git a/src/mess/machine/corvushd.c b/src/mess/machine/corvushd.c index 8d963348067..51168e85fc1 100644 --- a/src/mess/machine/corvushd.c +++ b/src/mess/machine/corvushd.c @@ -89,14 +89,14 @@ // // Sector addressing scheme for Rev B/H drives used in various commands (Called a DADR in the docs) -typedef struct { +struct dadr_t { UINT8 address_msn_and_drive;// Most significant nibble: Most signficant nibble of sector address, Least significant nibble: Drive # UINT8 address_lsb; // Least significant byte of sector address UINT8 address_mid; // Middle byte of sector address -} dadr_t; +}; // Controller structure -typedef struct { +struct corvus_hdc_t { UINT8 status; // Controller status byte (DIRECTION + BUSY/READY) char prep_mode; // Whether the controller is in Prep Mode or not // Physical drive info @@ -317,7 +317,7 @@ typedef struct { UINT8 pattern[512]; // Pattern to be written } format_drive_revbh_command; } buffer; -} corvus_hdc_t; +}; // Structure of Block #1, the Disk Parameter Block typedef struct { @@ -340,7 +340,7 @@ typedef struct { } disk_parameter_block_t; // Structure of Block #3, the Constellation Parameter Block -typedef struct { +struct constellation_parameter_block_t { UINT8 mux_parameters[12]; UINT8 pipe_name_table_ptr[2]; UINT8 pipe_ptr_table_ptr[2]; @@ -348,7 +348,7 @@ typedef struct { UINT8 reserved[470]; UINT8 software_protection[12]; UINT8 serial_number[12]; -} constellation_parameter_block_t; +}; // Structure of Block #7, the Semaphore Table Block typedef struct { @@ -362,10 +362,10 @@ typedef struct { } semaphore_table_block_t; // Command size structure (number of bytes to xmit and recv for each command) -typedef struct { +struct corvus_cmd_t { UINT16 recv_bytes; // Number of bytes from host for this command UINT16 xmit_bytes; // Number of bytes to return to host -} corvus_cmd_t; +}; // // Prototypes diff --git a/src/mess/machine/mboard.h b/src/mess/machine/mboard.h index 4aab4790f84..f3d4dd4b5f5 100644 --- a/src/mess/machine/mboard.h +++ b/src/mess/machine/mboard.h @@ -42,11 +42,11 @@ enum TYPE DEFINITIONS ***************************************************************************/ -typedef struct { +struct MOUSE_HOLD { int border_piece; UINT8 from; UINT8 piece; -} MOUSE_HOLD; +}; /*************************************************************************** FUNCTION PROTOTYPES diff --git a/src/mess/machine/mc68328.h b/src/mess/machine/mc68328.h index 86163504517..4d004b7343b 100644 --- a/src/mess/machine/mc68328.h +++ b/src/mess/machine/mc68328.h @@ -10,7 +10,7 @@ #ifndef __MC68328_PRIVATE_H_ #define __MC68328_PRIVATE_H_ -typedef struct +struct mc68328_regs_t { // $(FF)FFF000 UINT8 scr; // System Control Register @@ -201,9 +201,9 @@ typedef struct UINT16 rtcienr; // RTC Interrupt Enable Register UINT16 stpwtch; // Stopwatch Minutes UINT8 unused42[1260]; -} mc68328_regs_t; +}; -typedef struct +struct mc68328_t { const mc68328_interface* iface; @@ -212,7 +212,7 @@ typedef struct emu_timer *gptimer[2]; emu_timer *rtc; emu_timer *pwm; -} mc68328_t; +}; #define SCR_BETO 0x80 #define SCR_WPV 0x40 diff --git a/src/mess/machine/mc6843.c b/src/mess/machine/mc6843.c index c7914ae8cdf..08ea6f6afed 100644 --- a/src/mess/machine/mc6843.c +++ b/src/mess/machine/mc6843.c @@ -42,7 +42,7 @@ /******************* internal chip data structure ******************/ -typedef struct +struct mc6843_t { /* interface */ @@ -72,7 +72,7 @@ typedef struct /* trigger delayed actions (bottom halves) */ emu_timer* timer_cont; -} mc6843_t; +}; diff --git a/src/mess/machine/mc6846.c b/src/mess/machine/mc6846.c index 48bfb93692d..23c9c712ec3 100644 --- a/src/mess/machine/mc6846.c +++ b/src/mess/machine/mc6846.c @@ -28,7 +28,7 @@ /******************* internal chip data structure ******************/ -typedef struct +struct mc6846_t { const mc6846_interface* iface; @@ -61,7 +61,7 @@ typedef struct int old_cif; int old_cto; -} mc6846_t; +}; diff --git a/src/mess/machine/mc6854.c b/src/mess/machine/mc6854.c index 3cee6d399f0..d2d10a5e710 100644 --- a/src/mess/machine/mc6854.c +++ b/src/mess/machine/mc6854.c @@ -57,7 +57,7 @@ /******************* internal chip data structure ******************/ -typedef struct +struct mc6854_t { devcb_resolved_write_line out_irq_func; devcb_resolved_read_line in_rxd_func; @@ -91,7 +91,7 @@ typedef struct UINT8 frame[MAX_FRAME_LENGTH]; UINT32 flen, fpos; -} mc6854_t; +}; /* meaning of tstate / rtate: 0 = idle / waiting for frame flag diff --git a/src/mess/machine/rmnimbus.c b/src/mess/machine/rmnimbus.c index 0599dfbb7c1..f1cac74b308 100644 --- a/src/mess/machine/rmnimbus.c +++ b/src/mess/machine/rmnimbus.c @@ -1970,11 +1970,11 @@ static const struct nimbus_meminfo memmap[] = { 0xE0000, 0xEFFFF } }; -typedef struct +struct nimbus_block { int blockbase; int blocksize; -} nimbus_block; +}; typedef nimbus_block nimbus_blocks[3]; diff --git a/src/mess/machine/s3c44b0.h b/src/mess/machine/s3c44b0.h index b0864be4079..98b741f5c3c 100644 --- a/src/mess/machine/s3c44b0.h +++ b/src/mess/machine/s3c44b0.h @@ -373,12 +373,12 @@ void s3c44b0_request_eint( device_t *device, UINT32 number); TYPE DEFINITIONS *******************************************************************************/ -typedef struct +struct s3c44b0_memcon_regs_t { UINT32 data[0x34/4]; -} s3c44b0_memcon_regs_t; +}; -typedef struct +struct s3c44b0_irq_regs_t { UINT32 intcon; UINT32 intpnd; @@ -393,9 +393,9 @@ typedef struct UINT32 reserved[4]; UINT32 f_ispr; UINT32 f_ispc; -} s3c44b0_irq_regs_t; +}; -typedef struct +struct s3c44b0_dma_regs_t { UINT32 dcon; UINT32 disrc; @@ -404,17 +404,17 @@ typedef struct UINT32 dcsrc; UINT32 dcdst; UINT32 dccnt; -} s3c44b0_dma_regs_t; +}; -typedef struct +struct s3c44b0_clkpow_regs_t { UINT32 pllcon; UINT32 clkcon; UINT32 clkslow; UINT32 locktime; -} s3c44b0_clkpow_regs_t; +}; -typedef struct +struct s3c44b0_lcd_regs_t { UINT32 lcdcon1; UINT32 lcdcon2; @@ -427,9 +427,9 @@ typedef struct UINT32 reserved[8]; UINT32 lcdcon3; UINT32 dithmode; -} s3c44b0_lcd_regs_t; +}; -typedef struct +struct s3c44b0_uart_regs_t { UINT32 ulcon; UINT32 ucon; @@ -442,18 +442,18 @@ typedef struct UINT32 utxh; UINT32 urxh; UINT32 ubrdiv; -} s3c44b0_uart_regs_t; +}; -typedef struct +struct s3c44b0_sio_regs_t { UINT32 siocon; UINT32 siodat; UINT32 sbrdr; UINT32 itvcnt; UINT32 dcntz; -} s3c44b0_sio_regs_t; +}; -typedef struct +struct s3c44b0_pwm_regs_t { UINT32 tcfg0; UINT32 tcfg1; @@ -475,33 +475,33 @@ typedef struct UINT32 tcnto4; UINT32 tcntb5; UINT32 tcnto5; -} s3c44b0_pwm_regs_t; +}; -typedef struct +struct s3c44b0_wdt_regs_t { UINT32 wtcon; UINT32 wtdat; UINT32 wtcnt; -} s3c44b0_wdt_regs_t; +}; -typedef struct +struct s3c44b0_iic_regs_t { UINT32 iiccon; UINT32 iicstat; UINT32 iicadd; UINT32 iicds; -} s3c44b0_iic_regs_t; +}; -typedef struct +struct s3c44b0_iis_regs_t { UINT32 iiscon; UINT32 iismod; UINT32 iispsr; UINT32 iisfcon; UINT32 iisfifo; -} s3c44b0_iis_regs_t; +}; -typedef struct +struct s3c44b0_gpio_regs_t { UINT32 gpacon; UINT32 gpadat; @@ -525,9 +525,9 @@ typedef struct UINT32 spucr; UINT32 extint; UINT32 extintpnd; -} s3c44b0_gpio_regs_t; +}; -typedef struct +struct s3c44b0_rtc_regs_t { UINT32 rtccon; UINT32 reserved[3]; @@ -547,50 +547,50 @@ typedef struct UINT32 bcdmon; UINT32 bcdyear; UINT32 ticnt; -} s3c44b0_rtc_regs_t; +}; -typedef struct +struct s3c44b0_adc_regs_t { UINT32 adccon; UINT32 adcpsr; UINT32 adcdat; -} s3c44b0_adc_regs_t; +}; -typedef struct +struct s3c44b0_cpuwrap_regs_t { UINT32 syscfg; UINT32 ncachbe0; UINT32 ncachbe1; -} s3c44b0_cpuwrap_regs_t; +}; -typedef struct +struct s3c44b0_memcon_t { s3c44b0_memcon_regs_t regs; -} s3c44b0_memcon_t; +}; -typedef struct +struct s3c44b0_irq_t { s3c44b0_irq_regs_t regs; int line_irq, line_fiq; -} s3c44b0_irq_t; +}; -typedef struct +struct s3c44b0_dma_t { s3c44b0_dma_regs_t regs; emu_timer *timer; -} s3c44b0_dma_t; +}; -typedef struct +struct s3c44b0_clkpow_t { s3c44b0_clkpow_regs_t regs; -} s3c44b0_clkpow_t; +}; -typedef struct +struct rectangle_t { int x1, y1, x2, y2; -} rectangle_t; +}; -typedef struct +struct s3c44b0_lcd_t { s3c44b0_lcd_regs_t regs; emu_timer *timer; @@ -607,74 +607,74 @@ typedef struct UINT32 hpos_min, hpos_max, hpos_end, vpos_min, vpos_max, vpos_end; attotime frame_time; attoseconds_t frame_period, pixeltime, scantime; -} s3c44b0_lcd_t; +}; -typedef struct +struct s3c44b0_uart_t { s3c44b0_uart_regs_t regs; emu_timer *timer; -} s3c44b0_uart_t; +}; -typedef struct +struct s3c44b0_sio_t { s3c44b0_sio_regs_t regs; emu_timer *timer; -} s3c44b0_sio_t; +}; -typedef struct +struct s3c44b0_pwm_t { s3c44b0_pwm_regs_t regs; emu_timer *timer[6]; UINT32 cnt[6]; UINT32 cmp[6]; UINT32 freq[6]; -} s3c44b0_pwm_t; +}; -typedef struct +struct s3c44b0_wdt_t { s3c44b0_wdt_regs_t regs; emu_timer *timer; -} s3c44b0_wdt_t; +}; -typedef struct +struct s3c44b0_iic_t { s3c44b0_iic_regs_t regs; emu_timer *timer; int count; -} s3c44b0_iic_t; +}; -typedef struct +struct s3c44b0_iis_t { s3c44b0_iis_regs_t regs; emu_timer *timer; UINT16 fifo[16/2]; int fifo_index; -} s3c44b0_iis_t; +}; -typedef struct +struct s3c44b0_gpio_t { s3c44b0_gpio_regs_t regs; -} s3c44b0_gpio_t; +}; -typedef struct +struct s3c44b0_rtc_t { s3c44b0_rtc_regs_t regs; emu_timer *timer_tick_count; emu_timer *timer_update; -} s3c44b0_rtc_t; +}; -typedef struct +struct s3c44b0_adc_t { s3c44b0_adc_regs_t regs; emu_timer *timer; -} s3c44b0_adc_t; +}; -typedef struct +struct s3c44b0_cpuwrap_t { s3c44b0_cpuwrap_regs_t regs; -} s3c44b0_cpuwrap_t; +}; -typedef struct +struct s3c44b0_t { const s3c44b0_interface *iface; address_space* space; @@ -695,6 +695,6 @@ typedef struct s3c44b0_rtc_t rtc; s3c44b0_adc_t adc; s3c44b0_cpuwrap_t cpuwrap; -} s3c44b0_t; +}; #endif diff --git a/src/mess/machine/sgi.c b/src/mess/machine/sgi.c index 7c1d532e04e..1b446969662 100644 --- a/src/mess/machine/sgi.c +++ b/src/mess/machine/sgi.c @@ -24,7 +24,7 @@ INLINE void ATTR_PRINTF(3,4) verboselog( running_machine &machine, int n_level, } } -typedef struct +struct MC_t { emu_timer *tUpdateTimer; UINT32 nCPUControl0; @@ -68,7 +68,7 @@ typedef struct UINT32 nDMAMode; UINT32 nDMAZoomByteCnt; UINT32 nDMARunning; -} MC_t; +}; static MC_t *pMC; READ32_HANDLER( sgi_mc_r ) diff --git a/src/mess/machine/strata.c b/src/mess/machine/strata.c index 6fa6dd99f4c..b0f190c8a2e 100644 --- a/src/mess/machine/strata.c +++ b/src/mess/machine/strata.c @@ -44,7 +44,7 @@ enum fm_mode_t FM_CONFPART1, // first half of configuration, awaiting second FM_WRPROTPART1 // first half of protection program, awaiting second }; -typedef struct +struct strata_t { fm_mode_t mode; // current operation mode int hard_unlock; // 1 if RP* pin is at Vhh (not fully implemented) @@ -57,7 +57,7 @@ typedef struct UINT8 *data_ptr; // main FEEPROM area UINT8 *blocklock; // block lock flags UINT8 *prot_regs; // protection registers -} strata_t; +}; /* accessors for individual block lock flags */ #define READ_BLOCKLOCK(strata, block) (((strata)->blocklock[(block) >> 3] >> ((block) & 7)) & 1) diff --git a/src/mess/tools/imgtool/library.h b/src/mess/tools/imgtool/library.h index 6f8df279ea7..6efec70b578 100644 --- a/src/mess/tools/imgtool/library.h +++ b/src/mess/tools/imgtool/library.h @@ -57,7 +57,7 @@ typedef enum ITLS_DESCRIPTION } imgtool_libsort_t; -typedef struct +struct imgtool_dirent { char filename[1024]; char attr[64]; @@ -75,13 +75,13 @@ typedef struct unsigned int corrupt : 1; unsigned int directory : 1; unsigned int hardlink : 1; -} imgtool_dirent; +}; -typedef struct +struct imgtool_chainent { UINT8 level; UINT64 block; -} imgtool_chainent; +}; typedef enum { @@ -91,20 +91,20 @@ typedef enum FORK_ALTERNATE } imgtool_forktype_t; -typedef struct +struct imgtool_forkent { imgtool_forktype_t type; UINT64 size; char forkname[64]; -} imgtool_forkent; +}; -typedef struct +struct imgtool_transfer_suggestion { imgtool_suggestion_viability_t viability; filter_getinfoproc filter; const char *fork; const char *description; -} imgtool_transfer_suggestion; +}; enum { @@ -140,13 +140,13 @@ typedef union time_t t; } imgtool_attribute; -typedef struct +struct imgtool_iconinfo { unsigned icon16x16_specified : 1; unsigned icon32x32_specified : 1; UINT32 icon16x16[16][16]; UINT32 icon32x32[32][32]; -} imgtool_iconinfo; +}; enum { diff --git a/src/mess/tools/imgtool/modules/thomson.c b/src/mess/tools/imgtool/modules/thomson.c index 58491c43ce8..04ad20003af 100644 --- a/src/mess/tools/imgtool/modules/thomson.c +++ b/src/mess/tools/imgtool/modules/thomson.c @@ -118,7 +118,7 @@ #define MAXSIZE 80*16*256*2 /* room for two faces, double-density, 80 tracks */ -typedef struct { +struct thom_floppy { imgtool_stream *stream; @@ -130,7 +130,7 @@ typedef struct { int modified; /* data need to be copied back to image file */ -} thom_floppy; +}; typedef enum { @@ -143,7 +143,7 @@ typedef enum { } thom_dirent_type; -typedef struct { +struct thom_dirent { thom_dirent_type type; int index; @@ -159,7 +159,7 @@ typedef struct { UINT8 month; UINT8 year; -} thom_dirent; +}; static void thom_basic_get_info(const imgtool_class *clas, UINT32 param, diff --git a/src/mess/video/733_asr.c b/src/mess/video/733_asr.c index c6420f81c80..0771b4ba5b3 100644 --- a/src/mess/video/733_asr.c +++ b/src/mess/video/733_asr.c @@ -34,7 +34,7 @@ enum asr_scroll_step = 8 }; -typedef struct +struct asr_t { #if 0 UINT8 OutQueue[ASROutQueueSize]; @@ -58,7 +58,7 @@ typedef struct void (*int_callback)(running_machine &, int state); bitmap_ind16 *bitmap; -} asr_t; +}; enum { diff --git a/src/mess/video/crt.c b/src/mess/video/crt.c index 617a46cedeb..ca3f34b8cf4 100644 --- a/src/mess/video/crt.c +++ b/src/mess/video/crt.c @@ -32,19 +32,19 @@ Theory of operation: #include "video/crt.h" -typedef struct +struct point { int intensity; /* current intensity of the pixel */ /* a node is not in the list when (intensity == -1) */ int next; /* index of next pixel in list */ -} point; +}; enum { intensity_pixel_not_in_list = -1 /* special value that tells that the node is not in list */ }; -typedef struct +struct crt_t { point *list; /* array of (crt_window_width*crt_window_height) point */ int *list_head; /* head of the list of lit pixels (index in the array) */ @@ -56,7 +56,7 @@ typedef struct int num_intensity_levels; int window_offset_x, window_offset_y; int window_width, window_height; -} crt_t; +}; INLINE crt_t *get_safe_token(device_t *device) diff --git a/src/mess/video/newport.c b/src/mess/video/newport.c index 72bdffc4059..8813d000da5 100644 --- a/src/mess/video/newport.c +++ b/src/mess/video/newport.c @@ -52,13 +52,13 @@ static WRITE32_HANDLER( newport_xmap1_w ); static READ32_HANDLER( newport_vc2_r ); static WRITE32_HANDLER( newport_vc2_w ); -typedef struct +struct VC2_t { UINT16 nRegister[0x21]; UINT16 nRAM[0x8000]; UINT8 nRegIdx; UINT16 nRegData; -} VC2_t; +}; #define VC2_VIDENTRY pNVID->VC2.nRegister[0x00] #define VC2_CURENTRY pNVID->VC2.nRegister[0x01] @@ -79,11 +79,11 @@ typedef struct #define VC2_DISPLAYCTRL pNVID->VC2.nRegister[0x10] #define VC2_CONFIG pNVID->VC2.nRegister[0x1f] -typedef struct +struct XMAP_t { UINT32 nRegister[0x08]; UINT32 nModeTable[0x20]; -} XMAP_t; +}; #define XMAP0_CONFIG pNVID->XMAP0.nRegister[0x00] #define XMAP0_REVISION pNVID->XMAP0.nRegister[0x01] @@ -100,7 +100,7 @@ typedef struct #define XMAP1_MODETBLIDX pNVID->XMAP1.nRegister[0x07] -typedef struct +struct REX3_t { UINT32 nDrawMode1; UINT32 nDrawMode0; @@ -177,14 +177,14 @@ typedef struct UINT32 nCurrentY; #endif UINT32 nKludge_SkipLine; -} REX3_t; +}; -typedef struct +struct CMAP_t { UINT16 nPaletteIndex; UINT32 nPalette[0x10000]; -} CMAP_t; +}; struct newport_video_t {