diff options
| author | 2015-02-25 08:09:13 +0100 | |
|---|---|---|
| committer | 2015-02-25 08:09:13 +0100 | |
| commit | 6ae44e46f91aa2bd74d9895e6bfd345baebd3d22 (patch) | |
| tree | 70be3ad6f499bb138c0335e8d2d16790f6f971b3 /src/emu/cpu | |
| parent | 33c8d18d612786130c2baafd644604137f6f4ef8 (diff) | |
Cleanups and version bumpmame0159
Diffstat (limited to 'src/emu/cpu')
| -rw-r--r-- | src/emu/cpu/amis2000/amis2000.c | 10 | ||||
| -rw-r--r-- | src/emu/cpu/amis2000/amis2000.h | 10 | ||||
| -rw-r--r-- | src/emu/cpu/amis2000/amis2000d.c | 6 | ||||
| -rw-r--r-- | src/emu/cpu/amis2000/amis2000op.inc | 4 | ||||
| -rw-r--r-- | src/emu/cpu/i386/i386ops.h | 2 | ||||
| -rw-r--r-- | src/emu/cpu/m6502/m4510.c | 2 | ||||
| -rw-r--r-- | src/emu/cpu/m68000/m68000.h | 2 | ||||
| -rw-r--r-- | src/emu/cpu/m68000/m68kcpu.h | 4 | ||||
| -rw-r--r-- | src/emu/cpu/ucom4/ucom4.c | 24 | ||||
| -rw-r--r-- | src/emu/cpu/ucom4/ucom4.h | 4 | ||||
| -rw-r--r-- | src/emu/cpu/ucom4/ucom4d.c | 4 | ||||
| -rw-r--r-- | src/emu/cpu/ucom4/ucom4op.inc | 50 |
12 files changed, 61 insertions, 61 deletions
diff --git a/src/emu/cpu/amis2000/amis2000.c b/src/emu/cpu/amis2000/amis2000.c index ac680096275..d23e2dbdec4 100644 --- a/src/emu/cpu/amis2000/amis2000.c +++ b/src/emu/cpu/amis2000/amis2000.c @@ -184,7 +184,7 @@ void amis2152_cpu_device::device_start() amis2000_base_device::device_start(); m_d2f_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(amis2152_cpu_device::d2f_timer_cb), this)); - + // zerofill m_d2f_latch = 0; m_fout_state = 0; @@ -205,7 +205,7 @@ void amis2000_base_device::device_reset() m_pc = 0; m_op = 0; m_skip = false; - + // clear i/o m_a = 0x1fff; m_write_a(0, m_a, 0xffff); @@ -235,14 +235,14 @@ void amis2000_base_device::execute_run() while (m_icount > 0) { m_icount--; - + // remember previous opcode m_prev_op = m_op; debugger_instruction_hook(this, m_pc); m_op = m_program->read_byte(m_pc); m_pc = (m_pc + 1) & 0x1fff; - + if (m_skip) { // always skip over PP prefix @@ -299,7 +299,7 @@ void amis2000_base_device::execute_run() case 0x2d: op_sf2(); break; case 0x2e: op_tf1(); break; case 0x2f: op_tf2(); break; - + default: switch (m_op & 0xfc) { diff --git a/src/emu/cpu/amis2000/amis2000.h b/src/emu/cpu/amis2000/amis2000.h index 8adcb4e2f7c..cf7c67c63a3 100644 --- a/src/emu/cpu/amis2000/amis2000.h +++ b/src/emu/cpu/amis2000/amis2000.h @@ -95,7 +95,7 @@ protected: address_space_config m_data_config; address_space *m_program; address_space *m_data; - + UINT8 m_bu_bits; UINT16 m_bu_mask; UINT8 m_callstack_bits; // number of program counter bits held in callstack @@ -129,14 +129,14 @@ protected: devcb_write8 m_write_d; devcb_write16 m_write_a; devcb_write_line m_write_f; - + // misc internal helpers UINT8 ram_r(); void ram_w(UINT8 data); void pop_callstack(); void push_callstack(); void d_latch_out(bool active); - + // opcode handlers virtual void op_lai(); virtual void op_lab(); @@ -221,7 +221,7 @@ protected: // device-level overrides virtual void device_start(); virtual void device_reset(); - + // digital-to-frequency converter UINT8 m_d2f_latch; emu_timer *m_d2f_timer; @@ -229,7 +229,7 @@ protected: void d2f_timer_clock(); TIMER_CALLBACK_MEMBER(d2f_timer_cb); - + // opcode handlers virtual void op_szk(); }; diff --git a/src/emu/cpu/amis2000/amis2000d.c b/src/emu/cpu/amis2000/amis2000d.c index 971a1a61571..27077170402 100644 --- a/src/emu/cpu/amis2000/amis2000d.c +++ b/src/emu/cpu/amis2000/amis2000d.c @@ -108,21 +108,21 @@ CPU_DISASSEMBLE( amis2000 ) char *dst = buffer; dst += sprintf(dst, "%-5s ", s_mnemonics[instr]); - + // opcode parameter int mask = s_bits[instr]; bool complement = (mask < 0); if (mask < 0) mask = -mask; mask = (1 << mask) - 1; - + if (mask != 0) { UINT8 param = op; if (complement) param = ~param; param &= mask; - + if (mask < 0x10) dst += sprintf(dst, "%d", param); else diff --git a/src/emu/cpu/amis2000/amis2000op.inc b/src/emu/cpu/amis2000/amis2000op.inc index 85f285e66bc..1b647b071bf 100644 --- a/src/emu/cpu/amis2000/amis2000op.inc +++ b/src/emu/cpu/amis2000/amis2000op.inc @@ -307,7 +307,7 @@ void amis2000_base_device::op_jmp() // JMP X: jump to X(+PP) UINT16 mask = 0x3f; UINT16 param = m_op & mask; - + // if previous opcode was PP, change PC high bits too if ((m_prev_op & 0xf0) == 0x60) { @@ -507,7 +507,7 @@ TIMER_CALLBACK_MEMBER(amis2152_cpu_device::d2f_timer_cb) { m_write_f(m_fout_state); m_fout_state ^= 1; - + d2f_timer_clock(); } diff --git a/src/emu/cpu/i386/i386ops.h b/src/emu/cpu/i386/i386ops.h index 9edaee19683..66e7782687a 100644 --- a/src/emu/cpu/i386/i386ops.h +++ b/src/emu/cpu/i386/i386ops.h @@ -329,7 +329,7 @@ const i386_device::X86_OPCODE i386_device::s_x86_opcode_table[] = { 0x32, OP_2BYTE|OP_PENTIUM, &i386_device::pentium_rdmsr, &i386_device::pentium_rdmsr, false}, { 0x38, OP_2BYTE|OP_PENTIUM, &i386_device::i386_decode_three_byte38, &i386_device::i386_decode_three_byte38,false}, { 0x3A, OP_2BYTE|OP_PENTIUM, &i386_device::i386_decode_three_byte3a, &i386_device::i386_decode_three_byte3a,false}, - { 0x40, OP_2BYTE|OP_PENTIUM, &i386_device::pentium_cmovo_r16_rm16, &i386_device::pentium_cmovo_r32_rm32, false}, + { 0x40, OP_2BYTE|OP_PENTIUM, &i386_device::pentium_cmovo_r16_rm16, &i386_device::pentium_cmovo_r32_rm32, false}, { 0x41, OP_2BYTE|OP_PENTIUM, &i386_device::pentium_cmovno_r16_rm16, &i386_device::pentium_cmovno_r32_rm32, false}, { 0x42, OP_2BYTE|OP_PENTIUM, &i386_device::pentium_cmovb_r16_rm16, &i386_device::pentium_cmovb_r32_rm32, false}, { 0x43, OP_2BYTE|OP_PENTIUM, &i386_device::pentium_cmovae_r16_rm16, &i386_device::pentium_cmovae_r32_rm32, false}, diff --git a/src/emu/cpu/m6502/m4510.c b/src/emu/cpu/m6502/m4510.c index a435ae7aa4e..04756fc52ed 100644 --- a/src/emu/cpu/m6502/m4510.c +++ b/src/emu/cpu/m6502/m4510.c @@ -86,7 +86,7 @@ bool m4510_device::memory_translate(address_spacenum spacenum, int intention, of { address = map(address); } - + return true; } diff --git a/src/emu/cpu/m68000/m68000.h b/src/emu/cpu/m68000/m68000.h index d9b9200cee6..a7da4266061 100644 --- a/src/emu/cpu/m68000/m68000.h +++ b/src/emu/cpu/m68000/m68000.h @@ -357,7 +357,7 @@ public: UINT32 ic_address[M68K_IC_SIZE]; /* instruction cache address data */ UINT32 ic_data[M68K_IC_SIZE]; /* instruction cache content data */ - bool ic_valid[M68K_IC_SIZE]; /* instruction cache valid flags */ + bool ic_valid[M68K_IC_SIZE]; /* instruction cache valid flags */ diff --git a/src/emu/cpu/m68000/m68kcpu.h b/src/emu/cpu/m68000/m68kcpu.h index aeb45aadd91..0ca635c630d 100644 --- a/src/emu/cpu/m68000/m68kcpu.h +++ b/src/emu/cpu/m68000/m68kcpu.h @@ -689,14 +689,14 @@ INLINE UINT32 m68ki_ic_readimm16(m68000_base_device *m68k, UINT32 address) if (m68k->cpu_type & (CPU_TYPE_EC020 | CPU_TYPE_020)) { UINT32 tag = (address >> 8) | (m68k->s_flag ? 0x1000000 : 0); - int idx = (address >> 2) & 0x3f; // 1-of-64 select + int idx = (address >> 2) & 0x3f; // 1-of-64 select // do a cache fill if the line is invalid or the tags don't match if ((!m68k->ic_valid[idx]) || (m68k->ic_address[idx] != tag)) { m68k->ic_data[idx] = m68k->read32(address & ~3); -// printf("m68k: doing cache fill at %08x (tag %08x idx %d)\n", address, tag, idx); +// printf("m68k: doing cache fill at %08x (tag %08x idx %d)\n", address, tag, idx); // if no buserror occured, validate the tag if (!m68k->mmu_tmp_buserror_occurred) diff --git a/src/emu/cpu/ucom4/ucom4.c b/src/emu/cpu/ucom4/ucom4.c index e7f25a26661..b415595a5b0 100644 --- a/src/emu/cpu/ucom4/ucom4.c +++ b/src/emu/cpu/ucom4/ucom4.c @@ -3,7 +3,7 @@ /* NEC uCOM-4 MCU family cores - + References: - 1981 NEC Microcomputers Catalog (later editions may have errors!) - Supplement to uCOM-43 Single Chip Microcomputer Users' Manual @@ -20,7 +20,7 @@ enum NEC_UCOM43 = 0, NEC_UCOM44, NEC_UCOM45 -}; +}; #include "ucom4.h" #include "debugger.h" @@ -115,7 +115,7 @@ enum void ucom4_cpu_device::device_start() { assert(NEC_UCOM4_PORTA == 0); - + m_program = &space(AS_PROGRAM); m_data = &space(AS_DATA); m_prgmask = (1 << m_prgwidth) - 1; @@ -195,12 +195,12 @@ void ucom4_cpu_device::device_reset() m_skip = false; m_timer->adjust(attotime::never); - + // clear interrupt m_int_line = CLEAR_LINE; m_int_f = 0; m_inte_f = (m_family == NEC_UCOM43) ? 0 : 1; - + // clear i/o for (int i = NEC_UCOM4_PORTC; i <= NEC_UCOM4_PORTI; i++) output_w(i, 0xf); @@ -221,9 +221,9 @@ void ucom4_cpu_device::execute_set_input(int line, int state) if (m_int_line == CLEAR_LINE && state) m_int_f = 1; m_int_line = state; - + break; - + default: break; } @@ -273,13 +273,13 @@ void ucom4_cpu_device::execute_run() m_bitmask = 1 << (m_op & 0x03); increment_pc(); fetch_arg(); - + if (m_skip) { m_skip = false; m_op = 0; // nop } - + // handle opcode switch (m_op & 0xf0) { @@ -287,9 +287,9 @@ void ucom4_cpu_device::execute_run() case 0x90: op_li(); break; case 0xa0: op_jmpcal(); break; case 0xb0: op_czp(); break; - + case 0xc0: case 0xd0: case 0xe0: case 0xf0: op_jcp(); break; - + default: switch (m_op) { @@ -374,7 +374,7 @@ void ucom4_cpu_device::execute_run() case 0x7c: op_sfb(); break; } break; // 0xfc - + } break; // 0xff diff --git a/src/emu/cpu/ucom4/ucom4.h b/src/emu/cpu/ucom4/ucom4.h index 07d80603c67..c215b2336f2 100644 --- a/src/emu/cpu/ucom4/ucom4.h +++ b/src/emu/cpu/ucom4/ucom4.h @@ -143,7 +143,7 @@ protected: bool m_skip; // skip next opcode int m_icount; emu_timer *m_timer; - + UINT16 m_pc; // program counter UINT8 m_acc; // 4-bit accumulator UINT8 m_dpl; // 4-bit data pointer low (RAM x) @@ -169,7 +169,7 @@ protected: devcb_write8 m_write_g; devcb_write8 m_write_h; devcb_write8 m_write_i; - + // misc internal helpers void increment_pc(); void fetch_arg(); diff --git a/src/emu/cpu/ucom4/ucom4d.c b/src/emu/cpu/ucom4/ucom4d.c index 531be0ed58c..14adfefbc79 100644 --- a/src/emu/cpu/ucom4/ucom4d.c +++ b/src/emu/cpu/ucom4/ucom4d.c @@ -121,7 +121,7 @@ CPU_DISASSEMBLE(ucom4) char *dst = buffer; dst += sprintf(dst, "%-4s ", s_mnemonics[instr]); - + // opcode parameter int bits = s_bits[instr]; if (bits) @@ -133,7 +133,7 @@ CPU_DISASSEMBLE(ucom4) param = (param << (bits / 10)) | (op2 & ((1 << (bits / 10)) - 1)); bits = (bits % 10) + (bits / 10); } - + // special case for CZP if (instr == mCZP) { diff --git a/src/emu/cpu/ucom4/ucom4op.inc b/src/emu/cpu/ucom4/ucom4op.inc index 8de834438b5..8ac0a462145 100644 --- a/src/emu/cpu/ucom4/ucom4op.inc +++ b/src/emu/cpu/ucom4/ucom4op.inc @@ -32,7 +32,7 @@ UINT8 ucom4_cpu_device::input_r(int index) { index &= 0xf; UINT8 inp = 0xf; - + switch (index) { case NEC_UCOM4_PORTA: inp = m_read_a(index, 0xff); break; @@ -62,7 +62,7 @@ void ucom4_cpu_device::output_w(int index, UINT8 data) case NEC_UCOM4_PORTG: m_write_g(index, data, 0xff); break; case NEC_UCOM4_PORTH: m_write_h(index, data, 0xff); break; case NEC_UCOM4_PORTI: m_write_i(index, data & 7, 0xff); break; - + default: logerror("%s write to unknown port %c = $%X at $%03X\n", tag(), 'A' + index, data & 0xf, m_pc); break; @@ -370,7 +370,7 @@ void ucom4_cpu_device::op_ci() { // CI X: skip next on ACC equals X m_skip = (m_acc == (m_arg & 0x0f)); - + if ((m_arg & 0xf0) != 0xc0) logerror("%s CI opcode unexpected upper arg $%02X at $%03X\n", tag(), m_arg & 0xf0, m_pc); } @@ -397,7 +397,7 @@ void ucom4_cpu_device::op_cli() { // CLI X: skip next on DPl equals X m_skip = (m_dpl == (m_arg & 0x0f)); - + if ((m_arg & 0xf0) != 0xe0) logerror("%s CLI opcode unexpected upper arg $%02X at $%03X\n", tag(), m_arg & 0xf0, m_pc); } @@ -530,7 +530,7 @@ void ucom4_cpu_device::op_taw() void ucom4_cpu_device::op_taz() { if (!check_op_43()) return; - + // TAZ: Transfer ACC to Z m_icount--; ucom43_reg_w(UCOM43_Z, m_acc); @@ -539,7 +539,7 @@ void ucom4_cpu_device::op_taz() void ucom4_cpu_device::op_thx() { if (!check_op_43()) return; - + // THX: Transfer DPh to X m_icount--; ucom43_reg_w(UCOM43_X, m_dph); @@ -548,7 +548,7 @@ void ucom4_cpu_device::op_thx() void ucom4_cpu_device::op_tly() { if (!check_op_43()) return; - + // TLY: Transfer DPl to Y m_icount--; ucom43_reg_w(UCOM43_Y, m_dpl); @@ -560,7 +560,7 @@ void ucom4_cpu_device::op_tly() void ucom4_cpu_device::op_xaw() { if (!check_op_43()) return; - + // XAW: Exchange ACC with W m_icount--; UINT8 old_acc = m_acc; @@ -571,7 +571,7 @@ void ucom4_cpu_device::op_xaw() void ucom4_cpu_device::op_xaz() { if (!check_op_43()) return; - + // XAZ: Exchange ACC with Z m_icount--; UINT8 old_acc = m_acc; @@ -582,7 +582,7 @@ void ucom4_cpu_device::op_xaz() void ucom4_cpu_device::op_xhr() { if (!check_op_43()) return; - + // XHR: Exchange DPh with R m_icount--; UINT8 old_dph = m_dph; @@ -593,7 +593,7 @@ void ucom4_cpu_device::op_xhr() void ucom4_cpu_device::op_xhx() { if (!check_op_43()) return; - + // XHX: Exchange DPh with X m_icount--; UINT8 old_dph = m_dph; @@ -604,7 +604,7 @@ void ucom4_cpu_device::op_xhx() void ucom4_cpu_device::op_xls() { if (!check_op_43()) return; - + // XLS: Exchange DPl with S m_icount--; UINT8 old_dpl = m_dpl; @@ -615,7 +615,7 @@ void ucom4_cpu_device::op_xls() void ucom4_cpu_device::op_xly() { if (!check_op_43()) return; - + // XLY: Exchange DPl with Y m_icount--; UINT8 old_dpl = m_dpl; @@ -626,7 +626,7 @@ void ucom4_cpu_device::op_xly() void ucom4_cpu_device::op_xc() { if (!check_op_43()) return; - + // XC: Exchange Carry F/F with Carry Save F/F UINT8 c = m_carry_f; m_carry_f = m_carry_s_f; @@ -639,7 +639,7 @@ void ucom4_cpu_device::op_xc() void ucom4_cpu_device::op_sfb() { if (!check_op_43()) return; - + // SFB B: Set a single bit of FLAG m_icount--; ucom43_reg_w(UCOM43_F, ucom43_reg_r(UCOM43_F) | m_bitmask); @@ -648,7 +648,7 @@ void ucom4_cpu_device::op_sfb() void ucom4_cpu_device::op_rfb() { if (!check_op_43()) return; - + // RFB B: Reset a single bit of FLAG m_icount--; ucom43_reg_w(UCOM43_F, ucom43_reg_r(UCOM43_F) & ~m_bitmask); @@ -657,7 +657,7 @@ void ucom4_cpu_device::op_rfb() void ucom4_cpu_device::op_fbt() { if (!check_op_43()) return; - + // FBT B: skip next on bit(FLAG) m_icount--; m_skip = ((ucom43_reg_r(UCOM43_F) & m_bitmask) != 0); @@ -666,7 +666,7 @@ void ucom4_cpu_device::op_fbt() void ucom4_cpu_device::op_fbf() { if (!check_op_43()) return; - + // FBF B: skip next on not bit(FLAG) m_icount--; m_skip = ((ucom43_reg_r(UCOM43_F) & m_bitmask) == 0); @@ -678,7 +678,7 @@ void ucom4_cpu_device::op_fbf() void ucom4_cpu_device::op_rar() { if (!check_op_43()) return; - + // RAR: Rotate ACC Right through Carry F/F UINT8 c = m_acc & 1; m_acc = m_acc >> 1 | m_carry_f << 3; @@ -691,7 +691,7 @@ void ucom4_cpu_device::op_rar() void ucom4_cpu_device::op_inm() { if (!check_op_43()) return; - + // INM: Increment RAM, skip next on carry UINT8 val = (ram_r() + 1) & 0xf; ram_w(val); @@ -701,7 +701,7 @@ void ucom4_cpu_device::op_inm() void ucom4_cpu_device::op_dem() { if (!check_op_43()) return; - + // DEM: Decrement RAM, skip next on carry UINT8 val = (ram_r() - 1) & 0xf; ram_w(val); @@ -714,7 +714,7 @@ void ucom4_cpu_device::op_dem() void ucom4_cpu_device::op_stm() { if (!check_op_43()) return; - + // STM X: Reset Timer F/F, Start Timer with X m_timer_f = 0; @@ -730,7 +730,7 @@ void ucom4_cpu_device::op_stm() void ucom4_cpu_device::op_ttm() { if (!check_op_43()) return; - + // TTM: skip next on Timer F/F m_skip = (m_timer_f != 0); } @@ -741,7 +741,7 @@ void ucom4_cpu_device::op_ttm() void ucom4_cpu_device::op_ei() { if (!check_op_43()) return; - + // EI: Set Interrupt Enable F/F m_inte_f = 1; } @@ -749,7 +749,7 @@ void ucom4_cpu_device::op_ei() void ucom4_cpu_device::op_di() { if (!check_op_43()) return; - + // DI: Reset Interrupt Enable F/F m_inte_f = 0; } |
