summaryrefslogtreecommitdiffstatshomepage
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/build/makedep.py4
-rw-r--r--scripts/genie.lua56
-rw-r--r--scripts/src/3rdparty.lua275
-rw-r--r--scripts/src/benchmarks.lua74
-rw-r--r--scripts/src/bus.lua14
-rw-r--r--scripts/src/cpu.lua9
-rw-r--r--scripts/src/emu.lua62
-rw-r--r--scripts/src/machine.lua12
-rw-r--r--scripts/src/main.lua15
-rw-r--r--scripts/src/osd/modules.lua36
-rw-r--r--scripts/src/osd/osdmini.lua2
-rw-r--r--scripts/src/osd/osdmini_cfg.lua2
-rw-r--r--scripts/src/osd/sdl.lua123
-rw-r--r--scripts/src/osd/sdl_cfg.lua36
-rw-r--r--scripts/src/osd/windows.lua1
-rw-r--r--scripts/src/osd/windows_cfg.lua2
-rw-r--r--scripts/src/tests.lua98
-rw-r--r--scripts/src/tools.lua111
-rw-r--r--scripts/src/video.lua24
-rw-r--r--scripts/target/mame/arcade.lua6
-rw-r--r--scripts/target/mame/mess.lua13
-rw-r--r--scripts/toolchain.lua59
22 files changed, 241 insertions, 793 deletions
diff --git a/scripts/build/makedep.py b/scripts/build/makedep.py
index 88035d776af..eba69370621 100644
--- a/scripts/build/makedep.py
+++ b/scripts/build/makedep.py
@@ -204,9 +204,7 @@ def parse_file_for_drivers(root, srcfile):
if len(content)>0:
if content.startswith('COMP') or content.startswith('CONS') or content.startswith('GAME') or content.startswith('SYST') or content.startswith('GAMEL'):
name = content[4:]
- splitname = name.rsplit(',', 14)
- if len(splitname)>1:
- drivers.append(splitname[1])
+ drivers.append(name.rsplit(',', 14)[1])
return 0
def parse_lua_file(srcfile):
diff --git a/scripts/genie.lua b/scripts/genie.lua
index 984196e2af7..2fcfb323653 100644
--- a/scripts/genie.lua
+++ b/scripts/genie.lua
@@ -83,11 +83,6 @@ newoption {
}
newoption {
- trigger = "with-benchmarks",
- description = "Enable building benchmarks.",
-}
-
-newoption {
trigger = "osd",
description = "Choose OSD layer implementation",
}
@@ -198,11 +193,6 @@ newoption {
}
newoption {
- trigger = "TOOLCHAIN",
- description = "Toolchain prefix"
-}
-
-newoption {
trigger = "PROFILE",
description = "Enable profiling.",
}
@@ -276,6 +266,15 @@ newoption {
}
newoption {
+ trigger = "USE_BGFX",
+ description = "Use of BGFX.",
+ allowed = {
+ { "0", "Disabled" },
+ { "1", "Enabled" },
+ }
+}
+
+newoption {
trigger = "DEPRECATED",
description = "Generate deprecation warnings during compilation.",
allowed = {
@@ -418,8 +417,9 @@ if _OPTIONS["NOASM"]=="1" and not _OPTIONS["FORCE_DRC_C_BACKEND"] then
_OPTIONS["FORCE_DRC_C_BACKEND"] = "1"
end
-if(_OPTIONS["TOOLCHAIN"] == nil) then
- _OPTIONS['TOOLCHAIN'] = ""
+USE_BGFX = 1
+if(_OPTIONS["USE_BGFX"]~=nil) then
+ USE_BGFX = tonumber(_OPTIONS["USE_BGFX"])
end
GEN_DIR = MAME_BUILD_DIR .. "generated/"
@@ -666,10 +666,9 @@ end
--DEFS += -DUSE_SYSTEM_JPEGLIB
--endif
+ --To support casting in Lua 5.3
defines {
- "LUA_COMPAT_ALL",
- "LUA_COMPAT_5_1",
- "LUA_COMPAT_5_2",
+ "LUA_COMPAT_APIINTCASTS",
}
if _ACTION == "gmake" then
@@ -1045,7 +1044,6 @@ configuration { "nacl*" }
configuration { "linux-*" }
links {
"dl",
- "rt",
}
if _OPTIONS["distro"]=="debian-stable" then
defines
@@ -1059,10 +1057,7 @@ configuration { "linux-*" }
configuration { "steamlink" }
links {
"dl",
- "EGL",
- "GLESv2",
- "SDL2",
- }
+ }
defines {
"EGL_API_FB",
}
@@ -1084,11 +1079,6 @@ configuration { "mingw*" }
"advapi32",
"shlwapi",
"wsock32",
- "ws2_32",
- "psapi",
- "iphlpapi",
- "shell32",
- "userenv",
}
configuration { "mingw-clang" }
linkoptions {
@@ -1110,11 +1100,6 @@ configuration { "vs*" }
"advapi32",
"shlwapi",
"wsock32",
- "ws2_32",
- "psapi",
- "iphlpapi",
- "shell32",
- "userenv",
}
buildoptions {
@@ -1234,7 +1219,6 @@ configuration { "vs2015" }
"/wd4463", -- warning C4463: overflow; assigning 1 to bit-field that can only hold values from -1 to 0
"/wd4297", -- warning C4297: 'xxx::~xxx': function assumed not to throw an exception but does
"/wd4319", -- warning C4319: 'operator' : zero extending 'type' to 'type' of greater size
- "/wd4592", -- warning C4592: symbol will be dynamically initialized (implementation limitation)
}
configuration { "winphone8* or winstore8*" }
removelinks {
@@ -1298,7 +1282,10 @@ else
startproject (_OPTIONS["subtarget"])
end
mainProject(_OPTIONS["target"],_OPTIONS["subtarget"])
-strip()
+
+if (_OPTIONS["STRIP_SYMBOLS"]=="1") then
+ strip()
+end
if _OPTIONS["with-tools"] then
group "tools"
@@ -1309,8 +1296,3 @@ if _OPTIONS["with-tests"] then
group "tests"
dofile(path.join("src", "tests.lua"))
end
-
-if _OPTIONS["with-benchmarks"] then
- group "benchmarks"
- dofile(path.join("src", "benchmarks.lua"))
-end
diff --git a/scripts/src/3rdparty.lua b/scripts/src/3rdparty.lua
index 04038127dfb..2bee6477f01 100644
--- a/scripts/src/3rdparty.lua
+++ b/scripts/src/3rdparty.lua
@@ -280,11 +280,6 @@ end
buildoptions {
"-Wno-enum-conversion",
}
- if _OPTIONS["targetos"]=="macosx" then
- buildoptions_c {
- "-Wno-unknown-attributes",
- }
- end
end
configuration { }
@@ -403,8 +398,6 @@ end
configuration { }
defines {
"LUA_COMPAT_ALL",
- "LUA_COMPAT_5_1",
- "LUA_COMPAT_5_2",
}
if not (_OPTIONS["targetos"]=="windows") and not (_OPTIONS["targetos"]=="asmjs") then
defines {
@@ -465,19 +458,20 @@ links {
end
--------------------------------------------------
--- small lua library objects
+-- sqlite3 lua library objects
--------------------------------------------------
-project "lualibs"
+project "lsqlite3"
uuid "1d84edab-94cf-48fb-83ee-b75bc697660e"
kind "StaticLib"
+ -- options {
+ -- "ForceCPP",
+ -- }
+
configuration { "vs*" }
buildoptions {
"/wd4244", -- warning C4244: 'argument' : conversion from 'xxx' to 'xxx', possible loss of data
- "/wd4055", -- warning C4055: 'type cast': from data pointer 'void *' to function pointer 'xxx'
- "/wd4152", -- warning C4152: nonstandard extension, function/data pointer conversion in expression
- "/wd4130", -- warning C4130: '==': logical operation on address of string constant
}
configuration { }
@@ -493,69 +487,9 @@ project "lualibs"
MAME_DIR .. "3rdparty/lua/src",
}
end
- if _OPTIONS["with-bundled-zlib"] then
- includedirs {
- MAME_DIR .. "3rdparty/zlib",
- }
- end
files {
MAME_DIR .. "3rdparty/lsqlite3/lsqlite3.c",
- MAME_DIR .. "3rdparty/lua-zlib/lua_zlib.c",
- MAME_DIR .. "3rdparty/luafilesystem/src/lfs.c",
- }
-
---------------------------------------------------
--- luv lua library objects
---------------------------------------------------
-
-project "luv"
- uuid "d98ec5ca-da2a-4a50-88a2-52061ca53871"
- kind "StaticLib"
-
- if _OPTIONS["targetos"]=="windows" then
- defines {
- "_WIN32_WINNT=0x0600",
- }
- end
- configuration { "vs*" }
- buildoptions {
- "/wd4244", -- warning C4244: 'argument' : conversion from 'xxx' to 'xxx', possible loss of data
- }
-
- configuration { "gmake" }
- buildoptions_c {
- "-Wno-unused-function",
- "-Wno-strict-prototypes",
- "-Wno-unused-variable",
- "-Wno-maybe-uninitialized",
- "-Wno-undef",
- }
-
- configuration { "vs2015" }
- buildoptions {
- "/wd4701", -- warning C4701: potentially uninitialized local variable 'xxx' used
- "/wd4703", -- warning C4703: potentially uninitialized local pointer variable 'xxx' used
- }
-
- configuration { }
- defines {
- "LUA_COMPAT_ALL",
- }
-
- includedirs {
- MAME_DIR .. "3rdparty/lua/src",
- MAME_DIR .. "3rdparty/libuv/include",
- }
- if _OPTIONS["with-bundled-lua"] then
- includedirs {
- MAME_DIR .. "3rdparty/luv/deps/lua/src",
- }
- end
-
- files {
- MAME_DIR .. "3rdparty/luv/src/luv.c",
- MAME_DIR .. "3rdparty/luv/src/luv.h",
}
--------------------------------------------------
@@ -705,6 +639,7 @@ end
-- BGFX library objects
--------------------------------------------------
+if (USE_BGFX == 1) then
project "bgfx"
uuid "d3e7e119-35cf-4f4f-aba0-d3bdcd1b879a"
kind "StaticLib"
@@ -729,14 +664,10 @@ end
MAME_DIR .. "3rdparty/bgfx/include",
MAME_DIR .. "3rdparty/bgfx/3rdparty",
MAME_DIR .. "3rdparty/bx/include",
+ MAME_DIR .. "3rdparty/bgfx/3rdparty/khronos",
MAME_DIR .. "3rdparty/bgfx/3rdparty/dxsdk/include",
}
- configuration { "not steamlink"}
- includedirs {
- MAME_DIR .. "3rdparty/bgfx/3rdparty/khronos",
- }
-
configuration { "vs*" }
includedirs {
MAME_DIR .. "3rdparty/bx/include/compat/msvc",
@@ -832,6 +763,7 @@ end
MAME_DIR .. "3rdparty/bgfx/src/renderer_mtl.mm",
}
end
+end
--------------------------------------------------
-- PortAudio library objects
@@ -987,194 +919,37 @@ links {
end
--------------------------------------------------
--- libuv library objects
+-- GoogleTest library objects
--------------------------------------------------
-project "uv"
- uuid "cd2afe7f-139d-49c3-9000-fc9119f3cea0"
- kind "StaticLib"
- includedirs {
- MAME_DIR .. "3rdparty/libuv/include",
- MAME_DIR .. "3rdparty/libuv/src",
- MAME_DIR .. "3rdparty/libuv/src/win",
- }
+project "gtest"
+ uuid "fa306a8d-fb10-4d4a-9d2e-fdb9076407b4"
+ kind "StaticLib"
configuration { "gmake" }
- buildoptions_c {
- "-Wno-strict-prototypes",
- "-Wno-bad-function-cast",
- "-Wno-write-strings",
- "-Wno-missing-braces",
+ buildoptions {
"-Wno-undef",
"-Wno-unused-variable",
}
-
- local version = str_to_version(_OPTIONS["gcc_version"])
- if (_OPTIONS["gcc"]~=nil) then
- if string.find(_OPTIONS["gcc"], "clang") then
- buildoptions_c {
- "-Wno-unknown-warning-option",
- "-Wno-unknown-attributes",
- "-Wno-null-dereference",
- "-Wno-unused-but-set-variable",
- "-Wno-maybe-uninitialized",
- }
- else
- buildoptions_c {
- "-Wno-unused-but-set-variable",
- "-Wno-maybe-uninitialized",
- }
- end
- end
+ configuration { "mingw-clang" }
+ buildoptions {
+ "-O0", -- crash of compiler when doing optimization
+ }
configuration { "vs*" }
+if _OPTIONS["vs"]=="intel-15" then
buildoptions {
- "/wd4054", -- warning C4054: 'type cast' : from function pointer 'xxx' to data pointer 'void *'
- "/wd4204", -- warning C4204: nonstandard extension used : non-constant aggregate initializer
- "/wd4210", -- warning C4210: nonstandard extension used : function given file scope
- "/wd4701", -- warning C4701: potentially uninitialized local variable 'xxx' used
- "/wd4703", -- warning C4703: potentially uninitialized local pointer variable 'xxx' used
- "/wd4477", -- warning C4477: '<function>' : format string '<format-string>' requires an argument of type '<type>', but variadic argument <position> has type '<type>'
+ "/Qwd1195", -- error #1195: conversion from integer to smaller pointer
}
+end
configuration { }
- files {
- MAME_DIR .. "3rdparty/libuv/src/fs-poll.c",
- MAME_DIR .. "3rdparty/libuv/src/inet.c",
- MAME_DIR .. "3rdparty/libuv/src/threadpool.c",
- MAME_DIR .. "3rdparty/libuv/src/uv-common.c",
- MAME_DIR .. "3rdparty/libuv/src/version.c",
+ includedirs {
+ MAME_DIR .. "3rdparty/googletest/googletest/include",
+ MAME_DIR .. "3rdparty/googletest/googletest",
}
-
- if _OPTIONS["targetos"]=="windows" then
- defines {
- "WIN32_LEAN_AND_MEAN",
- "_WIN32_WINNT=0x0502",
- }
- if _ACTION == "vs2013" then
- files {
- MAME_DIR .. "3rdparty/libuv/src/win/snprintf.c",
- }
- end
- configuration { }
- files {
- MAME_DIR .. "3rdparty/libuv/src/win/async.c",
- MAME_DIR .. "3rdparty/libuv/src/win/core.c",
- MAME_DIR .. "3rdparty/libuv/src/win/dl.c",
- MAME_DIR .. "3rdparty/libuv/src/win/error.c",
- MAME_DIR .. "3rdparty/libuv/src/win/fs-event.c",
- MAME_DIR .. "3rdparty/libuv/src/win/fs.c",
- MAME_DIR .. "3rdparty/libuv/src/win/getaddrinfo.c",
- MAME_DIR .. "3rdparty/libuv/src/win/getnameinfo.c",
- MAME_DIR .. "3rdparty/libuv/src/win/handle.c",
- MAME_DIR .. "3rdparty/libuv/src/win/loop-watcher.c",
- MAME_DIR .. "3rdparty/libuv/src/win/pipe.c",
- MAME_DIR .. "3rdparty/libuv/src/win/poll.c",
- MAME_DIR .. "3rdparty/libuv/src/win/process-stdio.c",
- MAME_DIR .. "3rdparty/libuv/src/win/process.c",
- MAME_DIR .. "3rdparty/libuv/src/win/req.c",
- MAME_DIR .. "3rdparty/libuv/src/win/signal.c",
- MAME_DIR .. "3rdparty/libuv/src/win/stream.c",
- MAME_DIR .. "3rdparty/libuv/src/win/tcp.c",
- MAME_DIR .. "3rdparty/libuv/src/win/thread.c",
- MAME_DIR .. "3rdparty/libuv/src/win/timer.c",
- MAME_DIR .. "3rdparty/libuv/src/win/tty.c",
- MAME_DIR .. "3rdparty/libuv/src/win/udp.c",
- MAME_DIR .. "3rdparty/libuv/src/win/util.c",
- MAME_DIR .. "3rdparty/libuv/src/win/winapi.c",
- MAME_DIR .. "3rdparty/libuv/src/win/winsock.c",
- }
- end
-
- if _OPTIONS["targetos"]~="windows" then
- files {
- MAME_DIR .. "3rdparty/libuv/src/unix/async.c",
- MAME_DIR .. "3rdparty/libuv/src/unix/atomic-ops.h",
- MAME_DIR .. "3rdparty/libuv/src/unix/core.c",
- MAME_DIR .. "3rdparty/libuv/src/unix/dl.c",
- MAME_DIR .. "3rdparty/libuv/src/unix/fs.c",
- MAME_DIR .. "3rdparty/libuv/src/unix/getaddrinfo.c",
- MAME_DIR .. "3rdparty/libuv/src/unix/getnameinfo.c",
- MAME_DIR .. "3rdparty/libuv/src/unix/internal.h",
- MAME_DIR .. "3rdparty/libuv/src/unix/loop-watcher.c",
- MAME_DIR .. "3rdparty/libuv/src/unix/loop.c",
- MAME_DIR .. "3rdparty/libuv/src/unix/pipe.c",
- MAME_DIR .. "3rdparty/libuv/src/unix/poll.c",
- MAME_DIR .. "3rdparty/libuv/src/unix/process.c",
- MAME_DIR .. "3rdparty/libuv/src/unix/signal.c",
- MAME_DIR .. "3rdparty/libuv/src/unix/spinlock.h",
- MAME_DIR .. "3rdparty/libuv/src/unix/stream.c",
- MAME_DIR .. "3rdparty/libuv/src/unix/tcp.c",
- MAME_DIR .. "3rdparty/libuv/src/unix/thread.c",
- MAME_DIR .. "3rdparty/libuv/src/unix/timer.c",
- MAME_DIR .. "3rdparty/libuv/src/unix/tty.c",
- MAME_DIR .. "3rdparty/libuv/src/unix/udp.c",
- }
- end
- if _OPTIONS["targetos"]=="linux" then
- defines {
- "_GNU_SOURCE",
- }
- files {
- MAME_DIR .. "3rdparty/libuv/src/unix/linux-core.c",
- MAME_DIR .. "3rdparty/libuv/src/unix/linux-inotify.c",
- MAME_DIR .. "3rdparty/libuv/src/unix/linux-syscalls.c",
- MAME_DIR .. "3rdparty/libuv/src/unix/linux-syscalls.h",
- MAME_DIR .. "3rdparty/libuv/src/unix/proctitle.c",
- }
- end
- if _OPTIONS["targetos"]=="macosx" then
- defines {
- "_DARWIN_USE_64_BIT_INODE=1",
- "_DARWIN_UNLIMITED_SELECT=1",
- }
- files {
- MAME_DIR .. "3rdparty/libuv/src/unix/darwin.c",
- MAME_DIR .. "3rdparty/libuv/src/unix/darwin-proctitle.c",
- MAME_DIR .. "3rdparty/libuv/src/unix/fsevents.c",
- MAME_DIR .. "3rdparty/libuv/src/unix/kqueue.c",
- MAME_DIR .. "3rdparty/libuv/src/unix/proctitle.c",
- }
- end
- if _OPTIONS["targetos"]=="solaris" then
- defines {
- "__EXTENSIONS__",
- "_XOPEN_SOURCE=500",
- }
- files {
- MAME_DIR .. "3rdparty/libuv/src/unix/sunos.c",
- }
- end
- if _OPTIONS["targetos"]=="freebsd" then
- files {
- MAME_DIR .. "3rdparty/libuv/src/unix/freebsd.c",
- MAME_DIR .. "3rdparty/libuv/src/unix/kqueue.c",
- }
- end
-
- if (_OPTIONS["SHADOW_CHECK"]=="1") then
- removebuildoptions {
- "-Wshadow"
- }
- end
-
---------------------------------------------------
--- HTTP parser library objects
---------------------------------------------------
-
-project "http-parser"
- uuid "90c6ba59-bdb2-4fee-8b44-57601d690e14"
- kind "StaticLib"
-
- configuration { }
-
files {
- MAME_DIR .. "3rdparty/http-parser/http_parser.c",
+ MAME_DIR .. "3rdparty/googletest/googletest/src/gtest-all.cc",
}
- if (_OPTIONS["SHADOW_CHECK"]=="1") then
- removebuildoptions {
- "-Wshadow"
- }
- end
diff --git a/scripts/src/benchmarks.lua b/scripts/src/benchmarks.lua
deleted file mode 100644
index f774e3f45ca..00000000000
--- a/scripts/src/benchmarks.lua
+++ /dev/null
@@ -1,74 +0,0 @@
--- license:BSD-3-Clause
--- copyright-holders:MAMEdev Team
-
----------------------------------------------------------------------------
---
--- benchmarks.lua
---
--- Rules for building benchmarks
---
----------------------------------------------------------------------------
-
---------------------------------------------------
--- Google Benchmark library objects
---------------------------------------------------
-
-project "benchmark"
- uuid "60a7e05c-8b4f-497c-bfda-2949a009ba0d"
- kind "StaticLib"
-
- configuration { }
- defines {
- "HAVE_STD_REGEX",
- }
-
- includedirs {
- MAME_DIR .. "3rdparty/benchmark/include",
- }
- files {
- MAME_DIR .. "3rdparty/benchmark/src/benchmark.cc",
- MAME_DIR .. "3rdparty/benchmark/src/colorprint.cc",
- MAME_DIR .. "3rdparty/benchmark/src/commandlineflags.cc",
- MAME_DIR .. "3rdparty/benchmark/src/console_reporter.cc",
- MAME_DIR .. "3rdparty/benchmark/src/csv_reporter.cc",
- MAME_DIR .. "3rdparty/benchmark/src/json_reporter.cc",
- MAME_DIR .. "3rdparty/benchmark/src/log.cc",
- MAME_DIR .. "3rdparty/benchmark/src/reporter.cc",
- MAME_DIR .. "3rdparty/benchmark/src/sleep.cc",
- MAME_DIR .. "3rdparty/benchmark/src/string_util.cc",
- MAME_DIR .. "3rdparty/benchmark/src/sysinfo.cc",
- MAME_DIR .. "3rdparty/benchmark/src/walltime.cc",
- MAME_DIR .. "3rdparty/benchmark/src/re_std.cc",
- }
-
-
-
-project("benchmarks")
- uuid ("a9750a48-d283-4a6d-b126-31c7ce049af1")
- kind "ConsoleApp"
-
- flags {
- "Symbols", -- always include minimum symbols for executables
- }
-
- if _OPTIONS["SEPARATE_BIN"]~="1" then
- targetdir(MAME_DIR)
- end
-
- configuration { }
-
- links {
- "benchmark",
- }
-
- includedirs {
- MAME_DIR .. "3rdparty/benchmark/include",
- MAME_DIR .. "src/osd",
- }
-
- files {
- MAME_DIR .. "benchmarks/main.cpp",
- MAME_DIR .. "benchmarks/eminline_native.cpp",
- MAME_DIR .. "benchmarks/eminline_noasm.cpp",
- }
-
diff --git a/scripts/src/bus.lua b/scripts/src/bus.lua
index 9514e9f5a74..bafa63a269d 100644
--- a/scripts/src/bus.lua
+++ b/scripts/src/bus.lua
@@ -2558,17 +2558,3 @@ if (BUSES["CGENIE_PARALLEL"]~=null) then
MAME_DIR .. "src/devices/bus/cgenie/parallel/printer.h",
}
end
-
----------------------------------------------------
---
---@src/devices/bus/m5/slot.h,BUSES["M5"] = true
----------------------------------------------------
-if (BUSES["M5"]~=null) then
- files {
- MAME_DIR .. "src/devices/bus/m5/slot.cpp",
- MAME_DIR .. "src/devices/bus/m5/slot.h",
- MAME_DIR .. "src/devices/bus/m5/rom.cpp",
- MAME_DIR .. "src/devices/bus/m5/rom.h",
- }
-end
-
diff --git a/scripts/src/cpu.lua b/scripts/src/cpu.lua
index ed6378f93f8..0c2882df5e5 100644
--- a/scripts/src/cpu.lua
+++ b/scripts/src/cpu.lua
@@ -10,6 +10,14 @@
---------------------------------------------------------------------------
--------------------------------------------------
+-- Shared code
+--------------------------------------------------
+
+files {
+ MAME_DIR .. "src/devices/cpu/vtlb.cpp",
+}
+
+--------------------------------------------------
-- Dynamic recompiler objects
--------------------------------------------------
@@ -35,6 +43,7 @@ if (CPUS["SH2"]~=null or CPUS["MIPS"]~=null or CPUS["POWERPC"]~=null or CPUS["RS
MAME_DIR .. "src/devices/cpu/drcbex64.cpp",
MAME_DIR .. "src/devices/cpu/drcbex64.h",
MAME_DIR .. "src/devices/cpu/drcumlsh.h",
+ MAME_DIR .. "src/devices/cpu/vtlb.h",
MAME_DIR .. "src/devices/cpu/x86emit.h",
}
end
diff --git a/scripts/src/emu.lua b/scripts/src/emu.lua
index e0358285114..01e61852d60 100644
--- a/scripts/src/emu.lua
+++ b/scripts/src/emu.lua
@@ -38,18 +38,6 @@ if _OPTIONS["with-bundled-lua"] then
}
end
-if (_OPTIONS["targetos"] == "windows") then
- defines {
- "UI_WINDOWS",
- }
-end
-
-if (_OPTIONS["osd"] == "sdl") then
- defines {
- "UI_SDL",
- }
-end
-
files {
MAME_DIR .. "src/emu/emu.h",
MAME_DIR .. "src/emu/gamedrv.h",
@@ -117,8 +105,6 @@ files {
MAME_DIR .. "src/emu/distate.h",
MAME_DIR .. "src/emu/divideo.cpp",
MAME_DIR .. "src/emu/divideo.h",
- MAME_DIR .. "src/emu/divtlb.cpp",
- MAME_DIR .. "src/emu/divtlb.h",
MAME_DIR .. "src/emu/drawgfx.cpp",
MAME_DIR .. "src/emu/drawgfx.h",
MAME_DIR .. "src/emu/drawgfxm.h",
@@ -222,6 +208,8 @@ files {
MAME_DIR .. "src/emu/ui/info_pty.h",
MAME_DIR .. "src/emu/ui/inputmap.cpp",
MAME_DIR .. "src/emu/ui/inputmap.h",
+ MAME_DIR .. "src/emu/ui/selgame.cpp",
+ MAME_DIR .. "src/emu/ui/selgame.h",
MAME_DIR .. "src/emu/ui/sliders.cpp",
MAME_DIR .. "src/emu/ui/sliders.h",
MAME_DIR .. "src/emu/ui/slotopt.cpp",
@@ -234,48 +222,6 @@ files {
MAME_DIR .. "src/emu/ui/videoopt.h",
MAME_DIR .. "src/emu/ui/viewgfx.cpp",
MAME_DIR .. "src/emu/ui/viewgfx.h",
- MAME_DIR .. "src/emu/ui/auditmenu.cpp",
- MAME_DIR .. "src/emu/ui/auditmenu.h",
- MAME_DIR .. "src/emu/ui/cmddata.h",
- MAME_DIR .. "src/emu/ui/cmdrender.h",
- MAME_DIR .. "src/emu/ui/ctrlmenu.cpp",
- MAME_DIR .. "src/emu/ui/ctrlmenu.h",
- MAME_DIR .. "src/emu/ui/custmenu.cpp",
- MAME_DIR .. "src/emu/ui/custmenu.h",
- MAME_DIR .. "src/emu/ui/custui.cpp",
- MAME_DIR .. "src/emu/ui/custui.h",
- MAME_DIR .. "src/emu/ui/datfile.cpp",
- MAME_DIR .. "src/emu/ui/datfile.h",
- MAME_DIR .. "src/emu/ui/datmenu.cpp",
- MAME_DIR .. "src/emu/ui/datmenu.h",
- MAME_DIR .. "src/emu/ui/defimg.h",
- MAME_DIR .. "src/emu/ui/dirmenu.cpp",
- MAME_DIR .. "src/emu/ui/dirmenu.h",
- MAME_DIR .. "src/emu/ui/dsplmenu.cpp",
- MAME_DIR .. "src/emu/ui/dsplmenu.h",
- MAME_DIR .. "src/emu/ui/icorender.h",
- MAME_DIR .. "src/emu/ui/inifile.cpp",
- MAME_DIR .. "src/emu/ui/inifile.h",
- MAME_DIR .. "src/emu/ui/miscmenu.cpp",
- MAME_DIR .. "src/emu/ui/miscmenu.h",
- MAME_DIR .. "src/emu/ui/moptions.cpp",
- MAME_DIR .. "src/emu/ui/moptions.h",
- MAME_DIR .. "src/emu/ui/optsmenu.cpp",
- MAME_DIR .. "src/emu/ui/optsmenu.h",
- MAME_DIR .. "src/emu/ui/selector.cpp",
- MAME_DIR .. "src/emu/ui/selector.h",
- MAME_DIR .. "src/emu/ui/selgame.cpp",
- MAME_DIR .. "src/emu/ui/selgame.h",
- MAME_DIR .. "src/emu/ui/simpleselgame.cpp",
- MAME_DIR .. "src/emu/ui/simpleselgame.h",
- MAME_DIR .. "src/emu/ui/selsoft.cpp",
- MAME_DIR .. "src/emu/ui/selsoft.h",
- MAME_DIR .. "src/emu/ui/sndmenu.cpp",
- MAME_DIR .. "src/emu/ui/sndmenu.h",
- MAME_DIR .. "src/emu/ui/starimg.h",
- MAME_DIR .. "src/emu/ui/toolbar.h",
- MAME_DIR .. "src/emu/ui/utils.cpp",
- MAME_DIR .. "src/emu/ui/utils.h",
MAME_DIR .. "src/emu/validity.cpp",
MAME_DIR .. "src/emu/validity.h",
MAME_DIR .. "src/emu/video.cpp",
@@ -387,7 +333,6 @@ dependency {
-- additional dependencies
--------------------------------------------------
{ MAME_DIR .. "src/emu/rendfont.cpp", GEN_DIR .. "emu/uismall.fh" },
- { MAME_DIR .. "src/emu/rendfont.cpp", GEN_DIR .. "emu/ui/uicmd14.fh" },
-------------------------------------------------
-- core layouts
--------------------------------------------------
@@ -407,8 +352,7 @@ dependency {
}
custombuildtask {
- { MAME_DIR .. "src/emu/uismall.png" , GEN_DIR .. "emu/uismall.fh", { MAME_DIR.. "scripts/build/png2bdc.py", MAME_DIR .. "scripts/build/file2str.py" }, {"@echo Converting uismall.png...", PYTHON .. " $(1) $(<) temp.bdc", PYTHON .. " $(2) temp.bdc $(@) font_uismall UINT8" }},
- { MAME_DIR .. "src/emu/ui/uicmd14.png" , GEN_DIR .. "emu/ui/uicmd14.fh", { MAME_DIR.. "scripts/build/png2bdc.py", MAME_DIR .. "scripts/build/file2str.py" }, {"@echo Converting uicmd14.png...", PYTHON .. " $(1) $(<) temp_cmd.bdc", PYTHON .. " $(2) temp_cmd.bdc $(@) font_uicmd14 UINT8" }},
+ { MAME_DIR .. "src/emu/uismall.png" , GEN_DIR .. "emu/uismall.fh", { MAME_DIR.. "scripts/build/png2bdc.py", MAME_DIR .. "scripts/build/file2str.py" }, {"@echo Converting uismall.png...", PYTHON .. " $(1) $(<) temp.bdc", PYTHON .. " $(2) temp.bdc $(@) font_uismall UINT8" }},
layoutbuildtask("emu/layout", "dualhovu"),
layoutbuildtask("emu/layout", "dualhsxs"),
diff --git a/scripts/src/machine.lua b/scripts/src/machine.lua
index fbc923b3073..5a97d22d015 100644
--- a/scripts/src/machine.lua
+++ b/scripts/src/machine.lua
@@ -773,18 +773,6 @@ end
---------------------------------------------------
--
---@src/devices/machine/hp_taco.h,MACHINES["HP_TACO"] = true
----------------------------------------------------
-
-if (MACHINES["HP_TACO"]~=null) then
- files {
- MAME_DIR .. "src/devices/machine/hp_taco.cpp",
- MAME_DIR .. "src/devices/machine/hp_taco.h",
- }
-end
-
----------------------------------------------------
---
--@src/devices/machine/i2cmem.h,MACHINES["I2CMEM"] = true
---------------------------------------------------
diff --git a/scripts/src/main.lua b/scripts/src/main.lua
index 9873ba269c9..da633c55212 100644
--- a/scripts/src/main.lua
+++ b/scripts/src/main.lua
@@ -88,7 +88,7 @@ end
targetextension ".bc"
if os.getenv("EMSCRIPTEN") then
postbuildcommands {
- os.getenv("EMSCRIPTEN") .. "/emcc -O3 -s DISABLE_EXCEPTION_CATCHING=2 -s USE_SDL=2 --memory-init-file 0 -s ALLOW_MEMORY_GROWTH=0 -s TOTAL_MEMORY=268435456 -s EXCEPTION_CATCHING_WHITELIST='[\"__ZN15running_machine17start_all_devicesEv\"]' -s EXPORTED_FUNCTIONS=\"['_main', '_malloc', '__Z14js_get_machinev', '__Z9js_get_uiv', '__Z12js_get_soundv', '__ZN10ui_manager12set_show_fpsEb', '__ZNK10ui_manager8show_fpsEv', '__ZN13sound_manager4muteEbh', '_SDL_PauseAudio']\" $(TARGET) -o " .. _MAKE.esc(MAME_DIR) .. _OPTIONS["target"] .. _OPTIONS["subtarget"] .. ".js --pre-js " .. _MAKE.esc(MAME_DIR) .. "src/osd/modules/sound/js_sound.js --post-js " .. _MAKE.esc(MAME_DIR) .. "src/osd/sdl/emscripten_post.js",
+ os.getenv("EMSCRIPTEN") .. "/emcc -O3 -s DISABLE_EXCEPTION_CATCHING=2 -s USE_SDL=2 --memory-init-file 0 -s ALLOW_MEMORY_GROWTH=0 -s TOTAL_MEMORY=268435456 -s EXCEPTION_CATCHING_WHITELIST='[\"__ZN15running_machine17start_all_devicesEv\"]' -s EXPORTED_FUNCTIONS=\"['_main', '_malloc', '__Z14js_get_machinev', '__Z9js_get_uiv', '__Z12js_get_soundv', '__ZN10ui_manager12set_show_fpsEb', '__ZNK10ui_manager8show_fpsEv', '__ZN13sound_manager4muteEbh', '_SDL_PauseAudio']\" $(TARGET) -o " .. _MAKE.esc(MAME_DIR) .. _OPTIONS["target"] .. _OPTIONS["subtarget"] .. ".js --post-js " .. _MAKE.esc(MAME_DIR) .. "src/osd/sdl/emscripten_post.js",
}
end
@@ -128,10 +128,7 @@ end
"jpeg",
"7z",
"lua",
- "lualibs",
- "luv",
- "uv",
- "http-parser",
+ "lsqlite3",
}
if _OPTIONS["with-bundled-zlib"] then
@@ -169,8 +166,12 @@ end
"portmidi",
}
end
- links {
- "bgfx",
+ if (USE_BGFX == 1) then
+ links {
+ "bgfx"
+ }
+ end
+ links{
"ocore_" .. _OPTIONS["osd"],
}
diff --git a/scripts/src/osd/modules.lua b/scripts/src/osd/modules.lua
index ea70ca132de..87e684a50f6 100644
--- a/scripts/src/osd/modules.lua
+++ b/scripts/src/osd/modules.lua
@@ -89,6 +89,7 @@ function osdmodulesbuild()
MAME_DIR .. "src/osd/modules/opengl/gl_shader_mgr.h",
MAME_DIR .. "src/osd/modules/opengl/gl_shader_tool.h",
MAME_DIR .. "src/osd/modules/opengl/osd_opengl.h",
+ MAME_DIR .. "src/osd/modules/opengl/SDL1211_opengl.h",
}
defines {
"USE_OPENGL=1",
@@ -100,15 +101,18 @@ function osdmodulesbuild()
end
end
- files {
- MAME_DIR .. "src/osd/modules/render/drawbgfx.cpp",
- MAME_DIR .. "src/osd/modules/render/binpacker.cpp",
- }
- includedirs {
- MAME_DIR .. "3rdparty/bgfx/include",
- MAME_DIR .. "3rdparty/bx/include",
- MAME_DIR .. "3rdparty/rapidjson/include",
- }
+ if USE_BGFX == 1 then
+ files {
+ MAME_DIR .. "src/osd/modules/render/drawbgfx.cpp",
+ }
+ defines {
+ "USE_BGFX"
+ }
+ includedirs {
+ MAME_DIR .. "3rdparty/bgfx/include",
+ MAME_DIR .. "3rdparty/bx/include",
+ }
+ end
if _OPTIONS["NO_USE_MIDI"]=="1" then
defines {
@@ -352,6 +356,14 @@ newoption {
},
}
+if not _OPTIONS["NO_OPENGL"] then
+ if _OPTIONS["targetos"]=="os2" then
+ _OPTIONS["NO_OPENGL"] = "1"
+ else
+ _OPTIONS["NO_OPENGL"] = "0"
+ end
+end
+
newoption {
trigger = "USE_DISPATCH_GL",
description = "Use GL-dispatching",
@@ -362,7 +374,11 @@ newoption {
}
if not _OPTIONS["USE_DISPATCH_GL"] then
- _OPTIONS["USE_DISPATCH_GL"] = "0"
+ if USE_BGFX == 1 then
+ _OPTIONS["USE_DISPATCH_GL"] = "0"
+ else
+ _OPTIONS["USE_DISPATCH_GL"] = "1"
+ end
end
newoption {
diff --git a/scripts/src/osd/osdmini.lua b/scripts/src/osd/osdmini.lua
index b05839e7873..803b7413014 100644
--- a/scripts/src/osd/osdmini.lua
+++ b/scripts/src/osd/osdmini.lua
@@ -79,7 +79,6 @@ project ("osd_" .. _OPTIONS["osd"])
MAME_DIR .. "src/osd/modules/sound/coreaudio_sound.cpp",
MAME_DIR .. "src/osd/modules/sound/sdl_sound.cpp",
MAME_DIR .. "src/osd/modules/sound/none.cpp",
- MAME_DIR .. "src/osd/modules/sound/xaudio2_sound.cpp",
}
project ("ocore_" .. _OPTIONS["osd"])
@@ -125,6 +124,7 @@ project ("ocore_" .. _OPTIONS["osd"])
MAME_DIR .. "src/osd/osdmini/minidir.cpp",
MAME_DIR .. "src/osd/osdmini/minifile.cpp",
MAME_DIR .. "src/osd/osdmini/minimisc.cpp",
+ MAME_DIR .. "src/osd/osdmini/minisync.cpp",
MAME_DIR .. "src/osd/osdmini/minitime.cpp",
MAME_DIR .. "src/osd/modules/sync/work_mini.cpp",
}
diff --git a/scripts/src/osd/osdmini_cfg.lua b/scripts/src/osd/osdmini_cfg.lua
index 586075d3cac..ff9539066b2 100644
--- a/scripts/src/osd/osdmini_cfg.lua
+++ b/scripts/src/osd/osdmini_cfg.lua
@@ -7,6 +7,4 @@ defines {
"USE_SDL",
"SDLMAME_NOASM=1",
"USE_OPENGL=0",
- "NO_USE_MIDI=1",
- "USE_XAUDIO2=0",
}
diff --git a/scripts/src/osd/sdl.lua b/scripts/src/osd/sdl.lua
index b89a25814ad..6acb5a2d262 100644
--- a/scripts/src/osd/sdl.lua
+++ b/scripts/src/osd/sdl.lua
@@ -39,23 +39,29 @@ function maintargetosdoptions(_target,_subtarget)
end
if BASE_TARGETOS=="unix" and _OPTIONS["targetos"]~="macosx" then
- links {
- "SDL2_ttf",
- }
+ if _OPTIONS["SDL_LIBVER"]=="sdl2" then
+ links {
+ "SDL2_ttf",
+ }
+ else
+ links {
+ "SDL_ttf",
+ }
+ end
local str = backtick("pkg-config --libs fontconfig")
addlibfromstring(str)
addoptionsfromstring(str)
end
if _OPTIONS["targetos"]=="windows" then
- if _OPTIONS["USE_LIBSDL"]~="1" then
+ if _OPTIONS["SDL_LIBVER"]=="sdl2" then
links {
"SDL2.dll",
}
else
- local str = backtick(sdlconfigcmd() .. " --libs | sed 's/ -lSDLmain//'")
- addlibfromstring(str)
- addoptionsfromstring(str)
+ links {
+ "SDL.dll",
+ }
end
links {
"psapi",
@@ -87,21 +93,16 @@ function maintargetosdoptions(_target,_subtarget)
configuration { "mingw*" or "vs*" }
targetprefix "sdl"
- links {
- "psapi"
- }
configuration { }
end
function sdlconfigcmd()
- if _OPTIONS["targetos"]=="asmjs" then
- return "sdl2-config"
- elseif not _OPTIONS["SDL_INSTALL_ROOT"] then
- return _OPTIONS['TOOLCHAIN'] .. "pkg-config sdl2"
+ if not _OPTIONS["SDL_INSTALL_ROOT"] then
+ return _OPTIONS["SDL_LIBVER"] .. "-config"
else
- return path.join(_OPTIONS["SDL_INSTALL_ROOT"],"bin","sdl2") .. "-config"
+ return path.join(_OPTIONS["SDL_INSTALL_ROOT"],"bin",_OPTIONS["SDL_LIBVER"]) .. "-config"
end
end
@@ -147,6 +148,23 @@ if not _OPTIONS["NO_USE_XINPUT"] then
end
newoption {
+ trigger = "SDL_LIBVER",
+ description = "Choose SDL version",
+ allowed = {
+ { "sdl", "SDL" },
+ { "sdl2", "SDL 2" },
+ },
+}
+
+if not _OPTIONS["SDL_LIBVER"] then
+ if _OPTIONS["targetos"]=="os2" then
+ _OPTIONS["SDL_LIBVER"] = "sdl"
+ else
+ _OPTIONS["SDL_LIBVER"] = "sdl2"
+ end
+end
+
+newoption {
trigger = "SDL2_MULTIAPI",
description = "Use couriersud's multi-keyboard patch for SDL 2.1? (this API was removed prior to the 2.0 release)",
allowed = {
@@ -174,16 +192,16 @@ if not _OPTIONS["SDL_FRAMEWORK_PATH"] then
end
newoption {
- trigger = "USE_LIBSDL",
- description = "Use SDL library on OS (rather than framework/dll)",
+ trigger = "MACOSX_USE_LIBSDL",
+ description = "Use SDL library on OS (rather than framework)",
allowed = {
- { "0", "Use framework/dll" },
+ { "0", "Use framework" },
{ "1", "Use library" },
},
}
-if not _OPTIONS["USE_LIBSDL"] then
- _OPTIONS["USE_LIBSDL"] = "0"
+if not _OPTIONS["MACOSX_USE_LIBSDL"] then
+ _OPTIONS["MACOSX_USE_LIBSDL"] = "0"
end
@@ -217,6 +235,10 @@ elseif _OPTIONS["targetos"]=="os2" then
SYNC_IMPLEMENTATION = "os2"
end
+if _OPTIONS["SDL_LIBVER"]=="sdl" then
+ USE_BGFX = 0
+end
+
if BASE_TARGETOS=="unix" then
if _OPTIONS["targetos"]=="macosx" then
local os_version = str_to_version(backtick("sw_vers -productVersion"))
@@ -233,27 +255,39 @@ if BASE_TARGETOS=="unix" then
"-weak_framework Metal",
}
end
- if _OPTIONS["USE_LIBSDL"]~="1" then
+ if _OPTIONS["MACOSX_USE_LIBSDL"]~="1" then
linkoptions {
"-F" .. _OPTIONS["SDL_FRAMEWORK_PATH"],
}
- links {
- "SDL2.framework",
- }
+ if _OPTIONS["SDL_LIBVER"]=="sdl2" then
+ links {
+ "SDL2.framework",
+ }
+ else
+ links {
+ "SDL.framework",
+ }
+ end
else
- local str = backtick(sdlconfigcmd() .. " --libs --static | sed 's/-lSDLmain//'")
+ local str = backtick(sdlconfigcmd() .. " --libs | sed 's/-lSDLmain//'")
addlibfromstring(str)
addoptionsfromstring(str)
end
else
if _OPTIONS["NO_X11"]=="1" then
_OPTIONS["USE_QTDEBUG"] = "0"
+ USE_BGFX = 0
else
libdirs {
"/usr/X11/lib",
"/usr/X11R6/lib",
"/usr/openwin/lib",
}
+ if _OPTIONS["SDL_LIBVER"]=="sdl" then
+ links {
+ "X11",
+ }
+ end
end
local str = backtick(sdlconfigcmd() .. " --libs")
addlibfromstring(str)
@@ -370,6 +404,13 @@ project ("osd_" .. _OPTIONS["osd"])
MAME_DIR .. "src/osd/modules/debugger/osx/watchpointsview.h",
MAME_DIR .. "src/osd/modules/debugger/osx/debugosx.h",
}
+ if _OPTIONS["SDL_LIBVER"]=="sdl" then
+ -- SDLMain_tmpl isn't necessary for SDL2
+ files {
+ MAME_DIR .. "src/osd/sdl/SDLMain_tmpl.mm",
+ MAME_DIR .. "src/osd/sdl/SDLMain_tmpl.h",
+ }
+ end
end
files {
@@ -390,10 +431,12 @@ project ("osd_" .. _OPTIONS["osd"])
MAME_DIR .. "src/osd/sdl/watchdog.h",
MAME_DIR .. "src/osd/modules/render/drawsdl.cpp",
}
- files {
- MAME_DIR .. "src/osd/modules/render/draw13.cpp",
- MAME_DIR .. "src/osd/modules/render/blit13.h",
- }
+ if _OPTIONS["SDL_LIBVER"]=="sdl2" then
+ files {
+ MAME_DIR .. "src/osd/modules/render/draw13.cpp",
+ MAME_DIR .. "src/osd/modules/render/blit13.h",
+ }
+ end
project ("ocore_" .. _OPTIONS["osd"])
@@ -486,14 +529,14 @@ if _OPTIONS["with-tools"] then
}
if _OPTIONS["targetos"] == "windows" then
- if _OPTIONS["USE_LIBSDL"]~="1" then
+ if _OPTIONS["SDL_LIBVER"] == "sdl2" then
links {
"SDL2.dll",
}
else
- local str = backtick(sdlconfigcmd() .. " --libs | sed 's/ -lSDLmain//'")
- addlibfromstring(str)
- addoptionsfromstring(str)
+ links {
+ "SDL.dll",
+ }
end
links {
"psapi",
@@ -504,14 +547,12 @@ if _OPTIONS["with-tools"] then
files {
MAME_DIR .. "src/osd/sdl/main.cpp",
}
+ elseif _OPTIONS["targetos"] == "macosx" and _OPTIONS["SDL_LIBVER"] == "sdl" then
+ -- SDLMain_tmpl isn't necessary for SDL2
+ files {
+ MAME_DIR .. "src/osd/sdl/SDLMain_tmpl.mm",
+ }
end
-
- configuration { "mingw*" or "vs*" }
- targetextension ".exe"
-
- configuration { }
-
- strip()
end
@@ -553,6 +594,4 @@ if _OPTIONS["targetos"] == "macosx" and _OPTIONS["with-tools"] then
files {
MAME_DIR .. "src/osd/sdl/aueffectutil.mm",
}
-
- strip()
end
diff --git a/scripts/src/osd/sdl_cfg.lua b/scripts/src/osd/sdl_cfg.lua
index bdeb7274ef1..2dc1a7e465a 100644
--- a/scripts/src/osd/sdl_cfg.lua
+++ b/scripts/src/osd/sdl_cfg.lua
@@ -56,12 +56,18 @@ if _OPTIONS["NO_USE_MIDI"]~="1" and _OPTIONS["targetos"]=="linux" then
}
end
-defines {
- "SDLMAME_SDL2=1",
-}
-if _OPTIONS["SDL2_MULTIAPI"]=="1" then
+if _OPTIONS["SDL_LIBVER"]=="sdl2" then
+ defines {
+ "SDLMAME_SDL2=1",
+ }
+ if _OPTIONS["SDL2_MULTIAPI"]=="1" then
+ defines {
+ "SDL2_MULTIAPI",
+ }
+ end
+else
defines {
- "SDL2_MULTIAPI",
+ "SDLMAME_SDL2=0",
}
end
@@ -75,7 +81,7 @@ if BASE_TARGETOS=="unix" then
"SDLMAME_UNIX",
}
if _OPTIONS["targetos"]=="macosx" then
- if _OPTIONS["USE_LIBSDL"]~="1" then
+ if _OPTIONS["MACOSX_USE_LIBSDL"]~="1" then
buildoptions {
"-F" .. _OPTIONS["SDL_FRAMEWORK_PATH"],
}
@@ -145,21 +151,3 @@ elseif _OPTIONS["targetos"]=="os2" then
backtick(sdlconfigcmd() .. " --cflags"),
}
end
-
-configuration { "osx*" }
- includedirs {
- MAME_DIR .. "3rdparty/bx/include/compat/osx",
- }
-
-configuration { "freebsd" }
- includedirs {
- MAME_DIR .. "3rdparty/bx/include/compat/freebsd",
- }
-
-configuration { "netbsd" }
- includedirs {
- MAME_DIR .. "3rdparty/bx/include/compat/freebsd",
- }
-
-configuration { }
-
diff --git a/scripts/src/osd/windows.lua b/scripts/src/osd/windows.lua
index 54464477e24..fd508e645c5 100644
--- a/scripts/src/osd/windows.lua
+++ b/scripts/src/osd/windows.lua
@@ -159,6 +159,7 @@ project ("osd_" .. _OPTIONS["osd"])
MAME_DIR .. "src/osd/modules/render/d3d/d3dcomm.h",
MAME_DIR .. "src/osd/modules/render/d3d/d3dhlsl.h",
MAME_DIR .. "src/osd/modules/render/d3d/d3dintf.h",
+ MAME_DIR .. "src/osd/modules/render/drawdd.cpp",
MAME_DIR .. "src/osd/modules/render/drawgdi.cpp",
MAME_DIR .. "src/osd/modules/render/drawnone.cpp",
MAME_DIR .. "src/osd/windows/input.cpp",
diff --git a/scripts/src/osd/windows_cfg.lua b/scripts/src/osd/windows_cfg.lua
index 3e656017816..19ef05c3ce9 100644
--- a/scripts/src/osd/windows_cfg.lua
+++ b/scripts/src/osd/windows_cfg.lua
@@ -50,7 +50,7 @@ end
if _OPTIONS["USE_SDL"]=="1" then
defines {
- "SDLMAME_SDL2=1",
+ "SDLMAME_SDL2=0",
"USE_XINPUT=0",
"USE_SDL=1",
"USE_SDL_SOUND",
diff --git a/scripts/src/tests.lua b/scripts/src/tests.lua
index d30cff64df2..99d82fcb6cb 100644
--- a/scripts/src/tests.lua
+++ b/scripts/src/tests.lua
@@ -8,78 +8,42 @@
-- Rules for building tests
--
---------------------------------------------------------------------------
---------------------------------------------------
--- GoogleTest library objects
---------------------------------------------------
-
-project "gtest"
- uuid "fa306a8d-fb10-4d4a-9d2e-fdb9076407b4"
- kind "StaticLib"
-
- configuration { "gmake" }
- buildoptions {
- "-Wno-undef",
- "-Wno-unused-variable",
- }
-
- configuration { "mingw-clang" }
- buildoptions {
- "-O0", -- crash of compiler when doing optimization
- }
-
- configuration { "vs*" }
-if _OPTIONS["vs"]=="intel-15" then
- buildoptions {
- "/Qwd1195", -- error #1195: conversion from integer to smaller pointer
- }
-end
-
- configuration { }
-
- includedirs {
- MAME_DIR .. "3rdparty/googletest/googletest/include",
- MAME_DIR .. "3rdparty/googletest/googletest",
- }
- files {
- MAME_DIR .. "3rdparty/googletest/googletest/src/gtest-all.cc",
- }
-
project("tests")
- uuid ("66d4c639-196b-4065-a411-7ee9266564f5")
- kind "ConsoleApp"
-
- flags {
- "Symbols", -- always include minimum symbols for executables
- }
-
- if _OPTIONS["SEPARATE_BIN"]~="1" then
- targetdir(MAME_DIR)
- end
+uuid ("66d4c639-196b-4065-a411-7ee9266564f5")
+kind "ConsoleApp"
- configuration { "gmake" }
- buildoptions {
- "-Wno-undef",
- }
+flags {
+ "Symbols", -- always include minimum symbols for executables
+}
- configuration { }
-
- links {
- "gtest",
- "utils",
- "expat",
- "zlib",
- "ocore_" .. _OPTIONS["osd"],
- }
+if _OPTIONS["SEPARATE_BIN"]~="1" then
+ targetdir(MAME_DIR)
+end
- includedirs {
- MAME_DIR .. "3rdparty/googletest/googletest/include",
- MAME_DIR .. "src/osd",
- MAME_DIR .. "src/lib/util",
+configuration { "gmake" }
+ buildoptions {
+ "-Wno-undef",
}
- files {
- MAME_DIR .. "tests/main.cpp",
- MAME_DIR .. "tests/lib/util/corestr.cpp",
- }
+configuration { }
+
+links {
+ "gtest",
+ "utils",
+ "expat",
+ "zlib",
+ "ocore_" .. _OPTIONS["osd"],
+}
+
+includedirs {
+ MAME_DIR .. "3rdparty/googletest/googletest/include",
+ MAME_DIR .. "src/osd",
+ MAME_DIR .. "src/lib/util",
+}
+
+files {
+ MAME_DIR .. "tests/main.cpp",
+ MAME_DIR .. "tests/lib/util/corestr.cpp",
+}
diff --git a/scripts/src/tools.lua b/scripts/src/tools.lua
index 421f5cc76b5..19942651f0c 100644
--- a/scripts/src/tools.lua
+++ b/scripts/src/tools.lua
@@ -50,13 +50,6 @@ files {
MAME_DIR .. "src/tools/romcmp.cpp",
}
-configuration { "mingw*" or "vs*" }
- targetextension ".exe"
-
-configuration { }
-
-strip()
-
--------------------------------------------------
-- chdman
--------------------------------------------------
@@ -111,13 +104,6 @@ files {
MAME_DIR .. "src/version.cpp",
}
-configuration { "mingw*" or "vs*" }
- targetextension ".exe"
-
-configuration { }
-
-strip()
-
--------------------------------------------------
-- jedutil
--------------------------------------------------
@@ -159,13 +145,6 @@ files {
MAME_DIR .. "src/tools/jedutil.cpp",
}
-configuration { "mingw*" or "vs*" }
- targetextension ".exe"
-
-configuration { }
-
-strip()
-
--------------------------------------------------
-- unidasm
--------------------------------------------------
@@ -222,12 +201,6 @@ files {
MAME_DIR .. "src/emu/emucore.cpp",
}
-configuration { "mingw*" or "vs*" }
- targetextension ".exe"
-
-configuration { }
-
-strip()
--------------------------------------------------
-- ldresample
@@ -282,13 +255,6 @@ files {
MAME_DIR .. "src/tools/ldresample.cpp",
}
-configuration { "mingw*" or "vs*" }
- targetextension ".exe"
-
-configuration { }
-
-strip()
-
--------------------------------------------------
-- ldverify
--------------------------------------------------
@@ -342,13 +308,6 @@ files {
MAME_DIR .. "src/tools/ldverify.cpp",
}
-configuration { "mingw*" or "vs*" }
- targetextension ".exe"
-
-configuration { }
-
-strip()
-
--------------------------------------------------
-- regrep
--------------------------------------------------
@@ -390,13 +349,6 @@ files {
MAME_DIR .. "src/tools/regrep.cpp",
}
-configuration { "mingw*" or "vs*" }
- targetextension ".exe"
-
-configuration { }
-
-strip()
-
--------------------------------------------------
-- srcclean
---------------------------------------------------
@@ -438,13 +390,6 @@ files {
MAME_DIR .. "src/tools/srcclean.cpp",
}
-configuration { "mingw*" or "vs*" }
- targetextension ".exe"
-
-configuration { }
-
-strip()
-
--------------------------------------------------
-- src2html
--------------------------------------------------
@@ -486,13 +431,6 @@ files {
MAME_DIR .. "src/tools/src2html.cpp",
}
-configuration { "mingw*" or "vs*" }
- targetextension ".exe"
-
-configuration { }
-
-strip()
-
--------------------------------------------------
-- split
--------------------------------------------------
@@ -545,13 +483,6 @@ files {
MAME_DIR .. "src/tools/split.cpp",
}
-configuration { "mingw*" or "vs*" }
- targetextension ".exe"
-
-configuration { }
-
-strip()
-
--------------------------------------------------
-- pngcmp
--------------------------------------------------
@@ -593,13 +524,6 @@ files {
MAME_DIR .. "src/tools/pngcmp.cpp",
}
-configuration { "mingw*" or "vs*" }
- targetextension ".exe"
-
-configuration { }
-
-strip()
-
--------------------------------------------------
-- nltool
--------------------------------------------------
@@ -654,13 +578,6 @@ files {
MAME_DIR .. "src/lib/netlist/prg/nltool.cpp",
}
-configuration { "mingw*" or "vs*" }
- targetextension ".exe"
-
-configuration { }
-
-strip()
-
--------------------------------------------------
-- nlwav
--------------------------------------------------
@@ -693,13 +610,6 @@ files {
MAME_DIR .. "src/lib/netlist/prg/nlwav.cpp",
}
-configuration { "mingw*" or "vs*" }
- targetextension ".exe"
-
-configuration { }
-
-strip()
-
--------------------------------------------------
-- castool
--------------------------------------------------
@@ -754,13 +664,6 @@ files {
MAME_DIR .. "src/tools/castool.cpp",
}
-configuration { "mingw*" or "vs*" }
- targetextension ".exe"
-
-configuration { }
-
-strip()
-
--------------------------------------------------
-- floptool
--------------------------------------------------
@@ -816,13 +719,6 @@ files {
MAME_DIR .. "src/tools/floptool.cpp",
}
-configuration { "mingw*" or "vs*" }
- targetextension ".exe"
-
-configuration { }
-
-strip()
-
--------------------------------------------------
-- imgtool
--------------------------------------------------
@@ -926,10 +822,3 @@ files {
MAME_DIR .. "src/tools/imgtool/modules/bml3.cpp",
MAME_DIR .. "src/tools/imgtool/modules/hp48.cpp",
}
-
-configuration { "mingw*" or "vs*" }
- targetextension ".exe"
-
-configuration { }
-
-strip()
diff --git a/scripts/src/video.lua b/scripts/src/video.lua
index 96a310f154b..a09ef123fca 100644
--- a/scripts/src/video.lua
+++ b/scripts/src/video.lua
@@ -156,18 +156,6 @@ end
--------------------------------------------------
--
---@src/devices/video/ef9364.h,VIDEOS["EF9364"] = true
---------------------------------------------------
-
-if (VIDEOS["EF9364"]~=null) then
- files {
- MAME_DIR .. "src/devices/video/ef9364.cpp",
- MAME_DIR .. "src/devices/video/ef9364.h",
- }
-end
-
---------------------------------------------------
---
--@src/devices/video/ef9365.h,VIDEOS["EF9365"] = true
--------------------------------------------------
@@ -842,15 +830,3 @@ if (VIDEOS["CRTC_EGA"]~=null) then
MAME_DIR .. "src/devices/video/crtc_ega.h",
}
end
-
---------------------------------------------------
---
---@src/devices/video/jangou_blitter.h,VIDEOS["JANGOU_BLITTER"] = true
---------------------------------------------------
-
-if (VIDEOS["JANGOU_BLITTER"]~=null) then
- files {
- MAME_DIR .. "src/devices/video/jangou_blitter.cpp",
- MAME_DIR .. "src/devices/video/jangou_blitter.h",
- }
-end
diff --git a/scripts/target/mame/arcade.lua b/scripts/target/mame/arcade.lua
index f59119796fc..c00c3d4731c 100644
--- a/scripts/target/mame/arcade.lua
+++ b/scripts/target/mame/arcade.lua
@@ -275,7 +275,6 @@ VIDEOS["BUFSPRITE"] = true
VIDEOS["DM9368"] = true
--VIDEOS["EF9340_1"] = true
--VIDEOS["EF9345"] = true
---VIDEOS["EF9364"] = true
--VIDEOS["EF9365"] = true
--VIDEOS["GF4500"] = true
VIDEOS["GF7600GS"] = true
@@ -295,7 +294,6 @@ VIDEOS["HUC6270"] = true
--VIDEOS["HUC6272"] = true
--VIDEOS["I8244"] = true
VIDEOS["I8275"] = true
-VIDEOS["JANGOU_BLITTER"] = true
VIDEOS["M50458"] = true
VIDEOS["MB90082"] = true
VIDEOS["MB_VCU"] = true
@@ -4021,8 +4019,6 @@ files {
createMAMEProjects(_target, _subtarget, "zaccaria")
files {
- MAME_DIR .. "src/mame/audio/zaccaria.cpp",
- MAME_DIR .. "src/mame/audio/zaccaria.h",
MAME_DIR .. "src/mame/drivers/laserbat.cpp",
MAME_DIR .. "src/mame/includes/laserbat.h",
MAME_DIR .. "src/mame/video/laserbat.cpp",
@@ -4249,7 +4245,6 @@ files {
MAME_DIR .. "src/mame/machine/inder_vid.cpp",
MAME_DIR .. "src/mame/machine/inder_vid.h",
MAME_DIR .. "src/mame/drivers/corona.cpp",
- MAME_DIR .. "src/mame/drivers/amazonlf.cpp",
MAME_DIR .. "src/mame/drivers/crystal.cpp",
MAME_DIR .. "src/mame/video/vrender0.cpp",
MAME_DIR .. "src/mame/video/vrender0.h",
@@ -4416,7 +4411,6 @@ files {
MAME_DIR .. "src/mame/includes/news.h",
MAME_DIR .. "src/mame/video/news.cpp",
MAME_DIR .. "src/mame/drivers/nexus3d.cpp",
- MAME_DIR .. "src/mame/drivers/nibble.cpp",
MAME_DIR .. "src/mame/drivers/norautp.cpp",
MAME_DIR .. "src/mame/includes/norautp.h",
MAME_DIR .. "src/mame/audio/norautp.cpp",
diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua
index 80be3e7c76c..cfbf4e0667a 100644
--- a/scripts/target/mame/mess.lua
+++ b/scripts/target/mame/mess.lua
@@ -273,7 +273,6 @@ VIDEOS["DL1416"] = true
VIDEOS["DM9368"] = true
VIDEOS["EF9340_1"] = true
VIDEOS["EF9345"] = true
-VIDEOS["EF9364"] = true
VIDEOS["EF9365"] = true
VIDEOS["GF4500"] = true
--VIDEOS+= EPIC12"] = true
@@ -398,7 +397,6 @@ MACHINES["ER2055"] = true
MACHINES["F3853"] = true
MACHINES["HD63450"] = true
MACHINES["HD64610"] = true
-MACHINES["HP_TACO"] = true
MACHINES["I2CMEM"] = true
MACHINES["I80130"] = true
MACHINES["I8089"] = true
@@ -620,7 +618,6 @@ BUSES["ISA"] = true
BUSES["ISBX"] = true
BUSES["KC"] = true
BUSES["LPCI"] = true
-BUSES["M5"] = true
BUSES["MACPDS"] = true
BUSES["MIDI"] = true
BUSES["MEGADRIVE"] = true
@@ -1188,6 +1185,9 @@ files {
createMESSProjects(_target, _subtarget, "apple")
files {
MAME_DIR .. "src/mame/drivers/apple1.cpp",
+ MAME_DIR .. "src/mame/includes/apple1.h",
+ MAME_DIR .. "src/mame/machine/apple1.cpp",
+ MAME_DIR .. "src/mame/video/apple1.cpp",
MAME_DIR .. "src/mame/drivers/apple2.cpp",
MAME_DIR .. "src/mame/includes/apple2.h",
MAME_DIR .. "src/mame/drivers/apple2e.cpp",
@@ -1701,7 +1701,6 @@ files {
MAME_DIR .. "src/mame/drivers/fidelz80.cpp",
MAME_DIR .. "src/mame/includes/fidelz80.h",
MAME_DIR .. "src/mame/drivers/fidel6502.cpp",
- MAME_DIR .. "src/mame/drivers/fidel68k.cpp",
}
createMESSProjects(_target, _subtarget, "force")
@@ -2091,8 +2090,6 @@ files {
MAME_DIR .. "src/mame/machine/pc9801_cbus.h",
MAME_DIR .. "src/mame/machine/pc9801_kbd.cpp",
MAME_DIR .. "src/mame/machine/pc9801_kbd.h",
- MAME_DIR .. "src/mame/machine/pc9801_cd.cpp",
- MAME_DIR .. "src/mame/machine/pc9801_cd.h",
MAME_DIR .. "src/mame/drivers/tk80bs.cpp",
MAME_DIR .. "src/mame/drivers/hh_ucom4.cpp",
MAME_DIR .. "src/mame/includes/hh_ucom4.h",
@@ -2770,7 +2767,6 @@ files {
MAME_DIR .. "src/mame/includes/gamecom.h",
MAME_DIR .. "src/mame/machine/gamecom.cpp",
MAME_DIR .. "src/mame/video/gamecom.cpp",
- MAME_DIR .. "src/mame/drivers/k28.cpp",
}
createMESSProjects(_target, _subtarget, "tigertel")
@@ -3032,7 +3028,6 @@ files {
MAME_DIR .. "src/mame/drivers/ampro.cpp",
MAME_DIR .. "src/mame/drivers/amust.cpp",
MAME_DIR .. "src/mame/drivers/applix.cpp",
- MAME_DIR .. "src/mame/drivers/argox.cpp",
MAME_DIR .. "src/mame/drivers/attache.cpp",
MAME_DIR .. "src/mame/drivers/aussiebyte.cpp",
MAME_DIR .. "src/mame/includes/aussiebyte.h",
@@ -3087,7 +3082,6 @@ files {
MAME_DIR .. "src/mame/audio/gamate.cpp",
MAME_DIR .. "src/mame/drivers/gameking.cpp",
MAME_DIR .. "src/mame/drivers/gimix.cpp",
- MAME_DIR .. "src/mame/drivers/goupil.cpp",
MAME_DIR .. "src/mame/drivers/grfd2301.cpp",
MAME_DIR .. "src/mame/drivers/harriet.cpp",
MAME_DIR .. "src/mame/drivers/hprot1.cpp",
@@ -3131,7 +3125,6 @@ files {
MAME_DIR .. "src/mame/drivers/mx2178.cpp",
MAME_DIR .. "src/mame/drivers/mycom.cpp",
MAME_DIR .. "src/mame/drivers/myvision.cpp",
- MAME_DIR .. "src/mame/drivers/notetaker.cpp",
MAME_DIR .. "src/mame/drivers/ngen.cpp",
MAME_DIR .. "src/mame/machine/ngen_kb.cpp",
MAME_DIR .. "src/mame/machine/ngen_kb.h",
diff --git a/scripts/toolchain.lua b/scripts/toolchain.lua
index 137a873ae09..7fad61ce928 100644
--- a/scripts/toolchain.lua
+++ b/scripts/toolchain.lua
@@ -4,11 +4,6 @@
--
local naclToolchain = ""
-local toolchainPrefix = ""
-
-if _OPTIONS['TOOLCHAIN'] then
- toolchainPrefix = _OPTIONS["TOOLCHAIN"]
-end
newoption {
trigger = "gcc",
@@ -209,18 +204,15 @@ function toolchain(_buildDir, _subDir)
if not os.getenv("MINGW32") then
print("Set MINGW32 envrionment variable.")
end
- if not toolchainPrefix then
- toolchainPrefix = "$(MINGW32)/bin/i686-w64-mingw32-"
- end
- premake.gcc.cc = toolchainPrefix .. "gcc"
- premake.gcc.cxx = toolchainPrefix .. "g++"
+ premake.gcc.cc = "$(MINGW32)/bin/i686-w64-mingw32-gcc"
+ premake.gcc.cxx = "$(MINGW32)/bin/i686-w64-mingw32-g++"
-- work around GCC 4.9.2 not having proper linker for LTO=1 usage
local version_4_ar = str_to_version(_OPTIONS["gcc_version"])
if (version_4_ar < 50000) then
- premake.gcc.ar = toolchainPrefix .. "ar"
+ premake.gcc.ar = "$(MINGW32)/bin/ar"
end
if (version_4_ar >= 50000) then
- premake.gcc.ar = toolchainPrefix .. "gcc-ar"
+ premake.gcc.ar = "$(MINGW32)/bin/gcc-ar"
end
location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-mingw32-gcc")
end
@@ -229,22 +221,20 @@ function toolchain(_buildDir, _subDir)
if not os.getenv("MINGW64") then
print("Set MINGW64 envrionment variable.")
end
- if not toolchainPrefix then
- toolchainPrefix = "$(MINGW64)/bin/x86_64-w64-mingw32-"
- end
- premake.gcc.cc = toolchainPrefix .. "gcc"
- premake.gcc.cxx = toolchainPrefix .. "g++"
+ premake.gcc.cc = "$(MINGW64)/bin/x86_64-w64-mingw32-gcc"
+ premake.gcc.cxx = "$(MINGW64)/bin/x86_64-w64-mingw32-g++"
-- work around GCC 4.9.2 not having proper linker for LTO=1 usage
local version_4_ar = str_to_version(_OPTIONS["gcc_version"])
if (version_4_ar < 50000) then
- premake.gcc.ar = toolchainPrefix .. "ar"
+ premake.gcc.ar = "$(MINGW64)/bin/ar"
end
if (version_4_ar >= 50000) then
- premake.gcc.ar = toolchainPrefix .. "gcc-ar"
+ premake.gcc.ar = "$(MINGW64)/bin/gcc-ar"
end
location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-mingw64-gcc")
end
+
if "mingw-clang" == _OPTIONS["gcc"] then
premake.gcc.cc = "clang"
premake.gcc.cxx = "clang++"
@@ -293,17 +283,18 @@ function toolchain(_buildDir, _subDir)
if "osx" == _OPTIONS["gcc"] then
if os.is("linux") then
- premake.gcc.cc = toolchainPrefix .. "clang"
- premake.gcc.cxx = toolchainPrefix .. "clang++"
- premake.gcc.ar = toolchainPrefix .. "ar"
+ local osxToolchain = "x86_64-apple-darwin13-"
+ premake.gcc.cc = osxToolchain .. "clang"
+ premake.gcc.cxx = osxToolchain .. "clang++"
+ premake.gcc.ar = osxToolchain .. "ar"
end
location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-osx")
end
if "osx-clang" == _OPTIONS["gcc"] then
- premake.gcc.cc = toolchainPrefix .. "clang"
- premake.gcc.cxx = toolchainPrefix .. "clang++"
- premake.gcc.ar = toolchainPrefix .. "ar"
+ premake.gcc.cc = "clang"
+ premake.gcc.cxx = "clang++"
+ premake.gcc.ar = "ar"
location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-osx-clang")
end
@@ -505,9 +496,7 @@ function toolchain(_buildDir, _subDir)
configuration { "steamlink" }
objdir ( _buildDir .. "steamlink/obj")
- defines {
- "__STEAMLINK__=1", -- There is no special prefedined compiler symbol to detect SteamLink, faking it.
- }
+
buildoptions {
"-marm",
"-mfloat-abi=hard",
@@ -920,15 +909,6 @@ function toolchain(_buildDir, _subDir)
end
function strip()
- if _OPTIONS["STRIP_SYMBOLS"]~="1" then
- return true
- end
-
- configuration { "osx-*", "Release" }
- postbuildcommands {
- "$(SILENT) echo Stripping symbols.",
- "$(SILENT) " .. (_OPTIONS['TOOLCHAIN'] and toolchainPrefix) .. "strip \"$(TARGET)\"",
- }
configuration { "android-arm", "Release" }
postbuildcommands {
@@ -957,12 +937,13 @@ function strip()
configuration { "mingw*", "x64", "Release" }
postbuildcommands {
"$(SILENT) echo Stripping symbols.",
- "$(SILENT) " .. (_OPTIONS['TOOLCHAIN'] and toolchainPrefix or "$(MINGW64)/bin/") .. "strip -s \"$(TARGET)\"",
+ "$(SILENT) $(MINGW64)/bin/strip -s \"$(TARGET)\"",
}
+
configuration { "mingw*", "x32", "Release" }
postbuildcommands {
"$(SILENT) echo Stripping symbols.",
- "$(SILENT) " .. (_OPTIONS['TOOLCHAIN'] and toolchainPrefix or "$(MINGW32)/bin/") .. "strip -s \"$(TARGET)\"",
+ "$(SILENT) $(MINGW32)/bin/strip -s \"$(TARGET)\""
}
configuration { "pnacl" }