please bear with me.. these are needed to compile in GCC 5.2 and I want mingw guys to see them. with luck they can be reverted in a couple of days (nw)

This commit is contained in:
Cowering 2015-07-23 10:48:28 -05:00
parent 9d0e2427a4
commit df2ebdea8d
18 changed files with 210 additions and 14 deletions

View File

@ -14,6 +14,13 @@
#include "chd.h"
#include "sound/samples.h"
// for now, make buggy GCC/Mingw STFU about I64FMT
#if (defined(__MINGW32__) && (__GNUC__ >= 5))
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
#pragma GCC diagnostic ignored "-Wformat-extra-args"
#endif
//**************************************************************************
// CORE FUNCTIONS
@ -607,3 +614,7 @@ audit_record::audit_record(const char *name, media_type type)
m_shared_device(NULL)
{
}
#if (defined(__MINGW32__) && (__GNUC__ >= 5))
#pragma GCC diagnostic pop
#endif

View File

@ -13,6 +13,14 @@
#include "sh2.h"
#include "sh2comn.h"
// for now, make buggy GCC/Mingw STFU about I64FMT
#if (defined(__MINGW32__) && (__GNUC__ >= 5))
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
#pragma GCC diagnostic ignored "-Wformat-extra-args"
#endif
#define VERBOSE 0
#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
@ -887,7 +895,7 @@ void sh2_device::sh2_exception(const char *message, int irqline)
/*
SH-7021 on-chip device
*/
void sh2a_device::sh7032_dma_exec(int ch)
{
const short dma_word_size[4] = { 0, +1, -1, 0 };
@ -897,11 +905,11 @@ void sh2a_device::sh7032_dma_exec(int ch)
logerror("Warning: SH7032 DMA enables non auto-request transfer\n");
return;
}
// channel enable & master enable
if((m_dma[ch].chcr & 1) == 0 || (m_dmaor & 1) == 0)
return;
printf("%08x %08x %04x\n",m_dma[ch].sar,m_dma[ch].dar,m_dma[ch].chcr);
UINT8 dm = (m_dma[ch].chcr >> 14) & 3; /**< Destination Address Mode bits */
UINT8 sm = (m_dma[ch].chcr >> 12) & 3; /**< Source Address Mode bits */
@ -909,25 +917,25 @@ void sh2a_device::sh7032_dma_exec(int ch)
int src_word_size = dma_word_size[sm] * ((ts == true) ? 2 : 1);
int dst_word_size = dma_word_size[dm] * ((ts == true) ? 2 : 1);
UINT32 src_addr = m_dma[ch].sar;
UINT32 dst_addr = m_dma[ch].dar;
UINT32 dst_addr = m_dma[ch].dar;
UINT32 size_index = m_dma[ch].tcr;
if(size_index == 0)
size_index = 0x10000;
if(ts == false)
logerror("SH7032: DMA byte mode check\n");
for(int index = size_index;index>-1;index--)
{
if(ts == true)
m_program->write_word(dst_addr,m_program->read_word(src_addr));
else
m_program->write_byte(dst_addr,m_program->read_byte(src_addr));
src_addr += src_word_size;
dst_addr += dst_word_size;
}
m_dma[ch].chcr &= ~1; /**< @todo non-instant DMA */
printf("%02x %02x %02x %1d\n",sm,dm,rs,ts);
}
@ -1014,3 +1022,7 @@ WRITE16_MEMBER(sh2a_device::sh7021_w)
{
COMBINE_DATA(&m_sh7021_regs[offset]);
}
#if (defined(__MINGW32__) && (__GNUC__ >= 5))
#pragma GCC diagnostic pop
#endif

View File

@ -12,6 +12,12 @@
#include "machine/nvram.h"
// for now, make buggy GCC/Mingw STFU about I64FMT
#if (defined(__MINGW32__) && (__GNUC__ >= 5))
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
#pragma GCC diagnostic ignored "-Wformat-extra-args"
#endif
//**************************************************************************
// LIVE DEVICE
@ -169,3 +175,8 @@ void nvram_device::determine_final_base()
if (m_region != NULL && m_region->bytes() != m_length)
throw emu_fatalerror("NVRAM device '%s' has a default region, but it should be 0x%" SIZETFMT "X bytes", tag(), m_length);
}
#if (defined(__MINGW32__) && (__GNUC__ >= 5))
#pragma GCC diagnostic pop
#endif

