diff --git a/scripts/src/devices.lua b/scripts/src/devices.lua index 9985586f6f9..a79b7afa03d 100644 --- a/scripts/src/devices.lua +++ b/scripts/src/devices.lua @@ -34,11 +34,6 @@ function devicesProject(_target, _subtarget) MAME_DIR .. "3rdparty/expat/lib", } end - if _OPTIONS["with-bundled-zlib"] then - includedirs { - MAME_DIR .. "3rdparty/zlib", - } - end if _OPTIONS["with-bundled-lua"] then includedirs { MAME_DIR .. "3rdparty/lua/src", @@ -81,11 +76,6 @@ if (_OPTIONS["DRIVERS"] == nil) then MAME_DIR .. "3rdparty/expat/lib", } end - if _OPTIONS["with-bundled-zlib"] then - includedirs { - MAME_DIR .. "3rdparty/zlib", - } - end if _OPTIONS["with-bundled-lua"] then includedirs { MAME_DIR .. "3rdparty/lua/src", @@ -119,11 +109,6 @@ end MAME_DIR .. "3rdparty/expat/lib", } end - if _OPTIONS["with-bundled-zlib"] then - includedirs { - MAME_DIR .. "3rdparty/zlib", - } - end if _OPTIONS["with-bundled-lua"] then includedirs { MAME_DIR .. "3rdparty/lua/src", diff --git a/scripts/src/emu.lua b/scripts/src/emu.lua index 3ccb8bdd248..547c57e2791 100644 --- a/scripts/src/emu.lua +++ b/scripts/src/emu.lua @@ -24,11 +24,6 @@ if _OPTIONS["with-bundled-expat"] then MAME_DIR .. "3rdparty/expat/lib", } end -if _OPTIONS["with-bundled-zlib"] then - includedirs { - MAME_DIR .. "3rdparty/zlib", - } -end if _OPTIONS["with-bundled-lua"] then includedirs { MAME_DIR .. "3rdparty/lua/src", diff --git a/scripts/target/ldplayer/ldplayer.lua b/scripts/target/ldplayer/ldplayer.lua index cda19fdf2ba..d868c0778bf 100644 --- a/scripts/target/ldplayer/ldplayer.lua +++ b/scripts/target/ldplayer/ldplayer.lua @@ -71,11 +71,6 @@ function createProjects_ldplayer_ldplayer(_target, _subtarget) MAME_DIR .. "3rdparty", GEN_DIR .. "mame/layout", } - if _OPTIONS["with-bundled-zlib"] then - includedirs { - MAME_DIR .. "3rdparty/zlib", - } - end files{ MAME_DIR .. "src/emu/drivers/emudummy.c", diff --git a/scripts/target/mame/arcade.lua b/scripts/target/mame/arcade.lua index 0bb4028d8a4..0c1b8244cff 100644 --- a/scripts/target/mame/arcade.lua +++ b/scripts/target/mame/arcade.lua @@ -780,12 +780,6 @@ function createMAMEProjects(_target, _subtarget, _name) MAME_DIR .. "3rdparty", GEN_DIR .. "mame/layout", } - - if _OPTIONS["with-bundled-zlib"] then - includedirs { - MAME_DIR .. "3rdparty/zlib", - } -end end function createProjects_mame_arcade(_target, _subtarget) diff --git a/scripts/target/mame/dummy.lua b/scripts/target/mame/dummy.lua index 7483629315a..9021b774859 100644 --- a/scripts/target/mame/dummy.lua +++ b/scripts/target/mame/dummy.lua @@ -32,11 +32,6 @@ function createProjects_mame_dummy(_target, _subtarget) MAME_DIR .. "3rdparty", GEN_DIR .. "mess/layout", } - if _OPTIONS["with-bundled-zlib"] then - includedirs { - MAME_DIR .. "3rdparty/zlib", - } - end files{ MAME_DIR .. "src/mess/drivers/coleco.c", diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua index ef88e164b87..c3402ca5c0d 100644 --- a/scripts/target/mame/mess.lua +++ b/scripts/target/mame/mess.lua @@ -893,11 +893,6 @@ function createMESSProjects(_target, _subtarget, _name) GEN_DIR .. "mame/layout", MAME_DIR .. "src/devices/cpu/m68000", } - if _OPTIONS["with-bundled-zlib"] then - includedirs { - MAME_DIR .. "3rdparty/zlib", - } - end end function createProjects_mame_mess(_target, _subtarget) diff --git a/scripts/target/mame/nl.lua b/scripts/target/mame/nl.lua index 08ade6a9e62..b3fb48454f3 100644 --- a/scripts/target/mame/nl.lua +++ b/scripts/target/mame/nl.lua @@ -101,12 +101,6 @@ function createProjects_mame_nl(_target, _subtarget) GEN_DIR .. "mame/layout", } - if _OPTIONS["with-bundled-zlib"] then - includedirs { - MAME_DIR .. "3rdparty/zlib", - } - end - files{ MAME_DIR .. "src/mame/drivers/pong.c", MAME_DIR .. "src/mame/drivers/nl_pong.c", diff --git a/scripts/target/mame/tiny.lua b/scripts/target/mame/tiny.lua index f387a913059..d690c1f10f5 100644 --- a/scripts/target/mame/tiny.lua +++ b/scripts/target/mame/tiny.lua @@ -95,11 +95,6 @@ function createProjects_mame_tiny(_target, _subtarget) MAME_DIR .. "3rdparty", GEN_DIR .. "mame/layout", } - if _OPTIONS["with-bundled-zlib"] then - includedirs { - MAME_DIR .. "3rdparty/zlib", - } - end files{ MAME_DIR .. "src/mame/machine/ticket.c", diff --git a/src/emu/debug/debugcpu.c b/src/emu/debug/debugcpu.c index 2eeb2e1af72..4803052b239 100644 --- a/src/emu/debug/debugcpu.c +++ b/src/emu/debug/debugcpu.c @@ -19,8 +19,8 @@ #include "debugger.h" #include "uiinput.h" #include "xmlfile.h" +#include "coreutil.h" #include -#include /*************************************************************************** @@ -2746,7 +2746,7 @@ UINT32 device_debug::compute_opcode_crc32(offs_t pc) const UINT32 numbytes = disassemble(diasmbuf, pc, opbuf, argbuf) & DASMFLAG_LENGTHMASK; // return a CRC of the exact count of opcode bytes - return crc32(0, opbuf, numbytes); + return core_crc32(0, opbuf, numbytes); } diff --git a/src/emu/output.c b/src/emu/output.c index 37c4a112eda..54d2d91e85a 100644 --- a/src/emu/output.c +++ b/src/emu/output.c @@ -8,9 +8,7 @@ ***************************************************************************/ #include "emu.h" -#include - - +#include "coreutil.h" /*************************************************************************** CONSTANTS @@ -82,7 +80,7 @@ static void output_exit(running_machine &machine); INLINE UINT32 get_hash(const char *string) { - return crc32(0, (UINT8 *)string, (UINT32)strlen(string)); + return core_crc32(0, (UINT8 *)string, (UINT32)strlen(string)); } diff --git a/src/emu/rendfont.c b/src/emu/rendfont.c index 2011119979c..5248bc326b5 100644 --- a/src/emu/rendfont.c +++ b/src/emu/rendfont.c @@ -12,7 +12,7 @@ #include "rendfont.h" #include "rendutil.h" #include "emuopts.h" -#include +#include "coreutil.h" #include "osdepend.h" #include "uismall.fh" @@ -389,7 +389,7 @@ bool render_font::load_cached_bdf(const char *filename) return false; // has the chunk - UINT32 hash = crc32(0, (const UINT8 *)&m_rawdata[0], bytes) ^ (UINT32)m_rawsize; + UINT32 hash = core_crc32(0, (const UINT8 *)&m_rawdata[0], bytes) ^ (UINT32)m_rawsize; // create the cached filename, changing the 'F' to a 'C' on the extension std::string cachedname(filename); diff --git a/src/emu/save.c b/src/emu/save.c index ae4bf60b414..c6a1e5bd6fc 100644 --- a/src/emu/save.c +++ b/src/emu/save.c @@ -23,8 +23,7 @@ ***************************************************************************/ #include "emu.h" - -#include +#include "coreutil.h" //************************************************************************** @@ -333,13 +332,13 @@ UINT32 save_manager::signature() const for (state_entry *entry = m_entry_list.first(); entry != NULL; entry = entry->next()) { // add the entry name to the CRC - crc = crc32(crc, (UINT8 *)entry->m_name.c_str(), entry->m_name.length()); + crc = core_crc32(crc, (UINT8 *)entry->m_name.c_str(), entry->m_name.length()); // add the type and size to the CRC UINT32 temp[2]; temp[0] = LITTLE_ENDIANIZE_INT32(entry->m_typecount); temp[1] = LITTLE_ENDIANIZE_INT32(entry->m_typesize); - crc = crc32(crc, (UINT8 *)&temp[0], sizeof(temp)); + crc = core_crc32(crc, (UINT8 *)&temp[0], sizeof(temp)); } return crc; } diff --git a/src/lib/util/coreutil.c b/src/lib/util/coreutil.c index a7c2ccb0f22..eb7d2a92d89 100644 --- a/src/lib/util/coreutil.c +++ b/src/lib/util/coreutil.c @@ -9,6 +9,7 @@ ***************************************************************************/ #include "coreutil.h" +#include /*************************************************************************** @@ -115,3 +116,9 @@ void rand_memory(void *memory, size_t length) bytes[i] = (UINT8) (seed >> 16); } } + + +UINT32 core_crc32(UINT32 crc, const UINT8 *buf, UINT32 len) +{ + return crc32(crc, buf, len); +} \ No newline at end of file diff --git a/src/lib/util/coreutil.h b/src/lib/util/coreutil.h index 5315d07ffdc..839e72686ea 100644 --- a/src/lib/util/coreutil.h +++ b/src/lib/util/coreutil.h @@ -39,5 +39,6 @@ int gregorian_days_in_month(int month, int year); void rand_memory(void *memory, size_t length); +UINT32 core_crc32(UINT32 crc, const UINT8 *buf, UINT32 len); #endif /* __COREUTIL_H__ */ diff --git a/src/mess/drivers/psx.c b/src/mess/drivers/psx.c index 3f5ea8c3efb..17f3d904a93 100644 --- a/src/mess/drivers/psx.c +++ b/src/mess/drivers/psx.c @@ -17,7 +17,6 @@ #include "imagedev/chd_cd.h" #include "sound/spu.h" #include "debugger.h" -#include #include "machine/psxcd.h" #include "bus/psx/ctlrport.h"