diff options
| author | 2012-09-17 06:49:13 +0000 | |
|---|---|---|
| committer | 2012-09-17 06:49:13 +0000 | |
| commit | e25c13f2532730ebf50d0cffa0147393fd8e0228 (patch) | |
| tree | a6c25d1de7041f26afed559dbc6670fa550e6b41 /src/emu | |
| parent | f97e8f00818bd8d898facc206ed33ab72cf10a75 (diff) | |
Clean-ups and version bumpmame0147
note: hoarded dump removed too from coco_cart.xml, this will not be tolerated
Diffstat (limited to 'src/emu')
143 files changed, 510 insertions, 510 deletions
diff --git a/src/emu/cpu/am29000/am29000.c b/src/emu/cpu/am29000/am29000.c index b4b27fd9f93..5506a668af6 100644 --- a/src/emu/cpu/am29000/am29000.c +++ b/src/emu/cpu/am29000/am29000.c @@ -75,7 +75,7 @@ STRUCTURES & TYPEDEFS ***************************************************************************/ -struct am29000_state +struct am29000_state { INT32 icount; UINT32 pc; diff --git a/src/emu/cpu/am29000/am29ops.h b/src/emu/cpu/am29000/am29ops.h index 972778904e4..d496bbb63e2 100644 --- a/src/emu/cpu/am29000/am29ops.h +++ b/src/emu/cpu/am29000/am29ops.h @@ -61,7 +61,7 @@ STRUCTS ***************************************************************************/ -struct op_info +struct op_info { void (*opcode)(am29000_state *); UINT32 flags; diff --git a/src/emu/cpu/apexc/apexcdsm.c b/src/emu/cpu/apexc/apexcdsm.c index fcc5650bffa..25a48f8a531 100644 --- a/src/emu/cpu/apexc/apexcdsm.c +++ b/src/emu/cpu/apexc/apexcdsm.c @@ -63,7 +63,7 @@ */ enum format_type {branch, shiftl, shiftr, multiply, store, swap, one_address, two_address}; -struct instr_desc +struct instr_desc { const char *mnemonic; format_type format; /* -> X and Y are format */ diff --git a/src/emu/cpu/arm/arm.c b/src/emu/cpu/arm/arm.c index 7fce7199798..cb99f0347fa 100644 --- a/src/emu/cpu/arm/arm.c +++ b/src/emu/cpu/arm/arm.c @@ -227,7 +227,7 @@ enum /* Private Data */ /* sArmRegister defines the CPU state */ -struct ARM_REGS +struct ARM_REGS { int icount; UINT32 sArmRegister[kNumRegisters]; diff --git a/src/emu/cpu/arm7/arm7core.h b/src/emu/cpu/arm7/arm7core.h index 926c83726f7..14a7a8c9195 100644 --- a/src/emu/cpu/arm7/arm7core.h +++ b/src/emu/cpu/arm7/arm7core.h @@ -185,7 +185,7 @@ enum /* CPU state struct */ -struct arm_state +struct arm_state { ARM7CORE_REGS // these must be included in your cpu specific register implementation ARM7COPRO_REGS diff --git a/src/emu/cpu/cosmac/cosdasm.c b/src/emu/cpu/cosmac/cosdasm.c index c7a7aa31c9e..8f87d694bc1 100644 --- a/src/emu/cpu/cosmac/cosdasm.c +++ b/src/emu/cpu/cosmac/cosdasm.c @@ -24,7 +24,7 @@ #include "cosmac.h" -enum Adr +enum Adr { Ill, Imm, diff --git a/src/emu/cpu/cubeqcpu/cubeqcpu.c b/src/emu/cpu/cubeqcpu/cubeqcpu.c index e88a5950561..bc4064093a5 100644 --- a/src/emu/cpu/cubeqcpu/cubeqcpu.c +++ b/src/emu/cpu/cubeqcpu/cubeqcpu.c @@ -71,7 +71,7 @@ enum alu_dst STRUCTURES & TYPEDEFS ***************************************************************************/ -struct cquestsnd_state +struct cquestsnd_state { /* AM2901 internals */ UINT16 ram[16]; @@ -104,7 +104,7 @@ struct cquestsnd_state }; -struct cquestrot_state +struct cquestrot_state { /* AM2901 internals */ UINT16 ram[16]; @@ -146,7 +146,7 @@ struct cquestrot_state }; -struct cquestlin_state +struct cquestlin_state { /* 12-bit AM2901 internals */ UINT16 ram[16]; diff --git a/src/emu/cpu/drcbec.c b/src/emu/cpu/drcbec.c index 906ed3c5781..3a8648aa0e6 100644 --- a/src/emu/cpu/drcbec.c +++ b/src/emu/cpu/drcbec.c @@ -1121,7 +1121,7 @@ int drcbe_c::execute(code_handle &entry) case MAKE_OPCODE_SHORT(OP_SHL, 4, 1): shift = PARAM2 & 31; temp32 = PARAM1 << shift; - if (shift != 0) + if (shift != 0) { flags = FLAGS32_NZ(temp32); flags |= ((PARAM1 << (shift - 1)) >> 31) & FLAG_C; @@ -1136,7 +1136,7 @@ int drcbe_c::execute(code_handle &entry) case MAKE_OPCODE_SHORT(OP_SHR, 4, 1): shift = PARAM2 & 31; temp32 = PARAM1 >> shift; - if (shift != 0) + if (shift != 0) { flags = FLAGS32_NZ(temp32); flags |= (PARAM1 >> (shift - 1)) & FLAG_C; @@ -1167,7 +1167,7 @@ int drcbe_c::execute(code_handle &entry) case MAKE_OPCODE_SHORT(OP_ROL, 4, 1): shift = PARAM2 & 31; temp32 = (PARAM1 << shift) | (PARAM1 >> ((32 - shift) & 31)); - if (shift != 0) + if (shift != 0) { flags = FLAGS32_NZ(temp32); flags |= ((PARAM1 << (shift - 1)) >> 31) & FLAG_C; diff --git a/src/emu/cpu/dsp56k/dsp56k.h b/src/emu/cpu/dsp56k/dsp56k.h index 5a7715a5d65..7737de30d11 100644 --- a/src/emu/cpu/dsp56k/dsp56k.h +++ b/src/emu/cpu/dsp56k/dsp56k.h @@ -30,7 +30,7 @@ DECLARE_LEGACY_CPU_DEVICE(DSP56156, dsp56k); STRUCTURES & TYPEDEFS ***************************************************************************/ // 5-4 Host Interface -struct dsp56k_host_interface +struct dsp56k_host_interface { // **** Dsp56k side **** // // Host Control Register @@ -65,7 +65,7 @@ struct dsp56k_host_interface }; // 1-9 ALU -struct dsp56k_data_alu +struct dsp56k_data_alu { // Four 16-bit input registers (can be accessed as 2 32-bit registers) PAIR x; @@ -82,7 +82,7 @@ struct dsp56k_data_alu }; // 1-10 Address Generation Unit (AGU) -struct dsp56k_agu +struct dsp56k_agu { // Four address registers UINT16 r0; @@ -112,7 +112,7 @@ struct dsp56k_agu }; // 1-11 Program Control Unit (PCU) -struct dsp56k_pcu +struct dsp56k_pcu { // Program Counter UINT16 pc; @@ -149,7 +149,7 @@ struct dsp56k_pcu }; // 1-8 The dsp56156 CORE -struct dsp56k_core +struct dsp56k_core { // PROGRAM CONTROLLER dsp56k_pcu PCU; diff --git a/src/emu/cpu/dsp56k/dsp56pcu.c b/src/emu/cpu/dsp56k/dsp56pcu.c index cde4d69924e..be29585ec05 100644 --- a/src/emu/cpu/dsp56k/dsp56pcu.c +++ b/src/emu/cpu/dsp56k/dsp56pcu.c @@ -236,7 +236,7 @@ void pcu_reset(dsp56k_core* cpustate) /*************************************************************************** INTERRUPT HANDLING ***************************************************************************/ -struct dsp56k_irq_data +struct dsp56k_irq_data { UINT16 irq_vector; char irq_source[128]; diff --git a/src/emu/cpu/esrip/esrip.c b/src/emu/cpu/esrip/esrip.c index 6f97a70d9b9..4afe1971d52 100644 --- a/src/emu/cpu/esrip/esrip.c +++ b/src/emu/cpu/esrip/esrip.c @@ -61,7 +61,7 @@ CPU_DISASSEMBLE( esrip ); STRUCTURES & TYPEDEFS ***************************************************************************/ -struct esrip_state +struct esrip_state { UINT16 ram[32]; UINT16 acc; diff --git a/src/emu/cpu/g65816/g65816ds.c b/src/emu/cpu/g65816/g65816ds.c index aefeab523cc..dd4a464e6c5 100644 --- a/src/emu/cpu/g65816/g65816ds.c +++ b/src/emu/cpu/g65816/g65816ds.c @@ -26,7 +26,7 @@ author (Karl Stenerud) at karl@higashiyama-unet.ocn.ne.jp. #define ADDRESS_65816(A) ((A)&0xffffff) -struct opcode_struct +struct opcode_struct { unsigned char name; unsigned char flag; diff --git a/src/emu/cpu/h6280/h6280.h b/src/emu/cpu/h6280/h6280.h index f2a3434fa45..d37253f3d8f 100644 --- a/src/emu/cpu/h6280/h6280.h +++ b/src/emu/cpu/h6280/h6280.h @@ -37,7 +37,7 @@ enum /**************************************************************************** * The 6280 registers. ****************************************************************************/ -struct h6280_Regs +struct h6280_Regs { int ICount; diff --git a/src/emu/cpu/h83002/h8priv.h b/src/emu/cpu/h83002/h8priv.h index 1453bd5ee72..9fa00488c3c 100644 --- a/src/emu/cpu/h83002/h8priv.h +++ b/src/emu/cpu/h83002/h8priv.h @@ -11,25 +11,25 @@ #define H8_MAX_PORTS (16) // number of I/O ports defined architecturally (1-9 and A-G = 16) -struct H8S2XXX_TPU_ITEM +struct H8S2XXX_TPU_ITEM { UINT32 tgr, irq, out; }; -struct H8S2XXX_TPU +struct H8S2XXX_TPU { emu_timer *timer; int cycles_per_tick; UINT64 timer_cycles; }; -struct H8S2XXX_SCI +struct H8S2XXX_SCI { emu_timer *timer; UINT32 bitrate; }; -struct H8S2XXX_TMR +struct H8S2XXX_TMR { emu_timer *timer; int cycles_per_tick; diff --git a/src/emu/cpu/h83002/h8speriph.c b/src/emu/cpu/h83002/h8speriph.c index df6ca015e65..916fa0b6d71 100644 --- a/src/emu/cpu/h83002/h8speriph.c +++ b/src/emu/cpu/h83002/h8speriph.c @@ -1158,7 +1158,7 @@ static TIMER_CALLBACK( h8s_tpu_callback) // SERIAL CONTROLLER INTERFACE // ///////////////////////////////// -struct H8S_SCI_ENTRY +struct H8S_SCI_ENTRY { UINT32 reg_smr, reg_brr, reg_scr, reg_tdr, reg_ssr, reg_rdr; UINT32 reg_pdr, reg_port; diff --git a/src/emu/cpu/hcd62121/hcd62121d.c b/src/emu/cpu/hcd62121/hcd62121d.c index ae7845be1fc..504d2edba49 100644 --- a/src/emu/cpu/hcd62121/hcd62121d.c +++ b/src/emu/cpu/hcd62121/hcd62121d.c @@ -32,7 +32,7 @@ enum _4, /* for nibble shifts */ }; -struct hcd62121_dasm +struct hcd62121_dasm { const char *str; UINT8 arg1; diff --git a/src/emu/cpu/hd61700/hd61700d.c b/src/emu/cpu/hd61700/hd61700d.c index 5243649f3dc..b06a16290d6 100644 --- a/src/emu/cpu/hd61700/hd61700d.c +++ b/src/emu/cpu/hd61700/hd61700d.c @@ -39,7 +39,7 @@ enum OP_RSIR, }; -struct hd61700_dasm +struct hd61700_dasm { const char *str; UINT8 arg1; diff --git a/src/emu/cpu/hd6309/6309dasm.c b/src/emu/cpu/hd6309/6309dasm.c index 07b28d6efa7..37d7f7b9a54 100644 --- a/src/emu/cpu/hd6309/6309dasm.c +++ b/src/emu/cpu/hd6309/6309dasm.c @@ -25,7 +25,7 @@ #include "hd6309.h" // Opcode structure -struct opcodeinfo +struct opcodeinfo { UINT8 opcode; // 8-bit opcode value UINT8 length; // Opcode length in bytes diff --git a/src/emu/cpu/i386/cycles.h b/src/emu/cpu/i386/cycles.h index 5ccaa928b62..2bbb75fec5f 100644 --- a/src/emu/cpu/i386/cycles.h +++ b/src/emu/cpu/i386/cycles.h @@ -3,7 +3,7 @@ #ifndef __CYCLES_H__ #define __CYCLES_H__ -enum X86_CYCLES +enum X86_CYCLES { CYCLES_MOV_REG_REG, CYCLES_MOV_REG_MEM, @@ -337,7 +337,7 @@ enum X86_CYCLES #define CPU_CYCLES_MEDIAGX 3 -struct X86_CYCLE_TABLE +struct X86_CYCLE_TABLE { X86_CYCLES op; UINT8 cpu_cycles[X86_NUM_CPUS][2]; diff --git a/src/emu/cpu/i386/i386priv.h b/src/emu/cpu/i386/i386priv.h index ee530363fb2..285e7fb1e17 100644 --- a/src/emu/cpu/i386/i386priv.h +++ b/src/emu/cpu/i386/i386priv.h @@ -19,7 +19,7 @@ extern int i386_dasm_one(char *buffer, UINT32 pc, const UINT8 *oprom, int mode); enum SREGS { ES, CS, SS, DS, FS, GS }; -enum BREGS +enum BREGS { AL = NATIVE_ENDIAN_VALUE_LE_BE(0,3), AH = NATIVE_ENDIAN_VALUE_LE_BE(1,2), @@ -31,7 +31,7 @@ enum BREGS BH = NATIVE_ENDIAN_VALUE_LE_BE(13,14) }; -enum WREGS +enum WREGS { AX = NATIVE_ENDIAN_VALUE_LE_BE(0,1), CX = NATIVE_ENDIAN_VALUE_LE_BE(2,3), @@ -206,7 +206,7 @@ struct I386_SREG { bool valid; }; -struct I386_CALL_GATE +struct I386_CALL_GATE { UINT16 segment; UINT16 selector; diff --git a/src/emu/cpu/i86/i286.c b/src/emu/cpu/i86/i286.c index 0c3f9ab7a1b..be3832c73d2 100644 --- a/src/emu/cpu/i86/i286.c +++ b/src/emu/cpu/i86/i286.c @@ -26,7 +26,7 @@ /* cpu state */ /***************************************************************************/ /* I86 registers */ -union i80286basicregs +union i80286basicregs { /* eight general registers */ UINT16 w[8]; /* viewed as 16 bits registers */ UINT8 b[16]; /* or as 8 bit registers */ diff --git a/src/emu/cpu/i860/i860dis.c b/src/emu/cpu/i860/i860dis.c index 4e5b36d5649..b1386f7cefe 100644 --- a/src/emu/cpu/i860/i860dis.c +++ b/src/emu/cpu/i860/i860dis.c @@ -374,7 +374,7 @@ enum }; -struct decode_tbl_t +struct decode_tbl_t { /* Disassembly function for this opcode. Call with buffer, mnemonic, pc, insn. */ diff --git a/src/emu/cpu/i960/i960dis.c b/src/emu/cpu/i960/i960dis.c index 2523eb63278..eec297fdebd 100644 --- a/src/emu/cpu/i960/i960dis.c +++ b/src/emu/cpu/i960/i960dis.c @@ -8,7 +8,7 @@ #include "i960.h" #include "i960dis.h" -struct mnemonic_t +struct mnemonic_t { const char *mnem; unsigned short type; diff --git a/src/emu/cpu/lh5801/5801dasm.c b/src/emu/cpu/lh5801/5801dasm.c index 6d669000490..996d85c94ee 100644 --- a/src/emu/cpu/lh5801/5801dasm.c +++ b/src/emu/cpu/lh5801/5801dasm.c @@ -24,7 +24,7 @@ #include "lh5801.h" -enum Adr +enum Adr { Imp, Reg, @@ -46,7 +46,7 @@ enum Adr RelM }; -enum Regs +enum Regs { RegNone, A, @@ -64,7 +64,7 @@ static const char *const RegNames[]= { #undef SEC #endif -enum Ins +enum Ins { ILL, ILL2, PREFD, NOP, diff --git a/src/emu/cpu/m37710/m7700ds.c b/src/emu/cpu/m37710/m7700ds.c index 001198243e7..f531de100d4 100644 --- a/src/emu/cpu/m37710/m7700ds.c +++ b/src/emu/cpu/m37710/m7700ds.c @@ -16,7 +16,7 @@ Based on G65C816 CPU Emulator by Karl Stenerud #define ADDRESS_24BIT(A) ((A)&0xffffff) -struct opcode_struct +struct opcode_struct { unsigned char name; unsigned char flag; diff --git a/src/emu/cpu/m6502/m6502.c b/src/emu/cpu/m6502/m6502.c index 203b07d313b..add50195952 100644 --- a/src/emu/cpu/m6502/m6502.c +++ b/src/emu/cpu/m6502/m6502.c @@ -147,7 +147,7 @@ static void m6502_common_init(legacy_cpu_device *device, device_irq_acknowledge_ cpustate->wrmem_id.resolve(intf->write_indexed_func, *device); cpustate->in_port_func.resolve(intf->in_port_func, *device); cpustate->out_port_func.resolve(intf->out_port_func, *device); - + cpustate->pullup = intf->external_port_pullup; cpustate->pulldown = intf->external_port_pulldown; } diff --git a/src/emu/cpu/m6502/m6502.h b/src/emu/cpu/m6502/m6502.h index eba57128ce8..7edf5be8ffc 100644 --- a/src/emu/cpu/m6502/m6502.h +++ b/src/emu/cpu/m6502/m6502.h @@ -54,7 +54,7 @@ enum /* Optional interface to set callbacks */ #define M6510_INTERFACE(name) \ - const m6502_interface (name) = + const m6502_interface (name) = struct m6502_interface { diff --git a/src/emu/cpu/m6502/m6509.c b/src/emu/cpu/m6502/m6509.c index 1978c7483f3..a8ed661689c 100644 --- a/src/emu/cpu/m6502/m6509.c +++ b/src/emu/cpu/m6502/m6509.c @@ -155,7 +155,7 @@ static CPU_INIT( m6509 ) devcb_write8 nullwcb = DEVCB_NULL; cpustate->rdmem_id.resolve(nullrcb, *device); - cpustate->wrmem_id.resolve(nullwcb, *device); + cpustate->wrmem_id.resolve(nullwcb, *device); } } diff --git a/src/emu/cpu/m68000/m68k_in.c b/src/emu/cpu/m68000/m68k_in.c index 7eb1cb6cad2..9144143b6b0 100644 --- a/src/emu/cpu/m68000/m68k_in.c +++ b/src/emu/cpu/m68000/m68k_in.c @@ -128,7 +128,7 @@ void (*m68ki_instruction_jump_table[NUM_CPU_TYPES][0x10000])(m68ki_cpu_core *m68 unsigned char m68ki_cycles[NUM_CPU_TYPES][0x10000]; /* Cycles used by CPU type */ /* This is used to generate the opcode handler jump table */ -struct opcode_handler_struct +struct opcode_handler_struct { void (*opcode_handler)(m68ki_cpu_core *m68k); /* handler function */ unsigned int mask; /* mask on opcode */ diff --git a/src/emu/cpu/m68000/m68kdasm.c b/src/emu/cpu/m68000/m68kdasm.c index a43310db8cd..112ebbb29d2 100644 --- a/src/emu/cpu/m68000/m68kdasm.c +++ b/src/emu/cpu/m68000/m68kdasm.c @@ -174,7 +174,7 @@ static int valid_ea(UINT32 opcode, UINT32 mask); static int DECL_SPEC compare_nof_true_bits(const void *aptr, const void *bptr); /* used to build opcode handler jump table */ -struct opcode_struct +struct opcode_struct { void (*opcode_handler)(void); /* handler function */ UINT32 mask; /* mask on opcode */ diff --git a/src/emu/cpu/m68000/m68kmake.c b/src/emu/cpu/m68000/m68kmake.c index bb3179265fc..fd3322fa631 100644 --- a/src/emu/cpu/m68000/m68kmake.c +++ b/src/emu/cpu/m68000/m68kmake.c @@ -175,7 +175,7 @@ enum /* Everything we need to know about an opcode */ -struct opcode_struct +struct opcode_struct { char name[MAX_NAME_LENGTH]; /* opcode handler name */ unsigned char size; /* Size of operation */ @@ -192,7 +192,7 @@ struct opcode_struct /* All modifications necessary for a specific EA mode of an instruction */ -struct ea_info_struct +struct ea_info_struct { const char* fname_add; const char* ea_add; @@ -202,7 +202,7 @@ struct ea_info_struct /* Holds the body of a function */ -struct body_struct +struct body_struct { char body[MAX_BODY_LENGTH][MAX_LINE_LENGTH+1]; int length; @@ -210,7 +210,7 @@ struct body_struct /* Holds a sequence of search / replace strings */ -struct replace_struct +struct replace_struct { char replace[MAX_REPLACE_LENGTH][2][MAX_LINE_LENGTH+1]; int length; diff --git a/src/emu/cpu/m6805/m6805.c b/src/emu/cpu/m6805/m6805.c index eb0796693ad..0ac3fb2b549 100644 --- a/src/emu/cpu/m6805/m6805.c +++ b/src/emu/cpu/m6805/m6805.c @@ -45,7 +45,7 @@ enum }; /* 6805 Registers */ -struct m6805_Regs +struct m6805_Regs { /* Pre-pointerafied public globals */ int iCount; diff --git a/src/emu/cpu/m6809/6809dasm.c b/src/emu/cpu/m6809/6809dasm.c index b0c74e869a4..43e732add8a 100644 --- a/src/emu/cpu/m6809/6809dasm.c +++ b/src/emu/cpu/m6809/6809dasm.c @@ -20,7 +20,7 @@ #include "m6809.h" // Opcode structure -struct opcodeinfo +struct opcodeinfo { UINT8 opcode; // 8-bit opcode value UINT8 length; // Opcode length in bytes diff --git a/src/emu/cpu/mb86233/mb86233.c b/src/emu/cpu/mb86233/mb86233.c index 0f309f6be1a..28a69ed67bb 100644 --- a/src/emu/cpu/mb86233/mb86233.c +++ b/src/emu/cpu/mb86233/mb86233.c @@ -23,7 +23,7 @@ CPU_DISASSEMBLE( mb86233 ); STRUCTURES & TYPEDEFS ***************************************************************************/ -union MB86233_REG +union MB86233_REG { INT32 i; UINT32 u; diff --git a/src/emu/cpu/mips/mips3.c b/src/emu/cpu/mips/mips3.c index c40e7d03d30..932e659ab29 100644 --- a/src/emu/cpu/mips/mips3.c +++ b/src/emu/cpu/mips/mips3.c @@ -86,7 +86,7 @@ ***************************************************************************/ /* MIPS3 Registers */ -struct mips3_regs +struct mips3_regs { /* core state */ mips3_state core; diff --git a/src/emu/cpu/nec/necpriv.h b/src/emu/cpu/nec/necpriv.h index e3e3f4d6600..22a524a1074 100644 --- a/src/emu/cpu/nec/necpriv.h +++ b/src/emu/cpu/nec/necpriv.h @@ -19,7 +19,7 @@ enum }; /* interrupt sources */ -enum INTSOURCES +enum INTSOURCES { BRK = 0, INT_IRQ = 1, @@ -27,7 +27,7 @@ enum INTSOURCES }; /* NEC registers */ -union necbasicregs +union necbasicregs { /* eight general registers */ UINT16 w[8]; /* viewed as 16 bits registers */ UINT8 b[16]; /* or as 8 bit registers */ diff --git a/src/emu/cpu/nec/v25priv.h b/src/emu/cpu/nec/v25priv.h index 5b4fe851c55..39e1bf13f8b 100644 --- a/src/emu/cpu/nec/v25priv.h +++ b/src/emu/cpu/nec/v25priv.h @@ -35,7 +35,7 @@ enum }; /* interrupt sources */ -enum INTSOURCES +enum INTSOURCES { BRK = 0, INT_IRQ = 1, @@ -60,7 +60,7 @@ enum INTSOURCES }; /* internal RAM and register banks */ -union internalram +union internalram { UINT16 w[128]; UINT8 b[256]; diff --git a/src/emu/cpu/powerpc/ppc_dasm.c b/src/emu/cpu/powerpc/ppc_dasm.c index 0b0168efda4..35a42db092c 100644 --- a/src/emu/cpu/powerpc/ppc_dasm.c +++ b/src/emu/cpu/powerpc/ppc_dasm.c @@ -102,7 +102,7 @@ enum * Describes the layout of an instruction. */ -struct IDESCR +struct IDESCR { char mnem[32]; // mnemonic UINT32 match; // bit pattern of instruction after it has been masked diff --git a/src/emu/cpu/powerpc/ppccom.c b/src/emu/cpu/powerpc/ppccom.c index 7222ab7d55f..88c6500b3f0 100644 --- a/src/emu/cpu/powerpc/ppccom.c +++ b/src/emu/cpu/powerpc/ppccom.c @@ -1828,7 +1828,7 @@ static int ppc4xx_dma_decrement_count(powerpc_state *ppc, int dmachan) ppc->dcr[DCR4XX_DMASR] |= 1 << (7 - dmachan); break; } - + ppc4xx_dma_update_irq_states(ppc); INT64 numdata = dmaregs[DCR4XX_DMACT0]; @@ -1952,7 +1952,7 @@ static TIMER_CALLBACK( ppc4xx_buffered_dma_callback ) dmaregs[DCR4XX_DMADA0] += destinc; } while (!ppc4xx_dma_decrement_count(ppc, dmachan)); break; - } + } } } diff --git a/src/emu/cpu/rsp/rsp.h b/src/emu/cpu/rsp/rsp.h index 8b8b1f7fdb7..91a8577fb0b 100644 --- a/src/emu/cpu/rsp/rsp.h +++ b/src/emu/cpu/rsp/rsp.h @@ -138,7 +138,7 @@ void rspdrc_add_imem(device_t *device, UINT32 *base); #define RSPDRC_STRICT_VERIFY 0x0001 /* verify all instructions */ -union VECTOR_REG +union VECTOR_REG { UINT64 d[2]; UINT32 l[4]; @@ -146,7 +146,7 @@ union VECTOR_REG UINT8 b[16]; }; -union ACCUMULATOR_REG +union ACCUMULATOR_REG { INT64 q; INT32 l[2]; diff --git a/src/emu/cpu/saturn/saturnds.c b/src/emu/cpu/saturn/saturnds.c index 1acfafa36ee..0db10df7768 100644 --- a/src/emu/cpu/saturn/saturnds.c +++ b/src/emu/cpu/saturn/saturnds.c @@ -71,7 +71,7 @@ static const char number_2_hex[]= // don't split branch and return, source relies on this ordering -enum MNEMONICS +enum MNEMONICS { Return, ReturnSetXM, ReturnSetCarry, ReturnClearCarry, ReturnFromInterrupt, jump3,jump4,jump, @@ -584,7 +584,7 @@ enum opcode_adr AdrImmCount }; -struct OPCODE +struct OPCODE { opcode_sel sel; opcode_adr adr; diff --git a/src/emu/cpu/sc61860/scdasm.c b/src/emu/cpu/sc61860/scdasm.c index 1ebe8005a73..dacdf7dcc63 100644 --- a/src/emu/cpu/sc61860/scdasm.c +++ b/src/emu/cpu/sc61860/scdasm.c @@ -79,7 +79,7 @@ */ -enum Adr +enum Adr { Ill, Imp, diff --git a/src/emu/cpu/sh2/sh2comn.h b/src/emu/cpu/sh2/sh2comn.h index 9355d9e00ec..88a9f17a6ce 100644 --- a/src/emu/cpu/sh2/sh2comn.h +++ b/src/emu/cpu/sh2/sh2comn.h @@ -90,7 +90,7 @@ do { \ sh2_exception(sh2,message,irq); \ } while(0) -struct sh2_state +struct sh2_state { UINT32 ppc; UINT32 pc; diff --git a/src/emu/cpu/sh4/sh4comn.h b/src/emu/cpu/sh4/sh4comn.h index b71e6fa826d..33fff77c0eb 100644 --- a/src/emu/cpu/sh4/sh4comn.h +++ b/src/emu/cpu/sh4/sh4comn.h @@ -49,7 +49,7 @@ class sh4_frontend; #endif -struct sh4_state +struct sh4_state { UINT32 ppc; UINT32 pc, spc; diff --git a/src/emu/cpu/sharc/sharc.c b/src/emu/cpu/sharc/sharc.c index 58a08f13e49..19522662862 100644 --- a/src/emu/cpu/sharc/sharc.c +++ b/src/emu/cpu/sharc/sharc.c @@ -39,7 +39,7 @@ enum SHARC_B12, SHARC_B13, SHARC_B14, SHARC_B15, }; -struct SHARC_DAG +struct SHARC_DAG { UINT32 i[8]; UINT32 m[8]; @@ -47,13 +47,13 @@ struct SHARC_DAG UINT32 l[8]; }; -union SHARC_REG +union SHARC_REG { INT32 r; float f; }; -struct DMA_REGS +struct DMA_REGS { UINT32 control; UINT32 int_index; @@ -66,14 +66,14 @@ struct DMA_REGS UINT32 ext_count; }; -struct LADDR +struct LADDR { UINT32 addr; UINT32 code; UINT32 loop_type; }; -struct DMA_OP +struct DMA_OP { UINT32 src; UINT32 dst; @@ -580,7 +580,7 @@ static CPU_RESET( sharc ) sharc_dma_exec(cpustate, 6); dma_op(cpustate, 6); - + cpustate->dma_op[6].timer->adjust(attotime::never, 0); break; } @@ -766,7 +766,7 @@ static CPU_EXECUTE( sharc ) } } } - + sharc_op[(cpustate->opcode >> 39) & 0x1ff](cpustate); diff --git a/src/emu/cpu/sharc/sharc.h b/src/emu/cpu/sharc/sharc.h index 84bda15bb77..7e9f41bef8d 100644 --- a/src/emu/cpu/sharc/sharc.h +++ b/src/emu/cpu/sharc/sharc.h @@ -9,7 +9,7 @@ #define SHARC_INPUT_FLAG2 5 #define SHARC_INPUT_FLAG3 6 -enum SHARC_BOOT_MODE +enum SHARC_BOOT_MODE { BOOT_MODE_EPROM, BOOT_MODE_HOST, diff --git a/src/emu/cpu/sharc/sharcdma.c b/src/emu/cpu/sharc/sharcdma.c index 8f6abf1964c..ccae4b868bd 100644 --- a/src/emu/cpu/sharc/sharcdma.c +++ b/src/emu/cpu/sharc/sharcdma.c @@ -35,7 +35,7 @@ static void schedule_chained_dma_op(SHARC_REGS *cpustate, int channel, UINT32 dm } else // Receive from external { - cpustate->dma_op[channel].src = ext_index; + cpustate->dma_op[channel].src = ext_index; cpustate->dma_op[channel].src_modifier = ext_modifier; cpustate->dma_op[channel].src_count = ext_count; cpustate->dma_op[channel].dst = int_index; @@ -89,7 +89,7 @@ static void dma_op(SHARC_REGS *cpustate, int channel) int src_modifier = cpustate->dma_op[channel].src_modifier; int dst_modifier = cpustate->dma_op[channel].dst_modifier; int src_count = cpustate->dma_op[channel].src_count; - //int dst_count = cpustate->dma_op[channel].dst_count; + //int dst_count = cpustate->dma_op[channel].dst_count; int pmode = cpustate->dma_op[channel].pmode; //printf("dma_op: %08X, %08X, %08X, %08X, %08X, %08X, %d\n", src, dst, src_modifier, dst_modifier, src_count, dst_count, pmode); diff --git a/src/emu/cpu/sharc/sharcdsm.h b/src/emu/cpu/sharc/sharcdsm.h index c7edef8b7ac..9dff77fdebd 100644 --- a/src/emu/cpu/sharc/sharcdsm.h +++ b/src/emu/cpu/sharc/sharcdsm.h @@ -69,7 +69,7 @@ static const char mr_regnames[16][8] = "???", "???", "???", "???", "???", "???", "???", "???" }; -struct SHARC_DASM_OP +struct SHARC_DASM_OP { UINT32 op_mask; UINT32 op_bits; diff --git a/src/emu/cpu/sharc/sharcops.h b/src/emu/cpu/sharc/sharcops.h index 1152646f309..2fe5aab7fef 100644 --- a/src/emu/cpu/sharc/sharcops.h +++ b/src/emu/cpu/sharc/sharcops.h @@ -1,4 +1,4 @@ -struct SHARC_OP +struct SHARC_OP { UINT32 op_mask; UINT32 op_bits; diff --git a/src/emu/cpu/spc700/spc700.c b/src/emu/cpu/spc700/spc700.c index c35ef4ad2ec..c716d1a8aa1 100644 --- a/src/emu/cpu/spc700/spc700.c +++ b/src/emu/cpu/spc700/spc700.c @@ -66,7 +66,7 @@ Address Function Register R/W When Reset Remarks #include "spc700.h" /* CPU Structure */ -struct spc700i_cpu +struct spc700i_cpu { uint a; /* Accumulator */ uint x; /* Index Register X */ diff --git a/src/emu/cpu/spc700/spc700ds.c b/src/emu/cpu/spc700/spc700ds.c index 5073154083e..7c53abcbc86 100644 --- a/src/emu/cpu/spc700/spc700ds.c +++ b/src/emu/cpu/spc700/spc700ds.c @@ -20,7 +20,7 @@ author (Karl Stenerud) at karl@higashiyama-unet.ocn.ne.jp. -struct opcode_struct +struct opcode_struct { unsigned char name; unsigned char args[2]; diff --git a/src/emu/cpu/superfx/superfx.c b/src/emu/cpu/superfx/superfx.c index 795934e11db..ef761deddf3 100644 --- a/src/emu/cpu/superfx/superfx.c +++ b/src/emu/cpu/superfx/superfx.c @@ -2,14 +2,14 @@ #include "debugger.h" #include "superfx.h" -struct pixelcache_t +struct pixelcache_t { UINT16 offset; UINT8 bitpend; UINT8 data[8]; }; -struct cache_t +struct cache_t { UINT8 buffer[0x200]; UINT8 valid[0x20]; diff --git a/src/emu/cpu/tlcs900/900tbl.c b/src/emu/cpu/tlcs900/900tbl.c index 40742589aa3..431b31f186a 100644 --- a/src/emu/cpu/tlcs900/900tbl.c +++ b/src/emu/cpu/tlcs900/900tbl.c @@ -3852,7 +3852,7 @@ static void _ZCF(tlcs900_state *cpustate) } -struct tlcs900inst +struct tlcs900inst { void (*opfunc)(tlcs900_state *cpustate); int operand1; diff --git a/src/emu/cpu/tlcs900/dasm900.c b/src/emu/cpu/tlcs900/dasm900.c index 063a9444c75..e33771bb374 100644 --- a/src/emu/cpu/tlcs900/dasm900.c +++ b/src/emu/cpu/tlcs900/dasm900.c @@ -88,7 +88,7 @@ enum e_operand }; -struct tlcs900inst +struct tlcs900inst { e_mnemonics mnemonic; e_operand operand1; diff --git a/src/emu/cpu/tms32051/tms32051.c b/src/emu/cpu/tms32051/tms32051.c index c3429f54878..366335638c7 100644 --- a/src/emu/cpu/tms32051/tms32051.c +++ b/src/emu/cpu/tms32051/tms32051.c @@ -46,7 +46,7 @@ enum TMS32051_AR7, }; -struct PMST +struct PMST { UINT16 iptr; UINT16 avis; @@ -58,7 +58,7 @@ struct PMST UINT16 braf; }; -struct ST0 +struct ST0 { UINT16 dp; UINT16 intm; @@ -67,7 +67,7 @@ struct ST0 UINT16 arp; }; -struct ST1 +struct ST1 { UINT16 arb; UINT16 cnf; diff --git a/src/emu/cpu/tms9900/9900dasm.c b/src/emu/cpu/tms9900/9900dasm.c index 2391ac660cf..19fd5f5e6d7 100644 --- a/src/emu/cpu/tms9900/9900dasm.c +++ b/src/emu/cpu/tms9900/9900dasm.c @@ -27,7 +27,7 @@ #define MASK 0x0000ffff #define BITS(val,n1,n2) ((val>>(15-(n2))) & (MASK>>(15-((n2)-(n1))))) -enum format_t +enum format_t { format_1, /* 2 address instructions */ format_2a, /* jump instructions */ @@ -73,7 +73,7 @@ enum sd_11_15 = 0x200 /* bits 11-15 should be cleared in lwpi, limi, idle, rset, rtwp, ckon, ckof, lrex */ }; -struct description_t +struct description_t { const char *mnemonic; format_t format; diff --git a/src/emu/cpu/tms9900/99xxcore.h b/src/emu/cpu/tms9900/99xxcore.h index 6d50dfb148b..2e8f7c06ba0 100644 --- a/src/emu/cpu/tms9900/99xxcore.h +++ b/src/emu/cpu/tms9900/99xxcore.h @@ -394,7 +394,7 @@ a ST_MASK */ #define R14 28 #define R15 30 -struct map_file_t +struct map_file_t { UINT16 L[3], B[3]; /* actual registers */ UINT32 limit[3], bias[3]; /* equivalent in a more convenient form */ @@ -1993,7 +1993,7 @@ static void set_flag1(tms99xx_state *cpustate, int val) #endif -enum cru_error_code +enum cru_error_code { CRU_OK = 0, CRU_PRIVILEGE_VIOLATION = -1 diff --git a/src/emu/cpu/tms9900/tms9900.h b/src/emu/cpu/tms9900/tms9900.h index 43f57c5e600..f80f452a5f9 100644 --- a/src/emu/cpu/tms9900/tms9900.h +++ b/src/emu/cpu/tms9900/tms9900.h @@ -109,7 +109,7 @@ static const char opname[][5] = "*int" }; -struct tms99xx_config +struct tms99xx_config { devcb_write8 external_callback; devcb_read8 irq_level; diff --git a/src/emu/cpu/tms9900/tms9900l.h b/src/emu/cpu/tms9900/tms9900l.h index 3ca20312bed..324d9ab02bc 100644 --- a/src/emu/cpu/tms9900/tms9900l.h +++ b/src/emu/cpu/tms9900/tms9900l.h @@ -61,7 +61,7 @@ DECLARE_LEGACY_CPU_DEVICE(TI990_10L, ti990_10l); structure with the parameters ti990_10_reset wants. */ -struct ti990_10reset_param +struct ti990_10reset_param { ti99xx_idle_func idle_callback; ti99xx_rset_func rset_callback; @@ -87,7 +87,7 @@ DECLARE_LEGACY_CPU_DEVICE(TMS9900L, tms9900l); /* structure with optional parameters for tms9900_reset. */ -struct tms9900reset_param +struct tms9900reset_param { ti99xx_idle_func idle_callback; }; @@ -99,7 +99,7 @@ struct tms9900reset_param /* structure with optional parameters for tms9940_reset. */ -struct tms9940reset_param +struct tms9940reset_param { ti99xx_idle_func idle_callback; }; @@ -111,7 +111,7 @@ DECLARE_LEGACY_CPU_DEVICE(TMS9980L, tms9980al); /* structure with optional parameters for tms9980a_reset. */ -struct tms9980areset_param +struct tms9980areset_param { ti99xx_idle_func idle_callback; }; @@ -123,7 +123,7 @@ struct tms9980areset_param /*// structure with optional parameters for tms9985_reset. */ -struct tms9985reset_param +struct tms9985reset_param { ti99xx_idle_func idle_callback; }; @@ -135,7 +135,7 @@ struct tms9985reset_param /* structure with optional parameters for tms9989_reset. */ -struct tms9989reset_param +struct tms9989reset_param { ti99xx_idle_func idle_callback; }; @@ -147,7 +147,7 @@ DECLARE_LEGACY_CPU_DEVICE(TMS9995L, tms9995l); /* structure with the parameters tms9995_reset wants. */ -struct tms9995reset_param +struct tms9995reset_param { /* auto_wait_state : a non-zero value makes tms9995 generate a wait state automatically on each memory access */ @@ -175,7 +175,7 @@ extern WRITE8_HANDLER(tms9995_internal2_w); /* structure with optional parameters for tms99000_reset. */ -struct tms99000reset_param +struct tms99000reset_param { ti99xx_idle_func idle_callback; }; @@ -187,7 +187,7 @@ struct tms99000reset_param /* structure with optional parameters for tms99105a_reset. */ -struct tms99105areset_param +struct tms99105areset_param { ti99xx_idle_func idle_callback; }; @@ -199,7 +199,7 @@ struct tms99105areset_param /* structure with optional parameters for tms99110a_reset. */ -struct tms99110areset_param +struct tms99110areset_param { ti99xx_idle_func idle_callback; }; diff --git a/src/emu/cpu/tms9900/tms9995.h b/src/emu/cpu/tms9900/tms9995.h index 72933e78c02..bf084773067 100644 --- a/src/emu/cpu/tms9900/tms9995.h +++ b/src/emu/cpu/tms9900/tms9995.h @@ -60,7 +60,7 @@ enum Configuration for the TMS9995. The connections are provided by the main board which contains the processor. */ -struct tms9995_config +struct tms9995_config { devcb_write8 external_callback; devcb_write_line iaq_line; diff --git a/src/emu/cpu/upd7810/upd7810.h b/src/emu/cpu/upd7810/upd7810.h index c2da1d43f70..ff4998adeae 100644 --- a/src/emu/cpu/upd7810/upd7810.h +++ b/src/emu/cpu/upd7810/upd7810.h @@ -11,7 +11,7 @@ */ // unfortunatly memory configuration differs with internal rom size -enum UPD7810_TYPE +enum UPD7810_TYPE { TYPE_7801, TYPE_78C05, diff --git a/src/emu/devcpu.h b/src/emu/devcpu.h index ef4df50ee24..e0b18364ca9 100644 --- a/src/emu/devcpu.h +++ b/src/emu/devcpu.h @@ -78,7 +78,7 @@ enum CPUINFO_INT_ADDRBUS_SHIFT_2 = CPUINFO_INT_ADDRBUS_SHIFT + 2, CPUINFO_INT_ADDRBUS_SHIFT_3 = CPUINFO_INT_ADDRBUS_SHIFT + 3, CPUINFO_INT_ADDRBUS_SHIFT_LAST = CPUINFO_INT_ADDRBUS_SHIFT + ADDRESS_SPACES - 1, - + // CPU-specific additionsg CPUINFO_INT_CONTEXT_SIZE = 0x04000, // R/O: size of CPU context in bytes CPUINFO_INT_INPUT_LINES, // R/O: number of input lines @@ -129,7 +129,7 @@ enum CPUINFO_PTR_DEFAULT_MEMORY_MAP_2 = CPUINFO_PTR_DEFAULT_MEMORY_MAP + 2, CPUINFO_PTR_DEFAULT_MEMORY_MAP_3 = CPUINFO_PTR_DEFAULT_MEMORY_MAP + 3, CPUINFO_PTR_DEFAULT_MEMORY_MAP_LAST = CPUINFO_PTR_DEFAULT_MEMORY_MAP + ADDRESS_SPACES - 1, - + // CPU-specific additions CPUINFO_PTR_INSTRUCTION_COUNTER = 0x14000, // R/O: int *icount diff --git a/src/emu/distate.c b/src/emu/distate.c index b11fb01f6bf..f2e1f708b07 100644 --- a/src/emu/distate.c +++ b/src/emu/distate.c @@ -464,8 +464,8 @@ int device_state_interface::state_string_max_length(int index) //------------------------------------------------- -// set_state_int - set the value of the given -// piece of indexed state from a UINT64 +// set_state_int - set the value of the given +// piece of indexed state from a UINT64 //------------------------------------------------- void device_state_interface::set_state_int(int index, UINT64 value) diff --git a/src/emu/distate.h b/src/emu/distate.h index 2893fa88741..281494c2bbe 100644 --- a/src/emu/distate.h +++ b/src/emu/distate.h @@ -163,7 +163,7 @@ public: void set_state_int(int index, UINT64 value); void set_state_string(int index, const char *string); void set_pc(offs_t pc) { set_state_int(STATE_GENPC, pc); } - + // deliberately ambiguous functions; if you have the state interface // just use it or pc() and pcbase() directly device_state_interface &state() { return *this; } @@ -213,7 +213,7 @@ typedef device_interface_iterator<device_state_interface> state_interface_iterat //------------------------------------------------- // device_t::safe_pc - return the current PC -// or 0 if no state object exists +// or 0 if no state object exists //------------------------------------------------- inline offs_t device_t::safe_pc() @@ -223,8 +223,8 @@ inline offs_t device_t::safe_pc() //------------------------------------------------- -// device_t::safe_pcbase - return the current PC -// base or 0 if no state object exists +// device_t::safe_pcbase - return the current PC +// base or 0 if no state object exists //------------------------------------------------- inline offs_t device_t::safe_pcbase() diff --git a/src/emu/drawgfx.c b/src/emu/drawgfx.c index ccca202a711..5051d22871a 100644 --- a/src/emu/drawgfx.c +++ b/src/emu/drawgfx.c @@ -348,7 +348,7 @@ void gfx_element::set_layout(const gfx_layout &gl, const UINT8 *srcdata) m_pen_usage.resize(m_total_elements); else m_pen_usage.reset(); - + // set the source set_source(srcdata); } @@ -402,7 +402,7 @@ void gfx_element::decode(UINT32 code) // zap the data to 0 UINT8 *decode_base = m_gfxdata + code * m_char_modulo; memset(decode_base, 0, m_char_modulo); - + // iterate over planes for (int plane = 0; plane < m_layout_planes; plane++) { @@ -414,7 +414,7 @@ void gfx_element::decode(UINT32 code) { int yoffs = planeoffs + m_layout_yoffset[y]; UINT8 *dp = decode_base + y * rowbytes(); - + // iterate over columns for (int x = 0; x < m_origwidth; x++) if (readbit(m_srcdata, yoffs + m_layout_xoffset[x])) diff --git a/src/emu/drawgfx.h b/src/emu/drawgfx.h index 4c6df80f1cf..c96c8570670 100644 --- a/src/emu/drawgfx.h +++ b/src/emu/drawgfx.h @@ -133,7 +133,7 @@ public: UINT32 colors() const { return m_total_colors; } UINT32 rowbytes() const { return m_line_modulo; } bool has_pen_usage() const { return (m_pen_usage.count() > 0); } - + // a bit gross that people muck with this stuff... const UINT8 *srcdata() const { return m_srcdata; } UINT32 dirtyseq() const { return m_dirtyseq; } @@ -156,17 +156,17 @@ public: const UINT8 *get_data(UINT32 code) { assert(code < elements()); - if (code < m_dirty.count() && m_dirty[code]) decode(code); + if (code < m_dirty.count() && m_dirty[code]) decode(code); return m_gfxdata + code * m_char_modulo + m_starty * m_line_modulo + m_startx; } - + UINT32 pen_usage(UINT32 code) { assert(code < m_pen_usage.count()); - if (m_dirty[code]) decode(code); + if (m_dirty[code]) decode(code); return m_pen_usage[code]; } - + private: // internal state UINT16 m_width; // current pixel width of each element (changeble with source clipping) diff --git a/src/emu/emuopts.c b/src/emu/emuopts.c index 3b35b59afe0..97114077ab2 100644 --- a/src/emu/emuopts.c +++ b/src/emu/emuopts.c @@ -518,7 +518,7 @@ void emu_options::set_system_name(const char *name) add_device_options(true); int num = 0; do { - num = options_count(); + num = options_count(); update_slot_options(); while (add_slot_options(false)); add_device_options(false); @@ -568,7 +568,7 @@ bool emu_options::parse_one_ini(const char *basename, int priority, astring *err const char *emu_options::main_value(astring &buffer, const char *name) const -{ +{ buffer = value(name); int pos = buffer.chr(0,','); if (pos!=-1) { @@ -578,7 +578,7 @@ const char *emu_options::main_value(astring &buffer, const char *name) const } const char *emu_options::sub_value(astring &buffer, const char *name, const char *subname) const -{ +{ astring tmp = ","; tmp.cat(subname); tmp.cat("="); diff --git a/src/emu/imagedev/floppy.c b/src/emu/imagedev/floppy.c index bd4409d55d3..7395b31b3a2 100644 --- a/src/emu/imagedev/floppy.c +++ b/src/emu/imagedev/floppy.c @@ -444,7 +444,7 @@ attotime floppy_image_device::get_next_transition(attotime from_when) else next_position = 200000000 + (buf[1] & floppy_image::TIME_MASK); - // logerror("Floppy: cuspos=%d nextpos=%d\n", position, next_position); + // logerror("Floppy: cuspos=%d nextpos=%d\n", position, next_position); return base + attotime::from_nsec(UINT64(next_position)*300/rpm); } diff --git a/src/emu/machine/53c810.c b/src/emu/machine/53c810.c index 3a1434ff017..95e1d60572a 100644 --- a/src/emu/machine/53c810.c +++ b/src/emu/machine/53c810.c @@ -393,7 +393,7 @@ void lsi53c810_device::dma_exec() UINT8 lsi53c810_device::lsi53c810_reg_r( int offset ) { -// logerror("53c810: read reg %d:0x%x (PC=%x)\n", offset, offset, space->device().safe_pc()); +// logerror("53c810: read reg %d:0x%x (PC=%x)\n", offset, offset, space->device().safe_pc()); switch(offset) { case 0x00: /* SCNTL0 */ @@ -476,7 +476,7 @@ UINT8 lsi53c810_device::lsi53c810_reg_r( int offset ) void lsi53c810_device::lsi53c810_reg_w(int offset, UINT8 data) { -// logerror("53c810: %02x to reg %d:0x%x (PC=%x)\n", data, offset, offset, space->device().safe_pc()); +// logerror("53c810: %02x to reg %d:0x%x (PC=%x)\n", data, offset, offset, space->device().safe_pc()); switch(offset) { case 0x00: /* SCNTL0 */ diff --git a/src/emu/machine/6526cia.h b/src/emu/machine/6526cia.h index b28952c4a2b..ea17eeae9d7 100644 --- a/src/emu/machine/6526cia.h +++ b/src/emu/machine/6526cia.h @@ -113,7 +113,7 @@ public: DECLARE_READ8_MEMBER( read ); DECLARE_WRITE8_MEMBER( write ); - + UINT8 reg_r(UINT8 offset); void reg_w(UINT8 offset, UINT8 data); diff --git a/src/emu/machine/68681.c b/src/emu/machine/68681.c index 45ecfa325bf..8257d562294 100644 --- a/src/emu/machine/68681.c +++ b/src/emu/machine/68681.c @@ -44,7 +44,7 @@ static const char *const duart68681_reg_write_names[0x10] = #define RX_FIFO_SIZE 3 -struct DUART68681_CHANNEL +struct DUART68681_CHANNEL { /* Registers */ UINT8 CR; /* Command register */ @@ -72,7 +72,7 @@ struct DUART68681_CHANNEL }; -struct duart68681_state +struct duart68681_state { /* device */ device_t *device; diff --git a/src/emu/machine/8042kbdc.h b/src/emu/machine/8042kbdc.h index 607b931b727..a54c59f885b 100644 --- a/src/emu/machine/8042kbdc.h +++ b/src/emu/machine/8042kbdc.h @@ -10,7 +10,7 @@ #ifndef KBDC8042_H #define KBDC8042_H -enum kbdc8042_type_t +enum kbdc8042_type_t { KBDC8042_STANDARD, KBDC8042_PS2, /* another timing of integrated controller */ diff --git a/src/emu/machine/latch8.h b/src/emu/machine/latch8.h index 2bd23c04ebf..a17b7a1839e 100644 --- a/src/emu/machine/latch8.h +++ b/src/emu/machine/latch8.h @@ -46,27 +46,27 @@ class latch8_device : public device_t public: latch8_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); ~latch8_device() { global_free(m_token); } - + // access to legacy token void *token() const { assert(m_token != NULL); return m_token; } latch8_config m_inline_config; - - void set_maskout(UINT32 maskout) { m_inline_config.maskout = maskout; } - void set_xorvalue(UINT32 xorvalue) { m_inline_config.xorvalue = xorvalue; } - void set_nosync(UINT32 nosync) { m_inline_config.nosync = nosync; } - - void set_discrete_node(const char *dev_tag, int bit, UINT32 node) { m_inline_config.node_device[bit] = dev_tag; m_inline_config.node_map[bit] = node; } - void set_devread(int bit, const char *tag, read8_device_func handler, int from_bit) + + void set_maskout(UINT32 maskout) { m_inline_config.maskout = maskout; } + void set_xorvalue(UINT32 xorvalue) { m_inline_config.xorvalue = xorvalue; } + void set_nosync(UINT32 nosync) { m_inline_config.nosync = nosync; } + + void set_discrete_node(const char *dev_tag, int bit, UINT32 node) { m_inline_config.node_device[bit] = dev_tag; m_inline_config.node_map[bit] = node; } + void set_devread(int bit, const char *tag, read8_device_func handler, int from_bit) { - m_inline_config.devread[bit].from_bit = from_bit; - m_inline_config.devread[bit].tag = tag; - m_inline_config.devread[bit].devread_handler = handler; + m_inline_config.devread[bit].from_bit = from_bit; + m_inline_config.devread[bit].tag = tag; + m_inline_config.devread[bit].devread_handler = handler; } - void set_read(int bit, read8_space_func handler, int from_bit) + void set_read(int bit, read8_space_func handler, int from_bit) { - m_inline_config.devread[bit].from_bit = from_bit; - m_inline_config.devread[bit].read_handler = handler; - } + m_inline_config.devread[bit].from_bit = from_bit; + m_inline_config.devread[bit].read_handler = handler; + } protected: // device-level overrides virtual void device_config_complete(); @@ -88,7 +88,7 @@ extern const device_type LATCH8; /* Bit mask specifying bits to be masked *out* */ #define MCFG_LATCH8_MASKOUT(_maskout) \ - static_cast<latch8_device *>(device)->set_maskout(_maskout); + static_cast<latch8_device *>(device)->set_maskout(_maskout); /* Bit mask specifying bits to be inverted */ #define MCFG_LATCH8_INVERT(_xor) \ diff --git a/src/emu/machine/m6m80011ap.h b/src/emu/machine/m6m80011ap.h index 47abaf05c03..f84e7f59e12 100644 --- a/src/emu/machine/m6m80011ap.h +++ b/src/emu/machine/m6m80011ap.h @@ -24,7 +24,7 @@ Template for skeleton device // TYPE DEFINITIONS //************************************************************************** -enum eeprom_cmd_t +enum eeprom_cmd_t { EEPROM_GET_CMD = 0, EEPROM_READ, diff --git a/src/emu/machine/matsucd.c b/src/emu/machine/matsucd.c index f913812822b..55476a696ed 100644 --- a/src/emu/machine/matsucd.c +++ b/src/emu/machine/matsucd.c @@ -27,7 +27,7 @@ can be expanded with support for the other drives as needed. #define MATSU_STATUS_MEDIA ( 1 << 6 ) /* media present (in caddy or tray) */ #define MATSU_STATUS_DOORCLOSED ( 1 << 7 ) /* tray status */ -struct matsucd +struct matsucd { UINT8 enabled; /* /ENABLE - Unit enabled */ UINT8 cmd_signal; /* /CMD - Command mode */ diff --git a/src/emu/machine/msm6242.h b/src/emu/machine/msm6242.h index 7e6fa35ad60..47bd8ed0ad3 100644 --- a/src/emu/machine/msm6242.h +++ b/src/emu/machine/msm6242.h @@ -30,7 +30,7 @@ struct msm6242_interface devcb_write_line m_out_int_cb; }; -struct rtc_regs_t +struct rtc_regs_t { UINT8 sec, min, hour, day, wday, month; UINT16 year; diff --git a/src/emu/machine/net_lib.c b/src/emu/machine/net_lib.c index 6d803178a5e..cd86c529566 100644 --- a/src/emu/machine/net_lib.c +++ b/src/emu/machine/net_lib.c @@ -910,11 +910,11 @@ static net_device_t_base_factory *netregistry[] = { ENTRY(netdev_ttl_const, NETDEV_TTL_CONST) ENTRY(netdev_analog_const, NETDEV_ANALOG_CONST) - ENTRY(netdev_logic_input, NETDEV_LOGIC_INPUT) + ENTRY(netdev_logic_input, NETDEV_LOGIC_INPUT) ENTRY(netdev_analog_input, NETDEV_ANALOG_INPUT) ENTRY(netdev_clock, NETDEV_CLOCK) - ENTRY(netdev_callback, NETDEV_CALLBACK) - ENTRY(nicMultiSwitch, NETDEV_SWITCH2) + ENTRY(netdev_callback, NETDEV_CALLBACK) + ENTRY(nicMultiSwitch, NETDEV_SWITCH2) ENTRY(nicRSFF, NETDEV_RSFF) ENTRY(nicMixer8, NETDEV_MIXER) ENTRY(nic7400, TTL_7400_NAND) diff --git a/src/emu/machine/net_lib.h b/src/emu/machine/net_lib.h index e99ec2ac05d..2b6c6801310 100644 --- a/src/emu/machine/net_lib.h +++ b/src/emu/machine/net_lib.h @@ -94,7 +94,7 @@ #define TTL_7402_NOR(_name, _I1, _I2) \ NET_REGISTER_DEV(nic7402, _name) \ - NET_CONNECT(_name, I1, _I1) \ + NET_CONNECT(_name, I1, _I1) \ NET_CONNECT(_name, I2, _I2) \ #define TTL_7404_INVERT(_name, _I1) \ @@ -147,7 +147,7 @@ #define TTL_7486_XOR(_name, _I1, _I2) \ NET_REGISTER_DEV(nic7486, _name) \ - NET_CONNECT(_name, I1, _I1) \ + NET_CONNECT(_name, I1, _I1) \ NET_CONNECT(_name, I2, _I2) \ #define TTL_7448(_name, _A0, _A1, _A2, _A3, _LTQ, _BIQ, _RBIQ) \ @@ -201,7 +201,7 @@ NET_CONNECT(_name, K, _K) \ NET_CONNECT(_name, CLRQ, _CLRQ) \ -#define TTL_74107(_name, _CLK, _J, _K, _CLRQ) \ +#define TTL_74107(_name, _CLK, _J, _K, _CLRQ) \ TTL_74107A(_name, _CLK, _J, _K, _CLRQ) #define TTL_74153(_name, _A1, _A2, _A3, _A4, _A, _B, _GA) \ @@ -408,7 +408,7 @@ class nic74107 : public nic74107A { public: nic74107() - : nic74107A() {} + : nic74107A() {} }; diff --git a/src/emu/machine/netlist.c b/src/emu/machine/netlist.c index a0bd2065fb0..53f633a3cb0 100644 --- a/src/emu/machine/netlist.c +++ b/src/emu/machine/netlist.c @@ -68,7 +68,7 @@ #if KEEP_STATISTICS #define add_to_stat(v,x) do { v += (x); } while (0) #define inc_stat(v) add_to_stat(v, 1) -#define begin_timing(v) do { (v) -= get_profile_ticks(); } while (0) +#define begin_timing(v) do { (v) -= get_profile_ticks(); } while (0) #define end_timing(v) do { (v) += get_profile_ticks(); } while (0) #else #define add_to_stat(v,x) do { } while (0) @@ -386,7 +386,7 @@ ATTR_HOT ATTR_ALIGN void netlist_base_t::process_list(INT32 &atime) while ( (atime > 0) && (m_queue.is_not_empty())) { queue_t::entry_t e = m_queue.pop(); - netlist_time delta = e.time() - m_time_ps + netlist_time::from_raw(m_rem); + netlist_time delta = e.time() - m_time_ps + netlist_time::from_raw(m_rem); atime -= divu_64x32_rem(delta.as_raw(), m_div, &m_rem); m_time_ps = e.time(); @@ -583,8 +583,8 @@ void netlist_setup_t::resolve_inputs(void) if (out.object_type(net_output_t::SIGNAL_MASK) == net_output_t::SIGNAL_ANALOG && in->object_type(net_output_t::SIGNAL_MASK) == net_output_t::SIGNAL_DIGITAL) { - // fatalerror("connecting analog output %s with %s\n", out.netdev()->name(), in->netdev()->name()); - // fatalerror("connecting analog output %s with %s\n", out.netdev()->name(), in->netdev()->name()); + // fatalerror("connecting analog output %s with %s\n", out.netdev()->name(), in->netdev()->name()); + // fatalerror("connecting analog output %s with %s\n", out.netdev()->name(), in->netdev()->name()); netdev_a_to_d_proxy *proxy = new netdev_a_to_d_proxy(*in); proxy->init(this, "abc"); proxy->start(); @@ -933,7 +933,7 @@ void netlist_mame_device::device_reset() void netlist_mame_device::device_stop() { m_setup->print_stats(); - + global_free(m_setup); global_free(m_netlist); } @@ -972,9 +972,9 @@ ATTR_HOT void netlist_mame_device::execute_run() //bool check_debugger = ((device_t::machine().debug_flags & DEBUG_FLAG_ENABLED) != 0); // debugging - //m_ppc = m_pc; // copy PC to previous PC + //m_ppc = m_pc; // copy PC to previous PC //if (check_debugger) - // debugger_instruction_hook(this, 0); //m_pc); + // debugger_instruction_hook(this, 0); //m_pc); m_netlist->process_list(m_icount); diff --git a/src/emu/machine/netlist.h b/src/emu/machine/netlist.h index ae50b59c058..a73ce54b65b 100644 --- a/src/emu/machine/netlist.h +++ b/src/emu/machine/netlist.h @@ -58,7 +58,7 @@ #define USE_DELEGATES (1) #define USE_DELEGATES_A (0) -#define NETLIST_CLOCK (U64(1000000000)) +#define NETLIST_CLOCK (U64(1000000000)) #define NLTIME_FROM_NS(_t) netlist_time::from_ns(_t) #define NLTIME_FROM_US(_t) netlist_time::from_us(_t) @@ -100,11 +100,11 @@ ATTR_COLD void NETLIST_NAME(_name)(netlist_setup_t &netlist) \ #define NETLIST_END } -#define NETLIST_INCLUDE(_name) \ +#define NETLIST_INCLUDE(_name) \ NETLIST_NAME(_name)(netlist); \ -#define NETLIST_MEMREGION(_name) \ +#define NETLIST_MEMREGION(_name) \ netlist.parse((char *)downcast<netlist_t &>(netlist.netlist()).machine().root_device().memregion(_name)->base()); \ #if defined(__GNUC__) && (__GNUC__ >= 3) @@ -129,7 +129,7 @@ ATTR_COLD void NETLIST_NAME(_name)(netlist_setup_t &netlist) \ #define NETLIB_SIGNAL(_name, _num_input, _check) \ class _name : public net_signal_t<_num_input, _check> \ { \ - public: \ + public: \ _name () : net_signal_t<_num_input, _check>() { } \ }; \ @@ -168,15 +168,15 @@ ATTR_COLD void NETLIST_NAME(_name)(netlist_setup_t &netlist) \ // MAME specific -#define MCFG_NETLIST_ADD(_tag, _setup ) \ - MCFG_DEVICE_ADD(_tag, NETLIST, NETLIST_CLOCK) \ - MCFG_NETLIST_SETUP(_setup) \ +#define MCFG_NETLIST_ADD(_tag, _setup ) \ + MCFG_DEVICE_ADD(_tag, NETLIST, NETLIST_CLOCK) \ + MCFG_NETLIST_SETUP(_setup) \ -#define MCFG_NETLIST_REPLACE(_tag, _setup) \ +#define MCFG_NETLIST_REPLACE(_tag, _setup) \ MCFG_DEVICE_REPLACE(_tag, NETLIST, NETLIST_CLOCK) \ - MCFG_NETLIST_SETUP(_setup) \ + MCFG_NETLIST_SETUP(_setup) \ -#define MCFG_NETLIST_SETUP(_setup) \ +#define MCFG_NETLIST_SETUP(_setup) \ netlist_mame_device::static_set_constructor(*device, NETLIST_NAME(_setup)); \ @@ -402,7 +402,7 @@ public: TYPE_MASK = 0x03, SIGNAL_DIGITAL = 0x00, SIGNAL_ANALOG = 0x10, - SIGNAL_MASK = 0x10, + SIGNAL_MASK = 0x10, }; net_object_t(int atype) @@ -510,8 +510,8 @@ public: friend net_sig_t logic_input_t::Q() const; - ATTR_HOT inline const net_sig_t last_Q() const { return m_last_Q; } - ATTR_HOT inline const net_sig_t new_Q() const { return m_new_Q; } + ATTR_HOT inline const net_sig_t last_Q() const { return m_last_Q; } + ATTR_HOT inline const net_sig_t new_Q() const { return m_new_Q; } ATTR_HOT inline const double Q_Analog() const { @@ -519,14 +519,14 @@ public: { case SIGNAL_DIGITAL: return m_Q ? m_high_V : m_low_V; case SIGNAL_ANALOG: return m_Q_analog; - default: assert(true); + default: assert(true); } return 0; } inline net_sig_t *Q_ptr() { return &m_Q; } - inline net_sig_t *new_Q_ptr() { return &m_new_Q; } + inline net_sig_t *new_Q_ptr() { return &m_new_Q; } ATTR_COLD void register_con(net_input_t &inp); @@ -544,9 +544,9 @@ public: protected: /* prohibit use in device functions - * current (pending) state can be inquired using new_Q() - */ - ATTR_HOT inline const net_sig_t Q() const { return m_Q; } + * current (pending) state can be inquired using new_Q() + */ + ATTR_HOT inline const net_sig_t Q() const { return m_Q; } ATTR_HOT inline void register_in_listPS(const netlist_time &delay_ps); @@ -612,8 +612,8 @@ public: } ATTR_COLD void initial(const net_sig_t val) { m_Q = val; m_new_Q = val; m_last_Q = !val; } - ATTR_HOT inline void clear() { set_Q_PS(0, netlist_time::zero); } - ATTR_HOT inline void set() { set_Q_PS(1, netlist_time::zero); } + ATTR_HOT inline void clear() { set_Q_PS(0, netlist_time::zero); } + ATTR_HOT inline void set() { set_Q_PS(1, netlist_time::zero); } ATTR_HOT inline void setToPS(const UINT8 val, const netlist_time &delay_ps) { set_Q_PS(val, delay_ps); } ATTR_HOT inline void setToNoCheckPS(const UINT8 val, const netlist_time &delay_ps) { set_Q_NoCheckPS(val, delay_ps); } ATTR_COLD inline void set_levels(const double low, const double high) @@ -768,7 +768,7 @@ public: inline void initial(const double val) { m_param = val; } inline void initial(const int val) { m_param = val; } - ATTR_HOT inline double Value() const { return m_param; } + ATTR_HOT inline double Value() const { return m_param; } ATTR_HOT inline int ValueInt() const { return (int) m_param; } ATTR_HOT inline net_core_device_t &netdev() const { return *m_netdev; } @@ -922,7 +922,7 @@ public: protected: netlist_time m_time_ps; UINT32 m_rem; - UINT32 m_div; + UINT32 m_div; queue_t m_queue; diff --git a/src/emu/machine/pc16552d.c b/src/emu/machine/pc16552d.c index 50cbb9cc71b..02ed609ba53 100644 --- a/src/emu/machine/pc16552d.c +++ b/src/emu/machine/pc16552d.c @@ -34,7 +34,7 @@ #define INT_ENABLE_RX_LINE_STATUS 0x04 #define INT_ENABLE_MODEM_STATUS 0x08 -struct PC16552D_CHANNEL +struct PC16552D_CHANNEL { UINT16 divisor; UINT8 reg[8]; @@ -50,7 +50,7 @@ struct PC16552D_CHANNEL emu_timer *tx_fifo_timer; }; -struct PC16552D_REGS +struct PC16552D_REGS { PC16552D_CHANNEL ch[2]; int frequency; diff --git a/src/emu/machine/pckeybrd.h b/src/emu/machine/pckeybrd.h index 28575cb151d..76c8366c505 100644 --- a/src/emu/machine/pckeybrd.h +++ b/src/emu/machine/pckeybrd.h @@ -12,7 +12,7 @@ #ifndef PCKEYBRD_H #define PCKEYBRD_H -enum AT_KEYBOARD_TYPE +enum AT_KEYBOARD_TYPE { AT_KEYBOARD_TYPE_PC, AT_KEYBOARD_TYPE_AT, diff --git a/src/emu/machine/pic8259.c b/src/emu/machine/pic8259.c index e0e9bda9c70..d48f527d516 100644 --- a/src/emu/machine/pic8259.c +++ b/src/emu/machine/pic8259.c @@ -20,7 +20,7 @@ #define LOG_OCW 0 #define LOG_GENERAL 0 -enum pic8259_state_t +enum pic8259_state_t { STATE_ICW1, STATE_ICW2, diff --git a/src/emu/machine/pit8253.c b/src/emu/machine/pit8253.c index dfbe2b3df70..d4ba1b2ebaa 100644 --- a/src/emu/machine/pit8253.c +++ b/src/emu/machine/pit8253.c @@ -82,7 +82,7 @@ struct pit8253_timer UINT32 cycles_to_output; /* cycles until output callback called */ }; -struct pit8253_t +struct pit8253_t { const pit8253_config *config; int device_type; diff --git a/src/emu/machine/rp5h01.c b/src/emu/machine/rp5h01.c index 35e3f3fae5b..6a5bb9e2d63 100644 --- a/src/emu/machine/rp5h01.c +++ b/src/emu/machine/rp5h01.c @@ -2,9 +2,9 @@ RP5H01 - TODO: - - convert to modern and follow the datasheet better (all dumps - presumably needs to be redone from scratch?) + TODO: + - convert to modern and follow the datasheet better (all dumps + presumably needs to be redone from scratch?) 2009-06 Converted to be a device diff --git a/src/emu/machine/rtc9701.h b/src/emu/machine/rtc9701.h index 8f08891beed..5cc6bfbd387 100644 --- a/src/emu/machine/rtc9701.h +++ b/src/emu/machine/rtc9701.h @@ -26,7 +26,7 @@ //************************************************************************** -enum rtc9701_state_t +enum rtc9701_state_t { RTC9701_CMD_WAIT = 0, RTC9701_RTC_READ, @@ -37,7 +37,7 @@ enum rtc9701_state_t }; -struct rtc_regs_t +struct rtc_regs_t { UINT8 sec, min, hour, day, wday, month, year; }; diff --git a/src/emu/machine/s3520cf.c b/src/emu/machine/s3520cf.c index d178f474f62..16494011520 100644 --- a/src/emu/machine/s3520cf.c +++ b/src/emu/machine/s3520cf.c @@ -210,7 +210,7 @@ WRITE_LINE_MEMBER( s3520cf_device::set_cs_line ) WRITE_LINE_MEMBER( s3520cf_device::write_bit ) { m_latch = state; -// printf("%d LATCH LINE\n",state); +// printf("%d LATCH LINE\n",state); } WRITE_LINE_MEMBER( s3520cf_device::set_clock_line ) diff --git a/src/emu/machine/s3520cf.h b/src/emu/machine/s3520cf.h index 2f231f404b1..73a2b0a6e40 100644 --- a/src/emu/machine/s3520cf.h +++ b/src/emu/machine/s3520cf.h @@ -23,13 +23,13 @@ Template for skeleton device // TYPE DEFINITIONS //************************************************************************** -enum s3520cf_state_t +enum s3520cf_state_t { RTC_SET_ADDRESS = 0, RTC_SET_DATA }; -struct rtc_regs_t +struct rtc_regs_t { UINT8 sec, min, hour, day, wday, month, year; }; diff --git a/src/emu/machine/s3c2400.c b/src/emu/machine/s3c2400.c index e1a35e54ffe..bca0e4614ff 100644 --- a/src/emu/machine/s3c2400.c +++ b/src/emu/machine/s3c2400.c @@ -62,7 +62,7 @@ DEVICE_START( s3c2400 ) space->install_legacy_readwrite_handler( *device, 0x15800000, 0x15800007, FUNC(s3c24xx_adc_r), FUNC(s3c24xx_adc_w)); space->install_legacy_readwrite_handler( *device, 0x15900000, 0x15900017, FUNC(s3c24xx_spi_0_r), FUNC(s3c24xx_spi_0_w)); space->install_legacy_readwrite_handler( *device, 0x15a00000, 0x15a0003f, FUNC(s3c24xx_mmc_r), FUNC(s3c24xx_mmc_w)); - + s3c24xx_video_start( device, device->machine()); } diff --git a/src/emu/machine/s3c2400.h b/src/emu/machine/s3c2400.h index d59e5ee4120..f1e1ee4f4d5 100644 --- a/src/emu/machine/s3c2400.h +++ b/src/emu/machine/s3c2400.h @@ -38,10 +38,10 @@ class s3c2400_device : public device_t public: s3c2400_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); ~s3c2400_device() { global_free(m_token); } - + // access to legacy token void *token() const { assert(m_token != NULL); return m_token; } - + // device-level overrides virtual void device_config_complete(); virtual void device_start(); @@ -49,7 +49,7 @@ public: private: // internal state void *m_token; -public: +public: UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); }; @@ -407,17 +407,17 @@ void s3c2400_uart_fifo_w( device_t *device, int uart, UINT8 data); TYPE DEFINITIONS *******************************************************************************/ -struct s3c24xx_memcon_regs_t +struct s3c24xx_memcon_regs_t { UINT32 data[0x34/4]; }; -struct s3c24xx_usbhost_regs_t +struct s3c24xx_usbhost_regs_t { UINT32 data[0x5C/4]; }; -struct s3c24xx_irq_regs_t +struct s3c24xx_irq_regs_t { UINT32 srcpnd; UINT32 intmod; @@ -427,7 +427,7 @@ struct s3c24xx_irq_regs_t UINT32 intoffset; }; -struct s3c24xx_dma_regs_t +struct s3c24xx_dma_regs_t { UINT32 disrc; UINT32 didst; @@ -438,7 +438,7 @@ struct s3c24xx_dma_regs_t UINT32 dmasktrig; }; -struct s3c24xx_clkpow_regs_t +struct s3c24xx_clkpow_regs_t { UINT32 locktime; UINT32 mpllcon; @@ -448,7 +448,7 @@ struct s3c24xx_clkpow_regs_t UINT32 clkdivn; }; -struct s3c24xx_lcd_regs_t +struct s3c24xx_lcd_regs_t { UINT32 lcdcon1; UINT32 lcdcon2; @@ -466,12 +466,12 @@ struct s3c24xx_lcd_regs_t UINT32 tpal; }; -struct s3c24xx_lcdpal_regs_t +struct s3c24xx_lcdpal_regs_t { UINT32 data[0x400/4]; }; -struct s3c24xx_uart_regs_t +struct s3c24xx_uart_regs_t { UINT32 ulcon; UINT32 ucon; @@ -486,7 +486,7 @@ struct s3c24xx_uart_regs_t UINT32 ubrdiv; }; -struct s3c24xx_pwm_regs_t +struct s3c24xx_pwm_regs_t { UINT32 tcfg0; UINT32 tcfg1; @@ -507,19 +507,19 @@ struct s3c24xx_pwm_regs_t UINT32 tcnto4; }; -struct s3c24xx_usbdev_regs_t +struct s3c24xx_usbdev_regs_t { UINT32 data[0xBC/4]; }; -struct s3c24xx_wdt_regs_t +struct s3c24xx_wdt_regs_t { UINT32 wtcon; UINT32 wtdat; UINT32 wtcnt; }; -struct s3c24xx_iic_regs_t +struct s3c24xx_iic_regs_t { UINT32 iiccon; UINT32 iicstat; @@ -527,7 +527,7 @@ struct s3c24xx_iic_regs_t UINT32 iicds; }; -struct s3c24xx_iis_regs_t +struct s3c24xx_iis_regs_t { UINT32 iiscon; UINT32 iismod; @@ -536,7 +536,7 @@ struct s3c24xx_iis_regs_t UINT32 iisfifo; }; -struct s3c24xx_gpio_regs_t +struct s3c24xx_gpio_regs_t { UINT32 gpacon; UINT32 gpadat; @@ -563,7 +563,7 @@ struct s3c24xx_gpio_regs_t UINT32 extint; }; -struct s3c24xx_rtc_regs_t +struct s3c24xx_rtc_regs_t { UINT32 rtccon; UINT32 ticnt; @@ -585,13 +585,13 @@ struct s3c24xx_rtc_regs_t UINT32 bcdyear; }; -struct s3c24xx_adc_regs_t +struct s3c24xx_adc_regs_t { UINT32 adccon; UINT32 adcdat; }; -struct s3c24xx_spi_regs_t +struct s3c24xx_spi_regs_t { UINT32 spcon; UINT32 spsta; @@ -601,39 +601,39 @@ struct s3c24xx_spi_regs_t UINT32 sprdat; }; -struct s3c24xx_mmc_regs_t +struct s3c24xx_mmc_regs_t { UINT32 data[0x40/4]; }; -struct s3c24xx_memcon_t +struct s3c24xx_memcon_t { s3c24xx_memcon_regs_t regs; }; -struct s3c24xx_usbhost_t +struct s3c24xx_usbhost_t { s3c24xx_usbhost_regs_t regs; }; -struct s3c24xx_irq_t +struct s3c24xx_irq_t { s3c24xx_irq_regs_t regs; int line_irq, line_fiq; }; -struct s3c24xx_dma_t +struct s3c24xx_dma_t { s3c24xx_dma_regs_t regs; emu_timer *timer; }; -struct s3c24xx_clkpow_t +struct s3c24xx_clkpow_t { s3c24xx_clkpow_regs_t regs; }; -struct s3c24xx_lcd_t +struct s3c24xx_lcd_t { s3c24xx_lcd_regs_t regs; emu_timer *timer; @@ -652,17 +652,17 @@ struct s3c24xx_lcd_t UINT32 dma_data, dma_bits; }; -struct s3c24xx_lcdpal_t +struct s3c24xx_lcdpal_t { s3c24xx_lcdpal_regs_t regs; }; -struct s3c24xx_uart_t +struct s3c24xx_uart_t { s3c24xx_uart_regs_t regs; }; -struct s3c24xx_pwm_t +struct s3c24xx_pwm_t { s3c24xx_pwm_regs_t regs; emu_timer *timer[5]; @@ -671,25 +671,25 @@ struct s3c24xx_pwm_t UINT32 freq[5]; }; -struct s3c24xx_usbdev_t +struct s3c24xx_usbdev_t { s3c24xx_usbdev_regs_t regs; }; -struct s3c24xx_wdt_t +struct s3c24xx_wdt_t { s3c24xx_wdt_regs_t regs; emu_timer *timer; }; -struct s3c24xx_iic_t +struct s3c24xx_iic_t { s3c24xx_iic_regs_t regs; emu_timer *timer; int count; }; -struct s3c24xx_iis_t +struct s3c24xx_iis_t { s3c24xx_iis_regs_t regs; emu_timer *timer; @@ -697,34 +697,34 @@ struct s3c24xx_iis_t int fifo_index; }; -struct s3c24xx_gpio_t +struct s3c24xx_gpio_t { s3c24xx_gpio_regs_t regs; }; -struct s3c24xx_rtc_t +struct s3c24xx_rtc_t { s3c24xx_rtc_regs_t regs; emu_timer *timer_tick_count; emu_timer *timer_update; }; -struct s3c24xx_adc_t +struct s3c24xx_adc_t { s3c24xx_adc_regs_t regs; }; -struct s3c24xx_spi_t +struct s3c24xx_spi_t { s3c24xx_spi_regs_t regs; }; -struct s3c24xx_mmc_t +struct s3c24xx_mmc_t { s3c24xx_mmc_regs_t regs; }; -struct s3c24xx_t +struct s3c24xx_t { const s3c2400_interface *iface; s3c24xx_memcon_t memcon; diff --git a/src/emu/machine/s3c2410.c b/src/emu/machine/s3c2410.c index cce1a811700..6cbbad3c2c6 100644 --- a/src/emu/machine/s3c2410.c +++ b/src/emu/machine/s3c2410.c @@ -65,7 +65,7 @@ DEVICE_START( s3c2410 ) space->install_legacy_readwrite_handler( *device, 0x59000000, 0x59000017, FUNC(s3c24xx_spi_0_r), FUNC(s3c24xx_spi_0_w)); space->install_legacy_readwrite_handler( *device, 0x59000020, 0x59000037, FUNC(s3c24xx_spi_1_r), FUNC(s3c24xx_spi_1_w)); space->install_legacy_readwrite_handler( *device, 0x5a000000, 0x5a000043, FUNC(s3c24xx_sdi_r), FUNC(s3c24xx_sdi_w)); - + s3c24xx_video_start( device, device->machine()); } diff --git a/src/emu/machine/s3c2410.h b/src/emu/machine/s3c2410.h index 0054f2c026c..0ed2cf85c2e 100644 --- a/src/emu/machine/s3c2410.h +++ b/src/emu/machine/s3c2410.h @@ -46,7 +46,7 @@ class s3c2410_device : public device_t public: s3c2410_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); ~s3c2410_device() { global_free(m_token); } - + // access to legacy token void *token() const { assert(m_token != NULL); return m_token; } // device-level overrides @@ -56,7 +56,7 @@ public: private: // internal state void *m_token; -public: +public: UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); }; @@ -498,17 +498,17 @@ static const UINT32 MAP_SUBINT_TO_INT[11] = TYPE DEFINITIONS *******************************************************************************/ -struct s3c24xx_memcon_regs_t +struct s3c24xx_memcon_regs_t { UINT32 data[0x34/4]; }; -struct s3c24xx_usbhost_regs_t +struct s3c24xx_usbhost_regs_t { UINT32 data[0x5C/4]; }; -struct s3c24xx_irq_regs_t +struct s3c24xx_irq_regs_t { UINT32 srcpnd; UINT32 intmod; @@ -520,7 +520,7 @@ struct s3c24xx_irq_regs_t UINT32 intsubmsk; }; -struct s3c24xx_dma_regs_t +struct s3c24xx_dma_regs_t { UINT32 disrc; UINT32 disrcc; @@ -533,7 +533,7 @@ struct s3c24xx_dma_regs_t UINT32 dmasktrig; }; -struct s3c24xx_clkpow_regs_t +struct s3c24xx_clkpow_regs_t { UINT32 locktime; UINT32 mpllcon; @@ -543,7 +543,7 @@ struct s3c24xx_clkpow_regs_t UINT32 clkdivn; }; -struct s3c24xx_lcd_regs_t +struct s3c24xx_lcd_regs_t { UINT32 lcdcon1; UINT32 lcdcon2; @@ -565,12 +565,12 @@ struct s3c24xx_lcd_regs_t UINT32 lpcsel; }; -struct s3c24xx_lcdpal_regs_t +struct s3c24xx_lcdpal_regs_t { UINT32 data[0x400/4]; }; -struct s3c24xx_nand_regs_t +struct s3c24xx_nand_regs_t { UINT32 nfconf; UINT32 nfcmd; @@ -580,7 +580,7 @@ struct s3c24xx_nand_regs_t UINT32 nfecc; }; -struct s3c24xx_uart_regs_t +struct s3c24xx_uart_regs_t { UINT32 ulcon; UINT32 ucon; @@ -595,7 +595,7 @@ struct s3c24xx_uart_regs_t UINT32 ubrdiv; }; -struct s3c24xx_pwm_regs_t +struct s3c24xx_pwm_regs_t { UINT32 tcfg0; UINT32 tcfg1; @@ -616,19 +616,19 @@ struct s3c24xx_pwm_regs_t UINT32 tcnto4; }; -struct s3c24xx_usbdev_regs_t +struct s3c24xx_usbdev_regs_t { UINT32 data[0x130/4]; }; -struct s3c24xx_wdt_regs_t +struct s3c24xx_wdt_regs_t { UINT32 wtcon; UINT32 wtdat; UINT32 wtcnt; }; -struct s3c24xx_iic_regs_t +struct s3c24xx_iic_regs_t { UINT32 iiccon; UINT32 iicstat; @@ -636,7 +636,7 @@ struct s3c24xx_iic_regs_t UINT32 iicds; }; -struct s3c24xx_iis_regs_t +struct s3c24xx_iis_regs_t { UINT32 iiscon; UINT32 iismod; @@ -645,7 +645,7 @@ struct s3c24xx_iis_regs_t UINT32 iisfifo; }; -struct s3c24xx_gpio_regs_t +struct s3c24xx_gpio_regs_t { UINT32 gpacon; UINT32 gpadat; @@ -697,7 +697,7 @@ struct s3c24xx_gpio_regs_t UINT32 gstatus4; }; -struct s3c24xx_rtc_regs_t +struct s3c24xx_rtc_regs_t { UINT32 rtccon; UINT32 ticnt; @@ -719,7 +719,7 @@ struct s3c24xx_rtc_regs_t UINT32 bcdyear; }; -struct s3c24xx_adc_regs_t +struct s3c24xx_adc_regs_t { UINT32 adccon; UINT32 adctsc; @@ -728,7 +728,7 @@ struct s3c24xx_adc_regs_t UINT32 adcdat1; }; -struct s3c24xx_spi_regs_t +struct s3c24xx_spi_regs_t { UINT32 spcon; UINT32 spsta; @@ -738,39 +738,39 @@ struct s3c24xx_spi_regs_t UINT32 sprdat; }; -struct s3c24xx_sdi_regs_t +struct s3c24xx_sdi_regs_t { UINT32 data[0x44/4]; }; -struct s3c24xx_memcon_t +struct s3c24xx_memcon_t { s3c24xx_memcon_regs_t regs; }; -struct s3c24xx_usbhost_t +struct s3c24xx_usbhost_t { s3c24xx_usbhost_regs_t regs; }; -struct s3c24xx_irq_t +struct s3c24xx_irq_t { s3c24xx_irq_regs_t regs; int line_irq, line_fiq; }; -struct s3c24xx_dma_t +struct s3c24xx_dma_t { s3c24xx_dma_regs_t regs; emu_timer *timer; }; -struct s3c24xx_clkpow_t +struct s3c24xx_clkpow_t { s3c24xx_clkpow_regs_t regs; }; -struct s3c24xx_lcd_t +struct s3c24xx_lcd_t { s3c24xx_lcd_regs_t regs; emu_timer *timer; @@ -789,24 +789,24 @@ struct s3c24xx_lcd_t UINT32 dma_data, dma_bits; }; -struct s3c24xx_lcdpal_t +struct s3c24xx_lcdpal_t { s3c24xx_lcdpal_regs_t regs; }; -struct s3c24xx_nand_t +struct s3c24xx_nand_t { s3c24xx_nand_regs_t regs; UINT8 mecc[3]; int ecc_pos, data_count; }; -struct s3c24xx_uart_t +struct s3c24xx_uart_t { s3c24xx_uart_regs_t regs; }; -struct s3c24xx_pwm_t +struct s3c24xx_pwm_t { s3c24xx_pwm_regs_t regs; emu_timer *timer[5]; @@ -815,26 +815,26 @@ struct s3c24xx_pwm_t UINT32 freq[5]; }; -struct s3c24xx_usbdev_t +struct s3c24xx_usbdev_t { s3c24xx_usbdev_regs_t regs; }; -struct s3c24xx_wdt_t +struct s3c24xx_wdt_t { s3c24xx_wdt_regs_t regs; emu_timer *timer; UINT32 freq, cnt; }; -struct s3c24xx_iic_t +struct s3c24xx_iic_t { s3c24xx_iic_regs_t regs; emu_timer *timer; int count; }; -struct s3c24xx_iis_t +struct s3c24xx_iis_t { s3c24xx_iis_regs_t regs; emu_timer *timer; @@ -842,34 +842,34 @@ struct s3c24xx_iis_t int fifo_index; }; -struct s3c24xx_gpio_t +struct s3c24xx_gpio_t { s3c24xx_gpio_regs_t regs; }; -struct s3c24xx_rtc_t +struct s3c24xx_rtc_t { s3c24xx_rtc_regs_t regs; emu_timer *timer_tick_count; emu_timer *timer_update; }; -struct s3c24xx_adc_t +struct s3c24xx_adc_t { s3c24xx_adc_regs_t regs; }; -struct s3c24xx_spi_t +struct s3c24xx_spi_t { s3c24xx_spi_regs_t regs; }; -struct s3c24xx_sdi_t +struct s3c24xx_sdi_t { s3c24xx_sdi_regs_t regs; }; -struct s3c24xx_t +struct s3c24xx_t { const s3c2410_interface *iface; UINT8 steppingstone[4*1024]; diff --git a/src/emu/machine/s3c2440.c b/src/emu/machine/s3c2440.c index 2ff3405cd4d..1c84ffed35b 100644 --- a/src/emu/machine/s3c2440.c +++ b/src/emu/machine/s3c2440.c @@ -67,7 +67,7 @@ DEVICE_START( s3c2440 ) space->install_legacy_readwrite_handler( *device, 0x5a000000, 0x5a000043, FUNC(s3c24xx_sdi_r), FUNC(s3c24xx_sdi_w)); space->install_legacy_readwrite_handler( *device, 0x5b000000, 0x5b00001f, FUNC(s3c24xx_ac97_r), FUNC(s3c24xx_ac97_w)); DEVICE_START_CALL(s3c24xx); - + s3c24xx_video_start( device, device->machine()); } diff --git a/src/emu/machine/s3c2440.h b/src/emu/machine/s3c2440.h index 3f386d77852..cffcd69b0d3 100644 --- a/src/emu/machine/s3c2440.h +++ b/src/emu/machine/s3c2440.h @@ -45,7 +45,7 @@ class s3c2440_device : public device_t public: s3c2440_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); ~s3c2440_device() { global_free(m_token); } - + // access to legacy token void *token() const { assert(m_token != NULL); return m_token; } protected: @@ -56,7 +56,7 @@ protected: private: // internal state void *m_token; -public: +public: UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); }; @@ -527,17 +527,17 @@ static const UINT32 MAP_SUBINT_TO_INT[15] = TYPE DEFINITIONS *******************************************************************************/ -struct s3c24xx_memcon_regs_t +struct s3c24xx_memcon_regs_t { UINT32 data[0x34/4]; }; -struct s3c24xx_usbhost_regs_t +struct s3c24xx_usbhost_regs_t { UINT32 data[0x5C/4]; }; -struct s3c24xx_irq_regs_t +struct s3c24xx_irq_regs_t { UINT32 srcpnd; UINT32 intmod; @@ -549,7 +549,7 @@ struct s3c24xx_irq_regs_t UINT32 intsubmsk; }; -struct s3c24xx_dma_regs_t +struct s3c24xx_dma_regs_t { UINT32 disrc; UINT32 disrcc; @@ -562,7 +562,7 @@ struct s3c24xx_dma_regs_t UINT32 dmasktrig; }; -struct s3c24xx_clkpow_regs_t +struct s3c24xx_clkpow_regs_t { UINT32 locktime; UINT32 mpllcon; @@ -573,7 +573,7 @@ struct s3c24xx_clkpow_regs_t UINT32 camdivn; }; -struct s3c24xx_lcd_regs_t +struct s3c24xx_lcd_regs_t { UINT32 lcdcon1; UINT32 lcdcon2; @@ -595,12 +595,12 @@ struct s3c24xx_lcd_regs_t UINT32 tconsel; }; -struct s3c24xx_lcdpal_regs_t +struct s3c24xx_lcdpal_regs_t { UINT32 data[0x400/4]; }; -struct s3c24xx_nand_regs_t +struct s3c24xx_nand_regs_t { UINT32 nfconf; UINT32 nfcont; @@ -620,12 +620,12 @@ struct s3c24xx_nand_regs_t UINT32 nfeblk; }; -struct s3c24xx_cam_regs_t +struct s3c24xx_cam_regs_t { UINT32 data[0xA4/4]; }; -struct s3c24xx_uart_regs_t +struct s3c24xx_uart_regs_t { UINT32 ulcon; UINT32 ucon; @@ -640,7 +640,7 @@ struct s3c24xx_uart_regs_t UINT32 ubrdiv; }; -struct s3c24xx_pwm_regs_t +struct s3c24xx_pwm_regs_t { UINT32 tcfg0; UINT32 tcfg1; @@ -661,19 +661,19 @@ struct s3c24xx_pwm_regs_t UINT32 tcnto4; }; -struct s3c24xx_usbdev_regs_t +struct s3c24xx_usbdev_regs_t { UINT32 data[0x130/4]; }; -struct s3c24xx_wdt_regs_t +struct s3c24xx_wdt_regs_t { UINT32 wtcon; UINT32 wtdat; UINT32 wtcnt; }; -struct s3c24xx_iic_regs_t +struct s3c24xx_iic_regs_t { UINT32 iiccon; UINT32 iicstat; @@ -682,7 +682,7 @@ struct s3c24xx_iic_regs_t UINT32 iiclc; }; -struct s3c24xx_iis_regs_t +struct s3c24xx_iis_regs_t { UINT32 iiscon; UINT32 iismod; @@ -691,7 +691,7 @@ struct s3c24xx_iis_regs_t UINT32 iisfifo; }; -struct s3c24xx_gpio_regs_t +struct s3c24xx_gpio_regs_t { UINT32 gpacon; UINT32 gpadat; @@ -750,7 +750,7 @@ struct s3c24xx_gpio_regs_t UINT32 gpjup; }; -struct s3c24xx_rtc_regs_t +struct s3c24xx_rtc_regs_t { UINT32 rtccon; UINT32 ticnt; @@ -772,7 +772,7 @@ struct s3c24xx_rtc_regs_t UINT32 bcdyear; }; -struct s3c24xx_adc_regs_t +struct s3c24xx_adc_regs_t { UINT32 adccon; UINT32 adctsc; @@ -782,7 +782,7 @@ struct s3c24xx_adc_regs_t UINT32 adcupdn; }; -struct s3c24xx_spi_regs_t +struct s3c24xx_spi_regs_t { UINT32 spcon; UINT32 spsta; @@ -792,44 +792,44 @@ struct s3c24xx_spi_regs_t UINT32 sprdat; }; -struct s3c24xx_sdi_regs_t +struct s3c24xx_sdi_regs_t { UINT32 data[0x44/4]; }; -struct s3c24xx_ac97_regs_t +struct s3c24xx_ac97_regs_t { UINT32 data[0x20/4]; }; -struct s3c24xx_memcon_t +struct s3c24xx_memcon_t { s3c24xx_memcon_regs_t regs; }; -struct s3c24xx_usbhost_t +struct s3c24xx_usbhost_t { s3c24xx_usbhost_regs_t regs; }; -struct s3c24xx_irq_t +struct s3c24xx_irq_t { s3c24xx_irq_regs_t regs; int line_irq, line_fiq; }; -struct s3c24xx_dma_t +struct s3c24xx_dma_t { s3c24xx_dma_regs_t regs; emu_timer *timer; }; -struct s3c24xx_clkpow_t +struct s3c24xx_clkpow_t { s3c24xx_clkpow_regs_t regs; }; -struct s3c24xx_lcd_t +struct s3c24xx_lcd_t { s3c24xx_lcd_regs_t regs; emu_timer *timer; @@ -848,12 +848,12 @@ struct s3c24xx_lcd_t UINT32 dma_data, dma_bits; }; -struct s3c24xx_lcdpal_t +struct s3c24xx_lcdpal_t { s3c24xx_lcdpal_regs_t regs; }; -struct s3c24xx_nand_t +struct s3c24xx_nand_t { s3c24xx_nand_regs_t regs; UINT8 mecc[4]; @@ -861,17 +861,17 @@ struct s3c24xx_nand_t int ecc_pos, data_count; }; -struct s3c24xx_cam_t +struct s3c24xx_cam_t { s3c24xx_cam_regs_t regs; }; -struct s3c24xx_uart_t +struct s3c24xx_uart_t { s3c24xx_uart_regs_t regs; }; -struct s3c24xx_pwm_t +struct s3c24xx_pwm_t { s3c24xx_pwm_regs_t regs; emu_timer *timer[5]; @@ -880,25 +880,25 @@ struct s3c24xx_pwm_t UINT32 freq[5]; }; -struct s3c24xx_usbdev_t +struct s3c24xx_usbdev_t { s3c24xx_usbdev_regs_t regs; }; -struct s3c24xx_wdt_t +struct s3c24xx_wdt_t { s3c24xx_wdt_regs_t regs; emu_timer *timer; }; -struct s3c24xx_iic_t +struct s3c24xx_iic_t { s3c24xx_iic_regs_t regs; emu_timer *timer; int count; }; -struct s3c24xx_iis_t +struct s3c24xx_iis_t { s3c24xx_iis_regs_t regs; emu_timer *timer; @@ -906,39 +906,39 @@ struct s3c24xx_iis_t int fifo_index; }; -struct s3c24xx_gpio_t +struct s3c24xx_gpio_t { s3c24xx_gpio_regs_t regs; }; -struct s3c24xx_rtc_t +struct s3c24xx_rtc_t { s3c24xx_rtc_regs_t regs; emu_timer *timer_tick_count; emu_timer *timer_update; }; -struct s3c24xx_adc_t +struct s3c24xx_adc_t { s3c24xx_adc_regs_t regs; }; -struct s3c24xx_spi_t +struct s3c24xx_spi_t { s3c24xx_spi_regs_t regs; }; -struct s3c24xx_sdi_t +struct s3c24xx_sdi_t { s3c24xx_sdi_regs_t regs; }; -struct s3c24xx_ac97_t +struct s3c24xx_ac97_t { s3c24xx_ac97_regs_t regs; }; -struct s3c24xx_t +struct s3c24xx_t { const s3c2440_interface *iface; UINT8 steppingstone[4*1024]; diff --git a/src/emu/machine/scsibus.c b/src/emu/machine/scsibus.c index 9d74b051a7e..94af87de044 100644 --- a/src/emu/machine/scsibus.c +++ b/src/emu/machine/scsibus.c @@ -1,9 +1,9 @@ /* - SCSIBus.c + SCSIBus.c - Implementation of a raw SCSI/SASI bus for machines that don't use a SCSI - controler chip such as the RM Nimbus, which implements it as a bunch of - 74LS series chips. + Implementation of a raw SCSI/SASI bus for machines that don't use a SCSI + controler chip such as the RM Nimbus, which implements it as a bunch of + 74LS series chips. */ diff --git a/src/emu/machine/scsibus.h b/src/emu/machine/scsibus.h index 559507acad0..7ed35a1534d 100644 --- a/src/emu/machine/scsibus.h +++ b/src/emu/machine/scsibus.h @@ -100,7 +100,7 @@ #define SCSI_SENSE_SIZE 4 -struct adaptec_sense_t +struct adaptec_sense_t { // parameter list UINT8 reserved1[3]; diff --git a/src/emu/machine/seibu_cop.c b/src/emu/machine/seibu_cop.c index 6d39755c1da..65ca18efd0d 100644 --- a/src/emu/machine/seibu_cop.c +++ b/src/emu/machine/seibu_cop.c @@ -1,8 +1,8 @@ /*************************************************************************** - Seibu COP protection device + Seibu COP protection device - (this header needs expanding) + (this header needs expanding) ***************************************************************************/ @@ -116,14 +116,14 @@ WRITE16_MEMBER( seibu_cop_device::write ) case 0x074/2: /* - This sets up a DMA mode of some sort - 0x0e00: grainbow, cupsoc - 0x0a00: legionna, godzilla, denjinmk - 0x0600: heatbrl - 0x1e00: zeroteam, xsedae - raiden2 and raidendx doesn't set this up, this could indicate that this is related to the non-private buffer DMAs - (both only uses 0x14 and 0x15 as DMAs) - */ + This sets up a DMA mode of some sort + 0x0e00: grainbow, cupsoc + 0x0a00: legionna, godzilla, denjinmk + 0x0600: heatbrl + 0x1e00: zeroteam, xsedae + raiden2 and raidendx doesn't set this up, this could indicate that this is related to the non-private buffer DMAs + (both only uses 0x14 and 0x15 as DMAs) + */ COMBINE_DATA(&m_dma_unk_param); break; diff --git a/src/emu/machine/tms9901.h b/src/emu/machine/tms9901.h index 6f7be85bb1e..394555003bd 100644 --- a/src/emu/machine/tms9901.h +++ b/src/emu/machine/tms9901.h @@ -50,7 +50,7 @@ enum CLASS DEFINITION ***************************************************************************/ -struct tms9901_interface +struct tms9901_interface { int interrupt_mask; // a bit for each input pin whose state is always notified to the TMS9901 core devcb_read8 read_handler; // 4*8 bits, to be selected using the offset (0-3) diff --git a/src/emu/machine/tms9902.h b/src/emu/machine/tms9902.h index 9efb0ded5c1..16784d3aa2e 100644 --- a/src/emu/machine/tms9902.h +++ b/src/emu/machine/tms9902.h @@ -42,7 +42,7 @@ extern const device_type TMS9902; -struct tms9902_interface +struct tms9902_interface { devcb_write_line int_callback; devcb_write_line rcv_callback; diff --git a/src/emu/machine/v3021.h b/src/emu/machine/v3021.h index e67d0d3eced..b3934441f90 100644 --- a/src/emu/machine/v3021.h +++ b/src/emu/machine/v3021.h @@ -27,7 +27,7 @@ // TYPE DEFINITIONS //************************************************************************** -struct rtc_regs_t +struct rtc_regs_t { UINT8 sec, min, hour, day, wday, month, year; }; diff --git a/src/emu/machine/wd33c93.c b/src/emu/machine/wd33c93.c index d15b04abced..2048d68f860 100644 --- a/src/emu/machine/wd33c93.c +++ b/src/emu/machine/wd33c93.c @@ -419,11 +419,11 @@ void wd33c93_device::dispatch_command() case WD_CMD_RESET: reset_cmd(); break; - + case WD_CMD_ABORT: abort_cmd(); break; - + case WD_CMD_NEGATE_ACK: negate_ack(); break; diff --git a/src/emu/romload.c b/src/emu/romload.c index 4571061ce58..af6b6ee39de 100644 --- a/src/emu/romload.c +++ b/src/emu/romload.c @@ -1454,14 +1454,14 @@ void rom_init(running_machine &machine) /* figure out which BIOS we are using */ device_iterator deviter(romdata->machine().config().root_device()); - for (device_t *device = deviter.first(); device != NULL; device = deviter.next()) { + for (device_t *device = deviter.first(); device != NULL; device = deviter.next()) { if (device->rom_region()) { const char *specbios; astring temp; if (strcmp(device->tag(),":")==0) { specbios = romdata->machine().options().bios(); } else { - specbios = romdata->machine().options().sub_value(temp,device->owner()->tag()+1,"bios"); + specbios = romdata->machine().options().sub_value(temp,device->owner()->tag()+1,"bios"); } determine_bios_rom(romdata, device, specbios); } diff --git a/src/emu/sound/c140.c b/src/emu/sound/c140.c index 4c50b1f6bee..a3fbbe2a03a 100644 --- a/src/emu/sound/c140.c +++ b/src/emu/sound/c140.c @@ -65,7 +65,7 @@ struct voice_registers UINT8 reserved[4]; }; -struct VOICE +struct VOICE { long ptoffset; long pos; diff --git a/src/emu/sound/c352.h b/src/emu/sound/c352.h index 3341884ae89..bc15db47241 100644 --- a/src/emu/sound/c352.h +++ b/src/emu/sound/c352.h @@ -63,7 +63,7 @@ private: C352_FLG_REVERSE = 0x0001, // play sample backwards }; - struct c352_ch_t + struct c352_ch_t { UINT8 vol_l; UINT8 vol_r; diff --git a/src/emu/sound/discrete.c b/src/emu/sound/discrete.c index 4ff682c33ae..34668fb26aa 100644 --- a/src/emu/sound/discrete.c +++ b/src/emu/sound/discrete.c @@ -83,7 +83,7 @@ const device_type DISCRETE = &device_creator<discrete_sound_device>; * *************************************/ -struct output_buffer +struct output_buffer { double *node_buf; const double *source; @@ -91,7 +91,7 @@ struct output_buffer int node_num; }; -struct input_buffer +struct input_buffer { volatile const double *ptr; /* pointer into linked_outbuf.nodebuf */ output_buffer * linked_outbuf; /* what output are we connected to ? */ diff --git a/src/emu/sound/discrete.h b/src/emu/sound/discrete.h index 46fe8c671a2..147194f03ee 100644 --- a/src/emu/sound/discrete.h +++ b/src/emu/sound/discrete.h @@ -4139,7 +4139,7 @@ enum { * *************************************/ -enum discrete_node_type +enum discrete_node_type { DSS_NULL, /* Nothing, nill, zippo, only to be used as terminating node */ DSS_NOP, /* just do nothing, placeholder for potential DISCRETE_REPLACE in parent block */ diff --git a/src/emu/sound/es5503.h b/src/emu/sound/es5503.h index 86595e6ffeb..1fa65378198 100644 --- a/src/emu/sound/es5503.h +++ b/src/emu/sound/es5503.h @@ -67,7 +67,7 @@ private: MODE_SWAP = 3 }; - struct ES5503Osc + struct ES5503Osc { UINT16 freq; UINT16 wtsize; diff --git a/src/emu/sound/fm.c b/src/emu/sound/fm.c index e273e937c1c..b3c292c1c22 100644 --- a/src/emu/sound/fm.c +++ b/src/emu/sound/fm.c @@ -519,7 +519,7 @@ static FILE *sample[1]; /* struct describing a single operator (SLOT) */ -struct FM_SLOT +struct FM_SLOT { INT32 *DT; /* detune :dt_tab[DT] */ UINT8 KSR; /* key scale rate :3-KSR */ @@ -560,7 +560,7 @@ struct FM_SLOT }; -struct FM_CH +struct FM_CH { FM_SLOT SLOT[4]; /* four SLOTs (operators) */ @@ -585,7 +585,7 @@ struct FM_CH }; -struct FM_ST +struct FM_ST { device_t *device; void * param; /* this chip parameter */ @@ -622,7 +622,7 @@ struct FM_ST /***********************************************************/ /* OPN 3slot struct */ -struct FM_3SLOT +struct FM_3SLOT { UINT32 fc[3]; /* fnum3,blk3: calculated */ UINT8 fn_h; /* freq3 latch */ @@ -631,7 +631,7 @@ struct FM_3SLOT }; /* OPN/A/B common state */ -struct FM_OPN +struct FM_OPN { UINT8 type; /* chip type */ FM_ST ST; /* general state */ @@ -2089,7 +2089,7 @@ static void OPNPrescaler_w(FM_OPN *OPN , int addr, int pre_divider) /*****************************************************************************/ /* here's the virtual YM2203(OPN) */ -struct YM2203 +struct YM2203 { UINT8 REGS[256]; /* registers */ FM_OPN OPN; /* OPN state */ @@ -2385,7 +2385,7 @@ int ym2203_timer_over(void *chip,int c) #if (BUILD_YM2608||BUILD_YM2610||BUILD_YM2610B) /* ADPCM type A channel struct */ -struct ADPCM_CH +struct ADPCM_CH { UINT8 flag; /* port state */ UINT8 flagMask; /* arrived flag mask */ @@ -2405,7 +2405,7 @@ struct ADPCM_CH }; /* here's the virtual YM2610 */ -struct YM2610 +struct YM2610 { UINT8 REGS[512]; /* registers */ FM_OPN OPN; /* OPN state */ diff --git a/src/emu/sound/fm2612.c b/src/emu/sound/fm2612.c index a3e6fa9b4c1..bc00afee192 100644 --- a/src/emu/sound/fm2612.c +++ b/src/emu/sound/fm2612.c @@ -531,7 +531,7 @@ static FILE *sample[1]; /* struct describing a single operator (SLOT) */ -struct FM_SLOT +struct FM_SLOT { INT32 *DT; /* detune :dt_tab[DT] */ UINT8 KSR; /* key scale rate :3-KSR */ @@ -572,7 +572,7 @@ struct FM_SLOT }; -struct FM_CH +struct FM_CH { FM_SLOT SLOT[4]; /* four SLOTs (operators) */ @@ -597,7 +597,7 @@ struct FM_CH }; -struct FM_ST +struct FM_ST { device_t *device; void * param; /* this chip parameter */ @@ -634,7 +634,7 @@ struct FM_ST /***********************************************************/ /* OPN 3slot struct */ -struct FM_3SLOT +struct FM_3SLOT { UINT32 fc[3]; /* fnum3,blk3: calculated */ UINT8 fn_h; /* freq3 latch */ @@ -644,7 +644,7 @@ struct FM_3SLOT }; /* OPN/A/B common state */ -struct FM_OPN +struct FM_OPN { UINT8 type; /* chip type */ FM_ST ST; /* general state */ @@ -678,7 +678,7 @@ struct FM_OPN }; /* here's the virtual YM2612 */ -struct YM2612 +struct YM2612 { UINT8 REGS[512]; /* registers */ FM_OPN OPN; /* OPN state */ diff --git a/src/emu/sound/fmopl.c b/src/emu/sound/fmopl.c index 59d4bc644ad..6caf88875e0 100644 --- a/src/emu/sound/fmopl.c +++ b/src/emu/sound/fmopl.c @@ -198,7 +198,7 @@ static FILE * cymfile = NULL; -struct OPL_SLOT +struct OPL_SLOT { UINT32 ar; /* attack rate: AR<<2 */ UINT32 dr; /* decay rate: DR<<2 */ @@ -239,7 +239,7 @@ struct OPL_SLOT UINT16 wavetable; }; -struct OPL_CH +struct OPL_CH { OPL_SLOT SLOT[2]; /* phase generator state */ @@ -250,7 +250,7 @@ struct OPL_CH }; /* OPL state */ -struct FM_OPL +struct FM_OPL { /* FM channel slots */ OPL_CH P_CH[9]; /* OPL/OPL2 chips have 9 channels*/ diff --git a/src/emu/sound/i5000.h b/src/emu/sound/i5000.h index 358edd1749a..52103025bc6 100644 --- a/src/emu/sound/i5000.h +++ b/src/emu/sound/i5000.h @@ -47,7 +47,7 @@ protected: virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples); private: - struct channel_t + struct channel_t { bool is_playing; oki_adpcm_state m_adpcm; diff --git a/src/emu/sound/k005289.c b/src/emu/sound/k005289.c index f8a52327fac..94025526d6a 100644 --- a/src/emu/sound/k005289.c +++ b/src/emu/sound/k005289.c @@ -31,7 +31,7 @@ #define FREQBASEBITS 16 /* this structure defines the parameters for a channel */ -struct k005289_sound_channel +struct k005289_sound_channel { int frequency; int counter; diff --git a/src/emu/sound/k007232.c b/src/emu/sound/k007232.c index 15aa230ceef..08c2653d55d 100644 --- a/src/emu/sound/k007232.c +++ b/src/emu/sound/k007232.c @@ -30,7 +30,7 @@ added external port callback, and functions to set the volume of the channels #define KDAC_A_PCM_MAX (2) /* Channels per chip */ -struct KDAC_A_PCM +struct KDAC_A_PCM { UINT8 vol[KDAC_A_PCM_MAX][2]; /* volume for the left and right channel */ UINT32 addr[KDAC_A_PCM_MAX]; diff --git a/src/emu/sound/k051649.c b/src/emu/sound/k051649.c index 4c072b53b9b..338b5009058 100644 --- a/src/emu/sound/k051649.c +++ b/src/emu/sound/k051649.c @@ -30,7 +30,7 @@ /* this structure defines the parameters for a channel */ -struct k051649_sound_channel +struct k051649_sound_channel { unsigned long counter; int frequency; diff --git a/src/emu/sound/mos6560.c b/src/emu/sound/mos6560.c index 422b69d1687..141930fc98b 100644 --- a/src/emu/sound/mos6560.c +++ b/src/emu/sound/mos6560.c @@ -156,7 +156,7 @@ static const rgb_t PALETTE[] = inline UINT8 mos6560_device::read_videoram(offs_t offset) { m_last_data = space(AS_0)->read_byte(offset & 0x3fff); - + return m_last_data; } diff --git a/src/emu/sound/n63701x.c b/src/emu/sound/n63701x.c index 65780163b71..3c60e7a284c 100644 --- a/src/emu/sound/n63701x.c +++ b/src/emu/sound/n63701x.c @@ -17,7 +17,7 @@ silence compression: '00 nn' must be replaced by nn+1 times '80'. #include "n63701x.h" -struct voice +struct voice { int select; int playing; diff --git a/src/emu/sound/namco.c b/src/emu/sound/namco.c index 0bc916a899f..ec595ad0271 100644 --- a/src/emu/sound/namco.c +++ b/src/emu/sound/namco.c @@ -36,7 +36,7 @@ /* this structure defines the parameters for a channel */ -struct sound_channel +struct sound_channel { UINT32 frequency; UINT32 counter; diff --git a/src/emu/sound/nes_defs.h b/src/emu/sound/nes_defs.h index 280c96d7aa2..d68151033a0 100644 --- a/src/emu/sound/nes_defs.h +++ b/src/emu/sound/nes_defs.h @@ -48,7 +48,7 @@ typedef UINT8 boolean; #define QUEUE_SIZE 0x2000 #define QUEUE_MAX (QUEUE_SIZE-1) -struct queue_t +struct queue_t { int pos; unsigned char reg,val; @@ -84,7 +84,7 @@ struct queue_t /* CHANNEL TYPE DEFINITIONS */ /* Square Wave */ -struct square_t +struct square_t { uint8 regs[4]; int vbl_length; @@ -99,7 +99,7 @@ struct square_t }; /* Triangle Wave */ -struct triangle_t +struct triangle_t { uint8 regs[4]; /* regs[1] unused */ int linear_length; @@ -113,7 +113,7 @@ struct triangle_t }; /* Noise Wave */ -struct noise_t +struct noise_t { uint8 regs[4]; /* regs[1] unused */ int cur_pos; @@ -126,7 +126,7 @@ struct noise_t }; /* DPCM Wave */ -struct dpcm_t +struct dpcm_t { uint8 regs[4]; uint32 address; @@ -142,7 +142,7 @@ struct dpcm_t }; /* APU type */ -struct apu_t +struct apu_t { /* Sound channels */ square_t squ[2]; diff --git a/src/emu/sound/s14001a.c b/src/emu/sound/s14001a.c index 68a78ff2fbd..caa29f74195 100644 --- a/src/emu/sound/s14001a.c +++ b/src/emu/sound/s14001a.c @@ -237,7 +237,7 @@ and off as it normally does during speech). Once START has gone low-high-low, th #include "emu.h" #include "s14001a.h" -struct S14001AChip +struct S14001AChip { sound_stream * stream; diff --git a/src/emu/sound/sid6581.c b/src/emu/sound/sid6581.c index 3329f574d6f..8434f8ba7d5 100644 --- a/src/emu/sound/sid6581.c +++ b/src/emu/sound/sid6581.c @@ -34,7 +34,7 @@ static void sid_start(device_t *device, SIDTYPE sidtype) SID6581_t *sid = get_sid(device); const sid6581_interface *iface = (const sid6581_interface*) device->static_config(); assert(iface); - + // resolve callbacks sid->in_potx_func.resolve(iface->in_potx_cb, *device); sid->in_poty_func.resolve(iface->in_poty_cb, *device); diff --git a/src/emu/sound/sid6581.h b/src/emu/sound/sid6581.h index 53f37e713c0..752bbb2937b 100644 --- a/src/emu/sound/sid6581.h +++ b/src/emu/sound/sid6581.h @@ -14,7 +14,7 @@ #include "devlegcy.h" -enum SIDTYPE +enum SIDTYPE { MOS6581, MOS8580 diff --git a/src/emu/sound/sn76496.h b/src/emu/sound/sn76496.h index 03d7e0c97a1..1ce40acaf8b 100644 --- a/src/emu/sound/sn76496.h +++ b/src/emu/sound/sn76496.h @@ -176,7 +176,7 @@ extern const device_type NCR7496_NEW; extern const device_type GAMEGEAR_NEW; extern const device_type SEGAPSG_NEW; -struct sn76496_config +struct sn76496_config { devcb_write_line ready; }; diff --git a/src/emu/sound/tms5220.h b/src/emu/sound/tms5220.h index e570d4d8968..c3c102f0d3a 100644 --- a/src/emu/sound/tms5220.h +++ b/src/emu/sound/tms5220.h @@ -121,7 +121,7 @@ extern const device_type TMC0285N; extern const device_type TMS5200N; -struct tms52xx_config +struct tms52xx_config { devcb_write_line irq_func; // IRQ callback function, active low, i.e. state=0 (TODO: change to ASSERT/CLEAR) 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 db6eea99d2b..23a43ab722f 100644 --- a/src/emu/sound/upd7759.c +++ b/src/emu/sound/upd7759.c @@ -107,7 +107,7 @@ The other chip models don't support slave mode, and have an internal ROM. Other than that, they are thought to be nearly identical to uPD7759. - + 55C 18-pin DIP 96 Kbit ROM 55G 24-pin SOP 96 Kbit ROM 56C 18-pin DIP 256 Kbit ROM @@ -174,7 +174,7 @@ struct upd7759_state /* chip configuration */ UINT8 sample_offset_shift; /* header sample address shift (access data > 0xffff) */ - + /* internal clock to output sample rate mapping */ UINT32 pos; /* current output sample position */ UINT32 step; /* step value per output sample */ @@ -670,7 +670,7 @@ static DEVICE_START( upd7759 ) /* chip configuration */ chip->sample_offset_shift = (device->type() == UPD7759) ? 1 : 0; - + /* allocate a stream channel */ chip->channel = device->machine().sound().stream_alloc(*device, 0, 1, device->clock()/4, chip, upd7759_update); diff --git a/src/emu/sound/ym2151.c b/src/emu/sound/ym2151.c index 52dda68c749..fa175e7d8c4 100644 --- a/src/emu/sound/ym2151.c +++ b/src/emu/sound/ym2151.c @@ -23,7 +23,7 @@ static FILE * cymfile = NULL; /* struct describing a single operator */ -struct YM2151Operator +struct YM2151Operator { UINT32 phase; /* accumulated operator phase */ UINT32 freq; /* operator frequency count */ @@ -76,7 +76,7 @@ struct YM2151Operator }; -struct YM2151 +struct YM2151 { signed int chanout[8]; signed int m2,c1,c2; /* Phase Modulation input for operators 2,3,4 */ diff --git a/src/emu/sound/ym2413.c b/src/emu/sound/ym2413.c index c9966ad5d7f..ec71681fd3d 100644 --- a/src/emu/sound/ym2413.c +++ b/src/emu/sound/ym2413.c @@ -164,7 +164,7 @@ static FILE * cymfile = NULL; -struct OPLL_SLOT +struct OPLL_SLOT { UINT32 ar; /* attack rate: AR<<2 */ UINT32 dr; /* decay rate: DR<<2 */ @@ -209,7 +209,7 @@ struct OPLL_SLOT unsigned int wavetable; }; -struct OPLL_CH +struct OPLL_CH { OPLL_SLOT SLOT[2]; /* phase generator state */ @@ -221,7 +221,7 @@ struct OPLL_CH }; /* chip state */ -struct YM2413 +struct YM2413 { OPLL_CH P_CH[9]; /* OPLL chips have 9 channels*/ UINT8 instvol_r[9]; /* instrument/volume (or volume/volume in percussive mode)*/ diff --git a/src/emu/sound/ymf262.c b/src/emu/sound/ymf262.c index c24fd4280bf..1b5e4f3762e 100644 --- a/src/emu/sound/ymf262.c +++ b/src/emu/sound/ymf262.c @@ -141,7 +141,7 @@ static FILE * cymfile = NULL; #define OPL3_TYPE_YMF262 (0) /* 36 operators, 8 waveforms */ -struct OPL3_SLOT +struct OPL3_SLOT { UINT32 ar; /* attack rate: AR<<2 */ UINT32 dr; /* decay rate: DR<<2 */ @@ -192,7 +192,7 @@ unsigned char reserved[128-100];//speedup: pump up the struct size to power of 2 }; -struct OPL3_CH +struct OPL3_CH { OPL3_SLOT SLOT[2]; @@ -218,7 +218,7 @@ unsigned char reserved[512-272];//speedup:pump up the struct size to power of 2 }; /* OPL3 state */ -struct OPL3 +struct OPL3 { OPL3_CH P_CH[18]; /* OPL3 chips have 18 channels */ diff --git a/src/emu/sound/ymf271.c b/src/emu/sound/ymf271.c index a1c8ededf21..35a278ac1f5 100644 --- a/src/emu/sound/ymf271.c +++ b/src/emu/sound/ymf271.c @@ -33,7 +33,7 @@ //#define log2(n) (log((float) n)/log((float) 2)) -struct YMF271Slot +struct YMF271Slot { INT8 extout; UINT8 lfoFreq; @@ -82,12 +82,12 @@ struct YMF271Slot double lfo_phasemod; }; -struct YMF271Group +struct YMF271Group { INT8 sync, pfm; }; -struct YMF271Chip +struct YMF271Chip { YMF271Slot slots[48]; YMF271Group groups[12]; diff --git a/src/emu/sound/ymf278b.c b/src/emu/sound/ymf278b.c index df12602dafe..6ea6dbde17e 100644 --- a/src/emu/sound/ymf278b.c +++ b/src/emu/sound/ymf278b.c @@ -73,7 +73,7 @@ struct YMF278BChip; -struct YMF278BSlot +struct YMF278BSlot { INT16 wave; /* wavetable number */ INT16 F_NUMBER; /* frequency */ @@ -115,7 +115,7 @@ struct YMF278BSlot YMF278BChip *chip; /* pointer back to parent chip */ }; -struct YMF278BChip +struct YMF278BChip { UINT8 pcmregs[256]; YMF278BSlot slots[24]; diff --git a/src/emu/sound/ymz770.h b/src/emu/sound/ymz770.h index 320d89b47c0..ea0da561a9b 100644 --- a/src/emu/sound/ymz770.h +++ b/src/emu/sound/ymz770.h @@ -34,7 +34,7 @@ class amm; class ymz770_device : public device_t, public device_sound_interface { - struct ymz_channel + struct ymz_channel { UINT8 phrase; UINT8 pan; diff --git a/src/emu/sprite.c b/src/emu/sprite.c index e7cda794096..ed9ee12634b 100644 --- a/src/emu/sprite.c +++ b/src/emu/sprite.c @@ -71,7 +71,7 @@ void sparse_dirty_bitmap::dirty(INT32 left, INT32 right, INT32 top, INT32 bottom // compute a rectangle in dirty space, and fill it with 1 rectangle rect(left >> m_granularity, right >> m_granularity, top >> m_granularity, bottom >> m_granularity); m_bitmap.fill(1, rect); - + // invalidate existing rect list invalidate_rect_list(); } @@ -93,7 +93,7 @@ void sparse_dirty_bitmap::clean(INT32 left, INT32 right, INT32 top, INT32 bottom // compute a rectangle in dirty space, and fill it with 0 rectangle rect((left + round) >> m_granularity, (right - round) >> m_granularity, (top + round) >> m_granularity, (bottom - round) >> m_granularity); m_bitmap.fill(0, rect); - + // invalidate existing rect list invalidate_rect_list(); } @@ -108,11 +108,11 @@ void sparse_dirty_bitmap::resize(int width, int height) // set new size m_width = width; m_height = height; - + // resize the bitmap int round = (1 << m_granularity) - 1; m_bitmap.resize((width + round) >> m_granularity, (height + round) >> m_granularity); - + // reset everything dirty_all(); } @@ -120,7 +120,7 @@ void sparse_dirty_bitmap::resize(int width, int height) //------------------------------------------------- // first_dirty_rect -- return the first dirty -// rectangle in the list +// rectangle in the list //------------------------------------------------- sparse_dirty_rect *sparse_dirty_bitmap::first_dirty_rect(const rectangle &cliprect) @@ -128,10 +128,10 @@ sparse_dirty_rect *sparse_dirty_bitmap::first_dirty_rect(const rectangle &clipre // if what we have is valid, just return it again if (m_rect_list_bounds == cliprect) return m_rect_list.first(); - + // reclaim the dirty list and start over m_rect_allocator.reclaim_all(m_rect_list); - + // compute dirty space rectangle coordinates int sx = cliprect.min_x >> m_granularity; int ex = cliprect.max_x >> m_granularity; @@ -156,7 +156,7 @@ sparse_dirty_rect *sparse_dirty_bitmap::first_dirty_rect(const rectangle &clipre currect = NULL; continue; } - + // if we can't add to an existing rect, create a new one if (currect == NULL) { diff --git a/src/emu/sprite.h b/src/emu/sprite.h index 496fff8779a..4fef306cd42 100644 --- a/src/emu/sprite.h +++ b/src/emu/sprite.h @@ -55,7 +55,7 @@ class sparse_dirty_rect : public rectangle public: // getters const sparse_dirty_rect *next() const { return m_next; } - + private: // internal state sparse_dirty_rect * m_next; @@ -75,7 +75,7 @@ public: void dirty(const rectangle &rect) { dirty(rect.left(), rect.right(), rect.top(), rect.bottom()); } void dirty(INT32 left, INT32 right, INT32 top, INT32 bottom); void dirty_all() { dirty(0, m_width - 1, 0, m_height - 1); } - + // cleaning operations - partially intersecting tiles are NOT cleaned void clean(const rectangle &rect) { clean(rect.left(), rect.right(), rect.top(), rect.bottom()); } void clean(INT32 left, INT32 right, INT32 top, INT32 bottom); @@ -85,9 +85,9 @@ public: sparse_dirty_rect *first_dirty_rect() { rectangle fullrect(0, m_width - 1, 0, m_height - 1); return first_dirty_rect(fullrect); } sparse_dirty_rect *first_dirty_rect(const rectangle &cliprect); - // dynamic resizing + // dynamic resizing void resize(int width, int height); - + private: // invalidate cached rect list void invalidate_rect_list() { m_rect_list_bounds.set(0, -1, 0, -1); } @@ -135,18 +135,18 @@ public: UINT32 spriteram_bytes() const { return m_spriteram_bytes; } UINT32 spriteram_elements() const { return m_spriteram_bytes / sizeof(_SpriteRAMType); } _SpriteRAMType *buffer() { return &m_buffer[0]; } - + // static configuration static void static_set_xorigin(device_t &device, int origin) { downcast<sprite_device &>(device).m_xorigin = origin; } static void static_set_yorigin(device_t &device, int origin) { downcast<sprite_device &>(device).m_yorigin = origin; } static void static_set_origin(device_t &device, int xorigin, int yorigin) { static_set_xorigin(device, xorigin); static_set_yorigin(device, yorigin); } - + // configuration void set_origin(INT32 xorigin = 0, INT32 yorigin = 0) { m_xorigin = xorigin; m_yorigin = yorigin; } - + // buffering void copy_to_buffer() { memcpy(m_buffer, m_spriteram, m_spriteram_bytes); } - + // clearing void clear() { clear(m_bitmap.cliprect()); } void clear(const rectangle &cliprect) @@ -155,7 +155,7 @@ public: m_bitmap.fill(~0, *rect); m_dirty.clean(cliprect); } - + // force clear (don't use dirty rects) void force_clear() { @@ -174,18 +174,18 @@ public: m_bitmap.resize(new_width, new_height, BITMAP_SLOP, BITMAP_SLOP); m_dirty.resize(new_width, new_height); } - + // clear out the region if (clearit) clear(cliprect); - + // wrap the bitmap, adjusting for x/y origins _BitmapType wrapped(&m_bitmap.pix(0) - m_xorigin - m_yorigin * m_bitmap.rowpixels(), m_xorigin + cliprect.right() + 1, m_yorigin + cliprect.bottom() + 1, m_bitmap.rowpixels()); // compute adjusted cliprect in source space rectangle adjusted = cliprect; adjusted.offset(m_xorigin, m_yorigin); - + // render draw(wrapped, adjusted); } @@ -202,21 +202,21 @@ protected: // set up pointers m_spriteram = reinterpret_cast<_SpriteRAMType *>(spriteram->ptr()); m_spriteram_bytes = spriteram->bytes(); - + // allocate the double buffer to match the RAM size m_buffer.resize(m_spriteram_bytes / sizeof(_SpriteRAMType)); // save states save_item(NAME(m_buffer)); } - + // subclass overrides virtual void draw(_BitmapType &bitmap, const rectangle &cliprect) = 0; // subclass helpers void mark_dirty(const rectangle &rect) { mark_dirty(rect.left(), rect.right(), rect.top(), rect.bottom()); } void mark_dirty(INT32 left, INT32 right, INT32 top, INT32 bottom) { m_dirty.dirty(left - m_xorigin, right - m_xorigin, top - m_yorigin, bottom - m_yorigin); } - + private: // configuration INT32 m_xorigin; // X origin for drawing @@ -226,7 +226,7 @@ private: _SpriteRAMType * m_spriteram; // pointer to spriteram pointer INT32 m_spriteram_bytes; // size of sprite RAM in bytes dynamic_array<_SpriteRAMType> m_buffer; // buffered spriteram for those that use it - + // bitmaps _BitmapType m_bitmap; // live bitmap sparse_dirty_bitmap m_dirty; // dirty bitmap diff --git a/src/emu/video/cdp1862.c b/src/emu/video/cdp1862.c index 773db369cd5..51c922f5f6e 100644 --- a/src/emu/video/cdp1862.c +++ b/src/emu/video/cdp1862.c @@ -218,6 +218,6 @@ UINT32 cdp1862_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap copybitmap(bitmap, m_bitmap, 0, 0, 0, 0, cliprect); m_bitmap.fill(m_palette[CDP1862_BACKGROUND_COLOR_SEQUENCE[m_bgcolor] + 8], cliprect); - + return 0; } diff --git a/src/emu/video/huc6272.c b/src/emu/video/huc6272.c index 740f34d931e..b72c20b9ef8 100644 --- a/src/emu/video/huc6272.c +++ b/src/emu/video/huc6272.c @@ -112,21 +112,21 @@ READ32_MEMBER( huc6272_device::read ) if((offset & 1) == 0) { /* - xxxx xxxx ---- ---- ---- ---- ---- ---- Sub Channel Buffer - ---- ---- x--- ---- ---- ---- ---- ---- SCSI RST flag - ---- ---- -x-- ---- ---- ---- ---- ---- SCSI BUSY flag - ---- ---- --x- ---- ---- ---- ---- ---- SCSI REQ flag - ---- ---- ---x ---- ---- ---- ---- ---- SCSI MSG flag - ---- ---- ---- x--- ---- ---- ---- ---- SCSI CD flag - ---- ---- ---- -x-- ---- ---- ---- ---- SCSI IO flag - ---- ---- ---- --x- ---- ---- ---- ---- SCSI SEL flag - ---- ---- ---- ---- -x-- ---- ---- ---- SCSI IRQ pending - ---- ---- ---- ---- --x- ---- ---- ---- DMA IRQ pending - ---- ---- ---- ---- ---x ---- ---- ---- CD Sub Channel IRQ pending - ---- ---- ---- ---- ---- x--- ---- ---- Raster IRQ pending - ---- ---- ---- ---- ---- -x-- ---- ---- ADPCM IRQ pending - ---- ---- ---- ---- ---- ---- -xxx xxxx register read-back - */ + xxxx xxxx ---- ---- ---- ---- ---- ---- Sub Channel Buffer + ---- ---- x--- ---- ---- ---- ---- ---- SCSI RST flag + ---- ---- -x-- ---- ---- ---- ---- ---- SCSI BUSY flag + ---- ---- --x- ---- ---- ---- ---- ---- SCSI REQ flag + ---- ---- ---x ---- ---- ---- ---- ---- SCSI MSG flag + ---- ---- ---- x--- ---- ---- ---- ---- SCSI CD flag + ---- ---- ---- -x-- ---- ---- ---- ---- SCSI IO flag + ---- ---- ---- --x- ---- ---- ---- ---- SCSI SEL flag + ---- ---- ---- ---- -x-- ---- ---- ---- SCSI IRQ pending + ---- ---- ---- ---- --x- ---- ---- ---- DMA IRQ pending + ---- ---- ---- ---- ---x ---- ---- ---- CD Sub Channel IRQ pending + ---- ---- ---- ---- ---- x--- ---- ---- Raster IRQ pending + ---- ---- ---- ---- ---- -x-- ---- ---- ADPCM IRQ pending + ---- ---- ---- ---- ---- ---- -xxx xxxx register read-back + */ res = m_register & 0x7f; res |= (0) << 16; } @@ -135,8 +135,8 @@ READ32_MEMBER( huc6272_device::read ) switch(m_register) { /* - x--- ---- ---- ---- ---- - */ + x--- ---- ---- ---- ---- + */ case 0x0c: // KRAM load address res = (m_kram_addr_r & 0x3ffff) | ((m_kram_inc_r & 0x1ff) << 18) | ((m_kram_page_r & 1) << 31); break; @@ -179,8 +179,8 @@ WRITE32_MEMBER( huc6272_device::write ) //printf("%08x DMA STATUS\n",data); break; /* - ---- ---- ---- ---- ---- - */ + ---- ---- ---- ---- ---- + */ case 0x0c: // KRAM load address m_kram_addr_r = (data & 0x0003ffff); m_kram_inc_r = (data & 0x07fc0000) >> 18; @@ -199,11 +199,11 @@ WRITE32_MEMBER( huc6272_device::write ) break; /* - ---x ---- ---- ---- ADPCM page setting - ---- ---x ---- ---- RAINBOW page setting - ---- ---- ---x ---- BG page setting - ---- ---- ---- ---x SCSI page setting - */ + ---x ---- ---- ---- ADPCM page setting + ---- ---x ---- ---- RAINBOW page setting + ---- ---- ---x ---- BG page setting + ---- ---- ---- ---x SCSI page setting + */ case 0x0f: m_page_setting = data; break; diff --git a/src/emu/video/m50458.c b/src/emu/video/m50458.c index 4880d5f9734..2f0b66e2f00 100644 --- a/src/emu/video/m50458.c +++ b/src/emu/video/m50458.c @@ -1,16 +1,16 @@ /*************************************************************************** - Mitsubishi M50458 OSD chip + Mitsubishi M50458 OSD chip - device by Angelo Salese + device by Angelo Salese - TODO: - - vertical scrolling needs references (might work differently and/or in - "worse" ways, the one currently implemented guesses that the screen is - masked at the top and the end when in scrolling mode). - - Understand what the "vertical start position" really does (vblank?) - - Check if the ROM source is actually 2bpp once that a redump is made - (the shadow ROM copy doesn't convince me 100%); + TODO: + - vertical scrolling needs references (might work differently and/or in + "worse" ways, the one currently implemented guesses that the screen is + masked at the top and the end when in scrolling mode). + - Understand what the "vertical start position" really does (vblank?) + - Check if the ROM source is actually 2bpp once that a redump is made + (the shadow ROM copy doesn't convince me 100%); ***************************************************************************/ @@ -46,7 +46,7 @@ ROM_END WRITE16_MEMBER( m50458_device::vreg_120_w) { -// printf("%04x\n",data); +// printf("%04x\n",data); } WRITE16_MEMBER( m50458_device::vreg_121_w) @@ -85,7 +85,7 @@ WRITE16_MEMBER( m50458_device::vreg_123_w) /* char part of vertical scrolling */ m_scrr = (data & 0x0f00) >> 8; -// printf("%02x %02x %02x\n",m_scrr,m_scrf,m_space); +// printf("%02x %02x %02x\n",m_scrr,m_scrf,m_space); } WRITE16_MEMBER( m50458_device::vreg_124_w) diff --git a/src/emu/video/m50458.h b/src/emu/video/m50458.h index bce73ccd5c0..0699c777222 100644 --- a/src/emu/video/m50458.h +++ b/src/emu/video/m50458.h @@ -28,7 +28,7 @@ Mitsubishi M50458 OSD chip // TYPE DEFINITIONS //************************************************************************** -enum m50458_state_t +enum m50458_state_t { OSD_SET_ADDRESS = 0, OSD_SET_DATA diff --git a/src/emu/video/mb90082.c b/src/emu/video/mb90082.c index 19bedfc3371..491e3111ebf 100644 --- a/src/emu/video/mb90082.c +++ b/src/emu/video/mb90082.c @@ -1,11 +1,11 @@ /*************************************************************************** - Fujitsu MB90082 OSD + Fujitsu MB90082 OSD - preliminary device by Angelo Salese + preliminary device by Angelo Salese - TODO: - - get a real charset ROM; + TODO: + - get a real charset ROM; ***************************************************************************/ @@ -24,8 +24,8 @@ const device_type MB90082 = &device_creator<mb90082_device>; static ADDRESS_MAP_START( mb90082_vram, AS_0, 16, mb90082_device ) AM_RANGE(0x0000, 0x023f) AM_RAM // main screen vram AM_RANGE(0x0400, 0x063f) AM_RAM // main screen attr -// AM_RANGE(0x0800, 0x0a3f) AM_RAM // sub screen vram -// AM_RANGE(0x0c00, 0x0e3f) AM_RAM // sub screen attr +// AM_RANGE(0x0800, 0x0a3f) AM_RAM // sub screen vram +// AM_RANGE(0x0c00, 0x0e3f) AM_RAM // sub screen attr ADDRESS_MAP_END /* charset is undumped, but apparently a normal ASCII one is enough for the time being (for example "fnt0808.x1" in Sharp X1) */ diff --git a/src/emu/video/mc6845.c b/src/emu/video/mc6845.c index 2e2c5e35dab..1a05a77aa5b 100644 --- a/src/emu/video/mc6845.c +++ b/src/emu/video/mc6845.c @@ -24,15 +24,15 @@ /* - TODO: + TODO: - - mos8563 + - mos8563 - - horizontal scroll - - vertical scroll - - pixel double width - - bitmap modes - - display enable begin/end + - horizontal scroll + - vertical scroll + - pixel double width + - bitmap modes + - display enable begin/end */ @@ -77,10 +77,10 @@ const device_type MOS8568 = &device_creator<mos8568_device>; #define HSS_ATTR BIT(m_horiz_scroll, 6) #define HSS_TEXT BIT(m_horiz_scroll, 7) -#define ATTR_COLOR (attr & 0x0f) -#define ATTR_BLINK BIT(attr, 4) -#define ATTR_UNDERLINE BIT(attr, 5) -#define ATTR_REVERSE BIT(attr, 6) +#define ATTR_COLOR (attr & 0x0f) +#define ATTR_BLINK BIT(attr, 4) +#define ATTR_UNDERLINE BIT(attr, 5) +#define ATTR_REVERSE BIT(attr, 6) #define ATTR_ALTERNATE_CHARSET BIT(attr, 7) @@ -377,21 +377,21 @@ WRITE8_MEMBER( mos8563_device::register_w ) case 0x0f: m_cursor_addr = ((data & 0xff) << 0) | (m_cursor_addr & 0xff00); break; case 0x10: /* read-only */ break; case 0x11: /* read-only */ break; - case 0x12: m_update_addr = ((data & 0xff) << 8) | (m_update_addr & 0x00ff); break; - case 0x13: m_update_addr = ((data & 0xff) << 0) | (m_update_addr & 0xff00); break; + case 0x12: m_update_addr = ((data & 0xff) << 8) | (m_update_addr & 0x00ff); break; + case 0x13: m_update_addr = ((data & 0xff) << 0) | (m_update_addr & 0xff00); break; case 0x14: m_attribute_addr = ((data & 0xff) << 8) | (m_attribute_addr & 0x00ff); break; case 0x15: m_attribute_addr = ((data & 0xff) << 0) | (m_attribute_addr & 0xff00); break; - case 0x16: m_horiz_char = data & 0xff; break; + case 0x16: m_horiz_char = data & 0xff; break; case 0x17: m_vert_char_disp = data & 0x1f; break; case 0x18: m_vert_scroll = data & 0xff; break; case 0x19: m_horiz_scroll = data & 0xff; break; - case 0x1a: m_color = data & 0xff; break; + case 0x1a: m_color = data & 0xff; break; case 0x1b: m_row_addr_incr = data & 0xff; break; case 0x1c: m_char_base_addr = data & 0xf0; break; case 0x1d: m_underline_ras = data & 0x1f; break; case 0x1e: m_word_count = data & 0xff; - + do { UINT8 byte = VSS_COPY ? read_videoram(m_block_addr++) : m_data; @@ -404,10 +404,10 @@ WRITE8_MEMBER( mos8563_device::register_w ) write_videoram(m_update_addr++, m_data); break; - case 0x20: m_block_addr = ((data & 0xff) << 8) | (m_block_addr & 0x00ff); break; - case 0x21: m_block_addr = ((data & 0xff) << 0) | (m_block_addr & 0xff00); break; - case 0x22: m_de_begin = ((data & 0xff) << 8) | (m_de_begin & 0x00ff); break; - case 0x23: m_de_begin = ((data & 0xff) << 0) | (m_de_begin & 0xff00); break; + case 0x20: m_block_addr = ((data & 0xff) << 8) | (m_block_addr & 0x00ff); break; + case 0x21: m_block_addr = ((data & 0xff) << 0) | (m_block_addr & 0xff00); break; + case 0x22: m_de_begin = ((data & 0xff) << 8) | (m_de_begin & 0x00ff); break; + case 0x23: m_de_begin = ((data & 0xff) << 0) | (m_de_begin & 0xff00); break; case 0x24: m_dram_refresh = data & 0x0f; break; case 0x25: m_sync_polarity = data & 0xc0; break; } diff --git a/src/emu/video/pc_vga.c b/src/emu/video/pc_vga.c index d6ce4d68033..5da7d50ce85 100644 --- a/src/emu/video/pc_vga.c +++ b/src/emu/video/pc_vga.c @@ -992,8 +992,8 @@ SCREEN_UPDATE_RGB32( pc_video_s3 ) return 0; // cursor only works in VGA or SVGA modes src = s3.cursor_start_addr * 1024; // start address is in units of 1024 bytes -// for(x=0;x<64;x++) -// printf("%08x: %02x %02x %02x %02x\n",src+x*4,vga.memory[src+x*4],vga.memory[src+x*4+1],vga.memory[src+x*4+2],vga.memory[src+x*4+3]); +// for(x=0;x<64;x++) +// printf("%08x: %02x %02x %02x %02x\n",src+x*4,vga.memory[src+x*4],vga.memory[src+x*4+1],vga.memory[src+x*4+2],vga.memory[src+x*4+3]); for(y=0;y<64;y++) { dst = &bitmap.pix32(cy + y, cx); @@ -4940,7 +4940,7 @@ static void ati_define_video_mode(running_machine &machine) clock = XTAL_42_9545MHz; logerror("Invalid dot clock %i selected.\n",clock_type); } -// logerror("ATI: Clock select type %i (%iHz / %i)\n",clock_type,clock,div); +// logerror("ATI: Clock select type %i (%iHz / %i)\n",clock_type,clock,div); recompute_params_clock(machine,divisor,clock / div); } @@ -5138,7 +5138,7 @@ WRITE16_HANDLER(mach8_subcontrol_w) { ibm8514.subctrl = data; ibm8514.substatus &= ~(data & 0x0f); // reset interrupts -// logerror("8514/A: Subsystem control write %04x\n",data); +// logerror("8514/A: Subsystem control write %04x\n",data); } READ16_HANDLER(mach8_subcontrol_r) @@ -5159,7 +5159,7 @@ READ16_HANDLER(mach8_vtotal_r) WRITE16_HANDLER(mach8_vtotal_w) { ibm8514.vtotal = data; -// vga.crtc.vert_total = data; +// vga.crtc.vert_total = data; logerror("8514/A: Vertical total write %04x\n",data); } @@ -5171,7 +5171,7 @@ READ16_HANDLER(mach8_vdisp_r) WRITE16_HANDLER(mach8_vdisp_w) { ibm8514.vdisp = data; -// vga.crtc.vert_disp_end = data >> 3; +// vga.crtc.vert_disp_end = data >> 3; logerror("8514/A: Vertical Displayed write %04x\n",data); } diff --git a/src/emu/video/saa5050.c b/src/emu/video/saa5050.c index aae31597654..b5265b04649 100644 --- a/src/emu/video/saa5050.c +++ b/src/emu/video/saa5050.c @@ -13,9 +13,9 @@ TODO: - - character rounding - - remote controller input - - boxing + - character rounding + - remote controller input + - boxing */ @@ -237,7 +237,7 @@ void saa5050_device::process_control_character(UINT8 data) case STEADY: m_flash = false; break; - + case END_BOX: case START_BOX: // TODO @@ -336,7 +336,7 @@ WRITE_LINE_MEMBER( saa5050_device::dew_w ) { m_ra = 19; m_double_height_top_row = false; - + m_frame_count++; if (m_frame_count > 50) m_frame_count = 0; } diff --git a/src/emu/video/saa5050.h b/src/emu/video/saa5050.h index ce992a4145a..92cafbc26ec 100644 --- a/src/emu/video/saa5050.h +++ b/src/emu/video/saa5050.h @@ -89,7 +89,7 @@ public: // NOTE: the following are provided for convenience only, SAA5050 is not a display controller // this emulates the common setup where bit 7 of data inverts the display, and the - // bottom half of a double height row gets the same character data as the top half + // bottom half of a double height row gets the same character data as the top half UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); protected: diff --git a/src/emu/video/tlc34076.c b/src/emu/video/tlc34076.c index 6593cae8cf4..00799fcbe74 100644 --- a/src/emu/video/tlc34076.c +++ b/src/emu/video/tlc34076.c @@ -34,7 +34,7 @@ struct tlc34076_state rgb_t pens[0x100]; }; -const tlc34076_config tlc34076_6_bit_intf = +const tlc34076_config tlc34076_6_bit_intf = { TLC34076_6_BIT }; diff --git a/src/emu/video/vector.c b/src/emu/video/vector.c index af3e2e5b0a8..2d36386fa93 100644 --- a/src/emu/video/vector.c +++ b/src/emu/video/vector.c @@ -127,7 +127,7 @@ static render_texture *get_vector_texture(float dx, float dy, float intensity) #define VCLIP 2 /* The vertices are buffered here */ -struct point +struct point { int x; int y; rgb_t col; |