View File

@ -2,6 +2,13 @@
// copyright-holders:Olivier Galibert
#include "pci.h"
// for now, make buggy GCC/Mingw STFU about I64FMT
#if (defined(__MINGW32__) && (__GNUC__ >= 5))
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
#pragma GCC diagnostic ignored "-Wformat-extra-args"
#endif
const device_type PCI_ROOT = &device_creator<pci_root_device>;
const device_type PCI_BRIDGE = &device_creator<pci_bridge_device>;
@ -895,3 +902,7 @@ void pci_root_device::device_start()
void pci_root_device::device_reset()
{
}
#if (defined(__MINGW32__) && (__GNUC__ >= 5))
#pragma GCC diagnostic pop
#endif

View File

@ -23,6 +23,12 @@
#include "emu.h"
#include "machine/pit8253.h"
// for now, make buggy GCC/Mingw STFU about I64FMT
#if (defined(__MINGW32__) && (__GNUC__ >= 5))
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
#pragma GCC diagnostic ignored "-Wformat-extra-args"
#endif
/* device types */
enum
@ -1129,3 +1135,7 @@ WRITE_LINE_MEMBER( pit8253_device::write_clk2 )
{
set_clock_signal(2, state);
}
#if (defined(__MINGW32__) && (__GNUC__ >= 5))
#pragma GCC diagnostic pop
#endif

View File

@ -9,6 +9,13 @@
#include "nl_factory.h"
#include "devices/nld_truthtable.h"
// for now, make buggy GCC/Mingw STFU about I64FMT
#if (defined(__MINGW32__) && (__GNUC__ >= 5))
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
#pragma GCC diagnostic ignored "-Wformat-extra-args"
#endif
//#undef NL_VERBOSE_OUT
//#define NL_VERBOSE_OUT(x) printf x
@ -466,3 +473,7 @@ nl_double parser_t::eval_param(const token_t tok)
#endif
}
}
#if (defined(__MINGW32__) && (__GNUC__ >= 5))
#pragma GCC diagnostic pop
#endif

View File

@ -5,6 +5,13 @@
*
*/
// for now, make buggy GCC/Mingw STFU about I64FMT
#if (defined(__MINGW32__) && (__GNUC__ >= 5))
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
#pragma GCC diagnostic ignored "-Wformat-extra-args"
#endif
#ifndef PCONFIG_H_
#define PCONFIG_H_
@ -223,3 +230,8 @@ private:
#endif
#endif /* PCONFIG_H_ */
#if (defined(__MINGW32__) && (__GNUC__ >= 5))
#pragma GCC diagnostic pop
#endif

View File

@ -10,6 +10,13 @@
#include "pparser.h"
// for now, make buggy GCC/Mingw STFU about I64FMT
#if (defined(__MINGW32__) && (__GNUC__ >= 5))
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
#pragma GCC diagnostic ignored "-Wformat-extra-args"
#endif
//#undef NL_VERBOSE_OUT
//#define NL_VERBOSE_OUT(x) printf x
@ -480,3 +487,8 @@ pstring ppreprocessor::process(const pstring &contents)
}
return pstring(ret.cstr());
}
#if (defined(__MINGW32__) && (__GNUC__ >= 5))
#pragma GCC diagnostic pop
#endif

View File

@ -9,6 +9,14 @@
* the vectorizations fast-math enables pretty expensive
*/
// for now, make buggy GCC/Mingw STFU about I64FMT
#if (defined(__MINGW32__) && (__GNUC__ >= 5))
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
#pragma GCC diagnostic ignored "-Wformat-extra-args"
#endif
//#pragma GCC optimize "-ffast-math"
#if 0
#pragma GCC optimize "-ffast-math"
@ -600,3 +608,7 @@ ATTR_COLD void NETLIB_NAME(solver)::post_start()
}
NETLIB_NAMESPACE_DEVICES_END()
#if (defined(__MINGW32__) && (__GNUC__ >= 5))
#pragma GCC diagnostic pop
#endif

