diff --git a/src/devices/cpu/mcs48/mcs48.h b/src/devices/cpu/mcs48/mcs48.h index c37f9899d9b..3640286a524 100644 --- a/src/devices/cpu/mcs48/mcs48.h +++ b/src/devices/cpu/mcs48/mcs48.h @@ -59,7 +59,7 @@ enum ***************************************************************************/ #define MCS48_LC_CLOCK(_L, _C) \ - (1 / (2 * 3.14159265358979323846 * sqrt(_L * _C))) + (1 / (2 * M_PI * sqrt(_L * _C))) #define MCS48_ALE_CLOCK(_clock) \ attotime::from_hz(_clock/(3*5)) diff --git a/src/devices/sound/vgm_visualizer.cpp b/src/devices/sound/vgm_visualizer.cpp index bab3c909ddf..6dc37c4e87b 100644 --- a/src/devices/sound/vgm_visualizer.cpp +++ b/src/devices/sound/vgm_visualizer.cpp @@ -88,7 +88,7 @@ void vgmviz_device::device_start() void vgmviz_device::fill_window() { - float window_pos_delta = (3.14159265358979f * 2) / FFT_LENGTH; + float window_pos_delta = (M_PI * 2) / FFT_LENGTH; float power = 0; for (int i = 0; i < (FFT_LENGTH / 2) + 1; i++) { diff --git a/src/frontend/mame/ui/info.cpp b/src/frontend/mame/ui/info.cpp index 32b081d7a16..b5b9626a87e 100644 --- a/src/frontend/mame/ui/info.cpp +++ b/src/frontend/mame/ui/info.cpp @@ -84,7 +84,7 @@ void get_general_warnings(std::ostream &buf, running_machine &machine, machine_f { if (bad_roms) buf << '\n'; - buf << _("There are known problems with this system\n\n"); + buf << _("There are known problems with this system:\n\n"); } // add a warning if any ROMs are flagged BAD_DUMP/NO_DUMP @@ -139,10 +139,20 @@ void get_system_warnings(std::ostream &buf, running_machine &machine, machine_fl buf << _("Screen flipping in cocktail mode is not supported.\n"); if (flags & ::machine_flags::REQUIRES_ARTWORK) buf << _("This system requires external artwork files.\n"); + + // add the 'BTANB' warnings if (flags & ::machine_flags::IS_INCOMPLETE) + { + if (buf.tellp() > start_position) + buf << '\n'; buf << _("This system was never completed. It may exhibit strange behavior or missing elements that are not bugs in the emulation.\n"); + } if (flags & ::machine_flags::NO_SOUND_HW) - buf << _("This system has no sound hardware, MAME will produce no sounds, this is expected behaviour.\n"); + { + if (buf.tellp() > start_position) + buf << '\n'; + buf << _("This system has no sound hardware, MAME will produce no sounds, this is expected behavior.\n"); + } // these are more severe warnings if (flags & ::machine_flags::MECHANICAL) diff --git a/src/mame/namco/cgang.cpp b/src/mame/namco/cgang.cpp index 35556baead1..73ccdef6b0e 100644 --- a/src/mame/namco/cgang.cpp +++ b/src/mame/namco/cgang.cpp @@ -192,9 +192,9 @@ private: u8 m_cg_motor_on = 0; u8 m_cg_motor_dir = 0; - int m_cg_motor_clk[5]; - int m_cg_motor_pos[5]; - int m_en_pos[5]; + int m_cg_motor_clk[5] = { }; + int m_cg_motor_pos[5] = { }; + int m_en_pos[5] = { }; emu_timer *m_sol_filter[5]; TIMER_CALLBACK_MEMBER(output_sol) { m_en_sol[param >> 1] = param & 1; } @@ -849,7 +849,7 @@ ROM_START( cgang ) ROM_LOAD("cg2_9c_e02a.9c", 0x00000, 0x20000, CRC(f9a3f8a0) SHA1(5ad8b408d36397227019afd15c3516f85488c6df) ) // handwritten label seen on one PCB ROM_REGION( 0x20000, "adpcm1", 0 ) - ROM_LOAD("cg2_9e_586e.9e", 0x00000, 0x20000, CRC(40e7f60b) SHA1(af641b0562db1ae033cee67df583d178fd8c93f3) ) // handwritten label seen on one PCB + ROM_LOAD("cg2_9e_586e.9e", 0x00000, 0x20000, CRC(40e7f60b) SHA1(af641b0562db1ae033cee67df583d178fd8c93f3) ) // " ROM_END } // anonymous namespace diff --git a/src/mame/nintendo/cx4fn.ipp b/src/mame/nintendo/cx4fn.ipp index 60b0adff0e4..f9a6e069a3a 100644 --- a/src/mame/nintendo/cx4fn.ipp +++ b/src/mame/nintendo/cx4fn.ipp @@ -13,10 +13,6 @@ #include #define CX4_Tan(a) (CX4_CosTable[a] ? ((((int32_t)CX4_SinTable[a]) << 16) / CX4_CosTable[a]) : 0x80000000) #define CX4_sar(b, n) ((b) >> (n)) -#ifdef PI -#undef PI -#endif -#define PI 3.1415926535897932384626433832795 //Wireframe Helpers static void CX4_C4TransfWireFrame(void) @@ -26,17 +22,17 @@ static void CX4_C4TransfWireFrame(void) cx4.c4z = (double)cx4.C4WFZVal - 0x95; //Rotate X - cx4.tanval = -(double)cx4.C4WFX2Val * PI * 2 / 128; + cx4.tanval = -(double)cx4.C4WFX2Val * M_PI * 2 / 128; cx4.c4y2 = cx4.c4y * cos(cx4.tanval) - cx4.c4z * sin(cx4.tanval); cx4.c4z2 = cx4.c4y * sin(cx4.tanval) + cx4.c4z * cos(cx4.tanval); //Rotate Y - cx4.tanval = -(double)cx4.C4WFY2Val * PI * 2 / 128; + cx4.tanval = -(double)cx4.C4WFY2Val * M_PI * 2 / 128; cx4.c4x2 = cx4.c4x * cos(cx4.tanval) + cx4.c4z2 * sin(cx4.tanval); cx4.c4z = cx4.c4x * -sin(cx4.tanval) + cx4.c4z2 * cos(cx4.tanval); //Rotate Z - cx4.tanval = -(double)cx4.C4WFDist * PI * 2 / 128; + cx4.tanval = -(double)cx4.C4WFDist * M_PI * 2 / 128; cx4.c4x = cx4.c4x2 * cos(cx4.tanval) - cx4.c4y2 * sin(cx4.tanval); cx4.c4y = cx4.c4x2 * sin(cx4.tanval) + cx4.c4y2 * cos(cx4.tanval); @@ -75,17 +71,17 @@ static void CX4_C4TransfWireFrame2(void) cx4.c4z = (double)cx4.C4WFZVal; //Rotate X - cx4.tanval = -(double)cx4.C4WFX2Val * PI * 2 / 128; + cx4.tanval = -(double)cx4.C4WFX2Val * M_PI * 2 / 128; cx4.c4y2 = cx4.c4y * cos(cx4.tanval) - cx4.c4z * sin(cx4.tanval); cx4.c4z2 = cx4.c4y * sin(cx4.tanval) + cx4.c4z * cos(cx4.tanval); //Rotate Y - cx4.tanval = -(double)cx4.C4WFY2Val * PI * 2 / 128; + cx4.tanval = -(double)cx4.C4WFY2Val * M_PI * 2 / 128; cx4.c4x2 = cx4.c4x * cos(cx4.tanval) + cx4.c4z2 * sin(cx4.tanval); cx4.c4z = cx4.c4x * -sin(cx4.tanval) + cx4.c4z2 * cos(cx4.tanval); //Rotate Z - cx4.tanval = -(double)cx4.C4WFDist * PI * 2 / 128; + cx4.tanval = -(double)cx4.C4WFDist * M_PI * 2 / 128; cx4.c4x = cx4.c4x2 * cos(cx4.tanval) - cx4.c4y2 * sin(cx4.tanval); cx4.c4y = cx4.c4x2 * sin(cx4.tanval) + cx4.c4y2 * cos(cx4.tanval); diff --git a/src/mame/nintendo/cx4ops.ipp b/src/mame/nintendo/cx4ops.ipp index eadc5ddb9b8..03f6200aadc 100644 --- a/src/mame/nintendo/cx4ops.ipp +++ b/src/mame/nintendo/cx4ops.ipp @@ -132,7 +132,7 @@ static void CX4_op1f(address_space &space) else { cx4.tanval = ((double)cx4.C41FYVal) / ((double)cx4.C41FXVal); - cx4.C41FAngleRes = (int16_t)(atan(cx4.tanval) / (PI * 2) * 512); + cx4.C41FAngleRes = (int16_t)(atan(cx4.tanval) / (M_PI * 2) * 512); cx4.C41FAngleRes = cx4.C41FAngleRes; if(cx4.C41FXVal < 0) { diff --git a/src/mame/vtech/socrates.cpp b/src/mame/vtech/socrates.cpp index ed0c3c4cda9..261cac587b8 100644 --- a/src/mame/vtech/socrates.cpp +++ b/src/mame/vtech/socrates.cpp @@ -742,8 +742,8 @@ rgb_t socrates_state::create_color(uint8_t color) int const chromaindex = color&0x0F; int const swappedcolor = ((color&0xf0)>>4)|((color&0x0f)<<4); double finalY = (1/LUMAMAX) * lumatable[swappedcolor]; - double const finalI = (M_I * (cos((phaseangle[chromaindex]/180)*3.141592653589793)))* ((1/CHROMAMAX)*chromaintensity[swappedcolor]); - double const finalQ = (M_Q * (sin((phaseangle[chromaindex]/180)*3.141592653589793)))* ((1/CHROMAMAX)*chromaintensity[swappedcolor]); + double const finalI = (M_I * (cos((phaseangle[chromaindex]/180)*M_PI)))* ((1/CHROMAMAX)*chromaintensity[swappedcolor]); + double const finalQ = (M_Q * (sin((phaseangle[chromaindex]/180)*M_PI)))* ((1/CHROMAMAX)*chromaintensity[swappedcolor]); if (finalY > 1) finalY = 1; // clamp luma // calculate the R, G and B values here, neato matrix math double finalR = (finalY*1)+(finalI*0.9563)+(finalQ*0.6210);