diff options
author | 2012-09-15 21:47:30 +0000 | |
---|---|---|
committer | 2012-09-15 21:47:30 +0000 | |
commit | ab97dc30efdd5cc1abf8c65b8ce29af364219167 (patch) | |
tree | 5ab46b3c21f6e0e4173a79a4151e019b3f2dc17e /src | |
parent | d1da89cc7817315f05269205a3f56d36ebba170b (diff) |
First pass at modernizing struct definitions.
Diffstat (limited to 'src')
546 files changed, 1136 insertions, 1944 deletions
diff --git a/src/build/png2bdc.c b/src/build/png2bdc.c index 318e53d6f50..643a96ab5b8 100644 --- a/src/build/png2bdc.c +++ b/src/build/png2bdc.c @@ -68,8 +68,7 @@ ***************************************************************************/ /* a render_font contains information about a single character in a font */ -typedef struct _render_font_char render_font_char; -struct _render_font_char +struct render_font_char { INT32 width; /* width from this character to the next */ INT32 xoffs, yoffs; /* X and Y offset from baseline to top,left of bitmap */ @@ -79,8 +78,7 @@ struct _render_font_char /* a render_font contains information about a font */ -typedef struct _render_font render_font; -struct _render_font +struct render_font { int height; /* height of the font, from ascent to descent */ int yoffs; /* y offset from baseline to descent */ diff --git a/src/build/verinfo.c b/src/build/verinfo.c index 473ac7dc6d2..3b3e1ac9b84 100644 --- a/src/build/verinfo.c +++ b/src/build/verinfo.c @@ -24,8 +24,7 @@ typedef unsigned char UINT8; // TYPE DEFINITIONS //============================================================ -typedef struct _version_info version_info; -struct _version_info +struct version_info { int version_major; int version_minor; diff --git a/src/emu/config.c b/src/emu/config.c index c0df9f9737d..93c758cf464 100644 --- a/src/emu/config.c +++ b/src/emu/config.c @@ -24,10 +24,9 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _config_type config_type; -struct _config_type +struct config_type { - struct _config_type * next; /* next in line */ + config_type * next; /* next in line */ const char * name; /* node name */ config_saveload_delegate load; /* load callback */ config_saveload_delegate save; /* save callback */ diff --git a/src/emu/cpu/alph8201/alph8201.c b/src/emu/cpu/alph8201/alph8201.c index ce5532bf795..f4c11bd19e8 100644 --- a/src/emu/cpu/alph8201/alph8201.c +++ b/src/emu/cpu/alph8201/alph8201.c @@ -170,8 +170,7 @@ Timming #define M_RDOP(A) cpustate->direct->read_decrypted_byte(A) #define M_RDOP_ARG(A) cpustate->direct->read_raw_byte(A) -typedef struct _alpha8201_state alpha8201_state; -struct _alpha8201_state +struct alpha8201_state { UINT8 RAM[8*8]; /* internal GP register 8 * 8bank */ unsigned PREVPC; diff --git a/src/emu/cpu/apexc/apexc.c b/src/emu/cpu/apexc/apexc.c index fa1c2f10c43..7d1957b5ccc 100644 --- a/src/emu/cpu/apexc/apexc.c +++ b/src/emu/cpu/apexc/apexc.c @@ -343,8 +343,7 @@ without danger */ #define apexc_readop(address) apexc_readmem(address) -typedef struct _apexc_state apexc_state; -struct _apexc_state +struct apexc_state { UINT32 a; /* accumulator */ UINT32 r; /* register */ diff --git a/src/emu/cpu/avr8/avr8.c b/src/emu/cpu/avr8/avr8.c index ecd729a9ce2..8c7867e4102 100644 --- a/src/emu/cpu/avr8/avr8.c +++ b/src/emu/cpu/avr8/avr8.c @@ -21,8 +21,7 @@ #include "debugger.h" #include "avr8.h" -typedef struct _avr8_state avr8_state; -struct _avr8_state +struct avr8_state { UINT32 pc; diff --git a/src/emu/cpu/ccpu/ccpu.c b/src/emu/cpu/ccpu/ccpu.c index f8b828c9166..921c71a07ac 100644 --- a/src/emu/cpu/ccpu/ccpu.c +++ b/src/emu/cpu/ccpu/ccpu.c @@ -17,8 +17,7 @@ STRUCTURES & TYPEDEFS ***************************************************************************/ -typedef struct _ccpu_state ccpu_state; -struct _ccpu_state +struct ccpu_state { UINT16 PC; UINT16 A; diff --git a/src/emu/cpu/ccpu/ccpu.h b/src/emu/cpu/ccpu/ccpu.h index 3f679c08bc3..a7df1f55756 100644 --- a/src/emu/cpu/ccpu/ccpu.h +++ b/src/emu/cpu/ccpu/ccpu.h @@ -41,8 +41,7 @@ enum typedef UINT8 (*ccpu_input_func)(device_t *device); typedef void (*ccpu_vector_func)(device_t *device, INT16 sx, INT16 sy, INT16 ex, INT16 ey, UINT8 shift); -typedef struct _ccpu_config ccpu_config; -struct _ccpu_config +struct ccpu_config { ccpu_input_func external_input; /* if NULL, assume JMI jumper is present */ ccpu_vector_func vector_callback; diff --git a/src/emu/cpu/cop400/cop400.c b/src/emu/cpu/cop400/cop400.c index e4c1694fd79..6b571e7d648 100644 --- a/src/emu/cpu/cop400/cop400.c +++ b/src/emu/cpu/cop400/cop400.c @@ -84,8 +84,7 @@ typedef struct _cop400_opcode_map cop400_opcode_map; -typedef struct _cop400_state cop400_state; -struct _cop400_state +struct cop400_state { const cop400_interface *intf; diff --git a/src/emu/cpu/cop400/cop400.h b/src/emu/cpu/cop400/cop400.h index ad859e1296f..2540a0d4aa0 100644 --- a/src/emu/cpu/cop400/cop400.h +++ b/src/emu/cpu/cop400/cop400.h @@ -99,8 +99,7 @@ enum _cop400_microbus { typedef enum _cop400_microbus cop400_microbus; /* interface */ -typedef struct _cop400_interface cop400_interface; -struct _cop400_interface +struct cop400_interface { cop400_cki_bond cki; /* CKI bonding option */ cop400_cko_bond cko; /* CKO bonding option */ diff --git a/src/emu/cpu/cp1610/cp1610.c b/src/emu/cpu/cp1610/cp1610.c index 20baf0e9977..7f65df18830 100644 --- a/src/emu/cpu/cp1610/cp1610.c +++ b/src/emu/cpu/cp1610/cp1610.c @@ -30,8 +30,7 @@ #define OV 0x20 #define C 0x10 -typedef struct _cp1610_state cp1610_state; -struct _cp1610_state +struct cp1610_state { UINT16 r[8]; /* registers */ UINT8 flags; /* flags */ diff --git a/src/emu/cpu/cubeqcpu/cubeqcpu.h b/src/emu/cpu/cubeqcpu/cubeqcpu.h index 8b0abd60e31..226fca6b279 100644 --- a/src/emu/cpu/cubeqcpu/cubeqcpu.h +++ b/src/emu/cpu/cubeqcpu/cubeqcpu.h @@ -118,22 +118,19 @@ enum typedef void (*cubeqst_dac_w_func)(device_t *, UINT16); -typedef struct _cubeqst_snd_config cubeqst_snd_config; -struct _cubeqst_snd_config +struct cubeqst_snd_config { cubeqst_dac_w_func dac_w; const char * sound_data_region; }; -typedef struct _cubeqst_lin_config cubeqst_lin_config; -struct _cubeqst_lin_config +struct cubeqst_lin_config { const char * rot_cpu_tag; }; -typedef struct _cubeqst_rot_config cubeqst_rot_config; -struct _cubeqst_rot_config +struct cubeqst_rot_config { const char * lin_cpu_tag; }; diff --git a/src/emu/cpu/e132xs/e132xs.c b/src/emu/cpu/e132xs/e132xs.c index 0537e98156f..055627f8e4b 100644 --- a/src/emu/cpu/e132xs/e132xs.c +++ b/src/emu/cpu/e132xs/e132xs.c @@ -292,8 +292,7 @@ struct _delay }; /* Internal registers */ -typedef struct _hyperstone_state hyperstone_state; -struct _hyperstone_state +struct hyperstone_state { UINT32 global_regs[32]; UINT32 local_regs[64]; diff --git a/src/emu/cpu/esrip/esrip.h b/src/emu/cpu/esrip/esrip.h index 7a06e88bea2..a76921eb529 100644 --- a/src/emu/cpu/esrip/esrip.h +++ b/src/emu/cpu/esrip/esrip.h @@ -80,8 +80,7 @@ enum /*************************************************************************** CONFIGURATION STRUCTURE ***************************************************************************/ -typedef struct _esrip_config_ esrip_config; -struct _esrip_config_ +struct esrip_config { read16_device_func fdt_r; write16_device_func fdt_w; diff --git a/src/emu/cpu/g65816/g65816cm.h b/src/emu/cpu/g65816/g65816cm.h index 054a32a0c1a..12a76ac972b 100644 --- a/src/emu/cpu/g65816/g65816cm.h +++ b/src/emu/cpu/g65816/g65816cm.h @@ -67,8 +67,7 @@ INLINE int MAKE_INT_8(int A) {return (A & 0x80) ? A | ~0xff : A & 0xff;} /* ======================================================================== */ /* CPU Structure */ -typedef struct _g65816i_cpu_struct g65816i_cpu_struct; -struct _g65816i_cpu_struct +struct g65816i_cpu_struct { uint a; /* Accumulator */ uint b; /* holds high byte of accumulator */ diff --git a/src/emu/cpu/h83002/h8priv.h b/src/emu/cpu/h83002/h8priv.h index 92030209f4d..ca622305a9d 100644 --- a/src/emu/cpu/h83002/h8priv.h +++ b/src/emu/cpu/h83002/h8priv.h @@ -36,8 +36,7 @@ typedef struct UINT64 timer_cycles; } H8S2XXX_TMR; -typedef struct _h83xx_state h83xx_state; -struct _h83xx_state +struct h83xx_state { // main CPU stuff UINT32 h8err; diff --git a/src/emu/cpu/hd6309/hd6309.c b/src/emu/cpu/hd6309/hd6309.c index 6c51cbbc52b..8ceeee347fc 100644 --- a/src/emu/cpu/hd6309/hd6309.c +++ b/src/emu/cpu/hd6309/hd6309.c @@ -113,8 +113,7 @@ #define LOG(x) do { if (VERBOSE) logerror x; } while (0) /* 6309 Registers */ -typedef struct _m68_state_t m68_state_t; -struct _m68_state_t +struct m68_state_t { PAIR pc; /* Program counter */ PAIR ppc; /* Previous program counter */ diff --git a/src/emu/cpu/i386/i386priv.h b/src/emu/cpu/i386/i386priv.h index 520e127158a..9c71d3b46be 100644 --- a/src/emu/cpu/i386/i386priv.h +++ b/src/emu/cpu/i386/i386priv.h @@ -250,8 +250,7 @@ typedef union { float f[4]; } XMM_REG; -typedef struct _i386_state i386_state; -struct _i386_state +struct i386_state { I386_GPR reg; I386_SREG sreg[6]; diff --git a/src/emu/cpu/i4004/i4004.c b/src/emu/cpu/i4004/i4004.c index 9569f1c446c..2e497928ae1 100644 --- a/src/emu/cpu/i4004/i4004.c +++ b/src/emu/cpu/i4004/i4004.c @@ -21,8 +21,7 @@ static const UINT8 kbp_table[] = { 0x00,0x01,0x02,0x0f,0x03,0x0f,0x0f,0x0f,0x04, TYPE DEFINITIONS ***************************************************************************/ -typedef struct _i4004_state i4004_state; -struct _i4004_state +struct i4004_state { UINT8 A; // Accumulator UINT8 R[8]; diff --git a/src/emu/cpu/i8085/i8085.c b/src/emu/cpu/i8085/i8085.c index a76298ad5b4..6c1251d5c4e 100644 --- a/src/emu/cpu/i8085/i8085.c +++ b/src/emu/cpu/i8085/i8085.c @@ -157,8 +157,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _i8085_state i8085_state; -struct _i8085_state +struct i8085_state { i8085_config config; diff --git a/src/emu/cpu/i8085/i8085.h b/src/emu/cpu/i8085/i8085.h index 019ccbbdf08..5c3f7a26b3b 100644 --- a/src/emu/cpu/i8085/i8085.h +++ b/src/emu/cpu/i8085/i8085.h @@ -36,8 +36,7 @@ enum TYPE DEFINITIONS ***************************************************************************/ -typedef struct _i8085_config i8085_config; -struct _i8085_config +struct i8085_config { devcb_write8 out_status_func; /* STATUS changed callback */ devcb_write_line out_inte_func; /* INTE changed callback */ diff --git a/src/emu/cpu/i86/i286.c b/src/emu/cpu/i86/i286.c index 40e5524b87b..99341b69f4a 100644 --- a/src/emu/cpu/i86/i286.c +++ b/src/emu/cpu/i86/i286.c @@ -32,8 +32,7 @@ typedef union UINT8 b[16]; /* or as 8 bit registers */ } i80286basicregs; -typedef struct _i80286_state i80286_state; -struct _i80286_state +struct i80286_state { i80286basicregs regs; offs_t fetch_xor; diff --git a/src/emu/cpu/i86/i86.c b/src/emu/cpu/i86/i86.c index 38e43487c9c..ebafea4fcd1 100644 --- a/src/emu/cpu/i86/i86.c +++ b/src/emu/cpu/i86/i86.c @@ -29,8 +29,7 @@ typedef union } i8086basicregs; -typedef struct _i8086_state i8086_state; -struct _i8086_state +struct i8086_state { i8086basicregs regs; offs_t fetch_xor; diff --git a/src/emu/cpu/i86/i86.h b/src/emu/cpu/i86/i86.h index e8d1fd03738..afd0d2599e7 100644 --- a/src/emu/cpu/i86/i86.h +++ b/src/emu/cpu/i86/i86.h @@ -1,65 +1,64 @@ -/* ASG 971222 -- rewrote this interface */
-#pragma once
-
-#ifndef __I86INTF_H__
-#define __I86INTF_H__
-
-
-#define INPUT_LINE_INT0 INPUT_LINE_IRQ0
-#define INPUT_LINE_INT1 INPUT_LINE_IRQ1
-#define INPUT_LINE_INT2 INPUT_LINE_IRQ2
-#define INPUT_LINE_INT3 INPUT_LINE_IRQ3
-#define INPUT_LINE_TEST 20 /* PJB 03/05 */
-#define INPUT_LINE_DRQ0 21
-#define INPUT_LINE_DRQ1 22
-#define INPUT_LINE_TMRIN0 23
-#define INPUT_LINE_TMRIN1 24
-
-
-typedef struct _i80186_interface i80186_interface;
-struct _i80186_interface
-{
- devcb_write_line out_tmrout0_func;
- devcb_write_line out_tmrout1_func;
-};
-#define I80186_INTERFACE(name) const i80186_interface (name) =
-
-
-enum
-{
- I8086_IP,
- I8086_AX,
- I8086_CX,
- I8086_DX,
- I8086_BX,
- I8086_SP,
- I8086_BP,
- I8086_SI,
- I8086_DI,
- I8086_AL,
- I8086_CL,
- I8086_DL,
- I8086_BL,
- I8086_AH,
- I8086_CH,
- I8086_DH,
- I8086_BH,
- I8086_FLAGS,
- I8086_ES,
- I8086_CS,
- I8086_SS,
- I8086_DS,
- I8086_VECTOR,
-
- I8086_GENPC = STATE_GENPC,
- I8086_GENSP = STATE_GENSP,
- I8086_GENPCBASE = STATE_GENPCBASE
-};
-
-/* Public functions */
-DECLARE_LEGACY_CPU_DEVICE(I8086, i8086);
-DECLARE_LEGACY_CPU_DEVICE(I8088, i8088);
-DECLARE_LEGACY_CPU_DEVICE(I80186, i80186);
-DECLARE_LEGACY_CPU_DEVICE(I80188, i80188);
-
-#endif /* __I86INTF_H__ */
+/* ASG 971222 -- rewrote this interface */ +#pragma once + +#ifndef __I86INTF_H__ +#define __I86INTF_H__ + + +#define INPUT_LINE_INT0 INPUT_LINE_IRQ0 +#define INPUT_LINE_INT1 INPUT_LINE_IRQ1 +#define INPUT_LINE_INT2 INPUT_LINE_IRQ2 +#define INPUT_LINE_INT3 INPUT_LINE_IRQ3 +#define INPUT_LINE_TEST 20 /* PJB 03/05 */ +#define INPUT_LINE_DRQ0 21 +#define INPUT_LINE_DRQ1 22 +#define INPUT_LINE_TMRIN0 23 +#define INPUT_LINE_TMRIN1 24 + + +struct i80186_interface +{ + devcb_write_line out_tmrout0_func; + devcb_write_line out_tmrout1_func; +}; +#define I80186_INTERFACE(name) const i80186_interface (name) = + + +enum +{ + I8086_IP, + I8086_AX, + I8086_CX, + I8086_DX, + I8086_BX, + I8086_SP, + I8086_BP, + I8086_SI, + I8086_DI, + I8086_AL, + I8086_CL, + I8086_DL, + I8086_BL, + I8086_AH, + I8086_CH, + I8086_DH, + I8086_BH, + I8086_FLAGS, + I8086_ES, + I8086_CS, + I8086_SS, + I8086_DS, + I8086_VECTOR, + + I8086_GENPC = STATE_GENPC, + I8086_GENSP = STATE_GENSP, + I8086_GENPCBASE = STATE_GENPCBASE +}; + +/* Public functions */ +DECLARE_LEGACY_CPU_DEVICE(I8086, i8086); +DECLARE_LEGACY_CPU_DEVICE(I8088, i8088); +DECLARE_LEGACY_CPU_DEVICE(I80186, i80186); +DECLARE_LEGACY_CPU_DEVICE(I80188, i80188); + +#endif /* __I86INTF_H__ */ diff --git a/src/emu/cpu/i960/i960.c b/src/emu/cpu/i960/i960.c index 9a9df2fe31b..fdbf19378e7 100644 --- a/src/emu/cpu/i960/i960.c +++ b/src/emu/cpu/i960/i960.c @@ -16,8 +16,7 @@ CPU_DISASSEMBLE( i960 ); enum { RCACHE_SIZE = 4 }; -typedef struct _i960_state_t i960_state_t; -struct _i960_state_t { +struct i960_state_t { UINT32 r[0x20]; UINT32 rcache[RCACHE_SIZE][0x10]; UINT32 rcache_frame_addr[RCACHE_SIZE]; diff --git a/src/emu/cpu/i960/i960dis.h b/src/emu/cpu/i960/i960dis.h index 2c18dd1c64a..3ab93e21867 100644 --- a/src/emu/cpu/i960/i960dis.h +++ b/src/emu/cpu/i960/i960dis.h @@ -1,8 +1,7 @@ #ifndef __I960DIS_H__ #define __I960DIS_H__ -typedef struct _disassemble_t disassemble_t; -struct _disassemble_t +struct disassemble_t { char *buffer; // output buffer unsigned long IP; diff --git a/src/emu/cpu/jaguar/jaguar.c b/src/emu/cpu/jaguar/jaguar.c index 79a675173b3..76d43b156b3 100644 --- a/src/emu/cpu/jaguar/jaguar.c +++ b/src/emu/cpu/jaguar/jaguar.c @@ -79,8 +79,7 @@ CPU_DISASSEMBLE( jaguardsp ); ***************************************************************************/ /* Jaguar Registers */ -typedef struct _jaguar_state jaguar_state; -struct _jaguar_state +struct jaguar_cpu_state { /* core registers */ UINT32 r[32]; @@ -97,7 +96,7 @@ struct _jaguar_state int isdsp; int icount; int bankswitch_icount; - void (*const *table)(jaguar_state *jaguar, UINT16 op); + void (*const *table)(jaguar_cpu_state *jaguar, UINT16 op); device_irq_acknowledge_callback irq_callback; jaguar_int_func cpu_interrupt; legacy_cpu_device *device; @@ -124,78 +123,78 @@ static const UINT32 convert_zero[32] = FUNCTION TABLES ***************************************************************************/ -static void abs_rn(jaguar_state *jaguar, UINT16 op); -static void add_rn_rn(jaguar_state *jaguar, UINT16 op); -static void addc_rn_rn(jaguar_state *jaguar, UINT16 op); -static void addq_n_rn(jaguar_state *jaguar, UINT16 op); -static void addqmod_n_rn(jaguar_state *jaguar, UINT16 op); /* DSP only */ -static void addqt_n_rn(jaguar_state *jaguar, UINT16 op); -static void and_rn_rn(jaguar_state *jaguar, UINT16 op); -static void bclr_n_rn(jaguar_state *jaguar, UINT16 op); -static void bset_n_rn(jaguar_state *jaguar, UINT16 op); -static void btst_n_rn(jaguar_state *jaguar, UINT16 op); -static void cmp_rn_rn(jaguar_state *jaguar, UINT16 op); -static void cmpq_n_rn(jaguar_state *jaguar, UINT16 op); -static void div_rn_rn(jaguar_state *jaguar, UINT16 op); -static void illegal(jaguar_state *jaguar, UINT16 op); -static void imacn_rn_rn(jaguar_state *jaguar, UINT16 op); -static void imult_rn_rn(jaguar_state *jaguar, UINT16 op); -static void imultn_rn_rn(jaguar_state *jaguar, UINT16 op); -static void jr_cc_n(jaguar_state *jaguar, UINT16 op); -static void jump_cc_rn(jaguar_state *jaguar, UINT16 op); -static void load_rn_rn(jaguar_state *jaguar, UINT16 op); -static void load_r14n_rn(jaguar_state *jaguar, UINT16 op); -static void load_r15n_rn(jaguar_state *jaguar, UINT16 op); -static void load_r14rn_rn(jaguar_state *jaguar, UINT16 op); -static void load_r15rn_rn(jaguar_state *jaguar, UINT16 op); -static void loadb_rn_rn(jaguar_state *jaguar, UINT16 op); -static void loadw_rn_rn(jaguar_state *jaguar, UINT16 op); -static void loadp_rn_rn(jaguar_state *jaguar, UINT16 op); /* GPU only */ -static void mirror_rn(jaguar_state *jaguar, UINT16 op); /* DSP only */ -static void mmult_rn_rn(jaguar_state *jaguar, UINT16 op); -static void move_rn_rn(jaguar_state *jaguar, UINT16 op); -static void move_pc_rn(jaguar_state *jaguar, UINT16 op); -static void movefa_rn_rn(jaguar_state *jaguar, UINT16 op); -static void movei_n_rn(jaguar_state *jaguar, UINT16 op); -static void moveq_n_rn(jaguar_state *jaguar, UINT16 op); -static void moveta_rn_rn(jaguar_state *jaguar, UINT16 op); -static void mtoi_rn_rn(jaguar_state *jaguar, UINT16 op); -static void mult_rn_rn(jaguar_state *jaguar, UINT16 op); -static void neg_rn(jaguar_state *jaguar, UINT16 op); -static void nop(jaguar_state *jaguar, UINT16 op); -static void normi_rn_rn(jaguar_state *jaguar, UINT16 op); -static void not_rn(jaguar_state *jaguar, UINT16 op); -static void or_rn_rn(jaguar_state *jaguar, UINT16 op); -static void pack_rn(jaguar_state *jaguar, UINT16 op); /* GPU only */ -static void resmac_rn(jaguar_state *jaguar, UINT16 op); -static void ror_rn_rn(jaguar_state *jaguar, UINT16 op); -static void rorq_n_rn(jaguar_state *jaguar, UINT16 op); -static void sat8_rn(jaguar_state *jaguar, UINT16 op); /* GPU only */ -static void sat16_rn(jaguar_state *jaguar, UINT16 op); /* GPU only */ -static void sat16s_rn(jaguar_state *jaguar, UINT16 op); /* DSP only */ -static void sat24_rn(jaguar_state *jaguar, UINT16 op); /* GPU only */ -static void sat32s_rn(jaguar_state *jaguar, UINT16 op); /* DSP only */ -static void sh_rn_rn(jaguar_state *jaguar, UINT16 op); -static void sha_rn_rn(jaguar_state *jaguar, UINT16 op); -static void sharq_n_rn(jaguar_state *jaguar, UINT16 op); -static void shlq_n_rn(jaguar_state *jaguar, UINT16 op); -static void shrq_n_rn(jaguar_state *jaguar, UINT16 op); -static void store_rn_rn(jaguar_state *jaguar, UINT16 op); -static void store_rn_r14n(jaguar_state *jaguar, UINT16 op); -static void store_rn_r15n(jaguar_state *jaguar, UINT16 op); -static void store_rn_r14rn(jaguar_state *jaguar, UINT16 op); -static void store_rn_r15rn(jaguar_state *jaguar, UINT16 op); -static void storeb_rn_rn(jaguar_state *jaguar, UINT16 op); -static void storew_rn_rn(jaguar_state *jaguar, UINT16 op); -static void storep_rn_rn(jaguar_state *jaguar, UINT16 op); /* GPU only */ -static void sub_rn_rn(jaguar_state *jaguar, UINT16 op); -static void subc_rn_rn(jaguar_state *jaguar, UINT16 op); -static void subq_n_rn(jaguar_state *jaguar, UINT16 op); -static void subqmod_n_rn(jaguar_state *jaguar, UINT16 op); /* DSP only */ -static void subqt_n_rn(jaguar_state *jaguar, UINT16 op); -static void xor_rn_rn(jaguar_state *jaguar, UINT16 op); - -static void (*const gpu_op_table[64])(jaguar_state *jaguar, UINT16 op) = +static void abs_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void add_rn_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void addc_rn_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void addq_n_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void addqmod_n_rn(jaguar_cpu_state *jaguar, UINT16 op); /* DSP only */ +static void addqt_n_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void and_rn_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void bclr_n_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void bset_n_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void btst_n_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void cmp_rn_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void cmpq_n_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void div_rn_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void illegal(jaguar_cpu_state *jaguar, UINT16 op); +static void imacn_rn_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void imult_rn_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void imultn_rn_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void jr_cc_n(jaguar_cpu_state *jaguar, UINT16 op); +static void jump_cc_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void load_rn_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void load_r14n_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void load_r15n_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void load_r14rn_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void load_r15rn_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void loadb_rn_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void loadw_rn_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void loadp_rn_rn(jaguar_cpu_state *jaguar, UINT16 op); /* GPU only */ +static void mirror_rn(jaguar_cpu_state *jaguar, UINT16 op); /* DSP only */ +static void mmult_rn_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void move_rn_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void move_pc_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void movefa_rn_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void movei_n_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void moveq_n_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void moveta_rn_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void mtoi_rn_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void mult_rn_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void neg_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void nop(jaguar_cpu_state *jaguar, UINT16 op); +static void normi_rn_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void not_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void or_rn_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void pack_rn(jaguar_cpu_state *jaguar, UINT16 op); /* GPU only */ +static void resmac_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void ror_rn_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void rorq_n_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void sat8_rn(jaguar_cpu_state *jaguar, UINT16 op); /* GPU only */ +static void sat16_rn(jaguar_cpu_state *jaguar, UINT16 op); /* GPU only */ +static void sat16s_rn(jaguar_cpu_state *jaguar, UINT16 op); /* DSP only */ +static void sat24_rn(jaguar_cpu_state *jaguar, UINT16 op); /* GPU only */ +static void sat32s_rn(jaguar_cpu_state *jaguar, UINT16 op); /* DSP only */ +static void sh_rn_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void sha_rn_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void sharq_n_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void shlq_n_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void shrq_n_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void store_rn_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void store_rn_r14n(jaguar_cpu_state *jaguar, UINT16 op); +static void store_rn_r15n(jaguar_cpu_state *jaguar, UINT16 op); +static void store_rn_r14rn(jaguar_cpu_state *jaguar, UINT16 op); +static void store_rn_r15rn(jaguar_cpu_state *jaguar, UINT16 op); +static void storeb_rn_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void storew_rn_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void storep_rn_rn(jaguar_cpu_state *jaguar, UINT16 op); /* GPU only */ +static void sub_rn_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void subc_rn_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void subq_n_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void subqmod_n_rn(jaguar_cpu_state *jaguar, UINT16 op); /* DSP only */ +static void subqt_n_rn(jaguar_cpu_state *jaguar, UINT16 op); +static void xor_rn_rn(jaguar_cpu_state *jaguar, UINT16 op); + +static void (*const gpu_op_table[64])(jaguar_cpu_state *jaguar, UINT16 op) = { /* 00-03 */ add_rn_rn, addc_rn_rn, addq_n_rn, addqt_n_rn, /* 04-07 */ sub_rn_rn, subc_rn_rn, subq_n_rn, subqt_n_rn, @@ -215,7 +214,7 @@ static void (*const gpu_op_table[64])(jaguar_state *jaguar, UINT16 op) = /* 60-63 */ store_rn_r14rn, store_rn_r15rn, sat24_rn, pack_rn }; -static void (*const dsp_op_table[64])(jaguar_state *jaguar, UINT16 op) = +static void (*const dsp_op_table[64])(jaguar_cpu_state *jaguar, UINT16 op) = { /* 00-03 */ add_rn_rn, addc_rn_rn, addq_n_rn, addqt_n_rn, /* 04-07 */ sub_rn_rn, subc_rn_rn, subq_n_rn, subqt_n_rn, @@ -249,15 +248,15 @@ static void (*const dsp_op_table[64])(jaguar_state *jaguar, UINT16 op) = INLINE FUNCTIONS ***************************************************************************/ -INLINE jaguar_state *get_safe_token(device_t *device) +INLINE jaguar_cpu_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == JAGUARGPU || device->type() == JAGUARDSP); - return (jaguar_state *)downcast<legacy_cpu_device *>(device)->token(); + return (jaguar_cpu_state *)downcast<legacy_cpu_device *>(device)->token(); } -INLINE void update_register_banks(jaguar_state *jaguar) +INLINE void update_register_banks(jaguar_cpu_state *jaguar) { UINT32 temp; int i, bank; @@ -296,7 +295,7 @@ INLINE void update_register_banks(jaguar_state *jaguar) IRQ HANDLING ***************************************************************************/ -static void check_irqs(jaguar_state *jaguar) +static void check_irqs(jaguar_cpu_state *jaguar) { int bits, mask, which = 0; @@ -339,7 +338,7 @@ static void check_irqs(jaguar_state *jaguar) } -static void set_irq_line(jaguar_state *jaguar, int irqline, int state) +static void set_irq_line(jaguar_cpu_state *jaguar, int irqline, int state) { int mask = (irqline < 5) ? (0x40 << irqline) : 0x10000; jaguar->ctrl[G_CTRL] &= ~mask; @@ -399,7 +398,7 @@ static void init_tables(void) } -static void jaguar_postload(jaguar_state *jaguar) +static void jaguar_postload(jaguar_cpu_state *jaguar) { update_register_banks(jaguar); check_irqs(jaguar); @@ -409,7 +408,7 @@ static void jaguar_postload(jaguar_state *jaguar) static void init_common(int isdsp, legacy_cpu_device *device, device_irq_acknowledge_callback irqcallback) { const jaguar_cpu_config *configdata = (const jaguar_cpu_config *)device->static_config(); - jaguar_state *jaguar = get_safe_token(device); + jaguar_cpu_state *jaguar = get_safe_token(device); init_tables(); @@ -445,7 +444,7 @@ static CPU_INIT( jaguardsp ) static CPU_RESET( jaguar ) { - jaguar_state *jaguar = get_safe_token(device); + jaguar_cpu_state *jaguar = get_safe_token(device); jaguar->b0 = jaguar->r; jaguar->b1 = jaguar->a; @@ -474,7 +473,7 @@ static CPU_EXIT( jaguar ) static CPU_EXECUTE( jaguargpu ) { - jaguar_state *jaguar = get_safe_token(device); + jaguar_cpu_state *jaguar = get_safe_token(device); /* if we're halted, we shouldn't be here */ if (!(jaguar->ctrl[G_CTRL] & 1)) @@ -513,7 +512,7 @@ static CPU_EXECUTE( jaguargpu ) static CPU_EXECUTE( jaguardsp ) { - jaguar_state *jaguar = get_safe_token(device); + jaguar_cpu_state *jaguar = get_safe_token(device); /* if we're halted, we shouldn't be here */ if (!(jaguar->ctrl[G_CTRL] & 1)) @@ -556,7 +555,7 @@ static CPU_EXECUTE( jaguardsp ) OPCODES ***************************************************************************/ -void abs_rn(jaguar_state *jaguar, UINT16 op) +void abs_rn(jaguar_cpu_state *jaguar, UINT16 op) { int dreg = op & 31; UINT32 res = jaguar->r[dreg]; @@ -569,7 +568,7 @@ void abs_rn(jaguar_state *jaguar, UINT16 op) SET_Z(jaguar, res); } -void add_rn_rn(jaguar_state *jaguar, UINT16 op) +void add_rn_rn(jaguar_cpu_state *jaguar, UINT16 op) { int dreg = op & 31; UINT32 r1 = jaguar->r[(op >> 5) & 31]; @@ -579,7 +578,7 @@ void add_rn_rn(jaguar_state *jaguar, UINT16 op) CLR_ZNC(jaguar); SET_ZNC_ADD(jaguar, r2, r1, res); } -void addc_rn_rn(jaguar_state *jaguar, UINT16 op) +void addc_rn_rn(jaguar_cpu_state *jaguar, UINT16 op) { int dreg = op & 31; UINT32 r1 = jaguar->r[(op >> 5) & 31]; @@ -589,7 +588,7 @@ void addc_rn_rn(jaguar_state *jaguar, UINT16 op) CLR_ZNC(jaguar); SET_ZNC_ADD(jaguar, r2, r1, res); } -void addq_n_rn(jaguar_state *jaguar, UINT16 op) +void addq_n_rn(jaguar_cpu_state *jaguar, UINT16 op) { int dreg = op & 31; UINT32 r1 = convert_zero[(op >> 5) & 31]; @@ -599,7 +598,7 @@ void addq_n_rn(jaguar_state *jaguar, UINT16 op) CLR_ZNC(jaguar); SET_ZNC_ADD(jaguar, r2, r1, res); } -void addqmod_n_rn(jaguar_state *jaguar, UINT16 op) /* DSP only */ +void addqmod_n_rn(jaguar_cpu_state *jaguar, UINT16 op) /* DSP only */ { int dreg = op & 31; UINT32 r1 = convert_zero[(op >> 5) & 31]; @@ -610,7 +609,7 @@ void addqmod_n_rn(jaguar_state *jaguar, UINT16 op) /* DSP only */ CLR_ZNC(jaguar); SET_ZNC_ADD(jaguar, r2, r1, res); } -void addqt_n_rn(jaguar_state *jaguar, UINT16 op) +void addqt_n_rn(jaguar_cpu_state *jaguar, UINT16 op) { int dreg = op & 31; UINT32 r1 = convert_zero[(op >> 5) & 31]; @@ -619,7 +618,7 @@ void addqt_n_rn(jaguar_state *jaguar, UINT16 op) jaguar->r[dreg] = res; } -void and_rn_rn(jaguar_state *jaguar, UINT16 op) +void and_rn_rn(jaguar_cpu_state *jaguar, UINT16 op) { int dreg = op & 31; UINT32 r1 = jaguar->r[(op >> 5) & 31]; @@ -629,7 +628,7 @@ void and_rn_rn(jaguar_state *jaguar, UINT16 op) CLR_ZN(jaguar); SET_ZN(jaguar, res); } -void bclr_n_rn(jaguar_state *jaguar, UINT16 op) +void bclr_n_rn(jaguar_cpu_state *jaguar, UINT16 op) { int dreg = op & 31; UINT32 r1 = (op >> 5) & 31; @@ -639,7 +638,7 @@ void bclr_n_rn(jaguar_state *jaguar, UINT16 op) CLR_ZN(jaguar); SET_ZN(jaguar, res); } -void bset_n_rn(jaguar_state *jaguar, UINT16 op) +void bset_n_rn(jaguar_cpu_state *jaguar, UINT16 op) { int dreg = op & 31; UINT32 r1 = (op >> 5) & 31; @@ -649,14 +648,14 @@ void bset_n_rn(jaguar_state *jaguar, UINT16 op) CLR_ZN(jaguar); SET_ZN(jaguar, res); } -void btst_n_rn(jaguar_state *jaguar, UINT16 op) +void btst_n_rn(jaguar_cpu_state *jaguar, UINT16 op) { UINT32 r1 = (op >> 5) & 31; UINT32 r2 = jaguar->r[op & 31]; CLR_Z(jaguar); jaguar->FLAGS |= (~r2 >> r1) & 1; } -void cmp_rn_rn(jaguar_state *jaguar, UINT16 op) +void cmp_rn_rn(jaguar_cpu_state *jaguar, UINT16 op) { UINT32 r1 = jaguar->r[(op >> 5) & 31]; UINT32 r2 = jaguar->r[op & 31]; @@ -664,7 +663,7 @@ void cmp_rn_rn(jaguar_state *jaguar, UINT16 op) CLR_ZNC(jaguar); SET_ZNC_SUB(jaguar, r2, r1, res); } -void cmpq_n_rn(jaguar_state *jaguar, UINT16 op) +void cmpq_n_rn(jaguar_cpu_state *jaguar, UINT16 op) { UINT32 r1 = (INT8)(op >> 2) >> 3; UINT32 r2 = jaguar->r[op & 31]; @@ -672,7 +671,7 @@ void cmpq_n_rn(jaguar_state *jaguar, UINT16 op) CLR_ZNC(jaguar); SET_ZNC_SUB(jaguar, r2, r1, res); } -void div_rn_rn(jaguar_state *jaguar, UINT16 op) +void div_rn_rn(jaguar_cpu_state *jaguar, UINT16 op) { int dreg = op & 31; UINT32 r1 = jaguar->r[(op >> 5) & 31]; @@ -694,11 +693,11 @@ void div_rn_rn(jaguar_state *jaguar, UINT16 op) jaguar->r[dreg] = 0xffffffff; } -void illegal(jaguar_state *jaguar, UINT16 op) +void illegal(jaguar_cpu_state *jaguar, UINT16 op) { } -void imacn_rn_rn(jaguar_state *jaguar, UINT16 op) +void imacn_rn_rn(jaguar_cpu_state *jaguar, UINT16 op) { UINT32 r1 = jaguar->r[(op >> 5) & 31]; UINT32 r2 = jaguar->r[op & 31]; @@ -706,7 +705,7 @@ void imacn_rn_rn(jaguar_state *jaguar, UINT16 op) logerror("Unexpected IMACN instruction!\n"); } -void imult_rn_rn(jaguar_state *jaguar, UINT16 op) +void imult_rn_rn(jaguar_cpu_state *jaguar, UINT16 op) { int dreg = op & 31; UINT32 r1 = jaguar->r[(op >> 5) & 31]; @@ -716,7 +715,7 @@ void imult_rn_rn(jaguar_state *jaguar, UINT16 op) CLR_ZN(jaguar); SET_ZN(jaguar, res); } -void imultn_rn_rn(jaguar_state *jaguar, UINT16 op) +void imultn_rn_rn(jaguar_cpu_state *jaguar, UINT16 op) { int dreg = op & 31; UINT32 r1 = jaguar->r[(op >> 5) & 31]; @@ -741,7 +740,7 @@ void imultn_rn_rn(jaguar_state *jaguar, UINT16 op) } } -void jr_cc_n(jaguar_state *jaguar, UINT16 op) +void jr_cc_n(jaguar_cpu_state *jaguar, UINT16 op) { if (CONDITION(op & 31)) { @@ -756,7 +755,7 @@ void jr_cc_n(jaguar_state *jaguar, UINT16 op) } } -void jump_cc_rn(jaguar_state *jaguar, UINT16 op) +void jump_cc_rn(jaguar_cpu_state *jaguar, UINT16 op) { if (CONDITION(op & 31)) { @@ -773,56 +772,56 @@ void jump_cc_rn(jaguar_state *jaguar, UINT16 op) } } -void load_rn_rn(jaguar_state *jaguar, UINT16 op) +void load_rn_rn(jaguar_cpu_state *jaguar, UINT16 op) { UINT32 r1 = jaguar->r[(op >> 5) & 31]; jaguar->r[op & 31] = READLONG(jaguar, r1); } -void load_r14n_rn(jaguar_state *jaguar, UINT16 op) +void load_r14n_rn(jaguar_cpu_state *jaguar, UINT16 op) { UINT32 r1 = convert_zero[(op >> 5) & 31]; jaguar->r[op & 31] = READLONG(jaguar, jaguar->r[14] + 4 * r1); } -void load_r15n_rn(jaguar_state *jaguar, UINT16 op) +void load_r15n_rn(jaguar_cpu_state *jaguar, UINT16 op) { UINT32 r1 = convert_zero[(op >> 5) & 31]; jaguar->r[op & 31] = READLONG(jaguar, jaguar->r[15] + 4 * r1); } -void load_r14rn_rn(jaguar_state *jaguar, UINT16 op) +void load_r14rn_rn(jaguar_cpu_state *jaguar, UINT16 op) { UINT32 r1 = jaguar->r[(op >> 5) & 31]; jaguar->r[op & 31] = READLONG(jaguar, jaguar->r[14] + r1); } -void load_r15rn_rn(jaguar_state *jaguar, UINT16 op) +void load_r15rn_rn(jaguar_cpu_state *jaguar, UINT16 op) { UINT32 r1 = jaguar->r[(op >> 5) & 31]; jaguar->r[op & 31] = READLONG(jaguar, jaguar->r[15] + r1); } -void loadb_rn_rn(jaguar_state *jaguar, UINT16 op) +void loadb_rn_rn(jaguar_cpu_state *jaguar, UINT16 op) { UINT32 r1 = jaguar->r[(op >> 5) & 31]; jaguar->r[op & 31] = READBYTE(jaguar, r1); } -void loadw_rn_rn(jaguar_state *jaguar, UINT16 op) +void loadw_rn_rn(jaguar_cpu_state *jaguar, UINT16 op) { UINT32 r1 = jaguar->r[(op >> 5) & 31]; jaguar->r[op & 31] = READWORD(jaguar, r1); } -void loadp_rn_rn(jaguar_state *jaguar, UINT16 op) /* GPU only */ +void loadp_rn_rn(jaguar_cpu_state *jaguar, UINT16 op) /* GPU only */ { UINT32 r1 = jaguar->r[(op >> 5) & 31]; jaguar->ctrl[G_HIDATA] = READWORD(jaguar, r1); jaguar->r[op & 31] = READWORD(jaguar, r1+4); } -void mirror_rn(jaguar_state *jaguar, UINT16 op) /* DSP only */ +void mirror_rn(jaguar_cpu_state *jaguar, UINT16 op) /* DSP only */ { int dreg = op & 31; UINT32 r1 = jaguar->r[dreg]; @@ -831,7 +830,7 @@ void mirror_rn(jaguar_state *jaguar, UINT16 op) /* DSP only */ CLR_ZN(jaguar); SET_ZN(jaguar, res); } -void mmult_rn_rn(jaguar_state *jaguar, UINT16 op) +void mmult_rn_rn(jaguar_cpu_state *jaguar, UINT16 op) { int count = jaguar->ctrl[G_MTXC] & 15, i; int sreg = (op >> 5) & 31; @@ -860,45 +859,45 @@ void mmult_rn_rn(jaguar_state *jaguar, UINT16 op) CLR_ZN(jaguar); SET_ZN(jaguar, res); } -void move_rn_rn(jaguar_state *jaguar, UINT16 op) +void move_rn_rn(jaguar_cpu_state *jaguar, UINT16 op) { jaguar->r[op & 31] = jaguar->r[(op >> 5) & 31]; } -void move_pc_rn(jaguar_state *jaguar, UINT16 op) +void move_pc_rn(jaguar_cpu_state *jaguar, UINT16 op) { jaguar->r[op & 31] = jaguar->ppc; } -void movefa_rn_rn(jaguar_state *jaguar, UINT16 op) +void movefa_rn_rn(jaguar_cpu_state *jaguar, UINT16 op) { jaguar->r[op & 31] = jaguar->a[(op >> 5) & 31]; } -void movei_n_rn(jaguar_state *jaguar, UINT16 op) +void movei_n_rn(jaguar_cpu_state *jaguar, UINT16 op) { UINT32 res = ROPCODE(jaguar, jaguar->PC) | (ROPCODE(jaguar, jaguar->PC + 2) << 16); jaguar->PC += 4; jaguar->r[op & 31] = res; } -void moveq_n_rn(jaguar_state *jaguar, UINT16 op) +void moveq_n_rn(jaguar_cpu_state *jaguar, UINT16 op) { jaguar->r[op & 31] = (op >> 5) & 31; } -void moveta_rn_rn(jaguar_state *jaguar, UINT16 op) +void moveta_rn_rn(jaguar_cpu_state *jaguar, UINT16 op) { jaguar->a[op & 31] = jaguar->r[(op >> 5) & 31]; } -void mtoi_rn_rn(jaguar_state *jaguar, UINT16 op) +void mtoi_rn_rn(jaguar_cpu_state *jaguar, UINT16 op) { UINT32 r1 = jaguar->r[(op >> 5) & 31]; jaguar->r[op & 31] = (((INT32)r1 >> 8) & 0xff800000) | (r1 & 0x007fffff); } -void mult_rn_rn(jaguar_state *jaguar, UINT16 op) +void mult_rn_rn(jaguar_cpu_state *jaguar, UINT16 op) { int dreg = op & 31; UINT32 r1 = jaguar->r[(op >> 5) & 31]; @@ -908,7 +907,7 @@ void mult_rn_rn(jaguar_state *jaguar, UINT16 op) CLR_ZN(jaguar); SET_ZN(jaguar, res); } -void neg_rn(jaguar_state *jaguar, UINT16 op) +void neg_rn(jaguar_cpu_state *jaguar, UINT16 op) { int dreg = op & 31; UINT32 r2 = jaguar->r[dreg]; @@ -917,11 +916,11 @@ void neg_rn(jaguar_state *jaguar, UINT16 op) CLR_ZNC(jaguar); SET_ZNC_SUB(jaguar, 0, r2, res); } -void nop(jaguar_state *jaguar, UINT16 op) +void nop(jaguar_cpu_state *jaguar, UINT16 op) { } -void normi_rn_rn(jaguar_state *jaguar, UINT16 op) +void normi_rn_rn(jaguar_cpu_state *jaguar, UINT16 op) { UINT32 r1 = jaguar->r[(op >> 5) & 31]; UINT32 res = 0; @@ -942,7 +941,7 @@ void normi_rn_rn(jaguar_state *jaguar, UINT16 op) CLR_ZN(jaguar); SET_ZN(jaguar, res); } -void not_rn(jaguar_state *jaguar, UINT16 op) +void not_rn(jaguar_cpu_state *jaguar, UINT16 op) { int dreg = op & 31; UINT32 res = ~jaguar->r[dreg]; @@ -950,7 +949,7 @@ void not_rn(jaguar_state *jaguar, UINT16 op) CLR_ZN(jaguar); SET_ZN(jaguar, res); } -void or_rn_rn(jaguar_state *jaguar, UINT16 op) +void or_rn_rn(jaguar_cpu_state *jaguar, UINT16 op) { int dreg = op & 31; UINT32 r1 = jaguar->r[(op >> 5) & 31]; @@ -960,7 +959,7 @@ void or_rn_rn(jaguar_state *jaguar, UINT16 op) CLR_ZN(jaguar); SET_ZN(jaguar, res); } -void pack_rn(jaguar_state *jaguar, UINT16 op) /* GPU only */ +void pack_rn(jaguar_cpu_state *jaguar, UINT16 op) /* GPU only */ { int dreg = op & 31; UINT32 r1 = jaguar->r[(op >> 5) & 31]; @@ -974,12 +973,12 @@ void pack_rn(jaguar_state *jaguar, UINT16 op) /* GPU only */ CLR_ZN(jaguar); SET_ZN(jaguar, res); } -void resmac_rn(jaguar_state *jaguar, UINT16 op) +void resmac_rn(jaguar_cpu_state *jaguar, UINT16 op) { jaguar->r[op & 31] = (UINT32)jaguar->accum; } -void ror_rn_rn(jaguar_state *jaguar, UINT16 op) +void ror_rn_rn(jaguar_cpu_state *jaguar, UINT16 op) { int dreg = op & 31; UINT32 r1 = jaguar->r[(op >> 5) & 31] & 31; @@ -989,7 +988,7 @@ void ror_rn_rn(jaguar_state *jaguar, UINT16 op) CLR_ZNC(jaguar); SET_ZN(jaguar, res); jaguar->FLAGS |= (r2 >> 30) & 2; } -void rorq_n_rn(jaguar_state *jaguar, UINT16 op) +void rorq_n_rn(jaguar_cpu_state *jaguar, UINT16 op) { int dreg = op & 31; UINT32 r1 = convert_zero[(op >> 5) & 31]; @@ -999,7 +998,7 @@ void rorq_n_rn(jaguar_state *jaguar, UINT16 op) CLR_ZNC(jaguar); SET_ZN(jaguar, res); jaguar->FLAGS |= (r2 >> 30) & 2; } -void sat8_rn(jaguar_state *jaguar, UINT16 op) /* GPU only */ +void sat8_rn(jaguar_cpu_state *jaguar, UINT16 op) /* GPU only */ { int dreg = op & 31; INT32 r2 = jaguar->r[dreg]; @@ -1008,7 +1007,7 @@ void sat8_rn(jaguar_state *jaguar, UINT16 op) /* GPU only */ CLR_ZN(jaguar); SET_ZN(jaguar, res); } -void sat16_rn(jaguar_state *jaguar, UINT16 op) /* GPU only */ +void sat16_rn(jaguar_cpu_state *jaguar, UINT16 op) /* GPU only */ { int dreg = op & 31; INT32 r2 = jaguar->r[dreg]; @@ -1017,7 +1016,7 @@ void sat16_rn(jaguar_state *jaguar, UINT16 op) /* GPU only */ CLR_ZN(jaguar); SET_ZN(jaguar, res); } -void sat16s_rn(jaguar_state *jaguar, UINT16 op) /* DSP only */ +void sat16s_rn(jaguar_cpu_state *jaguar, UINT16 op) /* DSP only */ { int dreg = op & 31; INT32 r2 = jaguar->r[dreg]; @@ -1026,7 +1025,7 @@ void sat16s_rn(jaguar_state *jaguar, UINT16 op) /* DSP only */ CLR_ZN(jaguar); SET_ZN(jaguar, res); } -void sat24_rn(jaguar_state *jaguar, UINT16 op) /* GPU only */ +void sat24_rn(jaguar_cpu_state *jaguar, UINT16 op) /* GPU only */ { int dreg = op & 31; INT32 r2 = jaguar->r[dreg]; @@ -1035,7 +1034,7 @@ void sat24_rn(jaguar_state *jaguar, UINT16 op) /* GPU only */ CLR_ZN(jaguar); SET_ZN(jaguar, res); } -void sat32s_rn(jaguar_state *jaguar, UINT16 op) /* DSP only */ +void sat32s_rn(jaguar_cpu_state *jaguar, UINT16 op) /* DSP only */ { int dreg = op & 31; INT32 r2 = (UINT32)jaguar->r[dreg]; @@ -1045,7 +1044,7 @@ void sat32s_rn(jaguar_state *jaguar, UINT16 op) /* DSP only */ CLR_ZN(jaguar); SET_ZN(jaguar, res); } -void sh_rn_rn(jaguar_state *jaguar, UINT16 op) +void sh_rn_rn(jaguar_cpu_state *jaguar, UINT16 op) { int dreg = op & 31; INT32 r1 = (INT32)jaguar->r[(op >> 5) & 31]; @@ -1067,7 +1066,7 @@ void sh_rn_rn(jaguar_state *jaguar, UINT16 op) SET_ZN(jaguar, res); } -void sha_rn_rn(jaguar_state *jaguar, UINT16 op) +void sha_rn_rn(jaguar_cpu_state *jaguar, UINT16 op) { int dreg = op & 31; INT32 r1 = (INT32)jaguar->r[(op >> 5) & 31]; @@ -1089,7 +1088,7 @@ void sha_rn_rn(jaguar_state *jaguar, UINT16 op) SET_ZN(jaguar, res); } -void sharq_n_rn(jaguar_state *jaguar, UINT16 op) +void sharq_n_rn(jaguar_cpu_state *jaguar, UINT16 op) { int dreg = op & 31; INT32 r1 = convert_zero[(op >> 5) & 31]; @@ -1099,7 +1098,7 @@ void sharq_n_rn(jaguar_state *jaguar, UINT16 op) CLR_ZNC(jaguar); SET_ZN(jaguar, res); jaguar->FLAGS |= (r2 << 1) & 2; } -void shlq_n_rn(jaguar_state *jaguar, UINT16 op) +void shlq_n_rn(jaguar_cpu_state *jaguar, UINT16 op) { int dreg = op & 31; INT32 r1 = convert_zero[(op >> 5) & 31]; @@ -1109,7 +1108,7 @@ void shlq_n_rn(jaguar_state *jaguar, UINT16 op) CLR_ZNC(jaguar); SET_ZN(jaguar, res); jaguar->FLAGS |= (r2 >> 30) & 2; } -void shrq_n_rn(jaguar_state *jaguar, UINT16 op) +void shrq_n_rn(jaguar_cpu_state *jaguar, UINT16 op) { int dreg = op & 31; INT32 r1 = convert_zero[(op >> 5) & 31]; @@ -1119,56 +1118,56 @@ void shrq_n_rn(jaguar_state *jaguar, UINT16 op) CLR_ZNC(jaguar); SET_ZN(jaguar, res); jaguar->FLAGS |= (r2 << 1) & 2; } -void store_rn_rn(jaguar_state *jaguar, UINT16 op) +void store_rn_rn(jaguar_cpu_state *jaguar, UINT16 op) { UINT32 r1 = jaguar->r[(op >> 5) & 31]; WRITELONG(jaguar, r1, jaguar->r[op & 31]); } -void store_rn_r14n(jaguar_state *jaguar, UINT16 op) +void store_rn_r14n(jaguar_cpu_state *jaguar, UINT16 op) { UINT32 r1 = convert_zero[(op >> 5) & 31]; WRITELONG(jaguar, jaguar->r[14] + r1 * 4, jaguar->r[op & 31]); } -void store_rn_r15n(jaguar_state *jaguar, UINT16 op) +void store_rn_r15n(jaguar_cpu_state *jaguar, UINT16 op) { UINT32 r1 = convert_zero[(op >> 5) & 31]; WRITELONG(jaguar, jaguar->r[15] + r1 * 4, jaguar->r[op & 31]); } -void store_rn_r14rn(jaguar_state *jaguar, UINT16 op) +void store_rn_r14rn(jaguar_cpu_state *jaguar, UINT16 op) { UINT32 r1 = jaguar->r[(op >> 5) & 31]; WRITELONG(jaguar, jaguar->r[14] + r1, jaguar->r[op & 31]); } -void store_rn_r15rn(jaguar_state *jaguar, UINT16 op) +void store_rn_r15rn(jaguar_cpu_state *jaguar, UINT16 op) { UINT32 r1 = jaguar->r[(op >> 5) & 31]; WRITELONG(jaguar, jaguar->r[15] + r1, jaguar->r[op & 31]); } -void storeb_rn_rn(jaguar_state *jaguar, UINT16 op) +void storeb_rn_rn(jaguar_cpu_state *jaguar, UINT16 op) { UINT32 r1 = jaguar->r[(op >> 5) & 31]; WRITEBYTE(jaguar, r1, jaguar->r[op & 31]); } -void storew_rn_rn(jaguar_state *jaguar, UINT16 op) +void storew_rn_rn(jaguar_cpu_state *jaguar, UINT16 op) { UINT32 r1 = jaguar->r[(op >> 5) & 31]; WRITEWORD(jaguar, r1, jaguar->r[op & 31]); } -void storep_rn_rn(jaguar_state *jaguar, UINT16 op) /* GPU only */ +void storep_rn_rn(jaguar_cpu_state *jaguar, UINT16 op) /* GPU only */ { UINT32 r1 = jaguar->r[(op >> 5) & 31]; WRITELONG(jaguar, r1, jaguar->ctrl[G_HIDATA]); WRITELONG(jaguar, r1+4, jaguar->r[op & 31]); } -void sub_rn_rn(jaguar_state *jaguar, UINT16 op) +void sub_rn_rn(jaguar_cpu_state *jaguar, UINT16 op) { int dreg = op & 31; UINT32 r1 = jaguar->r[(op >> 5) & 31]; @@ -1178,7 +1177,7 @@ void sub_rn_rn(jaguar_state *jaguar, UINT16 op) CLR_ZNC(jaguar); SET_ZNC_SUB(jaguar, r2, r1, res); } -void subc_rn_rn(jaguar_state *jaguar, UINT16 op) +void subc_rn_rn(jaguar_cpu_state *jaguar, UINT16 op) { int dreg = op & 31; UINT32 r1 = jaguar->r[(op >> 5) & 31]; @@ -1188,7 +1187,7 @@ void subc_rn_rn(jaguar_state *jaguar, UINT16 op) CLR_ZNC(jaguar); SET_ZNC_SUB(jaguar, r2, r1, res); } -void subq_n_rn(jaguar_state *jaguar, UINT16 op) +void subq_n_rn(jaguar_cpu_state *jaguar, UINT16 op) { int dreg = op & 31; UINT32 r1 = convert_zero[(op >> 5) & 31]; @@ -1198,7 +1197,7 @@ void subq_n_rn(jaguar_state *jaguar, UINT16 op) CLR_ZNC(jaguar); SET_ZNC_SUB(jaguar, r2, r1, res); } -void subqmod_n_rn(jaguar_state *jaguar, UINT16 op) /* DSP only */ +void subqmod_n_rn(jaguar_cpu_state *jaguar, UINT16 op) /* DSP only */ { int dreg = op & 31; UINT32 r1 = convert_zero[(op >> 5) & 31]; @@ -1209,7 +1208,7 @@ void subqmod_n_rn(jaguar_state *jaguar, UINT16 op) /* DSP only */ CLR_ZNC(jaguar); SET_ZNC_SUB(jaguar, r2, r1, res); } -void subqt_n_rn(jaguar_state *jaguar, UINT16 op) +void subqt_n_rn(jaguar_cpu_state *jaguar, UINT16 op) { int dreg = op & 31; UINT32 r1 = convert_zero[(op >> 5) & 31]; @@ -1218,7 +1217,7 @@ void subqt_n_rn(jaguar_state *jaguar, UINT16 op) jaguar->r[dreg] = res; } -void xor_rn_rn(jaguar_state *jaguar, UINT16 op) +void xor_rn_rn(jaguar_cpu_state *jaguar, UINT16 op) { int dreg = op & 31; UINT32 r1 = jaguar->r[(op >> 5) & 31]; @@ -1236,7 +1235,7 @@ void xor_rn_rn(jaguar_state *jaguar, UINT16 op) UINT32 jaguargpu_ctrl_r(device_t *device, offs_t offset) { - jaguar_state *jaguar = get_safe_token(device); + jaguar_cpu_state *jaguar = get_safe_token(device); if (LOG_GPU_IO) logerror("GPU read register @ F021%02X\n", offset * 4); @@ -1246,7 +1245,7 @@ UINT32 jaguargpu_ctrl_r(device_t *device, offs_t offset) void jaguargpu_ctrl_w(device_t *device, offs_t offset, UINT32 data, UINT32 mem_mask) { - jaguar_state *jaguar = get_safe_token(device); + jaguar_cpu_state *jaguar = get_safe_token(device); UINT32 oldval, newval; if (LOG_GPU_IO && offset != G_HIDATA) @@ -1332,7 +1331,7 @@ void jaguargpu_ctrl_w(device_t *device, offs_t offset, UINT32 data, UINT32 mem_m UINT32 jaguardsp_ctrl_r(device_t *device, offs_t offset) { - jaguar_state *jaguar = get_safe_token(device); + jaguar_cpu_state *jaguar = get_safe_token(device); if (LOG_DSP_IO && offset != D_FLAGS) logerror("DSP read register @ F1A1%02X\n", offset * 4); @@ -1344,7 +1343,7 @@ UINT32 jaguardsp_ctrl_r(device_t *device, offs_t offset) void jaguardsp_ctrl_w(device_t *device, offs_t offset, UINT32 data, UINT32 mem_mask) { - jaguar_state *jaguar = get_safe_token(device); + jaguar_cpu_state *jaguar = get_safe_token(device); UINT32 oldval, newval; if (LOG_DSP_IO && offset != D_FLAGS) @@ -1431,7 +1430,7 @@ void jaguardsp_ctrl_w(device_t *device, offs_t offset, UINT32 data, UINT32 mem_m static CPU_SET_INFO( jaguargpu ) { - jaguar_state *jaguar = get_safe_token(device); + jaguar_cpu_state *jaguar = get_safe_token(device); switch (state) { /* --- the following bits of info are set as 64-bit signed integers --- */ @@ -1489,11 +1488,11 @@ static CPU_SET_INFO( jaguargpu ) CPU_GET_INFO( jaguargpu ) { - jaguar_state *jaguar = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL; + jaguar_cpu_state *jaguar = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL; switch (state) { /* --- the following bits of info are returned as 64-bit signed integers --- */ - case CPUINFO_INT_CONTEXT_SIZE: info->i = sizeof(jaguar_state); break; + case CPUINFO_INT_CONTEXT_SIZE: info->i = sizeof(jaguar_cpu_state); break; case CPUINFO_INT_INPUT_LINES: info->i = 5; break; case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; case CPUINFO_INT_ENDIANNESS: info->i = ENDIANNESS_BIG; break; @@ -1628,7 +1627,7 @@ CPU_GET_INFO( jaguargpu ) static CPU_SET_INFO( jaguardsp ) { - jaguar_state *jaguar = get_safe_token(device); + jaguar_cpu_state *jaguar = get_safe_token(device); switch (state) { /* --- the following bits of info are set as 64-bit signed integers --- */ @@ -1642,7 +1641,7 @@ static CPU_SET_INFO( jaguardsp ) CPU_GET_INFO( jaguardsp ) { - jaguar_state *jaguar = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL; + jaguar_cpu_state *jaguar = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL; switch (state) { /* --- the following bits of info are returned as 64-bit signed integers --- */ diff --git a/src/emu/cpu/jaguar/jaguar.h b/src/emu/cpu/jaguar/jaguar.h index a29da2384d4..4247c714f7c 100644 --- a/src/emu/cpu/jaguar/jaguar.h +++ b/src/emu/cpu/jaguar/jaguar.h @@ -74,8 +74,7 @@ enum typedef void (*jaguar_int_func)(device_t *device); -typedef struct _jaguar_cpu_config jaguar_cpu_config; -struct _jaguar_cpu_config +struct jaguar_cpu_config { jaguar_int_func cpu_int_callback; }; diff --git a/src/emu/cpu/konami/konami.c b/src/emu/cpu/konami/konami.c index ef23896fa05..7fa2ebc27d8 100644 --- a/src/emu/cpu/konami/konami.c +++ b/src/emu/cpu/konami/konami.c @@ -43,8 +43,7 @@ #define LOG(x) do { if (VERBOSE) logerror x; } while (0) /* Konami Registers */ -typedef struct _konami_state konami_state; -struct _konami_state +struct konami_state { PAIR pc; /* Program counter */ PAIR ppc; /* Previous program counter */ diff --git a/src/emu/cpu/lh5801/lh5801.c b/src/emu/cpu/lh5801/lh5801.c index 7faf85f0fee..ee0ee95c259 100644 --- a/src/emu/cpu/lh5801/lh5801.c +++ b/src/emu/cpu/lh5801/lh5801.c @@ -54,8 +54,7 @@ enum LH5801_IRQ_STATE }; -typedef struct _lh5801_state lh5801_state; -struct _lh5801_state +struct lh5801_state { const lh5801_cpu_core *config; legacy_cpu_device *device; diff --git a/src/emu/cpu/lh5801/lh5801.h b/src/emu/cpu/lh5801/lh5801.h index 78bc01a68c5..c6362b94ed9 100644 --- a/src/emu/cpu/lh5801/lh5801.h +++ b/src/emu/cpu/lh5801/lh5801.h @@ -67,8 +67,7 @@ pc 8bit typedef UINT8 (*lh5801_in_func)(device_t *device); -typedef struct _lh5801_cpu_core lh5801_cpu_core; -struct _lh5801_cpu_core +struct lh5801_cpu_core { lh5801_in_func in; }; diff --git a/src/emu/cpu/m37710/m37710cm.h b/src/emu/cpu/m37710/m37710cm.h index eb4f96db386..8ce598e0615 100644 --- a/src/emu/cpu/m37710/m37710cm.h +++ b/src/emu/cpu/m37710/m37710cm.h @@ -72,8 +72,7 @@ INLINE int MAKE_INT_8(int A) {return (A & 0x80) ? A | ~0xff : A & 0xff;} /* ======================================================================== */ /* CPU Structure */ -typedef struct _m37710i_cpu_struct m37710i_cpu_struct; -struct _m37710i_cpu_struct +struct m37710i_cpu_struct { uint a; /* Accumulator */ uint b; /* holds high byte of accumulator */ diff --git a/src/emu/cpu/m6502/m6502.h b/src/emu/cpu/m6502/m6502.h index 3df71ea0df3..eba57128ce8 100644 --- a/src/emu/cpu/m6502/m6502.h +++ b/src/emu/cpu/m6502/m6502.h @@ -56,8 +56,7 @@ enum #define M6510_INTERFACE(name) \ const m6502_interface (name) = -typedef struct _m6502_interface m6502_interface; -struct _m6502_interface +struct m6502_interface { devcb_read8 read_indexed_func; devcb_write8 write_indexed_func; diff --git a/src/emu/cpu/m6800/m6800.c b/src/emu/cpu/m6800/m6800.c index 2ba284bae5c..abaefffb24b 100644 --- a/src/emu/cpu/m6800/m6800.c +++ b/src/emu/cpu/m6800/m6800.c @@ -106,8 +106,7 @@ enum #endif /* 6800 Registers */ -typedef struct _m6800_state m6800_state; -struct _m6800_state +struct m6800_state { // int subtype; /* CPU subtype */ PAIR ppc; /* Previous program counter */ diff --git a/src/emu/cpu/m6800/m6800.h b/src/emu/cpu/m6800/m6800.h index 19f10fa6d67..129087f286f 100644 --- a/src/emu/cpu/m6800/m6800.h +++ b/src/emu/cpu/m6800/m6800.h @@ -6,8 +6,7 @@ #define __M6800_H__ -typedef struct _m6801_interface m6801_interface; -struct _m6801_interface +struct m6801_interface { devcb_write_line out_sc2_func; }; diff --git a/src/emu/cpu/m6809/m6809.c b/src/emu/cpu/m6809/m6809.c index 0d950fb627d..318ec6e568e 100644 --- a/src/emu/cpu/m6809/m6809.c +++ b/src/emu/cpu/m6809/m6809.c @@ -79,8 +79,7 @@ #define LOG(x) do { if (VERBOSE) logerror x; } while (0) /* 6809 Registers */ -typedef struct _m68_state_t m68_state_t; -struct _m68_state_t +struct m68_state_t { PAIR pc; /* Program counter */ PAIR ppc; /* Previous program counter */ diff --git a/src/emu/cpu/m6809/m6809.h b/src/emu/cpu/m6809/m6809.h index 1b1381322f8..a7572531a35 100644 --- a/src/emu/cpu/m6809/m6809.h +++ b/src/emu/cpu/m6809/m6809.h @@ -23,8 +23,7 @@ DECLARE_LEGACY_CPU_DEVICE(M6809E, m6809e); CPU_DISASSEMBLE( m6809 ); -typedef struct _m6809_config m6809_config; -struct _m6809_config +struct m6809_config { UINT8 encrypt_only_first_byte; /* encrypt only the first byte in 10 xx and 11 xx opcodes */ }; diff --git a/src/emu/cpu/mb86233/mb86233.c b/src/emu/cpu/mb86233/mb86233.c index 51eaa8862d2..3607688334f 100644 --- a/src/emu/cpu/mb86233/mb86233.c +++ b/src/emu/cpu/mb86233/mb86233.c @@ -30,8 +30,7 @@ typedef union float f; } MB86233_REG; -typedef struct _mb86233_state mb86233_state; -struct _mb86233_state +struct mb86233_state { UINT16 pc; MB86233_REG a; diff --git a/src/emu/cpu/mb86233/mb86233.h b/src/emu/cpu/mb86233/mb86233.h index 19631f900cc..03dae885dab 100644 --- a/src/emu/cpu/mb86233/mb86233.h +++ b/src/emu/cpu/mb86233/mb86233.h @@ -45,8 +45,7 @@ enum typedef int (*mb86233_fifo_read_func)(device_t *device, UINT32 *data); typedef void (*mb86233_fifo_write_func)(device_t *device, UINT32 data); -typedef struct _mb86233_cpu_core mb86233_cpu_core; -struct _mb86233_cpu_core +struct mb86233_cpu_core { mb86233_fifo_read_func fifo_read_cb; mb86233_fifo_write_func fifo_write_cb; diff --git a/src/emu/cpu/mb88xx/mb88xx.c b/src/emu/cpu/mb88xx/mb88xx.c index 4c83a5e9a65..a02799c1da5 100644 --- a/src/emu/cpu/mb88xx/mb88xx.c +++ b/src/emu/cpu/mb88xx/mb88xx.c @@ -37,8 +37,7 @@ STRUCTURES & TYPEDEFS ***************************************************************************/ -typedef struct _mb88_state mb88_state; -struct _mb88_state +struct mb88_state { UINT8 PC; /* Program Counter: 6 bits */ UINT8 PA; /* Page Address: 4 bits */ diff --git a/src/emu/cpu/mb88xx/mb88xx.h b/src/emu/cpu/mb88xx/mb88xx.h index 053806918f7..5976ad00a60 100644 --- a/src/emu/cpu/mb88xx/mb88xx.h +++ b/src/emu/cpu/mb88xx/mb88xx.h @@ -54,8 +54,7 @@ enum CONFIG STRUCTURE ***************************************************************************/ -typedef struct _mb88_cpu_core mb88_cpu_core; -struct _mb88_cpu_core +struct mb88_cpu_core { UINT8 *PLA_config; /* PLA configuration (32 byte values), if NULL assume direct output */ }; diff --git a/src/emu/cpu/mc68hc11/hc11ops.h b/src/emu/cpu/mc68hc11/hc11ops.h index dea89b70ea9..20238f0bcb3 100644 --- a/src/emu/cpu/mc68hc11/hc11ops.h +++ b/src/emu/cpu/mc68hc11/hc11ops.h @@ -1,5 +1,4 @@ -typedef struct _hc11_opcode_list_struct hc11_opcode_list_struct; -struct _hc11_opcode_list_struct +struct hc11_opcode_list_struct { int page; int opcode; diff --git a/src/emu/cpu/mc68hc11/mc68hc11.c b/src/emu/cpu/mc68hc11/mc68hc11.c index 855d3180b08..6e12288a570 100644 --- a/src/emu/cpu/mc68hc11/mc68hc11.c +++ b/src/emu/cpu/mc68hc11/mc68hc11.c @@ -36,8 +36,7 @@ enum static const int div_tab[4] = { 1, 4, 8, 16 }; -typedef struct _hc11_state hc11_state; -struct _hc11_state +struct hc11_state { union { struct { diff --git a/src/emu/cpu/mc68hc11/mc68hc11.h b/src/emu/cpu/mc68hc11/mc68hc11.h index 06bb34086d0..dd31004c7e3 100644 --- a/src/emu/cpu/mc68hc11/mc68hc11.h +++ b/src/emu/cpu/mc68hc11/mc68hc11.h @@ -31,8 +31,7 @@ DECLARE_LEGACY_CPU_DEVICE(MC68HC11, mc68hc11); #define MC68HC11_IRQ_LINE 0 #define MC68HC11_TOC1_LINE 1 -typedef struct _hc11_config hc11_config; -struct _hc11_config +struct hc11_config { int has_extended_io; // I/O enable flag int internal_ram_size; diff --git a/src/emu/cpu/mcs48/mcs48.c b/src/emu/cpu/mcs48/mcs48.c index e5e294d8a33..a1b273c1660 100644 --- a/src/emu/cpu/mcs48/mcs48.c +++ b/src/emu/cpu/mcs48/mcs48.c @@ -118,8 +118,7 @@ T0 output clock ***************************************************************************/ /* live processor state */ -typedef struct _mcs48_state mcs48_state; -struct _mcs48_state +struct mcs48_state { UINT16 prevpc; /* 16-bit previous program counter */ UINT16 pc; /* 16-bit program counter */ diff --git a/src/emu/cpu/mcs51/mcs51.c b/src/emu/cpu/mcs51/mcs51.c index 3cc5e760eed..4f231851d0e 100644 --- a/src/emu/cpu/mcs51/mcs51.c +++ b/src/emu/cpu/mcs51/mcs51.c @@ -234,8 +234,7 @@ enum TYPE DEFINITIONS ***************************************************************************/ -typedef struct _mcs51_uart mcs51_uart; -struct _mcs51_uart +struct mcs51_uart { UINT8 data_out; //Data to send out UINT8 bits_to_send; //How many bits left to send when transmitting out the serial port @@ -246,8 +245,7 @@ struct _mcs51_uart UINT8 delay_cycles; //Gross Hack; }; -typedef struct _mcs51_state_t mcs51_state_t; -struct _mcs51_state_t +struct mcs51_state_t { //Internal stuff UINT16 ppc; //previous pc diff --git a/src/emu/cpu/mcs51/mcs51.h b/src/emu/cpu/mcs51/mcs51.h index dbc8ccaa7f8..2eeb072a6e3 100644 --- a/src/emu/cpu/mcs51/mcs51.h +++ b/src/emu/cpu/mcs51/mcs51.h @@ -77,8 +77,7 @@ enum ***************************************************************************/ /* configuration of the DS5002FP */ -typedef struct _ds5002fp_config ds5002fp_config; -struct _ds5002fp_config +struct ds5002fp_config { UINT8 mcon; /* bootstrap loader MCON register */ UINT8 rpctl; /* bootstrap loader RPCTL register */ diff --git a/src/emu/cpu/mips/mips3.h b/src/emu/cpu/mips/mips3.h index 996cecf5a28..69d5d5a265a 100644 --- a/src/emu/cpu/mips/mips3.h +++ b/src/emu/cpu/mips/mips3.h @@ -210,8 +210,7 @@ enum STRUCTURES ***************************************************************************/ -typedef struct _mips3_config mips3_config; -struct _mips3_config +struct mips3_config { size_t icache; /* code cache size */ size_t dcache; /* data cache size */ diff --git a/src/emu/cpu/mips/mips3com.h b/src/emu/cpu/mips/mips3com.h index f365ab58a92..032ad248f9e 100644 --- a/src/emu/cpu/mips/mips3com.h +++ b/src/emu/cpu/mips/mips3com.h @@ -167,8 +167,7 @@ typedef enum _mips3_flavor mips3_flavor; ***************************************************************************/ /* MIPS3 TLB entry */ -typedef struct _mips3_tlb_entry mips3_tlb_entry; -struct _mips3_tlb_entry +struct mips3_tlb_entry { UINT64 page_mask; UINT64 entry_hi; @@ -181,8 +180,7 @@ typedef struct _mips3imp_state mips3imp_state; /* MIPS3 state */ -typedef struct _mips3_state mips3_state; -struct _mips3_state +struct mips3_state { /* core registers */ UINT32 pc; diff --git a/src/emu/cpu/mips/mips3drc.c b/src/emu/cpu/mips/mips3drc.c index 8e64d4dfa5f..609e92732c1 100644 --- a/src/emu/cpu/mips/mips3drc.c +++ b/src/emu/cpu/mips/mips3drc.c @@ -150,8 +150,7 @@ using namespace uml; ***************************************************************************/ /* fast RAM info */ -typedef struct _fast_ram_info fast_ram_info; -struct _fast_ram_info +struct fast_ram_info { offs_t start; /* start of the RAM block */ offs_t end; /* end of the RAM block */ @@ -161,8 +160,7 @@ struct _fast_ram_info /* hotspot info */ -typedef struct _hotspot_info hotspot_info; -struct _hotspot_info +struct hotspot_info { offs_t pc; /* PC to consider */ UINT32 opcode; /* required opcode at that PC */ @@ -171,8 +169,7 @@ struct _hotspot_info /* internal compiler state */ -typedef struct _compiler_state compiler_state; -struct _compiler_state +struct compiler_state { UINT32 cycles; /* accumulated cycles */ UINT8 checkints; /* need to check interrupts before next instruction */ diff --git a/src/emu/cpu/mips/r3000.c b/src/emu/cpu/mips/r3000.c index 379fa445b0f..e8c93795d44 100644 --- a/src/emu/cpu/mips/r3000.c +++ b/src/emu/cpu/mips/r3000.c @@ -116,8 +116,7 @@ CPU_DISASSEMBLE( r3000le ); ***************************************************************************/ /* R3000 Registers */ -typedef struct _r3000_state r3000_state; -struct _r3000_state +struct r3000_state { /* core registers */ UINT32 pc; diff --git a/src/emu/cpu/mips/r3000.h b/src/emu/cpu/mips/r3000.h index d2c6789fbb3..f29ccd98383 100644 --- a/src/emu/cpu/mips/r3000.h +++ b/src/emu/cpu/mips/r3000.h @@ -46,8 +46,7 @@ enum STRUCTURES ***************************************************************************/ -typedef struct _r3000_cpu_core r3000_cpu_core; -struct _r3000_cpu_core +struct r3000_cpu_core { UINT8 hasfpu; /* 1 if we have an FPU, 0 otherwise */ size_t icache; /* code cache size */ diff --git a/src/emu/cpu/mn10200/mn10200.c b/src/emu/cpu/mn10200/mn10200.c index 7729969761a..279b995a872 100644 --- a/src/emu/cpu/mn10200/mn10200.c +++ b/src/emu/cpu/mn10200/mn10200.c @@ -22,8 +22,7 @@ extern int mn102_disassemble(char *buffer, UINT32 pc, const UINT8 *oprom); -typedef struct _mn102_info mn102_info; -struct _mn102_info +struct mn102_info { // The UINT32s are really UINT24 UINT32 pc; diff --git a/src/emu/cpu/nec/nec.h b/src/emu/cpu/nec/nec.h index d0a6e4816c5..06a624cf612 100644 --- a/src/emu/cpu/nec/nec.h +++ b/src/emu/cpu/nec/nec.h @@ -1,37 +1,36 @@ -/* ASG 971222 -- rewrote this interface */
-#ifndef __NEC_H_
-#define __NEC_H_
-
-
-typedef struct _nec_config nec_config;
-struct _nec_config
-{
- const UINT8* v25v35_decryptiontable; // internal decryption table
-};
-
-#define NEC_INPUT_LINE_INTP0 10
-#define NEC_INPUT_LINE_INTP1 11
-#define NEC_INPUT_LINE_INTP2 12
-#define NEC_INPUT_LINE_POLL 20
-
-#define V25_PORT_P0 0x10000
-#define V25_PORT_P1 0x10002
-#define V25_PORT_P2 0x10004
-#define V25_PORT_PT 0x10006
-
-enum
-{
- NEC_PC=0,
- NEC_IP, NEC_AW, NEC_CW, NEC_DW, NEC_BW, NEC_SP, NEC_BP, NEC_IX, NEC_IY,
- NEC_FLAGS, NEC_ES, NEC_CS, NEC_SS, NEC_DS,
- NEC_PENDING
-};
-
-/* Public functions */
-DECLARE_LEGACY_CPU_DEVICE(V20, v20);
-DECLARE_LEGACY_CPU_DEVICE(V25, v25);
-DECLARE_LEGACY_CPU_DEVICE(V30, v30);
-DECLARE_LEGACY_CPU_DEVICE(V33, v33);
-DECLARE_LEGACY_CPU_DEVICE(V35, v35);
-
-#endif
+/* ASG 971222 -- rewrote this interface */ +#ifndef __NEC_H_ +#define __NEC_H_ + + +struct nec_config +{ + const UINT8* v25v35_decryptiontable; // internal decryption table +}; + +#define NEC_INPUT_LINE_INTP0 10 +#define NEC_INPUT_LINE_INTP1 11 +#define NEC_INPUT_LINE_INTP2 12 +#define NEC_INPUT_LINE_POLL 20 + +#define V25_PORT_P0 0x10000 +#define V25_PORT_P1 0x10002 +#define V25_PORT_P2 0x10004 +#define V25_PORT_PT 0x10006 + +enum +{ + NEC_PC=0, + NEC_IP, NEC_AW, NEC_CW, NEC_DW, NEC_BW, NEC_SP, NEC_BP, NEC_IX, NEC_IY, + NEC_FLAGS, NEC_ES, NEC_CS, NEC_SS, NEC_DS, + NEC_PENDING +}; + +/* Public functions */ +DECLARE_LEGACY_CPU_DEVICE(V20, v20); +DECLARE_LEGACY_CPU_DEVICE(V25, v25); +DECLARE_LEGACY_CPU_DEVICE(V30, v30); +DECLARE_LEGACY_CPU_DEVICE(V33, v33); +DECLARE_LEGACY_CPU_DEVICE(V35, v35); + +#endif diff --git a/src/emu/cpu/nec/necdasm.c b/src/emu/cpu/nec/necdasm.c index ba4662a598b..9f9631a2898 100644 --- a/src/emu/cpu/nec/necdasm.c +++ b/src/emu/cpu/nec/necdasm.c @@ -7,8 +7,7 @@ #include "emu.h" -typedef struct _nec_config nec_config; -struct _nec_config +struct nec_config { const UINT8* v25v35_decryptiontable; // internal decryption table }; diff --git a/src/emu/cpu/nec/necpriv.h b/src/emu/cpu/nec/necpriv.h index f59cb7523bd..e0ffe8297de 100644 --- a/src/emu/cpu/nec/necpriv.h +++ b/src/emu/cpu/nec/necpriv.h @@ -33,8 +33,7 @@ typedef union UINT8 b[16]; /* or as 8 bit registers */ } necbasicregs; -typedef struct _nec_state_t nec_state_t; -struct _nec_state_t +struct nec_state_t { necbasicregs regs; offs_t fetch_xor; diff --git a/src/emu/cpu/nec/v25priv.h b/src/emu/cpu/nec/v25priv.h index 3f8eca8c541..685792bf2ff 100644 --- a/src/emu/cpu/nec/v25priv.h +++ b/src/emu/cpu/nec/v25priv.h @@ -66,8 +66,7 @@ typedef union UINT8 b[256]; } internalram; -typedef struct _v25_state_t v25_state_t; -struct _v25_state_t +struct v25_state_t { internalram ram; offs_t fetch_xor; diff --git a/src/emu/cpu/pdp1/pdp1.c b/src/emu/cpu/pdp1/pdp1.c index e5c37532c87..272a8e8b4d5 100644 --- a/src/emu/cpu/pdp1/pdp1.c +++ b/src/emu/cpu/pdp1/pdp1.c @@ -348,8 +348,7 @@ /* PDP1 Registers */ -typedef struct _pdp1_state pdp1_state; -struct _pdp1_state +struct pdp1_state { /* processor registers */ UINT32 pc; /* program counter (12, 15 or 16 bits) */ diff --git a/src/emu/cpu/pdp1/pdp1.h b/src/emu/cpu/pdp1/pdp1.h index ddf6d9b2fe5..e48216db0ea 100644 --- a/src/emu/cpu/pdp1/pdp1.h +++ b/src/emu/cpu/pdp1/pdp1.h @@ -27,8 +27,7 @@ typedef void (*pdp1_read_binary_word_func)(device_t *device); typedef void (*pdp1_io_sc_func)(device_t *device); -typedef struct _pdp1_reset_param_t pdp1_reset_param_t; -struct _pdp1_reset_param_t +struct pdp1_reset_param_t { /* callbacks for iot instructions (required for any I/O) */ pdp1_extern_iot_func extern_iot[64]; diff --git a/src/emu/cpu/pdp1/tx0.c b/src/emu/cpu/pdp1/tx0.c index 43d59f42997..dadf0cde60f 100644 --- a/src/emu/cpu/pdp1/tx0.c +++ b/src/emu/cpu/pdp1/tx0.c @@ -21,8 +21,7 @@ static void pulse_reset(device_t *device); /* TX-0 Registers */ -typedef struct _tx0_state tx0_state; -struct _tx0_state +struct tx0_state { const tx0_reset_param_t *iface; diff --git a/src/emu/cpu/pdp1/tx0.h b/src/emu/cpu/pdp1/tx0.h index 3e94f8f5a0b..60139e2a886 100644 --- a/src/emu/cpu/pdp1/tx0.h +++ b/src/emu/cpu/pdp1/tx0.h @@ -23,8 +23,7 @@ enum #define tx0_pulse_reset(cpudevice) (cpudevice)->state().set_state_int(TX0_RESET, 0) #define tx0_pulse_io_complete(cpudevice) (cpudevice)->state().set_state_int(TX0_IO_COMPLETE, 0) -typedef struct _tx0_reset_param_t tx0_reset_param_t; -struct _tx0_reset_param_t +struct tx0_reset_param_t { /* 8 standard I/O handlers: 0: cpy (8kW only) diff --git a/src/emu/cpu/pic16c5x/pic16c5x.c b/src/emu/cpu/pic16c5x/pic16c5x.c index 4084df39262..b5a215f575a 100644 --- a/src/emu/cpu/pic16c5x/pic16c5x.c +++ b/src/emu/cpu/pic16c5x/pic16c5x.c @@ -67,8 +67,7 @@ -typedef struct _pic16c5x_state pic16c5x_state; -struct _pic16c5x_state +struct pic16c5x_state { /******************** CPU Internal Registers *******************/ UINT16 PC; @@ -117,8 +116,7 @@ INLINE pic16c5x_state *get_safe_token(device_t *device) /* opcode table entry */ -typedef struct _pic16c5x_opcode pic16c5x_opcode; -struct _pic16c5x_opcode +struct pic16c5x_opcode { UINT8 cycles; void (*function)(pic16c5x_state *); diff --git a/src/emu/cpu/pic16c62x/pic16c62x.c b/src/emu/cpu/pic16c62x/pic16c62x.c index 5c7483eeee7..4894e428db3 100644 --- a/src/emu/cpu/pic16c62x/pic16c62x.c +++ b/src/emu/cpu/pic16c62x/pic16c62x.c @@ -57,8 +57,7 @@ -typedef struct _pic16c62x_state pic16c62x_state; -struct _pic16c62x_state +struct pic16c62x_state { /******************** CPU Internal Registers *******************/ UINT16 PC; @@ -109,15 +108,13 @@ INLINE pic16c62x_state *get_safe_token(device_t *device) /* opcode table entry */ -typedef struct _pic16c62x_opcode pic16c62x_opcode; -struct _pic16c62x_opcode +struct pic16c62x_opcode { UINT8 cycles; void (*function)(pic16c62x_state *); }; /* instruction list entry */ -typedef struct _pic16c62x_instruction pic16c62x_instruction; -struct _pic16c62x_instruction +struct pic16c62x_instruction { char *format; void (*function)(pic16c62x_state *); diff --git a/src/emu/cpu/powerpc/ppc.h b/src/emu/cpu/powerpc/ppc.h index f7eea2baebb..9121c779706 100644 --- a/src/emu/cpu/powerpc/ppc.h +++ b/src/emu/cpu/powerpc/ppc.h @@ -164,8 +164,7 @@ enum typedef void (*ppc4xx_spu_tx_handler)(device_t *device, UINT8 data); -typedef struct _powerpc_config powerpc_config; -struct _powerpc_config +struct powerpc_config { UINT32 bus_frequency; read32_device_func dcr_read_func; diff --git a/src/emu/cpu/powerpc/ppccom.h b/src/emu/cpu/powerpc/ppccom.h index d298ef59d52..e474e4fa6ec 100644 --- a/src/emu/cpu/powerpc/ppccom.h +++ b/src/emu/cpu/powerpc/ppccom.h @@ -491,8 +491,7 @@ enum ***************************************************************************/ /* PowerPC 4XX-specific serial port state */ -typedef struct _ppc4xx_spu_state ppc4xx_spu_state; -struct _ppc4xx_spu_state +struct ppc4xx_spu_state { UINT8 regs[9]; UINT8 txbuf; @@ -509,8 +508,7 @@ typedef struct _ppcimp_state ppcimp_state; /* PowerPC state */ -typedef struct _powerpc_state powerpc_state; -struct _powerpc_state +struct powerpc_state { /* core registers */ UINT32 pc; diff --git a/src/emu/cpu/powerpc/ppcdrc.c b/src/emu/cpu/powerpc/ppcdrc.c index 897580a704d..5cd33a0b256 100644 --- a/src/emu/cpu/powerpc/ppcdrc.c +++ b/src/emu/cpu/powerpc/ppcdrc.c @@ -129,8 +129,7 @@ extern offs_t ppc_dasm_one(char *buffer, UINT32 pc, UINT32 op); ***************************************************************************/ /* fast RAM info */ -typedef struct _fast_ram_info fast_ram_info; -struct _fast_ram_info +struct fast_ram_info { offs_t start; /* start of the RAM block */ offs_t end; /* end of the RAM block */ @@ -140,8 +139,7 @@ struct _fast_ram_info /* hotspot info */ -typedef struct _hotspot_info hotspot_info; -struct _hotspot_info +struct hotspot_info { offs_t pc; /* PC to consider */ UINT32 opcode; /* required opcode at that PC */ @@ -150,8 +148,7 @@ struct _hotspot_info /* internal compiler state */ -typedef struct _compiler_state compiler_state; -struct _compiler_state +struct compiler_state { UINT32 cycles; /* accumulated cycles */ UINT8 checkints; /* need to check interrupts before next instruction */ diff --git a/src/emu/cpu/pps4/pps4.c b/src/emu/cpu/pps4/pps4.c index cfb8f26ac94..7aa44f631fe 100644 --- a/src/emu/cpu/pps4/pps4.c +++ b/src/emu/cpu/pps4/pps4.c @@ -19,8 +19,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _pps4_state pps4_state; -struct _pps4_state +struct pps4_state { UINT8 A; // Accumulator UINT8 X; diff --git a/src/emu/cpu/psx/dma.h b/src/emu/cpu/psx/dma.h index e40dfc20be8..64ef298ccf5 100644 --- a/src/emu/cpu/psx/dma.h +++ b/src/emu/cpu/psx/dma.h @@ -17,8 +17,7 @@ extern const device_type PSX_DMA; typedef delegate<void (UINT32, INT32)> psx_dma_read_delegate; typedef delegate<void (UINT32, INT32)> psx_dma_write_delegate; -typedef struct _psx_dma_channel psx_dma_channel; -struct _psx_dma_channel +struct psx_dma_channel { UINT32 n_base; UINT32 n_blockcontrol; diff --git a/src/emu/cpu/psx/rcnt.h b/src/emu/cpu/psx/rcnt.h index 759ee518fad..5417d12f5e0 100644 --- a/src/emu/cpu/psx/rcnt.h +++ b/src/emu/cpu/psx/rcnt.h @@ -23,8 +23,7 @@ extern const device_type PSX_RCNT; #define PSX_RC_CLC ( 0x100 ) #define PSX_RC_DIV ( 0x200 ) -typedef struct _psx_root psx_root; -struct _psx_root +struct psx_root { emu_timer *timer; UINT16 n_count; diff --git a/src/emu/cpu/psx/sio.h b/src/emu/cpu/psx/sio.h index 34f504b778e..412fa14f7a0 100644 --- a/src/emu/cpu/psx/sio.h +++ b/src/emu/cpu/psx/sio.h @@ -41,8 +41,7 @@ typedef void ( *psx_sio_handler )( running_machine &, int ); #define SIO_CONTROL_DSR_IENA ( 1 << 12 ) #define SIO_CONTROL_DTR ( 1 << 13 ) -typedef struct _psx_sio psx_sio; -struct _psx_sio +struct psx_sio { UINT32 n_status; UINT32 n_mode; diff --git a/src/emu/cpu/rsp/rsp.h b/src/emu/cpu/rsp/rsp.h index c4a7a7679a3..1d0ae9ae50b 100644 --- a/src/emu/cpu/rsp/rsp.h +++ b/src/emu/cpu/rsp/rsp.h @@ -70,8 +70,7 @@ enum typedef void (*rsp_set_status_func)(device_t *device, UINT32 status); -typedef struct _rsp_config rsp_config; -struct _rsp_config +struct rsp_config { read32_device_func dp_reg_r; write32_device_func dp_reg_w; @@ -155,8 +154,7 @@ typedef union } ACCUMULATOR_REG; typedef struct _rspimp_state rspimp_state; -typedef struct _rsp_state rsp_state; -struct _rsp_state +struct rsp_state { const rsp_config *config; FILE *exec_output; diff --git a/src/emu/cpu/rsp/rspdrc.c b/src/emu/cpu/rsp/rspdrc.c index 4745b85f655..0d114f64600 100644 --- a/src/emu/cpu/rsp/rspdrc.c +++ b/src/emu/cpu/rsp/rspdrc.c @@ -82,8 +82,7 @@ extern offs_t rsp_dasm_one(char *buffer, offs_t pc, UINT32 op); ***************************************************************************/ /* fast RAM info */ -typedef struct _fast_ram_info fast_ram_info; -struct _fast_ram_info +struct fast_ram_info { offs_t start; /* start of the RAM block */ offs_t end; /* end of the RAM block */ @@ -93,8 +92,7 @@ struct _fast_ram_info /* internal compiler state */ -typedef struct _compiler_state compiler_state; -struct _compiler_state +struct compiler_state { UINT32 cycles; /* accumulated cycles */ UINT8 checkints; /* need to check interrupts before next instruction */ diff --git a/src/emu/cpu/s2650/s2650.c b/src/emu/cpu/s2650/s2650.c index 6121c70f39d..20a99fca9be 100644 --- a/src/emu/cpu/s2650/s2650.c +++ b/src/emu/cpu/s2650/s2650.c @@ -25,8 +25,7 @@ /* define this to expand all EA calculations inline */ #define INLINE_EA 1 -typedef struct _s2650_regs s2650_regs; -struct _s2650_regs { +struct s2650_regs { UINT16 ppc; /* previous program counter (page + iar) */ UINT16 page; /* 8K page select register (A14..A13) */ UINT16 iar; /* instruction address register (A12..A0) */ diff --git a/src/emu/cpu/saturn/saturn.c b/src/emu/cpu/saturn/saturn.c index f319500016f..ab953b6a6dd 100644 --- a/src/emu/cpu/saturn/saturn.c +++ b/src/emu/cpu/saturn/saturn.c @@ -52,8 +52,7 @@ typedef SaturnNib Saturn64[16]; /**************************************************************************** * The SATURN registers. ****************************************************************************/ -typedef struct _saturn_state saturn_state; -struct _saturn_state +struct saturn_state { saturn_cpu_core *config; diff --git a/src/emu/cpu/saturn/saturn.h b/src/emu/cpu/saturn/saturn.h index 1cb913e909b..5544e0bf553 100644 --- a/src/emu/cpu/saturn/saturn.h +++ b/src/emu/cpu/saturn/saturn.h @@ -50,8 +50,7 @@ HP38G 09/??/95 1LT8 Yorke #define SATURN_INT_IRQ 1 #define SATURN_INT_NMI 2 -typedef struct _saturn_cpu_core saturn_cpu_core; -struct _saturn_cpu_core +struct saturn_cpu_core { void (*out)(device_t*,int); int (*in)(device_t*); diff --git a/src/emu/cpu/sc61860/sc61860.c b/src/emu/cpu/sc61860/sc61860.c index b3219fe9fc6..377d81a337f 100644 --- a/src/emu/cpu/sc61860/sc61860.c +++ b/src/emu/cpu/sc61860/sc61860.c @@ -40,8 +40,7 @@ /**************************************************************************** * The 61860 registers. ****************************************************************************/ -typedef struct _sc61860_state sc61860_state; -struct _sc61860_state +struct sc61860_state { sc61860_cpu_core *config; UINT8 p, q, r; //7 bits only? diff --git a/src/emu/cpu/sc61860/sc61860.h b/src/emu/cpu/sc61860/sc61860.h index 16009bb0551..9961d228ecd 100644 --- a/src/emu/cpu/sc61860/sc61860.h +++ b/src/emu/cpu/sc61860/sc61860.h @@ -37,8 +37,7 @@ 64 kb external ram (first 8kbyte not seen for program execution?) */ -typedef struct _sc61860_cpu_core sc61860_cpu_core; -struct _sc61860_cpu_core +struct sc61860_cpu_core { int (*reset)(device_t *device); int (*brk)(device_t *device); diff --git a/src/emu/cpu/scmp/scmp.c b/src/emu/cpu/scmp/scmp.c index 3fcd25cf672..90d22cdba17 100644 --- a/src/emu/cpu/scmp/scmp.c +++ b/src/emu/cpu/scmp/scmp.c @@ -20,8 +20,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _scmp_state scmp_state; -struct _scmp_state +struct scmp_state { scmp_config config; PAIR PC; diff --git a/src/emu/cpu/scmp/scmp.h b/src/emu/cpu/scmp/scmp.h index c0ff8a4c8ad..9a69d0b1280 100644 --- a/src/emu/cpu/scmp/scmp.h +++ b/src/emu/cpu/scmp/scmp.h @@ -17,8 +17,7 @@ enum /*************************************************************************** TYPE DEFINITIONS ***************************************************************************/ -typedef struct _scmp_config scmp_config; -struct _scmp_config +struct scmp_config { devcb_write8 flag_out_func; devcb_write_line sout_func; diff --git a/src/emu/cpu/se3208/se3208.c b/src/emu/cpu/se3208/se3208.c index a6ac611a52f..5653c60958a 100644 --- a/src/emu/cpu/se3208/se3208.c +++ b/src/emu/cpu/se3208/se3208.c @@ -10,8 +10,7 @@ */ -typedef struct _se3208_state_t se3208_state_t; -struct _se3208_state_t +struct se3208_state_t { //GPR UINT32 R[8]; diff --git a/src/emu/cpu/sh2/sh2.h b/src/emu/cpu/sh2/sh2.h index 8ed16c75aa8..151a917d614 100644 --- a/src/emu/cpu/sh2/sh2.h +++ b/src/emu/cpu/sh2/sh2.h @@ -57,8 +57,7 @@ enum SH2_R8, SH2_R9, SH2_R10, SH2_R11, SH2_R12, SH2_R13, SH2_R14, SH2_R15, SH2_EA }; -typedef struct _sh2_cpu_core sh2_cpu_core; -struct _sh2_cpu_core +struct sh2_cpu_core { int is_slave; int (*dma_callback_kludge)(device_t *device, UINT32 src, UINT32 dst, UINT32 data, int size); diff --git a/src/emu/cpu/sh2/sh2comn.h b/src/emu/cpu/sh2/sh2comn.h index 74a5e902d9e..af1e6d5b7ef 100644 --- a/src/emu/cpu/sh2/sh2comn.h +++ b/src/emu/cpu/sh2/sh2comn.h @@ -26,8 +26,7 @@ class sh2_frontend; #define SH2_CODE_XOR(a) ((a) ^ NATIVE_ENDIAN_VALUE_LE_BE(2,0)) -typedef struct _irq_entry irq_entry; -struct _irq_entry +struct irq_entry { int irq_vector; int irq_priority; diff --git a/src/emu/cpu/sh2/sh2drc.c b/src/emu/cpu/sh2/sh2drc.c index 6addac5e835..118429057c6 100644 --- a/src/emu/cpu/sh2/sh2drc.c +++ b/src/emu/cpu/sh2/sh2drc.c @@ -89,8 +89,7 @@ extern int sh2_describe(void *param, opcode_desc *desc, const opcode_desc *prev) ***************************************************************************/ /* internal compiler state */ -typedef struct _compiler_state compiler_state; -struct _compiler_state +struct compiler_state { UINT32 cycles; /* accumulated cycles */ UINT8 checkints; /* need to check interrupts before next instruction */ diff --git a/src/emu/cpu/sm8500/sm8500.c b/src/emu/cpu/sm8500/sm8500.c index c46fdd72aa7..aaeed029360 100644 --- a/src/emu/cpu/sm8500/sm8500.c +++ b/src/emu/cpu/sm8500/sm8500.c @@ -30,8 +30,7 @@ they are internally. #define FLAG_B 0x02 #define FLAG_I 0x01 -typedef struct _sm8500_state sm8500_state; -struct _sm8500_state +struct sm8500_state { SM8500_CONFIG config; UINT16 PC; diff --git a/src/emu/cpu/ssem/ssem.c b/src/emu/cpu/ssem/ssem.c index 8d3895f11f8..73aacfb6da3 100644 --- a/src/emu/cpu/ssem/ssem.c +++ b/src/emu/cpu/ssem/ssem.c @@ -14,8 +14,7 @@ CPU_DISASSEMBLE( ssem ); #define SSEM_DISASM_ON_UNIMPL 0 #define SSEM_DUMP_MEM_ON_UNIMPL 0 -typedef struct _ssem_state ssem_state; -struct _ssem_state +struct ssem_state { UINT32 pc; UINT32 a; diff --git a/src/emu/cpu/ssp1601/ssp1601.c b/src/emu/cpu/ssp1601/ssp1601.c index 5ff877bb1ba..59e4cf34a8f 100644 --- a/src/emu/cpu/ssp1601/ssp1601.c +++ b/src/emu/cpu/ssp1601/ssp1601.c @@ -29,8 +29,7 @@ CPU_DISASSEMBLE( ssp1601 ); -typedef struct _ssp1601_state_t ssp1601_state_t; -struct _ssp1601_state_t +struct ssp1601_state_t { PAIR gr[8]; /* general regs, some are 16bit, some 32bit */ union { diff --git a/src/emu/cpu/superfx/superfx.c b/src/emu/cpu/superfx/superfx.c index 9b9478ffe36..9925afeb96d 100644 --- a/src/emu/cpu/superfx/superfx.c +++ b/src/emu/cpu/superfx/superfx.c @@ -15,8 +15,7 @@ typedef struct UINT8 valid[0x20]; } cache_t; -typedef struct _superfx_state superfx_state; -struct _superfx_state +struct superfx_state { superfx_config config; diff --git a/src/emu/cpu/superfx/superfx.h b/src/emu/cpu/superfx/superfx.h index a6aafe82e26..3de68bbf774 100644 --- a/src/emu/cpu/superfx/superfx.h +++ b/src/emu/cpu/superfx/superfx.h @@ -83,8 +83,7 @@ enum #define SUPERFX_CFGR_IRQ 0x80 // IRQ #define SUPERFX_CFGR_MS0 0x20 // MS0 -typedef struct _superfx_config superfx_config; -struct _superfx_config +struct superfx_config { devcb_write_line out_irq_func; /* IRQ changed callback */ }; diff --git a/src/emu/cpu/t11/t11.c b/src/emu/cpu/t11/t11.c index b7b55ddd696..78b242dd72c 100644 --- a/src/emu/cpu/t11/t11.c +++ b/src/emu/cpu/t11/t11.c @@ -22,8 +22,7 @@ * *************************************/ -typedef struct _t11_state t11_state; -struct _t11_state +struct t11_state { PAIR ppc; /* previous program counter */ PAIR reg[8]; diff --git a/src/emu/cpu/tlcs900/tlcs900.c b/src/emu/cpu/tlcs900/tlcs900.c index c2ec100e428..bb817a235f6 100644 --- a/src/emu/cpu/tlcs900/tlcs900.c +++ b/src/emu/cpu/tlcs900/tlcs900.c @@ -17,8 +17,7 @@ TODO: #include "debugger.h" #include "tlcs900.h" -typedef struct _tlcs900_state tlcs900_state; -struct _tlcs900_state +struct tlcs900_state { const tlcs900_interface *intf; diff --git a/src/emu/cpu/tlcs900/tlcs900.h b/src/emu/cpu/tlcs900/tlcs900.h index ed8e8fdf711..296663761c5 100644 --- a/src/emu/cpu/tlcs900/tlcs900.h +++ b/src/emu/cpu/tlcs900/tlcs900.h @@ -37,8 +37,7 @@ enum }; -typedef struct _tlcs900_interface tlcs900_interface; -struct _tlcs900_interface +struct tlcs900_interface { devcb_write8 to1; devcb_write8 to3; diff --git a/src/emu/cpu/tms0980/tms0980.c b/src/emu/cpu/tms0980/tms0980.c index f2a5d81735f..c86affd31a4 100644 --- a/src/emu/cpu/tms0980/tms0980.c +++ b/src/emu/cpu/tms0980/tms0980.c @@ -226,8 +226,7 @@ unknown cycle: CME, SSE, SSS #define I_YNEC ( MICRO_MASK | M_YTP | M_CKN | M_NE ) -typedef struct _tms0980_state tms0980_state; -struct _tms0980_state +struct tms0980_state { UINT8 prev_pc; /* previous program counter */ UINT8 prev_pa; /* previous page address register */ diff --git a/src/emu/cpu/tms0980/tms0980.h b/src/emu/cpu/tms0980/tms0980.h index a0ac1547df2..2f7207e192b 100644 --- a/src/emu/cpu/tms0980/tms0980.h +++ b/src/emu/cpu/tms0980/tms0980.h @@ -9,8 +9,7 @@ enum { }; -typedef struct _tms0980_config tms0980_config; -struct _tms0980_config { +struct tms0980_config { /* O-output PLA configuration */ struct { UINT8 value; diff --git a/src/emu/cpu/tms32010/tms32010.c b/src/emu/cpu/tms32010/tms32010.c index 288d2135c1c..abb696acfe7 100644 --- a/src/emu/cpu/tms32010/tms32010.c +++ b/src/emu/cpu/tms32010/tms32010.c @@ -114,8 +114,7 @@ INLINE tms32010_state *get_safe_token(device_t *device) } /* opcode table entry */ -typedef struct _tms32010_opcode tms32010_opcode; -struct _tms32010_opcode +struct tms32010_opcode { UINT8 cycles; void (*function)(tms32010_state *); diff --git a/src/emu/cpu/tms32025/tms32025.c b/src/emu/cpu/tms32025/tms32025.c index ebeeda1309c..d31a1452f3d 100644 --- a/src/emu/cpu/tms32025/tms32025.c +++ b/src/emu/cpu/tms32025/tms32025.c @@ -192,8 +192,7 @@ INLINE tms32025_state *get_safe_token(device_t *device) } /* opcode table entry */ -typedef struct _tms32025_opcode tms32025_opcode; -struct _tms32025_opcode +struct tms32025_opcode { UINT8 cycles; void (*function)(tms32025_state *); diff --git a/src/emu/cpu/tms32051/tms32051.c b/src/emu/cpu/tms32051/tms32051.c index 385954745f7..d0167a4c832 100644 --- a/src/emu/cpu/tms32051/tms32051.c +++ b/src/emu/cpu/tms32051/tms32051.c @@ -79,8 +79,7 @@ typedef struct UINT16 pm; } ST1; -typedef struct _tms32051_state tms32051_state; -struct _tms32051_state +struct tms32051_state { UINT16 pc; UINT16 op; diff --git a/src/emu/cpu/tms34010/tms34010.c b/src/emu/cpu/tms34010/tms34010.c index a8a36e895e0..43511e1136d 100644 --- a/src/emu/cpu/tms34010/tms34010.c +++ b/src/emu/cpu/tms34010/tms34010.c @@ -41,8 +41,7 @@ struct _XY #endif }; -typedef struct _tms34010_state tms34010_state; -struct _tms34010_state +struct tms34010_state { UINT32 pc; UINT32 ppc; diff --git a/src/emu/cpu/tms34010/tms34010.h b/src/emu/cpu/tms34010/tms34010.h index 912854de764..621182c6f49 100644 --- a/src/emu/cpu/tms34010/tms34010.h +++ b/src/emu/cpu/tms34010/tms34010.h @@ -177,8 +177,7 @@ enum /* Configuration structure */ -typedef struct _tms34010_display_params tms34010_display_params; -struct _tms34010_display_params +struct tms34010_display_params { UINT16 vcount; /* most recent VCOUNT */ UINT16 veblnk, vsblnk; /* start/end of VBLANK */ @@ -189,8 +188,7 @@ struct _tms34010_display_params }; -typedef struct _tms34010_config tms34010_config; -struct _tms34010_config +struct tms34010_config { UINT8 halt_on_reset; /* /HCS pin, which determines HALT state after reset */ const char *screen_tag; /* the screen operated on */ diff --git a/src/emu/cpu/unsp/unsp.h b/src/emu/cpu/unsp/unsp.h index cc2eb1df87e..b6209c4dff7 100644 --- a/src/emu/cpu/unsp/unsp.h +++ b/src/emu/cpu/unsp/unsp.h @@ -12,8 +12,7 @@ #define __UNSP_H__ typedef struct _unspimp_state unspimp_state; -typedef struct _unsp_state unsp_state; -struct _unsp_state +struct unsp_state { UINT16 r[16]; UINT8 irq; diff --git a/src/emu/cpu/upd7810/upd7810.c b/src/emu/cpu/upd7810/upd7810.c index 897158a56c0..7957ead8f33 100644 --- a/src/emu/cpu/upd7810/upd7810.c +++ b/src/emu/cpu/upd7810/upd7810.c @@ -408,8 +408,7 @@ STOP 01001000 10111011 12 stop #include "debugger.h" #include "upd7810.h" -typedef struct _upd7810_state upd7810_state; -struct _upd7810_state +struct upd7810_state { PAIR ppc; /* previous program counter */ PAIR pc; /* program counter */ diff --git a/src/emu/cpu/v30mz/v30mz.h b/src/emu/cpu/v30mz/v30mz.h index c50ba14c058..f62b5f68581 100644 --- a/src/emu/cpu/v30mz/v30mz.h +++ b/src/emu/cpu/v30mz/v30mz.h @@ -2,8 +2,7 @@ #define __V30MZ_H__ -typedef struct _nec_config nec_config; -struct _nec_config +struct nec_config { const UINT8* v25v35_decryptiontable; // internal decryption table }; diff --git a/src/emu/cpu/v60/v60.c b/src/emu/cpu/v60/v60.c index 3d1f0638df0..c712b013dba 100644 --- a/src/emu/cpu/v60/v60.c +++ b/src/emu/cpu/v60/v60.c @@ -71,8 +71,7 @@ #define SETREG8(a, b) (a) = ((a) & ~0xff) | ((b) & 0xff) #define SETREG16(a, b) (a) = ((a) & ~0xffff) | ((b) & 0xffff) -typedef struct _v60_flags v60_flags; -struct _v60_flags +struct v60_flags { UINT8 CY; UINT8 OV; @@ -81,8 +80,7 @@ struct _v60_flags }; // v60 Register Inside (Hm... It's not a pentium inside :-))) ) -typedef struct _v60_state v60_state; -struct _v60_state +struct v60_state { offs_t fetch_xor; offs_t start_pc; diff --git a/src/emu/cpu/v810/v810.c b/src/emu/cpu/v810/v810.c index e6db6a3f58a..2d319d96798 100644 --- a/src/emu/cpu/v810/v810.c +++ b/src/emu/cpu/v810/v810.c @@ -31,8 +31,7 @@ #define clkIF 3 #define clkMEM 3 -typedef struct _v810_state v810_state; -struct _v810_state +struct v810_state { UINT32 reg[65]; UINT8 irq_line; diff --git a/src/emu/cpu/x86log.c b/src/emu/cpu/x86log.c index 1a824d64c0d..159b0044018 100644 --- a/src/emu/cpu/x86log.c +++ b/src/emu/cpu/x86log.c @@ -31,8 +31,7 @@ ***************************************************************************/ /* code logging info */ -typedef struct _log_comment log_comment; -struct _log_comment +struct log_comment { x86code * base; const char * string; @@ -40,8 +39,7 @@ struct _log_comment /* data ranges */ -typedef struct _data_range_t data_range_t; -struct _data_range_t +struct data_range_t { x86code * base; x86code * end; diff --git a/src/emu/cpu/z180/z180.c b/src/emu/cpu/z180/z180.c index b16cf38d309..17c9475f33c 100644 --- a/src/emu/cpu/z180/z180.c +++ b/src/emu/cpu/z180/z180.c @@ -114,8 +114,7 @@ Hitachi HD647180 series: /* The Z180 registers. HALT is set to 1 when the CPU is halted, the refresh */ /* register is calculated as follows: refresh=(Regs.R&127)|(Regs.R2&128) */ /****************************************************************************/ -typedef struct _z180_state z180_state; -struct _z180_state +struct z180_state { PAIR PREPC,PC,SP,AF,BC,DE,HL,IX,IY; PAIR AF2,BC2,DE2,HL2; diff --git a/src/emu/cpu/z8/z8.c b/src/emu/cpu/z8/z8.c index f4ad0996dfa..a0771fe8477 100644 --- a/src/emu/cpu/z8/z8.c +++ b/src/emu/cpu/z8/z8.c @@ -156,8 +156,7 @@ enum TYPE DEFINITIONS ***************************************************************************/ -typedef struct _z8_state z8_state; -struct _z8_state +struct z8_state { address_space *program; direct_read_data *direct; @@ -541,8 +540,7 @@ INSTRUCTION( illegal ) typedef void (*z8_opcode_func) (z8_state *cpustate, UINT8 opcode, int *cycles); -typedef struct _z8_opcode_map z8_opcode_map; -struct _z8_opcode_map +struct z8_opcode_map { z8_opcode_func function; int execution_cycles; diff --git a/src/emu/cpu/z80/z80.c b/src/emu/cpu/z80/z80.c index e0d3dd70159..2f7033e98a8 100644 --- a/src/emu/cpu/z80/z80.c +++ b/src/emu/cpu/z80/z80.c @@ -142,8 +142,7 @@ /* The Z80 registers. halt is set to 1 when the CPU is halted, the refresh */ /* register is calculated as follows: refresh=(r&127)|(r2&128) */ /****************************************************************************/ -typedef struct _z80_state z80_state; -struct _z80_state +struct z80_state { PAIR prvpc,pc,sp,af,bc,de,hl,ix,iy,wz; PAIR af2,bc2,de2,hl2; diff --git a/src/emu/crsshair.c b/src/emu/crsshair.c index 8a546656f28..b5520133e06 100644 --- a/src/emu/crsshair.c +++ b/src/emu/crsshair.c @@ -30,8 +30,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _crosshair_global crosshair_global; -struct _crosshair_global +struct crosshair_global { UINT8 usage; /* true if any crosshairs are used */ UINT8 used[MAX_PLAYERS]; /* usage per player */ diff --git a/src/emu/crsshair.h b/src/emu/crsshair.h index 244f05593db..5f777accb05 100644 --- a/src/emu/crsshair.h +++ b/src/emu/crsshair.h @@ -43,8 +43,7 @@ ***************************************************************************/ /* user-controllable settings for a player */ -typedef struct _crosshair_user_settings crosshair_user_settings; -struct _crosshair_user_settings +struct crosshair_user_settings { UINT8 used; /* is used */ UINT8 mode; /* visibility mode */ diff --git a/src/emu/debug/debugcmd.c b/src/emu/debug/debugcmd.c index 3bb8eb97581..8e566855a6e 100644 --- a/src/emu/debug/debugcmd.c +++ b/src/emu/debug/debugcmd.c @@ -34,16 +34,14 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _global_entry global_entry; -struct _global_entry +struct global_entry { void * base; UINT32 size; }; -typedef struct _cheat_map cheat_map; -struct _cheat_map +struct cheat_map { UINT64 offset; UINT64 first_value; @@ -53,8 +51,7 @@ struct _cheat_map }; -typedef struct _cheat_system cheat_system; -struct _cheat_system +struct cheat_system { char cpu; UINT64 length; @@ -66,8 +63,7 @@ struct _cheat_system }; -typedef struct _cheat_region_map cheat_region_map; -struct _cheat_region_map +struct cheat_region_map { UINT64 offset; UINT64 endoffset; diff --git a/src/emu/debug/debugcon.c b/src/emu/debug/debugcon.c index 53c234a28f5..846f54b5575 100644 --- a/src/emu/debug/debugcon.c +++ b/src/emu/debug/debugcon.c @@ -36,8 +36,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _debug_command debug_command; -struct _debug_command +struct debug_command { debug_command * next; char command[32]; diff --git a/src/emu/debug/debugcpu.c b/src/emu/debug/debugcpu.c index f89938f23d6..f60ddee0554 100644 --- a/src/emu/debug/debugcpu.c +++ b/src/emu/debug/debugcpu.c @@ -71,8 +71,7 @@ enum TYPE DEFINITIONS ***************************************************************************/ -/* in mame.h: typedef struct _debugcpu_private debugcpu_private; */ -struct _debugcpu_private +struct debugcpu_private { device_t *livecpu; device_t *visiblecpu; diff --git a/src/emu/debug/debugcpu.h b/src/emu/debug/debugcpu.h index c8f5930f69c..984ab789d12 100644 --- a/src/emu/debug/debugcpu.h +++ b/src/emu/debug/debugcpu.h @@ -64,7 +64,7 @@ const int COMMENT_VERSION = 1; typedef int (*debug_instruction_hook_func)(device_t &device, offs_t curpc); -typedef struct _xml_data_node xml_data_node; +struct xml_data_node; class device_debug diff --git a/src/emu/debug/debughlp.c b/src/emu/debug/debughlp.c index 2ca5c4c2b3a..12eeab5daa9 100644 --- a/src/emu/debug/debughlp.c +++ b/src/emu/debug/debughlp.c @@ -28,8 +28,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _help_item help_item; -struct _help_item +struct help_item { const char * tag; const char * help; diff --git a/src/emu/debugger.c b/src/emu/debugger.c index dc960d34322..313da918570 100644 --- a/src/emu/debugger.c +++ b/src/emu/debugger.c @@ -26,8 +26,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _machine_entry machine_entry; -struct _machine_entry +struct machine_entry { machine_entry * next; running_machine * machine; diff --git a/src/emu/debugint/debugint.c b/src/emu/debugint/debugint.c index 30ca1b2e1ea..a47038ffbf2 100644 --- a/src/emu/debugint/debugint.c +++ b/src/emu/debugint/debugint.c @@ -108,8 +108,7 @@ enum TYPE DEFINITIONS ***************************************************************************/ -typedef struct _adjustment adjustment; -struct _adjustment +struct adjustment { int visible; int lower; diff --git a/src/emu/emupal.c b/src/emu/emupal.c index 482f27d4c01..dd3b0df3988 100644 --- a/src/emu/emupal.c +++ b/src/emu/emupal.c @@ -29,8 +29,7 @@ ***************************************************************************/ /* information about a shadow table */ -typedef struct _shadow_table_data shadow_table_data; -struct _shadow_table_data +struct shadow_table_data { UINT32 * base; /* pointer to the base of the table */ INT16 dr; /* delta red value */ @@ -41,7 +40,7 @@ struct _shadow_table_data /* typedef struct _palette_private palette_private; */ -struct _palette_private +struct palette_private { bitmap_format format; /* format assumed for palette data */ diff --git a/src/emu/fileio.h b/src/emu/fileio.h index c71d79cc530..96dc84162bd 100644 --- a/src/emu/fileio.h +++ b/src/emu/fileio.h @@ -55,11 +55,11 @@ //************************************************************************** // forward declarations -typedef struct _zip_file_header zip_file_header; -typedef struct _zip_file zip_file; +struct zip_file_header; +struct zip_file; -typedef struct __7z_file_header _7z_file_header; -typedef struct __7z_file _7z_file; +struct _7z_file_header; +struct _7z_file; // ======================> path_iterator diff --git a/src/emu/hashfile.c b/src/emu/hashfile.c index e79cf84e186..14e37b8f638 100644 --- a/src/emu/hashfile.c +++ b/src/emu/hashfile.c @@ -18,8 +18,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _hash_info hash_info; -struct _hash_info +struct hash_info { hash_collection *hashes; const char *extrainfo; diff --git a/src/emu/imagedev/bitbngr.c b/src/emu/imagedev/bitbngr.c index 23ec4779caa..05a8162e449 100644 --- a/src/emu/imagedev/bitbngr.c +++ b/src/emu/imagedev/bitbngr.c @@ -331,10 +331,10 @@ void bitbanger_device::device_start(void) void bitbanger_device::device_config_complete(void) { - const _bitbanger_config *intf = reinterpret_cast<const _bitbanger_config *>(static_config()); + const bitbanger_config *intf = reinterpret_cast<const bitbanger_config *>(static_config()); if(intf != NULL) { - *static_cast<_bitbanger_config *>(this) = *intf; + *static_cast<bitbanger_config *>(this) = *intf; } else { diff --git a/src/emu/imagedev/bitbngr.h b/src/emu/imagedev/bitbngr.h index 24c662d3cae..aa0adf71751 100644 --- a/src/emu/imagedev/bitbngr.h +++ b/src/emu/imagedev/bitbngr.h @@ -65,8 +65,7 @@ enum TYPE DEFINITIONS ***************************************************************************/ -typedef struct _bitbanger_config bitbanger_config; -struct _bitbanger_config +struct bitbanger_config { /* callback to driver */ devcb_write_line m_input_callback; @@ -85,7 +84,7 @@ struct _bitbanger_config class bitbanger_device : public device_t, public device_image_interface, - public _bitbanger_config + public bitbanger_config { public: // construction/destruction diff --git a/src/emu/imagedev/flopdrv.c b/src/emu/imagedev/flopdrv.c index d73cd441df8..b678c6c5edf 100644 --- a/src/emu/imagedev/flopdrv.c +++ b/src/emu/imagedev/flopdrv.c @@ -29,8 +29,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _floppy_drive floppy_drive; -struct _floppy_drive +struct floppy_drive { /* callbacks */ devcb_resolved_write_line out_idx_func; @@ -91,8 +90,7 @@ struct _floppy_drive }; -typedef struct _floppy_error_map floppy_error_map; -struct _floppy_error_map +struct floppy_error_map { floperr_t ferr; image_error_t ierr; diff --git a/src/emu/ioport.h b/src/emu/ioport.h index 93dd77820ba..f4d1de800c1 100644 --- a/src/emu/ioport.h +++ b/src/emu/ioport.h @@ -685,7 +685,7 @@ class ioport_field; struct ioport_field_live; class ioport_manager; class emu_timer; -typedef struct _xml_data_node xml_data_node; +struct xml_data_node; class analog_field; // constructor function pointer diff --git a/src/emu/machine.h b/src/emu/machine.h index 353bd466530..cb65054aef7 100644 --- a/src/emu/machine.h +++ b/src/emu/machine.h @@ -152,11 +152,11 @@ class tilemap_manager; class debug_view_manager; class osd_interface; -typedef struct _palette_private palette_private; -typedef struct _romload_private romload_private; -typedef struct _ui_input_private ui_input_private; -typedef struct _debugcpu_private debugcpu_private; -typedef struct _generic_machine_private generic_machine_private; +struct palette_private; +struct romload_private; +struct ui_input_private; +struct debugcpu_private; +struct generic_machine_private; // ======================> system_time diff --git a/src/emu/machine/6525tpi.c b/src/emu/machine/6525tpi.c index 000fee687fb..98ce60c6679 100644 --- a/src/emu/machine/6525tpi.c +++ b/src/emu/machine/6525tpi.c @@ -106,8 +106,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _tpi6525_state tpi6525_state; -struct _tpi6525_state +struct tpi6525_state { devcb_resolved_write_line out_irq_func; devcb_resolved_read8 in_pa_func; diff --git a/src/emu/machine/6525tpi.h b/src/emu/machine/6525tpi.h index 01b42253523..548dd4b4532 100644 --- a/src/emu/machine/6525tpi.h +++ b/src/emu/machine/6525tpi.h @@ -34,8 +34,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _tpi6525_interface tpi6525_interface; -struct _tpi6525_interface +struct tpi6525_interface { devcb_write_line out_irq_func; diff --git a/src/emu/machine/68681.h b/src/emu/machine/68681.h index a8084d3b167..6de4665ded5 100644 --- a/src/emu/machine/68681.h +++ b/src/emu/machine/68681.h @@ -3,8 +3,7 @@ #include "devlegcy.h" -typedef struct _duart68681_config duart68681_config; -struct _duart68681_config +struct duart68681_config { void (*irq_handler)(device_t *device, int state, UINT8 vector); void (*tx_callback)(device_t *device, int channel, UINT8 data); diff --git a/src/emu/machine/74148.c b/src/emu/machine/74148.c index 2bb59b429de..1979e9e8ce2 100644 --- a/src/emu/machine/74148.c +++ b/src/emu/machine/74148.c @@ -42,8 +42,7 @@ #include "machine/74148.h" -typedef struct _ttl74148_state ttl74148_state; -struct _ttl74148_state +struct ttl74148_state { /* callback */ void (*output_cb)(device_t *device); diff --git a/src/emu/machine/74148.h b/src/emu/machine/74148.h index ac3d55a097a..0ba2177284e 100644 --- a/src/emu/machine/74148.h +++ b/src/emu/machine/74148.h @@ -44,8 +44,7 @@ #include "devlegcy.h" -typedef struct _ttl74148_config ttl74148_config; -struct _ttl74148_config +struct ttl74148_config { void (*output_cb)(device_t *device); }; diff --git a/src/emu/machine/74153.c b/src/emu/machine/74153.c index 199b0203d3b..3d161c8f6c1 100644 --- a/src/emu/machine/74153.c +++ b/src/emu/machine/74153.c @@ -37,8 +37,7 @@ #include "machine/74153.h" -typedef struct _ttl74153_state ttl74153_state; -struct _ttl74153_state +struct ttl74153_state { /* callback */ void (*output_cb)(device_t *device); diff --git a/src/emu/machine/74153.h b/src/emu/machine/74153.h index acae556036e..95a01a48aea 100644 --- a/src/emu/machine/74153.h +++ b/src/emu/machine/74153.h @@ -39,8 +39,7 @@ #include "devlegcy.h" -typedef struct _ttl74153_config ttl74153_config; -struct _ttl74153_config +struct ttl74153_config { void (*output_cb)(device_t *device); }; diff --git a/src/emu/machine/adc083x.c b/src/emu/machine/adc083x.c index b813c6decba..d8486ab028d 100644 --- a/src/emu/machine/adc083x.c +++ b/src/emu/machine/adc083x.c @@ -44,8 +44,7 @@ enum TYPE DEFINITIONS ***************************************************************************/ -typedef struct _adc0831_state adc0831_state; -struct _adc0831_state +struct adc0831_state { adc083x_input_convert_func input_callback_r; diff --git a/src/emu/machine/adc083x.h b/src/emu/machine/adc083x.h index 59bce8f8c9c..11dd66be889 100644 --- a/src/emu/machine/adc083x.h +++ b/src/emu/machine/adc083x.h @@ -101,8 +101,7 @@ extern const device_type ADC0838; typedef double (*adc083x_input_convert_func)(device_t *device, UINT8 input); -typedef struct _adc083x_interface adc083x_interface; -struct _adc083x_interface +struct adc083x_interface { adc083x_input_convert_func input_callback_r; }; diff --git a/src/emu/machine/adc1038.c b/src/emu/machine/adc1038.c index 350a2e09acb..7a8e248a8db 100644 --- a/src/emu/machine/adc1038.c +++ b/src/emu/machine/adc1038.c @@ -14,8 +14,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _adc1038_state adc1038_state; -struct _adc1038_state +struct adc1038_state { int cycle; int clk; diff --git a/src/emu/machine/adc1038.h b/src/emu/machine/adc1038.h index a154af090e9..3f261f9a325 100644 --- a/src/emu/machine/adc1038.h +++ b/src/emu/machine/adc1038.h @@ -19,8 +19,7 @@ typedef int (*adc1038_input_read_func)(device_t *device, int input); -typedef struct _adc1038_interface adc1038_interface; -struct _adc1038_interface +struct adc1038_interface { int gticlub_hack; adc1038_input_read_func input_callback_r; diff --git a/src/emu/machine/adc1213x.c b/src/emu/machine/adc1213x.c index d123dced2a2..8633d7305c0 100644 --- a/src/emu/machine/adc1213x.c +++ b/src/emu/machine/adc1213x.c @@ -20,8 +20,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _adc12138_state adc12138_state; -struct _adc12138_state +struct adc12138_state { adc1213x_input_convert_func input_callback_r; diff --git a/src/emu/machine/adc1213x.h b/src/emu/machine/adc1213x.h index 538ed54510f..d0a2d39c814 100644 --- a/src/emu/machine/adc1213x.h +++ b/src/emu/machine/adc1213x.h @@ -73,8 +73,7 @@ extern const device_type ADC12132; typedef double (*adc1213x_input_convert_func)(device_t *device, UINT8 input); -typedef struct _adc12138_interface adc12138_interface; -struct _adc12138_interface +struct adc12138_interface { adc1213x_input_convert_func input_callback_r; }; diff --git a/src/emu/machine/generic.c b/src/emu/machine/generic.c index fdec7134531..38eb23d55a4 100644 --- a/src/emu/machine/generic.c +++ b/src/emu/machine/generic.c @@ -28,7 +28,7 @@ static void counters_save(running_machine &machine, int config_type, xml_data_no TYPE DEFINITIONS ***************************************************************************/ -struct _generic_machine_private +struct generic_machine_private { /* tickets and coin counters */ UINT32 dispensed_tickets; diff --git a/src/emu/machine/idectrl.c b/src/emu/machine/idectrl.c index 6d732f7bcd7..19f42d76d0b 100644 --- a/src/emu/machine/idectrl.c +++ b/src/emu/machine/idectrl.c @@ -103,8 +103,7 @@ /*************************************************************************** TYPE DEFINITIONS ***************************************************************************/ -typedef struct _ide_device ide_device; -struct _ide_device +struct ide_device { UINT16 cur_cylinder; UINT8 cur_sector; @@ -115,8 +114,7 @@ struct _ide_device }; -typedef struct _ide_state ide_state; -struct _ide_state +struct ide_state { device_t *device; diff --git a/src/emu/machine/idectrl.h b/src/emu/machine/idectrl.h index 61af4c81648..d45b652f8f7 100644 --- a/src/emu/machine/idectrl.h +++ b/src/emu/machine/idectrl.h @@ -130,8 +130,7 @@ extern const device_type IDE_HARDDISK_IMAGE; TYPE DEFINITIONS ***************************************************************************/ -typedef struct _ide_config ide_config; -struct _ide_config +struct ide_config { void (*interrupt)(device_t *device, int state); const char *bmcpu; /* name of bus master CPU */ diff --git a/src/emu/machine/k053252.c b/src/emu/machine/k053252.c index 8b019a24517..cd81fff253c 100644 --- a/src/emu/machine/k053252.c +++ b/src/emu/machine/k053252.c @@ -55,8 +55,7 @@ TODO: #include "emu.h" #include "k053252.h" -typedef struct _k053252_state k053252_state; -struct _k053252_state +struct k053252_state { UINT8 regs[16]; UINT16 hc,hfp,hbp; diff --git a/src/emu/machine/k053252.h b/src/emu/machine/k053252.h index 1c6d526dc8e..9b714d1c123 100644 --- a/src/emu/machine/k053252.h +++ b/src/emu/machine/k053252.h @@ -30,8 +30,7 @@ extern const device_type K053252; -typedef struct _k053252_interface k053252_interface; -struct _k053252_interface +struct k053252_interface { const char *screen; devcb_write_line int1_en; diff --git a/src/emu/machine/latch8.c b/src/emu/machine/latch8.c index 6a40e336d92..193ad9abf61 100644 --- a/src/emu/machine/latch8.c +++ b/src/emu/machine/latch8.c @@ -10,8 +10,7 @@ #include "sound/discrete.h" #include "latch8.h" -typedef struct _latch8_t latch8_t; -struct _latch8_t +struct latch8_t { latch8_config *intf; UINT8 value; diff --git a/src/emu/machine/latch8.h b/src/emu/machine/latch8.h index 7f4f0aa11cb..2bd23c04ebf 100644 --- a/src/emu/machine/latch8.h +++ b/src/emu/machine/latch8.h @@ -21,8 +21,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _latch8_devread latch8_devread; -struct _latch8_devread +struct latch8_devread { /* only for byte reads, does not affect bit reads and node_map */ UINT32 from_bit; @@ -31,8 +30,7 @@ struct _latch8_devread read8_space_func read_handler; }; -typedef struct _latch8_config latch8_config; -struct _latch8_config +struct latch8_config { /* only for byte reads, does not affect bit reads and node_map */ UINT32 maskout; diff --git a/src/emu/machine/mb14241.c b/src/emu/machine/mb14241.c index cb14b53008d..e1fd7fe6e2a 100644 --- a/src/emu/machine/mb14241.c +++ b/src/emu/machine/mb14241.c @@ -7,8 +7,7 @@ #include "emu.h" #include "machine/mb14241.h" -typedef struct _mb14241_state mb14241_state; -struct _mb14241_state +struct mb14241_state { UINT16 shift_data; /* 15 bits only */ UINT8 shift_count; /* 3 bits */ diff --git a/src/emu/machine/mb87078.c b/src/emu/machine/mb87078.c index de48be6633c..234296d08b1 100644 --- a/src/emu/machine/mb87078.c +++ b/src/emu/machine/mb87078.c @@ -71,8 +71,7 @@ #include "emu.h" #include "machine/mb87078.h" -typedef struct _mb87078_state mb87078_state; -struct _mb87078_state +struct mb87078_state { int gain[4]; /* gain index 0-63,64,65 */ int channel_latch; /* current channel */ diff --git a/src/emu/machine/mb87078.h b/src/emu/machine/mb87078.h index 8b86a5189da..345b30ed920 100644 --- a/src/emu/machine/mb87078.h +++ b/src/emu/machine/mb87078.h @@ -18,8 +18,7 @@ typedef void (*mb87078_gain_changed_cb)(running_machine &machine, int channel, int percent /*, float decibels*/); -typedef struct _mb87078_interface mb87078_interface; -struct _mb87078_interface +struct mb87078_interface { mb87078_gain_changed_cb gain_changed_cb; }; diff --git a/src/emu/machine/msm6242.h b/src/emu/machine/msm6242.h index 21b57dc1f5e..25e8b5f82bd 100644 --- a/src/emu/machine/msm6242.h +++ b/src/emu/machine/msm6242.h @@ -25,8 +25,7 @@ // ======================> msm6242_interface -typedef struct _msm6242_interface msm6242_interface; -struct _msm6242_interface +struct msm6242_interface { devcb_write_line m_out_int_cb; }; diff --git a/src/emu/machine/pd4990a.c b/src/emu/machine/pd4990a.c index 7c244bb75b6..c34a5f273ea 100644 --- a/src/emu/machine/pd4990a.c +++ b/src/emu/machine/pd4990a.c @@ -48,8 +48,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _upd4990a_state upd4990a_state; -struct _upd4990a_state +struct upd4990a_state { int seconds; /* seconds BCD */ int minutes; /* minutes BCD */ diff --git a/src/emu/machine/pit8253.c b/src/emu/machine/pit8253.c index 25681190933..dfbe2b3df70 100644 --- a/src/emu/machine/pit8253.c +++ b/src/emu/machine/pit8253.c @@ -82,12 +82,11 @@ struct pit8253_timer UINT32 cycles_to_output; /* cycles until output callback called */ }; -typedef struct _pit8253_t pit8253_t; -struct _pit8253_t +struct pit8253_t { - const struct pit8253_config *config; + const pit8253_config *config; int device_type; - struct pit8253_timer timers[MAX_TIMER]; + pit8253_timer timers[MAX_TIMER]; }; #define CTRL_ACCESS(control) (((control) >> 4) & 0x03) @@ -111,7 +110,7 @@ INLINE pit8253_t *get_safe_token(device_t *device) } -static struct pit8253_timer *get_timer(struct _pit8253_t *pit,int which) +static pit8253_timer *get_timer(pit8253_t *pit,int which) { which &= 3; if (which < MAX_TIMER) @@ -120,7 +119,7 @@ static struct pit8253_timer *get_timer(struct _pit8253_t *pit,int which) } -static int pit8253_gate(struct pit8253_timer *timer) +static int pit8253_gate(pit8253_timer *timer) { if (!timer->in_gate_func.isnull()) return timer->in_gate_func(); @@ -159,7 +158,7 @@ static UINT32 adjusted_count(int bcd,UINT16 val) /* This function subtracts 1 from timer->value "cycles" times, taking into account binary or BCD operation, and wrapping around from 0 to 0xFFFF or 0x9999 as necessary. */ -static void decrease_counter_value(struct pit8253_timer *timer,UINT64 cycles) +static void decrease_counter_value(pit8253_timer *timer,UINT64 cycles) { UINT16 value; int units, tens, hundreds, thousands; @@ -215,7 +214,7 @@ static void decrease_counter_value(struct pit8253_timer *timer,UINT64 cycles) /* Counter loading: transfer of a count from the CR to the CE */ -static void load_counter_value(device_t *device, struct pit8253_timer *timer) +static void load_counter_value(device_t *device, pit8253_timer *timer) { timer->value = timer->count; timer->null_count = 1; @@ -224,7 +223,7 @@ static void load_counter_value(device_t *device, struct pit8253_timer *timer) } -static void set_output(device_t *device, struct pit8253_timer *timer,int output) +static void set_output(device_t *device, pit8253_timer *timer,int output) { if (output != timer->output) { @@ -236,7 +235,7 @@ static void set_output(device_t *device, struct pit8253_timer *timer,int output) /* This emulates timer "timer" for "elapsed_cycles" cycles and assumes no callbacks occur during that time. */ -static void simulate2(device_t *device, struct pit8253_timer *timer, INT64 elapsed_cycles) +static void simulate2(device_t *device, pit8253_timer *timer, INT64 elapsed_cycles) { UINT32 adjusted_value; int bcd = CTRL_BCD(timer->control); @@ -639,7 +638,7 @@ static void simulate2(device_t *device, struct pit8253_timer *timer, INT64 elaps inaccurate by more than one cycle, and the output changed multiple times during the discrepancy. In practice updates should still be O(1). */ -static void simulate(device_t *device, struct pit8253_timer *timer, INT64 elapsed_cycles) +static void simulate(device_t *device, pit8253_timer *timer, INT64 elapsed_cycles) { if ( elapsed_cycles > 0 ) simulate2(device, timer, elapsed_cycles); @@ -650,7 +649,7 @@ static void simulate(device_t *device, struct pit8253_timer *timer, INT64 elapse /* This brings timer "timer" up to date */ -static void update(device_t *device, struct pit8253_timer *timer) +static void update(device_t *device, pit8253_timer *timer) { /* With the 82C54's maximum clockin of 10MHz, 64 bits is nearly 60,000 years of time. Should be enough for now. */ @@ -677,7 +676,7 @@ static TIMER_CALLBACK( update_timer_cb ) { device_t *device = (device_t *)ptr; pit8253_t *pit8253 = get_safe_token(device); - struct pit8253_timer *timer = get_timer(pit8253,param); + pit8253_timer *timer = get_timer(pit8253,param); LOG2(("pit8253: output_changed(): timer %d\n",param)); @@ -688,7 +687,7 @@ static TIMER_CALLBACK( update_timer_cb ) /* We recycle bit 0 of timer->value to hold the phase in mode 3 when count is odd. Since read commands in mode 3 always return even numbers, we need to mask this bit off. */ -static UINT16 masked_value(struct pit8253_timer *timer) +static UINT16 masked_value(pit8253_timer *timer) { LOG2(("pit8253: masked_value\n")); @@ -705,7 +704,7 @@ static UINT16 masked_value(struct pit8253_timer *timer) READ8_DEVICE_HANDLER( pit8253_r ) { pit8253_t *pit8253 = get_safe_token(device); - struct pit8253_timer *timer = get_timer(pit8253,offset); + pit8253_timer *timer = get_timer(pit8253,offset); UINT8 data; UINT16 value; @@ -773,7 +772,7 @@ READ8_DEVICE_HANDLER( pit8253_r ) /* Loads a new value from the bus to the count register (CR) */ -static void load_count(device_t *device, struct pit8253_timer *timer, UINT16 newcount) +static void load_count(device_t *device, pit8253_timer *timer, UINT16 newcount) { int mode = CTRL_MODE(timer->control); @@ -806,7 +805,7 @@ static void load_count(device_t *device, struct pit8253_timer *timer, UINT16 new } -static void readback(device_t *device, struct pit8253_timer *timer,int command) +static void readback(device_t *device, pit8253_timer *timer,int command) { UINT16 value; update(device, timer); @@ -861,7 +860,7 @@ static void readback(device_t *device, struct pit8253_timer *timer,int command) WRITE8_DEVICE_HANDLER( pit8253_w ) { pit8253_t *pit8253 = get_safe_token(device); - struct pit8253_timer *timer = get_timer(pit8253,offset); + pit8253_timer *timer = get_timer(pit8253,offset); int read_command; LOG2(("pit8253_w(): offset=%d data=0x%02x\n", offset, data)); @@ -984,7 +983,7 @@ WRITE8_DEVICE_HANDLER( pit8253_w ) static void pit8253_gate_w(device_t *device, int gate, int state) { pit8253_t *pit8253 = get_safe_token(device); - struct pit8253_timer *timer = get_timer(pit8253, gate); + pit8253_timer *timer = get_timer(pit8253, gate); LOG2(("pit8253_gate_w(): gate=%d state=%d\n", gate, state)); @@ -1022,7 +1021,7 @@ WRITE_LINE_DEVICE_HANDLER( pit8253_gate2_w ) { pit8253_gate_w(device, 2, state); int pit8253_get_output(device_t *device, int timerno) { pit8253_t *pit8253 = get_safe_token(device); - struct pit8253_timer *timer = get_timer(pit8253,timerno); + pit8253_timer *timer = get_timer(pit8253,timerno); int result; update(device, timer); @@ -1036,7 +1035,7 @@ int pit8253_get_output(device_t *device, int timerno) void pit8253_set_clockin(device_t *device, int timerno, double new_clockin) { pit8253_t *pit8253 = get_safe_token(device); - struct pit8253_timer *timer = get_timer(pit8253,timerno); + pit8253_timer *timer = get_timer(pit8253,timerno); LOG2(("pit8253_set_clockin(): PIT timer=%d, clockin = %lf\n", timerno,new_clockin)); @@ -1049,7 +1048,7 @@ void pit8253_set_clockin(device_t *device, int timerno, double new_clockin) static void pit8253_set_clock_signal(device_t *device, int timerno, int state) { pit8253_t *pit8253 = get_safe_token(device); - struct pit8253_timer *timer = get_timer(pit8253,timerno); + pit8253_timer *timer = get_timer(pit8253,timerno); LOG2(("pit8253_set_clock_signal(): PIT timer=%d, state = %d\n", timerno, state)); @@ -1077,7 +1076,7 @@ static void common_start( device_t *device, int device_type ) { /* register for state saving */ for (timerno = 0; timerno < MAX_TIMER; timerno++) { - struct pit8253_timer *timer = get_timer(pit8253, timerno); + pit8253_timer *timer = get_timer(pit8253, timerno); /* initialize timer */ timer->clockin = pit8253->config->timer[timerno].clockin; @@ -1127,7 +1126,7 @@ static DEVICE_RESET( pit8253 ) { for (i = 0; i < MAX_TIMER; i++) { - struct pit8253_timer *timer = get_timer(pit,i); + pit8253_timer *timer = get_timer(pit,i); /* According to Intel's 8254 docs, the state of a timer is undefined until the first mode control word is written. Here we define this undefined behaviour */ diff --git a/src/emu/machine/rp5h01.c b/src/emu/machine/rp5h01.c index 16c51ca0f78..35e3f3fae5b 100644 --- a/src/emu/machine/rp5h01.c +++ b/src/emu/machine/rp5h01.c @@ -29,8 +29,7 @@ enum { TYPE DEFINITIONS ***************************************************************************/ -typedef struct _rp5h01_state rp5h01_state; -struct _rp5h01_state +struct rp5h01_state { int counter; int counter_mode; /* test pin */ diff --git a/src/emu/machine/s3c2400.h b/src/emu/machine/s3c2400.h index dadbc39a119..7cf177f41aa 100644 --- a/src/emu/machine/s3c2400.h +++ b/src/emu/machine/s3c2400.h @@ -65,48 +65,41 @@ typedef void (*s3c24xx_gpio_port_w_func)( device_t *device, int port, UINT32 mas typedef int (*s3c24xx_core_pin_r_func)( device_t *device, int pin); typedef void (*s3c24xx_core_pin_w_func)( device_t *device, int pin, int data); -typedef struct _s3c2400_interface_core s3c2400_interface_core; -struct _s3c2400_interface_core +struct s3c2400_interface_core { s3c24xx_core_pin_r_func pin_r; s3c24xx_core_pin_w_func pin_w; }; -typedef struct _s3c2400_interface_gpio s3c2400_interface_gpio; -struct _s3c2400_interface_gpio +struct s3c2400_interface_gpio { s3c24xx_gpio_port_r_func port_r; s3c24xx_gpio_port_w_func port_w; }; -typedef struct _s3c2400_interface_i2c s3c2400_interface_i2c; -struct _s3c2400_interface_i2c +struct s3c2400_interface_i2c { write_line_device_func scl_w; read_line_device_func sda_r; write_line_device_func sda_w; }; -typedef struct _s3c2400_interface_adc s3c2400_interface_adc; -struct _s3c2400_interface_adc +struct s3c2400_interface_adc { read32_device_func data_r; }; -typedef struct _s3c2400_interface_i2s s3c2400_interface_i2s; -struct _s3c2400_interface_i2s +struct s3c2400_interface_i2s { write16_device_func data_w; }; -typedef struct _s3c2400_interface_lcd s3c2400_interface_lcd; -struct _s3c2400_interface_lcd +struct s3c2400_interface_lcd { int flags; }; -typedef struct _s3c2400_interface s3c2400_interface; -struct _s3c2400_interface +struct s3c2400_interface { s3c2400_interface_core core; s3c2400_interface_gpio gpio; diff --git a/src/emu/machine/s3c2410.h b/src/emu/machine/s3c2410.h index 338a1f0645d..b446f970194 100644 --- a/src/emu/machine/s3c2410.h +++ b/src/emu/machine/s3c2410.h @@ -75,42 +75,36 @@ typedef void (*s3c24xx_gpio_port_w_func)( device_t *device, int port, UINT32 mas typedef int (*s3c24xx_core_pin_r_func)( device_t *device, int pin); typedef void (*s3c24xx_core_pin_w_func)( device_t *device, int pin, int data); -typedef struct _s3c2410_interface_core s3c2410_interface_core; -struct _s3c2410_interface_core +struct s3c2410_interface_core { s3c24xx_core_pin_r_func pin_r; s3c24xx_core_pin_w_func pin_w; }; -typedef struct _s3c2410_interface_gpio s3c2410_interface_gpio; -struct _s3c2410_interface_gpio +struct s3c2410_interface_gpio { s3c24xx_gpio_port_r_func port_r; s3c24xx_gpio_port_w_func port_w; }; -typedef struct _s3c2410_interface_i2c s3c2410_interface_i2c; -struct _s3c2410_interface_i2c +struct s3c2410_interface_i2c { write_line_device_func scl_w; read_line_device_func sda_r; write_line_device_func sda_w; }; -typedef struct _s3c2410_interface_adc s3c2410_interface_adc; -struct _s3c2410_interface_adc +struct s3c2410_interface_adc { read32_device_func data_r; }; -typedef struct _s3c2410_interface_i2s s3c2410_interface_i2s; -struct _s3c2410_interface_i2s +struct s3c2410_interface_i2s { write16_device_func data_w; }; -typedef struct _s3c2410_interface_nand s3c2410_interface_nand; -struct _s3c2410_interface_nand +struct s3c2410_interface_nand { write8_device_func command_w; write8_device_func address_w; @@ -118,14 +112,12 @@ struct _s3c2410_interface_nand write8_device_func data_w; }; -typedef struct _s3c2410_interface_lcd s3c2410_interface_lcd; -struct _s3c2410_interface_lcd +struct s3c2410_interface_lcd { int flags; }; -typedef struct _s3c2410_interface s3c2410_interface; -struct _s3c2410_interface +struct s3c2410_interface { s3c2410_interface_core core; s3c2410_interface_gpio gpio; diff --git a/src/emu/machine/s3c2440.h b/src/emu/machine/s3c2440.h index 21568d85728..26994b73d38 100644 --- a/src/emu/machine/s3c2440.h +++ b/src/emu/machine/s3c2440.h @@ -73,42 +73,36 @@ typedef void (*s3c24xx_gpio_port_w_func)( device_t *device, int port, UINT32 mas typedef int (*s3c24xx_core_pin_r_func)( device_t *device, int pin); typedef void (*s3c24xx_core_pin_w_func)( device_t *device, int pin, int data); -typedef struct _s3c2440_interface_core s3c2440_interface_core; -struct _s3c2440_interface_core +struct s3c2440_interface_core { s3c24xx_core_pin_r_func pin_r; s3c24xx_core_pin_w_func pin_w; }; -typedef struct _s3c2440_interface_gpio s3c2440_interface_gpio; -struct _s3c2440_interface_gpio +struct s3c2440_interface_gpio { s3c24xx_gpio_port_r_func port_r; s3c24xx_gpio_port_w_func port_w; }; -typedef struct _s3c2440_interface_i2c s3c2440_interface_i2c; -struct _s3c2440_interface_i2c +struct s3c2440_interface_i2c { write_line_device_func scl_w; read_line_device_func sda_r; write_line_device_func sda_w; }; -typedef struct _s3c2440_interface_adc s3c2440_interface_adc; -struct _s3c2440_interface_adc +struct s3c2440_interface_adc { read32_device_func data_r; }; -typedef struct _s3c2440_interface_i2s s3c2440_interface_i2s; -struct _s3c2440_interface_i2s +struct s3c2440_interface_i2s { write16_device_func data_w; }; -typedef struct _s3c2440_interface_nand s3c2440_interface_nand; -struct _s3c2440_interface_nand +struct s3c2440_interface_nand { write8_device_func command_w; write8_device_func address_w; @@ -116,14 +110,12 @@ struct _s3c2440_interface_nand write8_device_func data_w; }; -typedef struct _s3c2440_interface_lcd s3c2440_interface_lcd; -struct _s3c2440_interface_lcd +struct s3c2440_interface_lcd { int flags; }; -typedef struct _s3c2440_interface s3c2440_interface; -struct _s3c2440_interface +struct s3c2440_interface { s3c2440_interface_core core; s3c2440_interface_gpio gpio; diff --git a/src/emu/machine/smc91c9x.c b/src/emu/machine/smc91c9x.c index 90f5878c967..e8084aefdde 100644 --- a/src/emu/machine/smc91c9x.c +++ b/src/emu/machine/smc91c9x.c @@ -106,8 +106,7 @@ static const char *const ethernet_regname[64] = TYPE DEFINITIONS ***************************************************************************/ -typedef struct _smc91c9x_state smc91c9x_state; -struct _smc91c9x_state +struct smc91c9x_state { device_t *device; smc91c9x_irq_func irq_handler; diff --git a/src/emu/machine/smc91c9x.h b/src/emu/machine/smc91c9x.h index 9f8161f32b1..038b3cc4000 100644 --- a/src/emu/machine/smc91c9x.h +++ b/src/emu/machine/smc91c9x.h @@ -19,8 +19,7 @@ typedef void (*smc91c9x_irq_func)(device_t *device, int state); -typedef struct _smc91c9x_config smc91c9x_config; -struct _smc91c9x_config +struct smc91c9x_config { smc91c9x_irq_func interrupt; }; diff --git a/src/emu/machine/tms6100.c b/src/emu/machine/tms6100.c index c7569dd3053..d003fd799c3 100644 --- a/src/emu/machine/tms6100.c +++ b/src/emu/machine/tms6100.c @@ -73,8 +73,7 @@ #define TMS6100_READ_PENDING 0x01 #define TMS6100_NEXT_READ_IS_DUMMY 0x02 -typedef struct _tms6100_state tms6100_state; -struct _tms6100_state +struct tms6100_state { /* Rom interface */ UINT32 address; diff --git a/src/emu/machine/upd4701.c b/src/emu/machine/upd4701.c index 4c3ad6b0467..f7894d87799 100644 --- a/src/emu/machine/upd4701.c +++ b/src/emu/machine/upd4701.c @@ -15,8 +15,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _upd4701_state upd4701_state; -struct _upd4701_state +struct upd4701_state { int cs; int xy; diff --git a/src/emu/machine/wd17xx.c b/src/emu/machine/wd17xx.c index 37567be3e1d..f40569ec4ec 100644 --- a/src/emu/machine/wd17xx.c +++ b/src/emu/machine/wd17xx.c @@ -287,8 +287,7 @@ static const UINT8 track_SD[][2] = { TYPE DEFINITIONS ***************************************************************************/ -typedef struct _wd1770_state wd1770_state; -struct _wd1770_state +struct wd1770_state { /* callbacks */ devcb_resolved_read_line in_dden_func; diff --git a/src/emu/machine/wd17xx.h b/src/emu/machine/wd17xx.h index bc7add9f89d..80d85987b80 100644 --- a/src/emu/machine/wd17xx.h +++ b/src/emu/machine/wd17xx.h @@ -233,8 +233,7 @@ extern const device_type MB8877; ***************************************************************************/ /* Interface */ -typedef struct _wd17xx_interface wd17xx_interface; -struct _wd17xx_interface +struct wd17xx_interface { devcb_read_line in_dden_func; devcb_write_line out_intrq_func; diff --git a/src/emu/output.c b/src/emu/output.c index 14ea5227617..eb9f250b1a5 100644 --- a/src/emu/output.c +++ b/src/emu/output.c @@ -26,8 +26,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _output_notify output_notify; -struct _output_notify +struct output_notify { output_notify * next; /* link to next item */ output_notifier_func notifier; /* callback to call */ @@ -35,8 +34,7 @@ struct _output_notify }; -typedef struct _output_item output_item; -struct _output_item +struct output_item { output_item * next; /* next item in list */ const char * name; /* string name of the item */ diff --git a/src/emu/render.h b/src/emu/render.h index da7e32dea3a..697d8a36fda 100644 --- a/src/emu/render.h +++ b/src/emu/render.h @@ -171,7 +171,7 @@ class device_t; class screen_device; class render_container; class render_manager; -typedef struct _xml_data_node xml_data_node; +struct xml_data_node; class render_font; struct object_transform; class layout_element; diff --git a/src/emu/romload.c b/src/emu/romload.c index 854a346571f..4571061ce58 100644 --- a/src/emu/romload.c +++ b/src/emu/romload.c @@ -57,8 +57,7 @@ private: }; -typedef struct _romload_private rom_load_data; -struct _romload_private +struct romload_private { running_machine &machine() const { assert(m_machine != NULL); return *m_machine; } @@ -283,7 +282,7 @@ static void CLIB_DECL ATTR_PRINTF(1,2) debugload(const char *string, ...) from SystemBios structure and OPTION_BIOS -------------------------------------------------*/ -static void determine_bios_rom(rom_load_data *romdata, device_t *device,const char *specbios) +static void determine_bios_rom(romload_private *romdata, device_t *device,const char *specbios) { const char *defaultname = NULL; const rom_entry *rom; @@ -337,7 +336,7 @@ static void determine_bios_rom(rom_load_data *romdata, device_t *device,const ch that will need to be loaded -------------------------------------------------*/ -static void count_roms(rom_load_data *romdata) +static void count_roms(romload_private *romdata) { const rom_entry *region, *rom; @@ -375,7 +374,7 @@ static void fill_random(running_machine &machine, UINT8 *base, UINT32 length) for missing files -------------------------------------------------*/ -static void handle_missing_file(rom_load_data *romdata, const rom_entry *romp) +static void handle_missing_file(romload_private *romdata, const rom_entry *romp) { /* optional files are okay */ if (ROM_ISOPTIONAL(romp)) @@ -406,7 +405,7 @@ static void handle_missing_file(rom_load_data *romdata, const rom_entry *romp) correct checksums for a given ROM -------------------------------------------------*/ -static void dump_wrong_and_correct_checksums(rom_load_data *romdata, const hash_collection &hashes, const hash_collection &acthashes) +static void dump_wrong_and_correct_checksums(romload_private *romdata, const hash_collection &hashes, const hash_collection &acthashes) { astring tempstr; romdata->errorstring.catprintf(" EXPECTED: %s\n", hashes.macro_string(tempstr)); @@ -419,7 +418,7 @@ static void dump_wrong_and_correct_checksums(rom_load_data *romdata, const hash_ and hash signatures of a file -------------------------------------------------*/ -static void verify_length_and_hash(rom_load_data *romdata, const char *name, UINT32 explength, const hash_collection &hashes) +static void verify_length_and_hash(romload_private *romdata, const char *name, UINT32 explength, const hash_collection &hashes) { /* we've already complained if there is no file */ if (romdata->file == NULL) @@ -463,7 +462,7 @@ static void verify_length_and_hash(rom_load_data *romdata, const char *name, UIN messages about ROM loading to the user -------------------------------------------------*/ -static void display_loading_rom_message(rom_load_data *romdata, const char *name) +static void display_loading_rom_message(romload_private *romdata, const char *name) { char buffer[200]; @@ -483,7 +482,7 @@ static void display_loading_rom_message(rom_load_data *romdata, const char *name results of ROM loading -------------------------------------------------*/ -static void display_rom_load_results(rom_load_data *romdata) +static void display_rom_load_results(romload_private *romdata) { /* final status display */ display_loading_rom_message(romdata, NULL); @@ -512,7 +511,7 @@ static void display_rom_load_results(rom_load_data *romdata) byte swapping and inverting data as necessary -------------------------------------------------*/ -static void region_post_process(rom_load_data *romdata, const char *rgntag, bool invert) +static void region_post_process(romload_private *romdata, const char *rgntag, bool invert) { memory_region *region = romdata->machine().root_device().memregion(rgntag); UINT8 *base; @@ -553,7 +552,7 @@ static void region_post_process(rom_load_data *romdata, const char *rgntag, bool up the parent and loading by checksum -------------------------------------------------*/ -static int open_rom_file(rom_load_data *romdata, const char *regiontag, const rom_entry *romp) +static int open_rom_file(romload_private *romdata, const char *regiontag, const rom_entry *romp) { file_error filerr = FILERR_NOT_FOUND; UINT32 romsize = rom_file_size(romp); @@ -651,7 +650,7 @@ static int open_rom_file(rom_load_data *romdata, const char *regiontag, const ro random data for a NULL file -------------------------------------------------*/ -static int rom_fread(rom_load_data *romdata, UINT8 *buffer, int length, const rom_entry *parent_region) +static int rom_fread(romload_private *romdata, UINT8 *buffer, int length, const rom_entry *parent_region) { /* files just pass through */ if (romdata->file != NULL) @@ -670,7 +669,7 @@ static int rom_fread(rom_load_data *romdata, UINT8 *buffer, int length, const ro entry -------------------------------------------------*/ -static int read_rom_data(rom_load_data *romdata, const rom_entry *parent_region, const rom_entry *romp) +static int read_rom_data(romload_private *romdata, const rom_entry *parent_region, const rom_entry *romp) { int datashift = ROM_GETBITSHIFT(romp); int datamask = ((1 << ROM_GETBITWIDTH(romp)) - 1) << datashift; @@ -790,7 +789,7 @@ static int read_rom_data(rom_load_data *romdata, const rom_entry *parent_region, fill_rom_data - fill a region of ROM space -------------------------------------------------*/ -static void fill_rom_data(rom_load_data *romdata, const rom_entry *romp) +static void fill_rom_data(romload_private *romdata, const rom_entry *romp) { UINT32 numbytes = ROM_GETLENGTH(romp); UINT8 *base = romdata->region->base() + ROM_GETOFFSET(romp); @@ -812,7 +811,7 @@ static void fill_rom_data(rom_load_data *romdata, const rom_entry *romp) copy_rom_data - copy a region of ROM space -------------------------------------------------*/ -static void copy_rom_data(rom_load_data *romdata, const rom_entry *romp) +static void copy_rom_data(romload_private *romdata, const rom_entry *romp) { UINT8 *base = romdata->region->base() + ROM_GETOFFSET(romp); const char *srcrgntag = ROM_GETNAME(romp); @@ -846,7 +845,7 @@ static void copy_rom_data(rom_load_data *romdata, const rom_entry *romp) for a region -------------------------------------------------*/ -static void process_rom_entries(rom_load_data *romdata, const char *regiontag, const rom_entry *parent_region, const rom_entry *romp, device_t *device) +static void process_rom_entries(romload_private *romdata, const char *regiontag, const rom_entry *parent_region, const rom_entry *romp, device_t *device) { UINT32 lastflags = 0; @@ -1137,7 +1136,7 @@ static chd_error open_disk_diff(emu_options &options, const rom_entry *romp, chd for a region -------------------------------------------------*/ -static void process_disk_entries(rom_load_data *romdata, const char *regiontag, const rom_entry *parent_region, const rom_entry *romp, const char *locationtag) +static void process_disk_entries(romload_private *romdata, const char *regiontag, const rom_entry *parent_region, const rom_entry *romp, const char *locationtag) { /* loop until we hit the end of this region */ for ( ; !ROMENTRY_ISREGIONEND(romp); romp++) @@ -1262,7 +1261,7 @@ static void normalize_flags_for_device(running_machine &machine, const char *rgn void load_software_part_region(device_t *device, char *swlist, char *swname, rom_entry *start_region) { astring locationtag(swlist), breakstr("%"); - rom_load_data *romdata = device->machine().romload_data; + romload_private *romdata = device->machine().romload_data; const rom_entry *region; astring regiontag; @@ -1375,7 +1374,7 @@ void load_software_part_region(device_t *device, char *swlist, char *swname, rom process_region_list - process a region list -------------------------------------------------*/ -static void process_region_list(rom_load_data *romdata) +static void process_region_list(romload_private *romdata) { astring regiontag; @@ -1442,7 +1441,7 @@ static void process_region_list(rom_load_data *romdata) void rom_init(running_machine &machine) { - rom_load_data *romdata; + romload_private *romdata; /* allocate private data */ machine.romload_data = romdata = auto_alloc_clear(machine, romload_private); diff --git a/src/emu/sound/2151intf.c b/src/emu/sound/2151intf.c index 0c976d38987..ee9fee15d80 100644 --- a/src/emu/sound/2151intf.c +++ b/src/emu/sound/2151intf.c @@ -12,8 +12,7 @@ #include "ym2151.h" -typedef struct _ym2151_state ym2151_state; -struct _ym2151_state +struct ym2151_state { sound_stream * stream; emu_timer * timer[2]; diff --git a/src/emu/sound/2151intf.h b/src/emu/sound/2151intf.h index f355ec5dc9d..840269b0faa 100644 --- a/src/emu/sound/2151intf.h +++ b/src/emu/sound/2151intf.h @@ -5,8 +5,7 @@ #include "devlegcy.h" -typedef struct _ym2151_interface ym2151_interface; -struct _ym2151_interface +struct ym2151_interface { devcb_write_line irqhandler; devcb_write8 portwritehandler; diff --git a/src/emu/sound/2203intf.c b/src/emu/sound/2203intf.c index 60bd0318e7f..34767229718 100644 --- a/src/emu/sound/2203intf.c +++ b/src/emu/sound/2203intf.c @@ -3,8 +3,7 @@ #include "fm.h" -typedef struct _ym2203_state ym2203_state; -struct _ym2203_state +struct ym2203_state { sound_stream * stream; emu_timer * timer[2]; diff --git a/src/emu/sound/2203intf.h b/src/emu/sound/2203intf.h index ba32f219f1a..81f5aea9b98 100644 --- a/src/emu/sound/2203intf.h +++ b/src/emu/sound/2203intf.h @@ -9,8 +9,7 @@ void ym2203_update_request(void *param); -typedef struct _ym2203_interface ym2203_interface; -struct _ym2203_interface +struct ym2203_interface { const ay8910_interface ay8910_intf; devcb_write_line irqhandler; diff --git a/src/emu/sound/2413intf.c b/src/emu/sound/2413intf.c index 6d2a7a32928..24a5051c3c0 100644 --- a/src/emu/sound/2413intf.c +++ b/src/emu/sound/2413intf.c @@ -10,8 +10,7 @@ /* for stream system */ -typedef struct _ym2413_state ym2413_state; -struct _ym2413_state +struct ym2413_state { sound_stream * stream; void * chip; diff --git a/src/emu/sound/2608intf.c b/src/emu/sound/2608intf.c index d4f4ee2feda..5dfe6f470ea 100644 --- a/src/emu/sound/2608intf.c +++ b/src/emu/sound/2608intf.c @@ -16,8 +16,7 @@ #include "2608intf.h" #include "fm.h" -typedef struct _ym2608_state ym2608_state; -struct _ym2608_state +struct ym2608_state { sound_stream * stream; emu_timer * timer[2]; diff --git a/src/emu/sound/2608intf.h b/src/emu/sound/2608intf.h index 1fbf0099891..597ca3c168a 100644 --- a/src/emu/sound/2608intf.h +++ b/src/emu/sound/2608intf.h @@ -10,8 +10,7 @@ void ym2608_update_request(void *param); -typedef struct _ym2608_interface ym2608_interface; -struct _ym2608_interface +struct ym2608_interface { const ay8910_interface ay8910_intf; void ( *handler )( device_t *device, int irq ); /* IRQ handler for the YM2608 */ diff --git a/src/emu/sound/2610intf.c b/src/emu/sound/2610intf.c index c2db5cbbd64..bef3d200eea 100644 --- a/src/emu/sound/2610intf.c +++ b/src/emu/sound/2610intf.c @@ -16,8 +16,7 @@ #include "2610intf.h" #include "fm.h" -typedef struct _ym2610_state ym2610_state; -struct _ym2610_state +struct ym2610_state { sound_stream * stream; emu_timer * timer[2]; diff --git a/src/emu/sound/2610intf.h b/src/emu/sound/2610intf.h index 76d92a58e4d..eb66606e792 100644 --- a/src/emu/sound/2610intf.h +++ b/src/emu/sound/2610intf.h @@ -9,8 +9,7 @@ void ym2610_update_request(void *param); -typedef struct _ym2610_interface ym2610_interface; -struct _ym2610_interface +struct ym2610_interface { void ( *handler )( device_t *device, int irq ); /* IRQ handler for the YM2610 */ }; diff --git a/src/emu/sound/2612intf.c b/src/emu/sound/2612intf.c index 7513746d7f4..c796403c142 100644 --- a/src/emu/sound/2612intf.c +++ b/src/emu/sound/2612intf.c @@ -16,8 +16,7 @@ #include "sound/2612intf.h" -typedef struct _ym2612_state ym2612_state; -struct _ym2612_state +struct ym2612_state { sound_stream * stream; emu_timer * timer[2]; diff --git a/src/emu/sound/2612intf.h b/src/emu/sound/2612intf.h index f7653a6d114..902ed020dea 100644 --- a/src/emu/sound/2612intf.h +++ b/src/emu/sound/2612intf.h @@ -7,8 +7,7 @@ void ym2612_update_request(void *param); -typedef struct _ym2612_interface ym2612_interface; -struct _ym2612_interface +struct ym2612_interface { void (*handler)(device_t *device, int irq); }; @@ -55,8 +54,7 @@ extern const device_type YM2612; -typedef struct _ym3438_interface ym3438_interface; -struct _ym3438_interface +struct ym3438_interface { void (*handler)(device_t *device, int irq); }; diff --git a/src/emu/sound/262intf.c b/src/emu/sound/262intf.c index 2ae7b9003f1..0233f7c5577 100644 --- a/src/emu/sound/262intf.c +++ b/src/emu/sound/262intf.c @@ -10,8 +10,7 @@ #include "ymf262.h" -typedef struct _ymf262_state ymf262_state; -struct _ymf262_state +struct ymf262_state { sound_stream * stream; emu_timer * timer[2]; diff --git a/src/emu/sound/262intf.h b/src/emu/sound/262intf.h index 0224f2e40a4..4dfd374e28f 100644 --- a/src/emu/sound/262intf.h +++ b/src/emu/sound/262intf.h @@ -6,8 +6,7 @@ #include "devlegcy.h" -typedef struct _ymf262_interface ymf262_interface; -struct _ymf262_interface +struct ymf262_interface { void (*handler)(device_t *device, int irq); }; diff --git a/src/emu/sound/3526intf.c b/src/emu/sound/3526intf.c index cf4c974a364..f0b50aee8e9 100644 --- a/src/emu/sound/3526intf.c +++ b/src/emu/sound/3526intf.c @@ -22,8 +22,7 @@ #include "sound/fmopl.h" -typedef struct _ym3526_state ym3526_state; -struct _ym3526_state +struct ym3526_state { sound_stream * stream; emu_timer * timer[2]; diff --git a/src/emu/sound/3526intf.h b/src/emu/sound/3526intf.h index 602bb1e74a0..f75e35c0c48 100644 --- a/src/emu/sound/3526intf.h +++ b/src/emu/sound/3526intf.h @@ -5,8 +5,7 @@ #include "devlegcy.h" -typedef struct _ym3526_interface ym3526_interface; -struct _ym3526_interface +struct ym3526_interface { devcb_write_line out_int_func; }; diff --git a/src/emu/sound/3812intf.c b/src/emu/sound/3812intf.c index af0eba38939..53401de42d5 100644 --- a/src/emu/sound/3812intf.c +++ b/src/emu/sound/3812intf.c @@ -22,8 +22,7 @@ #include "sound/fmopl.h" -typedef struct _ym3812_state ym3812_state; -struct _ym3812_state +struct ym3812_state { sound_stream * stream; emu_timer * timer[2]; diff --git a/src/emu/sound/3812intf.h b/src/emu/sound/3812intf.h index 1314c315a7f..dfa78b933fd 100644 --- a/src/emu/sound/3812intf.h +++ b/src/emu/sound/3812intf.h @@ -5,8 +5,7 @@ #include "devlegcy.h" -typedef struct _ym3812_interface ym3812_interface; -struct _ym3812_interface +struct ym3812_interface { void (*handler)(device_t *device, int linestate); }; diff --git a/src/emu/sound/8950intf.c b/src/emu/sound/8950intf.c index b81b1a81073..e64b38030ed 100644 --- a/src/emu/sound/8950intf.c +++ b/src/emu/sound/8950intf.c @@ -22,8 +22,7 @@ #include "sound/fmopl.h" -typedef struct _y8950_state y8950_state; -struct _y8950_state +struct y8950_state { sound_stream * stream; emu_timer * timer[2]; diff --git a/src/emu/sound/8950intf.h b/src/emu/sound/8950intf.h index 3607ee96fba..e8de9ca087c 100644 --- a/src/emu/sound/8950intf.h +++ b/src/emu/sound/8950intf.h @@ -5,8 +5,7 @@ #include "devlegcy.h" -typedef struct _y8950_interface y8950_interface; -struct _y8950_interface +struct y8950_interface { void (*handler)(device_t *device, int linestate); diff --git a/src/emu/sound/aica.h b/src/emu/sound/aica.h index 39313dcfd99..6d450d5b456 100644 --- a/src/emu/sound/aica.h +++ b/src/emu/sound/aica.h @@ -8,8 +8,7 @@ #include "devlegcy.h" -typedef struct _aica_interface aica_interface; -struct _aica_interface +struct aica_interface { int master; int roffset; /* offset in the region */ diff --git a/src/emu/sound/astrocde.c b/src/emu/sound/astrocde.c index 35b9f67efff..f8518b452a6 100644 --- a/src/emu/sound/astrocde.c +++ b/src/emu/sound/astrocde.c @@ -43,8 +43,7 @@ #include "astrocde.h" -typedef struct _astrocade_state astrocade_state; -struct _astrocade_state +struct astrocade_state { sound_stream *stream; /* sound stream */ diff --git a/src/emu/sound/ay8910.c b/src/emu/sound/ay8910.c index b6ea27b2218..3770aef86d3 100644 --- a/src/emu/sound/ay8910.c +++ b/src/emu/sound/ay8910.c @@ -151,8 +151,7 @@ has twice the steps, happening twice as fast. * *************************************/ -typedef struct _ay_ym_param ay_ym_param; -struct _ay_ym_param +struct ay_ym_param { double r_up; double r_down; @@ -160,8 +159,7 @@ struct _ay_ym_param double res[32]; }; -typedef struct _ay8910_context ay8910_context; -struct _ay8910_context +struct ay8910_context { device_t *device; int streams; diff --git a/src/emu/sound/ay8910.h b/src/emu/sound/ay8910.h index 7a67c1cefe0..e84421c62df 100644 --- a/src/emu/sound/ay8910.h +++ b/src/emu/sound/ay8910.h @@ -77,8 +77,7 @@ YMZ294: 0 I/O port #define AY8910_INTERFACE(name) \ const ay8910_interface (name) = -typedef struct _ay8910_interface ay8910_interface; -struct _ay8910_interface +struct ay8910_interface { int flags; /* Flags */ int res_load[3]; /* Load on channel in ohms */ diff --git a/src/emu/sound/beep.c b/src/emu/sound/beep.c index 4c9d88d7d3c..f5eefa37748 100644 --- a/src/emu/sound/beep.c +++ b/src/emu/sound/beep.c @@ -17,8 +17,7 @@ #define BEEP_RATE 48000 -typedef struct _beep_state beep_state; -struct _beep_state +struct beep_state { sound_stream *stream; /* stream number */ int enable; /* enable beep */ diff --git a/src/emu/sound/c140.c b/src/emu/sound/c140.c index 7fc4955cb5d..af7958aa399 100644 --- a/src/emu/sound/c140.c +++ b/src/emu/sound/c140.c @@ -86,8 +86,7 @@ typedef struct long sample_loop; } VOICE; -typedef struct _c140_state c140_state; -struct _c140_state +struct c140_state { int sample_rate; sound_stream *stream; diff --git a/src/emu/sound/c140.h b/src/emu/sound/c140.h index f5942a6cbcd..c4f5e637832 100644 --- a/src/emu/sound/c140.h +++ b/src/emu/sound/c140.h @@ -19,8 +19,7 @@ enum C140_TYPE_ASIC219 }; -typedef struct _c140_interface c140_interface; -struct _c140_interface { +struct c140_interface { int banking_type; }; diff --git a/src/emu/sound/c6280.h b/src/emu/sound/c6280.h index 029d2caa042..b1bbecf22f8 100644 --- a/src/emu/sound/c6280.h +++ b/src/emu/sound/c6280.h @@ -5,8 +5,7 @@ #include "devlegcy.h" -typedef struct _c6280_interface c6280_interface; -struct _c6280_interface +struct c6280_interface { const char * cpu; }; diff --git a/src/emu/sound/cdda.c b/src/emu/sound/cdda.c index f7fea928c75..64cf49a3573 100644 --- a/src/emu/sound/cdda.c +++ b/src/emu/sound/cdda.c @@ -7,8 +7,7 @@ #include "cdrom.h" #include "cdda.h" -typedef struct _cdda_info cdda_info; -struct _cdda_info +struct cdda_info { sound_stream * stream; cdrom_file * disc; diff --git a/src/emu/sound/cem3394.c b/src/emu/sound/cem3394.c index fe5ee1ee855..0b1eb89ccb6 100644 --- a/src/emu/sound/cem3394.c +++ b/src/emu/sound/cem3394.c @@ -103,8 +103,7 @@ /* this structure defines the parameters for a channel */ -typedef struct _cem3394_state cem3394_state; -struct _cem3394_state +struct cem3394_state { sound_stream * stream; /* our stream */ void (*external)(device_t *, int, short *);/* callback to generate external samples */ diff --git a/src/emu/sound/cem3394.h b/src/emu/sound/cem3394.h index 0382e2b96a7..985dcb743cb 100644 --- a/src/emu/sound/cem3394.h +++ b/src/emu/sound/cem3394.h @@ -10,8 +10,7 @@ /* interface */ -typedef struct _cem3394_interface cem3394_interface; -struct _cem3394_interface +struct cem3394_interface { double vco_zero_freq; /* frequency at 0V for VCO */ double filter_zero_freq; /* frequency at 0V for filter */ diff --git a/src/emu/sound/discrete.h b/src/emu/sound/discrete.h index 7df8b90ce68..d59ca5e12a4 100644 --- a/src/emu/sound/discrete.h +++ b/src/emu/sound/discrete.h @@ -3832,8 +3832,7 @@ private: * *************************************/ -typedef struct _discrete_lfsr_desc discrete_lfsr_desc; -struct _discrete_lfsr_desc +struct discrete_lfsr_desc { int clock_type; int bitlength; @@ -3854,8 +3853,7 @@ struct _discrete_lfsr_desc }; -typedef struct _discrete_op_amp_osc_info discrete_op_amp_osc_info; -struct _discrete_op_amp_osc_info +struct discrete_op_amp_osc_info { UINT32 type; double r1; @@ -3875,8 +3873,7 @@ struct _discrete_op_amp_osc_info #define DEFAULT_74LS14_VALUES 1.6, 0.8, 3.4 -typedef struct _discrete_schmitt_osc_desc discrete_schmitt_osc_desc; -struct _discrete_schmitt_osc_desc +struct discrete_schmitt_osc_desc { double rIn; double rFeedback; @@ -3888,8 +3885,7 @@ struct _discrete_schmitt_osc_desc }; -typedef struct _discrete_comp_adder_table discrete_comp_adder_table; -struct _discrete_comp_adder_table +struct discrete_comp_adder_table { int type; double cDefault; // Default componet. 0 if not used. @@ -3898,8 +3894,7 @@ struct _discrete_comp_adder_table }; -typedef struct _discrete_dac_r1_ladder discrete_dac_r1_ladder; -struct _discrete_dac_r1_ladder +struct discrete_dac_r1_ladder { int ladderLength; // 2 to DISC_LADDER_MAXRES. 1 would be useless. double r[DISC_LADDER_MAXRES]; // Don't use 0 for valid resistors. That is a short. @@ -3910,8 +3905,7 @@ struct _discrete_dac_r1_ladder }; -typedef struct _discrete_integrate_info discrete_integrate_info; -struct _discrete_integrate_info +struct discrete_integrate_info { UINT32 type; double r1; // r1a + r1b @@ -3927,8 +3921,7 @@ struct _discrete_integrate_info #define DISC_MAX_MIXER_INPUTS 8 -typedef struct _discrete_mixer_desc discrete_mixer_desc; -struct _discrete_mixer_desc +struct discrete_mixer_desc { int type; double r[DISC_MAX_MIXER_INPUTS]; /* static input resistance values. These are in series with rNode, if used. */ @@ -3943,8 +3936,7 @@ struct _discrete_mixer_desc }; -typedef struct _discrete_op_amp_info discrete_op_amp_info; -struct _discrete_op_amp_info +struct discrete_op_amp_info { UINT32 type; double r1; @@ -3957,8 +3949,7 @@ struct _discrete_op_amp_info }; -typedef struct _discrete_op_amp_1sht_info discrete_op_amp_1sht_info; -struct _discrete_op_amp_1sht_info +struct discrete_op_amp_1sht_info { UINT32 type; double r1; @@ -3973,8 +3964,7 @@ struct _discrete_op_amp_1sht_info }; -typedef struct _discrete_op_amp_tvca_info discrete_op_amp_tvca_info; -struct _discrete_op_amp_tvca_info +struct discrete_op_amp_tvca_info { double r1; double r2; // r2a + r2b @@ -4004,8 +3994,7 @@ struct _discrete_op_amp_tvca_info }; -typedef struct _discrete_op_amp_filt_info discrete_op_amp_filt_info; -struct _discrete_op_amp_filt_info +struct discrete_op_amp_filt_info { double r1; double r2; @@ -4025,8 +4014,7 @@ struct _discrete_op_amp_filt_info #define DEFAULT_555_HIGH -1 #define DEFAULT_555_VALUES DEFAULT_555_CHARGE, DEFAULT_555_HIGH -typedef struct _discrete_555_desc discrete_555_desc; -struct _discrete_555_desc +struct discrete_555_desc { int options; /* bit mapped options */ double v_pos; /* B+ voltage of 555 */ @@ -4036,8 +4024,7 @@ struct _discrete_555_desc #define DEFAULT_555_CC_SOURCE DEFAULT_555_CHARGE -typedef struct _discrete_555_cc_desc discrete_555_cc_desc; -struct _discrete_555_cc_desc +struct discrete_555_cc_desc { int options; /* bit mapped options */ double v_pos; /* B+ voltage of 555 */ @@ -4047,8 +4034,7 @@ struct _discrete_555_cc_desc }; -typedef struct _discrete_555_vco1_desc discrete_555_vco1_desc; -struct _discrete_555_vco1_desc +struct discrete_555_vco1_desc { int options; /* bit mapped options */ double r1, r2, r3, r4, c; @@ -4058,8 +4044,7 @@ struct _discrete_555_vco1_desc }; -typedef struct _discrete_adsr discrete_adsr; -struct _discrete_adsr +struct discrete_adsr { double attack_time; /* All times are in seconds */ double attack_value; diff --git a/src/emu/sound/dmadac.c b/src/emu/sound/dmadac.c index c91f017d523..b941f6c237d 100644 --- a/src/emu/sound/dmadac.c +++ b/src/emu/sound/dmadac.c @@ -39,8 +39,7 @@ * *************************************/ -typedef struct _dmadac_state dmadac_state; -struct _dmadac_state +struct dmadac_state { /* sound stream and buffers */ sound_stream * channel; diff --git a/src/emu/sound/es5506.c b/src/emu/sound/es5506.c index a332684269d..9a2c1b9a6aa 100644 --- a/src/emu/sound/es5506.c +++ b/src/emu/sound/es5506.c @@ -135,8 +135,7 @@ Ensoniq OTIS - ES5505 Ensoniq OTTO - ***********************************************************************************************/ /* struct describing a single playing voice */ -typedef struct _es5506_voice es5506_voice; -struct _es5506_voice +struct es5506_voice { /* external state */ UINT32 control; /* control register */ @@ -167,8 +166,7 @@ struct _es5506_voice UINT32 accum_mask; }; -typedef struct _es5506_state es5506_state; -struct _es5506_state +struct es5506_state { sound_stream *stream; /* which stream are we using */ int sample_rate; /* current sample rate */ diff --git a/src/emu/sound/es5506.h b/src/emu/sound/es5506.h index 61c9d058e7a..cb1597e6cae 100644 --- a/src/emu/sound/es5506.h +++ b/src/emu/sound/es5506.h @@ -12,8 +12,7 @@ #include "devlegcy.h" -typedef struct _es5505_interface es5505_interface; -struct _es5505_interface +struct es5505_interface { const char * region0; /* memory region where the sample ROM lives */ const char * region1; /* memory region where the sample ROM lives */ @@ -53,8 +52,7 @@ extern const device_type ES5506; -typedef struct _es5506_interface es5506_interface; -struct _es5506_interface +struct es5506_interface { const char * region0; /* memory region where the sample ROM lives */ const char * region1; /* memory region where the sample ROM lives */ diff --git a/src/emu/sound/es8712.c b/src/emu/sound/es8712.c index 63ff2bc7c5a..e5cdfb2178b 100644 --- a/src/emu/sound/es8712.c +++ b/src/emu/sound/es8712.c @@ -19,8 +19,7 @@ /* struct describing a playing ADPCM chip */ -typedef struct _es8712_state es8712_state; -struct _es8712_state +struct es8712_state { UINT8 playing; /* 1 if we're actively playing */ diff --git a/src/emu/sound/filter.h b/src/emu/sound/filter.h index 802add09701..cbfdf6b97fc 100644 --- a/src/emu/sound/filter.h +++ b/src/emu/sound/filter.h @@ -16,15 +16,13 @@ typedef int filter_real; typedef double filter_real; #endif -typedef struct _filter filter; -struct _filter +struct filter { filter_real xcoeffs[(FILTER_ORDER_MAX+1)/2]; unsigned order; }; -typedef struct _filter_state filter_state; -struct _filter_state +struct filter_state { unsigned prev_mac; filter_real xprev[FILTER_ORDER_MAX]; @@ -65,8 +63,7 @@ filter_real filter_compute(filter* f, filter_state* s); #define Q_TO_DAMP(q) (1.0/q) -typedef struct _filter2_context filter2_context; -struct _filter2_context +struct filter2_context { double x0, x1, x2; /* x[k], x[k-1], x[k-2], current and previous 2 input values */ double y0, y1, y2; /* y[k], y[k-1], y[k-2], current and previous 2 output values */ diff --git a/src/emu/sound/flt_rc.c b/src/emu/sound/flt_rc.c index 94c4e9d2850..9d2d621e12f 100644 --- a/src/emu/sound/flt_rc.c +++ b/src/emu/sound/flt_rc.c @@ -1,8 +1,7 @@ #include "emu.h" #include "flt_rc.h" -typedef struct _filter_rc_state filter_rc_state; -struct _filter_rc_state +struct filter_rc_state { device_t *device; sound_stream * stream; diff --git a/src/emu/sound/flt_rc.h b/src/emu/sound/flt_rc.h index 3807f9e7d89..9449a0356c3 100644 --- a/src/emu/sound/flt_rc.h +++ b/src/emu/sound/flt_rc.h @@ -45,8 +45,7 @@ * */ -typedef struct _flt_rc_config flt_rc_config; -struct _flt_rc_config +struct flt_rc_config { int type; double R1; diff --git a/src/emu/sound/flt_vol.c b/src/emu/sound/flt_vol.c index 68e2f07c81a..5b58fb8af85 100644 --- a/src/emu/sound/flt_vol.c +++ b/src/emu/sound/flt_vol.c @@ -2,8 +2,7 @@ #include "flt_vol.h" -typedef struct _filter_volume_state filter_volume_state; -struct _filter_volume_state +struct filter_volume_state { sound_stream * stream; int gain; diff --git a/src/emu/sound/fm.h b/src/emu/sound/fm.h index 120ca9bdea8..3076e3800d2 100644 --- a/src/emu/sound/fm.h +++ b/src/emu/sound/fm.h @@ -28,8 +28,7 @@ /* --- external SSG(YM2149/AY-3-8910)emulator interface port */ /* used by YM2203,YM2608,and YM2610 */ -typedef struct _ssg_callbacks ssg_callbacks; -struct _ssg_callbacks +struct ssg_callbacks { void (*set_clock)(void *param, int clock); void (*write)(void *param, int address, int data); diff --git a/src/emu/sound/gaelco.c b/src/emu/sound/gaelco.c index 248ea4314c5..0713347635c 100644 --- a/src/emu/sound/gaelco.c +++ b/src/emu/sound/gaelco.c @@ -49,8 +49,7 @@ Registers per channel: #define VOLUME_LEVELS 0x10 /* this structure defines a channel */ -typedef struct _gaelco_sound_channel gaelco_sound_channel; -struct _gaelco_sound_channel +struct gaelco_sound_channel { int active; /* is it playing? */ int loop; /* = 0 no looping, = 1 looping */ @@ -58,8 +57,7 @@ struct _gaelco_sound_channel }; /* this structure defines the Gaelco custom sound chip */ -typedef struct _gaelco_sound_state gaelco_sound_state; -struct _gaelco_sound_state +struct gaelco_sound_state { sound_stream *stream; /* our stream */ UINT8 *snd_data; /* PCM data */ diff --git a/src/emu/sound/gaelco.h b/src/emu/sound/gaelco.h index d6c3a9dd046..a82057f5110 100644 --- a/src/emu/sound/gaelco.h +++ b/src/emu/sound/gaelco.h @@ -5,8 +5,7 @@ #include "devlegcy.h" -typedef struct _gaelcosnd_interface gaelcosnd_interface; -struct _gaelcosnd_interface +struct gaelcosnd_interface { const char *gfxregion; /* shared gfx region name */ int banks[4]; /* start of each ROM bank */ diff --git a/src/emu/sound/hc55516.c b/src/emu/sound/hc55516.c index 0c5e6700bef..07905fe6e7d 100644 --- a/src/emu/sound/hc55516.c +++ b/src/emu/sound/hc55516.c @@ -21,8 +21,7 @@ #define SAMPLE_GAIN 10000.0 -typedef struct _hc55516_state hc55516_state; -struct _hc55516_state +struct hc55516_state { sound_stream *channel; int clock; /* 0 = software driven, non-0 = oscillator */ diff --git a/src/emu/sound/iremga20.c b/src/emu/sound/iremga20.c index 985da18bcf7..b63ea7f3b38 100644 --- a/src/emu/sound/iremga20.c +++ b/src/emu/sound/iremga20.c @@ -45,8 +45,7 @@ struct IremGA20_channel_def UINT32 play; }; -typedef struct _ga20_state ga20_state; -struct _ga20_state +struct ga20_state { UINT8 *rom; INT32 rom_size; diff --git a/src/emu/sound/k005289.c b/src/emu/sound/k005289.c index 78297c7a0a3..f923519727f 100644 --- a/src/emu/sound/k005289.c +++ b/src/emu/sound/k005289.c @@ -39,8 +39,7 @@ typedef struct const unsigned char *wave; } k005289_sound_channel; -typedef struct _k005289_state k005289_state; -struct _k005289_state +struct k005289_state { k005289_sound_channel channel_list[2]; diff --git a/src/emu/sound/k007232.h b/src/emu/sound/k007232.h index 4c9b43021a6..f346d1f520b 100644 --- a/src/emu/sound/k007232.h +++ b/src/emu/sound/k007232.h @@ -9,8 +9,7 @@ #include "devlegcy.h" -typedef struct _k007232_interface k007232_interface; -struct _k007232_interface +struct k007232_interface { void (*portwritehandler)(device_t *, int); }; diff --git a/src/emu/sound/k051649.c b/src/emu/sound/k051649.c index e9be04e8d67..bded6d17a0b 100644 --- a/src/emu/sound/k051649.c +++ b/src/emu/sound/k051649.c @@ -39,8 +39,7 @@ typedef struct signed char waveram[32]; } k051649_sound_channel; -typedef struct _k051649_state k051649_state; -struct _k051649_state +struct k051649_state { k051649_sound_channel channel_list[5]; diff --git a/src/emu/sound/k053260.c b/src/emu/sound/k053260.c index 06d19b1eec3..46718e65789 100644 --- a/src/emu/sound/k053260.c +++ b/src/emu/sound/k053260.c @@ -13,8 +13,7 @@ #define BASE_SHIFT 16 -typedef struct _k053260_channel k053260_channel; -struct _k053260_channel +struct k053260_channel { UINT32 rate; UINT32 size; @@ -29,8 +28,7 @@ struct _k053260_channel int ppcm_data; }; -typedef struct _k053260_state k053260_state; -struct _k053260_state +struct k053260_state { sound_stream * channel; int mode; diff --git a/src/emu/sound/k053260.h b/src/emu/sound/k053260.h index 6b205b107b3..d28b3679e32 100644 --- a/src/emu/sound/k053260.h +++ b/src/emu/sound/k053260.h @@ -11,8 +11,7 @@ #include "devlegcy.h" -typedef struct _k053260_interface k053260_interface; -struct _k053260_interface { +struct k053260_interface { const char *rgnoverride; timer_expired_func irq; /* called on SH1 complete cycle ( clock / 32 ) */ }; diff --git a/src/emu/sound/k056800.c b/src/emu/sound/k056800.c index b88bd165608..a8355619dab 100644 --- a/src/emu/sound/k056800.c +++ b/src/emu/sound/k056800.c @@ -9,8 +9,7 @@ #include "emu.h" #include "sound/k056800.h" -typedef struct _k056800_state k056800_state; -struct _k056800_state +struct k056800_state { UINT8 host_reg[8]; UINT8 sound_reg[8]; diff --git a/src/emu/sound/k056800.h b/src/emu/sound/k056800.h index a36f8712d80..7930ea3d56a 100644 --- a/src/emu/sound/k056800.h +++ b/src/emu/sound/k056800.h @@ -17,8 +17,7 @@ typedef void (*k056800_irq_cb)(running_machine &, int); -typedef struct _k056800_interface k056800_interface; -struct _k056800_interface +struct k056800_interface { k056800_irq_cb irq_cb; }; diff --git a/src/emu/sound/msm5205.c b/src/emu/sound/msm5205.c index b434972b515..0f6e5c9a22c 100644 --- a/src/emu/sound/msm5205.c +++ b/src/emu/sound/msm5205.c @@ -52,8 +52,7 @@ */ -typedef struct _msm5205_state msm5205_state; -struct _msm5205_state +struct msm5205_state { const msm5205_interface *intf; device_t *device; diff --git a/src/emu/sound/msm5205.h b/src/emu/sound/msm5205.h index 66de15e5f74..86df242eea5 100644 --- a/src/emu/sound/msm5205.h +++ b/src/emu/sound/msm5205.h @@ -24,8 +24,7 @@ #define MSM6585_S80 (6+8) /* prescaler 1/80 (8KHz), data 4bit */ #define MSM6585_S20 (7+8) /* prescaler 1/20(32KHz), data 4bit */ -typedef struct _msm5205_interface msm5205_interface; -struct _msm5205_interface +struct msm5205_interface { void (*vclk_callback)(device_t *); /* VCLK callback */ int select; /* prescaler / bit width selector */ diff --git a/src/emu/sound/msm5232.h b/src/emu/sound/msm5232.h index 174109a8702..11e9eb3e033 100644 --- a/src/emu/sound/msm5232.h +++ b/src/emu/sound/msm5232.h @@ -5,8 +5,7 @@ #include "devlegcy.h" -typedef struct _msm5232_interface msm5232_interface; -struct _msm5232_interface +struct msm5232_interface { double capacity[8]; /* in Farads, capacitors connected to pins: 24,25,26,27 and 37,38,39,40 */ void (*gate_handler)(device_t *device, int state); /* callback called when the GATE output pin changes state */ diff --git a/src/emu/sound/n63701x.c b/src/emu/sound/n63701x.c index 1fbadefbddd..8755e198231 100644 --- a/src/emu/sound/n63701x.c +++ b/src/emu/sound/n63701x.c @@ -28,8 +28,7 @@ typedef struct } voice; -typedef struct _namco_63701x namco_63701x; -struct _namco_63701x +struct namco_63701x { voice voices[2]; sound_stream * stream; /* channel assigned by the mixer */ diff --git a/src/emu/sound/namco.c b/src/emu/sound/namco.c index c08a147f6a2..0886c81b5c1 100644 --- a/src/emu/sound/namco.c +++ b/src/emu/sound/namco.c @@ -50,8 +50,7 @@ typedef struct } sound_channel; -typedef struct _namco_sound namco_sound; -struct _namco_sound +struct namco_sound { /* data about the sound system */ sound_channel channel_list[MAX_VOICES]; diff --git a/src/emu/sound/namco.h b/src/emu/sound/namco.h index 7fceb1b4fe9..ce6cfc7c245 100644 --- a/src/emu/sound/namco.h +++ b/src/emu/sound/namco.h @@ -5,8 +5,7 @@ #include "devlegcy.h" -typedef struct _namco_interface namco_interface; -struct _namco_interface +struct namco_interface { int voices; /* number of voices */ int stereo; /* set to 1 to indicate stereo (e.g., System 1) */ diff --git a/src/emu/sound/nes_apu.c b/src/emu/sound/nes_apu.c index a7792bd838a..84b6ab03ceb 100644 --- a/src/emu/sound/nes_apu.c +++ b/src/emu/sound/nes_apu.c @@ -55,8 +55,7 @@ #define SYNCS_MAX2 0x80 /* GLOBAL VARIABLES */ -typedef struct _nesapu_state nesapu_state; -struct _nesapu_state +struct nesapu_state { apu_t APU; /* Actual APUs */ float apu_incsize; /* Adjustment increment */ diff --git a/src/emu/sound/nes_apu.h b/src/emu/sound/nes_apu.h index 6c767172c7a..a356b4edcc1 100644 --- a/src/emu/sound/nes_apu.h +++ b/src/emu/sound/nes_apu.h @@ -37,8 +37,7 @@ * processor, as each is shared. */ -typedef struct _nes_interface nes_interface; -struct _nes_interface +struct nes_interface { const char *cpu_tag; /* CPU tag */ }; diff --git a/src/emu/sound/nile.c b/src/emu/sound/nile.c index 1aef7546c85..73b0a9fa024 100644 --- a/src/emu/sound/nile.c +++ b/src/emu/sound/nile.c @@ -51,8 +51,7 @@ enum -typedef struct _nile_state nile_state; -struct _nile_state +struct nile_state { sound_stream * stream; UINT8 *sound_ram; diff --git a/src/emu/sound/okim6258.c b/src/emu/sound/okim6258.c index 8a21113985c..8b0160777c7 100644 --- a/src/emu/sound/okim6258.c +++ b/src/emu/sound/okim6258.c @@ -21,8 +21,7 @@ static const int dividers[4] = { 1024, 768, 512, 512 }; -typedef struct _okim6258_state okim6258_state; -struct _okim6258_state +struct okim6258_state { UINT8 status; diff --git a/src/emu/sound/okim6258.h b/src/emu/sound/okim6258.h index bbed3a960ce..03b9bebe1d8 100644 --- a/src/emu/sound/okim6258.h +++ b/src/emu/sound/okim6258.h @@ -7,8 +7,7 @@ /* an interface for the OKIM6258 and similar chips */ -typedef struct _okim6258_interface okim6258_interface; -struct _okim6258_interface +struct okim6258_interface { int divider; int adpcm_type; diff --git a/src/emu/sound/okim6376.c b/src/emu/sound/okim6376.c index 622426c1695..8b88c33ff5d 100644 --- a/src/emu/sound/okim6376.c +++ b/src/emu/sound/okim6376.c @@ -34,8 +34,7 @@ struct ADPCMVoice INT32 step; }; -typedef struct _okim6376_state okim6376_state; -struct _okim6376_state +struct okim6376_state { #define OKIM6376_VOICES 2 struct ADPCMVoice voice[OKIM6376_VOICES]; diff --git a/src/emu/sound/pokey.h b/src/emu/sound/pokey.h index 0203ce18c27..4a10392d7b5 100644 --- a/src/emu/sound/pokey.h +++ b/src/emu/sound/pokey.h @@ -112,8 +112,7 @@ // ======================> pokey_interface -typedef struct _pokey_interface pokey_interface; -struct _pokey_interface +struct pokey_interface { devcb_read8 m_pot_r_cb[8]; devcb_read8 m_allpot_r_cb; diff --git a/src/emu/sound/qsound.c b/src/emu/sound/qsound.c index 25a6b1c8c08..1d89ac5cdb1 100644 --- a/src/emu/sound/qsound.c +++ b/src/emu/sound/qsound.c @@ -70,8 +70,7 @@ struct QSOUND_CHANNEL INT32 offset; /* current offset counter */ }; -typedef struct _qsound_state qsound_state; -struct _qsound_state +struct qsound_state { /* Private variables */ sound_stream * stream; /* Audio stream */ diff --git a/src/emu/sound/rf5c400.c b/src/emu/sound/rf5c400.c index 34d6440680a..c776ab65875 100644 --- a/src/emu/sound/rf5c400.c +++ b/src/emu/sound/rf5c400.c @@ -18,8 +18,7 @@ #include "emu.h" #include "rf5c400.h" -typedef struct _rf5c400_channel rf5c400_channel; -struct _rf5c400_channel +struct rf5c400_channel { UINT16 startH; UINT16 startL; @@ -47,8 +46,7 @@ struct _rf5c400_channel double env_scale; }; -typedef struct _rf5c400_state rf5c400_state; -struct _rf5c400_state +struct rf5c400_state { INT16 *rom; UINT32 rom_length; diff --git a/src/emu/sound/rf5c68.c b/src/emu/sound/rf5c68.c index 8fbfa2f7610..a2516dc4323 100644 --- a/src/emu/sound/rf5c68.c +++ b/src/emu/sound/rf5c68.c @@ -9,8 +9,7 @@ #define NUM_CHANNELS (8) -typedef struct _pcm_channel pcm_channel; -struct _pcm_channel +struct pcm_channel { UINT8 enable; UINT8 env; @@ -22,8 +21,7 @@ struct _pcm_channel }; -typedef struct _rf5c68_state rf5c68_state; -struct _rf5c68_state +struct rf5c68_state { sound_stream * stream; pcm_channel chan[NUM_CHANNELS]; diff --git a/src/emu/sound/rf5c68.h b/src/emu/sound/rf5c68.h index a738d42032b..823cb5d35fc 100644 --- a/src/emu/sound/rf5c68.h +++ b/src/emu/sound/rf5c68.h @@ -16,8 +16,7 @@ WRITE8_DEVICE_HANDLER( rf5c68_w ); READ8_DEVICE_HANDLER( rf5c68_mem_r ); WRITE8_DEVICE_HANDLER( rf5c68_mem_w ); -typedef struct _rf5c68_interface rf5c68_interface; -struct _rf5c68_interface +struct rf5c68_interface { void (*sample_end_callback)(device_t* device, int channel); }; diff --git a/src/emu/sound/s2636.c b/src/emu/sound/s2636.c index 53149a3bcde..6a877d5bd0c 100644 --- a/src/emu/sound/s2636.c +++ b/src/emu/sound/s2636.c @@ -8,8 +8,7 @@ #include "sound/s2636.h" -typedef struct _s2636_sound s2636_sound; -struct _s2636_sound +struct s2636_sound { sound_stream *channel; UINT8 reg[1]; diff --git a/src/emu/sound/saa1099.c b/src/emu/sound/saa1099.c index 404d096829b..8f2a185cf6e 100644 --- a/src/emu/sound/saa1099.c +++ b/src/emu/sound/saa1099.c @@ -96,8 +96,7 @@ struct saa1099_noise }; /* this structure defines a SAA1099 chip */ -typedef struct _saa1099_state saa1099_state; -struct _saa1099_state +struct saa1099_state { device_t *device; sound_stream * stream; /* our stream */ diff --git a/src/emu/sound/scsp.c b/src/emu/sound/scsp.c index 5d5273e49ef..95a5f0f0eaa 100644 --- a/src/emu/sound/scsp.c +++ b/src/emu/sound/scsp.c @@ -175,8 +175,7 @@ struct _SLOT #define USEDSP -typedef struct _scsp_state scsp_state; -struct _scsp_state +struct scsp_state { union { diff --git a/src/emu/sound/scsp.h b/src/emu/sound/scsp.h index 3fb6aed0ac6..2eff5ebf971 100644 --- a/src/emu/sound/scsp.h +++ b/src/emu/sound/scsp.h @@ -9,8 +9,7 @@ #include "devlegcy.h" -typedef struct _scsp_interface scsp_interface; -struct _scsp_interface +struct scsp_interface { int roffset; /* offset in the region */ void (*irq_callback)(device_t *device, int state); /* irq callback */ diff --git a/src/emu/sound/segapcm.c b/src/emu/sound/segapcm.c index a0ed8f93958..d16e9c44020 100644 --- a/src/emu/sound/segapcm.c +++ b/src/emu/sound/segapcm.c @@ -5,8 +5,7 @@ #include "emu.h" #include "segapcm.h" -typedef struct _segapcm_state segapcm_state; -struct _segapcm_state +struct segapcm_state { UINT8 *ram; UINT8 low[16]; diff --git a/src/emu/sound/segapcm.h b/src/emu/sound/segapcm.h index 2190d6a612f..0419f230879 100644 --- a/src/emu/sound/segapcm.h +++ b/src/emu/sound/segapcm.h @@ -16,8 +16,7 @@ #define BANK_MASKF (0xf0<<16) #define BANK_MASKF8 (0xf8<<16) -typedef struct _sega_pcm_interface sega_pcm_interface; -struct _sega_pcm_interface +struct sega_pcm_interface { int bank; }; diff --git a/src/emu/sound/sid6581.h b/src/emu/sound/sid6581.h index 1ea20c528d4..566bfab9519 100644 --- a/src/emu/sound/sid6581.h +++ b/src/emu/sound/sid6581.h @@ -23,8 +23,7 @@ typedef enum #define MOS6581_INTERFACE(name) \ const sid6581_interface (name) = -typedef struct _sid6581_interface sid6581_interface; -struct _sid6581_interface +struct sid6581_interface { devcb_read8 in_potx_cb; devcb_read8 in_poty_cb; diff --git a/src/emu/sound/sn76477.c b/src/emu/sound/sn76477.c index a04f3ef0e09..e65cb636634 100644 --- a/src/emu/sound/sn76477.c +++ b/src/emu/sound/sn76477.c @@ -193,8 +193,7 @@ static const double out_neg_gain[] = * *****************************************************************************/ -typedef struct _sn76477_state sn76477_state; -struct _sn76477_state +struct sn76477_state { /* chip's external interface */ UINT32 enable; diff --git a/src/emu/sound/sn76477.h b/src/emu/sound/sn76477.h index e6bd30bcd2d..f4afa46bd92 100644 --- a/src/emu/sound/sn76477.h +++ b/src/emu/sound/sn76477.h @@ -49,8 +49,7 @@ * *****************************************************************************/ -typedef struct _sn76477_interface sn76477_interface; -struct _sn76477_interface +struct sn76477_interface { double noise_clock_res; double noise_filter_res; diff --git a/src/emu/sound/sn76496.c b/src/emu/sound/sn76496.c index ae4ccb3a288..6cf452c789c 100644 --- a/src/emu/sound/sn76496.c +++ b/src/emu/sound/sn76496.c @@ -122,8 +122,7 @@ #define NOISEMODE (R->Register[6]&4)?1:0 -typedef struct _sn76496_state sn76496_state; -struct _sn76496_state +struct sn76496_state { sound_stream * Channel; INT32 VolTable[16]; /* volume table (for 4-bit to db conversion)*/ diff --git a/src/emu/sound/snkwave.c b/src/emu/sound/snkwave.c index cc612f0362b..767f4502ebe 100644 --- a/src/emu/sound/snkwave.c +++ b/src/emu/sound/snkwave.c @@ -15,8 +15,7 @@ #define CLOCK_SHIFT 8 -typedef struct _snkwave_state snkwave_state; -struct _snkwave_state +struct snkwave_state { /* global sound parameters */ sound_stream * stream; diff --git a/src/emu/sound/sp0250.c b/src/emu/sound/sp0250.c index f11827eb1e4..2da5c889f72 100644 --- a/src/emu/sound/sp0250.c +++ b/src/emu/sound/sp0250.c @@ -32,8 +32,7 @@ should be 312, but 312 = 39*8 so it doesn't look right because a divider by 39 i */ #define CLOCK_DIVIDER (7*6*8) -typedef struct _sp0250_state sp0250_state; -struct _sp0250_state +struct sp0250_state { INT16 amp; UINT8 pitch; diff --git a/src/emu/sound/sp0256.c b/src/emu/sound/sp0256.c index a8176f0df13..8996ab3581f 100644 --- a/src/emu/sound/sp0256.c +++ b/src/emu/sound/sp0256.c @@ -72,8 +72,7 @@ struct lpc12_t }; -typedef struct _sp0256_state sp0256_state; -struct _sp0256_state +struct sp0256_state { device_t *device; sound_stream *stream; /* MAME core sound stream */ diff --git a/src/emu/sound/sp0256.h b/src/emu/sound/sp0256.h index f82dfc035b8..6b73fb9860f 100644 --- a/src/emu/sound/sp0256.h +++ b/src/emu/sound/sp0256.h @@ -52,8 +52,7 @@ #include "devlegcy.h" -typedef struct _sp0256_interface sp0256_interface; -struct _sp0256_interface +struct sp0256_interface { devcb_write_line lrq_callback; devcb_write_line sby_callback; diff --git a/src/emu/sound/speaker.c b/src/emu/sound/speaker.c index 545030f0f06..62689bb25df 100644 --- a/src/emu/sound/speaker.c +++ b/src/emu/sound/speaker.c @@ -84,8 +84,7 @@ static double ampl[FILTER_LENGTH]; /* Internal oversampling factor (interm. samples vs stream samples) */ static const int RATE_MULTIPLIER = 4; -typedef struct _speaker_state speaker_state; -struct _speaker_state +struct speaker_state { sound_stream *channel; const INT16 *levels; diff --git a/src/emu/sound/speaker.h b/src/emu/sound/speaker.h index 2506cca15fe..d73c7211e72 100644 --- a/src/emu/sound/speaker.h +++ b/src/emu/sound/speaker.h @@ -15,8 +15,7 @@ #define SPEAKER_TAG "speaker" -typedef struct _speaker_interface speaker_interface; -struct _speaker_interface +struct speaker_interface { int num_level; /* optional: number of levels (if not two) */ const INT16 *levels; /* optional: pointer to level lookup table */ diff --git a/src/emu/sound/st0016.c b/src/emu/sound/st0016.c index 321585f1900..9f17d469f31 100644 --- a/src/emu/sound/st0016.c +++ b/src/emu/sound/st0016.c @@ -9,8 +9,7 @@ #define VERBOSE (0) #define LOG(x) do { if (VERBOSE) logerror x; } while (0) -typedef struct _st0016_state st0016_state; -struct _st0016_state +struct st0016_state { sound_stream * stream; UINT8 **sound_ram; diff --git a/src/emu/sound/st0016.h b/src/emu/sound/st0016.h index cff9f2312e1..44d60973033 100644 --- a/src/emu/sound/st0016.h +++ b/src/emu/sound/st0016.h @@ -5,8 +5,7 @@ #include "devlegcy.h" -typedef struct _st0016_interface st0016_interface; -struct _st0016_interface +struct st0016_interface { UINT8 **p_soundram; }; diff --git a/src/emu/sound/t6w28.c b/src/emu/sound/t6w28.c index 7c52eef2f2e..437fbf24fd0 100644 --- a/src/emu/sound/t6w28.c +++ b/src/emu/sound/t6w28.c @@ -37,8 +37,7 @@ Offset 0: #define STEP 0x10000 -typedef struct _t6w28_state t6w28_state; -struct _t6w28_state +struct t6w28_state { sound_stream * Channel; int SampleRate; diff --git a/src/emu/sound/tiaintf.c b/src/emu/sound/tiaintf.c index 977f6872cd5..0fcce138016 100644 --- a/src/emu/sound/tiaintf.c +++ b/src/emu/sound/tiaintf.c @@ -2,8 +2,7 @@ #include "tiaintf.h" #include "tiasound.h" -typedef struct _tia_state tia_state; -struct _tia_state +struct tia_state { sound_stream * channel; void *chip; diff --git a/src/emu/sound/tms3615.c b/src/emu/sound/tms3615.c index 3133c1c062e..62d0e3967e6 100644 --- a/src/emu/sound/tms3615.c +++ b/src/emu/sound/tms3615.c @@ -8,8 +8,7 @@ static const int divisor[TONES] = { 478, 451, 426, 402, 379, 358, 338, 319, 301, 284, 268, 253, 239 }; -typedef struct _tms_state tms_state; -struct _tms_state { +struct tms_state { sound_stream *channel; /* returned by stream_create() */ int samplerate; /* output sample rate */ int basefreq; /* chip's base frequency */ diff --git a/src/emu/sound/tms36xx.c b/src/emu/sound/tms36xx.c index 5fe06604124..75de84d0cef 100644 --- a/src/emu/sound/tms36xx.c +++ b/src/emu/sound/tms36xx.c @@ -11,8 +11,7 @@ /* the frequencies are later adjusted by "* clock / FSCALE" */ #define FSCALE 1024 -typedef struct _tms_state tms_state; -struct _tms_state { +struct tms_state { char *subtype; /* subtype name MM6221AA, TMS3615 or TMS3617 */ sound_stream * channel; /* returned by stream_create() */ diff --git a/src/emu/sound/tms36xx.h b/src/emu/sound/tms36xx.h index a3cf9469820..bc618217e77 100644 --- a/src/emu/sound/tms36xx.h +++ b/src/emu/sound/tms36xx.h @@ -11,8 +11,7 @@ #define TMS3617 17 /* Monster Bash (13 notes, six outputs) */ /* The interface structure */ -typedef struct _tms36xx_interface tms36xx_interface; -struct _tms36xx_interface +struct tms36xx_interface { int subtype; double decay[6]; /* decay times for the six harmonic notes */ diff --git a/src/emu/sound/tms5110.c b/src/emu/sound/tms5110.c index f293b1488dd..7f554169f61 100644 --- a/src/emu/sound/tms5110.c +++ b/src/emu/sound/tms5110.c @@ -84,8 +84,7 @@ #define CTL_STATE_OUTPUT (1) #define CTL_STATE_NEXT_OUTPUT (2) -typedef struct _tms5110_state tms5110_state; -struct _tms5110_state +struct tms5110_state { /* coefficient tables */ int variant; /* Variant of the 5110 - see tms5110.h */ @@ -163,8 +162,7 @@ struct _tms5110_state UINT8 romclk_hack_state; }; -typedef struct _tmsprom_state tmsprom_state; -struct _tmsprom_state +struct tmsprom_state { /* Rom interface */ UINT32 address; diff --git a/src/emu/sound/tms5110.h b/src/emu/sound/tms5110.h index b4e5bf236ae..89ecc861c41 100644 --- a/src/emu/sound/tms5110.h +++ b/src/emu/sound/tms5110.h @@ -21,8 +21,7 @@ /* usually 640000 for 8000 Hz sample rate or */ /* usually 800000 for 10000 Hz sample rate. */ -typedef struct _tms5110_interface tms5110_interface; -struct _tms5110_interface +struct tms5110_interface { /* legacy interface */ int (*M0_callback)(device_t *device); /* function to be called when chip requests another bit */ @@ -169,8 +168,7 @@ extern const device_type M58817; /* PROM controlled TMS5110 interface */ -typedef struct _tmsprom_interface tmsprom_interface; -struct _tmsprom_interface +struct tmsprom_interface { const char *prom_region; /* prom memory region - sound region is automatically assigned */ UINT32 rom_size; /* individual rom_size */ diff --git a/src/emu/sound/tms5220.c b/src/emu/sound/tms5220.c index 08a53296e7b..dabe1633b28 100644 --- a/src/emu/sound/tms5220.c +++ b/src/emu/sound/tms5220.c @@ -343,8 +343,7 @@ device), PES Speech adapter (serial port connection) static const UINT8 reload_table[4] = { 0, 2, 4, 6 }; //sample count reload for 5220c only; 5200 and 5220 always reload with 0; keep in mind this is loaded on IP=0 PC=12 subcycle=1 so it immediately will increment after one sample, effectively being 1,3,5,7 as in the comments above. -typedef struct _tms5220_state tms5220_state; -struct _tms5220_state +struct tms5220_state { /* coefficient tables */ int variant; /* Variant of the 5xxx - see tms5110r.h */ diff --git a/src/emu/sound/tms5220.h b/src/emu/sound/tms5220.h index dd571b7de7a..34a3105fcdb 100644 --- a/src/emu/sound/tms5220.h +++ b/src/emu/sound/tms5220.h @@ -11,8 +11,7 @@ /* usually 640000 for 8000 Hz sample rate or */ /* usually 800000 for 10000 Hz sample rate. */ -typedef struct _tms5220_interface tms5220_interface; -struct _tms5220_interface +struct tms5220_interface { devcb_write_line irq_func; /* IRQ callback function, active low, i.e. state=0 */ devcb_write_line readyq_func; /* Ready callback function, active low, i.e. state=0 */ diff --git a/src/emu/sound/upd7759.c b/src/emu/sound/upd7759.c index f2a1cfe37a3..c44e57f8a24 100644 --- a/src/emu/sound/upd7759.c +++ b/src/emu/sound/upd7759.c @@ -167,8 +167,7 @@ enum *************************************************************/ -typedef struct _upd7759_state upd7759_state; -struct _upd7759_state +struct upd7759_state { device_t *device; sound_stream *channel; /* stream channel for playback */ diff --git a/src/emu/sound/upd7759.h b/src/emu/sound/upd7759.h index f59848b79f4..3c42863fb3f 100644 --- a/src/emu/sound/upd7759.h +++ b/src/emu/sound/upd7759.h @@ -15,8 +15,7 @@ #define UPD7759_STANDARD_CLOCK XTAL_640kHz -typedef struct _upd7759_interface upd7759_interface; -struct _upd7759_interface +struct upd7759_interface { void (*drqcallback)(device_t *device, int param); /* drq callback (per chip, slave mode only) */ }; diff --git a/src/emu/sound/vlm5030.c b/src/emu/sound/vlm5030.c index 8e563103161..298a90f37c7 100644 --- a/src/emu/sound/vlm5030.c +++ b/src/emu/sound/vlm5030.c @@ -119,8 +119,7 @@ chirp 12-..: vokume 0 : silent #define IP_SIZE_FAST (120/FR_SIZE) #define IP_SIZE_FASTER ( 80/FR_SIZE) -typedef struct _vlm5030_state vlm5030_state; -struct _vlm5030_state +struct vlm5030_state { device_t *device; const vlm5030_interface *intf; diff --git a/src/emu/sound/vlm5030.h b/src/emu/sound/vlm5030.h index f29105957b2..87730ec95c8 100644 --- a/src/emu/sound/vlm5030.h +++ b/src/emu/sound/vlm5030.h @@ -5,8 +5,7 @@ #include "devlegcy.h" -typedef struct _vlm5030_interface vlm5030_interface; -struct _vlm5030_interface +struct vlm5030_interface { int memory_size; /* memory size of speech rom (0=memory region length) */ }; diff --git a/src/emu/sound/vrender0.c b/src/emu/sound/vrender0.c index 276e2dba8f1..a2cc8d215a3 100644 --- a/src/emu/sound/vrender0.c +++ b/src/emu/sound/vrender0.c @@ -12,8 +12,7 @@ reverb interrupts *************/ -typedef struct _vr0_state vr0_state; -struct _vr0_state +struct vr0_state { UINT32 *TexBase; UINT32 *FBBase; diff --git a/src/emu/sound/vrender0.h b/src/emu/sound/vrender0.h index af0fbe43022..d1fa8cb95aa 100644 --- a/src/emu/sound/vrender0.h +++ b/src/emu/sound/vrender0.h @@ -6,8 +6,7 @@ #include "devlegcy.h" -typedef struct _vr0_interface vr0_interface; -struct _vr0_interface +struct vr0_interface { UINT32 RegBase; }; diff --git a/src/emu/sound/x1_010.c b/src/emu/sound/x1_010.c index ba9d5038acb..83f6de4ef26 100644 --- a/src/emu/sound/x1_010.c +++ b/src/emu/sound/x1_010.c @@ -77,8 +77,7 @@ typedef struct { unsigned char reserve[2]; } X1_010_CHANNEL; -typedef struct _x1_010_state x1_010_state; -struct _x1_010_state +struct x1_010_state { /* Variables only used here */ int rate; // Output sampling rate (Hz) diff --git a/src/emu/sound/x1_010.h b/src/emu/sound/x1_010.h index 4c95ee6511f..e765aa984fa 100644 --- a/src/emu/sound/x1_010.h +++ b/src/emu/sound/x1_010.h @@ -6,8 +6,7 @@ #include "devlegcy.h" -typedef struct _x1_010_interface x1_010_interface; -struct _x1_010_interface +struct x1_010_interface { int adr; /* address */ }; diff --git a/src/emu/sound/ymf271.h b/src/emu/sound/ymf271.h index 2bff143c667..d1ff2dab2ec 100644 --- a/src/emu/sound/ymf271.h +++ b/src/emu/sound/ymf271.h @@ -6,8 +6,7 @@ #include "devlegcy.h" -typedef struct _ymf271_interface ymf271_interface; -struct _ymf271_interface +struct ymf271_interface { devcb_read8 ext_read; /* external memory read */ devcb_write8 ext_write; /* external memory write */ diff --git a/src/emu/sound/ymf278b.h b/src/emu/sound/ymf278b.h index 685ba066c8e..9b81b3c2b28 100644 --- a/src/emu/sound/ymf278b.h +++ b/src/emu/sound/ymf278b.h @@ -8,8 +8,7 @@ #define YMF278B_STD_CLOCK (33868800) /* standard clock for OPL4 */ -typedef struct _ymf278b_interface ymf278b_interface; -struct _ymf278b_interface +struct ymf278b_interface { void (*irq_callback)(device_t *device, int state); /* irq callback */ }; diff --git a/src/emu/sound/ymz280b.c b/src/emu/sound/ymz280b.c index 5de7b51a97c..5be471486f5 100644 --- a/src/emu/sound/ymz280b.c +++ b/src/emu/sound/ymz280b.c @@ -74,8 +74,7 @@ struct YMZ280BVoice UINT8 irq_schedule; /* 1 if the IRQ state is updated by timer */ }; -typedef struct _ymz280b_state ymz280b_state; -struct _ymz280b_state +struct ymz280b_state { sound_stream * stream; /* which stream are we using */ UINT8 *region_base; /* pointer to the base of the region */ diff --git a/src/emu/sound/ymz280b.h b/src/emu/sound/ymz280b.h index 2278d576efd..7d90c1faf6c 100644 --- a/src/emu/sound/ymz280b.h +++ b/src/emu/sound/ymz280b.h @@ -13,8 +13,7 @@ #include "devlegcy.h" -typedef struct _ymz280b_interface ymz280b_interface; -struct _ymz280b_interface +struct ymz280b_interface { void (*irq_callback)(device_t *device, int state); /* irq callback */ devcb_read8 ext_read; /* external RAM read */ diff --git a/src/emu/sound/zsg2.c b/src/emu/sound/zsg2.c index 7d93970064b..4a52c245b84 100644 --- a/src/emu/sound/zsg2.c +++ b/src/emu/sound/zsg2.c @@ -47,14 +47,12 @@ #include "zsg2.h" // 16 registers per channel, 48 channels -typedef struct _zchan zchan; -struct _zchan +struct zchan { UINT16 v[16]; }; -typedef struct _zsg2_state zsg2_state; -struct _zsg2_state +struct zsg2_state { zchan zc[48]; UINT16 act[3]; diff --git a/src/emu/sound/zsg2.h b/src/emu/sound/zsg2.h index e45cbcddffd..c742fc88be2 100644 --- a/src/emu/sound/zsg2.h +++ b/src/emu/sound/zsg2.h @@ -10,8 +10,7 @@ READ16_DEVICE_HANDLER( zsg2_r ); WRITE16_DEVICE_HANDLER( zsg2_w ); -typedef struct _zsg2_interface zsg2_interface; -struct _zsg2_interface +struct zsg2_interface { const char *samplergn; }; diff --git a/src/emu/ui.h b/src/emu/ui.h index ecbfc2b8e1a..17abc9fd0fd 100644 --- a/src/emu/ui.h +++ b/src/emu/ui.h @@ -93,8 +93,7 @@ enum typedef INT32 (*slider_update)(running_machine &machine, void *arg, astring *string, INT32 newval); -typedef struct _slider_state slider_state; -struct _slider_state +struct slider_state { slider_state * next; /* pointer to next slider */ slider_update update; /* callback */ diff --git a/src/emu/uigfx.c b/src/emu/uigfx.c index eb9ca5ff44a..c0239444992 100644 --- a/src/emu/uigfx.c +++ b/src/emu/uigfx.c @@ -23,8 +23,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _ui_gfx_state ui_gfx_state; -struct _ui_gfx_state +struct ui_gfx_state { UINT8 mode; /* which mode are we in? */ diff --git a/src/emu/uiinput.c b/src/emu/uiinput.c index 1be9eeb3c52..b29ae39714a 100644 --- a/src/emu/uiinput.c +++ b/src/emu/uiinput.c @@ -34,7 +34,7 @@ enum ***************************************************************************/ /* private input port state */ -struct _ui_input_private +struct ui_input_private { /* pressed states; retrieved with ui_input_pressed() */ osd_ticks_t next_repeat[IPT_COUNT]; diff --git a/src/emu/uiinput.h b/src/emu/uiinput.h index 5923fb501de..7d4573bd1e6 100644 --- a/src/emu/uiinput.h +++ b/src/emu/uiinput.h @@ -21,7 +21,7 @@ TYPE DEFINITIONS ***************************************************************************/ -enum _ui_event_type +enum ui_event_type { UI_EVENT_NONE, UI_EVENT_MOUSE_MOVE, @@ -31,11 +31,9 @@ enum _ui_event_type UI_EVENT_MOUSE_DOUBLE_CLICK, UI_EVENT_CHAR }; -typedef enum _ui_event_type ui_event_type; -typedef struct _ui_event ui_event; -struct _ui_event +struct ui_event { ui_event_type event_type; render_target * target; diff --git a/src/emu/video/315_5124.h b/src/emu/video/315_5124.h index 44cd7e8bd33..43c2bf1e9e9 100644 --- a/src/emu/video/315_5124.h +++ b/src/emu/video/315_5124.h @@ -52,8 +52,7 @@ PALETTE_INIT( sega315_5378 ); TYPE DEFINITIONS ***************************************************************************/ -typedef struct _sega315_5124_interface sega315_5124_interface; -struct _sega315_5124_interface +struct sega315_5124_interface { bool m_is_pal; /* false = NTSC, true = PAL */ const char *m_screen_tag; diff --git a/src/emu/video/hd63484.c b/src/emu/video/hd63484.c index d1125086633..c227908a13b 100644 --- a/src/emu/video/hd63484.c +++ b/src/emu/video/hd63484.c @@ -29,8 +29,7 @@ #define FIFO_LENGTH 256 -typedef struct _hd63484_state hd63484_state; -struct _hd63484_state +struct hd63484_state { UINT16 * ram; UINT16 reg[256/2]; diff --git a/src/emu/video/hd63484.h b/src/emu/video/hd63484.h index 1ef5fafbd6d..1270af71589 100644 --- a/src/emu/video/hd63484.h +++ b/src/emu/video/hd63484.h @@ -37,8 +37,7 @@ extern const device_type HD63484; #define HD63484_RAM_SIZE 0x100000 -typedef struct _hd63484_interface hd63484_interface; -struct _hd63484_interface +struct hd63484_interface { int skattva_hack; }; diff --git a/src/emu/video/huc6202.h b/src/emu/video/huc6202.h index 0ba5f7efcb0..38bff59e046 100644 --- a/src/emu/video/huc6202.h +++ b/src/emu/video/huc6202.h @@ -16,8 +16,7 @@ MCFG_DEVICE_CONFIG( _intrf ) -typedef struct _huc6202_interface huc6202_interface; -struct _huc6202_interface +struct huc6202_interface { /* First gfx input device */ devcb_read16 device_0_next_pixel; diff --git a/src/emu/video/huc6260.h b/src/emu/video/huc6260.h index 1f2ce0cdaaa..42ad66243b7 100644 --- a/src/emu/video/huc6260.h +++ b/src/emu/video/huc6260.h @@ -27,8 +27,7 @@ PALETTE_INIT( huc6260 ); MCFG_DEVICE_CONFIG( _intrf ) -typedef struct _huc6260_interface huc6260_interface; -struct _huc6260_interface +struct huc6260_interface { /* Tag for the screen we will be drawing on */ const char *screen_tag; diff --git a/src/emu/video/huc6261.h b/src/emu/video/huc6261.h index 27261f3ffa3..2f47ad1e461 100644 --- a/src/emu/video/huc6261.h +++ b/src/emu/video/huc6261.h @@ -23,8 +23,7 @@ MCFG_DEVICE_CONFIG( _intrf ) -typedef struct _huc6261_interface huc6261_interface; -struct _huc6261_interface +struct huc6261_interface { /* Tag for the screen we will be drawing on */ const char *screen_tag; diff --git a/src/emu/video/huc6270.h b/src/emu/video/huc6270.h index 0d5686a1049..7afce7a92e7 100644 --- a/src/emu/video/huc6270.h +++ b/src/emu/video/huc6270.h @@ -33,8 +33,7 @@ typedef enum _huc6270_h_state huc6270_h_state; MCFG_DEVICE_CONFIG( _intrf ) -typedef struct _huc6270_interface huc6270_interface; -struct _huc6270_interface +struct huc6270_interface { /* Size of Video ram (mandatory) */ UINT32 vram_size; diff --git a/src/emu/video/i8275.c b/src/emu/video/i8275.c index 35bb3e28dca..73a82976353 100644 --- a/src/emu/video/i8275.c +++ b/src/emu/video/i8275.c @@ -57,9 +57,7 @@ #define LOG(x) do { if (VERBOSE) logerror x; } while (0) -typedef struct _i8275_t i8275_t; - -struct _i8275_t +struct i8275_t { devcb_resolved_write_line out_drq_func; devcb_resolved_write_line out_irq_func; diff --git a/src/emu/video/i8275.h b/src/emu/video/i8275.h index 350b285f4de..cd918e0bb70 100644 --- a/src/emu/video/i8275.h +++ b/src/emu/video/i8275.h @@ -47,8 +47,7 @@ typedef void (*i8275_display_pixels_func)(device_t *device, int x, int y, UINT8 #define I8275_DISPLAY_PIXELS(name) void name(device_t *device, int x, int y, UINT8 linecount, UINT8 charcode, UINT8 lineattr, UINT8 lten, UINT8 rvv, UINT8 vsp, UINT8 gpa, UINT8 hlgt) /* interface */ -typedef struct _i8275_interface i8275_interface; -struct _i8275_interface +struct i8275_interface { const char *screen_tag; /* screen we are acting on */ int width; /* char width in pixels */ diff --git a/src/emu/video/mc6845.h b/src/emu/video/mc6845.h index 7047ddf5af6..3a3e3775f01 100644 --- a/src/emu/video/mc6845.h +++ b/src/emu/video/mc6845.h @@ -68,8 +68,7 @@ typedef void (*mc6845_on_update_addr_changed_func)(mc6845_device *device, int ad /* interface */ -typedef struct _mc6845_interface mc6845_interface; -struct _mc6845_interface +struct mc6845_interface { const char *m_screen_tag; /* screen we are acting on */ int m_hpixels_per_column; /* number of pixels per video memory address */ diff --git a/src/emu/video/poly.c b/src/emu/video/poly.c index 7e73a5a3863..6f75912229f 100644 --- a/src/emu/video/poly.c +++ b/src/emu/video/poly.c @@ -45,8 +45,7 @@ typedef struct _polygon_info polygon_info; /* tri_extent describes start/end points for a scanline */ -typedef struct _tri_extent tri_extent; -struct _tri_extent +struct tri_extent { INT16 startx; /* starting X coordinate (inclusive) */ INT16 stopx; /* ending X coordinate (exclusive) */ @@ -54,8 +53,7 @@ struct _tri_extent /* single set of polygon per-parameter data */ -typedef struct _poly_param poly_param; -struct _poly_param +struct poly_param { float start; /* parameter value at starting X,Y */ float dpdx; /* dp/dx relative to starting X */ @@ -64,8 +62,7 @@ struct _poly_param /* poly edge is used internally for quad rendering */ -typedef struct _poly_edge poly_edge; -struct _poly_edge +struct poly_edge { poly_edge * next; /* next edge in sequence */ int index; /* index of this edge */ @@ -77,8 +74,7 @@ struct _poly_edge /* poly section is used internally for quad rendering */ -typedef struct _poly_section poly_section; -struct _poly_section +struct poly_section { const poly_edge * ledge; /* pointer to left edge */ const poly_edge * redge; /* pointer to right edge */ @@ -87,8 +83,7 @@ struct _poly_section /* work_unit_shared is a common set of data shared between tris and quads */ -typedef struct _work_unit_shared work_unit_shared; -struct _work_unit_shared +struct work_unit_shared { polygon_info * polygon; /* pointer to polygon */ volatile UINT32 count_next; /* number of scanlines and index of next item to process */ @@ -101,8 +96,7 @@ struct _work_unit_shared /* tri_work_unit is a triangle-specific work-unit */ -typedef struct _tri_work_unit tri_work_unit; -struct _tri_work_unit +struct tri_work_unit { work_unit_shared shared; /* shared data */ tri_extent extent[SCANLINES_PER_BUCKET]; /* array of scanline extents */ @@ -110,8 +104,7 @@ struct _tri_work_unit /* quad_work_unit is a quad-specific work-unit */ -typedef struct _quad_work_unit quad_work_unit; -struct _quad_work_unit +struct quad_work_unit { work_unit_shared shared; /* shared data */ poly_extent extent[SCANLINES_PER_BUCKET]; /* array of scanline extents */ diff --git a/src/emu/video/poly.h b/src/emu/video/poly.h index d8120d6e8bb..560b9875966 100644 --- a/src/emu/video/poly.h +++ b/src/emu/video/poly.h @@ -59,8 +59,7 @@ typedef struct _poly_manager poly_manager; /* input vertex data */ -typedef struct _poly_vertex poly_vertex; -struct _poly_vertex +struct poly_vertex { float x; /* X coordinate */ float y; /* Y coordinate */ @@ -69,8 +68,7 @@ struct _poly_vertex /* poly_param_extent describes information for a single parameter in an extent */ -typedef struct _poly_param_extent poly_param_extent; -struct _poly_param_extent +struct poly_param_extent { float start; /* parameter value at starting X,Y */ float dpdx; /* dp/dx relative to starting X */ @@ -78,8 +76,7 @@ struct _poly_param_extent /* poly_extent describes start/end points for a scanline, along with per-scanline parameters */ -typedef struct _poly_extent poly_extent; -struct _poly_extent +struct poly_extent { INT16 startx; /* starting X coordinate (inclusive) */ INT16 stopx; /* ending X coordinate (exclusive) */ diff --git a/src/emu/video/psx.h b/src/emu/video/psx.h index f242457cba2..a88acb5dd3e 100644 --- a/src/emu/video/psx.h +++ b/src/emu/video/psx.h @@ -44,8 +44,7 @@ extern const device_type CXD8654Q; #define DEBUG_COORDS ( 10 ) #define DEBUG_MAX ( 512 ) -typedef struct _psx_gpu_debug psx_gpu_debug; -struct _psx_gpu_debug +struct psx_gpu_debug { bitmap_ind16 *mesh; int b_clear; diff --git a/src/emu/video/resnet.h b/src/emu/video/resnet.h index 1c7d53845c6..6e5ba24c9d1 100644 --- a/src/emu/video/resnet.h +++ b/src/emu/video/resnet.h @@ -94,8 +94,7 @@ /* Structures */ -typedef struct _res_net_channel_info res_net_channel_info; -struct _res_net_channel_info { +struct res_net_channel_info { // per channel options UINT32 options; // Pullup resistor value in Ohms @@ -121,8 +120,7 @@ struct _res_net_channel_info { double vBias; }; -typedef struct _res_net_info res_net_info; -struct _res_net_info { +struct res_net_info { // global options UINT32 options; // The three color channels @@ -144,8 +142,7 @@ struct _res_net_info { #define RES_NET_MAX_COMP 3 -typedef struct _res_net_decode_info res_net_decode_info; -struct _res_net_decode_info { +struct res_net_decode_info { int numcomp; int start; int end; diff --git a/src/emu/video/s2636.c b/src/emu/video/s2636.c index 66ce63d0f39..82a16e82d9b 100644 --- a/src/emu/video/s2636.c +++ b/src/emu/video/s2636.c @@ -96,8 +96,7 @@ static const int sprite_offsets[4] = { 0x00, 0x10, 0x20, 0x40 }; * *************************************/ -typedef struct _s2636_state s2636_state; -struct _s2636_state +struct s2636_state { UINT8 *work_ram; int work_ram_size; diff --git a/src/emu/video/s2636.h b/src/emu/video/s2636.h index 2caf7aed532..84246e3684d 100644 --- a/src/emu/video/s2636.h +++ b/src/emu/video/s2636.h @@ -19,8 +19,7 @@ * *************************************/ -typedef struct _s2636_interface s2636_interface; -struct _s2636_interface +struct s2636_interface { const char *screen; int work_ram_size; diff --git a/src/emu/video/tlc34076.c b/src/emu/video/tlc34076.c index 64ac208d4ac..6593cae8cf4 100644 --- a/src/emu/video/tlc34076.c +++ b/src/emu/video/tlc34076.c @@ -22,8 +22,7 @@ #define TEST_REGISTER 0x0e #define RESET_STATE 0x0f -typedef struct _tlc34076_state tlc34076_state; -struct _tlc34076_state +struct tlc34076_state { UINT8 local_paletteram[0x300]; UINT8 regs[0x10]; diff --git a/src/emu/video/tlc34076.h b/src/emu/video/tlc34076.h index 62d03d0d2cb..5914a1db28f 100644 --- a/src/emu/video/tlc34076.h +++ b/src/emu/video/tlc34076.h @@ -17,8 +17,7 @@ const pen_t *tlc34076_get_pens(device_t *device); TYPE DEFINITIONS ***************************************************************************/ -typedef struct _tlc34076_config tlc34076_config; -struct _tlc34076_config +struct tlc34076_config { int res_sel; }; diff --git a/src/emu/video/tms9927.c b/src/emu/video/tms9927.c index 4a9ae778126..784f800a937 100644 --- a/src/emu/video/tms9927.c +++ b/src/emu/video/tms9927.c @@ -30,8 +30,7 @@ static const UINT8 skew_bits_value[4] = { 0, 1, 2, 2 }; #define CURSOR_ROW_ADDRESS(t) ((t)->reg[8] & 0x3f) -typedef struct _tms9927_state tms9927_state; -struct _tms9927_state +struct tms9927_state { /* driver-controlled state */ const tms9927_interface *intf; diff --git a/src/emu/video/tms9927.h b/src/emu/video/tms9927.h index 63bf5d84dfd..c75f6e25518 100644 --- a/src/emu/video/tms9927.h +++ b/src/emu/video/tms9927.h @@ -73,8 +73,7 @@ extern const device_type CRT5057; /* interface */ -typedef struct _tms9927_interface tms9927_interface; -struct _tms9927_interface +struct tms9927_interface { const char *screen_tag; /* screen we are acting on */ int hpixels_per_column; /* number of pixels per video memory address */ diff --git a/src/emu/video/tms9928a.h b/src/emu/video/tms9928a.h index f47c10633e9..a4e01a12997 100644 --- a/src/emu/video/tms9928a.h +++ b/src/emu/video/tms9928a.h @@ -76,8 +76,7 @@ extern const device_type TMS9929A; extern const device_type TMS9129; -typedef struct _tms9928a_interface tms9928a_interface; -struct _tms9928a_interface +struct tms9928a_interface { const char *m_screen_tag; int m_vram_size; /* 4K, 8K, or 16K. This should be replaced by fetching data from an address space? */ diff --git a/src/emu/video/vector.c b/src/emu/video/vector.c index a7d53f88534..ad9cbf68491 100644 --- a/src/emu/video/vector.c +++ b/src/emu/video/vector.c @@ -66,8 +66,7 @@ #define VECTOR_INT_SCALE (255.0f * 1.5f) -typedef struct _vector_texture vector_texture; -struct _vector_texture +struct vector_texture { render_texture * texture; bitmap_argb32 * bitmap; diff --git a/src/emu/video/vooddefs.h b/src/emu/video/vooddefs.h index ba3554d7783..2bd7ae8a119 100644 --- a/src/emu/video/vooddefs.h +++ b/src/emu/video/vooddefs.h @@ -1394,11 +1394,10 @@ static const UINT8 dither_matrix_2x2[16] = *************************************/ typedef struct _voodoo_state voodoo_state; -typedef struct _poly_extra_data poly_extra_data; +typedef struct poly_extra_data poly_extra_data; -typedef struct _rgba rgba; -struct _rgba +struct rgba { #ifdef LSB_FIRST UINT8 b, g, r, a; @@ -1421,8 +1420,7 @@ union _voodoo_reg typedef voodoo_reg rgb_union; -typedef struct _voodoo_stats voodoo_stats; -struct _voodoo_stats +struct voodoo_stats { UINT8 lastkey; /* last key state */ UINT8 display; /* display stats? */ @@ -1448,8 +1446,7 @@ struct _voodoo_stats /* note that this structure is an even 64 bytes long */ -typedef struct _stats_block stats_block; -struct _stats_block +struct stats_block { INT32 pixels_in; /* pixels in statistic */ INT32 pixels_out; /* pixels out statistic */ @@ -1462,8 +1459,7 @@ struct _stats_block }; -typedef struct _fifo_state fifo_state; -struct _fifo_state +struct fifo_state { UINT32 * base; /* base of the FIFO */ INT32 size; /* size of the FIFO */ @@ -1472,8 +1468,7 @@ struct _fifo_state }; -typedef struct _cmdfifo_info cmdfifo_info; -struct _cmdfifo_info +struct cmdfifo_info { UINT8 enable; /* enabled? */ UINT8 count_holes; /* count holes? */ @@ -1487,8 +1482,7 @@ struct _cmdfifo_info }; -typedef struct _pci_state pci_state; -struct _pci_state +struct pci_state { fifo_state fifo; /* PCI FIFO */ UINT32 init_enable; /* initEnable value */ @@ -1501,8 +1495,7 @@ struct _pci_state }; -typedef struct _ncc_table ncc_table; -struct _ncc_table +struct ncc_table { UINT8 dirty; /* is the texel lookup dirty? */ voodoo_reg * reg; /* pointer to our registers */ @@ -1515,8 +1508,7 @@ struct _ncc_table }; -typedef struct _tmu_state tmu_state; -struct _tmu_state +struct tmu_state { UINT8 * ram; /* pointer to our RAM */ UINT32 mask; /* mask to apply to pointers */ @@ -1556,8 +1548,7 @@ struct _tmu_state }; -typedef struct _tmu_shared_state tmu_shared_state; -struct _tmu_shared_state +struct tmu_shared_state { rgb_t rgb332[256]; /* RGB 3-3-2 lookup table */ rgb_t alpha8[256]; /* alpha 8-bit lookup table */ @@ -1570,8 +1561,7 @@ struct _tmu_shared_state }; -typedef struct _setup_vertex setup_vertex; -struct _setup_vertex +struct setup_vertex { float x, y; /* X, Y coordinates */ float a, r, g, b; /* A, R, G, B values */ @@ -1581,8 +1571,7 @@ struct _setup_vertex }; -typedef struct _fbi_state fbi_state; -struct _fbi_state +struct fbi_state { UINT8 * ram; /* pointer to frame buffer RAM */ UINT32 mask; /* mask to apply to pointers */ @@ -1650,18 +1639,16 @@ struct _fbi_state }; -typedef struct _dac_state dac_state; -struct _dac_state +struct dac_state { UINT8 reg[8]; /* 8 registers */ UINT8 read_result; /* pending read result */ }; -typedef struct _raster_info raster_info; -struct _raster_info +struct raster_info { - struct _raster_info *next; /* pointer to next entry with the same hash */ + raster_info * next; /* pointer to next entry with the same hash */ poly_draw_scanline_func callback; /* callback pointer */ UINT8 is_generic; /* TRUE if this is one of the generic rasterizers */ UINT8 display; /* display index */ @@ -1676,7 +1663,7 @@ struct _raster_info }; -struct _poly_extra_data +struct poly_extra_data { voodoo_state * state; /* pointer back to the voodoo state */ raster_info * info; /* pointer to rasterizer information */ @@ -1712,8 +1699,7 @@ struct _poly_extra_data }; -typedef struct _banshee_info banshee_info; -struct _banshee_info +struct banshee_info { UINT32 io[0x40]; /* I/O registers */ UINT32 agp[0x80]; /* AGP registers */ diff --git a/src/emu/video/voodoo.h b/src/emu/video/voodoo.h index b6a5c18e855..e0c2a842371 100644 --- a/src/emu/video/voodoo.h +++ b/src/emu/video/voodoo.h @@ -71,8 +71,7 @@ typedef void (*voodoo_vblank_func)(device_t *device, int state); typedef void (*voodoo_stall_func)(device_t *device, int state); -typedef struct _voodoo_config voodoo_config; -struct _voodoo_config +struct voodoo_config { UINT8 fbmem; UINT8 tmumem0; diff --git a/src/lib/util/aviio.c b/src/lib/util/aviio.c index 3dedeb19a2c..13b34692936 100644 --- a/src/lib/util/aviio.c +++ b/src/lib/util/aviio.c @@ -107,8 +107,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _avi_chunk avi_chunk; -struct _avi_chunk +struct avi_chunk { UINT64 offset; /* file offset of chunk header */ UINT64 size; /* size of this chunk */ @@ -117,16 +116,14 @@ struct _avi_chunk }; -typedef struct _avi_chunk_list avi_chunk_list; -struct _avi_chunk_list +struct avi_chunk_list { UINT64 offset; /* offset in the file of header */ UINT32 length; /* length of the chunk including header */ }; -typedef struct _huffyuv_table huffyuv_table; -struct _huffyuv_table +struct huffyuv_table { UINT8 shift[256]; /* bit shift amounts */ UINT32 bits[256]; /* bit match values */ @@ -136,16 +133,14 @@ struct _huffyuv_table }; -typedef struct _huffyuv_data huffyuv_data; -struct _huffyuv_data +struct huffyuv_data { UINT8 predictor; /* predictor */ huffyuv_table table[3]; /* array of tables */ }; -typedef struct _avi_stream avi_stream; -struct _avi_stream +struct avi_stream { UINT32 type; /* subtype of stream */ UINT32 format; /* format of stream data */ diff --git a/src/lib/util/aviio.h b/src/lib/util/aviio.h index 94c91b4d2e8..cf524a44381 100644 --- a/src/lib/util/aviio.h +++ b/src/lib/util/aviio.h @@ -107,8 +107,7 @@ typedef enum _avi_datatype avi_datatype; typedef struct _avi_file avi_file; -typedef struct _avi_movie_info avi_movie_info; -struct _avi_movie_info +struct avi_movie_info { UINT32 video_format; /* format of video data */ UINT32 video_timescale; /* timescale for video data */ diff --git a/src/lib/util/cdrom.h b/src/lib/util/cdrom.h index 82818e37b67..8e3d776f99c 100644 --- a/src/lib/util/cdrom.h +++ b/src/lib/util/cdrom.h @@ -92,7 +92,6 @@ enum typedef struct _cdrom_file cdrom_file; - struct cdrom_track_info { /* fields used by CHDMAN and in MAME */ diff --git a/src/lib/util/corefile.c b/src/lib/util/corefile.c index 0a907aeabc4..ad32a0e4d1a 100644 --- a/src/lib/util/corefile.c +++ b/src/lib/util/corefile.c @@ -82,8 +82,7 @@ enum _text_file_type typedef enum _text_file_type text_file_type; -typedef struct _zlib_data zlib_data; -struct _zlib_data +struct zlib_data { z_stream stream; UINT8 buffer[1024]; diff --git a/src/lib/util/jedparse.c b/src/lib/util/jedparse.c index c03cea05664..fef7d2894ba 100644 --- a/src/lib/util/jedparse.c +++ b/src/lib/util/jedparse.c @@ -65,8 +65,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _parse_info parse_info; -struct _parse_info +struct parse_info { UINT16 checksum; /* checksum value */ UINT32 explicit_numfuses; /* explicitly specified number of fuses */ diff --git a/src/lib/util/jedparse.h b/src/lib/util/jedparse.h index c1462fd77aa..05c9b61d510 100644 --- a/src/lib/util/jedparse.h +++ b/src/lib/util/jedparse.h @@ -62,8 +62,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _jed_data jed_data; -struct _jed_data +struct jed_data { UINT32 numfuses; /* number of defined fuses */ UINT8 fusemap[JED_MAX_FUSES / 8];/* array of bit-packed data */ diff --git a/src/lib/util/opresolv.h b/src/lib/util/opresolv.h index 7048e8b1538..c5aad88ba2c 100644 --- a/src/lib/util/opresolv.h +++ b/src/lib/util/opresolv.h @@ -57,8 +57,7 @@ enum option_type OPTIONTYPE_ENUM_VALUE }; -typedef struct _option_guide option_guide; -struct _option_guide +struct option_guide { enum option_type option_type; int parameter; diff --git a/src/lib/util/palette.c b/src/lib/util/palette.c index 6ba369d8bc6..10b7dfc0fe8 100644 --- a/src/lib/util/palette.c +++ b/src/lib/util/palette.c @@ -48,8 +48,7 @@ ***************************************************************************/ /* object to track dirty states */ -typedef struct _dirty_state dirty_state; -struct _dirty_state +struct dirty_state { UINT32 * dirty; /* bitmap of dirty entries */ UINT32 mindirty; /* minimum dirty entry */ diff --git a/src/lib/util/png.c b/src/lib/util/png.c index 2268d6d88cb..5bb930713a1 100644 --- a/src/lib/util/png.c +++ b/src/lib/util/png.c @@ -50,8 +50,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _image_data_chunk image_data_chunk; -struct _image_data_chunk +struct image_data_chunk { image_data_chunk * next; int length; @@ -59,8 +58,7 @@ struct _image_data_chunk }; -typedef struct _png_private png_private; -struct _png_private +struct png_private { png_info * pnginfo; image_data_chunk * idata; diff --git a/src/lib/util/png.h b/src/lib/util/png.h index 6d79014ee2c..9e00f423b11 100644 --- a/src/lib/util/png.h +++ b/src/lib/util/png.h @@ -109,8 +109,7 @@ typedef enum _png_error png_error; TYPE DEFINITIONS ***************************************************************************/ -typedef struct _png_text png_text; -struct _png_text +struct png_text { png_text * next; const char * keyword; /* this is allocated */ @@ -118,8 +117,7 @@ struct _png_text }; -typedef struct _png_info png_info; -struct _png_info +struct png_info { UINT8 * image; UINT32 width, height; diff --git a/src/lib/util/pool.c b/src/lib/util/pool.c index 0067ceb43b7..97d6236f66d 100644 --- a/src/lib/util/pool.c +++ b/src/lib/util/pool.c @@ -58,8 +58,7 @@ ***************************************************************************/ /* an object type entry */ -typedef struct _objtype_entry objtype_entry; -struct _objtype_entry +struct objtype_entry { objtype_entry * next; UINT32 type; @@ -69,8 +68,7 @@ struct _objtype_entry /* an entry in a pool */ -typedef struct _object_entry object_entry; -struct _object_entry +struct object_entry { object_entry * next; object_entry * globalnext; @@ -84,8 +82,7 @@ struct _object_entry /* a block of entry items */ -typedef struct _object_entry_block object_entry_block; -struct _object_entry_block +struct object_entry_block { object_entry_block *next; object_entry entry[OBJECT_ENTRY_BLOCK]; diff --git a/src/lib/util/un7z.h b/src/lib/util/un7z.h index d40d4fac296..1051887f81c 100644 --- a/src/lib/util/un7z.h +++ b/src/lib/util/un7z.h @@ -120,8 +120,7 @@ typedef enum __7z_error _7z_error; ***************************************************************************/ /* describes an open _7Z file */ -typedef struct __7z_file _7z_file; -struct __7z_file +struct _7z_file { const char * filename; /* copy of _7Z filename (for caching) */ diff --git a/src/lib/util/unzip.h b/src/lib/util/unzip.h index 225776abde4..078d38c8736 100644 --- a/src/lib/util/unzip.h +++ b/src/lib/util/unzip.h @@ -73,8 +73,7 @@ typedef enum _zip_error zip_error; ***************************************************************************/ /* contains extracted file header information */ -typedef struct _zip_file_header zip_file_header; -struct _zip_file_header +struct zip_file_header { UINT32 signature; /* central file header signature */ UINT16 version_created; /* version made by */ @@ -102,8 +101,7 @@ struct _zip_file_header /* contains extracted end of central directory information */ -typedef struct _zip_ecd zip_ecd; -struct _zip_ecd +struct zip_ecd { UINT32 signature; /* end of central dir signature */ UINT16 disk_number; /* number of this disk */ @@ -121,8 +119,7 @@ struct _zip_ecd /* describes an open ZIP file */ -typedef struct _zip_file zip_file; -struct _zip_file +struct zip_file { const char * filename; /* copy of ZIP filename (for caching) */ osd_file * file; /* OSD file handle */ diff --git a/src/lib/util/vbiparse.h b/src/lib/util/vbiparse.h index c78ba4fe277..b2fb6739f04 100644 --- a/src/lib/util/vbiparse.h +++ b/src/lib/util/vbiparse.h @@ -87,8 +87,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _vbi_metadata vbi_metadata; -struct _vbi_metadata +struct vbi_metadata { UINT8 white; /* white flag: on or off */ UINT32 line16; /* line 16 code */ diff --git a/src/lib/util/xmlfile.c b/src/lib/util/xmlfile.c index 20b41770136..94abcd6a199 100644 --- a/src/lib/util/xmlfile.c +++ b/src/lib/util/xmlfile.c @@ -54,8 +54,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _xml_parse_info xml_parse_info; -struct _xml_parse_info +struct xml_parse_info { XML_Parser parser; xml_data_node * rootnode; diff --git a/src/lib/util/xmlfile.h b/src/lib/util/xmlfile.h index 8f0a9c4a5b3..b422cb0ff07 100644 --- a/src/lib/util/xmlfile.h +++ b/src/lib/util/xmlfile.h @@ -75,8 +75,7 @@ struct XML_ParserStruct; /* a node representing an attribute */ -typedef struct _xml_attribute_node xml_attribute_node; -struct _xml_attribute_node +struct xml_attribute_node { xml_attribute_node * next; /* pointer to next attribute node */ const char * name; /* pointer to copy of tag name */ @@ -85,8 +84,7 @@ struct _xml_attribute_node /* a node representing a data item and its relationships */ -typedef struct _xml_data_node xml_data_node; -struct _xml_data_node +struct xml_data_node { xml_data_node * next; /* pointer to next sibling node */ xml_data_node * parent; /* pointer to parent node */ @@ -99,8 +97,7 @@ struct _xml_data_node /* extended error information from parsing */ -typedef struct _xml_parse_error xml_parse_error; -struct _xml_parse_error +struct xml_parse_error { const char * error_message; int error_line; @@ -109,8 +106,7 @@ struct _xml_parse_error /* parsing options */ -typedef struct _xml_parse_options xml_parse_options; -struct _xml_parse_options +struct xml_parse_options { xml_parse_error * error; void (*init_parser)(struct XML_ParserStruct *parser); diff --git a/src/mame/audio/amiga.c b/src/mame/audio/amiga.c index e945df4392b..925f20782a0 100644 --- a/src/mame/audio/amiga.c +++ b/src/mame/audio/amiga.c @@ -40,8 +40,7 @@ * *************************************/ -typedef struct _audio_channel audio_channel; -struct _audio_channel +struct audio_channel { emu_timer * irq_timer; UINT32 curlocation; @@ -54,8 +53,7 @@ struct _audio_channel }; -typedef struct _amiga_audio amiga_audio; -struct _amiga_audio +struct amiga_audio { audio_channel channel[4]; sound_stream * stream; diff --git a/src/mame/audio/beezer.c b/src/mame/audio/beezer.c index 3edd99c361a..dabe2664f94 100644 --- a/src/mame/audio/beezer.c +++ b/src/mame/audio/beezer.c @@ -92,8 +92,7 @@ struct sh6840_timer_channel } counter; }; -typedef struct _beezer_sound_state beezer_sound_state; -struct _beezer_sound_state +struct beezer_sound_state { cpu_device *m_maincpu; diff --git a/src/mame/audio/cps3.c b/src/mame/audio/cps3.c index 95550689b9e..f5e1da64d91 100644 --- a/src/mame/audio/cps3.c +++ b/src/mame/audio/cps3.c @@ -8,16 +8,14 @@ #define CPS3_VOICES 16 -typedef struct _cps3_voice cps3_voice; -struct _cps3_voice +struct cps3_voice { UINT32 regs[8]; UINT32 pos; UINT16 frac; }; -typedef struct _cps3_sound_state cps3_sound_state; -struct _cps3_sound_state +struct cps3_sound_state { sound_stream *m_stream; cps3_voice m_voice[CPS3_VOICES]; diff --git a/src/mame/audio/dcs.c b/src/mame/audio/dcs.c index ff02ddab0c1..01e3e57d957 100644 --- a/src/mame/audio/dcs.c +++ b/src/mame/audio/dcs.c @@ -264,16 +264,14 @@ enum * *************************************/ -typedef struct _sdrc_state sdrc_state; -struct _sdrc_state +struct sdrc_state { UINT16 reg[4]; UINT8 seed; }; -typedef struct _dsio_denver_state dsio_state; -struct _dsio_denver_state +struct dsio_state { UINT16 reg[4]; UINT8 start_on_next_write; @@ -281,8 +279,7 @@ struct _dsio_denver_state }; -typedef struct _hle_transfer_state hle_transfer_state; -struct _hle_transfer_state +struct hle_transfer_state { UINT8 hle_enabled; INT32 dcs_state; @@ -298,8 +295,7 @@ struct _hle_transfer_state }; -typedef struct _dcs_state dcs_state; -struct _dcs_state +struct dcs_state { adsp21xx_device *cpu; address_space *program; diff --git a/src/mame/audio/exidy.c b/src/mame/audio/exidy.c index 2e180a591c4..fe23703e7c7 100644 --- a/src/mame/audio/exidy.c +++ b/src/mame/audio/exidy.c @@ -73,8 +73,7 @@ struct sh8253_timer_channel UINT32 fraction; }; -typedef struct _exidy_sound_state exidy_sound_state; -struct _exidy_sound_state +struct exidy_sound_state { cpu_device *m_maincpu; diff --git a/src/mame/audio/flower.c b/src/mame/audio/flower.c index 29fc109f7a8..ccf7821b572 100644 --- a/src/mame/audio/flower.c +++ b/src/mame/audio/flower.c @@ -35,8 +35,7 @@ typedef struct } sound_channel; -typedef struct _flower_sound_state flower_sound_state; -struct _flower_sound_state +struct flower_sound_state { emu_timer *m_effect_timer; diff --git a/src/mame/audio/geebee.c b/src/mame/audio/geebee.c index f14679508d2..535ec7a970f 100644 --- a/src/mame/audio/geebee.c +++ b/src/mame/audio/geebee.c @@ -11,8 +11,7 @@ #include "includes/warpwarp.h" -typedef struct _geebee_sound_state geebee_sound_state; -struct _geebee_sound_state +struct geebee_sound_state { emu_timer *m_volume_timer; UINT16 *m_decay; diff --git a/src/mame/audio/gomoku.c b/src/mame/audio/gomoku.c index 30c4eb98e14..9d440e7c1ff 100644 --- a/src/mame/audio/gomoku.c +++ b/src/mame/audio/gomoku.c @@ -29,8 +29,7 @@ typedef struct } sound_channel; -typedef struct _gomoku_sound_state gomoku_sound_state; -struct _gomoku_sound_state +struct gomoku_sound_state { /* data about the sound system */ sound_channel m_channel_list[MAX_VOICES]; diff --git a/src/mame/audio/hyprolyb.c b/src/mame/audio/hyprolyb.c index 04c497c1ad1..c489ea76d2c 100644 --- a/src/mame/audio/hyprolyb.c +++ b/src/mame/audio/hyprolyb.c @@ -3,8 +3,7 @@ #include "sound/msm5205.h" #include "audio/hyprolyb.h" -typedef struct _hyprolyb_adpcm_state hyprolyb_adpcm_state; -struct _hyprolyb_adpcm_state +struct hyprolyb_adpcm_state { device_t *m_msm; address_space *m_space; diff --git a/src/mame/audio/irem.c b/src/mame/audio/irem.c index 61773ddb55c..037b361c168 100644 --- a/src/mame/audio/irem.c +++ b/src/mame/audio/irem.c @@ -11,8 +11,7 @@ #include "sound/discrete.h" #include "audio/irem.h" -typedef struct _irem_audio_state irem_audio_state; -struct _irem_audio_state +struct irem_audio_state { UINT8 m_port1; UINT8 m_port2; diff --git a/src/mame/audio/leland.c b/src/mame/audio/leland.c index b518128eac2..5c3ddd2bdd9 100644 --- a/src/mame/audio/leland.c +++ b/src/mame/audio/leland.c @@ -184,8 +184,7 @@ struct counter_state UINT8 writebyte; }; -typedef struct _leland_sound_state leland_sound_state; -struct _leland_sound_state +struct leland_sound_state { /* 1st gen */ UINT8 *m_dac_buffer[2]; diff --git a/src/mame/audio/m72.c b/src/mame/audio/m72.c index cbc9db06632..530dac5ff4c 100644 --- a/src/mame/audio/m72.c +++ b/src/mame/audio/m72.c @@ -67,8 +67,7 @@ enum Z80_CLEAR }; -typedef struct _m72_audio_state m72_audio_state; -struct _m72_audio_state +struct m72_audio_state { UINT8 irqvector; UINT32 sample_addr; diff --git a/src/mame/audio/micro3d.c b/src/mame/audio/micro3d.c index ebd0c46da4b..0f467cbf1b8 100644 --- a/src/mame/audio/micro3d.c +++ b/src/mame/audio/micro3d.c @@ -34,8 +34,7 @@ typedef struct _filter_ biquad ProtoCoef[2]; } lp_filter; -typedef struct _filter_state filter_state; -struct _filter_state +struct filter_state { double capval; double exponent; diff --git a/src/mame/audio/namco52.c b/src/mame/audio/namco52.c index 527ced7ae7e..f3e76bd2132 100644 --- a/src/mame/audio/namco52.c +++ b/src/mame/audio/namco52.c @@ -49,8 +49,7 @@ #include "namco52.h" #include "cpu/mb88xx/mb88xx.h" -typedef struct _namco_52xx_state namco_52xx_state; -struct _namco_52xx_state +struct namco_52xx_state { device_t *m_cpu; device_t *m_discrete; diff --git a/src/mame/audio/namco52.h b/src/mame/audio/namco52.h index 9bec1e9f2c4..6c76a9a5d51 100644 --- a/src/mame/audio/namco52.h +++ b/src/mame/audio/namco52.h @@ -6,8 +6,7 @@ #include "devcb.h" -typedef struct _namco_52xx_interface namco_52xx_interface; -struct _namco_52xx_interface +struct namco_52xx_interface { const char * discrete; /* name of the discrete sound device */ int firstnode; /* index of the first node */ diff --git a/src/mame/audio/namco54.c b/src/mame/audio/namco54.c index 201d6569f0d..691571884e3 100644 --- a/src/mame/audio/namco54.c +++ b/src/mame/audio/namco54.c @@ -51,8 +51,7 @@ #include "namco54.h" #include "cpu/mb88xx/mb88xx.h" -typedef struct _namco_54xx_state namco_54xx_state; -struct _namco_54xx_state +struct namco_54xx_state { device_t *m_cpu; device_t *m_discrete; diff --git a/src/mame/audio/namco54.h b/src/mame/audio/namco54.h index 51e55ba0077..69436b15804 100644 --- a/src/mame/audio/namco54.h +++ b/src/mame/audio/namco54.h @@ -5,8 +5,7 @@ #include "sound/discrete.h" -typedef struct _namco_54xx_config namco_54xx_config; -struct _namco_54xx_config +struct namco_54xx_config { const char *discrete; /* name of the discrete sound device */ int firstnode; /* index of the first node */ diff --git a/src/mame/audio/phoenix.c b/src/mame/audio/phoenix.c index 2e65bd09fe3..efc0b9dbaaa 100644 --- a/src/mame/audio/phoenix.c +++ b/src/mame/audio/phoenix.c @@ -60,8 +60,7 @@ struct n_state INT32 lowpass_polybit; }; -typedef struct _phoenix_sound_state phoenix_sound_state; -struct _phoenix_sound_state +struct phoenix_sound_state { struct c_state m_c24_state; struct c_state m_c25_state; diff --git a/src/mame/audio/pleiads.c b/src/mame/audio/pleiads.c index 4f78237c56c..e78fa1bd372 100644 --- a/src/mame/audio/pleiads.c +++ b/src/mame/audio/pleiads.c @@ -38,8 +38,7 @@ struct n_state int freq; }; -typedef struct _pleiads_sound_state pleiads_sound_state; -struct _pleiads_sound_state +struct pleiads_sound_state { device_t *m_tms; sound_stream *m_channel; diff --git a/src/mame/audio/polepos.c b/src/mame/audio/polepos.c index e216bd6eae2..d1e62c60bcc 100644 --- a/src/mame/audio/polepos.c +++ b/src/mame/audio/polepos.c @@ -19,8 +19,7 @@ #define POLEPOS_R167_SHUNT 1.0/(1.0/POLEPOS_R166 + 1.0/250) #define POLEPOS_R168_SHUNT 1.0/(1.0/POLEPOS_R166 + 1.0/250) -typedef struct _polepos_sound_state polepos_sound_state; -struct _polepos_sound_state +struct polepos_sound_state { UINT32 m_current_position; int m_sample_msb; diff --git a/src/mame/audio/redbaron.c b/src/mame/audio/redbaron.c index baeeab4754d..0e15a3ddf48 100644 --- a/src/mame/audio/redbaron.c +++ b/src/mame/audio/redbaron.c @@ -20,8 +20,7 @@ #define OUTPUT_RATE (48000) -typedef struct _redbaron_sound_state redbaron_sound_state; -struct _redbaron_sound_state +struct redbaron_sound_state { INT16 *m_vol_lookup; diff --git a/src/mame/audio/segasnd.c b/src/mame/audio/segasnd.c index e0d741b2f15..6f60a38fc0e 100644 --- a/src/mame/audio/segasnd.c +++ b/src/mame/audio/segasnd.c @@ -38,16 +38,14 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _filter_state filter_state; -struct _filter_state +struct filter_state { double capval; /* current capacitor value */ double exponent; /* constant exponent */ }; -typedef struct _timer8253_channel timer8253_channel; -struct _timer8253_channel +struct timer8253_channel { UINT8 holding; /* holding until counts written? */ UINT8 latchmode; /* latching mode */ @@ -63,8 +61,7 @@ struct _timer8253_channel }; -typedef struct _timer8253 timer8253; -struct _timer8253 +struct timer8253 { timer8253_channel chan[3]; /* three channels' worth of information */ double env[3]; /* envelope value for each channel */ @@ -75,8 +72,7 @@ struct _timer8253 }; -typedef struct _usb_state usb_state; -struct _usb_state +struct usb_state { sound_stream * stream; /* output stream */ device_t *cpu; /* CPU index of the 8035 */ @@ -101,8 +97,7 @@ struct _usb_state }; /* SP0250-based speech board */ -typedef struct _speech_state speech_state; -struct _speech_state +struct speech_state { UINT8 latch, t0, p2, drq; UINT8 *speech; diff --git a/src/mame/audio/seibu.c b/src/mame/audio/seibu.c index 01410e04cda..dda832a1d43 100644 --- a/src/mame/audio/seibu.c +++ b/src/mame/audio/seibu.c @@ -140,8 +140,7 @@ const seibu_adpcm_interface seibu_adpcm2_intf = "adpcm2" }; -typedef struct _seibu_adpcm_state seibu_adpcm_state; -struct _seibu_adpcm_state +struct seibu_adpcm_state { oki_adpcm_state m_adpcm; sound_stream *m_stream; diff --git a/src/mame/audio/seibu.h b/src/mame/audio/seibu.h index 31027b925e1..13d3e6e3e03 100644 --- a/src/mame/audio/seibu.h +++ b/src/mame/audio/seibu.h @@ -91,8 +91,7 @@ extern const ym3812_interface seibu_ym3812_interface; extern const ym2151_interface seibu_ym2151_interface; extern const ym2203_interface seibu_ym2203_interface; -typedef struct _seibu_adpcm_interface seibu_adpcm_interface; -struct _seibu_adpcm_interface +struct seibu_adpcm_interface { const char *rom_region; }; diff --git a/src/mame/audio/snes_snd.c b/src/mame/audio/snes_snd.c index 1e66084dcc7..a8c51275619 100644 --- a/src/mame/audio/snes_snd.c +++ b/src/mame/audio/snes_snd.c @@ -195,8 +195,7 @@ typedef struct /* Source directory entry */ } src_dir_type; -typedef struct _snes_sound_state snes_sound_state; -struct _snes_sound_state +struct snes_sound_state { UINT8 *ram; sound_stream *channel; diff --git a/src/mame/audio/snk6502.c b/src/mame/audio/snk6502.c index ee3074ba5fa..b4829d443ed 100644 --- a/src/mame/audio/snk6502.c +++ b/src/mame/audio/snk6502.c @@ -41,8 +41,7 @@ typedef struct tone INT16 form[16]; } TONE; -typedef struct _snk6502_sound_state snk6502_sound_state; -struct _snk6502_sound_state +struct snk6502_sound_state { TONE m_tone_channels[CHANNELS]; INT32 m_tone_clock_expire; diff --git a/src/mame/audio/taitosnd.c b/src/mame/audio/taitosnd.c index b223880616f..6581a89f8d5 100644 --- a/src/mame/audio/taitosnd.c +++ b/src/mame/audio/taitosnd.c @@ -15,8 +15,7 @@ #define TC0140SYT_PORT01_FULL_MASTER (0x04) #define TC0140SYT_PORT23_FULL_MASTER (0x08) -typedef struct _tc0140syt_state tc0140syt_state; -struct _tc0140syt_state +struct tc0140syt_state { UINT8 slavedata[4]; /* Data on master->slave port (4 nibbles) */ UINT8 masterdata[4]; /* Data on slave->master port (4 nibbles) */ diff --git a/src/mame/audio/taitosnd.h b/src/mame/audio/taitosnd.h index 5adb58b9391..91c9d47bcb3 100644 --- a/src/mame/audio/taitosnd.h +++ b/src/mame/audio/taitosnd.h @@ -8,8 +8,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _tc0140syt_interface tc0140syt_interface; -struct _tc0140syt_interface +struct tc0140syt_interface { const char *master; const char *slave; diff --git a/src/mame/audio/tiamc1.c b/src/mame/audio/tiamc1.c index c79458020b2..f5f2ba7a1bf 100644 --- a/src/mame/audio/tiamc1.c +++ b/src/mame/audio/tiamc1.c @@ -53,8 +53,7 @@ struct timer8253struct { struct timer8253chan channel[3]; }; -typedef struct _tiamc1_sound_state tiamc1_sound_state; -struct _tiamc1_sound_state +struct tiamc1_sound_state { sound_stream *m_channel; int m_timer1_divider; diff --git a/src/mame/audio/timeplt.c b/src/mame/audio/timeplt.c index fb9781cf401..ea1ae862ca7 100644 --- a/src/mame/audio/timeplt.c +++ b/src/mame/audio/timeplt.c @@ -19,8 +19,7 @@ #define MASTER_CLOCK XTAL_14_31818MHz -typedef struct _timeplt_audio_state timeplt_audio_state; -struct _timeplt_audio_state +struct timeplt_audio_state { UINT8 m_last_irq_state; cpu_device *m_soundcpu; diff --git a/src/mame/audio/trackfld.c b/src/mame/audio/trackfld.c index cff24145e2f..f3a3683fa49 100644 --- a/src/mame/audio/trackfld.c +++ b/src/mame/audio/trackfld.c @@ -9,8 +9,7 @@ #define TIMER_RATE (4096/4) -typedef struct _trackfld_audio_state trackfld_audio_state; -struct _trackfld_audio_state +struct trackfld_audio_state { /* sound-related */ int m_last_addr; diff --git a/src/mame/audio/tx1.c b/src/mame/audio/tx1.c index b65e41cabcf..0f1e23a0b5e 100644 --- a/src/mame/audio/tx1.c +++ b/src/mame/audio/tx1.c @@ -31,8 +31,7 @@ struct _pit8253_state int idx[3]; }; -typedef struct _tx1_sound_state tx1_sound_state; -struct _tx1_sound_state +struct tx1_sound_state { sound_stream *m_stream; UINT32 m_freq_to_step; diff --git a/src/mame/audio/warpwarp.c b/src/mame/audio/warpwarp.c index bc20abf894c..925c688cbb0 100644 --- a/src/mame/audio/warpwarp.c +++ b/src/mame/audio/warpwarp.c @@ -13,8 +13,7 @@ #define CLOCK_16H (18432000/3/2/16) #define CLOCK_1V (18432000/3/2/384) -typedef struct _warpwarp_sound_state warpwarp_sound_state; -struct _warpwarp_sound_state +struct warpwarp_sound_state { INT16 *m_decay; sound_stream *m_channel; diff --git a/src/mame/audio/wiping.c b/src/mame/audio/wiping.c index 45c45a4b0ef..dee082cd651 100644 --- a/src/mame/audio/wiping.c +++ b/src/mame/audio/wiping.c @@ -32,8 +32,7 @@ typedef struct -typedef struct _wiping_sound_state wiping_sound_state; -struct _wiping_sound_state +struct wiping_sound_state { /* data about the sound system */ sound_channel m_channel_list[MAX_VOICES]; diff --git a/src/mame/drivers/atarisy4.c b/src/mame/drivers/atarisy4.c index 42e38aaf249..e55b4a9c629 100644 --- a/src/mame/drivers/atarisy4.c +++ b/src/mame/drivers/atarisy4.c @@ -121,8 +121,7 @@ struct _gpu_ -typedef struct _poly_extra_data poly_extra_data; -struct _poly_extra_data +struct poly_extra_data { UINT16 color; UINT16 *screen_ram; diff --git a/src/mame/drivers/mediagx.c b/src/mame/drivers/mediagx.c index 009c6f6b8ab..eaa95d40f6b 100644 --- a/src/mame/drivers/mediagx.c +++ b/src/mame/drivers/mediagx.c @@ -80,8 +80,7 @@ #define SPEEDUP_HACKS 1 -typedef struct _speedup_entry speedup_entry; -struct _speedup_entry +struct speedup_entry { UINT32 offset; UINT32 pc; diff --git a/src/mame/drivers/mjkjidai.c b/src/mame/drivers/mjkjidai.c index 75b3105d7ac..4a43c4a50a2 100644 --- a/src/mame/drivers/mjkjidai.c +++ b/src/mame/drivers/mjkjidai.c @@ -51,8 +51,7 @@ private: extern const device_type MJKJIDAI; /* Start of ADPCM custom chip code */ -typedef struct _mjkjidai_adpcm_state mjkjidai_adpcm_state; -struct _mjkjidai_adpcm_state +struct mjkjidai_adpcm_state { oki_adpcm_state m_adpcm; sound_stream *m_stream; diff --git a/src/mame/drivers/renegade.c b/src/mame/drivers/renegade.c index 075e2fdc0f6..398cdd0558d 100644 --- a/src/mame/drivers/renegade.c +++ b/src/mame/drivers/renegade.c @@ -111,8 +111,7 @@ $8000 - $ffff ROM /********************************************************************************************/ -typedef struct _renegade_adpcm_state renegade_adpcm_state; -struct _renegade_adpcm_state +struct renegade_adpcm_state { oki_adpcm_state m_adpcm; sound_stream *m_stream; diff --git a/src/mame/drivers/seattle.c b/src/mame/drivers/seattle.c index 82202aaf4a7..5492bd59a13 100644 --- a/src/mame/drivers/seattle.c +++ b/src/mame/drivers/seattle.c @@ -380,8 +380,7 @@ * *************************************/ -typedef struct _galileo_timer galileo_timer; -struct _galileo_timer +struct galileo_timer { emu_timer * timer; UINT32 count; @@ -389,8 +388,7 @@ struct _galileo_timer }; -typedef struct _galileo_data galileo_data; -struct _galileo_data +struct galileo_data { /* raw register data */ UINT32 reg[0x1000/4]; @@ -409,8 +407,7 @@ struct _galileo_data }; -typedef struct _widget_data widget_data; -struct _widget_data +struct widget_data { /* ethernet register address */ UINT8 ethernet_addr; diff --git a/src/mame/includes/amiga.h b/src/mame/includes/amiga.h index c0a0c1828cd..21ac2d73a40 100644 --- a/src/mame/includes/amiga.h +++ b/src/mame/includes/amiga.h @@ -320,8 +320,7 @@ Ernesto Corvi & Mariusz Wojcieszek #define FLAGS_AGA_CHIPSET (1 << 0) -typedef struct _amiga_machine_interface amiga_machine_interface; -struct _amiga_machine_interface +struct amiga_machine_interface { UINT32 chip_ram_mask; @@ -342,8 +341,7 @@ struct _amiga_machine_interface #define IS_ECS(intf) ( intf->chip_ram_mask == ECS_CHIP_RAM_MASK && (( intf->flags & FLAGS_AGA_CHIPSET) == 0)) #define IS_ECS_OR_AGA(intf) ( intf->chip_ram_mask == ECS_CHIP_RAM_MASK) -typedef struct _amiga_autoconfig_device amiga_autoconfig_device; -struct _amiga_autoconfig_device +struct amiga_autoconfig_device { UINT8 link_memory; /* link into free memory list */ UINT8 rom_vector_valid; /* ROM vector offset valid */ @@ -361,8 +359,7 @@ struct _amiga_autoconfig_device void (*uninstall)(running_machine &machine, offs_t base); /* memory uninstallation */ }; -typedef struct _autoconfig_device autoconfig_device; -struct _autoconfig_device +struct autoconfig_device { autoconfig_device * next; amiga_autoconfig_device device; diff --git a/src/mame/includes/lordgun.h b/src/mame/includes/lordgun.h index 2d8884d4907..4e0e913f911 100644 --- a/src/mame/includes/lordgun.h +++ b/src/mame/includes/lordgun.h @@ -4,8 +4,7 @@ *************************************************************************/ -typedef struct _lordgun_gun_data lordgun_gun_data; -struct _lordgun_gun_data +struct lordgun_gun_data { int scr_x, scr_y; UINT16 hw_x, hw_y; diff --git a/src/mame/includes/m107.h b/src/mame/includes/m107.h index b7d439faa25..45cc7046940 100644 --- a/src/mame/includes/m107.h +++ b/src/mame/includes/m107.h @@ -5,8 +5,7 @@ *************************************************************************/ -typedef struct _pf_layer_info pf_layer_info; -struct _pf_layer_info +struct pf_layer_info { tilemap_t * tmap; UINT16 vram_base; diff --git a/src/mame/includes/megadriv.h b/src/mame/includes/megadriv.h index 0a24994ad7f..6633184952e 100644 --- a/src/mame/includes/megadriv.h +++ b/src/mame/includes/megadriv.h @@ -349,8 +349,7 @@ public: DECLARE_MACHINE_RESET(mtnew); }; -typedef struct _megadriv_cart megadriv_cart; -struct _megadriv_cart +struct megadriv_cart { int type; diff --git a/src/mame/includes/seta.h b/src/mame/includes/seta.h index 8521de13e17..4dc65804152 100644 --- a/src/mame/includes/seta.h +++ b/src/mame/includes/seta.h @@ -15,8 +15,7 @@ struct _uPD71054_state UINT8 reg[4]; // }; -typedef struct _game_offset game_offset; -struct _game_offset +struct game_offset { /* 2 values, for normal and flipped */ const char *gamename; diff --git a/src/mame/machine/atarigen.h b/src/mame/machine/atarigen.h index da119208c36..dd10111af1d 100644 --- a/src/mame/machine/atarigen.h +++ b/src/mame/machine/atarigen.h @@ -63,8 +63,7 @@ typedef void (*atarigen_int_func)(running_machine &machine); typedef void (*atarigen_scanline_func)(screen_device &screen, int scanline); -typedef struct _atarivc_state_desc atarivc_state_desc; -struct _atarivc_state_desc +struct atarivc_state_desc { UINT32 latch1; /* latch #1 value (-1 means disabled) */ UINT32 latch2; /* latch #2 value (-1 means disabled) */ @@ -81,8 +80,7 @@ struct _atarivc_state_desc }; -typedef struct _atarigen_screen_timer atarigen_screen_timer; -struct _atarigen_screen_timer +struct atarigen_screen_timer { screen_device *screen; emu_timer * scanline_interrupt_timer; diff --git a/src/mame/machine/buggychl.c b/src/mame/machine/buggychl.c index 34f4d409e37..fcab30b3058 100644 --- a/src/mame/machine/buggychl.c +++ b/src/mame/machine/buggychl.c @@ -2,8 +2,7 @@ #include "cpu/z80/z80.h" #include "machine/buggychl.h" -typedef struct _buggychl_mcu_state buggychl_mcu_state; -struct _buggychl_mcu_state +struct buggychl_mcu_state { UINT8 m_port_a_in; UINT8 m_port_a_out; diff --git a/src/mame/machine/decocass.c b/src/mame/machine/decocass.c index 0842d97a171..3f438324671 100644 --- a/src/mame/machine/decocass.c +++ b/src/mame/machine/decocass.c @@ -1869,8 +1869,7 @@ typedef enum _tape_byte tape_byte; /* state of the tape */ -typedef struct _tape_state tape_state; -struct _tape_state +struct tape_state { running_machine * machine; /* pointer back to the machine */ emu_timer * timer; /* timer for running the tape */ diff --git a/src/mame/machine/fddebug.c b/src/mame/machine/fddebug.c index 9276a67d004..8cbbcb16674 100644 --- a/src/mame/machine/fddebug.c +++ b/src/mame/machine/fddebug.c @@ -220,8 +220,7 @@ void fd1094_init_debugging(running_machine &machine, const char *cpureg, const c ***************************************************************************/ /* a single possible instruction decoding */ -typedef struct _fd1094_possibility fd1094_possibility; -struct _fd1094_possibility +struct fd1094_possibility { offs_t basepc; /* starting PC of the possibility */ int length; /* number of words */ @@ -232,8 +231,7 @@ struct _fd1094_possibility }; /* an entry in the opcode table */ -typedef struct _optable_entry optable_entry; -struct _optable_entry +struct optable_entry { UINT32 flags; /* per-opcode flags */ const char * string; /* identifying string */ diff --git a/src/mame/machine/gaelco3d.c b/src/mame/machine/gaelco3d.c index 19d92bcac9a..d6abc3fa80c 100644 --- a/src/mame/machine/gaelco3d.c +++ b/src/mame/machine/gaelco3d.c @@ -77,8 +77,7 @@ #define LINK_SLACK_B ((LINK_SLACK / 3) + 1) -typedef struct _buf_t buf_t; -struct _buf_t +struct buf_t { volatile UINT8 data; volatile UINT8 stat; @@ -86,8 +85,7 @@ struct _buf_t volatile int data_cnt; }; -typedef struct _shmem_t shmem_t; -struct _shmem_t +struct shmem_t { volatile INT32 lock; buf_t buf[2]; @@ -95,8 +93,7 @@ struct _shmem_t typedef struct _osd_shared_mem osd_shared_mem; -typedef struct _gaelco_serial_state gaelco_serial_state; -struct _gaelco_serial_state +struct gaelco_serial_state { device_t *m_device; devcb_resolved_write_line m_irq_func; diff --git a/src/mame/machine/gaelco3d.h b/src/mame/machine/gaelco3d.h index deb34dde466..7df6278940d 100644 --- a/src/mame/machine/gaelco3d.h +++ b/src/mame/machine/gaelco3d.h @@ -34,8 +34,7 @@ DEVICE INTERFACE TYPE ***************************************************************************/ -typedef struct _gaelco_serial_interface gaelco_serial_interface; -struct _gaelco_serial_interface +struct gaelco_serial_interface { devcb_write_line irq_func; }; diff --git a/src/mame/machine/mathbox.c b/src/mame/machine/mathbox.c index ac4d9c695f9..8123d631372 100644 --- a/src/mame/machine/mathbox.c +++ b/src/mame/machine/mathbox.c @@ -29,8 +29,7 @@ #define MB_TEST 0 #define LOG(x) do { if (MB_TEST) logerror x; } while (0) -typedef struct _mathbox_state mathbox_state; -struct _mathbox_state +struct mathbox_state { device_t *device; /* math box scratch registers */ diff --git a/src/mame/machine/md_cart.c b/src/mame/machine/md_cart.c index f8bf0357582..f4e654f212b 100644 --- a/src/mame/machine/md_cart.c +++ b/src/mame/machine/md_cart.c @@ -106,8 +106,7 @@ enum PSOLAR /* Pier Solar */ }; -typedef struct _md_pcb md_pcb; -struct _md_pcb +struct md_pcb { const char *pcb_name; int pcb_id; diff --git a/src/mame/machine/namco06.c b/src/mame/machine/namco06.c index ecb836f9cff..79203db1e36 100644 --- a/src/mame/machine/namco06.c +++ b/src/mame/machine/namco06.c @@ -93,8 +93,7 @@ -typedef struct _namco_06xx_state namco_06xx_state; -struct _namco_06xx_state +struct namco_06xx_state { UINT8 m_control; emu_timer *m_nmi_timer; diff --git a/src/mame/machine/namco06.h b/src/mame/machine/namco06.h index fe040a7ef3c..031c7d08b9f 100644 --- a/src/mame/machine/namco06.h +++ b/src/mame/machine/namco06.h @@ -4,8 +4,7 @@ #include "devlegcy.h" -typedef struct _namco_06xx_config namco_06xx_config; -struct _namco_06xx_config +struct namco_06xx_config { const char *nmicpu; const char *chip0; diff --git a/src/mame/machine/namco50.c b/src/mame/machine/namco50.c index f0c058bf8d1..9ed4eec7e16 100644 --- a/src/mame/machine/namco50.c +++ b/src/mame/machine/namco50.c @@ -135,8 +135,7 @@ Flags: 80=high score, 40=first bonus, 20=interval bonus, 10=? #include "cpu/mb88xx/mb88xx.h" -typedef struct _namco_50xx_state namco_50xx_state; -struct _namco_50xx_state +struct namco_50xx_state { device_t * m_cpu; UINT8 m_latched_cmd; diff --git a/src/mame/machine/namco51.c b/src/mame/machine/namco51.c index 775dd178919..026a6ce8cf6 100644 --- a/src/mame/machine/namco51.c +++ b/src/mame/machine/namco51.c @@ -67,8 +67,7 @@ #define WRITE_PORT(st,num,data) (st)->m_out[num](0, data) -typedef struct _namco_51xx_state namco_51xx_state; -struct _namco_51xx_state +struct namco_51xx_state { device_t * m_cpu; devcb_resolved_read8 m_in[4]; diff --git a/src/mame/machine/namco51.h b/src/mame/machine/namco51.h index 29608519d26..7ac6309c3a7 100644 --- a/src/mame/machine/namco51.h +++ b/src/mame/machine/namco51.h @@ -4,8 +4,7 @@ #include "devlegcy.h" -typedef struct _namco_51xx_interface namco_51xx_interface; -struct _namco_51xx_interface +struct namco_51xx_interface { devcb_read8 in[4]; /* read handlers for ports A-D */ devcb_write8 out[2]; /* write handlers for ports A-B */ diff --git a/src/mame/machine/namco53.c b/src/mame/machine/namco53.c index f5828e53a8d..4939ef58b6b 100644 --- a/src/mame/machine/namco53.c +++ b/src/mame/machine/namco53.c @@ -61,8 +61,7 @@ #define LOG(x) do { if (VERBOSE) logerror x; } while (0) -typedef struct _namco_53xx_state namco_53xx_state; -struct _namco_53xx_state +struct namco_53xx_state { device_t * m_cpu; UINT8 m_portO; diff --git a/src/mame/machine/namco53.h b/src/mame/machine/namco53.h index abf1805dd48..84213e48681 100644 --- a/src/mame/machine/namco53.h +++ b/src/mame/machine/namco53.h @@ -4,8 +4,7 @@ #include "devlegcy.h" -typedef struct _namco_53xx_interface namco_53xx_interface; -struct _namco_53xx_interface +struct namco_53xx_interface { devcb_read8 k; /* read handlers for K port */ devcb_read8 in[4]; /* read handlers for ports A-D */ diff --git a/src/mame/machine/namco62.c b/src/mame/machine/namco62.c index 30f56f12d14..ead4f335f34 100644 --- a/src/mame/machine/namco62.c +++ b/src/mame/machine/namco62.c @@ -16,8 +16,7 @@ #define VERBOSE 0 #define LOG(x) do { if (VERBOSE) logerror x; } while (0) -typedef struct _namco_62xx_state namco_62xx_state; -struct _namco_62xx_state +struct namco_62xx_state { device_t* m_cpu; devcb_resolved_read8 m_in[4]; diff --git a/src/mame/machine/namco62.h b/src/mame/machine/namco62.h index 082a49e345d..c456b4b8698 100644 --- a/src/mame/machine/namco62.h +++ b/src/mame/machine/namco62.h @@ -4,8 +4,7 @@ #include "devlegcy.h" -typedef struct _namco_62xx_interface namco_62xx_interface; -struct _namco_62xx_interface +struct namco_62xx_interface { devcb_read8 in[4]; /* read handlers for ports A-D */ devcb_write8 out[2]; /* write handlers for ports A-B */ diff --git a/src/mame/machine/namcoio.c b/src/mame/machine/namcoio.c index 4fea996ec79..dd57c60e4d2 100644 --- a/src/mame/machine/namcoio.c +++ b/src/mame/machine/namcoio.c @@ -116,8 +116,7 @@ TODO: #define LOG(x) do { if (VERBOSE) logerror x; } while (0) -typedef struct _namcoio_state namcoio_state; -struct _namcoio_state +struct namcoio_state { UINT8 ram[16]; diff --git a/src/mame/machine/namcoio.h b/src/mame/machine/namcoio.h index 14f547a99d5..e29b5f21324 100644 --- a/src/mame/machine/namcoio.h +++ b/src/mame/machine/namcoio.h @@ -7,8 +7,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _namcoio_interface namcoio_interface; -struct _namcoio_interface +struct namcoio_interface { devcb_read8 in[4]; devcb_write8 out[2]; diff --git a/src/mame/machine/nmk112.c b/src/mame/machine/nmk112.c index 06c8b24e8a9..7724d6eeaf0 100644 --- a/src/mame/machine/nmk112.c +++ b/src/mame/machine/nmk112.c @@ -13,8 +13,7 @@ #define TABLESIZE 0x100 #define BANKSIZE 0x10000 -typedef struct _nmk112_state nmk112_state; -struct _nmk112_state +struct nmk112_state { /* which chips have their sample address table divided into pages */ UINT8 page_mask; diff --git a/src/mame/machine/nmk112.h b/src/mame/machine/nmk112.h index 20897bc2f33..2b682ad7a6f 100644 --- a/src/mame/machine/nmk112.h +++ b/src/mame/machine/nmk112.h @@ -13,8 +13,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _nmk112_interface nmk112_interface; -struct _nmk112_interface +struct nmk112_interface { const char *rgn0, *rgn1; UINT8 disable_page_mask; diff --git a/src/mame/machine/steppers.h b/src/mame/machine/steppers.h index 76600ded8ee..ac0250556c3 100644 --- a/src/mame/machine/steppers.h +++ b/src/mame/machine/steppers.h @@ -34,8 +34,7 @@ /*------------- Stepper motor interface structure -----------------*/ -typedef struct _stepper_interface stepper_interface; -struct _stepper_interface +struct stepper_interface { UINT8 type; /* Reel unit type */ INT16 index_start;/* start position of index (in half steps) */ diff --git a/src/mame/machine/taitoio.c b/src/mame/machine/taitoio.c index 5177f80c597..eaf237bedaa 100644 --- a/src/mame/machine/taitoio.c +++ b/src/mame/machine/taitoio.c @@ -52,8 +52,7 @@ Newer version of the I/O chip ? /* */ /***************************************************************************/ -typedef struct _tc0220ioc_state tc0220ioc_state; -struct _tc0220ioc_state +struct tc0220ioc_state { UINT8 regs[8]; UINT8 port; @@ -210,8 +209,7 @@ static DEVICE_RESET( tc0220ioc ) /* */ /***************************************************************************/ -typedef struct _tc0510nio_state tc0510nio_state; -struct _tc0510nio_state +struct tc0510nio_state { UINT8 regs[8]; @@ -361,8 +359,7 @@ static DEVICE_RESET( tc0510nio ) /* */ /***************************************************************************/ -typedef struct _tc0640fio_state tc0640fio_state; -struct _tc0640fio_state +struct tc0640fio_state { UINT8 regs[8]; diff --git a/src/mame/machine/taitoio.h b/src/mame/machine/taitoio.h index 7903e865748..7c5bade1b25 100644 --- a/src/mame/machine/taitoio.h +++ b/src/mame/machine/taitoio.h @@ -15,8 +15,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _tc0220ioc_interface tc0220ioc_interface; -struct _tc0220ioc_interface +struct tc0220ioc_interface { devcb_read8 read_0; devcb_read8 read_1; @@ -26,8 +25,7 @@ struct _tc0220ioc_interface }; -typedef struct _tc0510nio_interface tc0510nio_interface; -struct _tc0510nio_interface +struct tc0510nio_interface { devcb_read8 read_0; devcb_read8 read_1; @@ -37,8 +35,7 @@ struct _tc0510nio_interface }; -typedef struct _tc0640fio_interface tc0640fio_interface; -struct _tc0640fio_interface +struct tc0640fio_interface { devcb_read8 read_0; devcb_read8 read_1; diff --git a/src/mame/video/atarimo.h b/src/mame/video/atarimo.h index 451b2e7c562..c3b1cb4ff51 100644 --- a/src/mame/video/atarimo.h +++ b/src/mame/video/atarimo.h @@ -35,15 +35,13 @@ typedef int (*atarimo_special_func)(bitmap_ind16 &bitmap, const rectangle &clip, int code, int color, int xpos, int ypos, rectangle *mobounds); /* description for a four-word mask */ -typedef struct _atarimo_entry atarimo_entry; -struct _atarimo_entry +struct atarimo_entry { UINT16 data[4]; }; /* description of the motion objects */ -typedef struct _atarimo_desc atarimo_desc; -struct _atarimo_desc +struct atarimo_desc { UINT8 gfxindex; /* index to which gfx system */ UINT8 banks; /* number of motion object banks */ @@ -81,8 +79,7 @@ struct _atarimo_desc }; /* rectangle list */ -typedef struct _atarimo_rect_list atarimo_rect_list; -struct _atarimo_rect_list +struct atarimo_rect_list { int numrects; rectangle * rect; diff --git a/src/mame/video/avgdvg.c b/src/mame/video/avgdvg.c index 037a324f58e..ede6285255b 100644 --- a/src/mame/video/avgdvg.c +++ b/src/mame/video/avgdvg.c @@ -112,8 +112,7 @@ private: running_machine *m_machine; }; -typedef struct _vgconf vgconf; -struct _vgconf +struct vgconf { int (*handler[8])(vgdata *); UINT8 (*state_addr)(vgdata *); diff --git a/src/mame/video/bfm_dm01.h b/src/mame/video/bfm_dm01.h index a051f747595..c16d8b32c43 100644 --- a/src/mame/video/bfm_dm01.h +++ b/src/mame/video/bfm_dm01.h @@ -6,8 +6,7 @@ #ifndef BFM_DM01 #define BFM_DM01 -typedef struct _bfmdm01_interface bfmdm01_interface; -struct _bfmdm01_interface +struct bfmdm01_interface { void (*busy_func)(running_machine &machine, int state); }; diff --git a/src/mame/video/deco16ic.c b/src/mame/video/deco16ic.c index 94b5a3b037c..4775ac51983 100644 --- a/src/mame/video/deco16ic.c +++ b/src/mame/video/deco16ic.c @@ -164,8 +164,7 @@ Rowscroll style: #include "ui.h" -typedef struct _deco16ic_state deco16ic_state; -struct _deco16ic_state +struct deco16ic_state { screen_device *screen; diff --git a/src/mame/video/deco16ic.h b/src/mame/video/deco16ic.h index 31251a30138..0ebe52f9ce4 100644 --- a/src/mame/video/deco16ic.h +++ b/src/mame/video/deco16ic.h @@ -21,8 +21,7 @@ typedef int (*deco16_bank_cb)( const int bank ); -typedef struct _deco16ic_interface deco16ic_interface; -struct _deco16ic_interface +struct deco16ic_interface { const char *screen; int split; diff --git a/src/mame/video/decocomn.c b/src/mame/video/decocomn.c index 344daa39943..2e1dad4707e 100644 --- a/src/mame/video/decocomn.c +++ b/src/mame/video/decocomn.c @@ -9,8 +9,7 @@ #include "ui.h" -typedef struct _decocomn_state decocomn_state; -struct _decocomn_state +struct decocomn_state { screen_device *screen; UINT8 *dirty_palette; diff --git a/src/mame/video/decocomn.h b/src/mame/video/decocomn.h index 7fdec47f40e..fac6f99d8d7 100644 --- a/src/mame/video/decocomn.h +++ b/src/mame/video/decocomn.h @@ -16,8 +16,7 @@ ***************************************************************************/ -typedef struct _decocomn_interface decocomn_interface; -struct _decocomn_interface +struct decocomn_interface { const char *screen; }; diff --git a/src/mame/video/galastrm.c b/src/mame/video/galastrm.c index c8256b1bdef..8d5e73a519d 100644 --- a/src/mame/video/galastrm.c +++ b/src/mame/video/galastrm.c @@ -6,14 +6,12 @@ #define X_OFFSET 96 #define Y_OFFSET 60 -typedef struct _poly_extra_data poly_extra_data; -struct _poly_extra_data +struct poly_extra_data { bitmap_ind16 *texbase; }; -typedef struct _polygon polygon; -struct _polygon +struct polygon { float x; float y; diff --git a/src/mame/video/gtia.h b/src/mame/video/gtia.h index 19bf865b068..eecd9a94996 100644 --- a/src/mame/video/gtia.h +++ b/src/mame/video/gtia.h @@ -13,8 +13,7 @@ #include "includes/atari.h" -typedef struct _gtia_interface gtia_interface; -struct _gtia_interface +struct gtia_interface { UINT8 (*console_read)(address_space *space); void (*console_write)(address_space *space, UINT8 data); @@ -24,8 +23,7 @@ struct _gtia_interface /* reading registers */ -typedef struct _gtia_readregs gtia_readregs; -struct _gtia_readregs +struct gtia_readregs { UINT8 m0pf; /* d000 missile 0 playfield collisions */ UINT8 m1pf; /* d001 missile 1 playfield collisions */ @@ -59,8 +57,7 @@ struct _gtia_readregs }; /* writing registers */ -typedef struct _gtia_writeregs gtia_writeregs; -struct _gtia_writeregs +struct gtia_writeregs { UINT8 hposp0; /* d000 player 0 horz position */ UINT8 hposp1; /* d001 player 1 horz position */ @@ -97,8 +94,7 @@ struct _gtia_writeregs }; /* helpers */ -typedef struct _gtia_helpervars gtia_helpervars; -struct _gtia_helpervars +struct gtia_helpervars { UINT8 grafp0; /* optimized graphics data player 0 */ UINT8 grafp1; /* optimized graphics data player 1 */ @@ -125,8 +121,7 @@ struct _gtia_helpervars UINT8 vdelay_p3; /* vertical delay for player 3 */ }; -typedef struct _gtia_struct gtia_struct; -struct _gtia_struct +struct gtia_struct { gtia_interface intf; gtia_readregs r; /* read registers */ diff --git a/src/mame/video/gticlub.c b/src/mame/video/gticlub.c index 20cc10e4a10..939e3a7262e 100644 --- a/src/mame/video/gticlub.c +++ b/src/mame/video/gticlub.c @@ -36,8 +36,7 @@ static int count = 0; #endif -typedef struct _poly_extra_data poly_extra_data; -struct _poly_extra_data +struct poly_extra_data { UINT32 color; int texture_x, texture_y; diff --git a/src/mame/video/hng64.c b/src/mame/video/hng64.c index ad5566d26da..3a3ed867f13 100644 --- a/src/mame/video/hng64.c +++ b/src/mame/video/hng64.c @@ -689,8 +689,7 @@ typedef enum } hng64trans_t; -typedef struct _blit_parameters blit_parameters; -struct _blit_parameters +struct blit_parameters { bitmap_rgb32 * bitmap; rectangle cliprect; diff --git a/src/mame/video/kan_pand.c b/src/mame/video/kan_pand.c index 5cbb308006d..a40acece6ad 100644 --- a/src/mame/video/kan_pand.c +++ b/src/mame/video/kan_pand.c @@ -50,8 +50,7 @@ #include "emu.h" #include "video/kan_pand.h" -typedef struct _kaneko_pandora_state kaneko_pandora_state; -struct _kaneko_pandora_state +struct kaneko_pandora_state { screen_device *screen; UINT8 * spriteram; diff --git a/src/mame/video/kan_pand.h b/src/mame/video/kan_pand.h index 66ab0e76bb1..f633cb18da1 100644 --- a/src/mame/video/kan_pand.h +++ b/src/mame/video/kan_pand.h @@ -15,8 +15,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _kaneko_pandora_interface kaneko_pandora_interface; -struct _kaneko_pandora_interface +struct kaneko_pandora_interface { const char *screen; UINT8 gfx_region; diff --git a/src/mame/video/konicdev.c b/src/mame/video/konicdev.c index 776e763b029..95668d7d2e8 100644 --- a/src/mame/video/konicdev.c +++ b/src/mame/video/konicdev.c @@ -1332,8 +1332,7 @@ void konami_sortlayers5( int *layer, int *pri ) /* */ /***************************************************************************/ -typedef struct _k007121_state k007121_state ; -struct _k007121_state +struct k007121_state { UINT8 ctrlram[8]; @@ -1619,8 +1618,7 @@ void k007121_device::device_reset() /* */ /***************************************************************************/ -typedef struct _k007342_state k007342_state; -struct _k007342_state +struct k007342_state { UINT8 *ram; UINT8 *scroll_ram; @@ -1932,8 +1930,7 @@ void k007342_device::device_reset() /* */ /***************************************************************************/ -typedef struct _k007420_state k007420_state; -struct _k007420_state +struct k007420_state { UINT8 *ram; @@ -2227,8 +2224,7 @@ void k007420_device::device_reset() /* */ /***************************************************************************/ -typedef struct _k052109_state k052109_state; -struct _k052109_state +struct k052109_state { UINT8 *ram; UINT8 *videoram_F; @@ -2897,8 +2893,7 @@ void k052109_device::device_reset() /* */ /***************************************************************************/ -typedef struct _k051960_state k051960_state; -struct _k051960_state +struct k051960_state { UINT8 *ram; @@ -3477,8 +3472,7 @@ void k051960_device::device_reset() /* */ /***************************************************************************/ -typedef struct _k05324x_state k05324x_state; -struct _k05324x_state +struct k05324x_state { UINT16 *ram; UINT16 *buffer; @@ -4303,8 +4297,7 @@ void k05324x_device::device_reset() /* */ /***************************************************************************/ -typedef struct _k053247_state k053247_state; -struct _k053247_state +struct k053247_state { UINT16 *ram; @@ -5380,8 +5373,7 @@ void k053247_set_z_rejection( device_t *device, int zcode ) /* */ /***************************************************************************/ -typedef struct _k051316_state k051316_state; -struct _k051316_state +struct k051316_state { UINT8 *ram; @@ -5696,8 +5688,7 @@ void k051316_device::device_reset() /* */ /***************************************************************************/ -typedef struct _k053936_state k053936_state; -struct _k053936_state +struct k053936_state { UINT16 *ctrl; UINT16 *linectrl; @@ -5959,8 +5950,7 @@ void k053936_device::device_reset() /* */ /***************************************************************************/ -typedef struct _k053251_state k053251_state; -struct _k053251_state +struct k053251_state { int dirty_tmap[5]; @@ -6149,8 +6139,7 @@ void k053251_device::device_reset() /* */ /***************************************************************************/ -typedef struct _k054000_state k054000_state; -struct _k054000_state +struct k054000_state { UINT8 regs[0x20]; }; @@ -6296,8 +6285,7 @@ void k054000_device::device_reset() /* */ /***************************************************************************/ -typedef struct _k051733_state k051733_state; -struct _k051733_state +struct k051733_state { UINT8 ram[0x20]; UINT8 rng; @@ -6491,8 +6479,7 @@ void k051733_device::device_reset() #define K056832_PAGE_WIDTH (K056832_PAGE_COLS*8) #define K056832_PAGE_COUNT 16 -typedef struct _k056832_state k056832_state; -struct _k056832_state +struct k056832_state { tilemap_t *tilemap[K056832_PAGE_COUNT]; bitmap_ind16 *pixmap[K056832_PAGE_COUNT]; @@ -8473,8 +8460,7 @@ void k056832_device::device_start() /* K055555 5-bit-per-pixel priority encoder */ /* This device has 48 8-bit-wide registers */ -typedef struct _k055555_state k055555_state; -struct _k055555_state +struct k055555_state { UINT8 regs[128]; }; @@ -8630,8 +8616,7 @@ void k055555_device::device_reset() // register-handling shell. -typedef struct _k054338_state k054338_state; -struct _k054338_state +struct k054338_state { UINT16 regs[32]; int shd_rgb[9]; @@ -8974,8 +8959,7 @@ void k054338_device::device_reset() /* */ /***************************************************************************/ -typedef struct _k001006_state k001006_state; -struct _k001006_state +struct k001006_state { screen_device *screen; @@ -9182,8 +9166,7 @@ void k001006_device::device_reset() #include "video/poly.h" #include "cpu/sharc/sharc.h" -typedef struct _poly_extra_data poly_extra_data; -struct _poly_extra_data +struct poly_extra_data { UINT32 color; int texture_x, texture_y; @@ -9193,8 +9176,7 @@ struct _poly_extra_data int texture_mirror_y; }; -typedef struct _k001005_state k001005_state; -struct _k001005_state +struct k001005_state { screen_device *screen; device_t *cpu; @@ -10151,8 +10133,7 @@ void k001005_device::device_stop() /***************************************************************************/ -typedef struct _k001604_state k001604_state; -struct _k001604_state +struct k001604_state { screen_device *screen; tilemap_t *layer_8x8[2]; @@ -10597,8 +10578,7 @@ void k001604_device::device_reset() /* */ /***************************************************************************/ -typedef struct _k037122_state k037122_state; -struct _k037122_state +struct k037122_state { screen_device *screen; tilemap_t *layer[2]; diff --git a/src/mame/video/konicdev.h b/src/mame/video/konicdev.h index 1e4ca76f4e2..bfe9dcb3e48 100644 --- a/src/mame/video/konicdev.h +++ b/src/mame/video/konicdev.h @@ -26,22 +26,19 @@ typedef void (*k051316_callback)(running_machine &machine, int *code, int *color typedef void (*k056832_callback)(running_machine &machine, int layer, int *code, int *color, int *flags); -typedef struct _k007342_interface k007342_interface; -struct _k007342_interface +struct k007342_interface { int gfxnum; k007342_callback callback; }; -typedef struct _k007420_interface k007420_interface; -struct _k007420_interface +struct k007420_interface { int banklimit; k007420_callback callback; }; -typedef struct _k052109_interface k052109_interface; -struct _k052109_interface +struct k052109_interface { const char *gfx_memory_region; int gfx_num; @@ -50,8 +47,7 @@ struct _k052109_interface k052109_callback callback; }; -typedef struct _k051960_interface k051960_interface; -struct _k051960_interface +struct k051960_interface { const char *gfx_memory_region; int gfx_num; @@ -60,8 +56,7 @@ struct _k051960_interface k051960_callback callback; }; -typedef struct _k05324x_interface k05324x_interface; -struct _k05324x_interface +struct k05324x_interface { const char *gfx_memory_region; int gfx_num; @@ -71,8 +66,7 @@ struct _k05324x_interface k05324x_callback callback; }; -typedef struct _k053247_interface k053247_interface; -struct _k053247_interface +struct k053247_interface { const char *screen; const char *gfx_memory_region; @@ -83,8 +77,7 @@ struct _k053247_interface k05324x_callback callback; }; -typedef struct _k051316_interface k051316_interface; -struct _k051316_interface +struct k051316_interface { const char *gfx_memory_region; int gfx_num; @@ -93,14 +86,12 @@ struct _k051316_interface k051316_callback callback; }; -typedef struct _k053936_interface k053936_interface; -struct _k053936_interface +struct k053936_interface { int wrap, xoff, yoff; }; -typedef struct _k056832_interface k056832_interface; -struct _k056832_interface +struct k056832_interface { const char *gfx_memory_region; int gfx_num; @@ -113,22 +104,19 @@ struct _k056832_interface const char *k055555; // tbyahhoo uses the k056832 together with a k055555 }; -typedef struct _k054338_interface k054338_interface; -struct _k054338_interface +struct k054338_interface { const char *screen; int alpha_inv; const char *k055555; }; -typedef struct _k001006_interface k001006_interface; -struct _k001006_interface +struct k001006_interface { const char *gfx_region; }; -typedef struct _k001005_interface k001005_interface; -struct _k001005_interface +struct k001005_interface { const char *screen; const char *cpu; @@ -140,8 +128,7 @@ struct _k001005_interface int gfx_index; }; -typedef struct _k001604_interface k001604_interface; -struct _k001604_interface +struct k001604_interface { int gfx_index_1; int gfx_index_2; @@ -151,8 +138,7 @@ struct _k001604_interface int is_slrasslt; }; -typedef struct _k037122_interface k037122_interface; -struct _k037122_interface +struct k037122_interface { const char *screen; int gfx_index; diff --git a/src/mame/video/mcd212.h b/src/mame/video/mcd212.h index 99f4e9260d3..4aeb20ab37c 100644 --- a/src/mame/video/mcd212.h +++ b/src/mame/video/mcd212.h @@ -157,8 +157,7 @@ typedef INT16 SWORD68K; -typedef struct _mcd212_ab_t mcd212_ab_t; -struct _mcd212_ab_t +struct mcd212_ab_t { //* Color limit array. BYTE68K limit[3 * BYTE68K_MAX]; diff --git a/src/mame/video/midzeus.c b/src/mame/video/midzeus.c index d8cfc742b4a..6c0f3314550 100644 --- a/src/mame/video/midzeus.c +++ b/src/mame/video/midzeus.c @@ -33,8 +33,7 @@ * *************************************/ -typedef struct _poly_extra_data poly_extra_data; -struct _poly_extra_data +struct poly_extra_data { const void * palbase; const void * texbase; diff --git a/src/mame/video/midzeus2.c b/src/mame/video/midzeus2.c index 9f3b242665e..50bf01ce902 100644 --- a/src/mame/video/midzeus2.c +++ b/src/mame/video/midzeus2.c @@ -35,8 +35,7 @@ * *************************************/ -typedef struct _poly_extra_data poly_extra_data; -struct _poly_extra_data +struct poly_extra_data { const void * palbase; const void * texbase; diff --git a/src/mame/video/model2.c b/src/mame/video/model2.c index 50328374fa8..99344704bf2 100644 --- a/src/mame/video/model2.c +++ b/src/mame/video/model2.c @@ -137,8 +137,7 @@ typedef struct UINT8 luma; } _quad_m2; -typedef struct _poly_extra_data poly_extra_data; -struct _poly_extra_data +struct poly_extra_data { model2_state * state; UINT32 lumabase; diff --git a/src/mame/video/model3.c b/src/mame/video/model3.c index 19b9b485843..79fb68e4fc0 100644 --- a/src/mame/video/model3.c +++ b/src/mame/video/model3.c @@ -33,8 +33,7 @@ struct _cached_texture rgb_t data[1]; }; -typedef struct _poly_extra_data poly_extra_data; -struct _poly_extra_data +struct poly_extra_data { cached_texture *texture; bitmap_ind32 *zbuffer; diff --git a/src/mame/video/namcos22.c b/src/mame/video/namcos22.c index a9906d965b3..1b9764ee2f2 100644 --- a/src/mame/video/namcos22.c +++ b/src/mame/video/namcos22.c @@ -336,8 +336,7 @@ INLINE unsigned texel( namcos22_state *state, unsigned x, unsigned y ) -typedef struct _poly_extra_data poly_extra_data; -struct _poly_extra_data +struct poly_extra_data { /* poly / sprites */ running_machine *machine; diff --git a/src/mame/video/taitoic.c b/src/mame/video/taitoic.c index 39b29b7805a..01b837de4e5 100644 --- a/src/mame/video/taitoic.c +++ b/src/mame/video/taitoic.c @@ -544,8 +544,7 @@ INLINE void taitoic_drawscanline( bitmap_ind16 &bitmap, const rectangle &cliprec /* */ /***************************************************************************/ -typedef struct _pc080sn_state pc080sn_state; -struct _pc080sn_state +struct pc080sn_state { UINT16 ctrl[8]; @@ -1048,8 +1047,7 @@ void pc080sn_device::device_start() /* */ /***************************************************************************/ -typedef struct _pc090oj_state pc090oj_state; -struct _pc090oj_state +struct pc090oj_state { /* NB: pc090oj_ctrl is the internal register controlling flipping @@ -1278,8 +1276,7 @@ void pc090oj_device::device_reset() /* */ /***************************************************************************/ -typedef struct _tc0080vco_state tc0080vco_state; -struct _tc0080vco_state +struct tc0080vco_state { UINT16 * ram; UINT16 * bg0_ram_0; @@ -1991,8 +1988,7 @@ void tc0080vco_device::device_start() /* */ /***************************************************************************/ -typedef struct _tc0100scn_state tc0100scn_state; -struct _tc0100scn_state +struct tc0100scn_state { UINT16 ctrl[8]; @@ -2636,8 +2632,7 @@ void tc0100scn_device::device_reset() /* */ /***************************************************************************/ -typedef struct _tc0280grd_state tc0280grd_state; -struct _tc0280grd_state +struct tc0280grd_state { UINT16 * ram; @@ -2835,8 +2830,7 @@ void tc0280grd_device::device_reset() /* */ /***************************************************************************/ -typedef struct _tc0360pri_state tc0360pri_state; -struct _tc0360pri_state +struct tc0360pri_state { UINT8 regs[16]; }; @@ -2941,8 +2935,7 @@ void tc0360pri_device::device_reset() /* */ /***************************************************************************/ -typedef struct _tc0480scp_state tc0480scp_state; -struct _tc0480scp_state +struct tc0480scp_state { UINT16 ctrl[0x18]; @@ -3925,8 +3918,7 @@ void tc0480scp_device::device_reset() /* */ /***************************************************************************/ -typedef struct _tc0150rod_state tc0150rod_state; -struct _tc0150rod_state +struct tc0150rod_state { UINT16 * ram; @@ -4761,8 +4753,7 @@ void tc0150rod_device::device_start() /* */ /***************************************************************************/ -typedef struct _tc0110pcr_state tc0110pcr_state; -struct _tc0110pcr_state +struct tc0110pcr_state { running_machine &machine() const { assert(m_machine != NULL); return *m_machine; } UINT16 * ram; @@ -5019,8 +5010,7 @@ void tc0110pcr_device::device_reset() /* */ /***************************************************************************/ -typedef struct _tc0180vcu_state tc0180vcu_state; -struct _tc0180vcu_state +struct tc0180vcu_state { UINT16 ctrl[0x10]; diff --git a/src/mame/video/taitoic.h b/src/mame/video/taitoic.h index 2975e5ed3e8..6a1e130bd8b 100644 --- a/src/mame/video/taitoic.h +++ b/src/mame/video/taitoic.h @@ -12,8 +12,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _pc080sn_interface pc080sn_interface; -struct _pc080sn_interface +struct pc080sn_interface { int gfxnum; @@ -23,8 +22,7 @@ struct _pc080sn_interface }; -typedef struct _pc090oj_interface pc090oj_interface; -struct _pc090oj_interface +struct pc090oj_interface { int gfxnum; @@ -33,8 +31,7 @@ struct _pc090oj_interface }; -typedef struct _tc0080vco_interface tc0080vco_interface; -struct _tc0080vco_interface +struct tc0080vco_interface { int gfxnum; int txnum; @@ -45,8 +42,7 @@ struct _tc0080vco_interface int has_fg0; /* for debug */ }; -typedef struct _tc0100scn_interface tc0100scn_interface; -struct _tc0100scn_interface +struct tc0100scn_interface { const char *screen; @@ -62,15 +58,13 @@ struct _tc0100scn_interface }; -typedef struct _tc0280grd_interface tc0280grd_interface; -struct _tc0280grd_interface +struct tc0280grd_interface { int gfxnum; }; -typedef struct _tc0480scp_interface tc0480scp_interface; -struct _tc0480scp_interface +struct tc0480scp_interface { int gfxnum; int txnum; @@ -85,21 +79,18 @@ struct _tc0480scp_interface }; -typedef struct _tc0150rod_interface tc0150rod_interface; -struct _tc0150rod_interface +struct tc0150rod_interface { const char *gfx_region; /* gfx region for the road */ }; -typedef struct _tc0110pcr_interface tc0110pcr_interface; -struct _tc0110pcr_interface +struct tc0110pcr_interface { int pal_offs; }; -typedef struct _tc0180vcu_interface tc0180vcu_interface; -struct _tc0180vcu_interface +struct tc0180vcu_interface { int bg_color_base; int fg_color_base; diff --git a/src/mame/video/turbo.c b/src/mame/video/turbo.c index 7267737ade4..1b298ae2a96 100644 --- a/src/mame/video/turbo.c +++ b/src/mame/video/turbo.c @@ -10,8 +10,7 @@ -typedef struct _sprite_info sprite_info; -struct _sprite_info +struct sprite_info { UINT16 ve; /* VE0-15 signals for this row */ UINT8 lst; /* LST0-7 signals for this row */ diff --git a/src/mame/video/vrender0.c b/src/mame/video/vrender0.c index ac28d432974..c2b2fbc0b65 100644 --- a/src/mame/video/vrender0.c +++ b/src/mame/video/vrender0.c @@ -74,8 +74,7 @@ typedef struct UINT32 Height; } _RenderState; -typedef struct _vr0video_state vr0video_state; -struct _vr0video_state +struct vr0video_state { device_t *cpu; diff --git a/src/mame/video/vrender0.h b/src/mame/video/vrender0.h index e276dfd730a..a436146df3e 100644 --- a/src/mame/video/vrender0.h +++ b/src/mame/video/vrender0.h @@ -7,8 +7,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _vr0video_interface vr0video_interface; -struct _vr0video_interface +struct vr0video_interface { const char *cpu; }; diff --git a/src/mess/audio/channelf.c b/src/mess/audio/channelf.c index 2a6939ace66..d9c5f5385b2 100644 --- a/src/mess/audio/channelf.c +++ b/src/mess/audio/channelf.c @@ -3,8 +3,7 @@ static const int max_amplitude = 0x7fff; -typedef struct _channelf_sound_state channelf_sound_state; -struct _channelf_sound_state +struct channelf_sound_state { sound_stream *channel; int sound_mode; diff --git a/src/mess/audio/dave.c b/src/mess/audio/dave.c index 000c3177769..630a3bca24f 100644 --- a/src/mess/audio/dave.c +++ b/src/mess/audio/dave.c @@ -28,8 +28,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _dave_t dave_t; -struct _dave_t +struct dave_t { devcb_resolved_read8 reg_r; devcb_resolved_write8 reg_w; diff --git a/src/mess/audio/dave.h b/src/mess/audio/dave.h index af5da4949c7..eee0adb731f 100644 --- a/src/mess/audio/dave.h +++ b/src/mess/audio/dave.h @@ -60,8 +60,7 @@ enum TYPE DEFINITIONS ***************************************************************************/ -typedef struct _dave_interface dave_interface; -struct _dave_interface +struct dave_interface { devcb_read8 reg_r; devcb_write8 reg_w; diff --git a/src/mess/audio/gb.c b/src/mess/audio/gb.c index 7e72f6ad349..bb5b80ddb75 100644 --- a/src/mess/audio/gb.c +++ b/src/mess/audio/gb.c @@ -147,8 +147,7 @@ struct SOUNDC }; -typedef struct _gb_sound_t gb_sound_t; -struct _gb_sound_t +struct gb_sound_t { sound_stream *channel; int rate; diff --git a/src/mess/audio/gmaster.c b/src/mess/audio/gmaster.c index b4812e84ed3..cdc3ff8b4b6 100644 --- a/src/mess/audio/gmaster.c +++ b/src/mess/audio/gmaster.c @@ -7,8 +7,7 @@ #include "cpu/upd7810/upd7810.h" #include "includes/gmaster.h" -typedef struct _gmaster_sound gmaster_sound; -struct _gmaster_sound +struct gmaster_sound { /*bool*/int level; sound_stream *mixer_channel; diff --git a/src/mess/audio/lynx.c b/src/mess/audio/lynx.c index 69c75c22f34..d5017901708 100644 --- a/src/mess/audio/lynx.c +++ b/src/mess/audio/lynx.c @@ -99,8 +99,7 @@ typedef struct { int count; } LYNX_AUDIO; -typedef struct _lynx_sound_state lynx_sound_state; -struct _lynx_sound_state +struct lynx_sound_state { sound_stream *mixer_channel; float usec_per_sample; diff --git a/src/mess/audio/mac.c b/src/mess/audio/mac.c index 8fb4bfa3ee1..d216bfc1b5f 100644 --- a/src/mess/audio/mac.c +++ b/src/mess/audio/mac.c @@ -30,8 +30,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _mac_sound mac_sound; -struct _mac_sound +struct mac_sound { sound_stream *mac_stream; int sample_enable; diff --git a/src/mess/audio/mea8000.h b/src/mess/audio/mea8000.h index bdeac8f5dd9..0910ae59872 100644 --- a/src/mess/audio/mea8000.h +++ b/src/mess/audio/mea8000.h @@ -34,8 +34,7 @@ extern const device_type MEA8000; /* ---------- configuration ------------ */ -typedef struct _mea8000_interface mea8000_interface; -struct _mea8000_interface +struct mea8000_interface { /* output channel */ const char * channel; diff --git a/src/mess/audio/special.c b/src/mess/audio/special.c index 76ebc7f0a8c..80282624740 100644 --- a/src/mess/audio/special.c +++ b/src/mess/audio/special.c @@ -9,8 +9,7 @@ #include "includes/special.h" -typedef struct _specimx_sound_state specimx_sound_state; -struct _specimx_sound_state +struct specimx_sound_state { sound_stream *mixer_channel; int specimx_input[3]; diff --git a/src/mess/audio/svision.c b/src/mess/audio/svision.c index df5119aee71..b9c1ef7448a 100644 --- a/src/mess/audio/svision.c +++ b/src/mess/audio/svision.c @@ -45,8 +45,7 @@ typedef struct int count; } SVISION_CHANNEL; -typedef struct _svision_sound_state svision_sound_state; -struct _svision_sound_state +struct svision_sound_state { sound_stream *mixer_channel; SVISION_DMA dma; diff --git a/src/mess/audio/t6721.c b/src/mess/audio/t6721.c index c3eea9e0749..3245fe8ab5a 100644 --- a/src/mess/audio/t6721.c +++ b/src/mess/audio/t6721.c @@ -57,8 +57,7 @@ sound generator (?), CD40105BE (RCA H 432) and a 74LS222A logic chip. #include "audio/t6721.h" -typedef struct _t6721_state t6721_state; -struct _t6721_state +struct t6721_state { emu_timer *timer; diff --git a/src/mess/audio/upd1771.c b/src/mess/audio/upd1771.c index ac471cfeb29..aa6a0ebb2ec 100644 --- a/src/mess/audio/upd1771.c +++ b/src/mess/audio/upd1771.c @@ -118,8 +118,7 @@ const char WAVEFORMS[8][32]={ #define STATE_TONE 2 #define STATE_ADPCM 3 -typedef struct _upd1771_state upd1771_state; -struct _upd1771_state +struct upd1771_state { sound_stream *channel; devcb_resolved_write_line ack_out_func; diff --git a/src/mess/audio/upd1771.h b/src/mess/audio/upd1771.h index d7ae7dae91f..83104fa5d05 100644 --- a/src/mess/audio/upd1771.h +++ b/src/mess/audio/upd1771.h @@ -13,8 +13,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _upd1771_interface upd1771_interface; -struct _upd1771_interface +struct upd1771_interface { devcb_write_line ack_callback; }; diff --git a/src/mess/audio/vc4000.c b/src/mess/audio/vc4000.c index 24db3e19a3d..fea630a92fc 100644 --- a/src/mess/audio/vc4000.c +++ b/src/mess/audio/vc4000.c @@ -8,8 +8,7 @@ #include "includes/vc4000.h" -typedef struct _vc4000_sound vc4000_sound; -struct _vc4000_sound +struct vc4000_sound { sound_stream *channel; UINT8 reg[1]; diff --git a/src/mess/drivers/gba.c b/src/mess/drivers/gba.c index f75fe4c5e97..bb7feb99354 100644 --- a/src/mess/drivers/gba.c +++ b/src/mess/drivers/gba.c @@ -2976,8 +2976,7 @@ static UINT32 gba_fix_wrong_chip(running_machine &machine, UINT32 cart_size, UIN return chip; } -typedef struct _gba_pcb gba_pcb; -struct _gba_pcb +struct gba_pcb { const char *pcb_name; int pcb_id; diff --git a/src/mess/drivers/pasogo.c b/src/mess/drivers/pasogo.c index 1e71dae686e..5a5b719af1a 100644 --- a/src/mess/drivers/pasogo.c +++ b/src/mess/drivers/pasogo.c @@ -18,8 +18,7 @@ to make the standard pc driver one level more complex, so own driver rtc interrupt irq 2 */ -typedef struct _vg230_t vg230_t; -struct _vg230_t +struct vg230_t { UINT8 index; UINT8 data[0x100]; @@ -40,8 +39,7 @@ struct _vg230_t } pmu; }; -typedef struct _ems_t ems_t; -struct _ems_t +struct ems_t { UINT8 data; int index; @@ -66,8 +64,8 @@ public: DECLARE_WRITE8_MEMBER(ems_w); DECLARE_READ8_MEMBER(vg230_io_r); DECLARE_WRITE8_MEMBER(vg230_io_w); - struct _vg230_t m_vg230; - struct _ems_t m_ems; + vg230_t m_vg230; + ems_t m_ems; DECLARE_DRIVER_INIT(pasogo); virtual void machine_reset(); virtual void palette_init(); @@ -467,7 +465,7 @@ void pasogo_state::machine_reset() //static const unsigned i86_address_mask = 0x000fffff; -static const struct pit8253_config pc_pit8254_config = +static const pit8253_config pc_pit8254_config = { { { @@ -492,7 +490,7 @@ static WRITE_LINE_DEVICE_HANDLER( pasogo_pic8259_set_int_line ) device->machine().device("maincpu")->execute().set_input_line(0, state ? HOLD_LINE : CLEAR_LINE); } -static const struct pic8259_interface pasogo_pic8259_config = +static const pic8259_interface pasogo_pic8259_config = { DEVCB_LINE(pasogo_pic8259_set_int_line), DEVCB_LINE_VCC, diff --git a/src/mess/drivers/pcfx.c b/src/mess/drivers/pcfx.c index e38d8c618f9..51a0fa4e35a 100644 --- a/src/mess/drivers/pcfx.c +++ b/src/mess/drivers/pcfx.c @@ -13,9 +13,7 @@ #include "video/huc6270.h" #include "video/huc6272.h" -typedef struct _pcfx_pad_t pcfx_pad_t; - -struct _pcfx_pad_t +struct pcfx_pad_t { UINT8 ctrl[2]; UINT8 status[2]; diff --git a/src/mess/drivers/supracan.c b/src/mess/drivers/supracan.c index 74b10b20ad4..4a9ccd552b1 100644 --- a/src/mess/drivers/supracan.c +++ b/src/mess/drivers/supracan.c @@ -92,8 +92,7 @@ DEBUG TRICKS: #define ENABLE_VERBOSE_LOG (1) -typedef struct _acan_dma_regs_t acan_dma_regs_t; -struct _acan_dma_regs_t +struct acan_dma_regs_t { UINT32 source[2]; UINT32 dest[2]; @@ -101,8 +100,7 @@ struct _acan_dma_regs_t UINT16 control[2]; }; -typedef struct _acan_sprdma_regs_t acan_sprdma_regs_t; -struct _acan_sprdma_regs_t +struct acan_sprdma_regs_t { UINT32 src; UINT16 src_inc; diff --git a/src/mess/drivers/vboy.c b/src/mess/drivers/vboy.c index 2e99a9c2926..ca449f3908f 100644 --- a/src/mess/drivers/vboy.c +++ b/src/mess/drivers/vboy.c @@ -41,8 +41,7 @@ struct _vboy_regs_t UINT32 tcr, wcr, kcr; }; -typedef struct _vip_regs_t vip_regs_t; -struct _vip_regs_t +struct vip_regs_t { UINT16 INTPND; @@ -1337,8 +1336,7 @@ static GFXDECODE_START( vboy ) GFXDECODE_ENTRY( "pcg", 0x00000, vboy_pcg_8x8, 0, 1 ) GFXDECODE_END -typedef struct _vboy_pcb vboy_pcb; -struct _vboy_pcb +struct vboy_pcb { const char *pcb_name; int pcb_id; diff --git a/src/mess/formats/cbm_crt.h b/src/mess/formats/cbm_crt.h index 74ee8348c0c..e9c8c139c79 100644 --- a/src/mess/formats/cbm_crt.h +++ b/src/mess/formats/cbm_crt.h @@ -116,8 +116,7 @@ enum // TYPE DEFINITIONS //************************************************************************** -typedef struct _cbm_crt_header cbm_crt_header; -struct _cbm_crt_header +struct cbm_crt_header { UINT8 signature[16]; UINT8 header_length[4]; @@ -130,8 +129,7 @@ struct _cbm_crt_header }; -typedef struct _cbm_crt_chip cbm_crt_chip; -struct _cbm_crt_chip +struct cbm_crt_chip { UINT8 signature[4]; UINT8 packet_length[4]; diff --git a/src/mess/formats/studio2_st2.c b/src/mess/formats/studio2_st2.c index 0f591e0687b..fff9ec1026f 100644 --- a/src/mess/formats/studio2_st2.c +++ b/src/mess/formats/studio2_st2.c @@ -22,8 +22,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _st2_header st2_header; -struct _st2_header +struct st2_header { UINT8 header[4]; /* "RCA2" in ASCII code */ UINT8 blocks; /* Total number of 256 byte blocks in file (including this one) */ diff --git a/src/mess/includes/apple2.h b/src/mess/includes/apple2.h index 4f3b7765221..c5b3e15362b 100644 --- a/src/mess/includes/apple2.h +++ b/src/mess/includes/apple2.h @@ -88,8 +88,7 @@ typedef enum A2MEM_DUAL = 2 /* this is a bank where read and write can go different places */ } bank_disposition_t; -typedef struct _apple2_meminfo apple2_meminfo; -struct _apple2_meminfo +struct apple2_meminfo { UINT32 read_mem; read8_delegate *read_handler; @@ -97,8 +96,7 @@ struct _apple2_meminfo write8_delegate *write_handler; }; -typedef struct _apple2_memmap_entry apple2_memmap_entry; -struct _apple2_memmap_entry +struct apple2_memmap_entry { offs_t begin; offs_t end; @@ -106,8 +104,7 @@ struct _apple2_memmap_entry bank_disposition_t bank_disposition; }; -typedef struct _apple2_memmap_config apple2_memmap_config; -struct _apple2_memmap_config +struct apple2_memmap_config { int first_bank; UINT8 *auxmem; diff --git a/src/mess/includes/c64_legacy.h b/src/mess/includes/c64_legacy.h index 5e18d9cad99..d9227403115 100644 --- a/src/mess/includes/c64_legacy.h +++ b/src/mess/includes/c64_legacy.h @@ -23,8 +23,7 @@ typedef struct { int addr, size, index, start; } C64_ROM; -typedef struct _c64_cart_t c64_cart_t; -struct _c64_cart_t { +struct c64_cart_t { C64_ROM bank[C64_MAX_ROMBANK]; INT8 game; INT8 exrom; diff --git a/src/mess/includes/mc68328.h b/src/mess/includes/mc68328.h index 5b4ed9a59c7..2e3aaadaec8 100644 --- a/src/mess/includes/mc68328.h +++ b/src/mess/includes/mc68328.h @@ -94,8 +94,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _mc68328_interface mc68328_interface; -struct _mc68328_interface +struct mc68328_interface { const char *m68k_cpu_tag; diff --git a/src/mess/machine/6883sam.h b/src/mess/machine/6883sam.h index 69676369127..693306df731 100644 --- a/src/mess/machine/6883sam.h +++ b/src/mess/machine/6883sam.h @@ -19,8 +19,7 @@ /* interface */ -typedef struct _sam6883_interface sam6883_interface; -struct _sam6883_interface +struct sam6883_interface { /* the CPU/space from which the SAM reads data */ const char * m_cpu_tag; diff --git a/src/mess/machine/990_tap.c b/src/mess/machine/990_tap.c index 7a41a5ac298..475cf791887 100644 --- a/src/mess/machine/990_tap.c +++ b/src/mess/machine/990_tap.c @@ -44,8 +44,7 @@ typedef struct tape_unit_t unsigned int wp : 1; /* TRUE if tape is write-protected */ } tape_unit_t; -typedef struct _tap_990_t tap_990_t; -struct _tap_990_t +struct tap_990_t { UINT16 w[8]; @@ -54,8 +53,7 @@ struct _tap_990_t tape_unit_t t[MAX_TAPE_UNIT]; }; -typedef struct _ti990_tape_t ti990_tape_t; -struct _ti990_tape_t +struct ti990_tape_t { int dummy; }; diff --git a/src/mess/machine/990_tap.h b/src/mess/machine/990_tap.h index 8f705ecde3f..d2e5b0ef2f6 100644 --- a/src/mess/machine/990_tap.h +++ b/src/mess/machine/990_tap.h @@ -8,8 +8,7 @@ extern WRITE16_DEVICE_HANDLER(ti990_tpc_w); TYPE DEFINITIONS ***************************************************************************/ -typedef struct _ti990_tpc_interface ti990_tpc_interface; -struct _ti990_tpc_interface +struct ti990_tpc_interface { void (*interrupt_callback)(running_machine &machine, int state); }; diff --git a/src/mess/machine/applefdc.c b/src/mess/machine/applefdc.c index 93bf5f4f2fc..20456ceccc2 100644 --- a/src/mess/machine/applefdc.c +++ b/src/mess/machine/applefdc.c @@ -119,8 +119,7 @@ enum TYPE DEFINITIONS ***************************************************************************/ -typedef struct _applefdc_token applefdc_token; -struct _applefdc_token +struct applefdc_token { /* data that is constant for the lifetime of the emulation */ emu_timer *motor_timer; diff --git a/src/mess/machine/applefdc.h b/src/mess/machine/applefdc.h index e7df5345d47..904d2d54485 100644 --- a/src/mess/machine/applefdc.h +++ b/src/mess/machine/applefdc.h @@ -86,8 +86,7 @@ extern const device_type SWIM; TYPE DEFINITIONS ***************************************************************************/ -typedef struct _applefdc_interface applefdc_interface; -struct _applefdc_interface +struct applefdc_interface { void (*set_lines)(device_t *device, UINT8 lines); void (*set_enable_lines)(device_t *device, int enable_mask); diff --git a/src/mess/machine/at45dbxx.c b/src/mess/machine/at45dbxx.c index b479d984032..a81ac23df94 100644 --- a/src/mess/machine/at45dbxx.c +++ b/src/mess/machine/at45dbxx.c @@ -58,8 +58,7 @@ typedef struct UINT32 size, pos; } AT45DBXX_IO; -typedef struct _at45dbxx_t at45dbxx_t; -struct _at45dbxx_t +struct at45dbxx_t { UINT8 *data; UINT32 size; diff --git a/src/mess/machine/ataricrt.c b/src/mess/machine/ataricrt.c index f2405cf844e..01992420a4b 100644 --- a/src/mess/machine/ataricrt.c +++ b/src/mess/machine/ataricrt.c @@ -296,8 +296,7 @@ static READ8_HANDLER( bbsb_bankh_r ) } #endif -typedef struct _a800_pcb a800_pcb; -struct _a800_pcb +struct a800_pcb { const char *pcb_name; int pcb_id; diff --git a/src/mess/machine/atarifdc.c b/src/mess/machine/atarifdc.c index 0e65e5eaeef..97017a4601f 100644 --- a/src/mess/machine/atarifdc.c +++ b/src/mess/machine/atarifdc.c @@ -22,8 +22,7 @@ #define VERBOSE_SERIAL 0 #define VERBOSE_CHKSUM 0 -typedef struct _atari_drive atari_drive; -struct _atari_drive +struct atari_drive { UINT8 *image; /* malloc'd image */ int type; /* type of image (XFD, ATR, DSK) */ @@ -38,8 +37,7 @@ struct _atari_drive int sectors; /* total sectors, ie. tracks x heads x spt */ }; -typedef struct _atari_fdc_t atari_fdc_t; -struct _atari_fdc_t +struct atari_fdc_t { int serout_count; int serout_offs; @@ -87,8 +85,7 @@ INLINE atari_fdc_t *get_safe_token(device_t *device) * It is used to determine the format of a XFD image by it's size only *****************************************************************************/ -typedef struct _dsk_format dsk_format; -struct _dsk_format +struct dsk_format { UINT8 density; UINT8 tracks; @@ -108,8 +105,7 @@ struct _dsk_format }; /* combined with the size the image should have */ -typedef struct _xfd_format xfd_format; -struct _xfd_format +struct xfd_format { int size; dsk_format dsk; diff --git a/src/mess/machine/ay31015.c b/src/mess/machine/ay31015.c index ce0823f1af8..f9fd31dd5a0 100644 --- a/src/mess/machine/ay31015.c +++ b/src/mess/machine/ay31015.c @@ -84,8 +84,7 @@ typedef enum } state_t; -typedef struct _ay31015_t ay31015_t; -struct _ay31015_t +struct ay31015_t { const ay31015_config *config; diff --git a/src/mess/machine/ay31015.h b/src/mess/machine/ay31015.h index bd22c72be6a..78bd37ea790 100644 --- a/src/mess/machine/ay31015.h +++ b/src/mess/machine/ay31015.h @@ -49,8 +49,7 @@ typedef enum } ay31015_output_pin_t; -typedef struct _ay31015_config ay31015_config; -struct _ay31015_config +struct ay31015_config { ay31015_type_t type; /* Type of chip */ double transmitter_clock; /* TCP - pin 40 */ diff --git a/src/mess/machine/beta.c b/src/mess/machine/beta.c index 89ede09aacf..5731c7d84ef 100644 --- a/src/mess/machine/beta.c +++ b/src/mess/machine/beta.c @@ -17,8 +17,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _beta_disk_state beta_disk_state; -struct _beta_disk_state +struct beta_disk_state { UINT8 betadisk_status; UINT8 betadisk_active; diff --git a/src/mess/machine/cococart.h b/src/mess/machine/cococart.h index aab37e60bb9..a62dbbc56d4 100644 --- a/src/mess/machine/cococart.h +++ b/src/mess/machine/cococart.h @@ -41,8 +41,7 @@ enum _cococart_line_value }; typedef enum _cococart_line_value cococart_line_value; -typedef struct _coco_cartridge_line coco_cartridge_line; -struct _coco_cartridge_line +struct coco_cartridge_line { emu_timer *timer[TIMER_POOL]; int timer_index; diff --git a/src/mess/machine/ds1315.c b/src/mess/machine/ds1315.c index eadc093b102..561defee36d 100644 --- a/src/mess/machine/ds1315.c +++ b/src/mess/machine/ds1315.c @@ -22,8 +22,7 @@ typedef enum } ds1315_mode_t; -typedef struct _ds1315_t ds1315_t; -struct _ds1315_t +struct ds1315_t { int count; ds1315_mode_t mode; diff --git a/src/mess/machine/e05a03.c b/src/mess/machine/e05a03.c index e3b90bc9a71..e2c86c9e46a 100644 --- a/src/mess/machine/e05a03.c +++ b/src/mess/machine/e05a03.c @@ -12,8 +12,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _e05a03_state e05a03_state; -struct _e05a03_state +struct e05a03_state { /* 24-bit shift register, port 0x00, 0x01 and 0x02 */ UINT32 shift; diff --git a/src/mess/machine/e05a03.h b/src/mess/machine/e05a03.h index 15f1d847eae..2011145d06a 100644 --- a/src/mess/machine/e05a03.h +++ b/src/mess/machine/e05a03.h @@ -14,8 +14,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _e05a03_interface e05a03_interface; -struct _e05a03_interface +struct e05a03_interface { devcb_read8 in_data_func; diff --git a/src/mess/machine/er59256.c b/src/mess/machine/er59256.c index 58b6898201c..0dd06b49699 100644 --- a/src/mess/machine/er59256.c +++ b/src/mess/machine/er59256.c @@ -21,8 +21,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _er59256_t er59256_t; -struct _er59256_t +struct er59256_t { /* The actual memory */ UINT16 eerom[EEROM_WORDS]; diff --git a/src/mess/machine/hd63450.c b/src/mess/machine/hd63450.c index 63f05419047..26c1f1df0ee 100644 --- a/src/mess/machine/hd63450.c +++ b/src/mess/machine/hd63450.c @@ -6,8 +6,7 @@ #include "hd63450.h" -typedef struct _hd63450_regs hd63450_regs; -struct _hd63450_regs +struct hd63450_regs { // offsets in bytes unsigned char csr; // [00] Channel status register (R/W) unsigned char cer; // [01] Channel error register (R) @@ -29,8 +28,7 @@ struct _hd63450_regs unsigned char gcr; // [3f] General Control Register (R/W) }; -typedef struct _hd63450_t hd63450_t; -struct _hd63450_t +struct hd63450_t { hd63450_regs reg[4]; emu_timer* timer[4]; // for timing data reading/writing each channel diff --git a/src/mess/machine/hd63450.h b/src/mess/machine/hd63450.h index f1b42525e57..7ac030bdfec 100644 --- a/src/mess/machine/hd63450.h +++ b/src/mess/machine/hd63450.h @@ -4,8 +4,7 @@ #include "emu.h" -typedef struct _hd63450_interface hd63450_intf; -struct _hd63450_interface +struct hd63450_intf { const char *cpu_tag; attotime clock[4]; diff --git a/src/mess/machine/i8271.c b/src/mess/machine/i8271.c index 75564b776ed..f207abbc729 100644 --- a/src/mess/machine/i8271.c +++ b/src/mess/machine/i8271.c @@ -22,8 +22,7 @@ it is from cpu to fdc */ #define I8271_FLAGS_DATA_DIRECTION 0x02 -typedef struct _i8271_t i8271_t; -struct _i8271_t +struct i8271_t { int flags; int state; diff --git a/src/mess/machine/isa_gus.h b/src/mess/machine/isa_gus.h index 853248d2c0d..84e247dd4ff 100644 --- a/src/mess/machine/isa_gus.h +++ b/src/mess/machine/isa_gus.h @@ -62,7 +62,7 @@ #define IRQ_VOLUME_RAMP 0x40 #define IRQ_DRAM_TC_DMA 0x80 -struct _gus_voice +struct gus_voice { UINT8 voice_ctrl; UINT16 freq_ctrl; @@ -79,9 +79,7 @@ struct _gus_voice bool rollover; INT16 sample; // current sample data }; -typedef struct _gus_voice gus_voice; - -struct _gf1_interface +struct gf1_interface { devcb_write_line wave_irq_cb; devcb_write_line ramp_irq_cb; @@ -93,7 +91,6 @@ struct _gf1_interface devcb_write_line drq2_cb; devcb_write_line nmi_cb; }; -typedef struct _gf1_interface gf1_interface; class gf1_device : public device_t, diff --git a/src/mess/machine/kb_keytro.c b/src/mess/machine/kb_keytro.c index 235552fdb78..8af63d54735 100644 --- a/src/mess/machine/kb_keytro.c +++ b/src/mess/machine/kb_keytro.c @@ -81,8 +81,7 @@ are attached to two switches. The keys appear twice in the keyboard matrix. TYPE DEFINITIONS ***************************************************************************/ -typedef struct _kb_keytr_state kb_keytr_state; -struct _kb_keytr_state +struct kb_keytr_state { device_t *cpu; diff --git a/src/mess/machine/keyboard.c b/src/mess/machine/keyboard.c index e4834c2e34f..14215236509 100644 --- a/src/mess/machine/keyboard.c +++ b/src/mess/machine/keyboard.c @@ -188,10 +188,10 @@ void generic_keyboard_device::device_start() void generic_keyboard_device::device_config_complete() { - const _keyboard_interface *intf = reinterpret_cast<const _keyboard_interface *>(static_config()); + const keyboard_interface *intf = reinterpret_cast<const keyboard_interface *>(static_config()); if(intf != NULL) { - *static_cast<_keyboard_interface *>(this) = *intf; + *static_cast<keyboard_interface *>(this) = *intf; } else { diff --git a/src/mess/machine/keyboard.h b/src/mess/machine/keyboard.h index 5013d323cf6..ca734c576c0 100644 --- a/src/mess/machine/keyboard.h +++ b/src/mess/machine/keyboard.h @@ -8,8 +8,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _keyboard_interface keyboard_interface; -struct _keyboard_interface +struct keyboard_interface { devcb_write8 m_keyboard_cb; }; @@ -40,7 +39,7 @@ struct serial_keyboard_interface class generic_keyboard_device : public device_t, - public _keyboard_interface + public keyboard_interface { public: generic_keyboard_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock); diff --git a/src/mess/machine/kr2376.c b/src/mess/machine/kr2376.c index bfb832a0ec4..69a711dbbdb 100644 --- a/src/mess/machine/kr2376.c +++ b/src/mess/machine/kr2376.c @@ -64,8 +64,7 @@ static const UINT8 KR2376_KEY_CODES[3][8][11] = } }; -typedef struct _kr2376_t kr2376_t; -struct _kr2376_t +struct kr2376_t { const kr2376_interface *intf; int pins[41]; diff --git a/src/mess/machine/kr2376.h b/src/mess/machine/kr2376.h index 07c65fa5638..77abb9bb7da 100644 --- a/src/mess/machine/kr2376.h +++ b/src/mess/machine/kr2376.h @@ -79,8 +79,7 @@ typedef enum } kr2376_output_pin_t; /* interface */ -typedef struct _kr2376_interface kr2376_interface; -struct _kr2376_interface +struct kr2376_interface { /* The clock of the chip (Typical 50 kHz) */ int clock; diff --git a/src/mess/machine/mc6843.h b/src/mess/machine/mc6843.h index 8bd25d3d32a..f1e250b28e9 100644 --- a/src/mess/machine/mc6843.h +++ b/src/mess/machine/mc6843.h @@ -33,8 +33,7 @@ extern const device_type MC6843; /* ---------- configuration ------------ */ -typedef struct _mc6843_interface mc6843_interface; -struct _mc6843_interface +struct mc6843_interface { void ( * irq_func ) ( device_t *device, int state ); }; diff --git a/src/mess/machine/mc6846.h b/src/mess/machine/mc6846.h index 892340ef78e..567e0ec233e 100644 --- a/src/mess/machine/mc6846.h +++ b/src/mess/machine/mc6846.h @@ -32,8 +32,7 @@ extern const device_type MC6846; /* ---------- configuration ------------ */ -typedef struct _mc6846_interface mc6846_interface; -struct _mc6846_interface +struct mc6846_interface { /* CPU write to the outside through chip */ write8_device_func out_port_func; /* 8-bit output */ diff --git a/src/mess/machine/mc6854.h b/src/mess/machine/mc6854.h index a7a44cb8c7c..a89fb417bd6 100644 --- a/src/mess/machine/mc6854.h +++ b/src/mess/machine/mc6854.h @@ -53,8 +53,7 @@ extern const device_type MC6854; /* ---------- configuration ------------ */ -typedef struct _mc6854_interface mc6854_interface; -struct _mc6854_interface +struct mc6854_interface { devcb_write_line out_irq_func; /* interrupt request */ diff --git a/src/mess/machine/micropolis.c b/src/mess/machine/micropolis.c index 910ce8c0bf5..922a1d5b753 100644 --- a/src/mess/machine/micropolis.c +++ b/src/mess/machine/micropolis.c @@ -62,8 +62,7 @@ static const UINT8 track_SD[][2] = { TYPE DEFINITIONS ***************************************************************************/ -typedef struct _micropolis_state micropolis_state; -struct _micropolis_state +struct micropolis_state { /* register */ UINT8 data; diff --git a/src/mess/machine/micropolis.h b/src/mess/machine/micropolis.h index 90ddf72fd11..8fd7d27cc3e 100644 --- a/src/mess/machine/micropolis.h +++ b/src/mess/machine/micropolis.h @@ -45,8 +45,7 @@ extern const device_type MICROPOLIS; ***************************************************************************/ /* Interface */ -typedef struct _micropolis_interface micropolis_interface; -struct _micropolis_interface +struct micropolis_interface { devcb_read_line in_dden_func; devcb_write_line out_intrq_func; diff --git a/src/mess/machine/mm58274c.c b/src/mess/machine/mm58274c.c index d766dbd1a81..c5277dac462 100644 --- a/src/mess/machine/mm58274c.c +++ b/src/mess/machine/mm58274c.c @@ -21,9 +21,7 @@ #include "emu.h" #include "mm58274c.h" -typedef struct _mm58274c_t mm58274c_t; - -struct _mm58274c_t +struct mm58274c_t { const mm58274c_interface *intf; diff --git a/src/mess/machine/mm58274c.h b/src/mess/machine/mm58274c.h index 12dcb83fec1..a2ad6370f56 100644 --- a/src/mess/machine/mm58274c.h +++ b/src/mess/machine/mm58274c.h @@ -36,8 +36,7 @@ extern const device_type MM58274C; to 6 (saturday) and is needed to correctly retrieve the day-of-week from the host system clock. */ -typedef struct _mm58274c_interface mm58274c_interface; -struct _mm58274c_interface +struct mm58274c_interface { int mode24; /* 24/12 mode */ int day1; /* first day of week */ diff --git a/src/mess/machine/mos6530.c b/src/mess/machine/mos6530.c index dfd61a56285..00cd119475e 100644 --- a/src/mess/machine/mos6530.c +++ b/src/mess/machine/mos6530.c @@ -38,8 +38,7 @@ enum TYPE DEFINITIONS ***************************************************************************/ -typedef struct _mos6530_port mos6530_port; -struct _mos6530_port +struct mos6530_port { devcb_resolved_read8 in_port_func; devcb_resolved_write8 out_port_func; @@ -50,8 +49,7 @@ struct _mos6530_port }; -typedef struct _mos6530_state mos6530_state; -struct _mos6530_state +struct mos6530_state { devcb_resolved_write_line out_irq_func; diff --git a/src/mess/machine/mos6530.h b/src/mess/machine/mos6530.h index 653c1be9c01..54e7a1bd57d 100644 --- a/src/mess/machine/mos6530.h +++ b/src/mess/machine/mos6530.h @@ -69,8 +69,7 @@ extern const device_type MOS6530; TYPE DEFINITIONS ***************************************************************************/ -typedef struct _mos6530_interface mos6530_interface; -struct _mos6530_interface +struct mos6530_interface { devcb_read8 in_pa_func; devcb_write8 out_pa_func; diff --git a/src/mess/machine/nes_ines.c b/src/mess/machine/nes_ines.c index d7dfa7aa16d..547b9203895 100644 --- a/src/mess/machine/nes_ines.c +++ b/src/mess/machine/nes_ines.c @@ -6,8 +6,7 @@ ****************************************************************************************/ -typedef struct _nes_mmc nes_mmc; -struct _nes_mmc +struct nes_mmc { int iNesMapper; /* iNES Mapper # */ int pcb_id; diff --git a/src/mess/machine/nes_pcb.c b/src/mess/machine/nes_pcb.c index 1369d4f70e6..af45abbd1e8 100644 --- a/src/mess/machine/nes_pcb.c +++ b/src/mess/machine/nes_pcb.c @@ -4,8 +4,7 @@ ****************************************************************************************/ -typedef struct _nes_pcb nes_pcb; -struct _nes_pcb +struct nes_pcb { const char *pcb_name; int pcb_id; @@ -11894,8 +11893,7 @@ struct nes_memory_accessor const char *read_name; }; -typedef struct _nes_pcb_intf nes_pcb_intf; -struct _nes_pcb_intf +struct nes_pcb_intf { int mmc_pcb; nes_memory_accessor mmc_l; /* $4100-$5fff read/write routines */ diff --git a/src/mess/machine/null_modem.c b/src/mess/machine/null_modem.c index 4e2d7a6d0fe..c11bcf71da3 100644 --- a/src/mess/machine/null_modem.c +++ b/src/mess/machine/null_modem.c @@ -9,7 +9,7 @@ null_modem_device::null_modem_device(const machine_config &mconfig, const char * { } -static struct _bitbanger_config null_modem_image_config = +static bitbanger_config null_modem_image_config = { DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, null_modem_device, read), BITBANGER_MODEM, diff --git a/src/mess/machine/omti8621.c b/src/mess/machine/omti8621.c index 7c64e110ca4..a47754d57a5 100644 --- a/src/mess/machine/omti8621.c +++ b/src/mess/machine/omti8621.c @@ -128,8 +128,7 @@ enum { #define OMTI_CMD_READ_CONFIGURATION 0xec #define OMTI_CMD_INVALID_COMMAND 0xff -typedef struct _disk_data disk_data; -struct _disk_data +struct disk_data { device_t *device; UINT16 type; @@ -148,8 +147,7 @@ struct _disk_data UINT8 esdi_defect_list[256]; }; -typedef struct _omti8621_state omti8621_state; -struct _omti8621_state { +struct omti8621_state { device_t *device; omti8621_set_irq irq_handler; diff --git a/src/mess/machine/omti8621.h b/src/mess/machine/omti8621.h index aa1cc3c7602..d0569cab71a 100644 --- a/src/mess/machine/omti8621.h +++ b/src/mess/machine/omti8621.h @@ -22,8 +22,7 @@ typedef void (*omti8621_set_irq)(const running_machine*, int); -typedef struct _omti8621_config omti8621_config; -struct _omti8621_config { +struct omti8621_config { omti8621_set_irq set_irq; }; diff --git a/src/mess/machine/pc_lpt.c b/src/mess/machine/pc_lpt.c index 61a4d95f0d0..a0f36f7be87 100644 --- a/src/mess/machine/pc_lpt.c +++ b/src/mess/machine/pc_lpt.c @@ -21,8 +21,7 @@ static WRITE_LINE_DEVICE_HANDLER( pc_lpt_ack_w ); TYPE DEFINITIONS ***************************************************************************/ -typedef struct _pc_lpt_state pc_lpt_state; -struct _pc_lpt_state +struct pc_lpt_state { centronics_device *centronics; diff --git a/src/mess/machine/pc_lpt.h b/src/mess/machine/pc_lpt.h index 3c623f78294..5c955ba5007 100644 --- a/src/mess/machine/pc_lpt.h +++ b/src/mess/machine/pc_lpt.h @@ -15,8 +15,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _pc_lpt_interface pc_lpt_interface; -struct _pc_lpt_interface +struct pc_lpt_interface { devcb_write_line out_irq_func; }; diff --git a/src/mess/machine/pcf8593.c b/src/mess/machine/pcf8593.c index 4afb667aa8f..25a8c85fa81 100644 --- a/src/mess/machine/pcf8593.c +++ b/src/mess/machine/pcf8593.c @@ -42,8 +42,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _pcf8593_t pcf8593_t; -struct _pcf8593_t +struct pcf8593_t { UINT8 data[16]; int pin_scl, pin_sda, inp; diff --git a/src/mess/machine/pf10.c b/src/mess/machine/pf10.c index 815395bb53a..f187e246e08 100644 --- a/src/mess/machine/pf10.c +++ b/src/mess/machine/pf10.c @@ -18,8 +18,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _pf10_state pf10_state; -struct _pf10_state +struct pf10_state { UINT8 dummy; }; diff --git a/src/mess/machine/pf10.h b/src/mess/machine/pf10.h index 8e9b532dd5d..cb4da7aab49 100644 --- a/src/mess/machine/pf10.h +++ b/src/mess/machine/pf10.h @@ -17,8 +17,7 @@ ***************************************************************************/ #if 0 -typedef struct _pf10_interface pf10_interface; -struct _pf10_interface +struct pf10_interface { }; #endif diff --git a/src/mess/machine/s3c44b0.h b/src/mess/machine/s3c44b0.h index 8be2620954a..b0864be4079 100644 --- a/src/mess/machine/s3c44b0.h +++ b/src/mess/machine/s3c44b0.h @@ -63,35 +63,30 @@ extern const device_type S3C44B0; typedef UINT32 (*s3c44b0_gpio_port_r_func)( device_t *device, int port); typedef void (*s3c44b0_gpio_port_w_func)( device_t *device, int port, UINT32 data); -typedef struct _s3c44b0_interface_gpio s3c44b0_interface_gpio; -struct _s3c44b0_interface_gpio +struct s3c44b0_interface_gpio { s3c44b0_gpio_port_r_func port_r; s3c44b0_gpio_port_w_func port_w; }; -typedef struct _s3c44b0_interface_i2c s3c44b0_interface_i2c; -struct _s3c44b0_interface_i2c +struct s3c44b0_interface_i2c { write_line_device_func scl_w; read_line_device_func sda_r; write_line_device_func sda_w; }; -typedef struct _s3c44b0_interface_adc s3c44b0_interface_adc; -struct _s3c44b0_interface_adc +struct s3c44b0_interface_adc { read32_device_func data_r; }; -typedef struct _s3c44b0_interface_i2s s3c44b0_interface_i2s; -struct _s3c44b0_interface_i2s +struct s3c44b0_interface_i2s { write16_device_func data_w; }; -typedef struct _s3c44b0_interface s3c44b0_interface; -struct _s3c44b0_interface +struct s3c44b0_interface { s3c44b0_interface_gpio gpio; s3c44b0_interface_i2c i2c; diff --git a/src/mess/machine/smartmed.h b/src/mess/machine/smartmed.h index 0a384838d8d..c20ca010453 100644 --- a/src/mess/machine/smartmed.h +++ b/src/mess/machine/smartmed.h @@ -11,8 +11,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _smartmedia_cartslot_config smartmedia_cartslot_config; -struct _smartmedia_cartslot_config +struct smartmedia_cartslot_config { const char * interface; }; @@ -47,8 +46,7 @@ enum pointer_sm_mode_t #define NAND_CHIP_K9F1G08U0B { 5, { 0xEC, 0xF1, 0x00, 0x95, 0x40 }, 2048, 64, 64, 1024, 2, 2, 0 } /* K9F1G08U0B */ #define NAND_CHIP_K9LAG08U0M { 5, { 0xEC, 0xD5, 0x55, 0x25, 0x68 }, 2048, 64, 128, 8192, 2, 3, 0 } /* K9LAG08U0M */ -typedef struct _nand_chip nand_chip; -struct _nand_chip +struct nand_chip { int id_len; UINT8 id[5]; diff --git a/src/mess/machine/sst39vfx.c b/src/mess/machine/sst39vfx.c index bdba5c31c27..d9057fadc9b 100644 --- a/src/mess/machine/sst39vfx.c +++ b/src/mess/machine/sst39vfx.c @@ -18,8 +18,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _sst39vfx_t sst39vfx_t; -struct _sst39vfx_t +struct sst39vfx_t { UINT8 *data; UINT32 size; diff --git a/src/mess/machine/sst39vfx.h b/src/mess/machine/sst39vfx.h index 59fdf3ed75b..3fbdb852e6b 100644 --- a/src/mess/machine/sst39vfx.h +++ b/src/mess/machine/sst39vfx.h @@ -18,8 +18,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _sst39vfx_config sst39vfx_config; -struct _sst39vfx_config +struct sst39vfx_config { int cpu_datawidth; int cpu_endianess; diff --git a/src/mess/machine/terminal.c b/src/mess/machine/terminal.c index 1d0e1489b4e..3aa9214323c 100644 --- a/src/mess/machine/terminal.c +++ b/src/mess/machine/terminal.c @@ -333,10 +333,10 @@ void generic_terminal_device::device_start() void generic_terminal_device::device_config_complete() { - const _terminal_interface *intf = reinterpret_cast<const _terminal_interface *>(static_config()); + const terminal_interface *intf = reinterpret_cast<const terminal_interface *>(static_config()); if(intf != NULL) { - *static_cast<_terminal_interface *>(this) = *intf; + *static_cast<terminal_interface *>(this) = *intf; } else { diff --git a/src/mess/machine/terminal.h b/src/mess/machine/terminal.h index 95e1825fee4..8fd82b6f278 100644 --- a/src/mess/machine/terminal.h +++ b/src/mess/machine/terminal.h @@ -10,8 +10,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _terminal_interface terminal_interface; -struct _terminal_interface +struct terminal_interface { devcb_write8 m_keyboard_cb; }; @@ -49,7 +48,7 @@ struct serial_terminal_interface class generic_terminal_device : public device_t, - public _terminal_interface + public terminal_interface { public: generic_terminal_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock); diff --git a/src/mess/machine/tf20.c b/src/mess/machine/tf20.c index b198e350fb8..b5f6086ca4a 100644 --- a/src/mess/machine/tf20.c +++ b/src/mess/machine/tf20.c @@ -30,8 +30,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _tf20_state tf20_state; -struct _tf20_state +struct tf20_state { ram_device *ram; device_t *upd765a; diff --git a/src/mess/machine/tf20.h b/src/mess/machine/tf20.h index f31e0058b49..5910ac7a1fe 100644 --- a/src/mess/machine/tf20.h +++ b/src/mess/machine/tf20.h @@ -17,8 +17,7 @@ ***************************************************************************/ #if 0 -typedef struct _tf20_interface tf20_interface; -struct _tf20_interface +struct tf20_interface { }; #endif diff --git a/src/mess/machine/upd71071.c b/src/mess/machine/upd71071.c index 57a9e444315..18817a2d830 100644 --- a/src/mess/machine/upd71071.c +++ b/src/mess/machine/upd71071.c @@ -97,8 +97,7 @@ struct upd71071_reg UINT8 mask; }; -typedef struct _upd71071_t upd71071_t; -struct _upd71071_t +struct upd71071_t { struct upd71071_reg reg; int selected_channel; diff --git a/src/mess/machine/upd71071.h b/src/mess/machine/upd71071.h index fad69044281..b8dd084077d 100644 --- a/src/mess/machine/upd71071.h +++ b/src/mess/machine/upd71071.h @@ -3,8 +3,7 @@ #include "emu.h" -typedef struct _upd71071_interface upd71071_intf; -struct _upd71071_interface +struct upd71071_intf { const char* cputag; int clock; diff --git a/src/mess/machine/upd765.c b/src/mess/machine/upd765.c index 72acd93b342..fb2e2681782 100644 --- a/src/mess/machine/upd765.c +++ b/src/mess/machine/upd765.c @@ -84,8 +84,7 @@ typedef enum #define UPD765_BAD_MEDIA 0x100 -typedef struct _upd765_t upd765_t; -struct _upd765_t +struct upd765_t { devcb_resolved_write_line out_int_func; devcb_resolved_write_line out_drq_func; diff --git a/src/mess/tools/imgtool/filtbas.c b/src/mess/tools/imgtool/filtbas.c index 3f74211aa8e..43a7e106067 100644 --- a/src/mess/tools/imgtool/filtbas.c +++ b/src/mess/tools/imgtool/filtbas.c @@ -36,8 +36,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _basictoken_tableent basictoken_tableent; -struct _basictoken_tableent +struct basictoken_tableent { UINT8 shift; UINT8 base; @@ -47,8 +46,7 @@ struct _basictoken_tableent -typedef struct _basictokens basictokens; -struct _basictokens +struct basictokens { UINT16 baseaddress; unsigned int skip_bytes : 15; diff --git a/src/mess/tools/imgtool/imgtool.h b/src/mess/tools/imgtool/imgtool.h index fabc150c6f8..7a010e6fb5f 100644 --- a/src/mess/tools/imgtool/imgtool.h +++ b/src/mess/tools/imgtool/imgtool.h @@ -50,8 +50,7 @@ enum * --------------------------------------------------------------------------- */ -typedef struct _imgtool_module_features imgtool_module_features; -struct _imgtool_module_features +struct imgtool_module_features { unsigned int supports_create : 1; unsigned int supports_open : 1; @@ -60,8 +59,7 @@ struct _imgtool_module_features unsigned int is_read_only : 1; }; -typedef struct _imgtool_partition_features imgtool_partition_features; -struct _imgtool_partition_features +struct imgtool_partition_features { unsigned int supports_reading : 1; unsigned int supports_writing : 1; diff --git a/src/mess/tools/imgtool/library.h b/src/mess/tools/imgtool/library.h index d7853bf5d08..6f8df279ea7 100644 --- a/src/mess/tools/imgtool/library.h +++ b/src/mess/tools/imgtool/library.h @@ -241,8 +241,7 @@ struct _imgtool_class -typedef struct _imgtool_partition_info imgtool_partition_info; -struct _imgtool_partition_info +struct imgtool_partition_info { imgtool_get_info get_info; UINT64 base_block; @@ -334,8 +333,7 @@ char *imgtool_temp_str(void); -typedef struct _imgtool_module imgtool_module; -struct _imgtool_module +struct imgtool_module { imgtool_module *previous; imgtool_module *next; diff --git a/src/mess/tools/imgtool/modules/amiga.c b/src/mess/tools/imgtool/modules/amiga.c index 06d47f7d748..c2c9f7cb993 100644 --- a/src/mess/tools/imgtool/modules/amiga.c +++ b/src/mess/tools/imgtool/modules/amiga.c @@ -67,8 +67,7 @@ typedef enum } sec_type; -typedef struct _amiga_date amiga_date; -struct _amiga_date +struct amiga_date { UINT32 days; /* days since 1 jan 78 */ UINT32 mins; /* minutes past midnight */ @@ -76,8 +75,7 @@ struct _amiga_date }; -typedef struct _root_block root_block; -struct _root_block +struct root_block { UINT32 ht_size; /* Hash table size in long */ UINT32 chksum; /* Rootblock checksum */ @@ -93,24 +91,21 @@ struct _root_block }; -typedef struct _bitmap_block bitmap_block; -struct _bitmap_block +struct bitmap_block { UINT32 chksum; /* checksum, normal algorithm */ UINT32 map[MSIZE]; /* bitmap */ }; -typedef struct _bitmap_ext_block bitmap_ext_block; -struct _bitmap_ext_block +struct bitmap_ext_block { UINT32 map[MSIZE]; /* bitmap */ UINT32 next; /* next extension block */ }; -typedef struct _file_block file_block; -struct _file_block +struct file_block { UINT32 header_key; /* self pointer (to this block) */ UINT32 high_seq; /* number of data block ptr stored here */ @@ -134,8 +129,7 @@ struct _file_block }; -typedef struct _file_ext_block file_ext_block; -struct _file_ext_block +struct file_ext_block { UINT32 header_key; /* self pointer (to this block) */ UINT32 high_seq; /* number of data block ptr stored here */ @@ -146,8 +140,7 @@ struct _file_ext_block }; -typedef struct _data_block data_block; -struct _data_block +struct data_block { UINT32 header_key; /* self pointer (to this block) */ UINT32 seq_num; /* file data block number */ @@ -158,8 +151,7 @@ struct _data_block }; -typedef struct _dir_block dir_block; -struct _dir_block +struct dir_block { UINT32 header_key; /* self pointer (to this block) */ UINT32 chksum; /* same algorithm as rootblock */ @@ -179,8 +171,7 @@ struct _dir_block }; -typedef struct _hardlink_block hardlink_block; -struct _hardlink_block +struct hardlink_block { UINT32 header_key; /* self pointer (to this block) */ UINT32 chksum; /* same algorithm as rootblock */ @@ -198,8 +189,7 @@ struct _hardlink_block }; -typedef struct _softlink_block softlink_block; -struct _softlink_block +struct softlink_block { UINT32 header_key; /* self pointer (to this block) */ UINT32 chksum; /* same algorithm as rootblock */ @@ -216,8 +206,7 @@ struct _softlink_block /* Basic Amiga floppy disk image info */ -typedef struct _amiga_floppy amiga_floppy; -struct _amiga_floppy +struct amiga_floppy { imgtool_stream *stream; UINT8 sectors; @@ -225,8 +214,7 @@ struct _amiga_floppy /* iterator used to walk through directory entries */ -typedef struct _amiga_iterator amiga_iterator; -struct _amiga_iterator +struct amiga_iterator { unsigned int index; /* current file index */ int block; /* block number we are iterating */ diff --git a/src/mess/tools/imgtool/modules/cybiko.c b/src/mess/tools/imgtool/modules/cybiko.c index 5b338a58c5d..ec4ef2504b2 100644 --- a/src/mess/tools/imgtool/modules/cybiko.c +++ b/src/mess/tools/imgtool/modules/cybiko.c @@ -10,22 +10,19 @@ #include <zlib.h> -typedef struct _cybiko_file_system cybiko_file_system; -struct _cybiko_file_system +struct cybiko_file_system { imgtool_stream *stream; UINT32 page_count, page_size, block_count_boot, block_count_file; UINT16 write_count; }; -typedef struct _cybiko_iter cybiko_iter; -struct _cybiko_iter +struct cybiko_iter { UINT16 block; }; -typedef struct _cfs_file cfs_file; -struct _cfs_file +struct cfs_file { char name[64]; // name of the file UINT32 date; // date/time of the file (seconds since 1900/01/01) diff --git a/src/mess/tools/imgtool/modules/cybikoxt.c b/src/mess/tools/imgtool/modules/cybikoxt.c index a5a587e5758..c4649a46475 100644 --- a/src/mess/tools/imgtool/modules/cybikoxt.c +++ b/src/mess/tools/imgtool/modules/cybikoxt.c @@ -10,22 +10,19 @@ #include <zlib.h> -typedef struct _cybiko_file_system cybiko_file_system; -struct _cybiko_file_system +struct cybiko_file_system { imgtool_stream *stream; UINT32 page_count, page_size, block_count_boot, block_count_file; UINT16 write_count; }; -typedef struct _cybiko_iter cybiko_iter; -struct _cybiko_iter +struct cybiko_iter { UINT16 block; }; -typedef struct _cfs_file cfs_file; -struct _cfs_file +struct cfs_file { char name[64]; // name of the file UINT32 date; // date/time of the file (seconds since 1900/01/01) diff --git a/src/mess/tools/imgtool/modules/fat.c b/src/mess/tools/imgtool/modules/fat.c index a60ac7a0603..0359582cd96 100644 --- a/src/mess/tools/imgtool/modules/fat.c +++ b/src/mess/tools/imgtool/modules/fat.c @@ -144,8 +144,7 @@ #define LOG(x) -typedef struct _fat_partition_info fat_partition_info; -struct _fat_partition_info +struct fat_partition_info { UINT32 fat_bits; UINT32 sectors_per_cluster; @@ -158,8 +157,7 @@ struct _fat_partition_info UINT32 total_clusters; }; -typedef struct _fat_file fat_file; -struct _fat_file +struct fat_file { unsigned int root : 1; unsigned int directory : 1; @@ -174,8 +172,7 @@ struct _fat_file UINT32 dirent_sector_offset; }; -typedef struct _fat_dirent fat_dirent; -struct _fat_dirent +struct fat_dirent { char long_filename[512]; char short_filename[13]; @@ -189,16 +186,14 @@ struct _fat_dirent time_t lastmodified_time; }; -typedef struct _fat_freeentry_info fat_freeentry_info; -struct _fat_freeentry_info +struct fat_freeentry_info { UINT32 required_size; UINT32 candidate_position; UINT32 position; }; -typedef struct _fat_mediatype fat_mediatype; -struct _fat_mediatype +struct fat_mediatype { UINT8 media_descriptor; UINT8 heads; diff --git a/src/mess/tools/imgtool/modules/os9.c b/src/mess/tools/imgtool/modules/os9.c index e1d174a843b..3d4dafe8d97 100644 --- a/src/mess/tools/imgtool/modules/os9.c +++ b/src/mess/tools/imgtool/modules/os9.c @@ -20,8 +20,7 @@ typedef enum CREATE_DIR } creation_policy_t; -typedef struct _os9_diskinfo os9_diskinfo; -struct _os9_diskinfo +struct os9_diskinfo { UINT32 total_sectors; UINT32 sectors_per_track; diff --git a/src/mess/tools/imgtool/modules/pc_hard.c b/src/mess/tools/imgtool/modules/pc_hard.c index 8d4aa41c8bc..e271b1f24be 100644 --- a/src/mess/tools/imgtool/modules/pc_hard.c +++ b/src/mess/tools/imgtool/modules/pc_hard.c @@ -70,8 +70,7 @@ static const char fat32_string[8] = { 'F', 'A', 'T', '3', '2', ' ', ' ', ' ' }; extern void fat_get_info(const imgtool_class *imgclass, UINT32 state, union imgtoolinfo *info); -typedef struct _pc_chd_image_info pc_chd_image_info; -struct _pc_chd_image_info +struct pc_chd_image_info { struct mess_hard_disk_file hard_disk; diff --git a/src/mess/tools/imgtool/modules/prodos.c b/src/mess/tools/imgtool/modules/prodos.c index 8cac93713d8..fa8e026f849 100644 --- a/src/mess/tools/imgtool/modules/prodos.c +++ b/src/mess/tools/imgtool/modules/prodos.c @@ -131,8 +131,7 @@ #define ROOTDIR_BLOCK 2 #define BLOCK_SIZE 512 -typedef struct _prodos_diskinfo prodos_diskinfo; -struct _prodos_diskinfo +struct prodos_diskinfo { imgtoolerr_t (*load_block)(imgtool_image *image, int block, void *buffer); imgtoolerr_t (*save_block)(imgtool_image *image, int block, const void *buffer); @@ -142,16 +141,14 @@ struct _prodos_diskinfo UINT16 total_blocks; }; -typedef struct _prodos_direnum prodos_direnum; -struct _prodos_direnum +struct prodos_direnum { UINT32 block; UINT32 index; UINT8 block_data[BLOCK_SIZE]; }; -typedef struct _prodos_dirent prodos_dirent; -struct _prodos_dirent +struct prodos_dirent { char filename[16]; UINT8 storage_type; diff --git a/src/mess/video/apollo.c b/src/mess/video/apollo.c index bc8fb256c72..bf74247e929 100644 --- a/src/mess/video/apollo.c +++ b/src/mess/video/apollo.c @@ -71,8 +71,7 @@ #define CR2_SHIFT_ACCESS 0x02 #define CR2_PLANE_ACCESS 0x03 -typedef struct _screen_data screen_data_t; -struct _screen_data { +struct screen_data_t { UINT16 width; UINT16 height; UINT16 buffer_width; diff --git a/src/mess/video/crt.h b/src/mess/video/crt.h index 4131b48eb95..9c5d2917cf7 100644 --- a/src/mess/video/crt.h +++ b/src/mess/video/crt.h @@ -12,8 +12,7 @@ /*----------- defined in video/crt.c -----------*/ -typedef struct _crt_interface crt_interface; -struct _crt_interface +struct crt_interface { int num_levels; int offset_x, offset_y; diff --git a/src/mess/video/crtc_ega.h b/src/mess/video/crtc_ega.h index 3a25b6e1095..0550a519758 100644 --- a/src/mess/video/crtc_ega.h +++ b/src/mess/video/crtc_ega.h @@ -36,8 +36,7 @@ typedef void (*crtc_ega_end_update_func)(crtc_ega_device *device, bitmap_ind16 & /* interface */ -typedef struct _crtc_ega_interface crtc_ega_interface; -struct _crtc_ega_interface +struct crtc_ega_interface { const char *m_screen_tag; /* screen we are acting on */ int m_hpixels_per_column; /* number of pixels per video memory address */ diff --git a/src/mess/video/dl1416.c b/src/mess/video/dl1416.c index aac3b5eee25..8a25fc74d9e 100644 --- a/src/mess/video/dl1416.c +++ b/src/mess/video/dl1416.c @@ -95,8 +95,7 @@ static const int dl1416t_segments[128] = { TYPE DEFINITIONS ***************************************************************************/ -typedef struct _dl1416_state dl1416_state; -struct _dl1416_state +struct dl1416_state { int write_enable; int chip_enable; diff --git a/src/mess/video/dl1416.h b/src/mess/video/dl1416.h index a0fd4766bc7..8a99f79540b 100644 --- a/src/mess/video/dl1416.h +++ b/src/mess/video/dl1416.h @@ -22,8 +22,7 @@ typedef void (*dl1416_update_func)(device_t *device, int digit, int data); -typedef struct _dl1416_interface dl1416_interface; -struct _dl1416_interface +struct dl1416_interface { dl1416_update_func update; }; diff --git a/src/mess/video/gime.h b/src/mess/video/gime.h index 638f30a7151..abc31d57a95 100644 --- a/src/mess/video/gime.h +++ b/src/mess/video/gime.h @@ -21,8 +21,7 @@ //************************************************************************** /* interface */ -typedef struct _gime_interface gime_interface; -struct _gime_interface +struct gime_interface { const char *m_screen_tag; /* screen we are acting on */ const char *m_maincpu_tag; /* tag of main CPU */ diff --git a/src/mess/video/k1ge.h b/src/mess/video/k1ge.h index 60e4ea0833d..d708af46562 100644 --- a/src/mess/video/k1ge.h +++ b/src/mess/video/k1ge.h @@ -52,8 +52,7 @@ extern const device_type K2GE; MCFG_DEVICE_CONFIG( _config ) -typedef struct _k1ge_interface k1ge_interface; -struct _k1ge_interface +struct k1ge_interface { const char *screen_tag; /* screen we are drawing on */ const char *vram_tag; /* memory region we will use for video ram */ diff --git a/src/mess/video/mc6847.h b/src/mess/video/mc6847.h index 7d8b8db6b2b..b8d6527b519 100644 --- a/src/mess/video/mc6847.h +++ b/src/mess/video/mc6847.h @@ -40,8 +40,7 @@ MCFG_SCREEN_VBLANK_TIME(0) \ /* interface */ -typedef struct _mc6847_interface mc6847_interface; -struct _mc6847_interface +struct mc6847_interface { /* screen we are acting on */ const char *m_screen_tag; diff --git a/src/mess/video/newport.c b/src/mess/video/newport.c index 94fbf944765..72bdffc4059 100644 --- a/src/mess/video/newport.c +++ b/src/mess/video/newport.c @@ -186,8 +186,7 @@ typedef struct UINT32 nPalette[0x10000]; } CMAP_t; -typedef struct _newport_video_t newport_video_t; -struct _newport_video_t +struct newport_video_t { VC2_t VC2; XMAP_t XMAP0; diff --git a/src/mess/video/vdc8563.c b/src/mess/video/vdc8563.c index eda3809403c..38ca0c94e37 100644 --- a/src/mess/video/vdc8563.c +++ b/src/mess/video/vdc8563.c @@ -22,8 +22,7 @@ #include "emu.h" #include "video/vdc8563.h" -typedef struct _vdc8563_state vdc8563_state; -struct _vdc8563_state +struct vdc8563_state { screen_device *screen; diff --git a/src/mess/video/vdc8563.h b/src/mess/video/vdc8563.h index 96a182ca9c2..d2cf2ed6ebe 100644 --- a/src/mess/video/vdc8563.h +++ b/src/mess/video/vdc8563.h @@ -18,8 +18,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _vdc8563_interface vdc8563_interface; -struct _vdc8563_interface +struct vdc8563_interface { const char *screen; int ram16konly; diff --git a/src/mess/video/vic4567.c b/src/mess/video/vic4567.c index cd13bb7acc7..c74c689fe53 100644 --- a/src/mess/video/vic4567.c +++ b/src/mess/video/vic4567.c @@ -31,8 +31,7 @@ struct vic3_sprite UINT8 bitmap[8][SPRITE_BASE_X_SIZE * 2 / 8 + 1 /*for simplier sprite collision detection*/]; }; -typedef struct _vic3_state vic3_state; -struct _vic3_state +struct vic3_state { vic3_type type; diff --git a/src/mess/video/vic4567.h b/src/mess/video/vic4567.h index fd0f53a39c3..e77f980b13c 100644 --- a/src/mess/video/vic4567.h +++ b/src/mess/video/vic4567.h @@ -32,8 +32,7 @@ typedef enum VIC4567_PAL } vic3_type; -typedef struct _vic3_interface vic3_interface; -struct _vic3_interface +struct vic3_interface { const char *screen; const char *cpu; diff --git a/src/mess/video/vic6567.c b/src/mess/video/vic6567.c index 3c4b5d7c82d..39f48b4a062 100644 --- a/src/mess/video/vic6567.c +++ b/src/mess/video/vic6567.c @@ -74,8 +74,7 @@ #include "emu.h" #include "video/vic6567.h" -typedef struct _vic2_state vic2_state; -struct _vic2_state +struct vic2_state { vic2_type type; diff --git a/src/mess/video/vic6567.h b/src/mess/video/vic6567.h index c9f1885f5bd..153f47a95c3 100644 --- a/src/mess/video/vic6567.h +++ b/src/mess/video/vic6567.h @@ -22,8 +22,7 @@ typedef enum VIC8566 // VIC IIe PAL } vic2_type; -typedef struct _vic2_interface vic2_interface; -struct _vic2_interface +struct vic2_interface { const char *screen; const char *cpu; diff --git a/src/mess/video/vtvideo.c b/src/mess/video/vtvideo.c index 87f24fb1097..0fa10e2c4b8 100644 --- a/src/mess/video/vtvideo.c +++ b/src/mess/video/vtvideo.c @@ -25,8 +25,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef struct _vt_video_t vt_video_t; -struct _vt_video_t +struct vt_video_t { devcb_resolved_read8 in_ram_func; devcb_resolved_write8 clear_video_interrupt; diff --git a/src/mess/video/vtvideo.h b/src/mess/video/vtvideo.h index 18af46122dc..dd19e778ba9 100644 --- a/src/mess/video/vtvideo.h +++ b/src/mess/video/vtvideo.h @@ -48,8 +48,7 @@ extern const device_type VT100_VIDEO; TYPE DEFINITIONS ***************************************************************************/ -typedef struct _vt_video_interface vt_video_interface; -struct _vt_video_interface +struct vt_video_interface { const char *screen_tag; /* screen we are acting on */ const char *char_rom_region_tag; /* character rom region */ diff --git a/src/osd/osdcore.h b/src/osd/osdcore.h index a34bbf2a705..25cee8510eb 100644 --- a/src/osd/osdcore.h +++ b/src/osd/osdcore.h @@ -281,8 +281,7 @@ typedef struct _osd_directory osd_directory; /* osd_directory_entry contains basic information about a file when iterating through */ /* a directory */ -typedef struct _osd_directory_entry osd_directory_entry; -struct _osd_directory_entry +struct osd_directory_entry { const char * name; /* name of the entry */ osd_dir_entry_type type; /* type of the entry */ diff --git a/src/osd/sdl/debugwin.c b/src/osd/sdl/debugwin.c index c4e4330c4b4..fb99313c38a 100644 --- a/src/osd/sdl/debugwin.c +++ b/src/osd/sdl/debugwin.c @@ -58,8 +58,7 @@ typedef struct hentry { typedef struct _win_i win_i; -typedef struct _edit edit; -struct _edit { +struct edit { GtkEntry *edit_w; struct hentry *h, *ch; char *hold; diff --git a/src/osd/sdl/draw13.c b/src/osd/sdl/draw13.c index 4cf0a6126e0..ab41b544391 100644 --- a/src/osd/sdl/draw13.c +++ b/src/osd/sdl/draw13.c @@ -58,8 +58,7 @@ enum //============================================================ -typedef struct _quad_setup_data quad_setup_data; -struct _quad_setup_data +struct quad_setup_data { INT32 dudx, dvdx, dudy, dvdy; INT32 startu, startv; @@ -70,8 +69,7 @@ typedef struct _texture_info texture_info; typedef void (*texture_copy_func)(texture_info *texture, const render_texinfo *texsource); -typedef struct _copy_info copy_info; -struct _copy_info { +struct copy_info { int src_fmt; Uint32 dst_fmt; int dst_bpp; @@ -117,8 +115,7 @@ struct _texture_info }; /* sdl_info is the information about SDL for the current screen */ -typedef struct _sdl_info sdl_info; -struct _sdl_info +struct sdl_info { INT32 blittimer; UINT32 extra_flags; diff --git a/src/osd/sdl/drawogl.c b/src/osd/sdl/drawogl.c index be744ea0003..f34f8732959 100644 --- a/src/osd/sdl/drawogl.c +++ b/src/osd/sdl/drawogl.c @@ -213,8 +213,7 @@ struct _texture_info }; /* sdl_info is the information about SDL for the current screen */ -typedef struct _sdl_info sdl_info; -struct _sdl_info +struct sdl_info { INT32 blittimer; UINT32 extra_flags; @@ -269,8 +268,7 @@ struct _sdl_info }; /* line_aa_step is used for drawing antialiased lines */ -typedef struct _line_aa_step line_aa_step; -struct _line_aa_step +struct line_aa_step { float xoffs, yoffs; // X/Y deltas float weight; // weight contribution diff --git a/src/osd/sdl/drawsdl.c b/src/osd/sdl/drawsdl.c index 8fa25bdd148..2bb1a809b43 100644 --- a/src/osd/sdl/drawsdl.c +++ b/src/osd/sdl/drawsdl.c @@ -46,8 +46,7 @@ typedef struct _sdl_scale_mode sdl_scale_mode; #endif /* sdl_info is the information about SDL for the current screen */ -typedef struct _sdl_info sdl_info; -struct _sdl_info +struct sdl_info { INT32 blittimer; UINT32 extra_flags; diff --git a/src/osd/sdl/gl_shader_mgr.h b/src/osd/sdl/gl_shader_mgr.h index 9eee4b1e757..595e0a68e49 100644 --- a/src/osd/sdl/gl_shader_mgr.h +++ b/src/osd/sdl/gl_shader_mgr.h @@ -22,8 +22,7 @@ typedef enum { // old code passed sdl_info * to functions here // however the parameter was not used // changed interface to more generic one. -typedef struct _glsl_shader_info glsl_shader_info; -struct _glsl_shader_info +struct glsl_shader_info { int dummy; // avoid compiler breakage }; diff --git a/src/osd/sdl/input.c b/src/osd/sdl/input.c index 77f7f4a19cb..75aa92fcdd6 100644 --- a/src/osd/sdl/input.c +++ b/src/osd/sdl/input.c @@ -88,8 +88,7 @@ static int proximity_out_type = INVALID_EVENT_TYPE; //============================================================ // state information for a keyboard -typedef struct _keyboard_state keyboard_state; -struct _keyboard_state +struct keyboard_state { INT32 state[0x3ff]; // must be INT32! INT8 oldkey[MAX_KEYS]; @@ -98,8 +97,7 @@ struct _keyboard_state // state information for a mouse -typedef struct _mouse_state mouse_state; -struct _mouse_state +struct mouse_state { INT32 lX, lY; INT32 buttons[MAX_BUTTONS]; @@ -107,8 +105,7 @@ struct _mouse_state // state information for a joystick; DirectInput state must be first element -typedef struct _joystick_state joystick_state; -struct _joystick_state +struct joystick_state { SDL_Joystick *device; INT32 axes[MAX_AXES]; @@ -119,8 +116,7 @@ struct _joystick_state #if (USE_XINPUT) // state information for a lightgun -typedef struct _lightgun_state lightgun_state; -struct _lightgun_state +struct lightgun_state { INT32 lX, lY; INT32 buttons[MAX_BUTTONS]; @@ -131,8 +127,7 @@ struct _lightgun_state #endif // generic device information -typedef struct _device_info device_info; -struct _device_info +struct device_info { // device information device_info ** head; @@ -187,8 +182,7 @@ static device_info * joystick_list; // joystick mapper -typedef struct _device_map_t device_map_t; -struct _device_map_t +struct device_map_t { struct { char *name; @@ -236,8 +230,7 @@ static device_info *generic_device_find_index(device_info *devlist_head, int ind //============================================================ // master keyboard translation table -typedef struct _kt_table kt_table; -struct _kt_table { +struct kt_table { input_item_id mame_key; INT32 sdl_key; //const char * vkey; @@ -503,8 +496,7 @@ static kt_table sdl_key_trans_table[] = }; #endif -typedef struct _key_lookup_table key_lookup_table; -struct _key_lookup_table +struct key_lookup_table { int code; const char *name; diff --git a/src/osd/sdl/sdlsync_sdl.c b/src/osd/sdl/sdlsync_sdl.c index 09107dbd401..734cbcc67f0 100644 --- a/src/osd/sdl/sdlsync_sdl.c +++ b/src/osd/sdl/sdlsync_sdl.c @@ -28,8 +28,7 @@ #else #define LOG( x ) #endif -typedef struct _hidden_mutex_t hidden_mutex_t; -struct _hidden_mutex_t { +struct hidden_mutex_t { SDL_mutex * id; volatile INT32 locked; volatile INT32 threadid; diff --git a/src/osd/sdl/sdlsync_tc.c b/src/osd/sdl/sdlsync_tc.c index fc7b7c32cce..d1ad72e9bde 100644 --- a/src/osd/sdl/sdlsync_tc.c +++ b/src/osd/sdl/sdlsync_tc.c @@ -34,8 +34,7 @@ #include <signal.h> #include <sys/time.h> -typedef struct _hidden_mutex_t hidden_mutex_t; -struct _hidden_mutex_t { +struct hidden_mutex_t { pthread_mutex_t id; }; diff --git a/src/osd/sdl/sdlwork.c b/src/osd/sdl/sdlwork.c index 74cb625d755..df9aae7efbe 100644 --- a/src/osd/sdl/sdlwork.c +++ b/src/osd/sdl/sdlwork.c @@ -71,8 +71,7 @@ int osd_num_processors = 0; // TYPE DEFINITIONS //============================================================ -typedef struct _work_thread_info work_thread_info; -struct _work_thread_info +struct work_thread_info { osd_work_queue * queue; // pointer back to the queue osd_thread * handle; // handle to the thread diff --git a/src/osd/sdl/testkeys.c b/src/osd/sdl/testkeys.c index d7ba3352e5b..2530948dfe7 100644 --- a/src/osd/sdl/testkeys.c +++ b/src/osd/sdl/testkeys.c @@ -19,9 +19,7 @@ #include "unicode.h" -typedef struct _key_lookup_table key_lookup_table; - -struct _key_lookup_table +struct key_lookup_table { int code; const char *name; diff --git a/src/osd/sdl/video.h b/src/osd/sdl/video.h index e143abd7324..38648c68ee8 100644 --- a/src/osd/sdl/video.h +++ b/src/osd/sdl/video.h @@ -50,15 +50,13 @@ enum { // TYPE DEFINITIONS //============================================================ -typedef struct _sdl_mode sdl_mode; -struct _sdl_mode +struct sdl_mode { int width; int height; }; -typedef struct _sdl_monitor_info sdl_monitor_info; -struct _sdl_monitor_info +struct sdl_monitor_info { sdl_monitor_info * next; // pointer to next monitor in list #ifdef PTR64 @@ -75,8 +73,7 @@ struct _sdl_monitor_info }; -typedef struct _sdl_window_config sdl_window_config; -struct _sdl_window_config +struct sdl_window_config { float aspect; // decoded aspect ratio int width; // decoded width @@ -88,8 +85,7 @@ struct _sdl_window_config }; -typedef struct _sdl_video_config sdl_video_config; -struct _sdl_video_config +struct sdl_video_config { // performance options int novideo; // don't draw, for pure CPU benchmarking diff --git a/src/osd/sdl/window.c b/src/osd/sdl/window.c index 933ad22fa1e..ada463b042d 100644 --- a/src/osd/sdl/window.c +++ b/src/osd/sdl/window.c @@ -100,8 +100,7 @@ static SDL_threadID window_threadid; static sdl_draw_info draw; -typedef struct _worker_param worker_param; -struct _worker_param { +struct worker_param { running_machine &machine() const { assert(m_machine != NULL); return *m_machine; } sdl_window_info *window; render_primitive_list *list; diff --git a/src/osd/sdl/window.h b/src/osd/sdl/window.h index b5d98aaa891..352ed0d17e4 100644 --- a/src/osd/sdl/window.h +++ b/src/osd/sdl/window.h @@ -32,8 +32,7 @@ typedef UINT32 HashT; // TYPE DEFINITIONS //============================================================ -typedef struct _sdl_window_info sdl_window_info; -struct _sdl_window_info +struct sdl_window_info { // Pointer to next window sdl_window_info * next; @@ -101,8 +100,7 @@ struct _sdl_window_info #endif }; -typedef struct _sdl_draw_info sdl_draw_info; -struct _sdl_draw_info +struct sdl_draw_info { void (*exit)(void); void (*attach)(sdl_draw_info *info, sdl_window_info *window); diff --git a/src/osd/windows/d3dcomm.h b/src/osd/windows/d3dcomm.h index 2b1e2c9defd..fedcd6ebbac 100644 --- a/src/osd/windows/d3dcomm.h +++ b/src/osd/windows/d3dcomm.h @@ -53,8 +53,7 @@ //============================================================ /* d3d_texture_info holds information about a texture */ -typedef struct _d3d_texture_info d3d_texture_info; -struct _d3d_texture_info +struct d3d_texture_info { d3d_texture_info * next; // next texture in the list d3d_texture_info * prev; // prev texture in the list @@ -79,8 +78,7 @@ struct _d3d_texture_info /* d3d_poly_info holds information about a single polygon/d3d primitive */ -typedef struct _d3d_poly_info d3d_poly_info; -struct _d3d_poly_info +struct d3d_poly_info { D3DPRIMITIVETYPE type; // type of primitive UINT32 count; // total number of primitives @@ -92,8 +90,7 @@ struct _d3d_poly_info /* d3d_vertex describes a single vertex */ -typedef struct _d3d_vertex d3d_vertex; -struct _d3d_vertex +struct d3d_vertex { float x, y, z; // X,Y,Z coordinates float rhw; // RHW when no HLSL, padding when HLSL @@ -103,8 +100,7 @@ struct _d3d_vertex /* line_aa_step is used for drawing antialiased lines */ -typedef struct _line_aa_step line_aa_step; -struct _line_aa_step +struct line_aa_step { float xoffs, yoffs; // X/Y deltas float weight; // weight contribution diff --git a/src/osd/windows/d3dhlsl.h b/src/osd/windows/d3dhlsl.h index a723272d73a..9a82fff3daf 100644 --- a/src/osd/windows/d3dhlsl.h +++ b/src/osd/windows/d3dhlsl.h @@ -52,8 +52,7 @@ /* hlsl_options is the information about runtime-mutable Direct3D HLSL options */ /* in the future this will be moved into an OSD/emu shared buffer */ -typedef struct _hlsl_options hlsl_options; -struct _hlsl_options +struct hlsl_options { bool params_dirty; float shadow_mask_alpha; diff --git a/src/osd/windows/d3dintf.h b/src/osd/windows/d3dintf.h index 2e5125670d8..ae4a84d4b6e 100644 --- a/src/osd/windows/d3dintf.h +++ b/src/osd/windows/d3dintf.h @@ -88,8 +88,7 @@ typedef D3DMATRIX d3d_matrix; // Abstracted presentation parameters //============================================================ -typedef struct _d3d_present_parameters d3d_present_parameters; -struct _d3d_present_parameters +struct d3d_present_parameters { UINT BackBufferWidth; UINT BackBufferHeight; @@ -112,8 +111,7 @@ struct _d3d_present_parameters // Abstracted device identifier //============================================================ -typedef struct _d3d_adapter_identifier d3d_adapter_identifier; -struct _d3d_adapter_identifier +struct d3d_adapter_identifier { char Driver[512]; char Description[512]; @@ -155,8 +153,7 @@ typedef enum _d3d_caps_index d3d_caps_index; // Direct3D interfaces //============================================================ -typedef struct _d3d_interface d3d_interface; -struct _d3d_interface +struct d3d_interface { HRESULT (*check_device_format)(d3d *d3dptr, UINT adapter, D3DDEVTYPE devtype, D3DFORMAT adapterformat, DWORD usage, D3DRESOURCETYPE restype, D3DFORMAT format); HRESULT (*check_device_type)(d3d *d3dptr, UINT adapter, D3DDEVTYPE devtype, D3DFORMAT format, D3DFORMAT backformat, BOOL windowed); @@ -176,8 +173,7 @@ struct _d3d_interface // Direct3DDevice interfaces //============================================================ -typedef struct _d3d_device_interface d3d_device_interface; -struct _d3d_device_interface +struct d3d_device_interface { HRESULT (*begin_scene)(d3d_device *dev); HRESULT (*clear)(d3d_device *dev, DWORD count, const D3DRECT *rects, DWORD flags, D3DCOLOR color, float z, DWORD stencil); @@ -210,8 +206,7 @@ struct _d3d_device_interface // Direct3DSurface interfaces //============================================================ -typedef struct _d3d_surface_interface d3d_surface_interface; -struct _d3d_surface_interface +struct d3d_surface_interface { HRESULT (*lock_rect)(d3d_surface *surf, D3DLOCKED_RECT *locked, const RECT *rect, DWORD flags); ULONG (*release)(d3d_surface *tex); @@ -223,8 +218,7 @@ struct _d3d_surface_interface // Direct3DTexture interfaces //============================================================ -typedef struct _d3d_texture_interface d3d_texture_interface; -struct _d3d_texture_interface +struct d3d_texture_interface { HRESULT (*get_surface_level)(d3d_texture *tex, UINT level, d3d_surface **surface); HRESULT (*lock_rect)(d3d_texture *tex, UINT level, D3DLOCKED_RECT *locked, const RECT *rect, DWORD flags); @@ -237,8 +231,7 @@ struct _d3d_texture_interface // Direct3DVertexBuffer interfaces //============================================================ -typedef struct _d3d_vertex_buffer_interface d3d_vertex_buffer_interface; -struct _d3d_vertex_buffer_interface +struct d3d_vertex_buffer_interface { HRESULT (*lock)(d3d_vertex_buffer *vbuf, UINT offset, UINT size, VOID **data, DWORD flags); ULONG (*release)(d3d_vertex_buffer *vbuf); @@ -250,8 +243,7 @@ struct _d3d_vertex_buffer_interface // Direct3DEffect interfaces //============================================================ -typedef struct _d3d_effect_interface d3d_effect_interface; -struct _d3d_effect_interface +struct d3d_effect_interface { void (*begin)(d3d_effect *effect, UINT *passes, DWORD flags); void (*end)(d3d_effect *effect); diff --git a/src/osd/windows/drawd3d.h b/src/osd/windows/drawd3d.h index 3dbafaafb0e..1bee718737c 100644 --- a/src/osd/windows/drawd3d.h +++ b/src/osd/windows/drawd3d.h @@ -60,8 +60,7 @@ //============================================================ /* d3d_info is the information about Direct3D for the current screen */ -typedef struct _d3d_info d3d_info; -struct _d3d_info +struct d3d_info { int adapter; // ordinal adapter number int width, height; // current width, height diff --git a/src/osd/windows/drawdd.c b/src/osd/windows/drawdd.c index 1d64143458d..25004360e09 100644 --- a/src/osd/windows/drawdd.c +++ b/src/osd/windows/drawdd.c @@ -69,8 +69,7 @@ typedef HRESULT (WINAPI *directdrawenumerateex_ptr)(LPDDENUMCALLBACKEXA lpCallba /* dd_info is the information about DirectDraw for the current screen */ -typedef struct _dd_info dd_info; -struct _dd_info +struct dd_info { GUID adapter; // current display adapter GUID * adapter_ptr; // pointer to current display adapter @@ -101,8 +100,7 @@ struct _dd_info /* monitor_enum_info holds information during a monitor enumeration */ -typedef struct _monitor_enum_info monitor_enum_info; -struct _monitor_enum_info +struct monitor_enum_info { win_monitor_info * monitor; // pointer to monitor we want GUID guid; // GUID of the one we found @@ -112,8 +110,7 @@ struct _monitor_enum_info /* mode_enum_info holds information during a display mode enumeration */ -typedef struct _mode_enum_info mode_enum_info; -struct _mode_enum_info +struct mode_enum_info { win_window_info * window; INT32 minimum_width, minimum_height; diff --git a/src/osd/windows/drawgdi.c b/src/osd/windows/drawgdi.c index e353e48fc9d..1ff77066f0a 100644 --- a/src/osd/windows/drawgdi.c +++ b/src/osd/windows/drawgdi.c @@ -57,8 +57,7 @@ //============================================================ /* gdi_info is the information for the current screen */ -typedef struct _gdi_info gdi_info; -struct _gdi_info +struct gdi_info { BITMAPINFO bminfo; RGBQUAD colors[256]; diff --git a/src/osd/windows/input.c b/src/osd/windows/input.c index d8a4cff6444..e22b669efc4 100644 --- a/src/osd/windows/input.c +++ b/src/osd/windows/input.c @@ -112,8 +112,7 @@ enum //============================================================ // state information for a keyboard; DirectInput state must be first element -typedef struct _keyboard_state keyboard_state; -struct _keyboard_state +struct keyboard_state { UINT8 state[MAX_KEYS]; INT8 oldkey[MAX_KEYS]; @@ -122,8 +121,7 @@ struct _keyboard_state // state information for a mouse; DirectInput state must be first element -typedef struct _mouse_state mouse_state; -struct _mouse_state +struct mouse_state { DIMOUSESTATE2 state; LONG raw_x, raw_y, raw_z; @@ -131,8 +129,7 @@ struct _mouse_state // state information for a joystick; DirectInput state must be first element -typedef struct _joystick_state joystick_state; -struct _joystick_state +struct joystick_state { DIJOYSTATE state; LONG rangemin[8]; @@ -141,8 +138,7 @@ struct _joystick_state // DirectInput-specific information about a device -typedef struct _dinput_device_info dinput_device_info; -struct _dinput_device_info +struct dinput_device_info { LPDIRECTINPUTDEVICE device; LPDIRECTINPUTDEVICE2 device2; @@ -152,8 +148,7 @@ struct _dinput_device_info // RawInput-specific information about a device -typedef struct _rawinput_device_info rawinput_device_info; -struct _rawinput_device_info +struct rawinput_device_info { HANDLE device; }; diff --git a/src/osd/windows/ledutil.c b/src/osd/windows/ledutil.c index 3f29167da84..962b4ab1498 100644 --- a/src/osd/windows/ledutil.c +++ b/src/osd/windows/ledutil.c @@ -138,8 +138,7 @@ typedef struct _KEYBOARD_INDICATOR_PARAMETERS } KEYBOARD_INDICATOR_PARAMETERS, *PKEYBOARD_INDICATOR_PARAMETERS; -typedef struct _id_map_entry id_map_entry; -struct _id_map_entry +struct id_map_entry { id_map_entry * next; const char * name; diff --git a/src/osd/windows/output.c b/src/osd/windows/output.c index e18c8ce67b0..637ba1f94f8 100644 --- a/src/osd/windows/output.c +++ b/src/osd/windows/output.c @@ -66,8 +66,7 @@ // TYPEDEFS //============================================================ -typedef struct _registered_client registered_client; -struct _registered_client +struct registered_client { registered_client * next; // next client in the list LPARAM id; // client-specified ID diff --git a/src/osd/windows/output.h b/src/osd/windows/output.h index 35da4039ac0..8e8919116e3 100644 --- a/src/osd/windows/output.h +++ b/src/osd/windows/output.h @@ -110,8 +110,7 @@ // TYPE DEFINITIONS //============================================================ -typedef struct _copydata_id_string copydata_id_string; -struct _copydata_id_string +struct copydata_id_string { UINT32 id; // ID that was requested char string[1]; // string array containing the data diff --git a/src/osd/windows/video.h b/src/osd/windows/video.h index fb931845b1c..86e5107b1e1 100644 --- a/src/osd/windows/video.h +++ b/src/osd/windows/video.h @@ -62,8 +62,7 @@ // TYPE DEFINITIONS //============================================================ -typedef struct _win_monitor_info win_monitor_info; -struct _win_monitor_info +struct win_monitor_info { win_monitor_info * next; // pointer to next monitor in list HMONITOR handle; // handle to the monitor @@ -74,8 +73,7 @@ struct _win_monitor_info }; -typedef struct _win_window_config win_window_config; -struct _win_window_config +struct win_window_config { float aspect; // decoded aspect ratio int width; // decoded width @@ -84,8 +82,7 @@ struct _win_window_config }; -typedef struct _win_video_config win_video_config; -struct _win_video_config +struct win_video_config { // global configuration int windowed; // start windowed? diff --git a/src/osd/windows/window.h b/src/osd/windows/window.h index 8b12c38f291..5e167c934a0 100644 --- a/src/osd/windows/window.h +++ b/src/osd/windows/window.h @@ -114,8 +114,7 @@ private: }; -typedef struct _win_draw_callbacks win_draw_callbacks; -struct _win_draw_callbacks +struct win_draw_callbacks { void (*exit)(void); diff --git a/src/osd/windows/winwork.c b/src/osd/windows/winwork.c index 2c2d9cbfbc7..5871ccbafdb 100644 --- a/src/osd/windows/winwork.c +++ b/src/osd/windows/winwork.c @@ -106,8 +106,7 @@ INLINE void YieldProcessor(void) // TYPE DEFINITIONS //============================================================ -typedef struct _scalable_lock scalable_lock; -struct _scalable_lock +struct scalable_lock { #if USE_SCALABLE_LOCKS struct @@ -122,8 +121,7 @@ struct _scalable_lock }; -typedef struct _work_thread_info work_thread_info; -struct _work_thread_info +struct work_thread_info { osd_work_queue * queue; // pointer back to the queue HANDLE handle; // handle to the thread diff --git a/src/tools/jedutil.c b/src/tools/jedutil.c index bcf9c2449b2..da94583d6db 100644 --- a/src/tools/jedutil.c +++ b/src/tools/jedutil.c @@ -111,8 +111,7 @@ typedef int (*command_func_type)(int argc, char *argv[]); -typedef struct _command_entry command_entry; -struct _command_entry +struct command_entry { const char *command; command_func_type command_func; @@ -126,8 +125,7 @@ struct _command_entry /* Pin fuse row configuration */ -typedef struct _pin_fuse_rows pin_fuse_rows; -struct _pin_fuse_rows +struct pin_fuse_rows { UINT16 pin; /* Pin number */ UINT16 fuserowoutputenable; /* Fuse row for the output enable */ @@ -138,8 +136,7 @@ struct _pin_fuse_rows /* Pin fuse column configuration */ -typedef struct _pin_fuse_columns pin_fuse_columns; -struct _pin_fuse_columns +struct pin_fuse_columns { UINT16 pin; /* Pin number */ UINT16 lowfusecolumn; /* Column number for low output */ diff --git a/src/tools/regrep.c b/src/tools/regrep.c index 99be3a84f88..adfddd2b3ba 100644 --- a/src/tools/regrep.c +++ b/src/tools/regrep.c @@ -84,8 +84,7 @@ enum TYPE DEFINITIONS ***************************************************************************/ -typedef struct _summary_file summary_file; -struct _summary_file +struct summary_file { summary_file * next; char name[20]; @@ -98,8 +97,7 @@ struct _summary_file }; -typedef struct _summary_list summary_list; -struct _summary_list +struct summary_list { summary_list * next; summary_file * files; diff --git a/src/tools/unidasm.c b/src/tools/unidasm.c index a45bb69a5b7..946e84a27fc 100644 --- a/src/tools/unidasm.c +++ b/src/tools/unidasm.c @@ -62,8 +62,7 @@ enum _display_type typedef enum _display_type display_type; -typedef struct _dasm_table_entry dasm_table_entry; -struct _dasm_table_entry +struct dasm_table_entry { const char * name; display_type display; @@ -72,8 +71,7 @@ struct _dasm_table_entry }; -typedef struct _options options; -struct _options +struct options { const char * filename; offs_t basepc; |