View File

@ -10,6 +10,14 @@
#include <cmath>
#include "nl_convert.h"
// for now, make buggy GCC/Mingw STFU about I64FMT
#if (defined(__MINGW32__) && (__GNUC__ >= 5))
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
#pragma GCC diagnostic ignored "-Wformat-extra-args"
#endif
template<typename Class>
static plist_t<int> bubble(const pnamedlist_t<Class *> &sl)
{
@ -455,3 +463,7 @@ void nl_convert_eagle_t::convert(const pstring &contents)
}
}
#if (defined(__MINGW32__) && (__GNUC__ >= 5))
#pragma GCC diagnostic pop
#endif

View File

@ -11,6 +11,13 @@
#include "emu.h"
#include "debugger.h"
// for now, make buggy GCC/Mingw STFU about I64FMT
#if (defined(__MINGW32__) && (__GNUC__ >= 5))
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
#pragma GCC diagnostic ignored "-Wformat-extra-args"
#endif
//**************************************************************************
// DEBUGGING
@ -982,3 +989,8 @@ void device_scheduler::dump_timers() const
timer->dump();
logerror("=============================================\n");
}
#if (defined(__MINGW32__) && (__GNUC__ >= 5))
#pragma GCC diagnostic pop
#endif

View File

@ -39,6 +39,14 @@
#include "wavwrite.h"
#include "discrete.h"
// for now, make buggy GCC/Mingw STFU about I64FMT
#if (defined(__MINGW32__) && (__GNUC__ >= 5))
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
#pragma GCC diagnostic ignored "-Wformat-extra-args"
#endif
/* for_each collides with c++ standard libraries - include it here */
#define for_each(_T, _e, _l) for (_T _e = (_l)->begin_ptr() ; _e <= (_l)->end_ptr(); _e++)
@ -1134,3 +1142,8 @@ WRITE8_MEMBER( discrete_device::write )
discrete_log("discrete_sound_w write to non-existent NODE_%02d\n", offset-NODE_00);
}
}
#if (defined(__MINGW32__) && (__GNUC__ >= 5))
#pragma GCC diagnostic pop
#endif

View File

@ -512,10 +512,10 @@ protected:
struct _statics
{
__m128 dummy_for_alignment;
INT16 alpha_mask[8];
INT16 red_mask[8];
INT16 green_mask[8];
INT16 blue_mask[8];
UINT16 alpha_mask[8];
UINT16 red_mask[8];
UINT16 green_mask[8];
UINT16 blue_mask[8];
INT16 scale_table[256][8];
};

View File

@ -377,6 +377,14 @@ Thanks to Alex, Mr Mudkips, and Philip Burke for this info.
#include "debug/debugcpu.h"
#include "includes/chihiro.h"
// for now, make buggy GCC/Mingw STFU about I64FMT
#if (defined(__MINGW32__) && (__GNUC__ >= 5))
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
#pragma GCC diagnostic ignored "-Wformat-extra-args"
#endif
#define LOG_PCI
//#define LOG_OHCI
//#define LOG_BASEBOARD
@ -3028,3 +3036,7 @@ ROM_END
// 0023
// 0024 GAME( 2009, ccfboxo, ccfboxa, chihirogd, chihiro, driver_device, 0, ROT0, "Sega", "Chihiro Firmware Update For Compact Flash Box (GDX-0024)", GAME_NO_SOUND|GAME_NOT_WORKING )
/* 0024A */ GAME( 2009, ccfboxa, chihiro, chihirogd, chihiro, driver_device, 0, ROT0, "Sega", "Chihiro Firmware Update For Compact Flash Box (Rev A) (GDX-0024A)", GAME_NO_SOUND|GAME_NOT_WORKING )
#if (defined(__MINGW32__) && (__GNUC__ >= 5))
#pragma GCC diagnostic pop
#endif

