diff options
author | 2011-02-09 15:01:01 +0000 | |
---|---|---|
committer | 2011-02-09 15:01:01 +0000 | |
commit | 4fa610aa02582fe7b86688a05c5ee7f92b703497 (patch) | |
tree | d8c1155af3236f2e9259bd906c9ed26aa33f1142 /src/emu/cpu/tms32031 | |
parent | a38c67f27bf9f10b4bafa7db0344df68b8560ff5 (diff) |
Cleanups and version bump.mame0141u2
Diffstat (limited to 'src/emu/cpu/tms32031')
-rw-r--r-- | src/emu/cpu/tms32031/32031ops.c | 30 | ||||
-rw-r--r-- | src/emu/cpu/tms32031/tms32031.c | 22 | ||||
-rw-r--r-- | src/emu/cpu/tms32031/tms32031.h | 14 |
3 files changed, 33 insertions, 33 deletions
diff --git a/src/emu/cpu/tms32031/32031ops.c b/src/emu/cpu/tms32031/32031ops.c index 9616c675705..9fae72f13cd 100644 --- a/src/emu/cpu/tms32031/32031ops.c +++ b/src/emu/cpu/tms32031/32031ops.c @@ -1,9 +1,9 @@ /*************************************************************************** 32031ops.c - + TMS32031/2 emulator - + **************************************************************************** Copyright Aaron Giles @@ -84,8 +84,8 @@ #define OR_V_ADD(a,b,r) do { UINT32 temp = ((~((a) ^ (b)) & ((a) ^ (r))) >> 30) & VFLAG; IREG(TMR_ST) |= temp | (temp << 4); } while (0) #define OR_C_SUB(a,b,r) do { IREG(TMR_ST) |= ((UINT32)(b) > (UINT32)(a)); } while (0) #define OR_C_ADD(a,b,r) do { IREG(TMR_ST) |= ((UINT32)(~(a)) < (UINT32)(b)); } while (0) -#define OR_NZCV_SUB(a,b,r) do { OR_V_SUB(a,b,r); OR_C_SUB(a,b,r); OR_NZ(r); } while (0) -#define OR_NZCV_ADD(a,b,r) do { OR_V_ADD(a,b,r); OR_C_ADD(a,b,r); OR_NZ(r); } while (0) +#define OR_NZCV_SUB(a,b,r) do { OR_V_SUB(a,b,r); OR_C_SUB(a,b,r); OR_NZ(r); } while (0) +#define OR_NZCV_ADD(a,b,r) do { OR_V_ADD(a,b,r); OR_C_ADD(a,b,r); OR_NZ(r); } while (0) #define OVM() (IREG(TMR_ST) & OVMFLAG) @@ -6346,26 +6346,26 @@ void tms3203x_device::xor3sti(UINT32 op) UINT32 (tms3203x_device::*const tms3203x_device::s_indirect_d[0x20])(UINT32, UINT8) = { - &tms3203x_device::mod00_d, &tms3203x_device::mod01_d, &tms3203x_device::mod02_d, &tms3203x_device::mod03_d, + &tms3203x_device::mod00_d, &tms3203x_device::mod01_d, &tms3203x_device::mod02_d, &tms3203x_device::mod03_d, &tms3203x_device::mod04_d, &tms3203x_device::mod05_d, &tms3203x_device::mod06_d, &tms3203x_device::mod07_d, - &tms3203x_device::mod08, &tms3203x_device::mod09, &tms3203x_device::mod0a, &tms3203x_device::mod0b, + &tms3203x_device::mod08, &tms3203x_device::mod09, &tms3203x_device::mod0a, &tms3203x_device::mod0b, &tms3203x_device::mod0c, &tms3203x_device::mod0d, &tms3203x_device::mod0e, &tms3203x_device::mod0f, - &tms3203x_device::mod10, &tms3203x_device::mod11, &tms3203x_device::mod12, &tms3203x_device::mod13, + &tms3203x_device::mod10, &tms3203x_device::mod11, &tms3203x_device::mod12, &tms3203x_device::mod13, &tms3203x_device::mod14, &tms3203x_device::mod15, &tms3203x_device::mod16, &tms3203x_device::mod17, - &tms3203x_device::mod18, &tms3203x_device::mod19, &tms3203x_device::modillegal, &tms3203x_device::modillegal, + &tms3203x_device::mod18, &tms3203x_device::mod19, &tms3203x_device::modillegal, &tms3203x_device::modillegal, &tms3203x_device::modillegal, &tms3203x_device::modillegal, &tms3203x_device::modillegal, &tms3203x_device::modillegal }; UINT32 (tms3203x_device::*const tms3203x_device::s_indirect_1[0x20])(UINT32, UINT8) = { - &tms3203x_device::mod00_1, &tms3203x_device::mod01_1, &tms3203x_device::mod02_1, &tms3203x_device::mod03_1, + &tms3203x_device::mod00_1, &tms3203x_device::mod01_1, &tms3203x_device::mod02_1, &tms3203x_device::mod03_1, &tms3203x_device::mod04_1, &tms3203x_device::mod05_1, &tms3203x_device::mod06_1, &tms3203x_device::mod07_1, - &tms3203x_device::mod08, &tms3203x_device::mod09, &tms3203x_device::mod0a, &tms3203x_device::mod0b, + &tms3203x_device::mod08, &tms3203x_device::mod09, &tms3203x_device::mod0a, &tms3203x_device::mod0b, &tms3203x_device::mod0c, &tms3203x_device::mod0d, &tms3203x_device::mod0e, &tms3203x_device::mod0f, - &tms3203x_device::mod10, &tms3203x_device::mod11, &tms3203x_device::mod12, &tms3203x_device::mod13, + &tms3203x_device::mod10, &tms3203x_device::mod11, &tms3203x_device::mod12, &tms3203x_device::mod13, &tms3203x_device::mod14, &tms3203x_device::mod15, &tms3203x_device::mod16, &tms3203x_device::mod17, - &tms3203x_device::mod18, &tms3203x_device::mod19, &tms3203x_device::modillegal, &tms3203x_device::modillegal, + &tms3203x_device::mod18, &tms3203x_device::mod19, &tms3203x_device::modillegal, &tms3203x_device::modillegal, &tms3203x_device::modillegal, &tms3203x_device::modillegal, &tms3203x_device::modillegal, &tms3203x_device::modillegal }; @@ -6374,11 +6374,11 @@ UINT32 (tms3203x_device::*const tms3203x_device::s_indirect_1_def[0x20])(UINT32, { &tms3203x_device::mod00_1_def, &tms3203x_device::mod01_1_def, &tms3203x_device::mod02_1_def, &tms3203x_device::mod03_1_def, &tms3203x_device::mod04_1_def, &tms3203x_device::mod05_1_def, &tms3203x_device::mod06_1_def, &tms3203x_device::mod07_1_def, - &tms3203x_device::mod08_def, &tms3203x_device::mod09_def, &tms3203x_device::mod0a_def, &tms3203x_device::mod0b_def, + &tms3203x_device::mod08_def, &tms3203x_device::mod09_def, &tms3203x_device::mod0a_def, &tms3203x_device::mod0b_def, &tms3203x_device::mod0c_def, &tms3203x_device::mod0d_def, &tms3203x_device::mod0e_def, &tms3203x_device::mod0f_def, - &tms3203x_device::mod10_def, &tms3203x_device::mod11_def, &tms3203x_device::mod12_def, &tms3203x_device::mod13_def, + &tms3203x_device::mod10_def, &tms3203x_device::mod11_def, &tms3203x_device::mod12_def, &tms3203x_device::mod13_def, &tms3203x_device::mod14_def, &tms3203x_device::mod15_def, &tms3203x_device::mod16_def, &tms3203x_device::mod17_def, - &tms3203x_device::mod18_def, &tms3203x_device::mod19_def, &tms3203x_device::modillegal_def,&tms3203x_device::modillegal_def, + &tms3203x_device::mod18_def, &tms3203x_device::mod19_def, &tms3203x_device::modillegal_def,&tms3203x_device::modillegal_def, &tms3203x_device::modillegal_def,&tms3203x_device::modillegal_def,&tms3203x_device::modillegal_def,&tms3203x_device::modillegal_def }; diff --git a/src/emu/cpu/tms32031/tms32031.c b/src/emu/cpu/tms32031/tms32031.c index 21504cdd37f..618d978f675 100644 --- a/src/emu/cpu/tms32031/tms32031.c +++ b/src/emu/cpu/tms32031/tms32031.c @@ -1,9 +1,9 @@ /*************************************************************************** tms32031.c - + TMS32031/2 emulator - + **************************************************************************** Copyright Aaron Giles @@ -291,7 +291,7 @@ float tms3203x_device::tmsreg::as_float() const int exp = (exponent() + 127) << 23; id.i[0] = exp + (mantissa() >> 8); } - + // handle negative numbers else { @@ -299,7 +299,7 @@ float tms3203x_device::tmsreg::as_float() const INT32 man = -mantissa(); id.i[0] = 0x80000000 + exp + ((man >> 8) & 0x00ffffff); } - + // return the converted float return id.f[0]; } @@ -326,7 +326,7 @@ double tms3203x_device::tmsreg::as_double() const id.i[BYTE_XOR_BE(0)] = exp + (mantissa() >> 11); id.i[BYTE_XOR_BE(1)] = (mantissa() << 21) & 0xffe00000; } - + // handle negative numbers else { @@ -335,7 +335,7 @@ double tms3203x_device::tmsreg::as_double() const id.i[BYTE_XOR_BE(0)] = 0x80000000 + exp + ((man >> 11) & 0x001fffff); id.i[BYTE_XOR_BE(1)] = (man << 21) & 0xffe00000; } - + // return the converted double return id.d; } @@ -360,7 +360,7 @@ void tms3203x_device::tmsreg::from_double(double val) set_mantissa(0); set_exponent(-128); } - + // if we're too large, map to the maximum value else if (exponent > 127) { @@ -370,21 +370,21 @@ void tms3203x_device::tmsreg::from_double(double val) set_mantissa(0x80000001); set_exponent(127); } - + // if we're positive, map directly else if ((INT32)id.i[BYTE_XOR_BE(0)] >= 0) { set_mantissa(mantissa); set_exponent(exponent); } - + // if we're negative with a non-zero mantissa, remove the leading sign bit else if (mantissa != 0) { set_mantissa(0x80000000 | -mantissa); set_exponent(exponent); } - + // if we're negative with a zero mantissa, normalize else { @@ -846,7 +846,7 @@ void tms3203x_device::execute_run() execute_one(); } } - + // debugging case else { diff --git a/src/emu/cpu/tms32031/tms32031.h b/src/emu/cpu/tms32031/tms32031.h index 397e331d9de..2a5910932f6 100644 --- a/src/emu/cpu/tms32031/tms32031.h +++ b/src/emu/cpu/tms32031/tms32031.h @@ -1,9 +1,9 @@ /*************************************************************************** tms32031.h - + TMS32031/2 emulator - + **************************************************************************** Copyright Aaron Giles @@ -211,21 +211,21 @@ class tms3203x_device : public cpu_device tmsreg() { i32[0] = i32[1] = 0; } tmsreg(double value) { from_double(value); } tmsreg(INT32 mantissa, INT8 exponent) { set_mantissa(mantissa); set_exponent(exponent); } - + // getters UINT32 integer() const { return i32[0]; } INT32 mantissa() const { return i32[0]; } INT8 exponent() const { return i32[1]; } void set_mantissa(INT32 man) { i32[0] = man; } void set_exponent(INT8 exp) { i32[1] = exp; } - + // exporters float as_float() const; double as_double() const; - + // importers void from_double(double); - + UINT32 i32[2]; }; @@ -850,7 +850,7 @@ protected: static UINT32 (tms3203x_device::*const s_indirect_1_def[0x20])(UINT32, UINT8, UINT32 *&); #if (TMS_3203X_LOG_OPCODE_USAGE) - UINT32 m_hits[0x200*4]; + UINT32 m_hits[0x200*4]; #endif }; |