View File

@ -667,6 +667,13 @@ ALL VROM ROMs are 16M MASK
#include "includes/model3.h"
// for now, make buggy GCC/Mingw STFU about I64FMT
#if (defined(__MINGW32__) && (__GNUC__ >= 5))
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
#pragma GCC diagnostic ignored "-Wformat-extra-args"
#endif
void model3_state::update_irq_state()
{
@ -6052,3 +6059,7 @@ GAME( 1998, magtruck, 0, model3_21_5881, eca, model3_state, magtruc
GAME( 1999, eca, 0, model3_21_5881, eca, model3_state, eca, ROT0, "Sega", "Emergency Call Ambulance (Export)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
GAME( 1999, ecau, eca, model3_21_5881, eca, model3_state, eca, ROT0, "Sega", "Emergency Call Ambulance (USA)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
GAME( 1999, ecap, eca, model3_21_5881, eca, model3_state, eca, ROT0, "Sega", "Emergency Call Ambulance (US location test?)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
#if (defined(__MINGW32__) && (__GNUC__ >= 5))
#pragma GCC diagnostic pop
#endif

View File

@ -1533,10 +1533,17 @@ Sushi Bar
*/
#include "emu.h"
#include "includes/naomi.h"
// for now, make buggy GCC/Mingw STFU about I64FMT
#if (defined(__MINGW32__) && (__GNUC__ >= 5))
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
#pragma GCC diagnostic ignored "-Wformat-extra-args"
#endif
#define CPU_CLOCK (200000000)
READ64_MEMBER(naomi_state::naomi_arm_r )
@ -9377,3 +9384,8 @@ GAME( 2006, mslug6, awbios, aw2c, aw2c, naomi_state, atomiswave, ROT0, "Sega
GAME( 2006, xtrmhnt2, awbios, aw2c, aw2c, naomi_state, xtrmhnt2, ROT0, "Sega", "Extreme Hunting 2", GAME_FLAGS )
GAME( 2008, claychal, awbios, aw2c, aw2c, naomi_state, atomiswave, ROT0, "Sega", "Sega Clay Challenge", GAME_FLAGS )
GAME( 2009, basschal, awbios, aw2c, aw2c, naomi_state, atomiswave, ROT0, "Sega", "Sega Bass Fishing Challenge", GAME_FLAGS )
#if (defined(__MINGW32__) && (__GNUC__ >= 5))
#pragma GCC diagnostic pop
#endif

View File

@ -14,6 +14,13 @@
#include "machine/naomig1.h"
#include "video/powervr2.h"
// for now, make buggy GCC/Mingw STFU about I64FMT
#if (defined(__MINGW32__) && (__GNUC__ >= 5))
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
#pragma GCC diagnostic ignored "-Wformat-extra-args"
#endif
#define DEBUG_REGISTERS (1)
#if DEBUG_REGISTERS
@ -722,3 +729,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(dc_state::dc_scanline)
{
m_powervr2->pvr_scanline_timer(param);
}
#if (defined(__MINGW32__) && (__GNUC__ >= 5))
#pragma GCC diagnostic pop
#endif

View File

@ -11,6 +11,13 @@
#include "cpu/ssem/ssem.h"
#include "imagedev/snapquik.h"
// for now, make buggy GCC/Mingw STFU about I64FMT
#if (defined(__MINGW32__) && (__GNUC__ >= 5))
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
#pragma GCC diagnostic ignored "-Wformat-extra-args"
#endif
class ssem_state : public driver_device
{
public:
@ -642,3 +649,7 @@ ROM_END
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */
COMP(1948, ssem, 0, 0, ssem, ssem, driver_device, 0, "Manchester University", "Small-Scale Experimental Machine (SSEM), 'Baby'", GAME_NO_SOUND_HW | GAME_SUPPORTS_SAVE )
#if (defined(__MINGW32__) && (__GNUC__ >= 5))
#pragma GCC diagnostic pop
#endif