mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
Merge branch 'master' of https://github.com/mamedev/mame
This commit is contained in:
commit
6eb0da2ef6
22
3rdparty/bgfx/src/glcontext_nsgl.mm
vendored
22
3rdparty/bgfx/src/glcontext_nsgl.mm
vendored
@ -7,6 +7,7 @@
|
||||
|
||||
#if BX_PLATFORM_OSX && (BGFX_CONFIG_RENDERER_OPENGLES || BGFX_CONFIG_RENDERER_OPENGL)
|
||||
# include "renderer_gl.h"
|
||||
# include <AvailabilityMacros.h>
|
||||
# include <Cocoa/Cocoa.h>
|
||||
# include <bx/os.h>
|
||||
|
||||
@ -36,6 +37,22 @@ namespace bgfx { namespace gl
|
||||
}
|
||||
};
|
||||
|
||||
class AutoreleasePoolHolder
|
||||
{
|
||||
public:
|
||||
AutoreleasePoolHolder() : pool([[NSAutoreleasePool alloc] init])
|
||||
{
|
||||
}
|
||||
|
||||
~AutoreleasePoolHolder()
|
||||
{
|
||||
[pool release];
|
||||
}
|
||||
|
||||
private:
|
||||
NSAutoreleasePool* pool;
|
||||
};
|
||||
|
||||
static void* s_opengl = NULL;
|
||||
|
||||
void GlContext::create(uint32_t _width, uint32_t _height)
|
||||
@ -45,11 +62,13 @@ namespace bgfx { namespace gl
|
||||
s_opengl = bx::dlopen("/System/Library/Frameworks/OpenGL.framework/Versions/Current/OpenGL");
|
||||
BX_CHECK(NULL != s_opengl, "OpenGL dynamic library is not found!");
|
||||
|
||||
const AutoreleasePoolHolder pool;
|
||||
NSWindow* nsWindow = (NSWindow*)g_bgfxNSWindow;
|
||||
m_context = g_bgfxNSGL;
|
||||
|
||||
if (NULL == g_bgfxNSGL)
|
||||
{
|
||||
#if defined(MAC_OS_X_VERSION_MAX_ALLOWED) && (MAC_OS_X_VERSION_MAX_ALLOWED >= 1070)
|
||||
NSOpenGLPixelFormatAttribute profile =
|
||||
#if BGFX_CONFIG_RENDERER_OPENGL >= 31
|
||||
NSOpenGLProfileVersion3_2Core
|
||||
@ -57,9 +76,12 @@ namespace bgfx { namespace gl
|
||||
NSOpenGLProfileVersionLegacy
|
||||
#endif // BGFX_CONFIG_RENDERER_OPENGL >= 31
|
||||
;
|
||||
#endif // defined(MAC_OS_X_VERSION_MAX_ALLOWED) && (MAC_OS_X_VERSION_MAX_ALLOWED >= 1070)
|
||||
|
||||
NSOpenGLPixelFormatAttribute pixelFormatAttributes[] = {
|
||||
#if defined(MAC_OS_X_VERSION_MAX_ALLOWED) && (MAC_OS_X_VERSION_MAX_ALLOWED >= 1070)
|
||||
NSOpenGLPFAOpenGLProfile, profile,
|
||||
#endif // defined(MAC_OS_X_VERSION_MAX_ALLOWED) && (MAC_OS_X_VERSION_MAX_ALLOWED >= 1070)
|
||||
NSOpenGLPFAColorSize, 24,
|
||||
NSOpenGLPFAAlphaSize, 8,
|
||||
NSOpenGLPFADepthSize, 24,
|
||||
|
74
3rdparty/genie/src/actions/make/make_cpp.lua
vendored
74
3rdparty/genie/src/actions/make/make_cpp.lua
vendored
@ -3,7 +3,7 @@
|
||||
-- Generate a C/C++ project makefile.
|
||||
-- Copyright (c) 2002-2013 Jason Perkins and the Premake project
|
||||
--
|
||||
|
||||
premake.make.linkoptions_after = false
|
||||
premake.make.cpp = { }
|
||||
premake.make.override = { }
|
||||
local cpp = premake.make.cpp
|
||||
@ -28,16 +28,27 @@
|
||||
|
||||
-- list object directories
|
||||
local objdirs = {}
|
||||
local additionalobjdirs = {}
|
||||
for _, file in ipairs(prj.files) do
|
||||
if path.iscppfile(file) then
|
||||
objdirs[_MAKE.esc(path.getdirectory(path.trimdots(file)))] = 1
|
||||
end
|
||||
end
|
||||
|
||||
for _, custombuildtask in ipairs(prj.custombuildtask or {}) do
|
||||
for _, buildtask in ipairs(custombuildtask or {}) do
|
||||
additionalobjdirs[_MAKE.esc(path.getdirectory(path.getrelative(prj.location,buildtask[2])))] = 1
|
||||
end
|
||||
end
|
||||
|
||||
_p('OBJDIRS := \\')
|
||||
_p('\t$(OBJDIR) \\')
|
||||
for dir, _ in pairs(objdirs) do
|
||||
_p('\t$(OBJDIR)/%s \\', dir)
|
||||
end
|
||||
for dir, _ in pairs(additionalobjdirs) do
|
||||
_p('\t%s \\', dir)
|
||||
end
|
||||
_p('')
|
||||
|
||||
_p('RESOURCES := \\')
|
||||
@ -152,6 +163,36 @@
|
||||
-- per-file build rules
|
||||
cpp.fileRules(prj)
|
||||
|
||||
-- per-dependency build rules
|
||||
cpp.dependencyRules(prj)
|
||||
|
||||
for _, custombuildtask in ipairs(prj.custombuildtask or {}) do
|
||||
for _, buildtask in ipairs(custombuildtask or {}) do
|
||||
local deps = string.format("%s ",path.getrelative(prj.location,buildtask[1]))
|
||||
for _, depdata in ipairs(buildtask[3] or {}) do
|
||||
deps = deps .. string.format("%s ",path.getrelative(prj.location,depdata))
|
||||
end
|
||||
_p('%s: %s'
|
||||
,path.getrelative(prj.location,buildtask[2])
|
||||
, deps
|
||||
)
|
||||
for _, cmdline in ipairs(buildtask[4] or {}) do
|
||||
local cmd = cmdline
|
||||
local num = 1
|
||||
for _, depdata in ipairs(buildtask[3] or {}) do
|
||||
cmd = string.gsub(cmd,"%$%(" .. num .."%)", string.format("%s ",path.getrelative(prj.location,depdata)))
|
||||
num = num + 1
|
||||
end
|
||||
cmd = string.gsub(cmd, "%$%(<%)", "$<")
|
||||
cmd = string.gsub(cmd, "%$%(@%)", "$@")
|
||||
|
||||
_p('\t$(SILENT) %s',cmd)
|
||||
|
||||
end
|
||||
_p('')
|
||||
end
|
||||
end
|
||||
|
||||
-- include the dependencies, built by GCC (with the -MMD flag)
|
||||
_p('-include $(OBJECTS:%%.o=%%.d)')
|
||||
_p('ifneq (,$(PCH))')
|
||||
@ -370,7 +411,11 @@
|
||||
-- $(LIBS) moved to end (http://sourceforge.net/p/premake/bugs/279/)
|
||||
|
||||
local tool = iif(cfg.language == "C", "CC", "CXX")
|
||||
_p(' LINKCMD = $(%s) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)', tool)
|
||||
if (premake.make.linkoptions_after) then
|
||||
_p(' LINKCMD = $(%s) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(LIBS) $(ALL_LDFLAGS)', tool)
|
||||
else
|
||||
_p(' LINKCMD = $(%s) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)', tool)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
@ -454,6 +499,11 @@
|
||||
else
|
||||
cpp.buildcommand(path.iscfile(file) and not prj.options.ForceCPP, "o")
|
||||
end
|
||||
for _, task in ipairs(prj.postcompiletasks or {}) do
|
||||
_p('\t$(SILENT) %s', task)
|
||||
_p('')
|
||||
end
|
||||
|
||||
_p('')
|
||||
elseif (path.getextension(file) == ".rc") then
|
||||
_p('$(OBJDIR)/%s.res: %s', _MAKE.esc(path.getbasename(file)), _MAKE.esc(file))
|
||||
@ -468,6 +518,26 @@
|
||||
end
|
||||
end
|
||||
|
||||
function cpp.dependencyRules(prj)
|
||||
for _, dependency in ipairs(prj.dependency or {}) do
|
||||
for _, dep in ipairs(dependency or {}) do
|
||||
if (dep[3]==nil or dep[3]==false) then
|
||||
_p('$(OBJDIR)/%s.o: %s'
|
||||
, _MAKE.esc(path.trimdots(path.removeext(path.getrelative(prj.location, dep[1]))))
|
||||
, _MAKE.esc(path.getrelative(prj.location, dep[2]))
|
||||
)
|
||||
else
|
||||
_p('%s: %s'
|
||||
, _MAKE.esc(dep[1])
|
||||
, _MAKE.esc(path.getrelative(prj.location, dep[2]))
|
||||
)
|
||||
end
|
||||
_p('')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function cpp.buildcommand(iscfile, objext)
|
||||
local flags = iif(iscfile, '$(CC) $(ALL_CFLAGS)', '$(CXX) $(ALL_CXXFLAGS)')
|
||||
_p('\t$(SILENT) %s $(FORCE_INCLUDE) -o "$@" -MF $(@:%%.%s=%%.d) -c "$<"', flags, objext)
|
||||
|
@ -544,11 +544,62 @@
|
||||
vc2010.simplefilesgroup(prj, "ClInclude")
|
||||
vc2010.compilerfilesgroup(prj)
|
||||
vc2010.simplefilesgroup(prj, "None")
|
||||
vc2010.customtaskgroup(prj)
|
||||
vc2010.simplefilesgroup(prj, "ResourceCompile")
|
||||
vc2010.simplefilesgroup(prj, "AppxManifest")
|
||||
end
|
||||
|
||||
|
||||
function vc2010.customtaskgroup(prj)
|
||||
local files = { }
|
||||
for _, custombuildtask in ipairs(prj.custombuildtask or {}) do
|
||||
for _, buildtask in ipairs(custombuildtask or {}) do
|
||||
local fcfg = { }
|
||||
fcfg.name = path.getrelative(prj.location,buildtask[1])
|
||||
fcfg.vpath = path.trimdots(fcfg.name)
|
||||
table.insert(files, fcfg)
|
||||
end
|
||||
end
|
||||
if #files > 0 then
|
||||
_p(1,'<ItemGroup>')
|
||||
local groupedBuildTasks = {}
|
||||
for _, custombuildtask in ipairs(prj.custombuildtask or {}) do
|
||||
for _, buildtask in ipairs(custombuildtask or {}) do
|
||||
if (groupedBuildTasks[buildtask[1]] == nil) then
|
||||
groupedBuildTasks[buildtask[1]] = {}
|
||||
end
|
||||
table.insert(groupedBuildTasks[buildtask[1]], buildtask)
|
||||
end
|
||||
end
|
||||
|
||||
for name, custombuildtask in pairs(groupedBuildTasks or {}) do
|
||||
_p(2,'<CustomBuild Include=\"%s\">', path.translate(path.getrelative(prj.location,name), "\\"))
|
||||
_p(3,'<FileType>Text</FileType>')
|
||||
local cmd = ""
|
||||
local outputs = ""
|
||||
for _, buildtask in ipairs(custombuildtask or {}) do
|
||||
for _, cmdline in ipairs(buildtask[4] or {}) do
|
||||
cmd = cmd .. cmdline
|
||||
local num = 1
|
||||
for _, depdata in ipairs(buildtask[3] or {}) do
|
||||
cmd = string.gsub(cmd,"%$%(" .. num .."%)", string.format("%s ",path.getrelative(prj.location,depdata)))
|
||||
num = num + 1
|
||||
end
|
||||
cmd = string.gsub(cmd, "%$%(<%)", string.format("%s ",path.getrelative(prj.location,buildtask[1])))
|
||||
cmd = string.gsub(cmd, "%$%(@%)", string.format("%s ",path.getrelative(prj.location,buildtask[2])))
|
||||
cmd = cmd .. "\r\n"
|
||||
end
|
||||
outputs = outputs .. path.getrelative(prj.location,buildtask[2]) .. ";"
|
||||
end
|
||||
_p(3,'<Command>%s</Command>',cmd)
|
||||
_p(3,'<Outputs>%s%%(Outputs)</Outputs>',outputs)
|
||||
_p(3,'<SubType>Designer</SubType>')
|
||||
_p(3,'<Message></Message>')
|
||||
_p(2,'</CustomBuild>')
|
||||
end
|
||||
_p(1,'</ItemGroup>')
|
||||
end
|
||||
end
|
||||
|
||||
function vc2010.simplefilesgroup(prj, section, subtype)
|
||||
local files = vc2010.getfilegroup(prj, section)
|
||||
if #files > 0 then
|
||||
|
@ -44,6 +44,32 @@
|
||||
end
|
||||
end
|
||||
|
||||
for _, custombuildtask in ipairs(prj.custombuildtask or {}) do
|
||||
for _, buildtask in ipairs(custombuildtask or {}) do
|
||||
local folders = string.explode(path.trimdots(path.getrelative(prj.location,buildtask[1])), "/", true)
|
||||
local path = ""
|
||||
for i = 1, #folders - 1 do
|
||||
-- element is only written if there *are* filters
|
||||
if not filterfound then
|
||||
filterfound = true
|
||||
_p(1,'<ItemGroup>')
|
||||
end
|
||||
|
||||
path = path .. folders[i]
|
||||
|
||||
-- have I seen this path before?
|
||||
if not filters[path] then
|
||||
filters[path] = true
|
||||
_p(2, '<Filter Include="%s">', path)
|
||||
_p(3, '<UniqueIdentifier>{%s}</UniqueIdentifier>', os.uuid())
|
||||
_p(2, '</Filter>')
|
||||
end
|
||||
|
||||
-- prepare for the next subfolder
|
||||
path = path .. "\\"
|
||||
end
|
||||
end
|
||||
end
|
||||
if filterfound then
|
||||
_p(1,'</ItemGroup>')
|
||||
end
|
||||
@ -57,7 +83,17 @@
|
||||
--
|
||||
|
||||
function vc2010.filefiltergroup(prj, section)
|
||||
local files = vc2010.getfilegroup(prj, section)
|
||||
local files = vc2010.getfilegroup(prj, section) or {}
|
||||
if (section == "CustomBuild") then
|
||||
for _, custombuildtask in ipairs(prj.custombuildtask or {}) do
|
||||
for _, buildtask in ipairs(custombuildtask or {}) do
|
||||
local fcfg = { }
|
||||
fcfg.name = path.getrelative(prj.location,buildtask[1])
|
||||
fcfg.vpath = path.trimdots(fcfg.name)
|
||||
table.insert(files, fcfg)
|
||||
end
|
||||
end
|
||||
end
|
||||
if #files > 0 then
|
||||
_p(1,'<ItemGroup>')
|
||||
for _, file in ipairs(files) do
|
||||
@ -93,5 +129,6 @@
|
||||
vc2010.filefiltergroup(prj, "ClInclude")
|
||||
vc2010.filefiltergroup(prj, "ClCompile")
|
||||
vc2010.filefiltergroup(prj, "ResourceCompile")
|
||||
vc2010.filefiltergroup(prj, "CustomBuild")
|
||||
_p('</Project>')
|
||||
end
|
||||
|
@ -114,7 +114,7 @@
|
||||
[".h"] = "sourcecode.cpp.h",
|
||||
[".html"] = "text.html",
|
||||
[".lua"] = "sourcecode.lua",
|
||||
[".m"] = "sourcecode.c.objc",
|
||||
[".m"] = "sourcecode.cpp.objc",
|
||||
[".mm"] = "sourcecode.cpp.objc",
|
||||
[".nib"] = "wrapper.nib",
|
||||
[".pch"] = "sourcecode.cpp.h",
|
||||
|
28
3rdparty/genie/src/base/api.lua
vendored
28
3rdparty/genie/src/base/api.lua
vendored
@ -66,6 +66,12 @@
|
||||
scope = "solution",
|
||||
},
|
||||
|
||||
custombuildtask =
|
||||
{
|
||||
kind = "table",
|
||||
scope = "config",
|
||||
},
|
||||
|
||||
debugargs =
|
||||
{
|
||||
kind = "list",
|
||||
@ -97,6 +103,12 @@
|
||||
usagecopy = true,
|
||||
},
|
||||
|
||||
dependency =
|
||||
{
|
||||
kind = "table",
|
||||
scope = "config",
|
||||
},
|
||||
|
||||
excludes =
|
||||
{
|
||||
kind = "filelist",
|
||||
@ -427,6 +439,12 @@
|
||||
scope = "config",
|
||||
},
|
||||
|
||||
postcompiletasks =
|
||||
{
|
||||
kind = "list",
|
||||
scope = "config",
|
||||
},
|
||||
|
||||
prelinkcommands =
|
||||
{
|
||||
kind = "list",
|
||||
@ -652,6 +670,14 @@
|
||||
|
||||
|
||||
|
||||
--
|
||||
-- Adds table value to array of tables
|
||||
--
|
||||
function premake.settable(obj, fieldname, value, allowed)
|
||||
obj[fieldname] = obj[fieldname] or {}
|
||||
table.insert(obj[fieldname], value)
|
||||
return obj[fieldname]
|
||||
end
|
||||
--
|
||||
-- Adds values to an array-of-directories field of a solution/project/configuration.
|
||||
-- `ctype` specifies the container type (see premake.getobject) for the field. All
|
||||
@ -789,6 +815,8 @@
|
||||
return premake.setstring(scope, name, value)
|
||||
elseif kind == "list" then
|
||||
return premake.setarray(container, name, value, allowed)
|
||||
elseif kind == "table" then
|
||||
return premake.settable(container, name, value, allowed)
|
||||
elseif kind == "dirlist" then
|
||||
return premake.setdirarray(container, name, value)
|
||||
elseif kind == "filelist" or kind == "absolutefilelist" then
|
||||
|
111
3rdparty/genie/src/host/scripts.c
vendored
111
3rdparty/genie/src/host/scripts.c
vendored
@ -80,22 +80,22 @@ const char* builtin_scripts[] = {
|
||||
"iles = cfg.removefiles\nif _ACTION == 'gmake' then\nremovefiles = table.join(removefiles, cfg.excludes)\nend\nlocal files = {}\nfor _, fname in ipairs(cfg.files) do\nif not table.icontains(removefiles, fname) then\ntable.insert(files, fname)\nend\nend\ncfg.files = files\nfor name, field in pairs(premake.fields) do\nif field.isflags then\nlocal values = cfg[name]\nfor _, flag in ipairs(values) do values[flag] = true end\nend\nend\ncfg.__fileconfigs = { }\nfor _, fname in ipairs(cfg.files) do\nlocal fcfg = { }\nfcfg.name = fname\ncfg.__fileconfigs[fname] = fcfg\ntable.insert(cfg.__fileconfigs, fcfg)\nend\nend\n",
|
||||
|
||||
/* base/api.lua */
|
||||
"premake.fields =\n{\narchivesplit_size =\n{\nkind = \"string\",\nscope = \"config\",\n},\nbasedir =\n{\nkind = \"path\",\nscope = \"container\",\n},\nbuildaction =\n{\nkind = \"string\",\nscope = \"config\",\nallowed = {\n\"Compile\",\n\"Copy\",\n\"Embed\",\n\"None\"\n}\n},\nbuildoptions =\n{\nkind = \"list\",\nscope = \"config\",\n},\nbuildoptions_c =\n{\nkind = \"list\",\nscope = \"config\",\n},\nbuildoptions_cpp =\n{\nkind = \"list\",\nscope = \"config\",\n},\nbuildoptions_objc =\n{\nkind = \"list\",\nscope = \"config\",\n},\nconfigurations =\n{\nkind = \"list\",\nscope = \"solution\",\n},\ndebugargs =\n{\nkind = \"list\",\nscope = \"config\",\n},\ndebugdir =\n{\nkind = \"path\",\nscope = \"config\",\n},\ndebugenvs =\n{\nkind = \"list\",\nscope = \"config\",\n},\ndefines =\n{\nkind = \"list\",\nscope = \"config\",\n},\ndeploymentoptions =\n{\nkind = \"list\",\nscope = \"config\",\nusagecopy = true,\n},\nexcludes =\n{\nkind = \"filelist\",\nscope = \"config\",\n},\nfiles =\n{\nkind = \"filelist"
|
||||
"\",\nscope = \"config\",\n},\nremovefiles =\n{\nkind = \"filelist\",\nscope = \"config\",\n},\nflags =\n{\nkind = \"list\",\nscope = \"config\",\nisflags = true,\nusagecopy = true,\nallowed = function(value)\nlocal allowed_flags = {\nATL = 1,\nDebugEnvsDontMerge = 1,\nDebugEnvsInherit = 1,\nEnableMinimalRebuild = 1,\nEnableSSE = 1,\nEnableSSE2 = 1,\nExtraWarnings = 1,\nFatalWarnings = 1,\nFloatFast = 1,\nFloatStrict = 1,\nManaged = 1,\nMFC = 1,\nNativeWChar = 1,\nNo64BitChecks = 1,\nNoEditAndContinue = 1,\nNoExceptions = 1,\nNoFramePointer = 1,\nNoImportLib = 1,\nNoIncrementalLink = 1,\nNoManifest = 1,\nNoMultiProcessorCompilation = 1,\nNoNativeWChar = 1,\nNoPCH = 1,\nNoRTTI = 1,\nSingleOutputDir = 1,\nOptimize = 1,\nOptimizeSize = 1,\nOptimizeSpeed = 1,\nSEH = 1,\nStaticATL = 1,\nStaticRuntime = 1,\nSymbols = 1,\nUnicode = 1,\nUnsafe = 1,\nUnsignedChar = 1,\nWinMain = 1,\n}\nlocal englishToAmericanSpelling =\n{\noptimise = 'optimize',\noptimisesize = 'optimizesize',\noptimisespeed = 'optimizespeed',\n}\nloc"
|
||||
"al lowervalue = value:lower()\nlowervalue = englishToAmericanSpelling[lowervalue] or lowervalue\nfor v, _ in pairs(allowed_flags) do\nif v:lower() == lowervalue then\nreturn v\nend\nend\nreturn nil, \"invalid flag\"\nend,\n},\nframework =\n{\nkind = \"string\",\nscope = \"container\",\nallowed = {\n\"1.0\",\n\"1.1\",\n\"2.0\",\n\"3.0\",\n\"3.5\",\n\"4.0\",\n\"4.5\",\n}\n},\nforcedincludes =\n{\nkind = \"absolutefilelist\",\nscope = \"config\",\n},\nimagepath =\n{\nkind = \"path\",\nscope = \"config\",\n},\nimageoptions =\n{\nkind = \"list\",\nscope = \"config\",\n},\nimplibdir =\n{\nkind = \"path\",\nscope = \"config\",\n},\nimplibextension =\n{\nkind = \"string\",\nscope = \"config\",\n},\nimplibname =\n{\nkind = \"string\",\nscope = \"config\",\n},\nimplibprefix =\n{\nkind = \"string\",\nscope = \"config\",\n},\nimplibsuffix =\n{\nkind = \"string\",\nscope = \"config\",\n},\nincludedirs =\n{\nkind = \"dirlist\",\nscope = \"config\",\nusagecopy = true,\n},\nkind =\n{\nkind = \"string\",\nscope = \"co"
|
||||
"nfig\",\nallowed = {\n\"ConsoleApp\",\n\"WindowedApp\",\n\"StaticLib\",\n\"SharedLib\"\n}\n},\nlanguage =\n{\nkind = \"string\",\nscope = \"container\",\nallowed = {\n\"C\",\n\"C++\",\n\"C#\"\n}\n},\nlibdirs =\n{\nkind = \"dirlist\",\nscope = \"config\",\nlinkagecopy = true,\n},\nlinkoptions =\n{\nkind = \"list\",\nscope = \"config\",\n},\nlinks =\n{\nkind = \"list\",\nscope = \"config\",\nallowed = function(value)\nif value:find('/', nil, true) then\nvalue = path.getabsolute(value)\nend\nreturn value\nend,\nlinkagecopy = true,\n},\nlocation =\n{\nkind = \"path\",\nscope = \"container\",\n},\nmakesettings =\n{\nkind = \"list\",\nscope = \"config\",\n},\nmessageskip =\n{\nkind = \"list\",\nscope = \"solution\",\nisflags = true,\nusagecopy = true,\nallowed = function(value)\nlocal allowed_messages = {\nSkipCreatingMessage = 1,\nSkipBuildingMessage = 1,\nSkipCleaningMessage = 1,\n}\nlocal lowervalue = value:lower()\nfor v, _ in pairs(allowed_messages) do\nif v:lower() == lowervalue then\nreturn v\nend\nend"
|
||||
"\nreturn nil, \"invalid message to skip\"\nend,\n},\nmsgarchiving =\n{\nkind = \"string\",\nscope = \"config\",\n},\nmsgcompile =\n{\nkind = \"string\",\nscope = \"config\",\n},\nmsgcompile_objc =\n{\nkind = \"string\",\nscope = \"config\",\n},\nmsgresource =\n{\nkind = \"string\",\nscope = \"config\",\n},\nmsglinking =\n{\nkind = \"string\",\nscope = \"config\",\n},\nobjdir =\n{\nkind = \"path\",\nscope = \"config\",\n},\noptions =\n{\nkind = \"list\",\nscope = \"container\",\nisflags = true,\nusagecopy = true,\nallowed = function(value)\nlocal allowed_options = {\nForceCPP = 1,\nArchiveSplit = 1\n}\nlocal lowervalue = value:lower()\nfor v, _ in pairs(allowed_options) do\nif v:lower() == lowervalue then\nreturn v\nend\nend\nreturn nil, \"invalid option\"\nend,\n},\npchheader =\n{\nkind = \"string\",\nscope = \"config\",\n},\npchsource =\n{\nkind = \"path\",\nscope = \"config\",\n},\nplatforms =\n{\nkind = \"list\",\nscope = \"solution\",\nallowed = table.keys(premake.platforms),\n},\npostbuildcomman"
|
||||
"ds =\n{\nkind = \"list\",\nscope = \"config\",\n},\nprebuildcommands =\n{\nkind = \"list\",\nscope = \"config\",\n},\nprelinkcommands =\n{\nkind = \"list\",\nscope = \"config\",\n},\nresdefines =\n{\nkind = \"list\",\nscope = \"config\",\n},\nresincludedirs =\n{\nkind = \"dirlist\",\nscope = \"config\",\n},\nresoptions =\n{\nkind = \"list\",\nscope = \"config\",\n},\nstartproject =\n{\nkind = \"string\",\nscope = \"solution\",\n},\ntargetdir =\n{\nkind = \"path\",\nscope = \"config\",\n},\ntargetsubdir =\n{\nkind = \"string\",\nscope = \"config\",\n},\ntargetextension =\n{\nkind = \"string\",\nscope = \"config\",\n},\ntargetname =\n{\nkind = \"string\",\nscope = \"config\",\n},\ntargetprefix =\n{\nkind = \"string\",\nscope = \"config\",\n},\ntargetsuffix =\n{\nkind = \"string\",\nscope = \"config\",\n},\ntrimpaths =\n{\nkind = \"dirlist\",\nscope = \"config\",\n},\nuuid =\n{\nkind = \"string\",\nscope = \"container\",\nallowed = function(value)\nlocal ok = true\nif (#value ~= 36) then ok = false "
|
||||
"end\nfor i=1,36 do\nlocal ch = value:sub(i,i)\nif (not ch:find(\"[ABCDEFabcdef0123456789-]\")) then ok = false end\nend\nif (value:sub(9,9) ~= \"-\") then ok = false end\nif (value:sub(14,14) ~= \"-\") then ok = false end\nif (value:sub(19,19) ~= \"-\") then ok = false end\nif (value:sub(24,24) ~= \"-\") then ok = false end\nif (not ok) then\nreturn nil, \"invalid UUID\"\nend\nreturn value:upper()\nend\n},\nuses =\n{\nkind = \"list\",\nscope = \"config\",\n},\nvpaths =\n{\nkind = \"keypath\",\nscope = \"container\",\n},\n}\npremake.check_paths = false\nfunction premake.checkvalue(value, allowed)\nif (allowed) then\nif (type(allowed) == \"function\") then\nreturn allowed(value)\nelse\nfor _,v in ipairs(allowed) do\nif (value:lower() == v:lower()) then\nreturn v\nend\nend\nreturn nil, \"invalid value '\" .. value .. \"'\"\nend\nelse\nreturn value\nend\nend\nfunction premake.getobject(t)\nlocal container\nif (t == \"container\" or t == \"solution\") then\ncontainer = premake.CurrentContainer\nelse\ncontainer ="
|
||||
" premake.CurrentConfiguration\nend\nif t == \"solution\" then\nif type(container) == \"project\" then\ncontainer = container.solution\nend\nif type(container) ~= \"solution\" then\ncontainer = nil\nend\nend\nlocal msg\nif (not container) then\nif (t == \"container\") then\nmsg = \"no active solution or project\"\nelseif (t == \"solution\") then\nmsg = \"no active solution\"\nelse\nmsg = \"no active solution, project, or configuration\"\nend\nend\nreturn container, msg\nend\nfunction premake.setarray(obj, fieldname, value, allowed)\nobj[fieldname] = obj[fieldname] or {}\nlocal function add(value, depth)\nif type(value) == \"table\" then\nfor _,v in ipairs(value) do\nadd(v, depth + 1)\nend\nelse\nvalue, err = premake.checkvalue(value, allowed)\nif not value then\nerror(err, depth)\nend\ntable.insert(obj[fieldname], value)\nend\nend\nif value then\nadd(value, 5)\nend\nreturn obj[fieldname]\nend\nlocal function domatchedarray(ctype, fieldname, value, matchfunc)\nlocal result = { }\nfunction makeabsolute(value, dep"
|
||||
"th)\nif (type(value) == \"table\") then\nfor _, item in ipairs(value) do\nmakeabsolute(item, depth + 1)\nend\nelseif type(value) == \"string\" then\nif value:find(\"*\") then\nlocal arr = matchfunc(value);\nif (premake.check_paths) and (#arr == 0) then\nerror(\"Can't find matching files for pattern :\" .. value)\nend\nmakeabsolute(arr, depth + 1)\nelse\ntable.insert(result, path.getabsolute(value))\nend\nelse\nerror(\"Invalid value in list: expected string, got \" .. type(value), depth)\nend\nend\nmakeabsolute(value, 3)\nreturn premake.setarray(ctype, fieldname, result)\nend\nfunction premake.setdirarray(ctype, fieldname, value)\nreturn domatchedarray(ctype, fieldname, value, os.matchdirs)\nend\nfunction premake.setfilearray(ctype, fieldname, value)\nreturn domatchedarray(ctype, fieldname, value, os.matchfiles)\nend\nfunction premake.setkeyvalue(ctype, fieldname, values)\nlocal container, err = premake.getobject(ctype)\nif not container then\nerror(err, 4)\nend\nif not container[fieldname] then\ncontainer[fiel"
|
||||
"dname] = {}\nend\nif type(values) ~= \"table\" then\nerror(\"invalid value; table expected\", 4)\nend\nlocal field = container[fieldname]\nfor key,value in pairs(values) do\nif not field[key] then\nfield[key] = {}\nend\ntable.insertflat(field[key], value)\nend\nreturn field\nend\nfunction premake.setstring(ctype, fieldname, value, allowed)\nlocal container, err = premake.getobject(ctype)\nif (not container) then\nerror(err, 4)\nend\nif (value) then\nvalue, err = premake.checkvalue(value, allowed)\nif (not value) then\nerror(err, 4)\nend\ncontainer[fieldname] = value\nend\nreturn container[fieldname]\nend\nfunction premake.remove(fieldname, value)\nlocal cfg = premake.CurrentConfiguration\ncfg.removes = cfg.removes or {}\ncfg.removes[fieldname] = premake.setarray(cfg.removes, fieldname, value)\nend\nlocal function accessor(name, value)\nlocal kind = premake.fields[name].kind\nlocal scope = premake.fields[name].scope\nlocal allowed = premake.fields[name].allowed\nif (kind == \"string\" or kind == \"path\") "
|
||||
"and value then\nif type(value) ~= \"string\" then\nerror(\"string value expected\", 3)\nend\nend\nlocal container, err = premake.getobject(scope)\nif (not container) then\nerror(err, 3)\nend\nif kind == \"string\" then\nreturn premake.setstring(scope, name, value, allowed)\nelseif kind == \"path\" then\nif value then value = path.getabsolute(value) end\nreturn premake.setstring(scope, name, value)\nelseif kind == \"list\" then\nreturn premake.setarray(container, name, value, allowed)\nelseif kind == \"dirlist\" then\nreturn premake.setdirarray(container, name, value)\nelseif kind == \"filelist\" or kind == \"absolutefilelist\" then\nreturn premake.setfilearray(container, name, value)\nelseif kind == \"keyvalue\" or kind == \"keypath\" then\nreturn premake.setkeyvalue(scope, name, value)\nend\nend\nfor name, info in pairs(premake.fields) do\n_G[name] = function(value)\nreturn accessor(name, value)\nend\nif info.kind == \"list\"\nor info.kind == \"dirlist\"\nor info.kind == \"filelist\"\nor info.kind == \"absolu"
|
||||
"tefilelist\"\nthen\nif name ~= \"removefiles\"\nand name ~= \"files\" then\n_G[\"remove\"..name] = function(value)\npremake.remove(name, value)\nend\nend\nend\nend\nfunction configuration(terms)\nif not terms then\nreturn premake.CurrentConfiguration\nend\nlocal container, err = premake.getobject(\"container\")\nif (not container) then\nerror(err, 2)\nend\nlocal cfg = { }\ncfg.terms = table.flatten({terms})\ntable.insert(container.blocks, cfg)\npremake.CurrentConfiguration = cfg\ncfg.keywords = { }\nfor _, word in ipairs(cfg.terms) do\ntable.insert(cfg.keywords, path.wildcards(word):lower())\nend\nfor name, field in pairs(premake.fields) do\nif (field.kind ~= \"string\" and field.kind ~= \"path\") then\ncfg[name] = { }\nend\nend\nreturn cfg\nend\nlocal function creategroup(name, sln, parent, inpath)\nlocal group = {}\nsetmetatable(group, {\n__type = \"group\"\n})\ntable.insert(sln.groups, group)\nsln.groups[inpath] = group\ngroup.solution = sln\ngroup.name = name\ngroup.uuid = os.uuid(group.name)\ngroup.paren"
|
||||
"t = parent\nreturn group\nend\nlocal function creategroupsfrompath(inpath, sln)\nif inpath == nil then return nil end\ninpath = path.translate(inpath, \"/\")\nlocal groups = string.explode(inpath, \"/\")\nlocal curpath = \"\"\nlocal lastgroup = nil\nfor i, v in ipairs(groups) do\ncurpath = curpath .. \"/\" .. v:lower()\nlocal group = sln.groups[curpath]\nif group == nil then\ngroup = creategroup(v, sln, lastgroup, curpath)\nend\nlastgroup = group\nend\nreturn lastgroup\nend\nlocal function createproject(name, sln, isUsage)\nlocal prj = {}\nsetmetatable(prj, {\n__type = \"project\",\n})\ntable.insert(sln.projects, prj)\nif(isUsage) then\nif(sln.projects[name]) then\nsln.projects[name].usageProj = prj;\nelse\nsln.projects[name] = prj\nend\nelse\nif(sln.projects[name]) then\nprj.usageProj = sln.projects[name];\nend\nsln.projects[name] = prj\nend\nlocal group = creategroupsfrompath(premake.CurrentGroup, sln)\nprj.solution = sln\nprj.name = name\nprj.basedir = os.getcwd()\nprj.uuid "
|
||||
"= os.uuid(prj.name)\nprj.blocks = { }\nprj.usage = isUsage\nprj.group = group\nreturn prj;\nend\nfunction usage(name)\nif (not name) then\nif(type(premake.CurrentContainer) ~= \"project\") then return nil end\nif(not premake.CurrentContainer.usage) then return nil end\nreturn premake.CurrentContainer\nend\nlocal sln\nif (type(premake.CurrentContainer) == \"project\") then\nsln = premake.CurrentContainer.solution\nelse\nsln = premake.CurrentContainer\nend\nif (type(sln) ~= \"solution\") then\nerror(\"no active solution\", 2)\nend\nif((not sln.projects[name]) or\n((not sln.projects[name].usage) and (not sln.projects[name].usageProj))) then\npremake.CurrentContainer = createproject(name, sln, true)\nelse\npremake.CurrentContainer = iff(sln.projects[name].usage,\nsln.projects[name], sln.projects[name].usageProj)\nend\nconfiguration { }\nreturn premake.CurrentContainer\nend\nfunction project(name)\nif (not name) then\nif(type(premake.CurrentContainer) ~= \"project\") then return nil end\ni"
|
||||
"f(premake.CurrentContainer.usage) then return nil end\nreturn premake.CurrentContainer\nend\nlocal sln\nif (type(premake.CurrentContainer) == \"project\") then\nsln = premake.CurrentContainer.solution\nelse\nsln = premake.CurrentContainer\nend\nif (type(sln) ~= \"solution\") then\nerror(\"no active solution\", 2)\nend\nif((not sln.projects[name]) or sln.projects[name].usage) then\npremake.CurrentContainer = createproject(name, sln)\nelse\npremake.CurrentContainer = sln.projects[name];\nend\nconfiguration { }\nreturn premake.CurrentContainer\nend\nfunction solution(name)\nif not name then\nif type(premake.CurrentContainer) == \"project\" then\nreturn premake.CurrentContainer.solution\nelse\nreturn premake.CurrentContainer\nend\nend\npremake.CurrentContainer = premake.solution.get(name)\nif (not premake.CurrentContainer) then\npremake.CurrentContainer = premake.solution.new(name)\nend\nconfiguration { }\nreturn premake.CurrentContainer\nend\nfunction group(name)\nif not name then\nreturn premake.CurrentGroup\nen"
|
||||
"d\npremake.CurrentGroup = name\nreturn premake.CurrentGroup\nend\nfunction newaction(a)\npremake.action.add(a)\nend\nfunction newoption(opt)\npremake.option.add(opt)\nend\n",
|
||||
"premake.fields =\n{\narchivesplit_size =\n{\nkind = \"string\",\nscope = \"config\",\n},\nbasedir =\n{\nkind = \"path\",\nscope = \"container\",\n},\nbuildaction =\n{\nkind = \"string\",\nscope = \"config\",\nallowed = {\n\"Compile\",\n\"Copy\",\n\"Embed\",\n\"None\"\n}\n},\nbuildoptions =\n{\nkind = \"list\",\nscope = \"config\",\n},\nbuildoptions_c =\n{\nkind = \"list\",\nscope = \"config\",\n},\nbuildoptions_cpp =\n{\nkind = \"list\",\nscope = \"config\",\n},\nbuildoptions_objc =\n{\nkind = \"list\",\nscope = \"config\",\n},\nconfigurations =\n{\nkind = \"list\",\nscope = \"solution\",\n},\ncustombuildtask =\n{\nkind = \"table\",\nscope = \"config\",\n},\ndebugargs =\n{\nkind = \"list\",\nscope = \"config\",\n},\ndebugdir =\n{\nkind = \"path\",\nscope = \"config\",\n},\ndebugenvs =\n{\nkind = \"list\",\nscope = \"config\",\n},\ndefines =\n{\nkind = \"list\",\nscope = \"config\",\n},\ndeploymentoptions =\n{\nkind = \"list\",\nscope = \"config\",\nusagecopy = true,\n},\ndependency =\n{\nkind = \""
|
||||
"table\",\nscope = \"config\",\n},\nexcludes =\n{\nkind = \"filelist\",\nscope = \"config\",\n},\nfiles =\n{\nkind = \"filelist\",\nscope = \"config\",\n},\nremovefiles =\n{\nkind = \"filelist\",\nscope = \"config\",\n},\nflags =\n{\nkind = \"list\",\nscope = \"config\",\nisflags = true,\nusagecopy = true,\nallowed = function(value)\nlocal allowed_flags = {\nATL = 1,\nDebugEnvsDontMerge = 1,\nDebugEnvsInherit = 1,\nEnableMinimalRebuild = 1,\nEnableSSE = 1,\nEnableSSE2 = 1,\nExtraWarnings = 1,\nFatalWarnings = 1,\nFloatFast = 1,\nFloatStrict = 1,\nManaged = 1,\nMFC = 1,\nNativeWChar = 1,\nNo64BitChecks = 1,\nNoEditAndContinue = 1,\nNoExceptions = 1,\nNoFramePointer = 1,\nNoImportLib = 1,\nNoIncrementalLink = 1,\nNoManifest = 1,\nNoMultiProcessorCompilation = 1,\nNoNativeWChar = 1,\nNoPCH = 1,\nNoRTTI = 1,\nSingleOutputDir = 1,\nOptimize = 1,\nOptimizeSize = 1,\nOptimizeSpeed = 1,\nSEH = 1,\nStaticATL = 1,\nStaticRuntime = 1,\nSymbols = 1,\nUnicode = 1,\nUnsafe = 1,\nUnsignedChar = 1,\nWinMain = 1,\n}\nlocal "
|
||||
"englishToAmericanSpelling =\n{\noptimise = 'optimize',\noptimisesize = 'optimizesize',\noptimisespeed = 'optimizespeed',\n}\nlocal lowervalue = value:lower()\nlowervalue = englishToAmericanSpelling[lowervalue] or lowervalue\nfor v, _ in pairs(allowed_flags) do\nif v:lower() == lowervalue then\nreturn v\nend\nend\nreturn nil, \"invalid flag\"\nend,\n},\nframework =\n{\nkind = \"string\",\nscope = \"container\",\nallowed = {\n\"1.0\",\n\"1.1\",\n\"2.0\",\n\"3.0\",\n\"3.5\",\n\"4.0\",\n\"4.5\",\n}\n},\nforcedincludes =\n{\nkind = \"absolutefilelist\",\nscope = \"config\",\n},\nimagepath =\n{\nkind = \"path\",\nscope = \"config\",\n},\nimageoptions =\n{\nkind = \"list\",\nscope = \"config\",\n},\nimplibdir =\n{\nkind = \"path\",\nscope = \"config\",\n},\nimplibextension =\n{\nkind = \"string\",\nscope = \"config\",\n},\nimplibname =\n{\nkind = \"string\",\nscope = \"config\",\n},\nimplibprefix =\n{\nkind = \"string\",\nscope = \"config\",\n},\nimplibsuffix =\n{\nkind = \"string\",\nscope = \"config\",\n},\n"
|
||||
"includedirs =\n{\nkind = \"dirlist\",\nscope = \"config\",\nusagecopy = true,\n},\nkind =\n{\nkind = \"string\",\nscope = \"config\",\nallowed = {\n\"ConsoleApp\",\n\"WindowedApp\",\n\"StaticLib\",\n\"SharedLib\"\n}\n},\nlanguage =\n{\nkind = \"string\",\nscope = \"container\",\nallowed = {\n\"C\",\n\"C++\",\n\"C#\"\n}\n},\nlibdirs =\n{\nkind = \"dirlist\",\nscope = \"config\",\nlinkagecopy = true,\n},\nlinkoptions =\n{\nkind = \"list\",\nscope = \"config\",\n},\nlinks =\n{\nkind = \"list\",\nscope = \"config\",\nallowed = function(value)\nif value:find('/', nil, true) then\nvalue = path.getabsolute(value)\nend\nreturn value\nend,\nlinkagecopy = true,\n},\nlocation =\n{\nkind = \"path\",\nscope = \"container\",\n},\nmakesettings =\n{\nkind = \"list\",\nscope = \"config\",\n},\nmessageskip =\n{\nkind = \"list\",\nscope = \"solution\",\nisflags = true,\nusagecopy = true,\nallowed = function(value)\nlocal allowed_messages = {\nSkipCreatingMessage = 1,\nSkipBuildingMessage = 1,\nSkipCleaningMessage = 1,\n}"
|
||||
"\nlocal lowervalue = value:lower()\nfor v, _ in pairs(allowed_messages) do\nif v:lower() == lowervalue then\nreturn v\nend\nend\nreturn nil, \"invalid message to skip\"\nend,\n},\nmsgarchiving =\n{\nkind = \"string\",\nscope = \"config\",\n},\nmsgcompile =\n{\nkind = \"string\",\nscope = \"config\",\n},\nmsgcompile_objc =\n{\nkind = \"string\",\nscope = \"config\",\n},\nmsgresource =\n{\nkind = \"string\",\nscope = \"config\",\n},\nmsglinking =\n{\nkind = \"string\",\nscope = \"config\",\n},\nobjdir =\n{\nkind = \"path\",\nscope = \"config\",\n},\noptions =\n{\nkind = \"list\",\nscope = \"container\",\nisflags = true,\nusagecopy = true,\nallowed = function(value)\nlocal allowed_options = {\nForceCPP = 1,\nArchiveSplit = 1\n}\nlocal lowervalue = value:lower()\nfor v, _ in pairs(allowed_options) do\nif v:lower() == lowervalue then\nreturn v\nend\nend\nreturn nil, \"invalid option\"\nend,\n},\npchheader =\n{\nkind = \"string\",\nscope = \"config\",\n},\npchsource =\n{\nkind = \"path\",\nscope = \"config"
|
||||
"\",\n},\nplatforms =\n{\nkind = \"list\",\nscope = \"solution\",\nallowed = table.keys(premake.platforms),\n},\npostbuildcommands =\n{\nkind = \"list\",\nscope = \"config\",\n},\nprebuildcommands =\n{\nkind = \"list\",\nscope = \"config\",\n},\npostcompiletasks =\n{\nkind = \"list\",\nscope = \"config\",\n},\nprelinkcommands =\n{\nkind = \"list\",\nscope = \"config\",\n},\nresdefines =\n{\nkind = \"list\",\nscope = \"config\",\n},\nresincludedirs =\n{\nkind = \"dirlist\",\nscope = \"config\",\n},\nresoptions =\n{\nkind = \"list\",\nscope = \"config\",\n},\nstartproject =\n{\nkind = \"string\",\nscope = \"solution\",\n},\ntargetdir =\n{\nkind = \"path\",\nscope = \"config\",\n},\ntargetsubdir =\n{\nkind = \"string\",\nscope = \"config\",\n},\ntargetextension =\n{\nkind = \"string\",\nscope = \"config\",\n},\ntargetname =\n{\nkind = \"string\",\nscope = \"config\",\n},\ntargetprefix =\n{\nkind = \"string\",\nscope = \"config\",\n},\ntargetsuffix =\n{\nkind = \"string\",\nscope = \"config\",\n},\nt"
|
||||
"rimpaths =\n{\nkind = \"dirlist\",\nscope = \"config\",\n},\nuuid =\n{\nkind = \"string\",\nscope = \"container\",\nallowed = function(value)\nlocal ok = true\nif (#value ~= 36) then ok = false end\nfor i=1,36 do\nlocal ch = value:sub(i,i)\nif (not ch:find(\"[ABCDEFabcdef0123456789-]\")) then ok = false end\nend\nif (value:sub(9,9) ~= \"-\") then ok = false end\nif (value:sub(14,14) ~= \"-\") then ok = false end\nif (value:sub(19,19) ~= \"-\") then ok = false end\nif (value:sub(24,24) ~= \"-\") then ok = false end\nif (not ok) then\nreturn nil, \"invalid UUID\"\nend\nreturn value:upper()\nend\n},\nuses =\n{\nkind = \"list\",\nscope = \"config\",\n},\nvpaths =\n{\nkind = \"keypath\",\nscope = \"container\",\n},\n}\npremake.check_paths = false\nfunction premake.checkvalue(value, allowed)\nif (allowed) then\nif (type(allowed) == \"function\") then\nreturn allowed(value)\nelse\nfor _,v in ipairs(allowed) do\nif (value:lower() == v:lower()) then\nreturn v\nend\nend\nreturn nil, \"invalid value '\" .. value .. "
|
||||
"\"'\"\nend\nelse\nreturn value\nend\nend\nfunction premake.getobject(t)\nlocal container\nif (t == \"container\" or t == \"solution\") then\ncontainer = premake.CurrentContainer\nelse\ncontainer = premake.CurrentConfiguration\nend\nif t == \"solution\" then\nif type(container) == \"project\" then\ncontainer = container.solution\nend\nif type(container) ~= \"solution\" then\ncontainer = nil\nend\nend\nlocal msg\nif (not container) then\nif (t == \"container\") then\nmsg = \"no active solution or project\"\nelseif (t == \"solution\") then\nmsg = \"no active solution\"\nelse\nmsg = \"no active solution, project, or configuration\"\nend\nend\nreturn container, msg\nend\nfunction premake.setarray(obj, fieldname, value, allowed)\nobj[fieldname] = obj[fieldname] or {}\nlocal function add(value, depth)\nif type(value) == \"table\" then\nfor _,v in ipairs(value) do\nadd(v, depth + 1)\nend\nelse\nvalue, err = premake.checkvalue(value, allowed)\nif not value then\nerror(err, depth)\nend\ntable.insert(obj[fieldname], valu"
|
||||
"e)\nend\nend\nif value then\nadd(value, 5)\nend\nreturn obj[fieldname]\nend\nfunction premake.settable(obj, fieldname, value, allowed)\nobj[fieldname] = obj[fieldname] or {}\ntable.insert(obj[fieldname], value)\nreturn obj[fieldname]\nend\nlocal function domatchedarray(ctype, fieldname, value, matchfunc)\nlocal result = { }\nfunction makeabsolute(value, depth)\nif (type(value) == \"table\") then\nfor _, item in ipairs(value) do\nmakeabsolute(item, depth + 1)\nend\nelseif type(value) == \"string\" then\nif value:find(\"*\") then\nlocal arr = matchfunc(value);\nif (premake.check_paths) and (#arr == 0) then\nerror(\"Can't find matching files for pattern :\" .. value)\nend\nmakeabsolute(arr, depth + 1)\nelse\ntable.insert(result, path.getabsolute(value))\nend\nelse\nerror(\"Invalid value in list: expected string, got \" .. type(value), depth)\nend\nend\nmakeabsolute(value, 3)\nreturn premake.setarray(ctype, fieldname, result)\nend\nfunction premake.setdirarray(ctype, fieldname, value)\nreturn domatchedarray(ctype,"
|
||||
" fieldname, value, os.matchdirs)\nend\nfunction premake.setfilearray(ctype, fieldname, value)\nreturn domatchedarray(ctype, fieldname, value, os.matchfiles)\nend\nfunction premake.setkeyvalue(ctype, fieldname, values)\nlocal container, err = premake.getobject(ctype)\nif not container then\nerror(err, 4)\nend\nif not container[fieldname] then\ncontainer[fieldname] = {}\nend\nif type(values) ~= \"table\" then\nerror(\"invalid value; table expected\", 4)\nend\nlocal field = container[fieldname]\nfor key,value in pairs(values) do\nif not field[key] then\nfield[key] = {}\nend\ntable.insertflat(field[key], value)\nend\nreturn field\nend\nfunction premake.setstring(ctype, fieldname, value, allowed)\nlocal container, err = premake.getobject(ctype)\nif (not container) then\nerror(err, 4)\nend\nif (value) then\nvalue, err = premake.checkvalue(value, allowed)\nif (not value) then\nerror(err, 4)\nend\ncontainer[fieldname] = value\nend\nreturn container[fieldname]\nend\nfunction premake.remove(fieldname, value)\nlocal cfg "
|
||||
"= premake.CurrentConfiguration\ncfg.removes = cfg.removes or {}\ncfg.removes[fieldname] = premake.setarray(cfg.removes, fieldname, value)\nend\nlocal function accessor(name, value)\nlocal kind = premake.fields[name].kind\nlocal scope = premake.fields[name].scope\nlocal allowed = premake.fields[name].allowed\nif (kind == \"string\" or kind == \"path\") and value then\nif type(value) ~= \"string\" then\nerror(\"string value expected\", 3)\nend\nend\nlocal container, err = premake.getobject(scope)\nif (not container) then\nerror(err, 3)\nend\nif kind == \"string\" then\nreturn premake.setstring(scope, name, value, allowed)\nelseif kind == \"path\" then\nif value then value = path.getabsolute(value) end\nreturn premake.setstring(scope, name, value)\nelseif kind == \"list\" then\nreturn premake.setarray(container, name, value, allowed)\nelseif kind == \"table\" then\nreturn premake.settable(container, name, value, allowed)\nelseif kind == \"dirlist\" then\nreturn premake.setdirarray(container, name, value)\nel"
|
||||
"seif kind == \"filelist\" or kind == \"absolutefilelist\" then\nreturn premake.setfilearray(container, name, value)\nelseif kind == \"keyvalue\" or kind == \"keypath\" then\nreturn premake.setkeyvalue(scope, name, value)\nend\nend\nfor name, info in pairs(premake.fields) do\n_G[name] = function(value)\nreturn accessor(name, value)\nend\nif info.kind == \"list\"\nor info.kind == \"dirlist\"\nor info.kind == \"filelist\"\nor info.kind == \"absolutefilelist\"\nthen\nif name ~= \"removefiles\"\nand name ~= \"files\" then\n_G[\"remove\"..name] = function(value)\npremake.remove(name, value)\nend\nend\nend\nend\nfunction configuration(terms)\nif not terms then\nreturn premake.CurrentConfiguration\nend\nlocal container, err = premake.getobject(\"container\")\nif (not container) then\nerror(err, 2)\nend\nlocal cfg = { }\ncfg.terms = table.flatten({terms})\ntable.insert(container.blocks, cfg)\npremake.CurrentConfiguration = cfg\ncfg.keywords = { }\nfor _, word in ipairs(cfg.terms) do\ntable.insert(cfg.keywords, path.wi"
|
||||
"ldcards(word):lower())\nend\nfor name, field in pairs(premake.fields) do\nif (field.kind ~= \"string\" and field.kind ~= \"path\") then\ncfg[name] = { }\nend\nend\nreturn cfg\nend\nlocal function creategroup(name, sln, parent, inpath)\nlocal group = {}\nsetmetatable(group, {\n__type = \"group\"\n})\ntable.insert(sln.groups, group)\nsln.groups[inpath] = group\ngroup.solution = sln\ngroup.name = name\ngroup.uuid = os.uuid(group.name)\ngroup.parent = parent\nreturn group\nend\nlocal function creategroupsfrompath(inpath, sln)\nif inpath == nil then return nil end\ninpath = path.translate(inpath, \"/\")\nlocal groups = string.explode(inpath, \"/\")\nlocal curpath = \"\"\nlocal lastgroup = nil\nfor i, v in ipairs(groups) do\ncurpath = curpath .. \"/\" .. v:lower()\nlocal group = sln.groups[curpath]\nif group == nil then\ngroup = creategroup(v, sln, lastgroup, curpath)\nend\nlastgroup = group\nend\nreturn lastgroup\nend\nlocal function createproject(name, sln, isUsage)\nlocal prj = {}\nsetmetatable(prj, {\n__type = "
|
||||
"\"project\",\n})\ntable.insert(sln.projects, prj)\nif(isUsage) then\nif(sln.projects[name]) then\nsln.projects[name].usageProj = prj;\nelse\nsln.projects[name] = prj\nend\nelse\nif(sln.projects[name]) then\nprj.usageProj = sln.projects[name];\nend\nsln.projects[name] = prj\nend\nlocal group = creategroupsfrompath(premake.CurrentGroup, sln)\nprj.solution = sln\nprj.name = name\nprj.basedir = os.getcwd()\nprj.uuid = os.uuid(prj.name)\nprj.blocks = { }\nprj.usage = isUsage\nprj.group = group\nreturn prj;\nend\nfunction usage(name)\nif (not name) then\nif(type(premake.CurrentContainer) ~= \"project\") then return nil end\nif(not premake.CurrentContainer.usage) then return nil end\nreturn premake.CurrentContainer\nend\nlocal sln\nif (type(premake.CurrentContainer) == \"project\") then\nsln = premake.CurrentContainer.solution\nelse\nsln = premake.CurrentContainer\nend\nif (type(sln) ~= \"solution\") then\nerror(\"no active solution\", 2)\nend\nif((not sln.pr"
|
||||
"ojects[name]) or\n((not sln.projects[name].usage) and (not sln.projects[name].usageProj))) then\npremake.CurrentContainer = createproject(name, sln, true)\nelse\npremake.CurrentContainer = iff(sln.projects[name].usage,\nsln.projects[name], sln.projects[name].usageProj)\nend\nconfiguration { }\nreturn premake.CurrentContainer\nend\nfunction project(name)\nif (not name) then\nif(type(premake.CurrentContainer) ~= \"project\") then return nil end\nif(premake.CurrentContainer.usage) then return nil end\nreturn premake.CurrentContainer\nend\nlocal sln\nif (type(premake.CurrentContainer) == \"project\") then\nsln = premake.CurrentContainer.solution\nelse\nsln = premake.CurrentContainer\nend\nif (type(sln) ~= \"solution\") then\nerror(\"no active solution\", 2)\nend\nif((not sln.projects[name]) or sln.projects[name].usage) then\npremake.CurrentContainer = createproject(name, sln)\nelse\npremake.CurrentContainer = sln.projects[name];\nend\nconfiguration { }\nreturn premake.CurrentContainer\nend\nfunction solution(name)"
|
||||
"\nif not name then\nif type(premake.CurrentContainer) == \"project\" then\nreturn premake.CurrentContainer.solution\nelse\nreturn premake.CurrentContainer\nend\nend\npremake.CurrentContainer = premake.solution.get(name)\nif (not premake.CurrentContainer) then\npremake.CurrentContainer = premake.solution.new(name)\nend\nconfiguration { }\nreturn premake.CurrentContainer\nend\nfunction group(name)\nif not name then\nreturn premake.CurrentGroup\nend\npremake.CurrentGroup = name\nreturn premake.CurrentGroup\nend\nfunction newaction(a)\npremake.action.add(a)\nend\nfunction newoption(opt)\npremake.option.add(opt)\nend\n",
|
||||
|
||||
/* base/cmdline.lua */
|
||||
"newoption \n{\ntrigger = \"cc\",\nvalue = \"VALUE\",\ndescription = \"Choose a C/C++ compiler set\",\nallowed = {\n{ \"gcc\", \"GNU GCC (gcc/g++)\" },\n{ \"ow\", \"OpenWatcom\" },\n}\n}\nnewoption\n{\ntrigger = \"dotnet\",\nvalue = \"VALUE\",\ndescription = \"Choose a .NET compiler set\",\nallowed = {\n{ \"msnet\", \"Microsoft .NET (csc)\" },\n{ \"mono\", \"Novell Mono (mcs)\" },\n{ \"pnet\", \"Portable.NET (cscc)\" },\n}\n}\nnewoption\n{\ntrigger = \"file\",\nvalue = \"FILE\",\ndescription = \"Read FILE as a Premake script; default is 'premake4.lua'\"\n}\nnewoption\n{\ntrigger = \"help\",\ndescription = \"Display this information\"\n}\nnewoption\n{\ntrigger = \"os\",\nvalue = \"VALUE\",\ndescription = \"Generate files for a different operating system\",\nallowed = {\n{ \"bsd\", \"OpenBSD, NetBSD, or FreeBSD\" },\n{ \"linux\", \"Linux\" },\n{ \"macosx\", \"Apple Mac OS X\" },\n{ \"windows\", \"Microsoft Windows\" },\n}\n}\nnewoption\n{"
|
||||
@ -179,17 +179,19 @@ const char* builtin_scripts[] = {
|
||||
"ative(sln.location, prj.location)), _MAKE.esc(_MAKE.getmakefilename(prj, true)))\n_p('')\nend\n_p('clean:')\nfor _ ,prj in ipairs(sln.projects) do\n_p('\\t@${MAKE} --no-print-directory -C %s -f %s clean', _MAKE.esc(path.getrelative(sln.location, prj.location)), _MAKE.esc(_MAKE.getmakefilename(prj, true)))\nend\n_p('')\n_p('help:')\n_p(1,'@echo \"Usage: make [config=name] [target]\"')\n_p(1,'@echo \"\"')\n_p(1,'@echo \"CONFIGURATIONS:\"')\nlocal cfgpairs = { }\nfor _, platform in ipairs(platforms) do\nfor _, cfgname in ipairs(sln.configurations) do\n_p(1,'@echo \" %s\"', premake.getconfigname(cfgname, platform, true))\nend\nend\n_p(1,'@echo \"\"')\n_p(1,'@echo \"TARGETS:\"')\n_p(1,'@echo \" all (default)\"')\n_p(1,'@echo \" clean\"')\nfor _, prj in ipairs(sln.projects) do\n_p(1,'@echo \" %s\"', prj.name)\nend\n_p(1,'@echo \"\"')\n_p(1,'@echo \"For more information, see http://industriousone.com/premake/quick-start\"')\nend\n",
|
||||
|
||||
/* actions/make/make_cpp.lua */
|
||||
"premake.make.cpp = { }\npremake.make.override = { }\nlocal cpp = premake.make.cpp\nlocal make = premake.make\nfunction premake.make_cpp(prj)\nlocal cc = premake.gettool(prj)\nlocal platforms = premake.filterplatforms(prj.solution, cc.platforms, \"Native\")\npremake.gmake_cpp_header(prj, cc, platforms)\nfor _, platform in ipairs(platforms) do\nfor cfg in premake.eachconfig(prj, platform) do\npremake.gmake_cpp_config(prj, cfg, cc)\nend\nend\nlocal objdirs = {}\nfor _, file in ipairs(prj.files) do\nif path.iscppfile(file) then\nobjdirs[_MAKE.esc(path.getdirectory(path.trimdots(file)))] = 1\nend\nend\n_p('OBJDIRS := \\\\')\n_p('\\t$(OBJDIR) \\\\')\nfor dir, _ in pairs(objdirs) do\n_p('\\t$(OBJDIR)/%s \\\\', dir)\nend\n_p('')\n_p('RESOURCES := \\\\')\nfor _, file in ipairs(prj.files) do\nif path.isresourcefile(file) then\n_p('\\t$(OBJDIR)/%s.res \\\\', _MAKE.esc(path.getbasename(file)))\nend\nend\n_p('')\n_p('.PHONY: clean prebuild prelink')\n_p('')\nif os.is(\"MacOSX\") and prj.kind == \"WindowedApp\" then\n_p('al"
|
||||
"l: $(TARGETDIR) $(OBJDIRS) prebuild prelink $(TARGET) $(dir $(TARGETDIR))PkgInfo $(dir $(TARGETDIR))Info.plist')\nelse\n_p('all: $(TARGETDIR) $(OBJDIRS) prebuild prelink $(TARGET)')\nend\n_p('\\t@:')\n_p('')\nif (prj.kind == \"StaticLib\" and prj.options.ArchiveSplit) then\n_p('define max_args')\n_p('\\t$(eval _args:=)')\n_p('\\t$(foreach obj,$3,$(eval _args+=$(obj))$(if $(word $2,$(_args)),$1$(_args)$(EOL)$(eval _args:=)))')\n_p('\\t$(if $(_args),$1$(_args))')\n_p('endef')\n_p('')\n_p('define EOL')\n_p('')\n_p('')\n_p('endef')\n_p('')\nend\n_p('$(TARGET): $(GCH) $(OBJECTS) $(LDDEPS) $(RESOURCES)')\nif prj.kind == \"StaticLib\" then\nif prj.msgarchiving then\n_p('\\t@echo ' .. prj.msgarchiving)\nelse\n_p('\\t@echo Archiving %s', prj.name)\nend\nif (not prj.archivesplit_size) then\nprj.archivesplit_size=200\nend\nif (not prj.options.ArchiveSplit) then\n_p('\\t$(SILENT) $(LINKCMD) $(OBJECTS)')\nelse\n_p('\\t$(call RM,$(TARGET))')\n_p('\\t@$(call max_args,$(LINKCMD),'.. prj.archivesplit_size ..',$(OBJECTS))')\n_p"
|
||||
"('\\t$(SILENT) $(LINKCMD_NDX)')\nend\nelse\nif prj.msglinking then\n_p('\\t@echo ' .. prj.msglinking)\nelse\n_p('\\t@echo Linking %s', prj.name)\nend\n_p('\\t$(SILENT) $(LINKCMD)')\nend\n_p('\\t$(POSTBUILDCMDS)')\n_p('')\n_p('$(TARGETDIR):')\npremake.make_mkdirrule(\"$(TARGETDIR)\")\n_p('$(OBJDIRS):')\nif (not prj.solution.messageskip) or (not table.contains(prj.solution.messageskip, \"SkipCreatingMessage\")) then\n_p('\\t@echo Creating $(@)')\nend\n_p('\\t-$(call MKDIR,$@)')\n_p('')\nif os.is(\"MacOSX\") and prj.kind == \"WindowedApp\" then\n_p('$(dir $(TARGETDIR))PkgInfo:')\n_p('$(dir $(TARGETDIR))Info.plist:')\n_p('')\nend\n_p('clean:')\nif (not prj.solution.messageskip) or (not table.contains(prj.solution.messageskip, \"SkipCleaningMessage\")) then\n_p('\\t@echo Cleaning %s', prj.name)\nend\n_p('ifeq (posix,$(SHELLTYPE))')\n_p('\\t$(SILENT) rm -f $(TARGET)')\n_p('\\t$(SILENT) rm -rf $(OBJDIR)')\n_p('else')\n_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,$(TARGET)) del $(subst /,\\\\\\\\,$(TARGET))')\n_p('"
|
||||
"\\t$(SILENT) if exist $(subst /,\\\\\\\\,$(OBJDIR)) rmdir /s /q $(subst /,\\\\\\\\,$(OBJDIR))')\n_p('endif')\n_p('')\n_p('prebuild:')\n_p('\\t$(PREBUILDCMDS)')\n_p('')\n_p('prelink:')\n_p('\\t$(PRELINKCMDS)')\n_p('')\ncpp.pchrules(prj)\ncpp.fileRules(prj)\n_p('-include $(OBJECTS:%%.o=%%.d)')\n_p('ifneq (,$(PCH))')\n_p(' -include $(OBJDIR)/$(notdir $(PCH)).d')\n_p('endif')\nend\nfunction premake.gmake_cpp_header(prj, cc, platforms)\n_p('# %s project makefile autogenerated by GENie', premake.action.current().shortname)\n_p('ifndef config')\n_p(' config=%s', _MAKE.esc(premake.getconfigname(prj.solution.configurations[1], platforms[1], true)))\n_p('endif')\n_p('')\n_p('ifndef verbose')\n_p(' SILENT = @')\n_p('endif')\n_p('')\n_p('SHELLTYPE := msdos')\n_p('ifeq (,$(ComSpec)$(COMSPEC))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('ifeq (/bin,$(findstring /bin,$(SHELL)))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('')\n_p('ifeq (posix,$(SHELLTYPE))')\n_p(' MKDIR = $(SILENT) mkdir -p \"$(1)\"')\n_p(' COPY ="
|
||||
" $(SILENT) cp -fR \"$(1)\" \"$(2)\"')\n_p(' RM= $(SILENT) rm -f \"$(1)\"')\n_p('else')\n_p(' MKDIR = $(SILENT) mkdir \"$(subst /,\\\\\\\\,$(1))\" 2> nul || exit 0')\n_p(' COPY = $(SILENT) copy /Y \"$(subst /,\\\\\\\\,$(1))\" \"$(subst /,\\\\\\\\,$(2))\"')\n_p(' RM = $(SILENT) del /F \"$(subst /,\\\\\\\\,$(1))\" 2> nul || exit 0')\n_p('endif')\n_p('')\n_p('CC = %s', cc.cc)\n_p('CXX = %s', cc.cxx)\n_p('AR = %s', cc.ar)\n_p('')\n_p('ifndef RESCOMP')\n_p(' ifdef WINDRES')\n_p(' RESCOMP = $(WINDRES)')\n_p(' else')\n_p(' RESCOMP = windres')\n_p(' endif')\n_p('endif')\n_p('')\nend\nfunction premake.gmake_cpp_config(prj, cfg, cc)\n_p('ifeq ($(config),%s)', _MAKE.esc(cfg.shortname))\ncpp.platformtools(cfg, cc)\n_p(' ' .. (table.contains(premake.make.override,\"OBJDIR\") and \"override \" or \"\") .. 'OBJDIR = %s', _MAKE.esc(cfg.objectsdir))\n_p(' ' .. (table.contains(premake.make.override,\"TARGETDIR\") and \"override \" or \"\") .. 'TARGETDIR = %s', _MAKE.esc(cfg.buildtarget.directory))\n_"
|
||||
"p(' ' .. (table.contains(premake.make.override,\"TARGET\") and \"override \" or \"\") .. 'TARGET = $(TARGETDIR)/%s', _MAKE.esc(cfg.buildtarget.name))\n_p(' DEFINES +=%s', make.list(cc.getdefines(cfg.defines)))\n_p(' INCLUDES +=%s', make.list(cc.getincludedirs(cfg.includedirs)))\ncpp.pchconfig(cfg)\ncpp.flags(cfg, cc)\ncpp.linker(prj, cfg, cc)\n_p(' OBJECTS := \\\\')\nfor _, file in ipairs(prj.files) do\nif path.iscppfile(file) then\nif not table.icontains(cfg.excludes, file) then\n_p('\\t$(OBJDIR)/%s.o \\\\'\n, _MAKE.esc(path.trimdots(path.removeext(file)))\n)\nend\nend\nend\n_p('')\n_p(' define PREBUILDCMDS')\nif #cfg.prebuildcommands > 0 then\n_p('\\t@echo Running pre-build commands')\n_p('\\t%s', table.implode(cfg.prebuildcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\n_p(' define PRELINKCMDS')\nif #cfg.prelinkcommands > 0 then\n_p('\\t@echo Running pre-link commands')\n_p('\\t%s', table.implode(cfg.prelinkcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\n_p(' define POSTBUILD"
|
||||
"CMDS')\nif #cfg.postbuildcommands > 0 then\n_p('\\t@echo Running post-build commands')\n_p('\\t%s', table.implode(cfg.postbuildcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\nmake.settings(cfg, cc)\n_p('endif')\n_p('')\nend\nfunction cpp.platformtools(cfg, cc)\nlocal platform = cc.platforms[cfg.platform]\nif platform.cc then\n_p(' CC = %s', platform.cc)\nend\nif platform.cxx then\n_p(' CXX = %s', platform.cxx)\nend\nif platform.ar then\n_p(' AR = %s', platform.ar)\nend\nend\nfunction cpp.flags(cfg, cc)\nif cfg.pchheader and not cfg.flags.NoPCH then\n_p(' FORCE_INCLUDE += -include $(OBJDIR)/$(notdir $(PCH))')\nend\nif #cfg.forcedincludes > 0 then\n_p(' FORCE_INCLUDE += -include %s'\n,premake.esc(table.concat(cfg.forcedincludes, \";\")))\nend\n_p(' ALL_CPPFLAGS += $(CPPFLAGS) %s $(DEFINES) $(INCLUDES)', table.concat(cc.getcppflags(cfg), \" \"))\n_p(' ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH)%s', make.list(table.join(cc.getcflags(cfg), cfg.buildoptions, cfg.buildopt"
|
||||
"ions_c)))\n_p(' ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH)%s', make.list(table.join(cc.getcflags(cfg), cc.getcxxflags(cfg), cfg.buildoptions, cfg.buildoptions_cpp)))\n_p(' ALL_OBJCFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH)%s', make.list(table.join(cc.getcflags(cfg), cc.getcxxflags(cfg), cfg.buildoptions, cfg.buildoptions_objc)))\n_p(' ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)%s',\n make.list(table.join(cc.getdefines(cfg.resdefines),\n cc.getincludedirs(cfg.resincludedirs), cfg.resoptions)))\nend\nfunction cpp.linker(prj, cfg, cc)\n_p(' ALL_LDFLAGS += $(LDFLAGS)%s', make.list(table.join(cc.getlibdirflags(cfg), cc.getldflags(cfg), cfg.linkoptions)))\n_p(' LDDEPS +=%s', make.list(_MAKE.esc(premake.getlinks(cfg, \"siblings\", \"fullpath\"))))\n_p(' LIBS += $(LDDEPS)%s', make.list(cc.getlinkflags(cfg)))\nif cfg.kind == \"StaticLib\" then\nif cfg.platform:startswith(\"Universal\") then\n_p(' LINKCMD = libtool -o $(TAR"
|
||||
"GET)')\nelse\nif (not prj.options.ArchiveSplit) then\nif cc.llvm then\n_p(' LINKCMD = $(AR) rcs $(TARGET)')\nelse\n_p(' LINKCMD = $(AR) -rcs $(TARGET)')\nend\nelse\nif cc.llvm then\n_p(' LINKCMD = $(AR) qc $(TARGET)')\n_p(' LINKCMD_NDX= $(AR) cs $(TARGET)')\nelse\n_p(' LINKCMD = $(AR) -qc $(TARGET)')\n_p(' LINKCMD_NDX= $(AR) -cs $(TARGET)')\nend\nend\nend\nelse\nlocal tool = iif(cfg.language == \"C\", \"CC\", \"CXX\")\n_p(' LINKCMD = $(%s) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)', tool)\nend\nend\nfunction cpp.pchconfig(cfg)\nif not cfg.pchheader or cfg.flags.NoPCH then\nreturn\nend\nlocal pch = cfg.pchheader\nfor _, incdir in ipairs(cfg.includedirs) do\nlocal abspath = path.getabsolute(path.join(cfg.project.location, incdir))\nlocal testname = path.join(abspath, pch)\nif os.isfile(testname) then\npch = path.getrelative(cfg.location, testname)\nbreak\nend\nend\n_p(' PCH = %s', _MAKE.esc(pch))\n_p(' GCH = $(OBJDIR)/$(notdir $(PCH)).gch')\nend\nfu"
|
||||
"nction cpp.pchrules(prj)\n_p('ifneq (,$(PCH))')\n_p('$(GCH): $(PCH)')\n_p('\\t@echo $(notdir $<)')\nlocal cmd = iif(prj.language == \"C\", \"$(CC) -x c-header $(ALL_CFLAGS)\", \"$(CXX) -x c++-header $(ALL_CXXFLAGS)\")\n_p('\\t$(SILENT) %s -MMD -MP $(DEFINES) $(INCLUDES) -o \"$@\" -MF \"$(@:%%.gch=%%.d)\" -c \"$<\"', cmd)\n_p('endif')\n_p('')\nend\nfunction cpp.fileRules(prj)\nfor _, file in ipairs(prj.files or {}) do\nif path.iscppfile(file) then\n_p('$(OBJDIR)/%s.o: %s'\n, _MAKE.esc(path.trimdots(path.removeext(file)))\n, _MAKE.esc(file)\n)\nif (path.isobjcfile(file) and prj.msgcompile_objc) then\n_p('\\t@echo ' .. prj.msgcompile_objc)\nelseif prj.msgcompile then\n_p('\\t@echo ' .. prj.msgcompile)\nelse\n_p('\\t@echo $(notdir $<)')\nend\nif (path.isobjcfile(file)) then\n_p('\\t$(SILENT) $(CXX) $(ALL_OBJCFLAGS) $(FORCE_INCLUDE) -o \"$@\" -MF $(@:%%.o=%%.d) -c \"$<\"')\nelse\ncpp.buildcommand(path.iscfile(file) and not prj.options.ForceCPP, \"o\")\nend\n_p('')\nelseif (path.getextension(file) == \".rc\") then\n"
|
||||
"_p('$(OBJDIR)/%s.res: %s', _MAKE.esc(path.getbasename(file)), _MAKE.esc(file))\nif prj.msgresource then\n_p('\\t@echo ' .. prj.msgresource)\nelse\n_p('\\t@echo $(notdir $<)')\nend\n_p('\\t$(SILENT) $(RESCOMP) $< -O coff -o \"$@\" $(ALL_RESFLAGS)')\n_p('')\nend\nend\nend\nfunction cpp.buildcommand(iscfile, objext)\nlocal flags = iif(iscfile, '$(CC) $(ALL_CFLAGS)', '$(CXX) $(ALL_CXXFLAGS)')\n_p('\\t$(SILENT) %s $(FORCE_INCLUDE) -o \"$@\" -MF $(@:%%.%s=%%.d) -c \"$<\"', flags, objext)\nend\n",
|
||||
"premake.make.linkoptions_after = false\npremake.make.cpp = { }\npremake.make.override = { }\nlocal cpp = premake.make.cpp\nlocal make = premake.make\nfunction premake.make_cpp(prj)\nlocal cc = premake.gettool(prj)\nlocal platforms = premake.filterplatforms(prj.solution, cc.platforms, \"Native\")\npremake.gmake_cpp_header(prj, cc, platforms)\nfor _, platform in ipairs(platforms) do\nfor cfg in premake.eachconfig(prj, platform) do\npremake.gmake_cpp_config(prj, cfg, cc)\nend\nend\nlocal objdirs = {}\nlocal additionalobjdirs = {}\nfor _, file in ipairs(prj.files) do\nif path.iscppfile(file) then\nobjdirs[_MAKE.esc(path.getdirectory(path.trimdots(file)))] = 1\nend\nend\nfor _, custombuildtask in ipairs(prj.custombuildtask or {}) do\nfor _, buildtask in ipairs(custombuildtask or {}) do\nadditionalobjdirs[_MAKE.esc(path.getdirectory(path.getrelative(prj.location,buildtask[2])))] = 1\nend\nend\n_p('OBJDIRS := \\\\')\n_p('\\t$(OBJDIR) \\\\')\nfor dir, _ in pairs(objdirs) do\n_p('\\t$(OBJDIR)/%s \\\\', dir)\nend\nfor d"
|
||||
"ir, _ in pairs(additionalobjdirs) do\n_p('\\t%s \\\\', dir)\nend\n_p('')\n_p('RESOURCES := \\\\')\nfor _, file in ipairs(prj.files) do\nif path.isresourcefile(file) then\n_p('\\t$(OBJDIR)/%s.res \\\\', _MAKE.esc(path.getbasename(file)))\nend\nend\n_p('')\n_p('.PHONY: clean prebuild prelink')\n_p('')\nif os.is(\"MacOSX\") and prj.kind == \"WindowedApp\" then\n_p('all: $(TARGETDIR) $(OBJDIRS) prebuild prelink $(TARGET) $(dir $(TARGETDIR))PkgInfo $(dir $(TARGETDIR))Info.plist')\nelse\n_p('all: $(TARGETDIR) $(OBJDIRS) prebuild prelink $(TARGET)')\nend\n_p('\\t@:')\n_p('')\nif (prj.kind == \"StaticLib\" and prj.options.ArchiveSplit) then\n_p('define max_args')\n_p('\\t$(eval _args:=)')\n_p('\\t$(foreach obj,$3,$(eval _args+=$(obj))$(if $(word $2,$(_args)),$1$(_args)$(EOL)$(eval _args:=)))')\n_p('\\t$(if $(_args),$1$(_args))')\n_p('endef')\n_p('')\n_p('define EOL')\n_p('')\n_p('')\n_p('endef')\n_p('')\nend\n_p('$(TARGET): $(GCH) $(OBJECTS) $(LDDEPS) $(RESOURCES)')\nif prj.kind == \"StaticLib\" then\nif prj.msgarchiv"
|
||||
"ing then\n_p('\\t@echo ' .. prj.msgarchiving)\nelse\n_p('\\t@echo Archiving %s', prj.name)\nend\nif (not prj.archivesplit_size) then\nprj.archivesplit_size=200\nend\nif (not prj.options.ArchiveSplit) then\n_p('\\t$(SILENT) $(LINKCMD) $(OBJECTS)')\nelse\n_p('\\t$(call RM,$(TARGET))')\n_p('\\t@$(call max_args,$(LINKCMD),'.. prj.archivesplit_size ..',$(OBJECTS))')\n_p('\\t$(SILENT) $(LINKCMD_NDX)')\nend\nelse\nif prj.msglinking then\n_p('\\t@echo ' .. prj.msglinking)\nelse\n_p('\\t@echo Linking %s', prj.name)\nend\n_p('\\t$(SILENT) $(LINKCMD)')\nend\n_p('\\t$(POSTBUILDCMDS)')\n_p('')\n_p('$(TARGETDIR):')\npremake.make_mkdirrule(\"$(TARGETDIR)\")\n_p('$(OBJDIRS):')\nif (not prj.solution.messageskip) or (not table.contains(prj.solution.messageskip, \"SkipCreatingMessage\")) then\n_p('\\t@echo Creating $(@)')\nend\n_p('\\t-$(call MKDIR,$@)')\n_p('')\nif os.is(\"MacOSX\") and prj.kind == \"WindowedApp\" then\n_p('$(dir $(TARGETDIR))PkgInfo:')\n_p('$(dir $(TARGETDIR))Info.plist:')\n_p('')\nend\n_p('clean:')\nif (not p"
|
||||
"rj.solution.messageskip) or (not table.contains(prj.solution.messageskip, \"SkipCleaningMessage\")) then\n_p('\\t@echo Cleaning %s', prj.name)\nend\n_p('ifeq (posix,$(SHELLTYPE))')\n_p('\\t$(SILENT) rm -f $(TARGET)')\n_p('\\t$(SILENT) rm -rf $(OBJDIR)')\n_p('else')\n_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,$(TARGET)) del $(subst /,\\\\\\\\,$(TARGET))')\n_p('\\t$(SILENT) if exist $(subst /,\\\\\\\\,$(OBJDIR)) rmdir /s /q $(subst /,\\\\\\\\,$(OBJDIR))')\n_p('endif')\n_p('')\n_p('prebuild:')\n_p('\\t$(PREBUILDCMDS)')\n_p('')\n_p('prelink:')\n_p('\\t$(PRELINKCMDS)')\n_p('')\ncpp.pchrules(prj)\ncpp.fileRules(prj)\ncpp.dependencyRules(prj)\nfor _, custombuildtask in ipairs(prj.custombuildtask or {}) do\nfor _, buildtask in ipairs(custombuildtask or {}) do\nlocal deps = string.format(\"%s \",path.getrelative(prj.location,buildtask[1]))\nfor _, depdata in ipairs(buildtask[3] or {}) do\ndeps = deps .. string.format(\"%s \",path.getrelative(prj.location,depdata))\nend\n_p('%s: %s'\n,path.getrelative(prj.location,b"
|
||||
"uildtask[2])\n, deps\n)\nfor _, cmdline in ipairs(buildtask[4] or {}) do\nlocal cmd = cmdline\nlocal num = 1\nfor _, depdata in ipairs(buildtask[3] or {}) do\ncmd = string.gsub(cmd,\"%$%(\" .. num ..\"%)\", string.format(\"%s \",path.getrelative(prj.location,depdata)))\nnum = num + 1\nend\ncmd = string.gsub(cmd, \"%$%(<%)\", \"$<\")\ncmd = string.gsub(cmd, \"%$%(@%)\", \"$@\")\n_p('\\t$(SILENT) %s',cmd)\nend\n_p('')\nend\nend\n_p('-include $(OBJECTS:%%.o=%%.d)')\n_p('ifneq (,$(PCH))')\n_p(' -include $(OBJDIR)/$(notdir $(PCH)).d')\n_p('endif')\nend\nfunction premake.gmake_cpp_header(prj, cc, platforms)\n_p('# %s project makefile autogenerated by GENie', premake.action.current().shortname)\n_p('ifndef config')\n_p(' config=%s', _MAKE.esc(premake.getconfigname(prj.solution.configurations[1], platforms[1], true)))\n_p('endif')\n_p('')\n_p('ifndef verbose')\n_p(' SILENT = @')\n_p('endif')\n_p('')\n_p('SHELLTYPE := msdos')\n_p('ifeq (,$(ComSpec)$(COMSPEC))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('ifeq (/bi"
|
||||
"n,$(findstring /bin,$(SHELL)))')\n_p(' SHELLTYPE := posix')\n_p('endif')\n_p('')\n_p('ifeq (posix,$(SHELLTYPE))')\n_p(' MKDIR = $(SILENT) mkdir -p \"$(1)\"')\n_p(' COPY = $(SILENT) cp -fR \"$(1)\" \"$(2)\"')\n_p(' RM= $(SILENT) rm -f \"$(1)\"')\n_p('else')\n_p(' MKDIR = $(SILENT) mkdir \"$(subst /,\\\\\\\\,$(1))\" 2> nul || exit 0')\n_p(' COPY = $(SILENT) copy /Y \"$(subst /,\\\\\\\\,$(1))\" \"$(subst /,\\\\\\\\,$(2))\"')\n_p(' RM = $(SILENT) del /F \"$(subst /,\\\\\\\\,$(1))\" 2> nul || exit 0')\n_p('endif')\n_p('')\n_p('CC = %s', cc.cc)\n_p('CXX = %s', cc.cxx)\n_p('AR = %s', cc.ar)\n_p('')\n_p('ifndef RESCOMP')\n_p(' ifdef WINDRES')\n_p(' RESCOMP = $(WINDRES)')\n_p(' else')\n_p(' RESCOMP = windres')\n_p(' endif')\n_p('endif')\n_p('')\nend\nfunction premake.gmake_cpp_config(prj, cfg, cc)\n_p('ifeq ($(config),%s)', _MAKE.esc(cfg.shortname))\ncpp.platformtools(cfg, cc)\n_p(' ' .. (table.contains(premake.make.override,\"OBJDIR\") and \"override \" or \"\") .. 'OBJDIR = %s', _MAKE.e"
|
||||
"sc(cfg.objectsdir))\n_p(' ' .. (table.contains(premake.make.override,\"TARGETDIR\") and \"override \" or \"\") .. 'TARGETDIR = %s', _MAKE.esc(cfg.buildtarget.directory))\n_p(' ' .. (table.contains(premake.make.override,\"TARGET\") and \"override \" or \"\") .. 'TARGET = $(TARGETDIR)/%s', _MAKE.esc(cfg.buildtarget.name))\n_p(' DEFINES +=%s', make.list(cc.getdefines(cfg.defines)))\n_p(' INCLUDES +=%s', make.list(cc.getincludedirs(cfg.includedirs)))\ncpp.pchconfig(cfg)\ncpp.flags(cfg, cc)\ncpp.linker(prj, cfg, cc)\n_p(' OBJECTS := \\\\')\nfor _, file in ipairs(prj.files) do\nif path.iscppfile(file) then\nif not table.icontains(cfg.excludes, file) then\n_p('\\t$(OBJDIR)/%s.o \\\\'\n, _MAKE.esc(path.trimdots(path.removeext(file)))\n)\nend\nend\nend\n_p('')\n_p(' define PREBUILDCMDS')\nif #cfg.prebuildcommands > 0 then\n_p('\\t@echo Running pre-build commands')\n_p('\\t%s', table.implode(cfg.prebuildcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\n_p(' define PRELINKCMDS')\nif #cfg.prelinkco"
|
||||
"mmands > 0 then\n_p('\\t@echo Running pre-link commands')\n_p('\\t%s', table.implode(cfg.prelinkcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\n_p(' define POSTBUILDCMDS')\nif #cfg.postbuildcommands > 0 then\n_p('\\t@echo Running post-build commands')\n_p('\\t%s', table.implode(cfg.postbuildcommands, \"\", \"\", \"\\n\\t\"))\nend\n_p(' endef')\nmake.settings(cfg, cc)\n_p('endif')\n_p('')\nend\nfunction cpp.platformtools(cfg, cc)\nlocal platform = cc.platforms[cfg.platform]\nif platform.cc then\n_p(' CC = %s', platform.cc)\nend\nif platform.cxx then\n_p(' CXX = %s', platform.cxx)\nend\nif platform.ar then\n_p(' AR = %s', platform.ar)\nend\nend\nfunction cpp.flags(cfg, cc)\nif cfg.pchheader and not cfg.flags.NoPCH then\n_p(' FORCE_INCLUDE += -include $(OBJDIR)/$(notdir $(PCH))')\nend\nif #cfg.forcedincludes > 0 then\n_p(' FORCE_INCLUDE += -include %s'\n,premake.esc(table.concat(cfg.forcedincludes, \";\")))\nend\n_p(' ALL_CPPFLAGS += $(CPPFLAGS) %s $(DEFINES) $(INCLUDES)', "
|
||||
"table.concat(cc.getcppflags(cfg), \" \"))\n_p(' ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH)%s', make.list(table.join(cc.getcflags(cfg), cfg.buildoptions, cfg.buildoptions_c)))\n_p(' ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH)%s', make.list(table.join(cc.getcflags(cfg), cc.getcxxflags(cfg), cfg.buildoptions, cfg.buildoptions_cpp)))\n_p(' ALL_OBJCFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH)%s', make.list(table.join(cc.getcflags(cfg), cc.getcxxflags(cfg), cfg.buildoptions, cfg.buildoptions_objc)))\n_p(' ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)%s',\n make.list(table.join(cc.getdefines(cfg.resdefines),\n cc.getincludedirs(cfg.resincludedirs), cfg.resoptions)))\nend\nfunction cpp.linker(prj, cfg, cc)\n_p(' ALL_LDFLAGS += $(LDFLAGS)%s', make.list(table.join(cc.getlibdirflags(cfg), cc.getldflags(cfg), cfg.linkoptions)))\n_p(' LDDEPS +=%s', make.list(_MAKE.esc(premake.getlinks(cfg, \"siblings\", \"fullpath\"))))\n_p(' LIBS "
|
||||
" += $(LDDEPS)%s', make.list(cc.getlinkflags(cfg)))\nif cfg.kind == \"StaticLib\" then\nif cfg.platform:startswith(\"Universal\") then\n_p(' LINKCMD = libtool -o $(TARGET)')\nelse\nif (not prj.options.ArchiveSplit) then\nif cc.llvm then\n_p(' LINKCMD = $(AR) rcs $(TARGET)')\nelse\n_p(' LINKCMD = $(AR) -rcs $(TARGET)')\nend\nelse\nif cc.llvm then\n_p(' LINKCMD = $(AR) qc $(TARGET)')\n_p(' LINKCMD_NDX= $(AR) cs $(TARGET)')\nelse\n_p(' LINKCMD = $(AR) -qc $(TARGET)')\n_p(' LINKCMD_NDX= $(AR) -cs $(TARGET)')\nend\nend\nend\nelse\nlocal tool = iif(cfg.language == \"C\", \"CC\", \"CXX\")\nif (premake.make.linkoptions_after) then\n_p(' LINKCMD = $(%s) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(LIBS) $(ALL_LDFLAGS)', tool)\nelse\n_p(' LINKCMD = $(%s) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)', tool)\nend\nend\nend\nfunction cpp.pchconfig(cfg)\nif not cfg.pchheader or cfg.flags.NoPCH then\nreturn\nend\nlocal pch = cfg.pchheader\nfor _, incdir in ipairs(cfg."
|
||||
"includedirs) do\nlocal abspath = path.getabsolute(path.join(cfg.project.location, incdir))\nlocal testname = path.join(abspath, pch)\nif os.isfile(testname) then\npch = path.getrelative(cfg.location, testname)\nbreak\nend\nend\n_p(' PCH = %s', _MAKE.esc(pch))\n_p(' GCH = $(OBJDIR)/$(notdir $(PCH)).gch')\nend\nfunction cpp.pchrules(prj)\n_p('ifneq (,$(PCH))')\n_p('$(GCH): $(PCH)')\n_p('\\t@echo $(notdir $<)')\nlocal cmd = iif(prj.language == \"C\", \"$(CC) -x c-header $(ALL_CFLAGS)\", \"$(CXX) -x c++-header $(ALL_CXXFLAGS)\")\n_p('\\t$(SILENT) %s -MMD -MP $(DEFINES) $(INCLUDES) -o \"$@\" -MF \"$(@:%%.gch=%%.d)\" -c \"$<\"', cmd)\n_p('endif')\n_p('')\nend\nfunction cpp.fileRules(prj)\nfor _, file in ipairs(prj.files or {}) do\nif path.iscppfile(file) then\n_p('$(OBJDIR)/%s.o: %s'\n, _MAKE.esc(path.trimdots(path.removeext(file)))\n, _MAKE.esc(file)\n)\nif (path.isobjcfile(file) and prj.msgcompile_objc) then\n_p('\\t@echo ' .. prj.msgcompile_objc)\nelseif prj.msgcompile then\n_p('\\t@echo ' .. prj."
|
||||
"msgcompile)\nelse\n_p('\\t@echo $(notdir $<)')\nend\nif (path.isobjcfile(file)) then\n_p('\\t$(SILENT) $(CXX) $(ALL_OBJCFLAGS) $(FORCE_INCLUDE) -o \"$@\" -MF $(@:%%.o=%%.d) -c \"$<\"')\nelse\ncpp.buildcommand(path.iscfile(file) and not prj.options.ForceCPP, \"o\")\nend\nfor _, task in ipairs(prj.postcompiletasks or {}) do\n_p('\\t$(SILENT) %s', task)\n_p('')\nend\n_p('')\nelseif (path.getextension(file) == \".rc\") then\n_p('$(OBJDIR)/%s.res: %s', _MAKE.esc(path.getbasename(file)), _MAKE.esc(file))\nif prj.msgresource then\n_p('\\t@echo ' .. prj.msgresource)\nelse\n_p('\\t@echo $(notdir $<)')\nend\n_p('\\t$(SILENT) $(RESCOMP) $< -O coff -o \"$@\" $(ALL_RESFLAGS)')\n_p('')\nend\nend\nend\nfunction cpp.dependencyRules(prj)\nfor _, dependency in ipairs(prj.dependency or {}) do\nfor _, dep in ipairs(dependency or {}) do\nif (dep[3]==nil or dep[3]==false) then\n_p('$(OBJDIR)/%s.o: %s'\n, _MAKE.esc(path.trimdots(path.removeext(path.getrelative(prj.location, dep[1]))))\n, _MAKE.esc(path.getrelative(prj.location, dep["
|
||||
"2]))\n)\nelse\n_p('%s: %s'\n, _MAKE.esc(dep[1])\n, _MAKE.esc(path.getrelative(prj.location, dep[2]))\n)\nend\n_p('')\nend\nend\nend\nfunction cpp.buildcommand(iscfile, objext)\nlocal flags = iif(iscfile, '$(CC) $(ALL_CFLAGS)', '$(CXX) $(ALL_CXXFLAGS)')\n_p('\\t$(SILENT) %s $(FORCE_INCLUDE) -o \"$@\" -MF $(@:%%.%s=%%.d) -c \"$<\"', flags, objext)\nend\n",
|
||||
|
||||
/* actions/make/make_csharp.lua */
|
||||
"local function getresourcefilename(cfg, fname)\nif path.getextension(fname) == \".resx\" then\n local name = cfg.buildtarget.basename .. \".\"\n local dir = path.getdirectory(fname)\n if dir ~= \".\" then \nname = name .. path.translate(dir, \".\") .. \".\"\nend\nreturn \"$(OBJDIR)/\" .. _MAKE.esc(name .. path.getbasename(fname)) .. \".resources\"\nelse\nreturn fname\nend\nend\nfunction premake.make_csharp(prj)\nlocal csc = premake.dotnet\nlocal cfglibs = { }\nlocal cfgpairs = { }\nlocal anycfg\nfor cfg in premake.eachconfig(prj) do\nanycfg = cfg\ncfglibs[cfg] = premake.getlinks(cfg, \"siblings\", \"fullpath\")\ncfgpairs[cfg] = { }\nfor _, fname in ipairs(cfglibs[cfg]) do\nif path.getdirectory(fname) ~= cfg.buildtarget.directory then\ncfgpairs[cfg][\"$(TARGETDIR)/\" .. _MAKE.esc(path.getname(fname))] = _MAKE.esc(fname)\nend\nend\nend\nlocal sources = {}\nlocal embedded = { }\nlocal copypairs = { }\nfor fcfg in premake.project.eachfile(prj) do\nlocal action = csc.getbuildaction(fcfg)\nif action == \"Co"
|
||||
@ -265,17 +267,20 @@ const char* builtin_scripts[] = {
|
||||
"(3,'<GenerateDebugInformation>%s</GenerateDebugInformation>', tostring(cfg.flags.Symbols ~= nil))\nif premake.config.isoptimizedbuild(cfg.flags) then\n_p(3,'<EnableCOMDATFolding>true</EnableCOMDATFolding>')\n_p(3,'<OptimizeReferences>true</OptimizeReferences>')\nend\nif cfg.kind ~= 'StaticLib' then\nvc2010.additionalDependencies(cfg)\n_p(3,'<OutputFile>$(OutDir)%s</OutputFile>', cfg.buildtarget.name)\nif #cfg.libdirs > 0 then\n_p(3,'<AdditionalLibraryDirectories>%s;%%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>',\npremake.esc(path.translate(table.concat(cfg.libdirs, ';'), '\\\\')))\nend\nif vc2010.config_type(cfg) == 'Application' and not cfg.flags.WinMain and not cfg.flags.Managed then\nif cfg.flags.Unicode then\n_p(3,'<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>')\nelse\n_p(3,'<EntryPointSymbol>mainCRTStartup</EntryPointSymbol>')\nend\nend\nimport_lib(cfg)\nlocal deffile = premake.findfile(cfg, \".def\")\nif deffile then\n_p(3,'<ModuleDefinitionFile>%s</ModuleDefinitionFile>', deffil"
|
||||
"e)\nend\nlink_target_machine(3,cfg)\nadditional_options(3,cfg)\nend\n_p(2,'</Link>')\nend\nfunction vc2010.additionalDependencies(cfg)\nlocal links = premake.getlinks(cfg, \"system\", \"fullpath\")\nif #links > 0 then\n_p(3,'<AdditionalDependencies>%s;%%(AdditionalDependencies)</AdditionalDependencies>',\ntable.concat(links, \";\"))\nend\nend\nlocal function item_definitions(prj)\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\n_p(1,'<ItemDefinitionGroup ' ..if_config_and_platform() ..'>'\n,premake.esc(cfginfo.name))\nvs10_clcompile(cfg)\nresource_compile(cfg)\nitem_def_lib(cfg)\nvc2010.link(cfg)\nevent_hooks(cfg)\n_p(1,'</ItemDefinitionGroup>')\nend\nend\nfunction vc2010.getfilegroup(prj, group)\nlocal sortedfiles = prj.vc2010sortedfiles\nif not sortedfiles then\nsortedfiles = {\nClCompile = {},\nClInclude = {},\nNone = {},\nResourceCompile = {},\nAppxManifest = {}\n}\nlocal foundAppxManifest = false\nfor file in premak"
|
||||
"e.project.eachfile(prj) do\nif path.iscppfile(file.name) then\ntable.insert(sortedfiles.ClCompile, file)\nelseif path.iscppheader(file.name) then\nif not table.icontains(prj.removefiles, file) then\ntable.insert(sortedfiles.ClInclude, file)\nend\nelseif path.isresourcefile(file.name) then\ntable.insert(sortedfiles.ResourceCompile, file)\nelse\nlocal ext = path.getextension(file.name):lower()\nif ext == \".appxmanifest\" then\nfoundAppxManifest = true\ntable.insert(sortedfiles.AppxManifest, file)\nelse\ntable.insert(sortedfiles.None, file)\nend\nend\nend\nif vstudio.toolset == \"v120_wp81\" and prj.kind == \"WindowedApp\" and not foundAppxManifest then\nvstudio.needAppxManifest = true\nlocal fcfg = {}\nfcfg.name = prj.name .. \".appxmanifest\"\nfcfg.vpath = premake.project.getvpath(prj, fcfg.name)\ntable.insert(sortedfiles.AppxManifest, fcfg)\nend\nprj.vc2010sortedfiles = sortedfiles\nend\nreturn sortedfiles[group]\nend\nfunction vc2010.files(prj)\nvc2010.simplefilesgroup(prj, \"ClInclude\")\nvc2010.compilerfil"
|
||||
"esgroup(prj)\nvc2010.simplefilesgroup(prj, \"None\")\nvc2010.simplefilesgroup(prj, \"ResourceCompile\")\nvc2010.simplefilesgroup(prj, \"AppxManifest\")\nend\nfunction vc2010.simplefilesgroup(prj, section, subtype)\nlocal files = vc2010.getfilegroup(prj, section)\nif #files > 0 then\n_p(1,'<ItemGroup>')\nfor _, file in ipairs(files) do\nif subtype then\n_p(2,'<%s Include=\\\"%s\\\">', section, path.translate(file.name, \"\\\\\"))\n_p(3,'<SubType>%s</SubType>', subtype)\n_p(2,'</%s>', section)\nelse\n_p(2,'<%s Include=\\\"%s\\\" />', section, path.translate(file.name, \"\\\\\"))\nend\nend\n_p(1,'</ItemGroup>')\nend\nend\nfunction vc2010.compilerfilesgroup(prj)\nlocal configs = prj.solution.vstudio_configs\nlocal files = vc2010.getfilegroup(prj, \"ClCompile\")\nif #files > 0 then\nlocal config_mappings = {}\nfor _, cfginfo in ipairs(configs) do\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\nif cfg.pchheader and cfg.pchsource and not cfg.flags.NoPCH then\nconfig_mappings[cfginfo"
|
||||
"] = path.translate(cfg.pchsource, \"\\\\\")\nend\nend\n_p(1,'<ItemGroup>')\nfor _, file in ipairs(files) do\nlocal translatedpath = path.translate(file.name, \"\\\\\")\n_p(2, '<ClCompile Include=\\\"%s\\\">', translatedpath)\n_p(3, '<ObjectFileName>$(IntDir)%s.obj</ObjectFileName>'\n, premake.esc(path.translate(path.trimdots(path.removeext(file.name))))\n)\nfor _, cfginfo in ipairs(configs) do\nif config_mappings[cfginfo] and translatedpath == config_mappings[cfginfo] then\n_p(3,'<PrecompiledHeader '.. if_config_and_platform() .. '>Create</PrecompiledHeader>', premake.esc(cfginfo.name))\nconfig_mappings[cfginfo] = nil --only one source file per pch\nend\nend\nlocal excluded = table.icontains(prj.excludes, file.name)\nfor _, vsconfig in ipairs(configs) do\nlocal cfg = premake.getconfig(prj, vsconfig.src_buildcfg, vsconfig.src_platform)\nif excluded or table.icontains(cfg.excludes, file.name) then\n_p(3, '<ExcludedFromBuild '\n.. if_config_and_platform()\n.. '>true</ExcludedFromBuild>'\n, premake.esc(vsconfig.n"
|
||||
"ame)\n)\nend\nend\n_p(2,'</ClCompile>')\nend\n_p(1,'</ItemGroup>')\nend\nend\nfunction vc2010.header(targets)\nio.eol = \"\\r\\n\"\n_p('<?xml version=\"1.0\" encoding=\"utf-8\"?>')\nlocal t = \"\"\nif targets then\nt = ' DefaultTargets=\"' .. targets .. '\"'\nend\n_p('<Project%s ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">', t)\nend\nfunction premake.vs2010_vcxproj(prj)\nio.indent = \" \"\nvc2010.header(\"Build\")\nvs2010_config(prj)\nvs2010_globals(prj)\n_p(1,'<Import Project=\"$(VCTargetsPath)\\\\Microsoft.Cpp.Default.props\" />')\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\nvc2010.configurationPropertyGroup(cfg, cfginfo)\nend\n_p(1,'<Import Project=\"$(VCTargetsPath)\\\\Microsoft.Cpp.props\" />')\n_p(1,'<ImportGroup Label=\"ExtensionSettings\">')\n_p(1,'</ImportGroup>')\nimport_props(prj)\n_p(1,'<PropertyGroup Label=\"UserMacros\" />')\nvc2010.outputProperties(prj)\nitem_def"
|
||||
"initions(prj)\nvc2010.files(prj)\nvc2010.projectReferences(prj)\n_p(1,'<Import Project=\"$(VCTargetsPath)\\\\Microsoft.Cpp.targets\" />')\n_p(1,'<ImportGroup Label=\"ExtensionTargets\">')\n_p(1,'</ImportGroup>')\n_p('</Project>')\nend\nfunction vc2010.projectReferences(prj)\nlocal deps = premake.getdependencies(prj)\nif #deps > 0 then\n_p(1,'<ItemGroup>')\nfor _, dep in ipairs(deps) do\nlocal deppath = path.getrelative(prj.location, vstudio.projectfile(dep))\n_p(2,'<ProjectReference Include=\\\"%s\\\">', path.translate(deppath, \"\\\\\"))\n_p(3,'<Project>{%s}</Project>', dep.uuid)\nif vstudio.toolset == \"v120_wp81\" then\n_p(3,'<ReferenceOutputAssembly>false</ReferenceOutputAssembly>')\nend\n_p(2,'</ProjectReference>')\nend\n_p(1,'</ItemGroup>')\nend\nend\nfunction vc2010.debugdir(cfg)\nif cfg.debugdir then\n_p(' <LocalDebuggerWorkingDirectory>%s</LocalDebuggerWorkingDirectory>', path.translate(cfg.debugdir, '\\\\'))\n_p(' <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>')\nend\nif cfg.debugargs th"
|
||||
"en\n_p(' <LocalDebuggerCommandArguments>%s</LocalDebuggerCommandArguments>', table.concat(cfg.debugargs, \" \"))\nend\nend\nfunction vc2010.debugenvs(cfg)\nif cfg.debugenvs and #cfg.debugenvs > 0 then\n_p(2,'<LocalDebuggerEnvironment>%s%s</LocalDebuggerEnvironment>',table.concat(cfg.debugenvs, \"\\n\")\n,iif(cfg.flags.DebugEnvsInherit,'\\n$(LocalDebuggerEnvironment)','')\n)\nif cfg.flags.DebugEnvsDontMerge then\n_p(2,'<LocalDebuggerMergeEnvironment>false</LocalDebuggerMergeEnvironment>')\nend\nend\nend\nfunction premake.vs2010_vcxproj_user(prj)\nio.indent = \" \"\nvc2010.header()\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\n_p(' <PropertyGroup '.. if_config_and_platform() ..'>', premake.esc(cfginfo.name))\nvc2010.debugdir(cfg)\nvc2010.debugenvs(cfg)\n_p(' </PropertyGroup>')\nend\n_p('</Project>')\nend\nfunction premake.vs2010_appxmanifest(prj)\nio.indent = \" \"\nio.eol = \"\\r\\n\"\n_p('<?xml version=\"1.0\" "
|
||||
"encoding=\"utf-8\"?>')\n_p('<Package xmlns=\"http://schemas.microsoft.com/appx/2010/manifest\" xmlns:m2=\"http://schemas.microsoft.com/appx/2013/manifest\" xmlns:m3=\"http://schemas.microsoft.com/appx/2014/manifest\" xmlns:mp=\"http://schemas.microsoft.com/appx/2014/phone/manifest\">')\n_p(1,'<Identity Name=\"' .. prj.uuid .. '\"')\n_p(2,'Publisher=\"CN=Unknown\"')\n_p(2,'Version=\"1.0.0.0\" />')\n_p(1,'<mp:PhoneIdentity PhoneProductId=\"' .. prj.uuid .. '\" PhonePublisherId=\"00000000-0000-0000-0000-000000000000\"/>')\n_p(1,'<Properties>')\n_p(2,'<DisplayName>' .. prj.name .. '</DisplayName>')\n_p(2,'<PublisherDisplayName>Unknown</PublisherDisplayName>')\n_p(2,'<Logo>EmptyLogo.png</Logo>')\n_p(1,'</Properties>')\n_p(1,'<Prerequisites>')\n_p(2,'<OSMinVersion>6.3.1</OSMinVersion>')\n_p(2,'<OSMaxVersionTested>6.3.1</OSMaxVersionTested>')\n_p(1,'</Prerequisites>')\n_p(1,'<Resources>')\n_p(2,'<Resource Language=\"x-generate\"/>')\n_p(1,'</Resources>')\n_p(1,'<Applications>')\n_p(2,'<Application Id=\"App\"')\n_p(3,"
|
||||
"'Executable=\"$targetnametoken$.exe\"')\n_p(3,'EntryPoint=\"App\">')\n_p(3,'<m3:VisualElements')\n_p(4,'DisplayName=\"Blah\"')\n_p(4,'Square150x150Logo=\"Assets\\\\Logo.png\"')\n_p(4,'Square44x44Logo=\"Assets\\\\SmallLogo.png\"')\n_p(4,'Description=\"Blah\"')\n_p(4,'ForegroundText=\"light\"')\n_p(4,'BackgroundColor=\"transparent\">')\n_p(3,'</m3:VisualElements>')\n_p(2,'</Application>')\n_p(1,'</Applications>')\n_p('</Package>')\nend\n",
|
||||
"esgroup(prj)\nvc2010.simplefilesgroup(prj, \"None\")\nvc2010.customtaskgroup(prj)\nvc2010.simplefilesgroup(prj, \"ResourceCompile\")\nvc2010.simplefilesgroup(prj, \"AppxManifest\")\nend\nfunction vc2010.customtaskgroup(prj)\nlocal files = { }\nfor _, custombuildtask in ipairs(prj.custombuildtask or {}) do\nfor _, buildtask in ipairs(custombuildtask or {}) do\nlocal fcfg = { }\nfcfg.name = path.getrelative(prj.location,buildtask[1])\nfcfg.vpath = path.trimdots(fcfg.name)\ntable.insert(files, fcfg)\nend\nend\nif #files > 0 then\n_p(1,'<ItemGroup>')\nlocal groupedBuildTasks = {}\nfor _, custombuildtask in ipairs(prj.custombuildtask or {}) do\nfor _, buildtask in ipairs(custombuildtask or {}) do\nif (groupedBuildTasks[buildtask[1]] == nil) then\ngroupedBuildTasks[buildtask[1]] = {}\nend\ntable.insert(groupedBuildTasks[buildtask[1]], buildtask)\nend\nend\nfor name, custombuildtask in pairs(groupedBuildTasks or {}) do\n_p(2,'<CustomBuild Include=\\\"%s\\\">', path.translate(path.getrelative(prj.location,name), \""
|
||||
"\\\\\"))\n_p(3,'<FileType>Text</FileType>')\nlocal cmd = \"\"\nlocal outputs = \"\"\nfor _, buildtask in ipairs(custombuildtask or {}) do\nfor _, cmdline in ipairs(buildtask[4] or {}) do\ncmd = cmd .. cmdline\nlocal num = 1\nfor _, depdata in ipairs(buildtask[3] or {}) do\ncmd = string.gsub(cmd,\"%$%(\" .. num ..\"%)\", string.format(\"%s \",path.getrelative(prj.location,depdata)))\nnum = num + 1\nend\ncmd = string.gsub(cmd, \"%$%(<%)\", string.format(\"%s \",path.getrelative(prj.location,buildtask[1])))\ncmd = string.gsub(cmd, \"%$%(@%)\", string.format(\"%s \",path.getrelative(prj.location,buildtask[2])))\ncmd = cmd .. \"\\r\\n\"\nend \noutputs = outputs .. path.getrelative(prj.location,buildtask[2]) .. \";\"\nend\n_p(3,'<Command>%s</Command>',cmd)\n_p(3,'<Outputs>%s%%(Outputs)</Outputs>',outputs)\n_p(3,'<SubType>Designer</SubType>')\n_p(3,'<Message></Message>')\n_p(2,'</CustomBuild>')\nend\n_p(1,'</ItemGroup>')\nend\nend\nfunction vc2010.simplefilesgroup(prj, section, subtype)\nlocal files = vc2010.getfileg"
|
||||
"roup(prj, section)\nif #files > 0 then\n_p(1,'<ItemGroup>')\nfor _, file in ipairs(files) do\nif subtype then\n_p(2,'<%s Include=\\\"%s\\\">', section, path.translate(file.name, \"\\\\\"))\n_p(3,'<SubType>%s</SubType>', subtype)\n_p(2,'</%s>', section)\nelse\n_p(2,'<%s Include=\\\"%s\\\" />', section, path.translate(file.name, \"\\\\\"))\nend\nend\n_p(1,'</ItemGroup>')\nend\nend\nfunction vc2010.compilerfilesgroup(prj)\nlocal configs = prj.solution.vstudio_configs\nlocal files = vc2010.getfilegroup(prj, \"ClCompile\")\nif #files > 0 then\nlocal config_mappings = {}\nfor _, cfginfo in ipairs(configs) do\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\nif cfg.pchheader and cfg.pchsource and not cfg.flags.NoPCH then\nconfig_mappings[cfginfo] = path.translate(cfg.pchsource, \"\\\\\")\nend\nend\n_p(1,'<ItemGroup>')\nfor _, file in ipairs(files) do\nlocal translatedpath = path.translate(file.name, \"\\\\\")\n_p(2, '<ClCompile Include=\\\"%s\\\">', translatedpath)\n_p(3, '<ObjectFile"
|
||||
"Name>$(IntDir)%s.obj</ObjectFileName>'\n, premake.esc(path.translate(path.trimdots(path.removeext(file.name))))\n)\nfor _, cfginfo in ipairs(configs) do\nif config_mappings[cfginfo] and translatedpath == config_mappings[cfginfo] then\n_p(3,'<PrecompiledHeader '.. if_config_and_platform() .. '>Create</PrecompiledHeader>', premake.esc(cfginfo.name))\nconfig_mappings[cfginfo] = nil --only one source file per pch\nend\nend\nlocal excluded = table.icontains(prj.excludes, file.name)\nfor _, vsconfig in ipairs(configs) do\nlocal cfg = premake.getconfig(prj, vsconfig.src_buildcfg, vsconfig.src_platform)\nif excluded or table.icontains(cfg.excludes, file.name) then\n_p(3, '<ExcludedFromBuild '\n.. if_config_and_platform()\n.. '>true</ExcludedFromBuild>'\n, premake.esc(vsconfig.name)\n)\nend\nend\n_p(2,'</ClCompile>')\nend\n_p(1,'</ItemGroup>')\nend\nend\nfunction vc2010.header(targets)\nio.eol = \"\\r\\n\"\n_p('<?xml version=\"1.0\" encoding=\"utf-8\"?>')\nlocal t = \"\"\nif targets then\nt = ' DefaultTargets=\"' .. t"
|
||||
"argets .. '\"'\nend\n_p('<Project%s ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">', t)\nend\nfunction premake.vs2010_vcxproj(prj)\nio.indent = \" \"\nvc2010.header(\"Build\")\nvs2010_config(prj)\nvs2010_globals(prj)\n_p(1,'<Import Project=\"$(VCTargetsPath)\\\\Microsoft.Cpp.Default.props\" />')\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\nvc2010.configurationPropertyGroup(cfg, cfginfo)\nend\n_p(1,'<Import Project=\"$(VCTargetsPath)\\\\Microsoft.Cpp.props\" />')\n_p(1,'<ImportGroup Label=\"ExtensionSettings\">')\n_p(1,'</ImportGroup>')\nimport_props(prj)\n_p(1,'<PropertyGroup Label=\"UserMacros\" />')\nvc2010.outputProperties(prj)\nitem_definitions(prj)\nvc2010.files(prj)\nvc2010.projectReferences(prj)\n_p(1,'<Import Project=\"$(VCTargetsPath)\\\\Microsoft.Cpp.targets\" />')\n_p(1,'<ImportGroup Label=\"ExtensionTargets\">')\n_p(1,'</ImportGroup>')\n_p('</Project>')\nend\nfunction"
|
||||
" vc2010.projectReferences(prj)\nlocal deps = premake.getdependencies(prj)\nif #deps > 0 then\n_p(1,'<ItemGroup>')\nfor _, dep in ipairs(deps) do\nlocal deppath = path.getrelative(prj.location, vstudio.projectfile(dep))\n_p(2,'<ProjectReference Include=\\\"%s\\\">', path.translate(deppath, \"\\\\\"))\n_p(3,'<Project>{%s}</Project>', dep.uuid)\nif vstudio.toolset == \"v120_wp81\" then\n_p(3,'<ReferenceOutputAssembly>false</ReferenceOutputAssembly>')\nend\n_p(2,'</ProjectReference>')\nend\n_p(1,'</ItemGroup>')\nend\nend\nfunction vc2010.debugdir(cfg)\nif cfg.debugdir then\n_p(' <LocalDebuggerWorkingDirectory>%s</LocalDebuggerWorkingDirectory>', path.translate(cfg.debugdir, '\\\\'))\n_p(' <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>')\nend\nif cfg.debugargs then\n_p(' <LocalDebuggerCommandArguments>%s</LocalDebuggerCommandArguments>', table.concat(cfg.debugargs, \" \"))\nend\nend\nfunction vc2010.debugenvs(cfg)\nif cfg.debugenvs and #cfg.debugenvs > 0 then\n_p(2,'<LocalDebuggerEnvironment>%s%s</L"
|
||||
"ocalDebuggerEnvironment>',table.concat(cfg.debugenvs, \"\\n\")\n,iif(cfg.flags.DebugEnvsInherit,'\\n$(LocalDebuggerEnvironment)','')\n)\nif cfg.flags.DebugEnvsDontMerge then\n_p(2,'<LocalDebuggerMergeEnvironment>false</LocalDebuggerMergeEnvironment>')\nend\nend\nend\nfunction premake.vs2010_vcxproj_user(prj)\nio.indent = \" \"\nvc2010.header()\nfor _, cfginfo in ipairs(prj.solution.vstudio_configs) do\nlocal cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)\n_p(' <PropertyGroup '.. if_config_and_platform() ..'>', premake.esc(cfginfo.name))\nvc2010.debugdir(cfg)\nvc2010.debugenvs(cfg)\n_p(' </PropertyGroup>')\nend\n_p('</Project>')\nend\nfunction premake.vs2010_appxmanifest(prj)\nio.indent = \" \"\nio.eol = \"\\r\\n\"\n_p('<?xml version=\"1.0\" encoding=\"utf-8\"?>')\n_p('<Package xmlns=\"http://schemas.microsoft.com/appx/2010/manifest\" xmlns:m2=\"http://schemas.microsoft.com/appx/2013/manifest\" xmlns:m3=\"http://schemas.microsoft.com/appx/2014/manifest\" xmlns:mp=\"http://schemas.m"
|
||||
"icrosoft.com/appx/2014/phone/manifest\">')\n_p(1,'<Identity Name=\"' .. prj.uuid .. '\"')\n_p(2,'Publisher=\"CN=Unknown\"')\n_p(2,'Version=\"1.0.0.0\" />')\n_p(1,'<mp:PhoneIdentity PhoneProductId=\"' .. prj.uuid .. '\" PhonePublisherId=\"00000000-0000-0000-0000-000000000000\"/>')\n_p(1,'<Properties>')\n_p(2,'<DisplayName>' .. prj.name .. '</DisplayName>')\n_p(2,'<PublisherDisplayName>Unknown</PublisherDisplayName>')\n_p(2,'<Logo>EmptyLogo.png</Logo>')\n_p(1,'</Properties>')\n_p(1,'<Prerequisites>')\n_p(2,'<OSMinVersion>6.3.1</OSMinVersion>')\n_p(2,'<OSMaxVersionTested>6.3.1</OSMaxVersionTested>')\n_p(1,'</Prerequisites>')\n_p(1,'<Resources>')\n_p(2,'<Resource Language=\"x-generate\"/>')\n_p(1,'</Resources>')\n_p(1,'<Applications>')\n_p(2,'<Application Id=\"App\"')\n_p(3,'Executable=\"$targetnametoken$.exe\"')\n_p(3,'EntryPoint=\"App\">')\n_p(3,'<m3:VisualElements')\n_p(4,'DisplayName=\"Blah\"')\n_p(4,'Square150x150Logo=\"Assets\\\\Logo.png\"')\n_p(4,'Square44x44Logo=\"Assets\\\\SmallLogo.png\"')\n_p(4,'Descrip"
|
||||
"tion=\"Blah\"')\n_p(4,'ForegroundText=\"light\"')\n_p(4,'BackgroundColor=\"transparent\">')\n_p(3,'</m3:VisualElements>')\n_p(2,'</Application>')\n_p(1,'</Applications>')\n_p('</Package>')\nend\n",
|
||||
|
||||
/* actions/vstudio/vs2010_vcxproj_filters.lua */
|
||||
"local vc2010 = premake.vstudio.vc2010\nlocal project = premake.project\nfunction vc2010.filteridgroup(prj)\nlocal filters = { }\nlocal filterfound = false\nfor file in project.eachfile(prj) do\nlocal folders = string.explode(file.vpath, \"/\", true)\nlocal path = \"\"\nfor i = 1, #folders - 1 do\nif not filterfound then\nfilterfound = true\n_p(1,'<ItemGroup>')\nend\npath = path .. folders[i]\nif not filters[path] then\nfilters[path] = true\n_p(2, '<Filter Include=\"%s\">', path)\n_p(3, '<UniqueIdentifier>{%s}</UniqueIdentifier>', os.uuid())\n_p(2, '</Filter>')\nend\npath = path .. \"\\\\\"\nend\nend\nif filterfound then\n_p(1,'</ItemGroup>')\nend\nend\nfunction vc2010.filefiltergroup(prj, section)\nlocal files = vc2010.getfilegroup(prj, section)\nif #files > 0 then\n_p(1,'<ItemGroup>')\nfor _, file in ipairs(files) do\nlocal filter\nif file.name ~= file.vpath then\nfilter = path.getdirectory(file.vpath)\nelse\nfilter = path.getdirectory(file.name)\nend\nif filter ~= \".\" then\n_p(2,'<%s Include=\\\"%s\\\">', "
|
||||
"section, path.translate(file.name, \"\\\\\"))\n_p(3,'<Filter>%s</Filter>', path.translate(filter, \"\\\\\"))\n_p(2,'</%s>', section)\nelse\n_p(2,'<%s Include=\\\"%s\\\" />', section, path.translate(file.name, \"\\\\\"))\nend\nend\n_p(1,'</ItemGroup>')\nend\nend\nfunction vc2010.generate_filters(prj)\nio.indent = \" \"\nvc2010.header()\nvc2010.filteridgroup(prj)\nvc2010.filefiltergroup(prj, \"None\")\nvc2010.filefiltergroup(prj, \"ClInclude\")\nvc2010.filefiltergroup(prj, \"ClCompile\")\nvc2010.filefiltergroup(prj, \"ResourceCompile\")\n_p('</Project>')\nend\n",
|
||||
"local vc2010 = premake.vstudio.vc2010\nlocal project = premake.project\nfunction vc2010.filteridgroup(prj)\nlocal filters = { }\nlocal filterfound = false\nfor file in project.eachfile(prj) do\nlocal folders = string.explode(file.vpath, \"/\", true)\nlocal path = \"\"\nfor i = 1, #folders - 1 do\nif not filterfound then\nfilterfound = true\n_p(1,'<ItemGroup>')\nend\npath = path .. folders[i]\nif not filters[path] then\nfilters[path] = true\n_p(2, '<Filter Include=\"%s\">', path)\n_p(3, '<UniqueIdentifier>{%s}</UniqueIdentifier>', os.uuid())\n_p(2, '</Filter>')\nend\npath = path .. \"\\\\\"\nend\nend\nfor _, custombuildtask in ipairs(prj.custombuildtask or {}) do\nfor _, buildtask in ipairs(custombuildtask or {}) do\nlocal folders = string.explode(path.trimdots(path.getrelative(prj.location,buildtask[1])), \"/\", true)\nlocal path = \"\"\nfor i = 1, #folders - 1 do\nif not filterfound then\nfilterfound = true\n_p(1,'<ItemGroup>')\nend\npath = path .. folders[i]\nif not filters[path] then\nfilters[path] = true\n"
|
||||
"_p(2, '<Filter Include=\"%s\">', path)\n_p(3, '<UniqueIdentifier>{%s}</UniqueIdentifier>', os.uuid())\n_p(2, '</Filter>')\nend\npath = path .. \"\\\\\"\nend\nend\nend\nif filterfound then\n_p(1,'</ItemGroup>')\nend\nend\nfunction vc2010.filefiltergroup(prj, section)\nlocal files = vc2010.getfilegroup(prj, section) or {}\nif (section == \"CustomBuild\") then\nfor _, custombuildtask in ipairs(prj.custombuildtask or {}) do\nfor _, buildtask in ipairs(custombuildtask or {}) do\nlocal fcfg = { }\nfcfg.name = path.getrelative(prj.location,buildtask[1])\nfcfg.vpath = path.trimdots(fcfg.name)\ntable.insert(files, fcfg)\nend\nend\nend\nif #files > 0 then\n_p(1,'<ItemGroup>')\nfor _, file in ipairs(files) do\nlocal filter\nif file.name ~= file.vpath then\nfilter = path.getdirectory(file.vpath)\nelse\nfilter = path.getdirectory(file.name)\nend\nif filter ~= \".\" then\n_p(2,'<%s Include=\\\"%s\\\">', section, path.translate(file.name, \"\\\\\"))\n_p(3,'<Filter>%s</Filter>', path.translate(filter, \"\\\\\"))\n_p(2,'</%s>'"
|
||||
", section)\nelse\n_p(2,'<%s Include=\\\"%s\\\" />', section, path.translate(file.name, \"\\\\\"))\nend\nend\n_p(1,'</ItemGroup>')\nend\nend\nfunction vc2010.generate_filters(prj)\nio.indent = \" \"\nvc2010.header()\nvc2010.filteridgroup(prj)\nvc2010.filefiltergroup(prj, \"None\")\nvc2010.filefiltergroup(prj, \"ClInclude\")\nvc2010.filefiltergroup(prj, \"ClCompile\")\nvc2010.filefiltergroup(prj, \"ResourceCompile\")\nvc2010.filefiltergroup(prj, \"CustomBuild\")\n_p('</Project>')\nend\n",
|
||||
|
||||
/* actions/vstudio/vs2012.lua */
|
||||
"premake.vstudio.vc2012 = {}\nlocal vc2012 = premake.vstudio.vc2012\nlocal vstudio = premake.vstudio\nnewaction\n{\ntrigger = \"vs2012\",\nshortname = \"Visual Studio 2012\",\ndescription = \"Generate Microsoft Visual Studio 2012 project files\",\nos = \"windows\",\nvalid_kinds = { \"ConsoleApp\", \"WindowedApp\", \"StaticLib\", \"SharedLib\" },\nvalid_languages = { \"C\", \"C++\", \"C#\"},\nvalid_tools = {\ncc = { \"msc\" },\ndotnet = { \"msnet\" },\n},\nonsolution = function(sln)\npremake.generate(sln, \"%%.sln\", vstudio.sln2005.generate)\nend,\nonproject = function(prj)\nif premake.isdotnetproject(prj) then\npremake.generate(prj, \"%%.csproj\", vstudio.cs2005.generate)\npremake.generate(prj, \"%%.csproj.user\", vstudio.cs2005.generate_user)\nelse\npremake.generate(prj, \"%%.vcxproj\", premake.vs2010_vcxproj)\npremake.generate(prj, \"%%.vcxproj.user\", premake.vs2010_vcxproj_user)\npremake.generate(prj, \"%%.vcxproj.filters\", vstudio.vc2010.generate_filters)\nend"
|
||||
@ -297,23 +302,23 @@ const char* builtin_scripts[] = {
|
||||
/* actions/xcode/xcode_common.lua */
|
||||
"local xcode = premake.xcode\nlocal tree = premake.tree\nfunction xcode.getbuildcategory(node)\nlocal categories = {\n[\".a\"] = \"Frameworks\",\n[\".c\"] = \"Sources\",\n[\".cc\"] = \"Sources\",\n[\".cpp\"] = \"Sources\",\n[\".cxx\"] = \"Sources\",\n[\".dylib\"] = \"Frameworks\",\n[\".framework\"] = \"Frameworks\",\n[\".m\"] = \"Sources\",\n[\".mm\"] = \"Sources\",\n[\".strings\"] = \"Resources\",\n[\".nib\"] = \"Resources\",\n[\".xib\"] = \"Resources\",\n[\".icns\"] = \"Resources\",\n[\".bmp\"] = \"Resources\",\n[\".wav\"] = \"Resources\",\n}\nreturn categories[path.getextension(node.name)]\nend\nfunction xcode.getconfigname(cfg)\nlocal name = cfg.name\nif #cfg.project.solution.xcode.platforms > 1 then\nname = name .. \" \" .. premake.action.current().valid_platforms[cfg.platform]\nend\nreturn name\nend\nfunction xcode.getfiletype(node)\nlocal types = {\n[\".c\"] = \"sourcecode.c.c\",\n[\".cc\"] = \"sourcecode.cpp.cpp\",\n[\".cpp\"] = \"sourcecode.cpp.cpp\",\n[\".css\"] = \"text.cs"
|
||||
"s\",\n[\".cxx\"] = \"sourcecode.cpp.cpp\",\n[\".framework\"] = \"wrapper.framework\",\n[\".gif\"] = \"image.gif\",\n[\".h\"] = \"sourcecode.c.h\",\n[\".html\"] = \"text.html\",\n[\".lua\"] = \"sourcecode.lua\",\n[\".m\"] = \"sourcecode.c.objc\",\n[\".mm\"] = \"sourcecode.cpp.objc\",\n[\".nib\"] = \"wrapper.nib\",\n[\".pch\"] = \"sourcecode.c.h\",\n[\".plist\"] = \"text.plist.xml\",\n[\".strings\"] = \"text.plist.strings\",\n[\".xib\"] = \"file.xib\",\n[\".icns\"] = \"image.icns\",\n[\".bmp\"] = \"image.bmp\",\n[\".wav\"] = \"audio.wav\",\n}\nreturn types[path.getextension(node.path)] or \"text\"\nend\nfunction xcode.getfiletypeForced(node)\nlocal types = {\n[\".c\"] = \"sourcecode.cpp.cpp\",\n[\".cc\"] = \"sourcecode.cpp.cpp\",\n[\".cpp\"] = \"sourcecode.cpp.cpp\",\n[\".css\"] = \"text.css\",\n[\".cxx\"] = \"sourcecode.cpp.cpp\",\n[\".framework\"] = \"wrapper.framework\",\n[\".gif\"] = "
|
||||
"\"image.gif\",\n[\".h\"] = \"sourcecode.cpp.h\",\n[\".html\"] = \"text.html\",\n[\".lua\"] = \"sourcecode.lua\",\n[\".m\"] = \"sourcecode.c.objc\",\n[\".mm\"] = \"sourcecode.cpp.objc\",\n[\".nib\"] = \"wrapper.nib\",\n[\".pch\"] = \"sourcecode.cpp.h\",\n[\".plist\"] = \"text.plist.xml\",\n[\".strings\"] = \"text.plist.strings\",\n[\".xib\"] = \"file.xib\",\n[\".icns\"] = \"image.icns\",\n[\".bmp\"] = \"image.bmp\",\n[\".wav\"] = \"audio.wav\",\n}\nreturn types[path.getextension(node.path)] or \"text\"\nend\nfunction xcode.getproducttype(node)\nlocal types = {\nConsoleApp = \"com.apple.product-type.tool\",\nWindowedApp = \"com.apple.product-type.application\",\nStaticLib = \"com.apple.product-type.library.static\",\nSharedLib = \"com.apple.product-type.library.dynamic\",\n}\nreturn types[node.cfg.kind]\nend\nfunction xcode.gettargettype(node)\nlocal types = {\nConsoleApp = \"\\\"compiled.mach-o.executable\\\"\",\nWindowedApp = \"wr"
|
||||
"apper.application\",\nStaticLib = \"archive.ar\",\nSharedLib = \"\\\"compiled.mach-o.dylib\\\"\",\n}\nreturn types[node.cfg.kind]\nend\nfunction xcode.getxcodeprojname(prj)\nlocal fname = premake.project.getfilename(prj, \"%%.xcodeproj\")\nreturn fname\nend\nfunction xcode.isframework(fname)\nreturn (path.getextension(fname) == \".framework\")\nend\nfunction xcode.newid()\nreturn string.format(\"%04X%04X%04X%04X%04X%04X\",\nmath.random(0, 32767),\nmath.random(0, 32767),\nmath.random(0, 32767),\nmath.random(0, 32767),\nmath.random(0, 32767),\nmath.random(0, 32767))\nend\nfunction xcode.preparesolution(sln)\nsln.xcode = { }\nsln.xcode.platforms = premake.filterplatforms(sln, premake.action.current().valid_platforms, \"Universal\")\nfor prj in premake.solution.eachproject(sln) do\nlocal cfg = premake.getconfig(prj, prj.configurations[1], sln.xcode.platforms[1])\nlocal node = premake.tree.new(path.getname(cfg.buildtarget.bundlepath))\nnode.cfg = cfg\nnode.id = premake.xcode.newid(node, \"product\")\nnode.targe"
|
||||
"tid = premake.xcode.newid(node, \"target\")\nprj.xcode = {}\nprj.xcode.projectnode = node\nend\nend\nfunction xcode.printlist(list, tag)\nif #list > 0 then\n_p(4,'%s = (', tag)\nfor _, item in ipairs(list) do\nlocal escaped_item = item:gsub(\"\\\"\", \"\\\\\\\"\")\n_p(5, '\"%s\",', escaped_item)\nend\n_p(4,');')\nend\nend\nfunction xcode.Header()\n_p('// !$*UTF8*$!')\n_p('{')\n_p(1,'archiveVersion = 1;')\n_p(1,'classes = {')\n_p(1,'};')\n_p(1,'objectVersion = 45;')\n_p(1,'objects = {')\n_p('')\nend\nfunction xcode.PBXBuildFile(tr)\n_p('/* Begin PBXBuildFile section */')\ntree.traverse(tr, {\nonnode = function(node)\nif node.buildid then\n_p(2,'%s /* %s in %s */ = {isa = PBXBuildFile; fileRef = %s /* %s */; };', \nnode.buildid, node.name, xcode.getbuildcategory(node), node.id, node.name)\nend\nend\n})\n_p('/* End PBXBuildFile section */')\n_p('')\nend\nfunction xcode.PBXContainerItemProxy(tr)\nif #tr.projects.children > 0 then\n_p('/* Begin PBXContainerItemProxy section */')\nfor _, node in ipairs(tr.projects.c"
|
||||
"hildren) do\n_p(2,'%s /* PBXContainerItemProxy */ = {', node.productproxyid)\n_p(3,'isa = PBXContainerItemProxy;')\n_p(3,'containerPortal = %s /* %s */;', node.id, path.getname(node.path))\n_p(3,'proxyType = 2;')\n_p(3,'remoteGlobalIDString = %s;', node.project.xcode.projectnode.id)\n_p(3,'remoteInfo = \"%s\";', node.project.xcode.projectnode.name)\n_p(2,'};')\n_p(2,'%s /* PBXContainerItemProxy */ = {', node.targetproxyid)\n_p(3,'isa = PBXContainerItemProxy;')\n_p(3,'containerPortal = %s /* %s */;', node.id, path.getname(node.path))\n_p(3,'proxyType = 1;')\n_p(3,'remoteGlobalIDString = %s;', node.project.xcode.projectnode.targetid)\n_p(3,'remoteInfo = \"%s\";', node.project.xcode.projectnode.name)\n_p(2,'};')\nend\n_p('/* End PBXContainerItemProxy section */')\n_p('')\nend\nend\nfunction xcode.PBXFileReference(tr,prj)\n_p('/* Begin PBXFileReference section */')\ntree.traverse(tr, {\nonleaf = function(node)\nif not node.path then\nreturn\nend\nif node.kind == \"product\" then\n_p(2,'%s /* %s */ = {isa = PBXFile"
|
||||
"Reference; explicitFileType = %s; includeInIndex = 0; name = \"%s\"; path = \"%s\"; sourceTree = BUILT_PRODUCTS_DIR; };',\nnode.id, node.name, xcode.gettargettype(node), node.name, path.getname(node.cfg.buildtarget.bundlepath))\nelseif node.parent.parent == tr.projects then\nlocal relpath = path.getrelative(tr.project.location, node.parent.project.location)\n_p(2,'%s /* %s */ = {isa = PBXFileReference; lastKnownFileType = \"wrapper.pb-project\"; name = \"%s\"; path = \"%s\"; sourceTree = SOURCE_ROOT; };',\nnode.parent.id, node.parent.name, node.parent.name, path.join(relpath, node.parent.name))\nelse\nlocal pth, src\nif xcode.isframework(node.path) then\nlocal nodePath = node.path\nlocal _, matchEnd, variable = string.find(nodePath, \"^%$%((.+)%)/\")\nif variable then\nnodePath = string.sub(nodePath, matchEnd + 1)\nend\nif string.find(nodePath,'/') then\nif string.find(nodePath,'^%.')then\nerror('relative paths are not currently supported for frameworks')\nend\npth = nodePath\nelse\npth = \"/System/Library/Fr"
|
||||
"ameworks/\" .. nodePath\nend\nif variable then\nsrc = variable\nif string.find(pth, '^/') then\npth = string.sub(pth, 2)\nend\nelse\nsrc = \"<absolute>\"\nend\nelse\nsrc = \"<group>\"\nif node.parent.isvpath then\npth = node.cfg.name\nelse\npth = tree.getlocalpath(node)\nend\nend\nif (not prj.options.ForceCPP) then\n_p(2,'%s /* %s */ = {isa = PBXFileReference; lastKnownFileType = %s; name = \"%s\"; path = \"%s\"; sourceTree = \"%s\"; };',\nnode.id, node.name, xcode.getfiletype(node), node.name, pth, src)\nelse\n_p(2,'%s /* %s */ = {isa = PBXFileReference; explicitFileType = %s; name = \"%s\"; path = \"%s\"; sourceTree = \"%s\"; };',\nnode.id, node.name, xcode.getfiletypeForced(node), node.name, pth, src)\nend\nend\nend\n})\n_p('/* End PBXFileReference section */')\n_p('')\nend\nfunction xcode.PBXFrameworksBuildPhase(tr)\n_p('/* Begin PBXFrameworksBuildPhase section */')\n_p(2,'%s /* Frameworks */ = {', tr.products.children[1].fxstageid)\n_p(3,'isa = PBXFrameworksBuildPhase;')\n_p(3,'buildActionMask = 214748364"
|
||||
"7;')\n_p(3,'files = (')\ntree.traverse(tr.frameworks, {\nonleaf = function(node)\n_p(4,'%s /* %s in Frameworks */,', node.buildid, node.name)\nend\n})\ntree.traverse(tr.projects, {\nonleaf = function(node)\n_p(4,'%s /* %s in Frameworks */,', node.buildid, node.name)\nend\n})\n_p(3,');')\n_p(3,'runOnlyForDeploymentPostprocessing = 0;')\n_p(2,'};')\n_p('/* End PBXFrameworksBuildPhase section */')\n_p('')\nend\nfunction xcode.PBXGroup(tr)\n_p('/* Begin PBXGroup section */')\ntree.traverse(tr, {\nonnode = function(node)\nif (node.path and #node.children == 0) or node.kind == \"vgroup\" then\nreturn\nend\nif node.parent == tr.projects then\n_p(2,'%s /* Products */ = {', node.productgroupid)\nelse\n_p(2,'%s /* %s */ = {', node.id, node.name)\nend\n_p(3,'isa = PBXGroup;')\n_p(3,'children = (')\nfor _, childnode in ipairs(node.children) do\n_p(4,'%s /* %s */,', childnode.id, childnode.name)\nend\n_p(3,');')\nif node.parent == tr.projects then\n_p(3,'name = Products;')\nelse\n_p(3,'name = \"%s\";', node.name)\nif node."
|
||||
"path and not node.isvpath then\nlocal p = node.path\nif node.parent.path then\np = path.getrelative(node.parent.path, node.path)\nend\n_p(3,'path = \"%s\";', p)\nend\nend\n_p(3,'sourceTree = \"<group>\";')\n_p(2,'};')\nend\n}, true)\n_p('/* End PBXGroup section */')\n_p('')\nend\nfunction xcode.PBXNativeTarget(tr)\n_p('/* Begin PBXNativeTarget section */')\nfor _, node in ipairs(tr.products.children) do\nlocal name = tr.project.name\nlocal function hasBuildCommands(which)\nif #tr.project[which] > 0 then\nreturn true\nend\nfor _, cfg in ipairs(tr.configs) do\nif #cfg[which] > 0 then\nreturn true\nend\nend\nend\n_p(2,'%s /* %s */ = {', node.targetid, name)\n_p(3,'isa = PBXNativeTarget;')\n_p(3,'buildConfigurationList = %s /* Build configuration list for PBXNativeTarget \"%s\" */;', node.cfgsection, name)\n_p(3,'buildPhases = (')\nif hasBuildCommands('prebuildcommands') then\n_p(4,'9607AE1010C857E500CD1376 /* Prebuild */,')\nend\n_p(4,'%s /* Resources */,', node.resstageid)\n_p(4,'%s /* Sources */,', node.sources"
|
||||
"id)\nif hasBuildCommands('prelinkcommands') then\n_p(4,'9607AE3510C85E7E00CD1376 /* Prelink */,')\nend\n_p(4,'%s /* Frameworks */,', node.fxstageid)\nif hasBuildCommands('postbuildcommands') then\n_p(4,'9607AE3710C85E8F00CD1376 /* Postbuild */,')\nend\n_p(3,');')\n_p(3,'buildRules = (')\n_p(3,');')\n_p(3,'dependencies = (')\nfor _, node in ipairs(tr.projects.children) do\n_p(4,'%s /* PBXTargetDependency */,', node.targetdependid)\nend\n_p(3,');')\n_p(3,'name = \"%s\";', name)\nlocal p\nif node.cfg.kind == \"ConsoleApp\" then\np = \"$(HOME)/bin\"\nelseif node.cfg.kind == \"WindowedApp\" then\np = \"$(HOME)/Applications\"\nend\nif p then\n_p(3,'productInstallPath = \"%s\";', p)\nend\n_p(3,'productName = \"%s\";', name)\n_p(3,'productReference = %s /* %s */;', node.id, node.name)\n_p(3,'productType = \"%s\";', xcode.getproducttype(node))\n_p(2,'};')\nend\n_p('/* End PBXNativeTarget section */')\n_p('')\nend\nfunction xcode.PBXProject(tr)\n_p('/* Begin PBXProject section */')\n_p(2,'08FB7793FE84155DC02AAC07 /* Pro"
|
||||
"ject object */ = {')\n_p(3,'isa = PBXProject;')\n_p(3,'buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject \"%s\" */;', tr.name)\n_p(3,'compatibilityVersion = \"Xcode 3.2\";')\n_p(3,'hasScannedForEncodings = 1;')\n_p(3,'mainGroup = %s /* %s */;', tr.id, tr.name)\n_p(3,'projectDirPath = \"\";')\nif #tr.projects.children > 0 then\n_p(3,'projectReferences = (')\nfor _, node in ipairs(tr.projects.children) do\n_p(4,'{')\n_p(5,'ProductGroup = %s /* Products */;', node.productgroupid)\n_p(5,'ProjectRef = %s /* %s */;', node.id, path.getname(node.path))\n_p(4,'},')\nend\n_p(3,');')\nend\n_p(3,'projectRoot = \"\";')\n_p(3,'targets = (')\nfor _, node in ipairs(tr.products.children) do\n_p(4,'%s /* %s */,', node.targetid, node.name)\nend\n_p(3,');')\n_p(2,'};')\n_p('/* End PBXProject section */')\n_p('')\nend\nfunction xcode.PBXReferenceProxy(tr)\nif #tr.projects.children > 0 then\n_p('/* Begin PBXReferenceProxy section */')\ntree.traverse(tr.projects, {\nonleaf = function(node)"
|
||||
"\n_p(2,'%s /* %s */ = {', node.id, node.name)\n_p(3,'isa = PBXReferenceProxy;')\n_p(3,'fileType = %s;', xcode.gettargettype(node))\n_p(3,'path = \"%s\";', node.path)\n_p(3,'remoteRef = %s /* PBXContainerItemProxy */;', node.parent.productproxyid)\n_p(3,'sourceTree = BUILT_PRODUCTS_DIR;')\n_p(2,'};')\nend\n})\n_p('/* End PBXReferenceProxy section */')\n_p('')\nend\nend\nfunction xcode.PBXResourcesBuildPhase(tr)\n_p('/* Begin PBXResourcesBuildPhase section */')\nfor _, target in ipairs(tr.products.children) do\n_p(2,'%s /* Resources */ = {', target.resstageid)\n_p(3,'isa = PBXResourcesBuildPhase;')\n_p(3,'buildActionMask = 2147483647;')\n_p(3,'files = (')\ntree.traverse(tr, {\nonnode = function(node)\nif xcode.getbuildcategory(node) == \"Resources\" then\n_p(4,'%s /* %s in Resources */,', node.buildid, node.name)\nend\nend\n})\n_p(3,');')\n_p(3,'runOnlyForDeploymentPostprocessing = 0;')\n_p(2,'};')\nend\n_p('/* End PBXResourcesBuildPhase section */')\n_p('')\nend\nfunction xcode.PBXShellScriptBuildPhase(tr)\nloc"
|
||||
"al wrapperWritten = false\nlocal function doblock(id, name, which)\nlocal prjcmds = tr.project[which]\nlocal commands = table.join(prjcmds, {})\nfor _, cfg in ipairs(tr.configs) do\nlocal cfgcmds = cfg[which]\nif #cfgcmds > #prjcmds then\ntable.insert(commands, 'if [ \"${CONFIGURATION}\" = \"' .. xcode.getconfigname(cfg) .. '\" ]; then')\nfor i = #prjcmds + 1, #cfgcmds do\ntable.insert(commands, cfgcmds[i])\nend\ntable.insert(commands, 'fi')\nend\nend\nif #commands > 0 then\nif not wrapperWritten then\n_p('/* Begin PBXShellScriptBuildPhase section */')\nwrapperWritten = true\nend\n_p(2,'%s /* %s */ = {', id, name)\n_p(3,'isa = PBXShellScriptBuildPhase;')\n_p(3,'buildActionMask = 2147483647;')\n_p(3,'files = (')\n_p(3,');')\n_p(3,'inputPaths = (');\n_p(3,');');\n_p(3,'name = %s;', name);\n_p(3,'outputPaths = (');\n_p(3,');');\n_p(3,'runOnlyForDeploymentPostprocessing = 0;');\n_p(3,'shellPath = /bin/sh;');\n_p(3,'shellScript = \"%s\";', table.concat(commands, \"\\\\n\"):gsub('\"', '\\\\\"'))\n_p(2,'};')\nend\nen"
|
||||
"d\ndoblock(\"9607AE1010C857E500CD1376\", \"Prebuild\", \"prebuildcommands\")\ndoblock(\"9607AE3510C85E7E00CD1376\", \"Prelink\", \"prelinkcommands\")\ndoblock(\"9607AE3710C85E8F00CD1376\", \"Postbuild\", \"postbuildcommands\")\nif wrapperWritten then\n_p('/* End PBXShellScriptBuildPhase section */')\nend\nend\nfunction xcode.PBXSourcesBuildPhase(tr)\n_p('/* Begin PBXSourcesBuildPhase section */')\nfor _, target in ipairs(tr.products.children) do\n_p(2,'%s /* Sources */ = {', target.sourcesid)\n_p(3,'isa = PBXSourcesBuildPhase;')\n_p(3,'buildActionMask = 2147483647;')\n_p(3,'files = (')\ntree.traverse(tr, {\nonleaf = function(node)\nif xcode.getbuildcategory(node) == \"Sources\" then\n_p(4,'%s /* %s in Sources */,', node.buildid, node.name)\nend\nend\n})\n_p(3,');')\n_p(3,'runOnlyForDeploymentPostprocessing = 0;')\n_p(2,'};')\nend\n_p('/* End PBXSourcesBuildPhase section */')\n_p('')\nend\nfunction xcode.PBXVariantGroup(tr)\n_p('/* Begin PBXVariantGroup section */')\ntree.traverse(tr, {\nonbranch = function(nod"
|
||||
"e)\nif node.kind == \"vgroup\" then\n_p(2,'%s /* %s */ = {', node.id, node.name)\n_p(3,'isa = PBXVariantGroup;')\n_p(3,'children = (')\nfor _, lang in ipairs(node.children) do\n_p(4,'%s /* %s */,', lang.id, lang.name)\nend\n_p(3,');')\n_p(3,'name = %s;', node.name)\n_p(3,'sourceTree = \"<group>\";')\n_p(2,'};')\nend\nend\n})\n_p('/* End PBXVariantGroup section */')\n_p('')\nend\nfunction xcode.PBXTargetDependency(tr)\nif #tr.projects.children > 0 then\n_p('/* Begin PBXTargetDependency section */')\ntree.traverse(tr.projects, {\nonleaf = function(node)\n_p(2,'%s /* PBXTargetDependency */ = {', node.parent.targetdependid)\n_p(3,'isa = PBXTargetDependency;')\n_p(3,'name = \"%s\";', node.name)\n_p(3,'targetProxy = %s /* PBXContainerItemProxy */;', node.parent.targetproxyid)\n_p(2,'};')\nend\n})\n_p('/* End PBXTargetDependency section */')\n_p('')\nend\nend\nfunction xcode.XCBuildConfiguration_Target(tr, target, cfg)\nlocal cfgname = xcode.getconfigname(cfg)\n_p(2,'%s /* %s */ = {', cfg.xcode.targetid, cfgname)\n_p"
|
||||
"(3,'isa = XCBuildConfiguration;')\n_p(3,'buildSettings = {')\n_p(4,'ALWAYS_SEARCH_USER_PATHS = NO;')\nif not cfg.flags.Symbols then\n_p(4,'DEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";')\nend\nif cfg.kind ~= \"StaticLib\" and cfg.buildtarget.prefix ~= \"\" then\n_p(4,'EXECUTABLE_PREFIX = %s;', cfg.buildtarget.prefix)\nend\nif cfg.targetextension then\nlocal ext = cfg.targetextension\next = iif(ext:startswith(\".\"), ext:sub(2), ext)\n_p(4,'EXECUTABLE_EXTENSION = %s;', ext)\nend\nlocal outdir = path.getdirectory(cfg.buildtarget.bundlepath)\nif outdir ~= \".\" then\n_p(4,'CONFIGURATION_BUILD_DIR = %s;', outdir)\nend\n_p(4,'GCC_DYNAMIC_NO_PIC = NO;')\n_p(4,'GCC_MODEL_TUNING = G5;')\nif tr.infoplist then\n_p(4,'INFOPLIST_FILE = \"%s\";', tr.infoplist.cfg.name)\nend\ninstallpaths = {\nConsoleApp = '/usr/local/bin',\nWindowedApp = '\"$(HOME)/Applications\"',\nSharedLib = '/usr/local/lib',\nStaticLib = '/usr/local/lib',\n}\n_p(4,'INSTALL_PATH = %s;', installpaths[cfg.kind])\n_p(4,'PRODUCT_NAME = \"%s\";', cfg.build"
|
||||
"target.basename)\n_p(3,'};')\n_p(3,'name = \"%s\";', cfgname)\n_p(2,'};')\nend\nfunction xcode.XCBuildConfiguration_Project(tr, cfg)\nlocal cfgname = xcode.getconfigname(cfg)\n_p(2,'%s /* %s */ = {', cfg.xcode.projectid, cfgname)\n_p(3,'isa = XCBuildConfiguration;')\n_p(3,'buildSettings = {')\nlocal archs = {\nNative = \"$(NATIVE_ARCH_ACTUAL)\",\nx32 = \"i386\",\nx64 = \"x86_64\",\nUniversal32 = \"$(ARCHS_STANDARD_32_BIT)\",\nUniversal64 = \"$(ARCHS_STANDARD_64_BIT)\",\nUniversal = \"$(ARCHS_STANDARD_32_64_BIT)\",\n}\n_p(4,'ARCHS = \"%s\";', archs[cfg.platform])\n_p(4,'SDKROOT = \"%s\";', xcode.toolset)\nlocal targetdir = path.getdirectory(cfg.buildtarget.bundlepath)\nif targetdir ~= \".\" then\n_p(4,'CONFIGURATION_BUILD_DIR = \"$(SYMROOT)\";');\nend\n_p(4,'CONFIGURATION_TEMP_DIR = \"$(OBJROOT)\";')\nif cfg.flags.Symbols then\n_p(4,'COPY_PHASE_STRIP = NO;')\nend\n_p(4,'GCC_C_LANGUAGE_STANDARD = gnu99;')\nif cfg.flags.NoExceptions then\n_p(4,'GCC_ENABLE_CPP_EXCEPTIONS = NO;')\nend\nif cfg.flags.NoRTTI the"
|
||||
"n\n_p(4,'GCC_ENABLE_CPP_RTTI = NO;')\nend\nif _ACTION ~= \"xcode4\" and cfg.flags.Symbols and not cfg.flags.NoEditAndContinue then\n_p(4,'GCC_ENABLE_FIX_AND_CONTINUE = YES;')\nend\nif cfg.flags.NoExceptions then\n_p(4,'GCC_ENABLE_OBJC_EXCEPTIONS = NO;')\nend\nif cfg.flags.Optimize or cfg.flags.OptimizeSize then\n_p(4,'GCC_OPTIMIZATION_LEVEL = s;')\nelseif cfg.flags.OptimizeSpeed then\n_p(4,'GCC_OPTIMIZATION_LEVEL = 3;')\nelse\n_p(4,'GCC_OPTIMIZATION_LEVEL = 0;')\nend\nif cfg.pchheader and not cfg.flags.NoPCH then\n_p(4,'GCC_PRECOMPILE_PREFIX_HEADER = YES;')\n_p(4,'GCC_PREFIX_HEADER = \"%s\";', cfg.pchheader)\nend\nxcode.printlist(cfg.defines, 'GCC_PREPROCESSOR_DEFINITIONS')\n_p(4,'GCC_SYMBOLS_PRIVATE_EXTERN = NO;')\nif cfg.flags.FatalWarnings then\n_p(4,'GCC_TREAT_WARNINGS_AS_ERRORS = YES;')\nend\n_p(4,'GCC_WARN_ABOUT_RETURN_TYPE = YES;')\n_p(4,'GCC_WARN_UNUSED_VARIABLE = YES;')\nxcode.printlist(cfg.includedirs, 'HEADER_SEARCH_PATHS')\nxcode.printlist(cfg.libdirs, 'LIBRARY_SEARCH_PATHS')\n_p(4,'OBJROOT = \"%s"
|
||||
"\"image.gif\",\n[\".h\"] = \"sourcecode.cpp.h\",\n[\".html\"] = \"text.html\",\n[\".lua\"] = \"sourcecode.lua\",\n[\".m\"] = \"sourcecode.cpp.objc\",\n[\".mm\"] = \"sourcecode.cpp.objc\",\n[\".nib\"] = \"wrapper.nib\",\n[\".pch\"] = \"sourcecode.cpp.h\",\n[\".plist\"] = \"text.plist.xml\",\n[\".strings\"] = \"text.plist.strings\",\n[\".xib\"] = \"file.xib\",\n[\".icns\"] = \"image.icns\",\n[\".bmp\"] = \"image.bmp\",\n[\".wav\"] = \"audio.wav\",\n}\nreturn types[path.getextension(node.path)] or \"text\"\nend\nfunction xcode.getproducttype(node)\nlocal types = {\nConsoleApp = \"com.apple.product-type.tool\",\nWindowedApp = \"com.apple.product-type.application\",\nStaticLib = \"com.apple.product-type.library.static\",\nSharedLib = \"com.apple.product-type.library.dynamic\",\n}\nreturn types[node.cfg.kind]\nend\nfunction xcode.gettargettype(node)\nlocal types = {\nConsoleApp = \"\\\"compiled.mach-o.executable\\\"\",\nWindowedApp = \""
|
||||
"wrapper.application\",\nStaticLib = \"archive.ar\",\nSharedLib = \"\\\"compiled.mach-o.dylib\\\"\",\n}\nreturn types[node.cfg.kind]\nend\nfunction xcode.getxcodeprojname(prj)\nlocal fname = premake.project.getfilename(prj, \"%%.xcodeproj\")\nreturn fname\nend\nfunction xcode.isframework(fname)\nreturn (path.getextension(fname) == \".framework\")\nend\nfunction xcode.newid()\nreturn string.format(\"%04X%04X%04X%04X%04X%04X\",\nmath.random(0, 32767),\nmath.random(0, 32767),\nmath.random(0, 32767),\nmath.random(0, 32767),\nmath.random(0, 32767),\nmath.random(0, 32767))\nend\nfunction xcode.preparesolution(sln)\nsln.xcode = { }\nsln.xcode.platforms = premake.filterplatforms(sln, premake.action.current().valid_platforms, \"Universal\")\nfor prj in premake.solution.eachproject(sln) do\nlocal cfg = premake.getconfig(prj, prj.configurations[1], sln.xcode.platforms[1])\nlocal node = premake.tree.new(path.getname(cfg.buildtarget.bundlepath))\nnode.cfg = cfg\nnode.id = premake.xcode.newid(node, \"product\")\nnode.tar"
|
||||
"getid = premake.xcode.newid(node, \"target\")\nprj.xcode = {}\nprj.xcode.projectnode = node\nend\nend\nfunction xcode.printlist(list, tag)\nif #list > 0 then\n_p(4,'%s = (', tag)\nfor _, item in ipairs(list) do\nlocal escaped_item = item:gsub(\"\\\"\", \"\\\\\\\"\")\n_p(5, '\"%s\",', escaped_item)\nend\n_p(4,');')\nend\nend\nfunction xcode.Header()\n_p('// !$*UTF8*$!')\n_p('{')\n_p(1,'archiveVersion = 1;')\n_p(1,'classes = {')\n_p(1,'};')\n_p(1,'objectVersion = 45;')\n_p(1,'objects = {')\n_p('')\nend\nfunction xcode.PBXBuildFile(tr)\n_p('/* Begin PBXBuildFile section */')\ntree.traverse(tr, {\nonnode = function(node)\nif node.buildid then\n_p(2,'%s /* %s in %s */ = {isa = PBXBuildFile; fileRef = %s /* %s */; };', \nnode.buildid, node.name, xcode.getbuildcategory(node), node.id, node.name)\nend\nend\n})\n_p('/* End PBXBuildFile section */')\n_p('')\nend\nfunction xcode.PBXContainerItemProxy(tr)\nif #tr.projects.children > 0 then\n_p('/* Begin PBXContainerItemProxy section */')\nfor _, node in ipairs(tr.projects"
|
||||
".children) do\n_p(2,'%s /* PBXContainerItemProxy */ = {', node.productproxyid)\n_p(3,'isa = PBXContainerItemProxy;')\n_p(3,'containerPortal = %s /* %s */;', node.id, path.getname(node.path))\n_p(3,'proxyType = 2;')\n_p(3,'remoteGlobalIDString = %s;', node.project.xcode.projectnode.id)\n_p(3,'remoteInfo = \"%s\";', node.project.xcode.projectnode.name)\n_p(2,'};')\n_p(2,'%s /* PBXContainerItemProxy */ = {', node.targetproxyid)\n_p(3,'isa = PBXContainerItemProxy;')\n_p(3,'containerPortal = %s /* %s */;', node.id, path.getname(node.path))\n_p(3,'proxyType = 1;')\n_p(3,'remoteGlobalIDString = %s;', node.project.xcode.projectnode.targetid)\n_p(3,'remoteInfo = \"%s\";', node.project.xcode.projectnode.name)\n_p(2,'};')\nend\n_p('/* End PBXContainerItemProxy section */')\n_p('')\nend\nend\nfunction xcode.PBXFileReference(tr,prj)\n_p('/* Begin PBXFileReference section */')\ntree.traverse(tr, {\nonleaf = function(node)\nif not node.path then\nreturn\nend\nif node.kind == \"product\" then\n_p(2,'%s /* %s */ = {isa = PBXFi"
|
||||
"leReference; explicitFileType = %s; includeInIndex = 0; name = \"%s\"; path = \"%s\"; sourceTree = BUILT_PRODUCTS_DIR; };',\nnode.id, node.name, xcode.gettargettype(node), node.name, path.getname(node.cfg.buildtarget.bundlepath))\nelseif node.parent.parent == tr.projects then\nlocal relpath = path.getrelative(tr.project.location, node.parent.project.location)\n_p(2,'%s /* %s */ = {isa = PBXFileReference; lastKnownFileType = \"wrapper.pb-project\"; name = \"%s\"; path = \"%s\"; sourceTree = SOURCE_ROOT; };',\nnode.parent.id, node.parent.name, node.parent.name, path.join(relpath, node.parent.name))\nelse\nlocal pth, src\nif xcode.isframework(node.path) then\nlocal nodePath = node.path\nlocal _, matchEnd, variable = string.find(nodePath, \"^%$%((.+)%)/\")\nif variable then\nnodePath = string.sub(nodePath, matchEnd + 1)\nend\nif string.find(nodePath,'/') then\nif string.find(nodePath,'^%.')then\nerror('relative paths are not currently supported for frameworks')\nend\npth = nodePath\nelse\npth = \"/System/Library/"
|
||||
"Frameworks/\" .. nodePath\nend\nif variable then\nsrc = variable\nif string.find(pth, '^/') then\npth = string.sub(pth, 2)\nend\nelse\nsrc = \"<absolute>\"\nend\nelse\nsrc = \"<group>\"\nif node.parent.isvpath then\npth = node.cfg.name\nelse\npth = tree.getlocalpath(node)\nend\nend\nif (not prj.options.ForceCPP) then\n_p(2,'%s /* %s */ = {isa = PBXFileReference; lastKnownFileType = %s; name = \"%s\"; path = \"%s\"; sourceTree = \"%s\"; };',\nnode.id, node.name, xcode.getfiletype(node), node.name, pth, src)\nelse\n_p(2,'%s /* %s */ = {isa = PBXFileReference; explicitFileType = %s; name = \"%s\"; path = \"%s\"; sourceTree = \"%s\"; };',\nnode.id, node.name, xcode.getfiletypeForced(node), node.name, pth, src)\nend\nend\nend\n})\n_p('/* End PBXFileReference section */')\n_p('')\nend\nfunction xcode.PBXFrameworksBuildPhase(tr)\n_p('/* Begin PBXFrameworksBuildPhase section */')\n_p(2,'%s /* Frameworks */ = {', tr.products.children[1].fxstageid)\n_p(3,'isa = PBXFrameworksBuildPhase;')\n_p(3,'buildActionMask = 2147483"
|
||||
"647;')\n_p(3,'files = (')\ntree.traverse(tr.frameworks, {\nonleaf = function(node)\n_p(4,'%s /* %s in Frameworks */,', node.buildid, node.name)\nend\n})\ntree.traverse(tr.projects, {\nonleaf = function(node)\n_p(4,'%s /* %s in Frameworks */,', node.buildid, node.name)\nend\n})\n_p(3,');')\n_p(3,'runOnlyForDeploymentPostprocessing = 0;')\n_p(2,'};')\n_p('/* End PBXFrameworksBuildPhase section */')\n_p('')\nend\nfunction xcode.PBXGroup(tr)\n_p('/* Begin PBXGroup section */')\ntree.traverse(tr, {\nonnode = function(node)\nif (node.path and #node.children == 0) or node.kind == \"vgroup\" then\nreturn\nend\nif node.parent == tr.projects then\n_p(2,'%s /* Products */ = {', node.productgroupid)\nelse\n_p(2,'%s /* %s */ = {', node.id, node.name)\nend\n_p(3,'isa = PBXGroup;')\n_p(3,'children = (')\nfor _, childnode in ipairs(node.children) do\n_p(4,'%s /* %s */,', childnode.id, childnode.name)\nend\n_p(3,');')\nif node.parent == tr.projects then\n_p(3,'name = Products;')\nelse\n_p(3,'name = \"%s\";', node.name)\nif nod"
|
||||
"e.path and not node.isvpath then\nlocal p = node.path\nif node.parent.path then\np = path.getrelative(node.parent.path, node.path)\nend\n_p(3,'path = \"%s\";', p)\nend\nend\n_p(3,'sourceTree = \"<group>\";')\n_p(2,'};')\nend\n}, true)\n_p('/* End PBXGroup section */')\n_p('')\nend\nfunction xcode.PBXNativeTarget(tr)\n_p('/* Begin PBXNativeTarget section */')\nfor _, node in ipairs(tr.products.children) do\nlocal name = tr.project.name\nlocal function hasBuildCommands(which)\nif #tr.project[which] > 0 then\nreturn true\nend\nfor _, cfg in ipairs(tr.configs) do\nif #cfg[which] > 0 then\nreturn true\nend\nend\nend\n_p(2,'%s /* %s */ = {', node.targetid, name)\n_p(3,'isa = PBXNativeTarget;')\n_p(3,'buildConfigurationList = %s /* Build configuration list for PBXNativeTarget \"%s\" */;', node.cfgsection, name)\n_p(3,'buildPhases = (')\nif hasBuildCommands('prebuildcommands') then\n_p(4,'9607AE1010C857E500CD1376 /* Prebuild */,')\nend\n_p(4,'%s /* Resources */,', node.resstageid)\n_p(4,'%s /* Sources */,', node.sourc"
|
||||
"esid)\nif hasBuildCommands('prelinkcommands') then\n_p(4,'9607AE3510C85E7E00CD1376 /* Prelink */,')\nend\n_p(4,'%s /* Frameworks */,', node.fxstageid)\nif hasBuildCommands('postbuildcommands') then\n_p(4,'9607AE3710C85E8F00CD1376 /* Postbuild */,')\nend\n_p(3,');')\n_p(3,'buildRules = (')\n_p(3,');')\n_p(3,'dependencies = (')\nfor _, node in ipairs(tr.projects.children) do\n_p(4,'%s /* PBXTargetDependency */,', node.targetdependid)\nend\n_p(3,');')\n_p(3,'name = \"%s\";', name)\nlocal p\nif node.cfg.kind == \"ConsoleApp\" then\np = \"$(HOME)/bin\"\nelseif node.cfg.kind == \"WindowedApp\" then\np = \"$(HOME)/Applications\"\nend\nif p then\n_p(3,'productInstallPath = \"%s\";', p)\nend\n_p(3,'productName = \"%s\";', name)\n_p(3,'productReference = %s /* %s */;', node.id, node.name)\n_p(3,'productType = \"%s\";', xcode.getproducttype(node))\n_p(2,'};')\nend\n_p('/* End PBXNativeTarget section */')\n_p('')\nend\nfunction xcode.PBXProject(tr)\n_p('/* Begin PBXProject section */')\n_p(2,'08FB7793FE84155DC02AAC07 /* P"
|
||||
"roject object */ = {')\n_p(3,'isa = PBXProject;')\n_p(3,'buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject \"%s\" */;', tr.name)\n_p(3,'compatibilityVersion = \"Xcode 3.2\";')\n_p(3,'hasScannedForEncodings = 1;')\n_p(3,'mainGroup = %s /* %s */;', tr.id, tr.name)\n_p(3,'projectDirPath = \"\";')\nif #tr.projects.children > 0 then\n_p(3,'projectReferences = (')\nfor _, node in ipairs(tr.projects.children) do\n_p(4,'{')\n_p(5,'ProductGroup = %s /* Products */;', node.productgroupid)\n_p(5,'ProjectRef = %s /* %s */;', node.id, path.getname(node.path))\n_p(4,'},')\nend\n_p(3,');')\nend\n_p(3,'projectRoot = \"\";')\n_p(3,'targets = (')\nfor _, node in ipairs(tr.products.children) do\n_p(4,'%s /* %s */,', node.targetid, node.name)\nend\n_p(3,');')\n_p(2,'};')\n_p('/* End PBXProject section */')\n_p('')\nend\nfunction xcode.PBXReferenceProxy(tr)\nif #tr.projects.children > 0 then\n_p('/* Begin PBXReferenceProxy section */')\ntree.traverse(tr.projects, {\nonleaf = function(node"
|
||||
")\n_p(2,'%s /* %s */ = {', node.id, node.name)\n_p(3,'isa = PBXReferenceProxy;')\n_p(3,'fileType = %s;', xcode.gettargettype(node))\n_p(3,'path = \"%s\";', node.path)\n_p(3,'remoteRef = %s /* PBXContainerItemProxy */;', node.parent.productproxyid)\n_p(3,'sourceTree = BUILT_PRODUCTS_DIR;')\n_p(2,'};')\nend\n})\n_p('/* End PBXReferenceProxy section */')\n_p('')\nend\nend\nfunction xcode.PBXResourcesBuildPhase(tr)\n_p('/* Begin PBXResourcesBuildPhase section */')\nfor _, target in ipairs(tr.products.children) do\n_p(2,'%s /* Resources */ = {', target.resstageid)\n_p(3,'isa = PBXResourcesBuildPhase;')\n_p(3,'buildActionMask = 2147483647;')\n_p(3,'files = (')\ntree.traverse(tr, {\nonnode = function(node)\nif xcode.getbuildcategory(node) == \"Resources\" then\n_p(4,'%s /* %s in Resources */,', node.buildid, node.name)\nend\nend\n})\n_p(3,');')\n_p(3,'runOnlyForDeploymentPostprocessing = 0;')\n_p(2,'};')\nend\n_p('/* End PBXResourcesBuildPhase section */')\n_p('')\nend\nfunction xcode.PBXShellScriptBuildPhase(tr)\nlo"
|
||||
"cal wrapperWritten = false\nlocal function doblock(id, name, which)\nlocal prjcmds = tr.project[which]\nlocal commands = table.join(prjcmds, {})\nfor _, cfg in ipairs(tr.configs) do\nlocal cfgcmds = cfg[which]\nif #cfgcmds > #prjcmds then\ntable.insert(commands, 'if [ \"${CONFIGURATION}\" = \"' .. xcode.getconfigname(cfg) .. '\" ]; then')\nfor i = #prjcmds + 1, #cfgcmds do\ntable.insert(commands, cfgcmds[i])\nend\ntable.insert(commands, 'fi')\nend\nend\nif #commands > 0 then\nif not wrapperWritten then\n_p('/* Begin PBXShellScriptBuildPhase section */')\nwrapperWritten = true\nend\n_p(2,'%s /* %s */ = {', id, name)\n_p(3,'isa = PBXShellScriptBuildPhase;')\n_p(3,'buildActionMask = 2147483647;')\n_p(3,'files = (')\n_p(3,');')\n_p(3,'inputPaths = (');\n_p(3,');');\n_p(3,'name = %s;', name);\n_p(3,'outputPaths = (');\n_p(3,');');\n_p(3,'runOnlyForDeploymentPostprocessing = 0;');\n_p(3,'shellPath = /bin/sh;');\n_p(3,'shellScript = \"%s\";', table.concat(commands, \"\\\\n\"):gsub('\"', '\\\\\"'))\n_p(2,'};')\nend\ne"
|
||||
"nd\ndoblock(\"9607AE1010C857E500CD1376\", \"Prebuild\", \"prebuildcommands\")\ndoblock(\"9607AE3510C85E7E00CD1376\", \"Prelink\", \"prelinkcommands\")\ndoblock(\"9607AE3710C85E8F00CD1376\", \"Postbuild\", \"postbuildcommands\")\nif wrapperWritten then\n_p('/* End PBXShellScriptBuildPhase section */')\nend\nend\nfunction xcode.PBXSourcesBuildPhase(tr)\n_p('/* Begin PBXSourcesBuildPhase section */')\nfor _, target in ipairs(tr.products.children) do\n_p(2,'%s /* Sources */ = {', target.sourcesid)\n_p(3,'isa = PBXSourcesBuildPhase;')\n_p(3,'buildActionMask = 2147483647;')\n_p(3,'files = (')\ntree.traverse(tr, {\nonleaf = function(node)\nif xcode.getbuildcategory(node) == \"Sources\" then\n_p(4,'%s /* %s in Sources */,', node.buildid, node.name)\nend\nend\n})\n_p(3,');')\n_p(3,'runOnlyForDeploymentPostprocessing = 0;')\n_p(2,'};')\nend\n_p('/* End PBXSourcesBuildPhase section */')\n_p('')\nend\nfunction xcode.PBXVariantGroup(tr)\n_p('/* Begin PBXVariantGroup section */')\ntree.traverse(tr, {\nonbranch = function(no"
|
||||
"de)\nif node.kind == \"vgroup\" then\n_p(2,'%s /* %s */ = {', node.id, node.name)\n_p(3,'isa = PBXVariantGroup;')\n_p(3,'children = (')\nfor _, lang in ipairs(node.children) do\n_p(4,'%s /* %s */,', lang.id, lang.name)\nend\n_p(3,');')\n_p(3,'name = %s;', node.name)\n_p(3,'sourceTree = \"<group>\";')\n_p(2,'};')\nend\nend\n})\n_p('/* End PBXVariantGroup section */')\n_p('')\nend\nfunction xcode.PBXTargetDependency(tr)\nif #tr.projects.children > 0 then\n_p('/* Begin PBXTargetDependency section */')\ntree.traverse(tr.projects, {\nonleaf = function(node)\n_p(2,'%s /* PBXTargetDependency */ = {', node.parent.targetdependid)\n_p(3,'isa = PBXTargetDependency;')\n_p(3,'name = \"%s\";', node.name)\n_p(3,'targetProxy = %s /* PBXContainerItemProxy */;', node.parent.targetproxyid)\n_p(2,'};')\nend\n})\n_p('/* End PBXTargetDependency section */')\n_p('')\nend\nend\nfunction xcode.XCBuildConfiguration_Target(tr, target, cfg)\nlocal cfgname = xcode.getconfigname(cfg)\n_p(2,'%s /* %s */ = {', cfg.xcode.targetid, cfgname)\n_"
|
||||
"p(3,'isa = XCBuildConfiguration;')\n_p(3,'buildSettings = {')\n_p(4,'ALWAYS_SEARCH_USER_PATHS = NO;')\nif not cfg.flags.Symbols then\n_p(4,'DEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";')\nend\nif cfg.kind ~= \"StaticLib\" and cfg.buildtarget.prefix ~= \"\" then\n_p(4,'EXECUTABLE_PREFIX = %s;', cfg.buildtarget.prefix)\nend\nif cfg.targetextension then\nlocal ext = cfg.targetextension\next = iif(ext:startswith(\".\"), ext:sub(2), ext)\n_p(4,'EXECUTABLE_EXTENSION = %s;', ext)\nend\nlocal outdir = path.getdirectory(cfg.buildtarget.bundlepath)\nif outdir ~= \".\" then\n_p(4,'CONFIGURATION_BUILD_DIR = %s;', outdir)\nend\n_p(4,'GCC_DYNAMIC_NO_PIC = NO;')\n_p(4,'GCC_MODEL_TUNING = G5;')\nif tr.infoplist then\n_p(4,'INFOPLIST_FILE = \"%s\";', tr.infoplist.cfg.name)\nend\ninstallpaths = {\nConsoleApp = '/usr/local/bin',\nWindowedApp = '\"$(HOME)/Applications\"',\nSharedLib = '/usr/local/lib',\nStaticLib = '/usr/local/lib',\n}\n_p(4,'INSTALL_PATH = %s;', installpaths[cfg.kind])\n_p(4,'PRODUCT_NAME = \"%s\";', cfg.buil"
|
||||
"dtarget.basename)\n_p(3,'};')\n_p(3,'name = \"%s\";', cfgname)\n_p(2,'};')\nend\nfunction xcode.XCBuildConfiguration_Project(tr, cfg)\nlocal cfgname = xcode.getconfigname(cfg)\n_p(2,'%s /* %s */ = {', cfg.xcode.projectid, cfgname)\n_p(3,'isa = XCBuildConfiguration;')\n_p(3,'buildSettings = {')\nlocal archs = {\nNative = \"$(NATIVE_ARCH_ACTUAL)\",\nx32 = \"i386\",\nx64 = \"x86_64\",\nUniversal32 = \"$(ARCHS_STANDARD_32_BIT)\",\nUniversal64 = \"$(ARCHS_STANDARD_64_BIT)\",\nUniversal = \"$(ARCHS_STANDARD_32_64_BIT)\",\n}\n_p(4,'ARCHS = \"%s\";', archs[cfg.platform])\n_p(4,'SDKROOT = \"%s\";', xcode.toolset)\nlocal targetdir = path.getdirectory(cfg.buildtarget.bundlepath)\nif targetdir ~= \".\" then\n_p(4,'CONFIGURATION_BUILD_DIR = \"$(SYMROOT)\";');\nend\n_p(4,'CONFIGURATION_TEMP_DIR = \"$(OBJROOT)\";')\nif cfg.flags.Symbols then\n_p(4,'COPY_PHASE_STRIP = NO;')\nend\n_p(4,'GCC_C_LANGUAGE_STANDARD = gnu99;')\nif cfg.flags.NoExceptions then\n_p(4,'GCC_ENABLE_CPP_EXCEPTIONS = NO;')\nend\nif cfg.flags.NoRTTI th"
|
||||
"en\n_p(4,'GCC_ENABLE_CPP_RTTI = NO;')\nend\nif _ACTION ~= \"xcode4\" and cfg.flags.Symbols and not cfg.flags.NoEditAndContinue then\n_p(4,'GCC_ENABLE_FIX_AND_CONTINUE = YES;')\nend\nif cfg.flags.NoExceptions then\n_p(4,'GCC_ENABLE_OBJC_EXCEPTIONS = NO;')\nend\nif cfg.flags.Optimize or cfg.flags.OptimizeSize then\n_p(4,'GCC_OPTIMIZATION_LEVEL = s;')\nelseif cfg.flags.OptimizeSpeed then\n_p(4,'GCC_OPTIMIZATION_LEVEL = 3;')\nelse\n_p(4,'GCC_OPTIMIZATION_LEVEL = 0;')\nend\nif cfg.pchheader and not cfg.flags.NoPCH then\n_p(4,'GCC_PRECOMPILE_PREFIX_HEADER = YES;')\n_p(4,'GCC_PREFIX_HEADER = \"%s\";', cfg.pchheader)\nend\nxcode.printlist(cfg.defines, 'GCC_PREPROCESSOR_DEFINITIONS')\n_p(4,'GCC_SYMBOLS_PRIVATE_EXTERN = NO;')\nif cfg.flags.FatalWarnings then\n_p(4,'GCC_TREAT_WARNINGS_AS_ERRORS = YES;')\nend\n_p(4,'GCC_WARN_ABOUT_RETURN_TYPE = YES;')\n_p(4,'GCC_WARN_UNUSED_VARIABLE = YES;')\nxcode.printlist(cfg.includedirs, 'HEADER_SEARCH_PATHS')\nxcode.printlist(cfg.libdirs, 'LIBRARY_SEARCH_PATHS')\n_p(4,'OBJROOT = \"%s"
|
||||
"\";', cfg.objectsdir)\n_p(4,'ONLY_ACTIVE_ARCH = %s;',iif(premake.config.isdebugbuild(cfg),'YES','NO'))\nlocal checks = {\n[\"-ffast-math\"] = cfg.flags.FloatFast,\n[\"-ffloat-store\"] = cfg.flags.FloatStrict,\n[\"-fomit-frame-pointer\"] = cfg.flags.NoFramePointer,\n}\nlocal flags = { }\nfor flag, check in pairs(checks) do\nif check then\ntable.insert(flags, flag)\nend\nend\nxcode.printlist(table.join(flags, cfg.buildoptions), 'OTHER_CFLAGS')\nflags = { }\nfor _, lib in ipairs(premake.getlinks(cfg, \"system\")) do\nif not xcode.isframework(lib) then\ntable.insert(flags, \"-l\" .. lib)\nend\nend\nflags = table.join(flags, cfg.linkoptions)\nxcode.printlist(flags, 'OTHER_LDFLAGS')\nif cfg.flags.StaticRuntime then\n_p(4,'STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = static;')\nend\nif targetdir ~= \".\" then\n_p(4,'SYMROOT = \"%s\";', targetdir)\nend\nif cfg.flags.ExtraWarnings then\n_p(4,'WARNING_CFLAGS = \"-Wall\";')\nend\n_p(3,'};')\n_p(3,'name = \"%s\";', cfgname)\n_p(2,'};')\nend\nfunction xcode.XCBuildC"
|
||||
"onfiguration(tr)\n_p('/* Begin XCBuildConfiguration section */')\nfor _, target in ipairs(tr.products.children) do\nfor _, cfg in ipairs(tr.configs) do\nxcode.XCBuildConfiguration_Target(tr, target, cfg)\nend\nend\nfor _, cfg in ipairs(tr.configs) do\nxcode.XCBuildConfiguration_Project(tr, cfg)\nend\n_p('/* End XCBuildConfiguration section */')\n_p('')\nend\nfunction xcode.XCBuildConfigurationList(tr)\nlocal sln = tr.project.solution\n_p('/* Begin XCConfigurationList section */')\nfor _, target in ipairs(tr.products.children) do\n_p(2,'%s /* Build configuration list for PBXNativeTarget \"%s\" */ = {', target.cfgsection, target.name)\n_p(3,'isa = XCConfigurationList;')\n_p(3,'buildConfigurations = (')\nfor _, cfg in ipairs(tr.configs) do\n_p(4,'%s /* %s */,', cfg.xcode.targetid, xcode.getconfigname(cfg))\nend\n_p(3,');')\n_p(3,'defaultConfigurationIsVisible = 0;')\n_p(3,'defaultConfigurationName = \"%s\";', xcode.getconfigname(tr.configs[1]))\n_p(2,'};')\nend\n_p(2,'1DEB928908733DD80010E9CD /* Build configurati"
|
||||
"on list for PBXProject \"%s\" */ = {', tr.name)\n_p(3,'isa = XCConfigurationList;')\n_p(3,'buildConfigurations = (')\nfor _, cfg in ipairs(tr.configs) do\n_p(4,'%s /* %s */,', cfg.xcode.projectid, xcode.getconfigname(cfg))\nend\n_p(3,');')\n_p(3,'defaultConfigurationIsVisible = 0;')\n_p(3,'defaultConfigurationName = \"%s\";', xcode.getconfigname(tr.configs[1]))\n_p(2,'};')\n_p('/* End XCConfigurationList section */')\n_p('')\nend\nfunction xcode.Footer()\n_p(1,'};')\n_p('\\trootObject = 08FB7793FE84155DC02AAC07 /* Project object */;')\n_p('}')\nend\n",
|
||||
|
9
3rdparty/sqlite3/sqlite3.c
vendored
9
3rdparty/sqlite3/sqlite3.c
vendored
@ -72821,6 +72821,9 @@ case OP_Found: { /* jump, in3 */
|
||||
UnpackedRecord r;
|
||||
char aTempRec[ROUND8(sizeof(UnpackedRecord)) + sizeof(Mem)*4 + 7];
|
||||
|
||||
// MAME: fixed Visual Studio warning about potentially uninitialized variable with optimizations enabled
|
||||
memset(&r, 0x00, sizeof(UnpackedRecord));
|
||||
|
||||
#ifdef SQLITE_TEST
|
||||
if( pOp->opcode!=OP_NoConflict ) sqlite3_found_count++;
|
||||
#endif
|
||||
@ -93564,8 +93567,10 @@ SQLITE_PRIVATE void sqlite3DeleteFrom(
|
||||
WhereInfo *pWInfo; /* Information about the WHERE clause */
|
||||
Index *pIdx; /* For looping over indices of the table */
|
||||
int iTabCur; /* Cursor number for the table */
|
||||
int iDataCur; /* VDBE cursor for the canonical data source */
|
||||
int iIdxCur; /* Cursor number of the first index */
|
||||
// MAME: fixed Visual Studio warning about potentially uninitialized variable with optimizations enabled
|
||||
int iDataCur = 0; /* VDBE cursor for the canonical data source */
|
||||
// MAME: fixed Visual Studio warning about potentially uninitialized variable with optimizations enabled
|
||||
int iIdxCur = 0; /* Cursor number of the first index */
|
||||
int nIdx; /* Number of indices */
|
||||
sqlite3 *db; /* Main database structure */
|
||||
AuthContext sContext; /* Authorization context */
|
||||
|
@ -1336,6 +1336,20 @@ Re-releases (probably the same as the original release, but listed while waiting
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="mahjong">
|
||||
<description>Mahjong</description>
|
||||
<year>1986</year>
|
||||
<publisher>Nintendo</publisher>
|
||||
<info name="serial" value="FMC-MJA"/>
|
||||
<info name="release" value="19860221"/>
|
||||
<info name="alt_title" value="麻雀"/>
|
||||
<part name="flop1" interface="floppy_5_25">
|
||||
<dataarea name="flop" size="65500">
|
||||
<rom name="mahjong (japan).fds" size="65500" crc="9a8a4dbf" sha1="615659bfea21919e11608031e8fe818a9e02d1e0" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="mjgoraku">
|
||||
<description>Mahjong Goraku - Bishoujo Meijinsen</description>
|
||||
<year>19??</year>
|
||||
@ -2037,6 +2051,20 @@ Re-releases (probably the same as the original release, but listed while waiting
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="volley">
|
||||
<description>Volleyball</description>
|
||||
<year>1986</year>
|
||||
<publisher>Nintendo</publisher>
|
||||
<info name="serial" value="FMC-VBW"/>
|
||||
<info name="release" value="19860721"/>
|
||||
<info name="alt_title" value="バレーボール"/>
|
||||
<part name="flop1" interface="floppy_5_25">
|
||||
<dataarea name="flop" size="65500">
|
||||
<rom name="volleyball (japan).fds" size="65500" crc="f2040d16" sha1="fb2d7fe3866765ec34249a2853a592bd0dc2217d" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="excitbik">
|
||||
<description>Vs. Excitebike</description>
|
||||
<year>1988</year>
|
||||
@ -3459,20 +3487,6 @@ Re-releases (probably the same as the original release, but listed while waiting
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="mahjong">
|
||||
<description>Mahjong</description>
|
||||
<year>1986</year>
|
||||
<publisher>Nintendo</publisher>
|
||||
<info name="serial" value="FMC-MJA"/>
|
||||
<info name="release" value="19860221"/>
|
||||
<info name="alt_title" value="麻雀"/>
|
||||
<part name="flop1" interface="floppy_5_25">
|
||||
<dataarea name="flop" size="65500">
|
||||
<rom name="mahjong (1983)(nintendo)[fmc-mja] [ok].fds" size="65500" crc="84e2c9b0" sha1="5524318bb3923d7cef952d10c1d93fef7851ebc1" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="mjkazoku">
|
||||
<description>Mahjong Kazoku</description>
|
||||
<year>1987</year>
|
||||
@ -4051,20 +4065,6 @@ Re-releases (probably the same as the original release, but listed while waiting
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="volley">
|
||||
<description>Volleyball</description>
|
||||
<year>1986</year>
|
||||
<publisher>Nintendo</publisher>
|
||||
<info name="serial" value="FMC-VBW"/>
|
||||
<info name="release" value="19860721"/>
|
||||
<info name="alt_title" value="バレーボール"/>
|
||||
<part name="flop1" interface="floppy_5_25">
|
||||
<dataarea name="flop" size="65500">
|
||||
<rom name="volleyball (1986)(nintendo)[fmc-vbw] [ok].fds" size="65500" crc="44f52452" sha1="76a0ae474082e4c500a17cd6ace2be70e47b5ac3" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="wardner">
|
||||
<description>Wardner no Mori</description>
|
||||
<year>1988</year>
|
||||
|
@ -9376,6 +9376,17 @@ a certain item) -->
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="wildsnak">
|
||||
<description>WildSnake (Prototype)</description>
|
||||
<year>1994</year>
|
||||
<publisher>Bullet-Proof Software</publisher>
|
||||
<part name="cart" interface="gamegear_cart">
|
||||
<dataarea name="rom" size="131072">
|
||||
<rom name="wildsnake [proto].bin" size="131072" crc="d460cc7f" sha1="77d368263934aa968a6b6876a3e252f3ee715c84" offset="000000" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="wimbled">
|
||||
<description>Wimbledon (World)</description>
|
||||
<year>1992</year>
|
||||
|
70
hash/nes.xml
70
hash/nes.xml
@ -30736,25 +30736,6 @@
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="rockinktu" cloneof="rockinkt">
|
||||
<description>Rockin' Kats (USA)</description>
|
||||
<year>1991</year>
|
||||
<publisher>Atlus</publisher>
|
||||
<info name="serial" value="NES-7A-USA"/>
|
||||
<info name="release" value="199109xx"/>
|
||||
<part name="cart" interface="nes_cart">
|
||||
<feature name="slot" value="txrom" />
|
||||
<feature name="pcb" value="NES-TLROM" />
|
||||
<feature name="mmc3_type" value="MMC3B" />
|
||||
<dataarea name="prg" size="131072">
|
||||
<rom name="nes-7a-0 prg" size="131072" crc="319ccfcc" sha1="06e1c34af917b84a990db895c7b44df1b3393c96" offset="00000" />
|
||||
</dataarea>
|
||||
<dataarea name="chr" size="131072">
|
||||
<rom name="nes-7a-0 chr" size="131072" crc="487aa440" sha1="ee7ebbcf89c81ba59beda1bd27289dae21bb8071" offset="00000" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="rockinkt">
|
||||
<description>Rockin' Kats (Euro)</description>
|
||||
<year>1992</year>
|
||||
@ -30774,6 +30755,25 @@
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="rockinktu" cloneof="rockinkt">
|
||||
<description>Rockin' Kats (USA)</description>
|
||||
<year>1991</year>
|
||||
<publisher>Atlus</publisher>
|
||||
<info name="serial" value="NES-7A-USA"/>
|
||||
<info name="release" value="199109xx"/>
|
||||
<part name="cart" interface="nes_cart">
|
||||
<feature name="slot" value="txrom" />
|
||||
<feature name="pcb" value="NES-TLROM" />
|
||||
<feature name="mmc3_type" value="MMC3B" />
|
||||
<dataarea name="prg" size="131072">
|
||||
<rom name="nes-7a-0 prg" size="131072" crc="319ccfcc" sha1="06e1c34af917b84a990db895c7b44df1b3393c96" offset="00000" />
|
||||
</dataarea>
|
||||
<dataarea name="chr" size="131072">
|
||||
<rom name="nes-7a-0 chr" size="131072" crc="487aa440" sha1="ee7ebbcf89c81ba59beda1bd27289dae21bb8071" offset="00000" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="rockman" cloneof="megaman">
|
||||
<description>Rockman (Jpn)</description>
|
||||
<year>1987</year>
|
||||
@ -48519,6 +48519,22 @@ preliminary proto for the PAL version, still running on NTSC systems) or the gfx
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="rockinktup" cloneof="rockinkt">
|
||||
<description>Rockin' Kats (USA, Prototype)</description>
|
||||
<year>1991</year>
|
||||
<publisher>Atlus</publisher>
|
||||
<part name="cart" interface="nes_cart">
|
||||
<feature name="slot" value="txrom" />
|
||||
<feature name="pcb" value="NES-TLROM" />
|
||||
<dataarea name="chr" size="131072">
|
||||
<rom name="rockin' kats prototype.chr" size="131072" crc="a28ef6f8" sha1="307dbc9fc9b101e6eb88df31543a75cd36f185b7" offset="00000" status="baddump" />
|
||||
</dataarea>
|
||||
<dataarea name="prg" size="131072">
|
||||
<rom name="rockin' kats prototype.prg" size="131072" crc="319ccfcc" sha1="06e1c34af917b84a990db895c7b44df1b3393c96" offset="00000" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="rodlandj" cloneof="rodland">
|
||||
<description>Rod Land (Jpn)</description>
|
||||
<year>1992</year>
|
||||
@ -71201,6 +71217,22 @@ resulting in tons of glitches? -->
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="lordkinga" cloneof="astyanax">
|
||||
<description>The Lord of King (Asia, Pirate)</description>
|
||||
<year>19??</year>
|
||||
<publisher><pirate></publisher>
|
||||
<part name="cart" interface="nes_cart">
|
||||
<feature name="slot" value="btl_900218" />
|
||||
<feature name="pcb" value="BTL-900218" />
|
||||
<dataarea name="chr" size="131072">
|
||||
<rom name="lord of king, the (j)[p2].chr" size="131072" crc="7a2dcf20" sha1="120e203c4f52e63b0af7824d6b894911a6d7a0a1" offset="00000" />
|
||||
</dataarea>
|
||||
<dataarea name="prg" size="131072">
|
||||
<rom name="lord of king, the (j)[p2].prg" size="131072" crc="6862b87f" sha1="ceb6fff70556b2108816ab60f8f9ef2a6ac17aef" offset="00000" status="baddump" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="mcmario" cloneof="mckids">
|
||||
<description>M.C. Mario (M.C. Kids pirate)</description>
|
||||
<year>19??</year>
|
||||
|
@ -32826,7 +32826,7 @@ Alternate board (XL-1)
|
||||
<!-- single cartridge source: d4s -->
|
||||
<description>Parame ROM Cassette 4 Gō - Super X-T Sasuke Senyō (Jpn)</description>
|
||||
<year>199?</year>
|
||||
<publisher>GAMETECH Co. Ltd. (unlicensed)</publisher>
|
||||
<publisher>Gametech</publisher>
|
||||
<info name="alt_title" value="ぱらめROMカセット4号 SUPER X-Tサスケ専用" />
|
||||
<part name="cart" interface="snes_cart">
|
||||
<feature name="pcb" value="890409C" /> <!-- custom board, three epoxy chips -->
|
||||
@ -32841,7 +32841,7 @@ Alternate board (XL-1)
|
||||
<!-- single cartridge source: d4s -->
|
||||
<description>Parame ROM Cassette 5 Gō - Super X-T Sasuke Senyō (Jpn)</description>
|
||||
<year>199?</year>
|
||||
<publisher>GAMETECH Co. Ltd. (unlicensed)</publisher>
|
||||
<publisher>Gametech</publisher>
|
||||
<info name="alt_title" value="ぱらめROMカセット5号 SUPER X-Tサスケ専用" />
|
||||
<part name="cart" interface="snes_cart">
|
||||
<feature name="slot" value="lorom" />
|
||||
@ -35424,6 +35424,20 @@ List of unclassified roms
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="bountyswp" cloneof="bountysw">
|
||||
<description>Bounty Sword (Jpn, Prototype 19950516)</description>
|
||||
<year>1995</year>
|
||||
<publisher>Pioneer</publisher>
|
||||
<part name="cart" interface="snes_cart">
|
||||
<feature name="slot" value="hirom" />
|
||||
<dataarea name="rom" size="3145728">
|
||||
<rom name="bounty sword (japan) (sample).sfc" size="3145728" crc="247680b9" sha1="180e754cf2e8341c964d667c9247dc4dbc98c090" offset="0x000000" />
|
||||
</dataarea>
|
||||
<dataarea name="nvram" size="8192">
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="boxinglg">
|
||||
<description>Boxing Legends of the Ring (Euro)</description>
|
||||
<year>1993</year>
|
||||
@ -50085,7 +50099,7 @@ List of unclassified roms
|
||||
<software name="paramev1">
|
||||
<description>Parame ROM Cassette Vol. 1 (Jpn)</description>
|
||||
<year>199?</year>
|
||||
<publisher>GAMETECH (unlicensed)</publisher>
|
||||
<publisher>Gametech</publisher>
|
||||
<info name="alt_title" value="ぱらめROMカセット VOL. 1" />
|
||||
<part name="cart" interface="snes_cart">
|
||||
<feature name="slot" value="lorom" />
|
||||
@ -50098,7 +50112,7 @@ List of unclassified roms
|
||||
<software name="paramev2">
|
||||
<description>Parame ROM Cassette 2 Gō (Jpn)</description>
|
||||
<year>199?</year>
|
||||
<publisher>GAMETECH Co. Ltd. (unlicensed)</publisher>
|
||||
<publisher>Gametech</publisher>
|
||||
<info name="alt_title" value="ぱらめROMカセット2号" />
|
||||
<part name="cart" interface="snes_cart">
|
||||
<feature name="slot" value="lorom" />
|
||||
@ -50111,7 +50125,7 @@ List of unclassified roms
|
||||
<software name="paramev3">
|
||||
<description>Parame ROM Cassette 3 Gō (Jpn)</description>
|
||||
<year>199?</year>
|
||||
<publisher>GAMETECH Co. Ltd. (unlicensed)</publisher>
|
||||
<publisher>Gametech</publisher>
|
||||
<info name="alt_title" value="ぱらめROMカセット3号" />
|
||||
<part name="cart" interface="snes_cart">
|
||||
<feature name="slot" value="lorom" />
|
||||
|
367
makefile
367
makefile
@ -15,6 +15,64 @@
|
||||
################# BEGIN USER-CONFIGURABLE OPTIONS #####################
|
||||
###########################################################################
|
||||
|
||||
# REGENIE = 1
|
||||
# VERBOSE = 1
|
||||
# NOWERROR = 1
|
||||
|
||||
# TARGET = mame
|
||||
# SUBTARGET = tiny
|
||||
# TOOLS = 1
|
||||
# OSD = sdl
|
||||
|
||||
# USE_BGFX = 1
|
||||
# NO_OPENGL = 1
|
||||
# USE_DISPATCH_GL = 0
|
||||
# DIRECTINPUT = 7
|
||||
# USE_SDL = 1
|
||||
# SDL2_MULTIAPI = 1
|
||||
# NO_USE_MIDI = 1
|
||||
# DONT_USE_NETWORK = 1
|
||||
# USE_QTDEBUG = 1
|
||||
# NO_X11 = 1
|
||||
# NO_USE_XINPUT = 0
|
||||
# FORCE_DRC_C_BACKEND = 1
|
||||
|
||||
# DEBUG = 1
|
||||
# PROFILER = 1
|
||||
# SANITIZE = 1
|
||||
|
||||
# PTR64 = 1
|
||||
# BIGENDIAN = 1
|
||||
# NOASM = 1
|
||||
|
||||
# OPTIMIZE = 3
|
||||
# SYMBOLS = 1
|
||||
# SYMLEVEL = 2
|
||||
# MAP = 1
|
||||
# PROFILE = 1
|
||||
# ARCHOPTS =
|
||||
# LDOPTS =
|
||||
|
||||
# MESA_INSTALL_ROOT = /opt/mesa
|
||||
# SDL_INSTALL_ROOT = /opt/sdl2
|
||||
# SDL_FRAMEWORK_PATH = $(HOME)/Library/Frameworks
|
||||
# SDL_LIBVER = sdl
|
||||
# MACOSX_USE_LIBSDL = 1
|
||||
# CYGWIN_BUILD = 1
|
||||
|
||||
# TARGETOS = windows
|
||||
# CROSS_BUILD = 1
|
||||
# OVERRIDE_CC = cc
|
||||
# OVERRIDE_CXX = c++
|
||||
# OVERRIDE_LD = ld
|
||||
|
||||
|
||||
###########################################################################
|
||||
################## END USER-CONFIGURABLE OPTIONS ######################
|
||||
###########################################################################
|
||||
|
||||
MAKEPARAMS := -R
|
||||
|
||||
#
|
||||
# Determine running OS
|
||||
#
|
||||
@ -46,7 +104,6 @@ endif
|
||||
ifeq ($(firstword $(filter Darwin,$(UNAME))),Darwin)
|
||||
OS := macosx
|
||||
GENIEOS := darwin
|
||||
DARWIN_VERSION := $(shell sw_vers -productVersion)
|
||||
endif
|
||||
ifeq ($(firstword $(filter Haiku,$(UNAME))),Haiku)
|
||||
OS := haiku
|
||||
@ -76,8 +133,11 @@ ifdef DEBUG
|
||||
CONFIG := debug
|
||||
endif
|
||||
|
||||
ifndef VERBOSE
|
||||
SILENT := @
|
||||
ifdef VERBOSE
|
||||
MAKEPARAMS += verbose=1
|
||||
else
|
||||
SILENT := @
|
||||
MAKEPARAMS += --no-print-directory
|
||||
endif
|
||||
|
||||
#-------------------------------------------------
|
||||
@ -138,6 +198,18 @@ ifndef NOASM
|
||||
endif
|
||||
endif
|
||||
|
||||
# Autodetect BIGENDIAN
|
||||
# MacOSX
|
||||
ifndef BIGENDIAN
|
||||
ifneq (,$(findstring Power,$(UNAME)))
|
||||
BIGENDIAN := 1
|
||||
endif
|
||||
# Linux
|
||||
ifneq (,$(findstring ppc,$(UNAME)))
|
||||
BIGENDIAN := 1
|
||||
endif
|
||||
endif # BIGENDIAN
|
||||
|
||||
|
||||
PYTHON := $(SILENT)python
|
||||
CC := $(SILENT)gcc
|
||||
@ -249,19 +321,19 @@ PARAMS += --with-tools
|
||||
endif
|
||||
|
||||
ifdef SYMBOLS
|
||||
PARAMS += --SYMBOLS=$(SYMBOLS)
|
||||
PARAMS += --SYMBOLS='$(SYMBOLS)'
|
||||
endif
|
||||
|
||||
ifdef SYMLEVEL
|
||||
PARAMS += --SYMLEVEL=$(SYMLEVEL)
|
||||
PARAMS += --SYMLEVEL='$(SYMLEVEL)'
|
||||
endif
|
||||
|
||||
ifdef PROFILER
|
||||
PARAMS += --PROFILER=$(PROFILER)
|
||||
PARAMS += --PROFILER='$(PROFILER)'
|
||||
endif
|
||||
|
||||
ifdef PROFILE
|
||||
PARAMS += --PROFILE=$(PROFILE)
|
||||
PARAMS += --PROFILE='$(PROFILE)'
|
||||
endif
|
||||
|
||||
ifdef OPTIMIZE
|
||||
@ -284,28 +356,32 @@ ifdef NOASM
|
||||
PARAMS += --NOASM='$(NOASM)'
|
||||
endif
|
||||
|
||||
ifdef BIGENDIAN
|
||||
PARAMS += --BIGENDIAN='$(BIGENDIAN)'
|
||||
endif
|
||||
|
||||
ifdef FORCE_DRC_C_BACKEND
|
||||
PARAMS += --FORCE_DRC_C_BACKEND='$(FORCE_DRC_C_BACKEND)'
|
||||
endif
|
||||
|
||||
ifdef NOWERROR
|
||||
PARAMS += --NOWERROR=$(NOWERROR)
|
||||
PARAMS += --NOWERROR='$(NOWERROR)'
|
||||
endif
|
||||
|
||||
ifdef TARGET
|
||||
PARAMS += --target=$(TARGET)
|
||||
PARAMS += --target='$(TARGET)'
|
||||
endif
|
||||
|
||||
ifdef SUBTARGET
|
||||
PARAMS += --subtarget=$(SUBTARGET)
|
||||
PARAMS += --subtarget='$(SUBTARGET)'
|
||||
endif
|
||||
|
||||
ifdef OSD
|
||||
PARAMS += --osd=$(OSD)
|
||||
PARAMS += --osd='$(OSD)'
|
||||
endif
|
||||
|
||||
ifdef TARGETOS
|
||||
PARAMS += --targetos=$(TARGETOS)
|
||||
PARAMS += --targetos='$(TARGETOS)'
|
||||
endif
|
||||
|
||||
ifdef DONT_USE_NETWORK
|
||||
@ -332,6 +408,14 @@ ifdef DIRECTINPUT
|
||||
PARAMS += --DIRECTINPUT='$(DIRECTINPUT)'
|
||||
endif
|
||||
|
||||
ifdef USE_SDL
|
||||
PARAMS += --USE_SDL='$(USE_SDL)'
|
||||
endif
|
||||
|
||||
ifdef CYGWIN_BUILD
|
||||
PARAMS += --CYGWIN_BUILD='$(CYGWIN_BUILD)'
|
||||
endif
|
||||
|
||||
ifdef MESA_INSTALL_ROOT
|
||||
PARAMS += --MESA_INSTALL_ROOT='$(MESA_INSTALL_ROOT)'
|
||||
endif
|
||||
@ -380,6 +464,7 @@ SCRIPTS = scripts/genie.lua \
|
||||
scripts/src/main.lua \
|
||||
scripts/src/3rdparty.lua \
|
||||
scripts/src/cpu.lua \
|
||||
scripts/src/osd/modules.lua \
|
||||
$(wildcard scripts/src/osd/$(OSD)*.lua) \
|
||||
scripts/src/sound.lua \
|
||||
scripts/src/tools.lua \
|
||||
@ -387,6 +472,7 @@ SCRIPTS = scripts/genie.lua \
|
||||
scripts/src/bus.lua \
|
||||
scripts/src/netlist.lua \
|
||||
scripts/toolchain.lua \
|
||||
scripts/src/osd/modules.lua \
|
||||
scripts/target/$(TARGET)/$(SUBTARGET).lua \
|
||||
$(wildcard src/osd/$(OSD)/$(OSD).mak) \
|
||||
$(wildcard src/$(TARGET)/$(SUBTARGET).mak)
|
||||
@ -483,7 +569,7 @@ endif
|
||||
|
||||
.PHONY: windows_x64
|
||||
windows_x64: generate $(PROJECTDIR)/gmake-mingw64-gcc/Makefile
|
||||
$(SILENT) $(MAKE) --no-print-directory -R -C $(PROJECTDIR)/gmake-mingw64-gcc config=$(CONFIG)64 WINDRES=$(WINDRES)
|
||||
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-mingw64-gcc config=$(CONFIG)64 WINDRES=$(WINDRES)
|
||||
|
||||
#-------------------------------------------------
|
||||
# gmake-mingw32-gcc
|
||||
@ -500,7 +586,7 @@ endif
|
||||
|
||||
.PHONY: windows_x86
|
||||
windows_x86: generate $(PROJECTDIR)/gmake-mingw32-gcc/Makefile
|
||||
$(SILENT) $(MAKE) --no-print-directory -R -C $(PROJECTDIR)/gmake-mingw32-gcc config=$(CONFIG)32 WINDRES=$(WINDRES)
|
||||
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-mingw32-gcc config=$(CONFIG)32 WINDRES=$(WINDRES)
|
||||
|
||||
#-------------------------------------------------
|
||||
# gmake-mingw-clang
|
||||
@ -514,11 +600,11 @@ endif
|
||||
|
||||
.PHONY: windows_x64_clang
|
||||
windows_x64_clang: generate $(PROJECTDIR)/gmake-mingw-clang/Makefile
|
||||
$(SILENT) $(MAKE) --no-print-directory -R -C $(PROJECTDIR)/gmake-mingw-clang config=$(CONFIG)64 WINDRES=$(WINDRES)
|
||||
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-mingw-clang config=$(CONFIG)64 WINDRES=$(WINDRES)
|
||||
|
||||
.PHONY: windows_x86_clang
|
||||
windows_x86_clang: generate $(PROJECTDIR)/gmake-mingw-clang/Makefile
|
||||
$(SILENT) $(MAKE) --no-print-directory -R -C $(PROJECTDIR)/gmake-mingw-clang config=$(CONFIG)32 WINDRES=$(WINDRES)
|
||||
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-mingw-clang config=$(CONFIG)32 WINDRES=$(WINDRES)
|
||||
|
||||
vs2010: generate
|
||||
$(SILENT) $(GENIE) $(PARAMS) vs2010
|
||||
@ -554,7 +640,7 @@ endif
|
||||
ifndef COMPILE
|
||||
$(SILENT) $(GENIE) $(PARAMS) --gcc=android-arm --gcc_version=4.8 gmake
|
||||
endif
|
||||
$(SILENT) $(MAKE) --no-print-directory -R -C $(PROJECTDIR)/gmake-android-arm config=$(CONFIG)
|
||||
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-android-arm config=$(CONFIG)
|
||||
|
||||
android-mips: generate
|
||||
ifndef ANDROID_NDK_MIPS
|
||||
@ -566,7 +652,7 @@ endif
|
||||
ifndef COMPILE
|
||||
$(SILENT) $(GENIE) $(PARAMS) --gcc=android-mips --gcc_version=4.8 gmake
|
||||
endif
|
||||
$(SILENT) $(MAKE) --no-print-directory -R -C $(PROJECTDIR)/gmake-android-mips config=$(CONFIG)
|
||||
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-android-mips config=$(CONFIG)
|
||||
|
||||
android-x86: generate
|
||||
ifndef ANDROID_NDK_X86
|
||||
@ -578,7 +664,7 @@ endif
|
||||
ifndef COMPILE
|
||||
$(SILENT) $(GENIE) $(PARAMS) --gcc=android-x86 --gcc_version=4.8 gmake
|
||||
endif
|
||||
$(SILENT) $(MAKE) --no-print-directory -R -C $(PROJECTDIR)/gmake-android-x86 config=$(CONFIG)
|
||||
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-android-x86 config=$(CONFIG)
|
||||
|
||||
asmjs: generate
|
||||
ifndef EMSCRIPTEN
|
||||
@ -587,7 +673,7 @@ endif
|
||||
ifndef COMPILE
|
||||
$(SILENT) $(GENIE) $(PARAMS) --gcc=asmjs --gcc_version=4.8 gmake
|
||||
endif
|
||||
$(SILENT) $(MAKE) --no-print-directory -R -C $(PROJECTDIR)/gmake-asmjs config=$(CONFIG)
|
||||
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-asmjs config=$(CONFIG)
|
||||
|
||||
|
||||
nacl: nacl_x86
|
||||
@ -599,7 +685,7 @@ endif
|
||||
ifndef COMPILE
|
||||
$(SILENT) $(GENIE) $(PARAMS) --gcc=nacl --gcc_version=4.8 gmake
|
||||
endif
|
||||
$(SILENT) $(MAKE) --no-print-directory -R -C $(PROJECTDIR)/gmake-nacl config=$(CONFIG)64
|
||||
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-nacl config=$(CONFIG)64
|
||||
|
||||
nacl_x86: generate
|
||||
ifndef NACL_SDK_ROOT
|
||||
@ -608,7 +694,7 @@ endif
|
||||
ifndef COMPILE
|
||||
$(SILENT) $(GENIE) $(PARAMS) --gcc=nacl --gcc_version=4.8 gmake
|
||||
endif
|
||||
$(SILENT) $(MAKE) --no-print-directory -R -C $(PROJECTDIR)/gmake-nacl config=$(CONFIG)32
|
||||
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-nacl config=$(CONFIG)32
|
||||
|
||||
nacl-arm: generate
|
||||
ifndef NACL_SDK_ROOT
|
||||
@ -617,7 +703,7 @@ endif
|
||||
ifndef COMPILE
|
||||
$(SILENT) $(GENIE) $(PARAMS) --gcc=nacl-arm --gcc_version=4.8 gmake
|
||||
endif
|
||||
$(SILENT) $(MAKE) --no-print-directory -R -C $(PROJECTDIR)/gmake-nacl-arm config=$(CONFIG)
|
||||
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-nacl-arm config=$(CONFIG)
|
||||
|
||||
pnacl: generate
|
||||
ifndef NACL_SDK_ROOT
|
||||
@ -626,7 +712,7 @@ endif
|
||||
ifndef COMPILE
|
||||
$(SILENT) $(GENIE) $(PARAMS) --gcc=pnacl --gcc_version=4.8 gmake
|
||||
endif
|
||||
$(SILENT) $(MAKE) --no-print-directory -R -C $(PROJECTDIR)/gmake-pnacl config=$(CONFIG)
|
||||
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-pnacl config=$(CONFIG)
|
||||
|
||||
#-------------------------------------------------
|
||||
# gmake-linux
|
||||
@ -637,14 +723,14 @@ $(PROJECTDIR)/gmake-linux/Makefile: makefile $(SCRIPTS) $(GENIE)
|
||||
|
||||
.PHONY: linux_x64
|
||||
linux_x64: generate $(PROJECTDIR)/gmake-linux/Makefile
|
||||
$(SILENT) $(MAKE) --no-print-directory -R -C $(PROJECTDIR)/gmake-linux config=$(CONFIG)64
|
||||
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-linux config=$(CONFIG)64
|
||||
|
||||
.PHONY: linux
|
||||
linux: linux_x86
|
||||
|
||||
.PHONY: linux_x86
|
||||
linux_x86: generate $(PROJECTDIR)/gmake-linux/Makefile
|
||||
$(SILENT) $(MAKE) --no-print-directory -R -C $(PROJECTDIR)/gmake-linux config=$(CONFIG)32
|
||||
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-linux config=$(CONFIG)32
|
||||
|
||||
#-------------------------------------------------
|
||||
# gmake-linux-clang
|
||||
@ -655,112 +741,71 @@ $(PROJECTDIR)/gmake-linux-clang/Makefile: makefile $(SCRIPTS) $(GENIE)
|
||||
|
||||
.PHONY: linux_x64_clang
|
||||
linux_x64_clang: generate $(PROJECTDIR)/gmake-linux-clang/Makefile
|
||||
$(SILENT) $(MAKE) --no-print-directory -R -C $(PROJECTDIR)/gmake-linux-clang config=$(CONFIG)64
|
||||
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-linux-clang config=$(CONFIG)64
|
||||
|
||||
.PHONY: linux_x86_clang
|
||||
linux_x86_clang: generate $(PROJECTDIR)/gmake-linux-clang/Makefile
|
||||
$(SILENT) $(MAKE) --no-print-directory -R -C $(PROJECTDIR)/gmake-linux-clang config=$(CONFIG)32
|
||||
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-linux-clang config=$(CONFIG)32
|
||||
|
||||
#-------------------------------------------------
|
||||
# gmake-osx
|
||||
#-------------------------------------------------
|
||||
|
||||
$(PROJECTDIR)/gmake-osx/Makefile: makefile $(SCRIPTS) $(GENIE)
|
||||
$(SILENT) $(GENIE) $(PARAMS) --gcc=osx --os_version=$(DARWIN_VERSION) --gcc_version=$(GCC_VERSION) gmake
|
||||
$(SILENT) $(GENIE) $(PARAMS) --gcc=osx --gcc_version=$(GCC_VERSION) gmake
|
||||
|
||||
.PHONY: macosx_x64
|
||||
macosx_x64: generate $(PROJECTDIR)/gmake-osx/Makefile
|
||||
$(SILENT) $(MAKE) --no-print-directory -R -C $(PROJECTDIR)/gmake-osx config=$(CONFIG)64
|
||||
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-osx config=$(CONFIG)64
|
||||
|
||||
.PHONY: macosx
|
||||
macosx: macosx_x86
|
||||
|
||||
.PHONY: macosx_x86
|
||||
macosx_x86: generate $(PROJECTDIR)/gmake-osx/Makefile
|
||||
$(SILENT) $(MAKE) --no-print-directory -R -C $(PROJECTDIR)/gmake-osx config=$(CONFIG)32
|
||||
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-osx config=$(CONFIG)32
|
||||
|
||||
#-------------------------------------------------
|
||||
# gmake-osx-clang
|
||||
#-------------------------------------------------
|
||||
|
||||
$(PROJECTDIR)/gmake-osx-clang/Makefile: makefile $(SCRIPTS) $(GENIE)
|
||||
$(SILENT) $(GENIE) $(PARAMS) --gcc=osx-clang --os_version=$(DARWIN_VERSION) --gcc_version=$(CLANG_VERSION) gmake
|
||||
$(SILENT) $(GENIE) $(PARAMS) --gcc=osx-clang --gcc_version=$(CLANG_VERSION) gmake
|
||||
|
||||
.PHONY: macosx_x64_clang
|
||||
macosx_x64_clang: generate $(PROJECTDIR)/gmake-osx-clang/Makefile
|
||||
$(SILENT) $(MAKE) --no-print-directory -R -C $(PROJECTDIR)/gmake-osx-clang config=$(CONFIG)64
|
||||
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-osx-clang config=$(CONFIG)64
|
||||
|
||||
.PHONY: macosx_x86_clang
|
||||
macosx_x86_clang: generate $(PROJECTDIR)/gmake-osx-clang/Makefile
|
||||
$(SILENT) $(MAKE) --no-print-directory -R -C $(PROJECTDIR)/gmake-osx-clang config=$(CONFIG)32
|
||||
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-osx-clang config=$(CONFIG)32
|
||||
|
||||
xcode4: generate
|
||||
$(SILENT) $(GENIE) $(PARAMS) --targetos=macosx --xcode=osx xcode4
|
||||
|
||||
xcode4-ios: generate
|
||||
$(SILENT) $(GENIE) $(PARAMS) --targetos=macosx --xcode=ios xcode4
|
||||
|
||||
|
||||
#-------------------------------------------------
|
||||
# Clean/bootstrap
|
||||
#-------------------------------------------------
|
||||
|
||||
$(GENIE):
|
||||
$(SILENT) $(MAKE) --no-print-directory -R -C 3rdparty/genie/build/gmake.$(GENIEOS) -f genie.make
|
||||
GENIE_SRC=$(wildcard 3rdparty/genie/src/host/*.c)
|
||||
|
||||
$(GENIE): $(GENIE_SRC)
|
||||
$(SILENT) $(MAKE) $(MAKEPARAMS) -C 3rdparty/genie/build/gmake.$(GENIEOS) -f genie.make
|
||||
|
||||
3rdparty/genie/src/hosts/%.c:
|
||||
|
||||
clean:
|
||||
@echo Cleaning...
|
||||
-@rm -rf build
|
||||
$(SILENT) $(MAKE) --no-print-directory -R -C 3rdparty/genie/build/gmake.$(GENIEOS) -f genie.make clean
|
||||
$(SILENT) $(MAKE) $(MAKEPARAMS) -C 3rdparty/genie/build/gmake.$(GENIEOS) -f genie.make clean
|
||||
|
||||
GEN_FOLDERS := \
|
||||
$(GENDIR) \
|
||||
$(GENDIR)/$(TARGET)/$(SUBTARGET) \
|
||||
$(GENDIR)/emu/layout/ \
|
||||
$(GENDIR)/$(TARGET)/layout/ \
|
||||
$(GENDIR)/mess/drivers/ \
|
||||
$(GENDIR)/emu/cpu/arcompact/ \
|
||||
$(GENDIR)/emu/cpu/h8/ \
|
||||
$(GENDIR)/emu/cpu/mcs96/ \
|
||||
$(GENDIR)/emu/cpu/m6502/ \
|
||||
$(GENDIR)/emu/cpu/m6809/ \
|
||||
$(GENDIR)/emu/cpu/m68000/ \
|
||||
$(GENDIR)/emu/cpu/tms57002/ \
|
||||
$(GENDIR)/osd/modules/debugger/qt/ \
|
||||
$(GENDIR)/resource/
|
||||
|
||||
LAYOUTS=$(wildcard $(SRC)/emu/layout/*.lay) $(wildcard $(SRC)/$(TARGET)/layout/*.lay)
|
||||
|
||||
MOC_FILES=$(wildcard $(SRC)/osd/modules/debugger/qt/*.h)
|
||||
ifneq ($(USE_QTDEBUG),1)
|
||||
ifeq ($(TARGETOS),macosx)
|
||||
MOC_FILES=
|
||||
endif
|
||||
ifeq ($(TARGETOS),solaris)
|
||||
MOC_FILES=
|
||||
endif
|
||||
ifeq ($(TARGETOS),haiku)
|
||||
MOC_FILES=
|
||||
endif
|
||||
ifeq ($(TARGETOS),emscripten)
|
||||
MOC_FILES=
|
||||
endif
|
||||
ifeq ($(TARGETOS),os2)
|
||||
MOC_FILES=
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(OS),windows)
|
||||
MOC = moc
|
||||
else
|
||||
MOCTST = $(shell which moc-qt4 2>/dev/null)
|
||||
ifeq '$(MOCTST)' ''
|
||||
MOCTST = $(shell which moc 2>/dev/null)
|
||||
ifeq '$(MOCTST)' ''
|
||||
ifneq '$(MOC_FILES)' ''
|
||||
$(error Qt's Meta Object Compiler (moc) wasn't found!)
|
||||
endif
|
||||
else
|
||||
MOC = $(MOCTST)
|
||||
endif
|
||||
else
|
||||
MOC = $(MOCTST)
|
||||
endif
|
||||
endif
|
||||
GEN_FOLDERS := $(GENDIR)/$(TARGET)/layout/
|
||||
|
||||
LAYOUTS=$(wildcard $(SRC)/$(TARGET)/layout/*.lay)
|
||||
|
||||
ifneq (,$(wildcard src/osd/$(OSD)/$(OSD).mak))
|
||||
include src/osd/$(OSD)/$(OSD).mak
|
||||
@ -776,147 +821,9 @@ $(GEN_FOLDERS):
|
||||
generate: \
|
||||
$(GENIE) \
|
||||
$(GEN_FOLDERS) \
|
||||
$(patsubst $(SRC)/%.lay,$(GENDIR)/%.lh,$(LAYOUTS)) \
|
||||
$(patsubst $(SRC)/%.h,$(GENDIR)/%.moc.c,$(MOC_FILES)) \
|
||||
$(GENDIR)/emu/uismall.fh \
|
||||
$(GENDIR)/resource/$(TARGET)vers.rc \
|
||||
$(GENDIR)/resource/$(TARGET)-Info.plist \
|
||||
$(GENDIR)/$(TARGET)/$(SUBTARGET)/drivlist.c \
|
||||
$(GENDIR)/mess/drivers/ymmu100.inc \
|
||||
$(GENDIR)/emu/cpu/arcompact/arcompact.inc \
|
||||
$(GENDIR)/emu/cpu/h8/h8.inc $(GENDIR)/emu/cpu/h8/h8h.inc $(GENDIR)/emu/cpu/h8/h8s2000.inc $(GENDIR)/emu/cpu/h8/h8s2600.inc \
|
||||
$(GENDIR)/emu/cpu/mcs96/mcs96.inc $(GENDIR)/emu/cpu/mcs96/i8x9x.inc $(GENDIR)/emu/cpu/mcs96/i8xc196.inc \
|
||||
$(GENDIR)/emu/cpu/m6502/deco16.inc $(GENDIR)/emu/cpu/m6502/m4510.inc $(GENDIR)/emu/cpu/m6502/m6502.inc $(GENDIR)/emu/cpu/m6502/m65c02.inc $(GENDIR)/emu/cpu/m6502/m65ce02.inc $(GENDIR)/emu/cpu/m6502/m6509.inc $(GENDIR)/emu/cpu/m6502/m6510.inc $(GENDIR)/emu/cpu/m6502/n2a03.inc $(GENDIR)/emu/cpu/m6502/r65c02.inc $(GENDIR)/emu/cpu/m6502/m740.inc \
|
||||
$(GENDIR)/emu/cpu/m6809/m6809.inc $(GENDIR)/emu/cpu/m6809/hd6309.inc $(GENDIR)/emu/cpu/m6809/konami.inc \
|
||||
$(GENDIR)/emu/cpu/tms57002/tms57002.inc \
|
||||
$(GENDIR)/m68kmake$(EXE) $(GENDIR)/emu/cpu/m68000/m68kops.c
|
||||
$(patsubst $(SRC)/%.lay,$(GENDIR)/%.lh,$(LAYOUTS))
|
||||
|
||||
$(GENDIR)/%.lh: $(SRC)/%.lay $(SRC)/build/file2str.py
|
||||
@echo Converting $<...
|
||||
$(PYTHON) $(SRC)/build/file2str.py $< $@ layout_$(basename $(notdir $<))
|
||||
|
||||
$(GENDIR)/%.fh: $(SRC)/%.png $(SRC)/build/png2bdc.py $(SRC)/build/file2str.py
|
||||
@echo Converting $<...
|
||||
$(PYTHON) $(SRC)/build/png2bdc.py $< $(GENDIR)/temp.bdc
|
||||
$(PYTHON) $(SRC)/build/file2str.py $(GENDIR)/temp.bdc $@ font_$(basename $(notdir $<)) UINT8
|
||||
|
||||
$(GENDIR)/resource/$(TARGET)vers.rc: $(SRC)/build/verinfo.py $(SRC)/version.c
|
||||
@echo Emitting $@...
|
||||
$(PYTHON) $(SRC)/build/verinfo.py -r -b $(TARGET) $(SRC)/version.c > $@
|
||||
|
||||
$(GENDIR)/resource/$(TARGET)-Info.plist: $(SRC)/build/verinfo.py $(SRC)/version.c
|
||||
@echo Emitting $@...
|
||||
$(PYTHON) $(SRC)/build/verinfo.py -p -b $(TARGET) $(SRC)/version.c > $@
|
||||
|
||||
$(GENDIR)/$(TARGET)/$(SUBTARGET)/drivlist.c: $(SRC)/$(TARGET)/$(SUBTARGET).lst $(SRC)/build/makelist.py
|
||||
@echo Building driver list $<...
|
||||
$(PYTHON) $(SRC)/build/makelist.py $< >$@
|
||||
|
||||
# rule to generate the C files
|
||||
$(GENDIR)/emu/cpu/arcompact/arcompact.inc: $(SRC)/emu/cpu/arcompact/arcompact_make.py
|
||||
@echo Generating arcompact source .inc files...
|
||||
$(PYTHON) $(SRC)/emu/cpu/arcompact/arcompact_make.py $@
|
||||
|
||||
$(GENDIR)/emu/cpu/h8/h8.inc: $(SRC)/emu/cpu/h8/h8make.py $(SRC)/emu/cpu/h8/h8.lst
|
||||
@echo Generating H8-300 source file...
|
||||
$(PYTHON) $(SRC)/emu/cpu/h8/h8make.py $(SRC)/emu/cpu/h8/h8.lst o $@
|
||||
|
||||
$(GENDIR)/emu/cpu/h8/h8h.inc: $(SRC)/emu/cpu/h8/h8make.py $(SRC)/emu/cpu/h8/h8.lst
|
||||
@echo Generating H8-300H source file...
|
||||
$(PYTHON) $(SRC)/emu/cpu/h8/h8make.py $(SRC)/emu/cpu/h8/h8.lst h $@
|
||||
|
||||
$(GENDIR)/emu/cpu/h8/h8s2000.inc: $(SRC)/emu/cpu/h8/h8make.py $(SRC)/emu/cpu/h8/h8.lst
|
||||
@echo Generating H8S/2000 source file...
|
||||
$(PYTHON) $(SRC)/emu/cpu/h8/h8make.py $(SRC)/emu/cpu/h8/h8.lst s20 $@
|
||||
|
||||
$(GENDIR)/emu/cpu/h8/h8s2600.inc: $(SRC)/emu/cpu/h8/h8make.py $(SRC)/emu/cpu/h8/h8.lst
|
||||
@echo Generating H8S/2600 source file...
|
||||
$(PYTHON) $(SRC)/emu/cpu/h8/h8make.py $(SRC)/emu/cpu/h8/h8.lst s26 $@
|
||||
|
||||
$(GENDIR)/emu/cpu/mcs96/mcs96.inc: $(SRC)/emu/cpu/mcs96/mcs96make.py $(SRC)/emu/cpu/mcs96/mcs96ops.lst
|
||||
@echo Generating mcs96 source file...
|
||||
$(PYTHON) $(SRC)/emu/cpu/mcs96/mcs96make.py mcs96 $(SRC)/emu/cpu/mcs96/mcs96ops.lst $@
|
||||
|
||||
$(GENDIR)/emu/cpu/mcs96/i8x9x.inc: $(SRC)/emu/cpu/mcs96/mcs96make.py $(SRC)/emu/cpu/mcs96/mcs96ops.lst
|
||||
@echo Generating i8x9x source file...
|
||||
$(PYTHON) $(SRC)/emu/cpu/mcs96/mcs96make.py i8x9x $(SRC)/emu/cpu/mcs96/mcs96ops.lst $@
|
||||
|
||||
$(GENDIR)/emu/cpu/mcs96/i8xc196.inc: $(SRC)/emu/cpu/mcs96/mcs96make.py $(SRC)/emu/cpu/mcs96/mcs96ops.lst
|
||||
@echo Generating i8xc196 source file...
|
||||
$(PYTHON) $(SRC)/emu/cpu/mcs96/mcs96make.py i8xc196 $(SRC)/emu/cpu/mcs96/mcs96ops.lst $@
|
||||
|
||||
$(GENDIR)/emu/cpu/m6502/deco16.inc: $(SRC)/emu/cpu/m6502/m6502make.py $(SRC)/emu/cpu/m6502/odeco16.lst $(SRC)/emu/cpu/m6502/ddeco16.lst
|
||||
@echo Generating deco16 source file...
|
||||
$(PYTHON) $(SRC)/emu/cpu/m6502/m6502make.py deco16_device $(SRC)/emu/cpu/m6502/odeco16.lst $(SRC)/emu/cpu/m6502/ddeco16.lst $@
|
||||
|
||||
$(GENDIR)/emu/cpu/m6502/m4510.inc: $(SRC)/emu/cpu/m6502/m6502make.py $(SRC)/emu/cpu/m6502/om4510.lst $(SRC)/emu/cpu/m6502/dm4510.lst
|
||||
@echo Generating m4510 source file...
|
||||
$(PYTHON) $(SRC)/emu/cpu/m6502/m6502make.py m4510_device $(SRC)/emu/cpu/m6502/om4510.lst $(SRC)/emu/cpu/m6502/dm4510.lst $@
|
||||
|
||||
$(GENDIR)/emu/cpu/m6502/m6502.inc: $(SRC)/emu/cpu/m6502/m6502make.py $(SRC)/emu/cpu/m6502/om6502.lst $(SRC)/emu/cpu/m6502/dm6502.lst
|
||||
@echo Generating m6502 source file...
|
||||
$(PYTHON) $(SRC)/emu/cpu/m6502/m6502make.py m6502_device $(SRC)/emu/cpu/m6502/om6502.lst $(SRC)/emu/cpu/m6502/dm6502.lst $@
|
||||
|
||||
$(GENDIR)/emu/cpu/m6502/m65c02.inc: $(SRC)/emu/cpu/m6502/m6502make.py $(SRC)/emu/cpu/m6502/om65c02.lst $(SRC)/emu/cpu/m6502/dm65c02.lst
|
||||
@echo Generating m65c02 source file...
|
||||
$(PYTHON) $(SRC)/emu/cpu/m6502/m6502make.py m65c02_device $(SRC)/emu/cpu/m6502/om65c02.lst $(SRC)/emu/cpu/m6502/dm65c02.lst $@
|
||||
|
||||
$(GENDIR)/emu/cpu/m6502/m65ce02.inc: $(SRC)/emu/cpu/m6502/m6502make.py $(SRC)/emu/cpu/m6502/om65ce02.lst $(SRC)/emu/cpu/m6502/dm65ce02.lst
|
||||
@echo Generating m65ce02 source file...
|
||||
$(PYTHON) $(SRC)/emu/cpu/m6502/m6502make.py m65ce02_device $(SRC)/emu/cpu/m6502/om65ce02.lst $(SRC)/emu/cpu/m6502/dm65ce02.lst $@
|
||||
|
||||
$(GENDIR)/emu/cpu/m6502/m6509.inc: $(SRC)/emu/cpu/m6502/m6502make.py $(SRC)/emu/cpu/m6502/om6509.lst $(SRC)/emu/cpu/m6502/dm6509.lst
|
||||
@echo Generating m6509 source file...
|
||||
$(PYTHON) $(SRC)/emu/cpu/m6502/m6502make.py m6509_device $(SRC)/emu/cpu/m6502/om6509.lst $(SRC)/emu/cpu/m6502/dm6509.lst $@
|
||||
|
||||
$(GENDIR)/emu/cpu/m6502/m6510.inc: $(SRC)/emu/cpu/m6502/m6502make.py $(SRC)/emu/cpu/m6502/om6510.lst $(SRC)/emu/cpu/m6502/dm6510.lst
|
||||
@echo Generating m6510 source file...
|
||||
$(PYTHON) $(SRC)/emu/cpu/m6502/m6502make.py m6510_device $(SRC)/emu/cpu/m6502/om6510.lst $(SRC)/emu/cpu/m6502/dm6510.lst $@
|
||||
|
||||
$(GENDIR)/emu/cpu/m6502/n2a03.inc: $(SRC)/emu/cpu/m6502/m6502make.py $(SRC)/emu/cpu/m6502/on2a03.lst $(SRC)/emu/cpu/m6502/dn2a03.lst
|
||||
@echo Generating n2a03 source file...
|
||||
$(PYTHON) $(SRC)/emu/cpu/m6502/m6502make.py n2a03_device $(SRC)/emu/cpu/m6502/on2a03.lst $(SRC)/emu/cpu/m6502/dn2a03.lst $@
|
||||
|
||||
$(GENDIR)/emu/cpu/m6502/r65c02.inc: $(SRC)/emu/cpu/m6502/m6502make.py $(SRC)/emu/cpu/m6502/dr65c02.lst
|
||||
@echo Generating r65c02 source file...
|
||||
$(PYTHON) $(SRC)/emu/cpu/m6502/m6502make.py r65c02_device - $(SRC)/emu/cpu/m6502/dr65c02.lst $@
|
||||
|
||||
$(GENDIR)/emu/cpu/m6502/m740.inc: $(SRC)/emu/cpu/m6502/m6502make.py $(SRC)/emu/cpu/m6502/om740.lst $(SRC)/emu/cpu/m6502/dm740.lst
|
||||
@echo Generating m740 source file...
|
||||
$(PYTHON) $(SRC)/emu/cpu/m6502/m6502make.py m740_device $(SRC)/emu/cpu/m6502/om740.lst $(SRC)/emu/cpu/m6502/dm740.lst $@
|
||||
|
||||
$(GENDIR)/emu/cpu/m6809/m6809.inc: $(SRC)/emu/cpu/m6809/m6809make.py $(SRC)/emu/cpu/m6809/m6809.ops $(SRC)/emu/cpu/m6809/base6x09.ops
|
||||
@echo Generating m6809 source file...
|
||||
$(PYTHON) $(SRC)/emu/cpu/m6809/m6809make.py $(SRC)/emu/cpu/m6809/m6809.ops > $@
|
||||
|
||||
$(GENDIR)/emu/cpu/m6809/hd6309.inc: $(SRC)/emu/cpu/m6809/m6809make.py $(SRC)/emu/cpu/m6809/hd6309.ops $(SRC)/emu/cpu/m6809/base6x09.ops
|
||||
@echo Generating hd6309 source file...
|
||||
$(PYTHON) $(SRC)/emu/cpu/m6809/m6809make.py $(SRC)/emu/cpu/m6809/hd6309.ops > $@
|
||||
|
||||
$(GENDIR)/emu/cpu/m6809/konami.inc: $(SRC)/emu/cpu/m6809/m6809make.py $(SRC)/emu/cpu/m6809/konami.ops $(SRC)/emu/cpu/m6809/base6x09.ops
|
||||
@echo Generating konami source file...
|
||||
$(PYTHON) $(SRC)/emu/cpu/m6809/m6809make.py $(SRC)/emu/cpu/m6809/konami.ops > $@
|
||||
|
||||
$(GENDIR)/emu/cpu/tms57002/tms57002.inc: $(SRC)/emu/cpu/tms57002/tmsmake.py $(SRC)/emu/cpu/tms57002/tmsinstr.lst
|
||||
@echo Generating TMS57002 source file...
|
||||
$(PYTHON) $(SRC)/emu/cpu/tms57002/tmsmake.py $(SRC)/emu/cpu/tms57002/tmsinstr.lst $@
|
||||
|
||||
$(GENDIR)/m68kmake.o: src/emu/cpu/m68000/m68kmake.c
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) -x c++ -std=gnu++98 -o "$@" -c "$<"
|
||||
|
||||
$(GENDIR)/m68kmake$(EXE) : $(GENDIR)/m68kmake.o
|
||||
@echo Linking $@...
|
||||
$(LD) -lstdc++ $^ -o $@
|
||||
|
||||
$(GENDIR)/emu/cpu/m68000/m68kops.c: $(GENDIR)/m68kmake$(EXE) $(SRC)/emu/cpu/m68000/m68k_in.c
|
||||
@echo Generating M68K source files...
|
||||
$(SILENT) $(GENDIR)/m68kmake $(GENDIR)/emu/cpu/m68000 $(SRC)/emu/cpu/m68000/m68k_in.c
|
||||
|
||||
$(GENDIR)/mess/drivers/ymmu100.inc: $(SRC)/mess/drivers/ymmu100.ppm $(SRC)/build/file2str.py
|
||||
@echo Converting $<...
|
||||
@$(PYTHON) $(SRC)/build/file2str.py $(SRC)/mess/drivers/ymmu100.ppm $@ ymmu100_bkg UINT8
|
||||
|
||||
$(GENDIR)/%.moc.c: $(SRC)/%.h
|
||||
$(SILENT) $(MOC) $(MOCINCPATH) $< -o $@
|
||||
|
||||
|
@ -1,11 +1,17 @@
|
||||
premake.check_paths = true
|
||||
premake.make.linkoptions_after = true
|
||||
premake.make.override = { "TARGET" }
|
||||
MAME_DIR = (path.getabsolute("..") .. "/")
|
||||
local MAME_BUILD_DIR = (MAME_DIR .. "build/")
|
||||
local naclToolchain = ""
|
||||
|
||||
|
||||
function str_to_version (str)
|
||||
function backtick(cmd)
|
||||
result = string.gsub(string.gsub(os.outputof(cmd), "\r?\n$", ""), " $", "")
|
||||
return result
|
||||
end
|
||||
|
||||
function str_to_version(str)
|
||||
local val = 0
|
||||
if (str == nil or str == '') then
|
||||
return val
|
||||
@ -34,13 +40,10 @@ function findfunction(x)
|
||||
end
|
||||
end
|
||||
|
||||
function includeosd()
|
||||
includedirs {
|
||||
MAME_DIR .. "src/osd",
|
||||
}
|
||||
function layoutbuildtask(_folder, _name)
|
||||
return { MAME_DIR .. "src/".._folder.."/".. _name ..".lay" , GEN_DIR .. _folder .. "/".._name..".lh", { MAME_DIR .. "src/build/file2str.py" }, {"@echo Converting src/".._folder.."/".._name..".lay...", "python $(1) $(<) $(@) layout_".._name }};
|
||||
end
|
||||
|
||||
|
||||
CPUS = {}
|
||||
SOUNDS = {}
|
||||
MACHINES = {}
|
||||
@ -54,7 +57,7 @@ newoption {
|
||||
|
||||
newoption {
|
||||
trigger = "osd",
|
||||
description = "Choose target OSD",
|
||||
description = "Choose OSD layer implementation",
|
||||
}
|
||||
|
||||
newoption {
|
||||
@ -66,14 +69,17 @@ newoption {
|
||||
{ "android-x86", "Android - x86" },
|
||||
{ "asmjs", "Emscripten/asm.js" },
|
||||
{ "freebsd", "FreeBSD" },
|
||||
{ "netbsd", "NetBSD" },
|
||||
{ "openbsd", "OpenBSD" },
|
||||
{ "nacl", "Native Client" },
|
||||
{ "nacl-arm", "Native Client - ARM" },
|
||||
{ "pnacl", "Native Client - PNaCl" },
|
||||
{ "linux", "Linux" },
|
||||
{ "ios", "iOS" },
|
||||
{ "linux", "Linux" },
|
||||
{ "ios", "iOS" },
|
||||
{ "macosx", "OSX" },
|
||||
{ "windows", "Windows" },
|
||||
|
||||
{ "os2", "OS/2 eComStation" },
|
||||
{ "haiku", "Haiku" },
|
||||
},
|
||||
}
|
||||
|
||||
@ -102,12 +108,6 @@ newoption {
|
||||
description = "GCC compiler version",
|
||||
}
|
||||
|
||||
newoption {
|
||||
trigger = "os_version",
|
||||
description = "OS version",
|
||||
value = "",
|
||||
}
|
||||
|
||||
newoption {
|
||||
trigger = "CC",
|
||||
description = "CC replacement",
|
||||
@ -126,42 +126,42 @@ newoption {
|
||||
newoption {
|
||||
trigger = "PROFILE",
|
||||
description = "Enable profiling.",
|
||||
}
|
||||
}
|
||||
|
||||
newoption {
|
||||
trigger = "SYMBOLS",
|
||||
description = "Enable symbols.",
|
||||
}
|
||||
}
|
||||
|
||||
newoption {
|
||||
trigger = "SYMLEVEL",
|
||||
description = "Symbols level.",
|
||||
}
|
||||
}
|
||||
|
||||
newoption {
|
||||
trigger = "PROFILER",
|
||||
description = "Include the internal profiler.",
|
||||
}
|
||||
}
|
||||
|
||||
newoption {
|
||||
trigger = "OPTIMIZE",
|
||||
description = "Optimization level.",
|
||||
}
|
||||
}
|
||||
|
||||
newoption {
|
||||
trigger = "ARCHOPTS",
|
||||
description = "ARCHOPTS.",
|
||||
}
|
||||
}
|
||||
|
||||
newoption {
|
||||
trigger = "LDOPTS",
|
||||
description = "Additional linker options",
|
||||
}
|
||||
}
|
||||
|
||||
newoption {
|
||||
trigger = "MAP",
|
||||
description = "Generate a link map.",
|
||||
}
|
||||
}
|
||||
|
||||
newoption {
|
||||
trigger = "NOASM",
|
||||
@ -172,15 +172,24 @@ newoption {
|
||||
},
|
||||
}
|
||||
|
||||
newoption {
|
||||
trigger = "BIGENDIAN",
|
||||
description = "Build for big endian target",
|
||||
allowed = {
|
||||
{ "0", "Little endian target" },
|
||||
{ "1", "Big endian target" },
|
||||
},
|
||||
}
|
||||
|
||||
newoption {
|
||||
trigger = "FORCE_DRC_C_BACKEND",
|
||||
description = "Force DRC C backend.",
|
||||
}
|
||||
}
|
||||
|
||||
newoption {
|
||||
trigger = "NOWERROR",
|
||||
description = "NOWERROR",
|
||||
}
|
||||
}
|
||||
|
||||
newoption {
|
||||
trigger = "USE_BGFX",
|
||||
@ -191,7 +200,9 @@ newoption {
|
||||
}
|
||||
}
|
||||
|
||||
local os_version = str_to_version(_OPTIONS["os_version"])
|
||||
if not _OPTIONS["BIGENDIAN"] then
|
||||
_OPTIONS["BIGENDIAN"] = "0"
|
||||
end
|
||||
|
||||
if not _OPTIONS["NOASM"] then
|
||||
if _OPTIONS["targetos"]=="emscripten" then
|
||||
@ -206,9 +217,6 @@ if _OPTIONS["NOASM"]=="1" and not _OPTIONS["FORCE_DRC_C_BACKEND"] then
|
||||
end
|
||||
|
||||
USE_BGFX = 1
|
||||
if (_OPTIONS["targetos"]=="macosx" and os_version < 100700) then
|
||||
USE_BGFX = 0
|
||||
end
|
||||
if(_OPTIONS["USE_BGFX"]~=nil) then
|
||||
USE_BGFX = tonumber(_OPTIONS["USE_BGFX"])
|
||||
end
|
||||
@ -251,18 +259,50 @@ configuration { "vs*" }
|
||||
"FatalWarnings",
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
configuration { "Debug", "vs*" }
|
||||
flags {
|
||||
"Symbols",
|
||||
}
|
||||
|
||||
configuration { "Release", "vs*" }
|
||||
flags {
|
||||
"Optimize",
|
||||
}
|
||||
|
||||
configuration {}
|
||||
|
||||
--aftercompilefile ("\t$(SILENT) gawk -f ../../../../../scripts/depfilter.awk $(@:%.o=%.d) > $(@:%.o=%.dep)\n\t$(SILENT) mv $(@:%.o=%.dep) $(@:%.o=%.d)")
|
||||
|
||||
|
||||
|
||||
local AWK = ""
|
||||
if (os.is("windows")) then
|
||||
AWK_TEST = backtick("awk --version 2> NUL")
|
||||
if (AWK_TEST~='') then
|
||||
AWK = "awk"
|
||||
else
|
||||
AWK_TEST = backtick("gawk --version 2> NUL")
|
||||
if (AWK_TEST~='') then
|
||||
AWK = "gawk"
|
||||
end
|
||||
end
|
||||
else
|
||||
AWK_TEST = backtick("awk --version 2> /dev/null")
|
||||
if (AWK_TEST~='') then
|
||||
AWK = "awk"
|
||||
else
|
||||
AWK_TEST = backtick("gawk --version 2> /dev/null")
|
||||
if (AWK_TEST~='') then
|
||||
AWK = "gawk"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (AWK~='') then
|
||||
postcompiletasks {
|
||||
AWK .. " -f ../../../../../scripts/depfilter.awk $(@:%.o=%.d) > $(@:%.o=%.dep)",
|
||||
"mv $(@:%.o=%.dep) $(@:%.o=%.d)",
|
||||
}
|
||||
end
|
||||
|
||||
msgcompile ("Compiling $(subst ../,,$<)...")
|
||||
|
||||
msgcompile_objc ("Objective-C compiling $(subst ../,,$<)...")
|
||||
@ -296,19 +336,19 @@ configuration { "x64", "Debug" }
|
||||
if _OPTIONS["PROFILE"] then
|
||||
targetsuffix "64dp"
|
||||
end
|
||||
|
||||
|
||||
configuration { "x32", "Release" }
|
||||
targetsuffix ""
|
||||
if _OPTIONS["PROFILE"] then
|
||||
targetsuffix "p"
|
||||
end
|
||||
|
||||
|
||||
configuration { "x32", "Debug" }
|
||||
targetsuffix "d"
|
||||
if _OPTIONS["PROFILE"] then
|
||||
targetsuffix "dp"
|
||||
end
|
||||
|
||||
|
||||
configuration { "Native", "Release" }
|
||||
targetsuffix ""
|
||||
if _OPTIONS["PROFILE"] then
|
||||
@ -349,6 +389,11 @@ configuration { "gmake" }
|
||||
buildoptions_objc {
|
||||
"-DINLINE=\"static inline\"",
|
||||
}
|
||||
configuration { "xcode4*" }
|
||||
buildoptions {
|
||||
"-DINLINE=\"static inline\"",
|
||||
}
|
||||
|
||||
configuration { "vs*" }
|
||||
defines {
|
||||
"INLINE=static inline",
|
||||
@ -384,10 +429,56 @@ else
|
||||
end
|
||||
|
||||
|
||||
-- define LSB_FIRST if we are a little-endian target
|
||||
defines {
|
||||
"LSB_FIRST",
|
||||
}
|
||||
if _OPTIONS["BIGENDIAN"]=="1" then
|
||||
if _OPTIONS["targetos"]=="macosx" then
|
||||
defines {
|
||||
"OSX_PPC",
|
||||
}
|
||||
buildoptions {
|
||||
"-Wno-unused-label",
|
||||
}
|
||||
if _OPTIONS["SYMBOLS"] then
|
||||
buildoptions {
|
||||
"-mlong-branch",
|
||||
}
|
||||
end
|
||||
configuration { "x64" }
|
||||
buildoptions {
|
||||
"-arch ppc64",
|
||||
}
|
||||
linkoptions {
|
||||
"-arch ppc64",
|
||||
}
|
||||
configuration { "x32" }
|
||||
buildoptions {
|
||||
"-arch ppc",
|
||||
}
|
||||
linkoptions {
|
||||
"-arch ppc",
|
||||
}
|
||||
configuration { }
|
||||
end
|
||||
else
|
||||
defines {
|
||||
"LSB_FIRST",
|
||||
}
|
||||
if _OPTIONS["targetos"]=="macosx" then
|
||||
configuration { "x64" }
|
||||
buildoptions {
|
||||
"-arch x86_64",
|
||||
}
|
||||
linkoptions {
|
||||
"-arch x86_64",
|
||||
}
|
||||
configuration { "x32" }
|
||||
buildoptions {
|
||||
"-arch i386",
|
||||
}
|
||||
linkoptions {
|
||||
"-arch i386",
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
-- need to ensure FLAC functions are statically linked
|
||||
defines {
|
||||
@ -400,19 +491,20 @@ if _OPTIONS["NOASM"]=="1" then
|
||||
}
|
||||
end
|
||||
|
||||
-- fixme -- need to make this work for other target architectures (PPC)
|
||||
if not _OPTIONS["FORCE_DRC_C_BACKEND"] then
|
||||
configuration { "x64" }
|
||||
defines {
|
||||
"NATIVE_DRC=drcbe_x64",
|
||||
}
|
||||
configuration { "x32" }
|
||||
defines {
|
||||
"NATIVE_DRC=drcbe_x86",
|
||||
}
|
||||
configuration { }
|
||||
if _OPTIONS["BIGENDIAN"]~="1" then
|
||||
configuration { "x64" }
|
||||
defines {
|
||||
"NATIVE_DRC=drcbe_x64",
|
||||
}
|
||||
configuration { "x32" }
|
||||
defines {
|
||||
"NATIVE_DRC=drcbe_x86",
|
||||
}
|
||||
configuration { }
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-- define USE_SYSTEM_JPEGLIB if library shipped with MAME is not used
|
||||
--ifneq ($(BUILD_JPEGLIB),1)
|
||||
--DEFS += -DUSE_SYSTEM_JPEGLIB
|
||||
@ -495,7 +587,7 @@ end
|
||||
if _OPTIONS["SYMBOLS"]~=nil then
|
||||
flags {
|
||||
"Symbols",
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
--# add the optimization flag
|
||||
@ -515,9 +607,9 @@ end
|
||||
--ifneq ($(),0)
|
||||
if _OPTIONS["OPTIMIZE"] then
|
||||
buildoptions {
|
||||
"-fno-strict-aliasing"
|
||||
"-fno-strict-aliasing"
|
||||
}
|
||||
if _OPTIONS["ARCHOPTS"] then
|
||||
if _OPTIONS["ARCHOPTS"] then
|
||||
buildoptions {
|
||||
_OPTIONS["ARCHOPTS"]
|
||||
}
|
||||
@ -553,7 +645,7 @@ if _OPTIONS["MAP"] then
|
||||
"-Wl,-Map," .. "../../../../" .. _OPTIONS["target"] .. _OPTIONS["subtarget"] .. ".map"
|
||||
}
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
buildoptions {
|
||||
"-Wno-unknown-pragmas",
|
||||
@ -594,7 +686,7 @@ end
|
||||
--endif
|
||||
|
||||
|
||||
|
||||
|
||||
local version = str_to_version(_OPTIONS["gcc_version"])
|
||||
if string.find(_OPTIONS["gcc"], "clang") then
|
||||
buildoptions {
|
||||
@ -607,7 +699,7 @@ end
|
||||
buildoptions {
|
||||
"-Wno-unused-value",
|
||||
}
|
||||
end
|
||||
end
|
||||
if (version >= 30400) then
|
||||
buildoptions {
|
||||
"-Wno-inline-new-delete",
|
||||
@ -626,12 +718,12 @@ end
|
||||
buildoptions {
|
||||
"-Wno-cast-align"
|
||||
}
|
||||
end
|
||||
end
|
||||
if (version >= 40400) then
|
||||
buildoptions {
|
||||
"-Wno-unused-result",
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
if (version >= 40700) then
|
||||
buildoptions {
|
||||
@ -656,13 +748,13 @@ local subdir
|
||||
if (_OPTIONS["target"] == _OPTIONS["subtarget"]) then
|
||||
subdir = _OPTIONS["osd"] .. "/" .. _OPTIONS["target"]
|
||||
else
|
||||
subdir = _OPTIONS["osd"] .. "/" .. _OPTIONS["target"] .. _OPTIONS["subtarget"]
|
||||
end
|
||||
subdir = _OPTIONS["osd"] .. "/" .. _OPTIONS["target"] .. _OPTIONS["subtarget"]
|
||||
end
|
||||
|
||||
if not toolchain(MAME_BUILD_DIR, subdir) then
|
||||
return -- no action specified
|
||||
end
|
||||
|
||||
|
||||
configuration { "asmjs" }
|
||||
buildoptions {
|
||||
"-std=gnu89",
|
||||
@ -704,7 +796,7 @@ configuration { "linux-*" }
|
||||
"dl",
|
||||
}
|
||||
if _OPTIONS["distro"]=="debian-stable" then
|
||||
defines
|
||||
defines
|
||||
{
|
||||
"NO_AFFINITY_NP",
|
||||
}
|
||||
@ -725,26 +817,12 @@ configuration { "mingw*" }
|
||||
"-static-libgcc",
|
||||
"-static-libstdc++",
|
||||
}
|
||||
if _OPTIONS["osd"]=="sdl" then
|
||||
links {
|
||||
"SDL2",
|
||||
"imm32",
|
||||
"version",
|
||||
"ole32",
|
||||
"oleaut32",
|
||||
}
|
||||
end
|
||||
links {
|
||||
"user32",
|
||||
"gdi32",
|
||||
"dsound",
|
||||
"dxguid",
|
||||
"winmm",
|
||||
"advapi32",
|
||||
"comctl32",
|
||||
"shlwapi",
|
||||
"wsock32",
|
||||
"comdlg32",
|
||||
}
|
||||
|
||||
configuration { "vs*" }
|
||||
@ -757,15 +835,10 @@ configuration { "vs*" }
|
||||
}
|
||||
links {
|
||||
"user32",
|
||||
"gdi32",
|
||||
"dsound",
|
||||
"dxguid",
|
||||
"winmm",
|
||||
"advapi32",
|
||||
"comctl32",
|
||||
"shlwapi",
|
||||
"wsock32",
|
||||
"comdlg32",
|
||||
}
|
||||
|
||||
buildoptions {
|
||||
@ -832,7 +905,7 @@ configuration { "vs*" }
|
||||
}
|
||||
if _OPTIONS["vs"]=="intel-15" then
|
||||
buildoptions {
|
||||
"/Qwd9",
|
||||
"/Qwd9",
|
||||
"/Qwd82",
|
||||
"/Qwd111",
|
||||
"/Qwd128",
|
||||
@ -845,13 +918,13 @@ if _OPTIONS["vs"]=="intel-15" then
|
||||
"/Qwd869",
|
||||
"/Qwd2545",
|
||||
"/Qwd2553",
|
||||
"/Qwd2557",
|
||||
"/Qwd3280",
|
||||
"/Qwd2557",
|
||||
"/Qwd3280",
|
||||
|
||||
"/Qwd170",
|
||||
"/Qwd188",
|
||||
|
||||
"/Qwd63",
|
||||
"/Qwd63",
|
||||
"/Qwd177",
|
||||
"/Qwd186",
|
||||
"/Qwd488",
|
||||
@ -910,7 +983,7 @@ if (_OPTIONS["target"] == _OPTIONS["subtarget"]) then
|
||||
startproject (_OPTIONS["target"])
|
||||
else
|
||||
startproject (_OPTIONS["target"] .. _OPTIONS["subtarget"])
|
||||
end
|
||||
end
|
||||
mainProject(_OPTIONS["target"],_OPTIONS["subtarget"])
|
||||
|
||||
if _OPTIONS["with-tools"] then
|
||||
@ -918,6 +991,6 @@ if _OPTIONS["with-tools"] then
|
||||
dofile(path.join("src", "tools.lua"))
|
||||
end
|
||||
|
||||
if (_ACTION == "gmake" and _OPTIONS["gcc"]=='asmjs') then
|
||||
if (_ACTION == "gmake" and _OPTIONS["gcc"]=='asmjs') then
|
||||
strip()
|
||||
end
|
||||
|
@ -66,13 +66,13 @@ project "softfloat"
|
||||
}
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/osd",
|
||||
MAME_DIR .. "src/emu",
|
||||
MAME_DIR .. "src/lib",
|
||||
MAME_DIR .. "src/lib/util",
|
||||
MAME_DIR .. "3rdparty",
|
||||
MAME_DIR .. "3rdparty/expat/lib/",
|
||||
}
|
||||
includeosd()
|
||||
|
||||
files {
|
||||
MAME_DIR .. "3rdparty/softfloat/softfloat.c",
|
||||
@ -389,12 +389,11 @@ project "portmidi"
|
||||
kind "StaticLib"
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/osd",
|
||||
MAME_DIR .. "3rdparty/portmidi/pm_common",
|
||||
MAME_DIR .. "3rdparty/portmidi/porttime",
|
||||
}
|
||||
|
||||
includeosd()
|
||||
|
||||
|
||||
configuration { "linux*" }
|
||||
defines {
|
||||
"PMALSA=1",
|
||||
@ -451,8 +450,6 @@ project "bgfx"
|
||||
MAME_DIR .. "3rdparty/bgfx/3rdparty/khronos",
|
||||
}
|
||||
|
||||
includeosd()
|
||||
|
||||
configuration { "vs*" }
|
||||
includedirs {
|
||||
MAME_DIR .. "3rdparty/dxsdk/Include",
|
||||
|
@ -1021,6 +1021,17 @@ if (BUSES["CENTRONICS"]~=null) then
|
||||
MAME_DIR .. "src/emu/bus/centronics/printer.c",
|
||||
MAME_DIR .. "src/emu/bus/centronics/digiblst.c",
|
||||
}
|
||||
|
||||
dependency {
|
||||
{ MAME_DIR .. "src/emu/bus/centronics/epson_ex800.c", GEN_DIR .. "emu/layout/ex800.lh" },
|
||||
{ MAME_DIR .. "src/emu/bus/centronics/epson_lx800.c", GEN_DIR .. "emu/layout/lx800.lh" },
|
||||
{ MAME_DIR .. "src/emu/bus/centronics/epson_lx810l.c", GEN_DIR .. "emu/layout/lx800.lh" },
|
||||
}
|
||||
|
||||
custombuildtask {
|
||||
layoutbuildtask("emu/layout", "ex800"),
|
||||
layoutbuildtask("emu/layout", "lx800"),
|
||||
}
|
||||
end
|
||||
|
||||
---------------------------------------------------
|
||||
|
@ -76,6 +76,14 @@ if (CPUS["ARCOMPACT"]~=null) then
|
||||
MAME_DIR .. "src/emu/cpu/arcompact/arcompact.c",
|
||||
MAME_DIR .. "src/emu/cpu/arcompact/arcompact_execute.c",
|
||||
}
|
||||
dependency {
|
||||
{ MAME_DIR .. "src/emu/cpu/arcompact/arcompact.c", GEN_DIR .. "emu/cpu/arcompact/arcompact.inc" },
|
||||
{ MAME_DIR .. "src/emu/cpu/arcompact/arcompact_execute.c", GEN_DIR .. "emu/cpu/arcompact/arcompact.inc" },
|
||||
}
|
||||
|
||||
custombuildtask {
|
||||
{ MAME_DIR .. "src/emu/cpu/arcompact/arcompact_make.py" , GEN_DIR .. "emu/cpu/arcompact/arcompact.inc", { MAME_DIR .. "src/emu/cpu/arcompact/arcompact_make.py" }, {"@echo Generating arcompact source .inc files...", "python $(1) $(@)" }},
|
||||
}
|
||||
end
|
||||
|
||||
if (CPUS["ARCOMPACT"]~=null or _OPTIONS["with-tools"]) then
|
||||
@ -459,6 +467,20 @@ if (CPUS["H8"]~=null) then
|
||||
MAME_DIR .. "src/emu/cpu/h8/h8_timer16.c",
|
||||
MAME_DIR .. "src/emu/cpu/h8/h8_sci.c",
|
||||
}
|
||||
|
||||
dependency {
|
||||
{ MAME_DIR .. "src/emu/cpu/h8/h8.c", GEN_DIR .. "emu/cpu/h8/h8.inc" },
|
||||
{ MAME_DIR .. "src/emu/cpu/h8/h8h.c", GEN_DIR .. "emu/cpu/h8/h8h.inc" },
|
||||
{ MAME_DIR .. "src/emu/cpu/h8/h8s2000.c", GEN_DIR .. "emu/cpu/h8/h8s2000.inc" },
|
||||
{ MAME_DIR .. "src/emu/cpu/h8/h8s2600.c", GEN_DIR .. "emu/cpu/h8/h8s2600.inc" },
|
||||
}
|
||||
|
||||
custombuildtask {
|
||||
{ MAME_DIR .. "src/emu/cpu/h8/h8.lst" , GEN_DIR .. "emu/cpu/h8/h8.inc", { MAME_DIR .. "src/emu/cpu/h8/h8make.py" }, {"@echo Generating H8-300 source file...", "python $(1) $(<) o $(@)" }},
|
||||
{ MAME_DIR .. "src/emu/cpu/h8/h8.lst" , GEN_DIR .. "emu/cpu/h8/h8h.inc", { MAME_DIR .. "src/emu/cpu/h8/h8make.py" }, {"@echo Generating H8-300H source file...", "python $(1) $(<) h $(@)" }},
|
||||
{ MAME_DIR .. "src/emu/cpu/h8/h8.lst" , GEN_DIR .. "emu/cpu/h8/h8s2000.inc", { MAME_DIR .. "src/emu/cpu/h8/h8make.py" }, {"@echo Generating H8S/2000 source file...", "python $(1) $(<) s20 $(@)" }},
|
||||
{ MAME_DIR .. "src/emu/cpu/h8/h8.lst" , GEN_DIR .. "emu/cpu/h8/h8s2600.inc", { MAME_DIR .. "src/emu/cpu/h8/h8make.py" }, {"@echo Generating H8S/2600 source file...", "python $(1) $(<) s26 $(@)" }},
|
||||
}
|
||||
end
|
||||
|
||||
--------------------------------------------------
|
||||
@ -689,6 +711,17 @@ if (CPUS["MCS96"]~=null) then
|
||||
MAME_DIR .. "src/emu/cpu/mcs96/i8x9x.c",
|
||||
MAME_DIR .. "src/emu/cpu/mcs96/i8xc196.c",
|
||||
}
|
||||
dependency {
|
||||
{ MAME_DIR .. "src/emu/cpu/mcs96/mcs96.c", GEN_DIR .. "emu/cpu/mcs96/mcs96.inc" },
|
||||
{ MAME_DIR .. "src/emu/cpu/mcs96/i8x9x.c", GEN_DIR .. "emu/cpu/mcs96/i8x9x.inc" },
|
||||
{ MAME_DIR .. "src/emu/cpu/mcs96/i8xc196.c", GEN_DIR .. "emu/cpu/mcs96/i8xc196.inc" },
|
||||
}
|
||||
|
||||
custombuildtask {
|
||||
{ MAME_DIR .. "src/emu/cpu/mcs96/mcs96ops.lst" , GEN_DIR .. "emu/cpu/mcs96/mcs96.inc", { MAME_DIR .. "src/emu/cpu/mcs96/mcs96make.py" }, {"@echo Generating mcs96 source file...", "python $(1) mcs96 $(<) $(@)" }},
|
||||
{ MAME_DIR .. "src/emu/cpu/mcs96/mcs96ops.lst" , GEN_DIR .. "emu/cpu/mcs96/i8x9x.inc", { MAME_DIR .. "src/emu/cpu/mcs96/mcs96make.py" }, {"@echo Generating i8x9x source file...", "python $(1) i8x9x $(<) $(@)" }},
|
||||
{ MAME_DIR .. "src/emu/cpu/mcs96/mcs96ops.lst" , GEN_DIR .. "emu/cpu/mcs96/i8xc196.inc", { MAME_DIR .. "src/emu/cpu/mcs96/mcs96make.py" }, {"@echo Generating i8xc196 source file...", "python $(1) i8xc196 $(<) $(@)" }},
|
||||
}
|
||||
end
|
||||
|
||||
--------------------------------------------------
|
||||
@ -958,6 +991,33 @@ if (CPUS["M6502"]~=null) then
|
||||
MAME_DIR .. "src/emu/cpu/m6502/m3745x.c",
|
||||
MAME_DIR .. "src/emu/cpu/m6502/m5074x.c",
|
||||
}
|
||||
|
||||
dependency {
|
||||
{ MAME_DIR .. "src/emu/cpu/m6502/deco16.c", GEN_DIR .. "emu/cpu/m6502/deco16.inc" },
|
||||
{ MAME_DIR .. "src/emu/cpu/m6502/m4510.c", GEN_DIR .. "emu/cpu/m6502/m4510.inc" },
|
||||
{ MAME_DIR .. "src/emu/cpu/m6502/m6502.c", GEN_DIR .. "emu/cpu/m6502/m6502.inc" },
|
||||
{ MAME_DIR .. "src/emu/cpu/m6502/m65c02.c", GEN_DIR .. "emu/cpu/m6502/m65c02.inc" },
|
||||
{ MAME_DIR .. "src/emu/cpu/m6502/m65ce02.c", GEN_DIR .. "emu/cpu/m6502/m65ce02.inc" },
|
||||
{ MAME_DIR .. "src/emu/cpu/m6502/m6509.c", GEN_DIR .. "emu/cpu/m6502/m6509.inc" },
|
||||
{ MAME_DIR .. "src/emu/cpu/m6502/m6510.c", GEN_DIR .. "emu/cpu/m6502/m6510.inc" },
|
||||
{ MAME_DIR .. "src/emu/cpu/m6502/n2a03.c", GEN_DIR .. "emu/cpu/m6502/n2a03.inc" },
|
||||
{ MAME_DIR .. "src/emu/cpu/m6502/r65c02.c", GEN_DIR .. "emu/cpu/m6502/r65c02.inc" },
|
||||
{ MAME_DIR .. "src/emu/cpu/m6502/m740.c", GEN_DIR .. "emu/cpu/m6502/m740.inc" },
|
||||
}
|
||||
|
||||
custombuildtask {
|
||||
{ MAME_DIR .. "src/emu/cpu/m6502/odeco16.lst", GEN_DIR .. "emu/cpu/m6502/deco16.inc", { MAME_DIR .. "src/emu/cpu/m6502/m6502make.py", MAME_DIR .. "src/emu/cpu/m6502/ddeco16.lst" }, {"@echo Generating deco16 source file...", "python $(1) deco16_device $(<) $(2) $(@)" }},
|
||||
{ MAME_DIR .. "src/emu/cpu/m6502/om4510.lst", GEN_DIR .. "emu/cpu/m6502/m4510.inc", { MAME_DIR .. "src/emu/cpu/m6502/m6502make.py", MAME_DIR .. "src/emu/cpu/m6502/dm4510.lst" }, {"@echo Generating m4510 source file...", "python $(1) m4510_device $(<) $(2) $(@)" }},
|
||||
{ MAME_DIR .. "src/emu/cpu/m6502/om6502.lst", GEN_DIR .. "emu/cpu/m6502/m6502.inc", { MAME_DIR .. "src/emu/cpu/m6502/m6502make.py", MAME_DIR .. "src/emu/cpu/m6502/dm6502.lst" }, {"@echo Generating m6502 source file...", "python $(1) m6502_device $(<) $(2) $(@)" }},
|
||||
{ MAME_DIR .. "src/emu/cpu/m6502/om65c02.lst", GEN_DIR .. "emu/cpu/m6502/m65c02.inc", { MAME_DIR .. "src/emu/cpu/m6502/m6502make.py", MAME_DIR .. "src/emu/cpu/m6502/dm65c02.lst" }, {"@echo Generating m65c02 source file...", "python $(1) m65c02_device $(<) $(2) $(@)" }},
|
||||
{ MAME_DIR .. "src/emu/cpu/m6502/om65ce02.lst",GEN_DIR .. "emu/cpu/m6502/m65ce02.inc",{ MAME_DIR .. "src/emu/cpu/m6502/m6502make.py", MAME_DIR .. "src/emu/cpu/m6502/dm65ce02.lst" }, {"@echo Generating m65ce02 source file...", "python $(1) m65ce02_device $(<) $(2) $(@)" }},
|
||||
{ MAME_DIR .. "src/emu/cpu/m6502/om6509.lst", GEN_DIR .. "emu/cpu/m6502/m6509.inc", { MAME_DIR .. "src/emu/cpu/m6502/m6502make.py", MAME_DIR .. "src/emu/cpu/m6502/dm6509.lst" }, {"@echo Generating m6509 source file...", "python $(1) m6509_device $(<) $(2) $(@)" }},
|
||||
{ MAME_DIR .. "src/emu/cpu/m6502/om6510.lst", GEN_DIR .. "emu/cpu/m6502/m6510.inc", { MAME_DIR .. "src/emu/cpu/m6502/m6502make.py", MAME_DIR .. "src/emu/cpu/m6502/dm6510.lst" }, {"@echo Generating m6510 source file...", "python $(1) m6510_device $(<) $(2) $(@)" }},
|
||||
{ MAME_DIR .. "src/emu/cpu/m6502/on2a03.lst", GEN_DIR .. "emu/cpu/m6502/n2a03.inc", { MAME_DIR .. "src/emu/cpu/m6502/m6502make.py", MAME_DIR .. "src/emu/cpu/m6502/dn2a03.lst" }, {"@echo Generating n2a03 source file...", "python $(1) n2a03_device $(<) $(2) $(@)" }},
|
||||
{ MAME_DIR .. "src/emu/cpu/m6502/om740.lst" , GEN_DIR .. "emu/cpu/m6502/m740.inc", { MAME_DIR .. "src/emu/cpu/m6502/m6502make.py", MAME_DIR .. "src/emu/cpu/m6502/dm740.lst" }, {"@echo Generating m740 source file...", "python $(1) m740_device $(<) $(2) $(@)" }},
|
||||
|
||||
{ MAME_DIR .. "src/emu/cpu/m6502/dr65c02.lst", GEN_DIR .. "emu/cpu/m6502/r65c02.inc", { MAME_DIR .. "src/emu/cpu/m6502/m6502make.py" }, {"@echo Generating r65c02 source file...", "python $(1) r65c02_device - $(<) $(@)" }},
|
||||
}
|
||||
end
|
||||
|
||||
--------------------------------------------------
|
||||
@ -1003,6 +1063,18 @@ if (CPUS["M6809"]~=null) then
|
||||
MAME_DIR .. "src/emu/cpu/m6809/hd6309.c",
|
||||
MAME_DIR .. "src/emu/cpu/m6809/konami.c",
|
||||
}
|
||||
|
||||
dependency {
|
||||
{ MAME_DIR .. "src/emu/cpu/m6809/m6809.c", GEN_DIR .. "emu/cpu/m6809/m6809.inc" },
|
||||
{ MAME_DIR .. "src/emu/cpu/m6809/hd6309.c", GEN_DIR .. "emu/cpu/m6809/hd6309.inc" },
|
||||
{ MAME_DIR .. "src/emu/cpu/m6809/konami.c", GEN_DIR .. "emu/cpu/m6809/konami.inc" },
|
||||
}
|
||||
|
||||
custombuildtask {
|
||||
{ MAME_DIR .. "src/emu/cpu/m6809/m6809.ops" , GEN_DIR .. "emu/cpu/m6809/m6809.inc", { MAME_DIR .. "src/emu/cpu/m6809/m6809make.py" , MAME_DIR .. "src/emu/cpu/m6809/base6x09.ops" }, {"@echo Generating m6809 source file...", "python $(1) $(<) > $(@)" }},
|
||||
{ MAME_DIR .. "src/emu/cpu/m6809/hd6309.ops" , GEN_DIR .. "emu/cpu/m6809/hd6309.inc", { MAME_DIR .. "src/emu/cpu/m6809/m6809make.py" , MAME_DIR .. "src/emu/cpu/m6809/base6x09.ops" }, {"@echo Generating hd6309 source file...", "python $(1) $(<) > $(@)" }},
|
||||
{ MAME_DIR .. "src/emu/cpu/m6809/konami.ops" , GEN_DIR .. "emu/cpu/m6809/konami.inc", { MAME_DIR .. "src/emu/cpu/m6809/m6809make.py" , MAME_DIR .. "src/emu/cpu/m6809/base6x09.ops" }, {"@echo Generating konami source file...", "python $(1) $(<) > $(@)" }},
|
||||
}
|
||||
end
|
||||
|
||||
if (CPUS["M6809"]~=null or _OPTIONS["with-tools"]) then
|
||||
@ -1034,7 +1106,7 @@ end
|
||||
if (CPUS["M680X0"]~=null) then
|
||||
files {
|
||||
MAME_DIR .. "src/emu/cpu/m68000/m68kcpu.c",
|
||||
GEN_DIR .. "emu/cpu/m68000/m68kops.c",
|
||||
MAME_DIR .. "src/emu/cpu/m68000/m68kops.c",
|
||||
}
|
||||
end
|
||||
|
||||
@ -1527,10 +1599,16 @@ if (CPUS["TMS57002"]~=null) then
|
||||
MAME_DIR .. "src/emu/cpu/tms57002/tms57002.c",
|
||||
MAME_DIR .. "src/emu/cpu/tms57002/tms57kdec.c",
|
||||
}
|
||||
dependency {
|
||||
{ MAME_DIR .. "src/emu/cpu/tms57002/tms57kdec.c", GEN_DIR .. "emu/cpu/tms57002/tms57002.inc" },
|
||||
{ MAME_DIR .. "src/emu/cpu/tms57002/tms57002.c", GEN_DIR .. "emu/cpu/tms57002/tms57002.inc" },
|
||||
}
|
||||
end
|
||||
|
||||
if (CPUS["TMS57002"]~=null or _OPTIONS["with-tools"]) then
|
||||
table.insert(disasm_files , MAME_DIR .. "src/emu/cpu/tms57002/57002dsm.c")
|
||||
table.insert(disasm_dependency , { MAME_DIR .. "src/emu/cpu/tms57002/57002dsm.c", GEN_DIR .. "emu/cpu/tms57002/tms57002.inc" } )
|
||||
table.insert(disasm_custombuildtask , { MAME_DIR .. "src/emu/cpu/tms57002/tmsinstr.lst" , GEN_DIR .. "emu/cpu/tms57002/tms57002.inc", { MAME_DIR .. "src/emu/cpu/tms57002/tmsmake.py" }, {"@echo Generating TMS57002 source file...", "python $(1) $(<) $(@)" }})
|
||||
end
|
||||
|
||||
--------------------------------------------------
|
||||
|
@ -6,6 +6,7 @@ options {
|
||||
}
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/osd",
|
||||
MAME_DIR .. "src/emu",
|
||||
MAME_DIR .. "src/lib",
|
||||
MAME_DIR .. "src/lib/util",
|
||||
@ -17,8 +18,6 @@ includedirs {
|
||||
GEN_DIR .. "emu/layout",
|
||||
}
|
||||
|
||||
includeosd()
|
||||
|
||||
files {
|
||||
MAME_DIR .. "src/emu/hashfile.c",
|
||||
MAME_DIR .. "src/emu/addrmap.c",
|
||||
@ -159,10 +158,50 @@ files {
|
||||
MAME_DIR .. "src/emu/video/vector.c",
|
||||
}
|
||||
|
||||
dependency {
|
||||
--------------------------------------------------
|
||||
-- additional dependencies
|
||||
--------------------------------------------------
|
||||
{ MAME_DIR .. "src/emu/rendfont.c", GEN_DIR .. "emu/uismall.fh" },
|
||||
-------------------------------------------------
|
||||
-- core layouts
|
||||
--------------------------------------------------
|
||||
{ MAME_DIR .. "src/emu/rendlay.c", GEN_DIR .. "emu/layout/dualhovu.lh" },
|
||||
{ MAME_DIR .. "src/emu/rendlay.c", GEN_DIR .. "emu/layout/dualhsxs.lh" },
|
||||
{ MAME_DIR .. "src/emu/rendlay.c", GEN_DIR .. "emu/layout/dualhuov.lh" },
|
||||
{ MAME_DIR .. "src/emu/rendlay.c", GEN_DIR .. "emu/layout/horizont.lh" },
|
||||
{ MAME_DIR .. "src/emu/rendlay.c", GEN_DIR .. "emu/layout/triphsxs.lh" },
|
||||
{ MAME_DIR .. "src/emu/rendlay.c", GEN_DIR .. "emu/layout/quadhsxs.lh" },
|
||||
{ MAME_DIR .. "src/emu/rendlay.c", GEN_DIR .. "emu/layout/vertical.lh" },
|
||||
{ MAME_DIR .. "src/emu/rendlay.c", GEN_DIR .. "emu/layout/lcd.lh" },
|
||||
{ MAME_DIR .. "src/emu/rendlay.c", GEN_DIR .. "emu/layout/lcd_rot.lh" },
|
||||
{ MAME_DIR .. "src/emu/rendlay.c", GEN_DIR .. "emu/layout/noscreens.lh" },
|
||||
|
||||
{ MAME_DIR .. "src/emu/video.c", GEN_DIR .. "emu/layout/snap.lh" },
|
||||
|
||||
}
|
||||
|
||||
custombuildtask {
|
||||
{ MAME_DIR .. "src/emu/uismall.png" , GEN_DIR .. "emu/uismall.fh", { MAME_DIR.. "src/build/png2bdc.py", MAME_DIR .. "src/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"),
|
||||
layoutbuildtask("emu/layout", "dualhuov"),
|
||||
layoutbuildtask("emu/layout", "horizont"),
|
||||
layoutbuildtask("emu/layout", "triphsxs"),
|
||||
layoutbuildtask("emu/layout", "quadhsxs"),
|
||||
layoutbuildtask("emu/layout", "vertical"),
|
||||
layoutbuildtask("emu/layout", "lcd"),
|
||||
layoutbuildtask("emu/layout", "lcd_rot"),
|
||||
layoutbuildtask("emu/layout", "noscreens"),
|
||||
layoutbuildtask("emu/layout", "snap"),
|
||||
}
|
||||
|
||||
function emuProject(_target, _subtarget)
|
||||
|
||||
disasm_files = { }
|
||||
disasm_dependency = { }
|
||||
disasm_custombuildtask = { }
|
||||
|
||||
project ("optional")
|
||||
uuid (os.uuid("optional-" .. _target .."_" .. _subtarget))
|
||||
@ -174,6 +213,7 @@ function emuProject(_target, _subtarget)
|
||||
}
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/osd",
|
||||
MAME_DIR .. "src/emu",
|
||||
MAME_DIR .. "src/mame", -- used for sound amiga
|
||||
MAME_DIR .. "src/lib",
|
||||
@ -185,9 +225,7 @@ function emuProject(_target, _subtarget)
|
||||
GEN_DIR .. "emu",
|
||||
GEN_DIR .. "emu/layout",
|
||||
MAME_DIR .. "src/emu/cpu/m68000",
|
||||
GEN_DIR .. "emu/cpu/m68000",
|
||||
}
|
||||
includeosd()
|
||||
|
||||
dofile(path.join("src", "cpu.lua"))
|
||||
|
||||
@ -210,6 +248,7 @@ function emuProject(_target, _subtarget)
|
||||
}
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/osd",
|
||||
MAME_DIR .. "src/emu",
|
||||
MAME_DIR .. "src/lib",
|
||||
MAME_DIR .. "src/lib/util",
|
||||
@ -223,8 +262,6 @@ function emuProject(_target, _subtarget)
|
||||
GEN_DIR .. "emu/layout",
|
||||
}
|
||||
|
||||
includeosd()
|
||||
|
||||
dofile(path.join("src", "bus.lua"))
|
||||
|
||||
|
||||
@ -237,6 +274,7 @@ function emuProject(_target, _subtarget)
|
||||
}
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/osd",
|
||||
MAME_DIR .. "src/emu",
|
||||
MAME_DIR .. "src/lib",
|
||||
MAME_DIR .. "src/lib/util",
|
||||
@ -247,9 +285,19 @@ function emuProject(_target, _subtarget)
|
||||
GEN_DIR .. "emu",
|
||||
}
|
||||
|
||||
includeosd()
|
||||
|
||||
files {
|
||||
disasm_files
|
||||
}
|
||||
}
|
||||
|
||||
if #disasm_dependency > 0 then
|
||||
dependency {
|
||||
disasm_dependency[1]
|
||||
}
|
||||
end
|
||||
|
||||
if #disasm_custombuildtask > 0 then
|
||||
custombuildtask {
|
||||
disasm_custombuildtask[1]
|
||||
}
|
||||
end
|
||||
end
|
@ -7,14 +7,13 @@ project "utils"
|
||||
}
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/osd",
|
||||
MAME_DIR .. "src/lib/util",
|
||||
MAME_DIR .. "3rdparty",
|
||||
MAME_DIR .. "3rdparty/expat/lib",
|
||||
MAME_DIR .. "3rdparty/zlib",
|
||||
}
|
||||
|
||||
includeosd()
|
||||
|
||||
files {
|
||||
MAME_DIR .. "src/lib/util/astring.c",
|
||||
MAME_DIR .. "src/lib/util/avhuff.c",
|
||||
@ -63,6 +62,7 @@ project "formats"
|
||||
}
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/osd",
|
||||
MAME_DIR .. "src/emu",
|
||||
MAME_DIR .. "src/lib",
|
||||
MAME_DIR .. "src/lib/util",
|
||||
@ -70,8 +70,6 @@ project "formats"
|
||||
MAME_DIR .. "3rdparty/zlib",
|
||||
}
|
||||
|
||||
includeosd()
|
||||
|
||||
files {
|
||||
MAME_DIR .. "src/lib/formats/cassimg.c",
|
||||
MAME_DIR .. "src/lib/formats/flopimg.c",
|
||||
|
@ -21,7 +21,11 @@ function mainProject(_target, _subtarget)
|
||||
"$(SILENT) objdump --section=.text --line-numbers --syms --demangle $(TARGET) >$(subst .exe,.sym,$(TARGET))"
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
configuration { "vs*" }
|
||||
flags {
|
||||
"Unicode",
|
||||
}
|
||||
configuration { "mingw*" or "vs*" }
|
||||
targetextension ".exe"
|
||||
|
||||
@ -61,9 +65,13 @@ function mainProject(_target, _subtarget)
|
||||
links{
|
||||
"ocore_" .. _OPTIONS["osd"],
|
||||
}
|
||||
|
||||
override_resources = false;
|
||||
|
||||
maintargetosdoptions(_target)
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/osd",
|
||||
MAME_DIR .. "src/emu",
|
||||
MAME_DIR .. "src/" .. _target,
|
||||
MAME_DIR .. "src/lib",
|
||||
@ -74,15 +82,40 @@ function mainProject(_target, _subtarget)
|
||||
GEN_DIR .. "resource",
|
||||
}
|
||||
|
||||
includeosd()
|
||||
|
||||
if _OPTIONS["targetos"]=="macosx" then
|
||||
if _OPTIONS["targetos"]=="macosx" and (not override_resources) then
|
||||
linkoptions {
|
||||
"-sectcreate __TEXT __info_plist " .. GEN_DIR .. "/resource/" .. _OPTIONS["target"] .. "-Info.plist"
|
||||
"-sectcreate __TEXT __info_plist " .. GEN_DIR .. "/resource/" .. _target .. "-Info.plist"
|
||||
}
|
||||
custombuildtask {
|
||||
{ MAME_DIR .. "src/version.c" , GEN_DIR .. "/resource/" .. _target .. "-Info.plist", { MAME_DIR .. "src/build/verinfo.py" }, {"@echo Emitting " .. _target .. "-Info.plist" .. "...", "python $(1) -p -b " .. _target .. " $(<) > $(@)" }},
|
||||
}
|
||||
dependency {
|
||||
{ "$(TARGET)" , GEN_DIR .. "/resource/" .. _target .. "-Info.plist", true },
|
||||
}
|
||||
|
||||
end
|
||||
|
||||
if _OPTIONS["targetos"]=="windows" then
|
||||
if _OPTIONS["targetos"]=="windows" and (not override_resources) then
|
||||
local rcfile = MAME_DIR .. "src/" .. _target .. "/osd/".._OPTIONS["osd"].."/" .. _target ..".rc"
|
||||
if not os.isfile(rcfile) then
|
||||
rcfile = MAME_DIR .. "src/" .. _target .. "/osd/windows/" .. _target ..".rc"
|
||||
end
|
||||
|
||||
if os.isfile(rcfile) then
|
||||
files {
|
||||
rcfile,
|
||||
}
|
||||
dependency {
|
||||
{ "$(OBJDIR)/".._target ..".res" , GEN_DIR .. "/resource/" .. _target .. "vers.rc", true },
|
||||
}
|
||||
else
|
||||
files {
|
||||
MAME_DIR .. "src/osd/windows/mame.rc",
|
||||
}
|
||||
dependency {
|
||||
{ "$(OBJDIR)/mame.res" , GEN_DIR .. "/resource/" .. _target .. "vers.rc", true },
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
files {
|
||||
@ -90,6 +123,26 @@ function mainProject(_target, _subtarget)
|
||||
MAME_DIR .. "src/version.c",
|
||||
GEN_DIR .. _target .. "/" .. _subtarget .."/drivlist.c",
|
||||
}
|
||||
|
||||
custombuildtask {
|
||||
{ MAME_DIR .. "src/".._target .."/" .. _subtarget ..".lst" , GEN_DIR .. _target .. "/" .. _subtarget .."/drivlist.c", { MAME_DIR .. "src/build/makelist.py" }, {"@echo Building driver list...", "python $(1) $(<) > $(@)" }},
|
||||
}
|
||||
|
||||
configuration { "mingw*" }
|
||||
custombuildtask {
|
||||
{ MAME_DIR .. "src/version.c" , GEN_DIR .. "/resource/" .. _target .. "vers.rc", { MAME_DIR .. "src/build/verinfo.py" }, {"@echo Emitting " .. _target .. "vers.rc" .. "...", "python $(1) -r -b " .. _target .. " $(<) > $(@)" }},
|
||||
}
|
||||
|
||||
configuration { "vs*" }
|
||||
prebuildcommands {
|
||||
"mkdir " .. path.translate(GEN_DIR .. "/resource/","\\") .. " 2>NUL",
|
||||
"@echo Emitting ".. _target .. "vers.rc...",
|
||||
"python " .. path.translate(MAME_DIR .. "src/build/verinfo.py","\\") .. " -r -b " .. _target .. " " .. path.translate(MAME_DIR .. "src/version.c","\\") .. " > " .. path.translate(GEN_DIR .. "/resource/" .. _target .. "vers.rc", "\\") ,
|
||||
}
|
||||
|
||||
|
||||
configuration { }
|
||||
|
||||
debugdir (MAME_DIR)
|
||||
debugargs ("-window")
|
||||
end
|
||||
|
@ -26,6 +26,7 @@ function osdmodulesbuild()
|
||||
MAME_DIR .. "src/osd/modules/midi/none.c",
|
||||
MAME_DIR .. "src/osd/modules/sound/js_sound.c",
|
||||
MAME_DIR .. "src/osd/modules/sound/direct_sound.c",
|
||||
MAME_DIR .. "src/osd/modules/sound/coreaudio_sound.c",
|
||||
MAME_DIR .. "src/osd/modules/sound/sdl_sound.c",
|
||||
MAME_DIR .. "src/osd/modules/sound/none.c",
|
||||
}
|
||||
@ -99,6 +100,36 @@ function osdmodulesbuild()
|
||||
defines {
|
||||
"USE_QTDEBUG=1",
|
||||
}
|
||||
|
||||
local MOC = ""
|
||||
if (os.is("windows")) then
|
||||
MOC = "moc"
|
||||
else
|
||||
MOCTST = backtick("which moc-qt4 2>/dev/null")
|
||||
if (MOCTST=='') then
|
||||
MOCTST = backtick("which moc 2>/dev/null")
|
||||
end
|
||||
if (MOCTST=='') then
|
||||
print("Qt's Meta Object Compiler (moc) wasn't found!")
|
||||
os.exit(1)
|
||||
end
|
||||
MOC = MOCTST
|
||||
end
|
||||
|
||||
|
||||
custombuildtask {
|
||||
{ MAME_DIR .. "src/osd/modules/debugger/qt/debuggerview.h", GEN_DIR .. "osd/modules/debugger/qt/debuggerview.moc.c", { }, { MOC .. "$(MOCINCPATH) $(<) -o $(@)" }},
|
||||
{ MAME_DIR .. "src/osd/modules/debugger/qt/windowqt.h", GEN_DIR .. "osd/modules/debugger/qt/windowqt.moc.c", { }, { MOC .. "$(MOCINCPATH) $(<) -o $(@)" }},
|
||||
{ MAME_DIR .. "src/osd/modules/debugger/qt/logwindow.h", GEN_DIR .. "osd/modules/debugger/qt/logwindow.moc.c", { }, { MOC .. "$(MOCINCPATH) $(<) -o $(@)" }},
|
||||
{ MAME_DIR .. "src/osd/modules/debugger/qt/dasmwindow.h", GEN_DIR .. "osd/modules/debugger/qt/dasmwindow.moc.c", { }, { MOC .. "$(MOCINCPATH) $(<) -o $(@)" }},
|
||||
{ MAME_DIR .. "src/osd/modules/debugger/qt/mainwindow.h", GEN_DIR .. "osd/modules/debugger/qt/mainwindow.moc.c", { }, { MOC .. "$(MOCINCPATH) $(<) -o $(@)" }},
|
||||
{ MAME_DIR .. "src/osd/modules/debugger/qt/memorywindow.h", GEN_DIR .. "osd/modules/debugger/qt/memorywindow.moc.c", { }, { MOC .. "$(MOCINCPATH) $(<) -o $(@)" }},
|
||||
{ MAME_DIR .. "src/osd/modules/debugger/qt/breakpointswindow.h", GEN_DIR .. "osd/modules/debugger/qt/breakpointswindow.moc.c", { }, { MOC .. "$(MOCINCPATH) $(<) -o $(@)" }},
|
||||
{ MAME_DIR .. "src/osd/modules/debugger/qt/deviceswindow.h", GEN_DIR .. "osd/modules/debugger/qt/deviceswindow.moc.c", { }, { MOC .. "$(MOCINCPATH) $(<) -o $(@)" }},
|
||||
{ MAME_DIR .. "src/osd/modules/debugger/qt/deviceinformationwindow.h", GEN_DIR .. "osd/modules/debugger/qt/deviceinformationwindow.moc.c", { },{ MOC .. "$(MOCINCPATH) $(<) -o $(@)" }},
|
||||
|
||||
}
|
||||
|
||||
if _OPTIONS["targetos"]=="windows" then
|
||||
configuration { "mingw*" }
|
||||
buildoptions {
|
||||
@ -107,11 +138,11 @@ function osdmodulesbuild()
|
||||
configuration { }
|
||||
elseif _OPTIONS["targetos"]=="macosx" then
|
||||
buildoptions {
|
||||
"-F" .. string.gsub(os.outputof("qmake -query QT_INSTALL_LIBS"), '[\r\n]+', ''),
|
||||
"-F" .. backtick("qmake -query QT_INSTALL_LIBS"),
|
||||
}
|
||||
else
|
||||
buildoptions {
|
||||
string.gsub(os.outputof("pkg-config --cflags Qt"), '[\r\n]+', ' '),
|
||||
backtick("pkg-config --cflags QtGui"),
|
||||
}
|
||||
end
|
||||
else
|
||||
@ -146,11 +177,10 @@ function osdmodulestargetconf()
|
||||
if _OPTIONS["NO_USE_MIDI"]~="1" then
|
||||
if _OPTIONS["targetos"]=="linux" then
|
||||
linkoptions {
|
||||
string.gsub(os.outputof("pkg-config --libs alsa"), '[\r\n]+', ' '),
|
||||
backtick("pkg-config --libs alsa"),
|
||||
}
|
||||
elseif _OPTIONS["targetos"]=="macosx" then
|
||||
links {
|
||||
"CoreAudio.framework",
|
||||
"CoreMIDI.framework",
|
||||
}
|
||||
end
|
||||
@ -168,7 +198,7 @@ function osdmodulestargetconf()
|
||||
}
|
||||
elseif _OPTIONS["targetos"]=="macosx" then
|
||||
linkoptions {
|
||||
"-F" .. string.gsub(os.outputof("qmake -query QT_INSTALL_LIBS"), '[\r\n]+', ''),
|
||||
"-F" .. backtick("qmake -query QT_INSTALL_LIBS"),
|
||||
}
|
||||
links {
|
||||
"QtCore.framework",
|
||||
@ -176,11 +206,25 @@ function osdmodulestargetconf()
|
||||
}
|
||||
else
|
||||
linkoptions {
|
||||
string.gsub(os.outputof("pkg-config --libs QtGui"), '[\r\n]+', ' '),
|
||||
backtick("pkg-config --libs QtGui"),
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
if _OPTIONS["targetos"]=="windows" then
|
||||
links {
|
||||
"gdi32",
|
||||
"dsound",
|
||||
"dxguid",
|
||||
}
|
||||
elseif _OPTIONS["targetos"]=="macosx" then
|
||||
links {
|
||||
"AudioUnit.framework",
|
||||
"CoreAudio.framework",
|
||||
"CoreServices.framework",
|
||||
}
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
@ -38,11 +38,21 @@ function maintargetosdoptions(_target)
|
||||
}
|
||||
end
|
||||
linkoptions {
|
||||
string.gsub(os.outputof("pkg-config --libs fontconfig"), '[\r\n]+', ' '),
|
||||
backtick("pkg-config --libs fontconfig"),
|
||||
}
|
||||
end
|
||||
|
||||
if _OPTIONS["targetos"]=="windows" then
|
||||
if _OPTIONS["SDL_LIBVER"]=="sdl2" then
|
||||
links {
|
||||
"SDL2.dll",
|
||||
}
|
||||
else
|
||||
links {
|
||||
"SDL.dll",
|
||||
}
|
||||
end
|
||||
|
||||
configuration { "mingw*" }
|
||||
linkoptions{
|
||||
"-municode",
|
||||
@ -59,10 +69,6 @@ function maintargetosdoptions(_target)
|
||||
libdirs {
|
||||
path.join(_OPTIONS["SDL_INSTALL_ROOT"],"lib","x64")
|
||||
}
|
||||
configuration { "vs*" }
|
||||
links {
|
||||
"SDL2",
|
||||
}
|
||||
configuration {}
|
||||
elseif _OPTIONS["targetos"]=="haiku" then
|
||||
links {
|
||||
@ -102,7 +108,7 @@ newoption {
|
||||
}
|
||||
|
||||
if not _OPTIONS["NO_X11"] then
|
||||
if _OPTIONS["targetos"]=="windows" or _OPTIONS["targetos"]=="macosx" or _OPTIONS["targetos"]=="haiku" or _OPTIONS["targetos"]=="emscripten" or _OPTIONS["targetos"]=="os2" then
|
||||
if _OPTIONS["targetos"]=="windows" or _OPTIONS["targetos"]=="macosx" or _OPTIONS["targetos"]=="haiku" or _OPTIONS["targetos"]=="asmjs" or _OPTIONS["targetos"]=="os2" then
|
||||
_OPTIONS["NO_X11"] = "1"
|
||||
else
|
||||
_OPTIONS["NO_X11"] = "0"
|
||||
@ -193,7 +199,7 @@ elseif _OPTIONS["targetos"]=="netbsd" then
|
||||
SDL_NETWORK = "pcap"
|
||||
elseif _OPTIONS["targetos"]=="haiku" then
|
||||
SYNC_IMPLEMENTATION = "ntc"
|
||||
elseif _OPTIONS["targetos"]=="emscripten" then
|
||||
elseif _OPTIONS["targetos"]=="asmjs" then
|
||||
SYNC_IMPLEMENTATION = "mini"
|
||||
elseif _OPTIONS["targetos"]=="windows" then
|
||||
BASE_TARGETOS = "win32"
|
||||
@ -210,6 +216,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
|
||||
links {
|
||||
@ -230,7 +240,7 @@ if BASE_TARGETOS=="unix" then
|
||||
end
|
||||
else
|
||||
linkoptions {
|
||||
string.gsub(os.outputof(sdlconfigcmd() .. " --libs | sed 's/-lSDLmain//'"), '[\r\n]+', ' '),
|
||||
backtick(sdlconfigcmd() .. " --libs | sed 's/-lSDLmain//'"),
|
||||
}
|
||||
end
|
||||
else
|
||||
@ -250,7 +260,7 @@ if BASE_TARGETOS=="unix" then
|
||||
end
|
||||
end
|
||||
linkoptions {
|
||||
string.gsub(os.outputof(sdlconfigcmd() .. " --libs"), '[\r\n]+', ' '),
|
||||
backtick(sdlconfigcmd() .. " --libs"),
|
||||
}
|
||||
if _OPTIONS["targetos"]~="haiku" then
|
||||
links {
|
||||
@ -271,20 +281,13 @@ if BASE_TARGETOS=="unix" then
|
||||
end
|
||||
elseif BASE_TARGETOS=="os2" then
|
||||
linkoptions {
|
||||
string.gsub(os.outputof(sdlconfigcmd() .. " --libs"), '[\r\n]+', ' '),
|
||||
backtick(sdlconfigcmd() .. " --libs"),
|
||||
}
|
||||
links {
|
||||
"pthread"
|
||||
}
|
||||
end
|
||||
|
||||
configuration { "mingw*" }
|
||||
linkoptions {
|
||||
"-static"
|
||||
}
|
||||
|
||||
configuration { }
|
||||
|
||||
|
||||
project ("osd_" .. _OPTIONS["osd"])
|
||||
uuid (os.uuid("osd_" .. _OPTIONS["osd"]))
|
||||
@ -422,8 +425,10 @@ if _OPTIONS["with-tools"] then
|
||||
dofile("sdl_cfg.lua")
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/osd",
|
||||
MAME_DIR .. "src/lib/util",
|
||||
}
|
||||
|
||||
targetdir(MAME_DIR)
|
||||
|
||||
links {
|
||||
@ -431,13 +436,20 @@ if _OPTIONS["with-tools"] then
|
||||
"ocore_" .. _OPTIONS["osd"],
|
||||
}
|
||||
|
||||
includeosd()
|
||||
|
||||
files {
|
||||
MAME_DIR .. "src/osd/sdl/testkeys.c",
|
||||
}
|
||||
|
||||
if _OPTIONS["targetos"]=="windows" then
|
||||
if _OPTIONS["SDL_LIBVER"]=="sdl2" then
|
||||
links {
|
||||
"SDL2.dll",
|
||||
}
|
||||
else
|
||||
links {
|
||||
"SDL.dll",
|
||||
}
|
||||
end
|
||||
linkoptions{
|
||||
"-municode",
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ end
|
||||
|
||||
if _OPTIONS["NO_USE_MIDI"]~="1" and _OPTIONS["targetos"]=="linux" then
|
||||
buildoptions {
|
||||
string.gsub(os.outputof("pkg-config --cflags alsa"), '[\r\n]+', ' '),
|
||||
backtick("pkg-config --cflags alsa"),
|
||||
}
|
||||
end
|
||||
|
||||
@ -83,16 +83,16 @@ if BASE_TARGETOS=="unix" then
|
||||
"MACOSX_USE_LIBSDL",
|
||||
}
|
||||
buildoptions {
|
||||
string.gsub(os.outputof(sdlconfigcmd() .. " --cflags | sed 's:/SDL::'"), '[\r\n]+', ' '),
|
||||
backtick(sdlconfigcmd() .. " --cflags | sed 's:/SDL::'"),
|
||||
}
|
||||
end
|
||||
else
|
||||
buildoptions {
|
||||
string.gsub(os.outputof(sdlconfigcmd() .. " --cflags"), '[\r\n]+', ' '),
|
||||
backtick(sdlconfigcmd() .. " --cflags"),
|
||||
}
|
||||
if _OPTIONS["targetos"]~="emscripten" then
|
||||
if _OPTIONS["targetos"]~="asmjs" then
|
||||
buildoptions {
|
||||
string.gsub(os.outputof("pkg-config --cflags fontconfig"), '[\r\n]+', ' '),
|
||||
backtick("pkg-config --cflags fontconfig"),
|
||||
}
|
||||
end
|
||||
end
|
||||
@ -105,6 +105,10 @@ if _OPTIONS["targetos"]=="windows" then
|
||||
"main=utf8_main",
|
||||
}
|
||||
|
||||
configuration { "Debug" }
|
||||
defines {
|
||||
"MALLOC_DEBUG",
|
||||
}
|
||||
configuration { "vs*" }
|
||||
includedirs {
|
||||
path.join(_OPTIONS["SDL_INSTALL_ROOT"],"include")
|
||||
@ -127,6 +131,6 @@ elseif _OPTIONS["targetos"]=="freebsd" then
|
||||
}
|
||||
elseif _OPTIONS["targetos"]=="os2" then
|
||||
buildoptions {
|
||||
string.gsub(os.outputof(sdlconfigcmd() .. " --cflags"), '[\r\n]+', ' '),
|
||||
backtick(sdlconfigcmd() .. " --cflags"),
|
||||
}
|
||||
end
|
||||
|
@ -21,17 +21,17 @@ function maintargetosdoptions(_target)
|
||||
}
|
||||
end
|
||||
|
||||
local rcfile = MAME_DIR .. "src/" .. _target .. "/osd/windows/" .. _target ..".rc"
|
||||
|
||||
if os.isfile(rcfile) then
|
||||
files {
|
||||
rcfile,
|
||||
}
|
||||
else
|
||||
files {
|
||||
MAME_DIR .. "src/osd/windows/mame.rc",
|
||||
if _OPTIONS["USE_SDL"] == "1" then
|
||||
links {
|
||||
"SDL.dll",
|
||||
}
|
||||
end
|
||||
|
||||
links {
|
||||
"comctl32",
|
||||
"comdlg32",
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
@ -40,7 +40,7 @@ newoption {
|
||||
description = "Minimum DirectInput version to support",
|
||||
allowed = {
|
||||
{ "7", "Support DirectInput 7 or later" },
|
||||
{ "8", "Support DirectInput 8 or later" },
|
||||
{ "8", "Support DirectInput 8 or later" },
|
||||
},
|
||||
}
|
||||
|
||||
@ -48,6 +48,42 @@ if not _OPTIONS["DIRECTINPUT"] then
|
||||
_OPTIONS["DIRECTINPUT"] = "8"
|
||||
end
|
||||
|
||||
newoption {
|
||||
trigger = "USE_SDL",
|
||||
description = "Enable SDL sound output",
|
||||
allowed = {
|
||||
{ "0", "Disable SDL sound output" },
|
||||
{ "1", "Enable SDL sound output" },
|
||||
},
|
||||
}
|
||||
|
||||
if not _OPTIONS["USE_SDL"] then
|
||||
_OPTIONS["USE_SDL"] = "0"
|
||||
end
|
||||
|
||||
newoption {
|
||||
trigger = "CYGWIN_BUILD",
|
||||
description = "Build with Cygwin tools",
|
||||
allowed = {
|
||||
{ "0", "Build with MinGW tools" },
|
||||
{ "1", "Build with Cygwin tools" },
|
||||
},
|
||||
}
|
||||
|
||||
if not _OPTIONS["CYGWIN_BUILD"] then
|
||||
_OPTIONS["CYGWIN_BUILD"] = "0"
|
||||
end
|
||||
|
||||
|
||||
if _OPTIONS["CYGWIN_BUILD"] == "1" then
|
||||
buildoptions {
|
||||
"-mmo-cygwin",
|
||||
}
|
||||
linkoptions {
|
||||
"-mno-cygwin",
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
project ("osd_" .. _OPTIONS["osd"])
|
||||
uuid (os.uuid("osd_" .. _OPTIONS["osd"]))
|
||||
@ -157,7 +193,7 @@ project ("ocore_" .. _OPTIONS["osd"])
|
||||
MAME_DIR .. "src/osd/modules/lib/osdlib_win32.c",
|
||||
}
|
||||
|
||||
if _OPTIONS["NOASM"]=="1" then
|
||||
if _OPTIONS["NOASM"] == "1" then
|
||||
files {
|
||||
MAME_DIR .. "src/osd/modules/sync/work_mini.c",
|
||||
}
|
||||
@ -187,8 +223,10 @@ if _OPTIONS["with-tools"] then
|
||||
"ocore_" .. _OPTIONS["osd"],
|
||||
}
|
||||
|
||||
includeosd()
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/osd",
|
||||
}
|
||||
|
||||
files {
|
||||
MAME_DIR .. "src/osd/windows/ledutil.c",
|
||||
}
|
||||
|
@ -2,11 +2,15 @@ defines {
|
||||
"UNICODE",
|
||||
"_UNICODE",
|
||||
"OSD_WINDOWS",
|
||||
"USE_SDL=0",
|
||||
"main=utf8_main",
|
||||
"_WIN32_WINNT=0x0501",
|
||||
}
|
||||
|
||||
configuration { "Debug" }
|
||||
defines {
|
||||
"MALLOC_DEBUG",
|
||||
}
|
||||
|
||||
configuration { "vs*" }
|
||||
flags {
|
||||
"Unicode",
|
||||
@ -20,3 +24,16 @@ if not _OPTIONS["DONT_USE_NETWORK"] then
|
||||
"OSD_NET_USE_PCAP",
|
||||
}
|
||||
end
|
||||
|
||||
if _OPTIONS["USE_SDL"]=="1" then
|
||||
defines {
|
||||
"SDLMAME_SDL2=0",
|
||||
"USE_XINPUT=0",
|
||||
"USE_SDL=1",
|
||||
"USE_SDL_SOUND",
|
||||
}
|
||||
else
|
||||
defines {
|
||||
"USE_SDL=0",
|
||||
}
|
||||
end
|
||||
|
@ -969,7 +969,6 @@ end
|
||||
if (SOUNDS["VOTRAX"]~=null) then
|
||||
files {
|
||||
MAME_DIR .. "src/emu/sound/votrax.c",
|
||||
MAME_DIR .. "src/emu/sound/samples.c",
|
||||
}
|
||||
end
|
||||
|
||||
|
@ -21,11 +21,10 @@ links {
|
||||
}
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/osd",
|
||||
MAME_DIR .. "src/lib/util",
|
||||
}
|
||||
|
||||
includeosd()
|
||||
|
||||
files {
|
||||
MAME_DIR .. "src/tools/romcmp.c",
|
||||
}
|
||||
@ -55,12 +54,11 @@ links {
|
||||
}
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/osd",
|
||||
MAME_DIR .. "src/lib/util",
|
||||
MAME_DIR .. "3rdparty",
|
||||
}
|
||||
|
||||
includeosd()
|
||||
|
||||
files {
|
||||
MAME_DIR .. "src/tools/chdman.c",
|
||||
MAME_DIR .. "src/version.c",
|
||||
@ -89,11 +87,10 @@ links {
|
||||
}
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/osd",
|
||||
MAME_DIR .. "src/lib/util",
|
||||
}
|
||||
|
||||
includeosd()
|
||||
|
||||
files {
|
||||
MAME_DIR .. "src/tools/jedutil.c",
|
||||
}
|
||||
@ -125,13 +122,12 @@ links {
|
||||
}
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/osd",
|
||||
MAME_DIR .. "src/emu",
|
||||
MAME_DIR .. "src/lib/util",
|
||||
MAME_DIR .. "3rdparty",
|
||||
}
|
||||
|
||||
includeosd()
|
||||
|
||||
files {
|
||||
MAME_DIR .. "src/tools/unidasm.c",
|
||||
}
|
||||
@ -162,12 +158,11 @@ links {
|
||||
}
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/osd",
|
||||
MAME_DIR .. "src/lib/util",
|
||||
MAME_DIR .. "3rdparty",
|
||||
}
|
||||
|
||||
includeosd()
|
||||
|
||||
files {
|
||||
MAME_DIR .. "src/tools/ldresample.c",
|
||||
}
|
||||
@ -197,12 +192,11 @@ links {
|
||||
}
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/osd",
|
||||
MAME_DIR .. "src/lib/util",
|
||||
MAME_DIR .. "3rdparty",
|
||||
}
|
||||
|
||||
includeosd()
|
||||
|
||||
files {
|
||||
MAME_DIR .. "src/tools/ldverify.c",
|
||||
}
|
||||
@ -230,11 +224,10 @@ links {
|
||||
}
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/osd",
|
||||
MAME_DIR .. "src/lib/util",
|
||||
}
|
||||
|
||||
includeosd()
|
||||
|
||||
files {
|
||||
MAME_DIR .. "src/tools/regrep.c",
|
||||
}
|
||||
@ -262,11 +255,10 @@ links {
|
||||
}
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/osd",
|
||||
MAME_DIR .. "src/lib/util",
|
||||
}
|
||||
|
||||
includeosd()
|
||||
|
||||
files {
|
||||
MAME_DIR .. "src/tools/srcclean.c",
|
||||
}
|
||||
@ -294,11 +286,10 @@ links {
|
||||
}
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/osd",
|
||||
MAME_DIR .. "src/lib/util",
|
||||
}
|
||||
|
||||
includeosd()
|
||||
|
||||
files {
|
||||
MAME_DIR .. "src/tools/src2html.c",
|
||||
}
|
||||
@ -328,11 +319,10 @@ links {
|
||||
}
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/osd",
|
||||
MAME_DIR .. "src/lib/util",
|
||||
}
|
||||
|
||||
includeosd()
|
||||
|
||||
files {
|
||||
MAME_DIR .. "src/tools/split.c",
|
||||
}
|
||||
@ -360,11 +350,10 @@ links {
|
||||
}
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/osd",
|
||||
MAME_DIR .. "src/lib/util",
|
||||
}
|
||||
|
||||
includeosd()
|
||||
|
||||
files {
|
||||
MAME_DIR .. "src/tools/pngcmp.c",
|
||||
}
|
||||
@ -394,12 +383,11 @@ links {
|
||||
}
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/osd",
|
||||
MAME_DIR .. "src/lib/util",
|
||||
MAME_DIR .. "src/emu",
|
||||
}
|
||||
|
||||
includeosd()
|
||||
|
||||
files {
|
||||
MAME_DIR .. "src/tools/nltool.c",
|
||||
}
|
||||
@ -432,12 +420,11 @@ links {
|
||||
}
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/osd",
|
||||
MAME_DIR .. "src/lib",
|
||||
MAME_DIR .. "src/lib/util",
|
||||
}
|
||||
|
||||
includeosd()
|
||||
|
||||
files {
|
||||
MAME_DIR .. "src/mess/tools/castool/main.c",
|
||||
}
|
||||
@ -469,12 +456,11 @@ links {
|
||||
}
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/osd",
|
||||
MAME_DIR .. "src/lib",
|
||||
MAME_DIR .. "src/lib/util",
|
||||
}
|
||||
|
||||
includeosd()
|
||||
|
||||
files {
|
||||
MAME_DIR .. "src/mess/tools/floptool/main.c",
|
||||
}
|
||||
@ -506,14 +492,13 @@ links {
|
||||
}
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/osd",
|
||||
MAME_DIR .. "src/lib",
|
||||
MAME_DIR .. "src/lib/util",
|
||||
MAME_DIR .. "3rdparty/zlib",
|
||||
MAME_DIR .. "src/mess/tools/imgtool",
|
||||
}
|
||||
|
||||
includeosd()
|
||||
|
||||
files {
|
||||
MAME_DIR .. "src/mess/tools/imgtool/main.c",
|
||||
MAME_DIR .. "src/mess/tools/imgtool/stream.c",
|
||||
|
@ -62,6 +62,7 @@ function createProjects_ldplayer_ldplayer(_target, _subtarget)
|
||||
}
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/osd",
|
||||
MAME_DIR .. "src/emu",
|
||||
MAME_DIR .. "src/mame",
|
||||
MAME_DIR .. "src/lib",
|
||||
@ -71,11 +72,17 @@ function createProjects_ldplayer_ldplayer(_target, _subtarget)
|
||||
GEN_DIR .. "mame/layout",
|
||||
}
|
||||
|
||||
includeosd()
|
||||
|
||||
files{
|
||||
MAME_DIR .. "src/emu/drivers/emudummy.c",
|
||||
}
|
||||
|
||||
dependency {
|
||||
{ MAME_DIR .. "src/emu/drivers/emudummy.c", GEN_DIR .. "ldplayer/layout/pr8210.lh" },
|
||||
}
|
||||
|
||||
custombuildtask {
|
||||
layoutbuildtask("ldplayer/layout", "pr8210"),
|
||||
}
|
||||
end
|
||||
|
||||
function linkProjects_ldplayer_ldplayer(_target, _subtarget)
|
||||
|
@ -764,6 +764,7 @@ function createMAMEProjects(_target, _subtarget, _name)
|
||||
}
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/osd",
|
||||
MAME_DIR .. "src/emu",
|
||||
MAME_DIR .. "src/mame",
|
||||
MAME_DIR .. "src/lib",
|
||||
@ -772,8 +773,6 @@ function createMAMEProjects(_target, _subtarget, _name)
|
||||
MAME_DIR .. "3rdparty/zlib",
|
||||
GEN_DIR .. "mame/layout",
|
||||
}
|
||||
|
||||
includeosd()
|
||||
end
|
||||
|
||||
function createProjects_mame_mame(_target, _subtarget)
|
||||
|
@ -86,6 +86,7 @@ function createProjects_mame_tiny(_target, _subtarget)
|
||||
}
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/osd",
|
||||
MAME_DIR .. "src/emu",
|
||||
MAME_DIR .. "src/mame",
|
||||
MAME_DIR .. "src/lib",
|
||||
@ -95,8 +96,6 @@ function createProjects_mame_tiny(_target, _subtarget)
|
||||
GEN_DIR .. "mame/layout",
|
||||
}
|
||||
|
||||
includeosd()
|
||||
|
||||
files{
|
||||
MAME_DIR .. "src/mame/machine/ticket.c",
|
||||
MAME_DIR .. "src/mame/drivers/carpolo.c",
|
||||
@ -137,6 +136,28 @@ function createProjects_mame_tiny(_target, _subtarget)
|
||||
MAME_DIR .. "src/mame/drivers/looping.c",
|
||||
MAME_DIR .. "src/mame/drivers/supertnk.c",
|
||||
}
|
||||
|
||||
--------------------------------------------------
|
||||
-- layout dependencies
|
||||
--------------------------------------------------
|
||||
|
||||
dependency {
|
||||
{ MAME_DIR .. "src/mame/drivers/astrocde.c", GEN_DIR .. "mame/layout/gorf.lh" },
|
||||
{ MAME_DIR .. "src/mame/drivers/astrocde.c", GEN_DIR .. "mame/layout/seawolf2.lh" },
|
||||
{ MAME_DIR .. "src/mame/drivers/astrocde.c", GEN_DIR .. "mame/layout/spacezap.lh" },
|
||||
{ MAME_DIR .. "src/mame/drivers/astrocde.c", GEN_DIR .. "mame/layout/tenpindx.lh" },
|
||||
{ MAME_DIR .. "src/mame/drivers/circus.c", GEN_DIR .. "mame/layout/circus.lh" },
|
||||
{ MAME_DIR .. "src/mame/drivers/circus.c", GEN_DIR .. "mame/layout/crash.lh" },
|
||||
}
|
||||
|
||||
custombuildtask {
|
||||
layoutbuildtask("mame/layout", "crash"),
|
||||
layoutbuildtask("mame/layout", "circus"),
|
||||
layoutbuildtask("mame/layout", "tenpindx"),
|
||||
layoutbuildtask("mame/layout", "spacezap"),
|
||||
layoutbuildtask("mame/layout", "seawolf2"),
|
||||
layoutbuildtask("mame/layout", "gorf"),
|
||||
}
|
||||
end
|
||||
|
||||
function linkProjects_mame_tiny(_target, _subtarget)
|
||||
|
@ -856,6 +856,7 @@ function createMESSProjects(_target, _subtarget, _name)
|
||||
}
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/osd",
|
||||
MAME_DIR .. "src/emu",
|
||||
MAME_DIR .. "src/mess",
|
||||
MAME_DIR .. "src/mame",
|
||||
@ -865,10 +866,8 @@ function createMESSProjects(_target, _subtarget, _name)
|
||||
MAME_DIR .. "3rdparty/zlib",
|
||||
GEN_DIR .. "mess/layout",
|
||||
GEN_DIR .. "mame/layout",
|
||||
GEN_DIR .. "emu/cpu/m68000",
|
||||
MAME_DIR .. "src/emu/cpu/m68000",
|
||||
}
|
||||
|
||||
includeosd()
|
||||
end
|
||||
|
||||
function createProjects_mess_mess(_target, _subtarget)
|
||||
@ -2507,6 +2506,12 @@ files {
|
||||
MAME_DIR .. "src/mess/drivers/ymmu100.c",
|
||||
MAME_DIR .. "src/mess/drivers/fb01.c",
|
||||
}
|
||||
dependency {
|
||||
{ MAME_DIR .. "src/mess/drivers/ymmu100.c", GEN_DIR .. "mess/drivers/ymmu100.inc" },
|
||||
}
|
||||
custombuildtask {
|
||||
{ MAME_DIR .. "src/mess/drivers/ymmu100.ppm", GEN_DIR .. "mess/drivers/ymmu100.inc", { MAME_DIR .. "src/build/file2str.py" }, {"@echo Converting src/drivers/ymmu100.ppm...", "python $(1) $(<) $(@) ymmu100_bkg UINT8" }},
|
||||
}
|
||||
|
||||
createMESSProjects(_target, _subtarget, "zenith")
|
||||
files {
|
||||
|
@ -17,6 +17,7 @@ function createProjects_mess_tiny(_target, _subtarget)
|
||||
}
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/osd",
|
||||
MAME_DIR .. "src/emu",
|
||||
MAME_DIR .. "src/mess",
|
||||
MAME_DIR .. "src/lib",
|
||||
@ -26,8 +27,6 @@ function createProjects_mess_tiny(_target, _subtarget)
|
||||
GEN_DIR .. "mess/layout",
|
||||
}
|
||||
|
||||
includeosd()
|
||||
|
||||
files{
|
||||
MAME_DIR .. "src/mess/drivers/coleco.c",
|
||||
MAME_DIR .. "src/mess/machine/coleco.c",
|
||||
|
@ -48,6 +48,16 @@ newoption {
|
||||
},
|
||||
}
|
||||
|
||||
newoption {
|
||||
trigger = "xcode",
|
||||
value = "xcode_target",
|
||||
description = "Choose XCode target",
|
||||
allowed = {
|
||||
{ "osx", "OSX" },
|
||||
{ "ios", "iOS" },
|
||||
}
|
||||
}
|
||||
|
||||
newoption {
|
||||
trigger = "with-android",
|
||||
value = "#",
|
||||
@ -319,6 +329,16 @@ function toolchain(_buildDir, _subDir)
|
||||
if ("vs2013-xp") == _OPTIONS["vs"] then
|
||||
premake.vstudio.toolset = ("v120_xp")
|
||||
location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-xp")
|
||||
end
|
||||
elseif _ACTION == "xcode4" then
|
||||
|
||||
if "osx" == _OPTIONS["xcode"] then
|
||||
premake.xcode.toolset = "macosx"
|
||||
location (path.join(_buildDir, "projects", _ACTION .. "-osx"))
|
||||
|
||||
elseif "ios" == _OPTIONS["xcode"] then
|
||||
premake.xcode.toolset = "iphoneos"
|
||||
location (path.join(_buildDir, "projects", _ACTION .. "-ios"))
|
||||
end
|
||||
end
|
||||
|
||||
@ -469,12 +489,13 @@ function toolchain(_buildDir, _subDir)
|
||||
objdir (_buildDir .. "android-arm" .. "/obj")
|
||||
libdirs {
|
||||
"$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a",
|
||||
"$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-arm/usr/lib",
|
||||
}
|
||||
includedirs {
|
||||
"$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/include",
|
||||
"$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-arm/usr/include",
|
||||
}
|
||||
buildoptions {
|
||||
"--sysroot=$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-arm",
|
||||
"-mthumb",
|
||||
"-march=armv7-a",
|
||||
"-mfloat-abi=softfp",
|
||||
@ -483,7 +504,6 @@ function toolchain(_buildDir, _subDir)
|
||||
"-Wundef",
|
||||
}
|
||||
linkoptions {
|
||||
"--sysroot=$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-arm",
|
||||
"$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-arm/usr/lib/crtbegin_so.o",
|
||||
"$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-arm/usr/lib/crtend_so.o",
|
||||
"-march=armv7-a",
|
||||
@ -495,17 +515,17 @@ function toolchain(_buildDir, _subDir)
|
||||
objdir (_buildDir .. "android-mips" .. "/obj")
|
||||
libdirs {
|
||||
"$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/libs/mips",
|
||||
"$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-mips/usr/lib/",
|
||||
}
|
||||
includedirs {
|
||||
"$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/libs/mips/include",
|
||||
"$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-mips/usr/include",
|
||||
}
|
||||
buildoptions {
|
||||
"--sysroot=$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-mips",
|
||||
"-Wunused-value",
|
||||
"-Wundef",
|
||||
}
|
||||
linkoptions {
|
||||
"--sysroot=$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-mips",
|
||||
"$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-mips/usr/lib/crtbegin_so.o",
|
||||
"$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-mips/usr/lib/crtend_so.o",
|
||||
}
|
||||
@ -515,12 +535,13 @@ function toolchain(_buildDir, _subDir)
|
||||
objdir (_buildDir .. "android-x86" .. "/obj")
|
||||
libdirs {
|
||||
"$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/libs/x86",
|
||||
"$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-x86/usr/lib",
|
||||
}
|
||||
includedirs {
|
||||
"$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/libs/x86/include",
|
||||
"$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-x86/usr/include",
|
||||
}
|
||||
buildoptions {
|
||||
"--sysroot=$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-x86",
|
||||
"-march=i686",
|
||||
"-mtune=atom",
|
||||
"-mstackrealign",
|
||||
@ -530,7 +551,6 @@ function toolchain(_buildDir, _subDir)
|
||||
"-Wundef",
|
||||
}
|
||||
linkoptions {
|
||||
"--sysroot=$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-x86",
|
||||
"$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-x86/usr/lib/crtbegin_so.o",
|
||||
"$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-x86/usr/lib/crtend_so.o",
|
||||
}
|
||||
|
@ -97,6 +97,18 @@ public:
|
||||
: seconds(secs),
|
||||
attoseconds(attos) { }
|
||||
|
||||
attotime(const attotime& that)
|
||||
: seconds(that.seconds),
|
||||
attoseconds(that.attoseconds) { }
|
||||
|
||||
// assignment
|
||||
attotime& operator=(const attotime& that)
|
||||
{
|
||||
this->seconds = that.seconds;
|
||||
this->attoseconds = that.attoseconds;
|
||||
return *this;
|
||||
}
|
||||
|
||||
// queries
|
||||
bool is_zero() const { return (seconds == 0 && attoseconds == 0); }
|
||||
bool is_never() const { return (seconds >= ATTOTIME_MAX_SECONDS); }
|
||||
|
@ -312,7 +312,8 @@ static const nes_pcb pcb_list[] =
|
||||
{ "unl_dance", UNSUPPORTED_BOARD },
|
||||
{ "bmc_hik_kof", UNSUPPORTED_BOARD },
|
||||
{ "onebus", UNSUPPORTED_BOARD },
|
||||
{ "coolboy", UNSUPPORTED_BOARD },
|
||||
{ "coolboy", UNSUPPORTED_BOARD },
|
||||
{ "btl_900218", UNSUPPORTED_BOARD }, // pirate The Lord of King, to be emulated soon
|
||||
{ "a9746", UNSUPPORTED_BOARD },
|
||||
{ "dance2k", UNSUPPORTED_BOARD },
|
||||
{ "pec586", UNSUPPORTED_BOARD },
|
||||
|
34886
src/emu/cpu/m68000/m68kops.c
Normal file
34886
src/emu/cpu/m68000/m68kops.c
Normal file
File diff suppressed because it is too large
Load Diff
1993
src/emu/cpu/m68000/m68kops.h
Normal file
1993
src/emu/cpu/m68000/m68kops.h
Normal file
File diff suppressed because it is too large
Load Diff
31
src/emu/cpu/m68000/makefile
Normal file
31
src/emu/cpu/m68000/makefile
Normal file
@ -0,0 +1,31 @@
|
||||
# extension for executables
|
||||
EXE :=
|
||||
|
||||
ifeq ($(OS),Windows_NT)
|
||||
EXE := .exe
|
||||
endif
|
||||
ifeq ($(OS),os2)
|
||||
EXE := .exe
|
||||
endif
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
all : m68kmake$(EXE) m68kops.c clean
|
||||
|
||||
clean:
|
||||
@echo Cleaning...
|
||||
-@rm -f m68kmake$(EXE)
|
||||
-@rm -f m68kmake.o
|
||||
|
||||
m68kmake.o: m68kmake.c
|
||||
@echo $(notdir $<)
|
||||
@gcc -x c++ -std=gnu++98 -o "$@" -c "$<"
|
||||
|
||||
m68kmake$(EXE) : m68kmake.o
|
||||
@echo Linking $@...
|
||||
@g++ -lstdc++ $^ -o $@
|
||||
|
||||
m68kops.c: m68kmake$(EXE) m68k_in.c
|
||||
@echo Generating M68K source files...
|
||||
@m68kmake$(EXE) . m68k_in.c
|
||||
|
@ -85,7 +85,7 @@
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#ifdef SDLMAME_EMSCRIPTEN
|
||||
#if defined(EMSCRIPTEN)
|
||||
#include <emscripten.h>
|
||||
|
||||
void js_set_main_loop(running_machine * machine);
|
||||
@ -385,10 +385,10 @@ int running_machine::run(bool firstrun)
|
||||
{
|
||||
g_profiler.start(PROFILER_EXTRA);
|
||||
|
||||
#if defined(EMSCRIPTEN)
|
||||
#if defined(EMSCRIPTEN)
|
||||
//break out to our async javascript loop and halt
|
||||
js_set_main_loop(this);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
manager().web()->serve();
|
||||
|
||||
|
@ -81,7 +81,7 @@ void pci_device::device_start()
|
||||
status = 0x0000;
|
||||
|
||||
for(int i=0; i<6; i++) {
|
||||
bank_infos[i].adr = 0;
|
||||
bank_infos[i].adr = -1;
|
||||
bank_infos[i].size = 0;
|
||||
bank_infos[i].flags = 0;
|
||||
bank_reg_infos[i].bank = -1;
|
||||
@ -257,7 +257,7 @@ void pci_device::map_device(UINT64 memory_window_start, UINT64 memory_window_end
|
||||
{
|
||||
for(int i=0; i<bank_count; i++) {
|
||||
bank_info &bi = bank_infos[i];
|
||||
if(!bi.adr)
|
||||
if(bi.adr==-1)
|
||||
continue;
|
||||
if(UINT32(bi.adr) == UINT32(~(bi.size - 1)))
|
||||
continue;
|
||||
|
@ -1,8 +1,8 @@
|
||||
#include "vrc4373.h"
|
||||
|
||||
#define LOG_NILE (1)
|
||||
#define LOG_NILE (0)
|
||||
#define LOG_NILE_MASTER (0)
|
||||
#define LOG_NILE_TARGET (1)
|
||||
#define LOG_NILE_TARGET (0)
|
||||
|
||||
const device_type VRC4373 = &device_creator<vrc4373_device>;
|
||||
|
||||
@ -217,14 +217,14 @@ READ32_MEMBER (vrc4373_device::target1_r)
|
||||
{
|
||||
UINT32 result = m_cpu->space(AS_PROGRAM).read_dword(m_target1_laddr | (offset*4), mem_mask);
|
||||
if (LOG_NILE_TARGET)
|
||||
logerror("%06X:nile target1 read from offset %02X = %08X & %08X\n", space.device().safe_pc(), offset*4, result, mem_mask);
|
||||
logerror("%08X:nile target1 read from offset %02X = %08X & %08X\n", m_cpu->device_t::safe_pc(), offset*4, result, mem_mask);
|
||||
return result;
|
||||
}
|
||||
WRITE32_MEMBER (vrc4373_device::target1_w)
|
||||
{
|
||||
m_cpu->space(AS_PROGRAM).write_dword(m_target1_laddr | (offset*4), data, mem_mask);
|
||||
if (LOG_NILE_TARGET)
|
||||
logerror("%06X:nile target1 write to offset %02X = %08X & %08X\n", space.device().safe_pc(), offset*4, data, mem_mask);
|
||||
logerror("%08X:nile target1 write to offset %02X = %08X & %08X\n", m_cpu->device_t::safe_pc(), offset*4, data, mem_mask);
|
||||
}
|
||||
|
||||
// PCI Target Window 2
|
||||
@ -232,16 +232,38 @@ READ32_MEMBER (vrc4373_device::target2_r)
|
||||
{
|
||||
UINT32 result = m_cpu->space(AS_PROGRAM).read_dword(m_target2_laddr | (offset*4), mem_mask);
|
||||
if (LOG_NILE_TARGET)
|
||||
logerror("%06X:nile target2 read from offset %02X = %08X & %08X\n", space.device().safe_pc(), offset*4, result, mem_mask);
|
||||
logerror("%08X:nile target2 read from offset %02X = %08X & %08X\n", m_cpu->device_t::safe_pc(), offset*4, result, mem_mask);
|
||||
return result;
|
||||
}
|
||||
WRITE32_MEMBER (vrc4373_device::target2_w)
|
||||
{
|
||||
m_cpu->space(AS_PROGRAM).write_dword(m_target2_laddr | (offset*4), data, mem_mask);
|
||||
if (LOG_NILE_TARGET)
|
||||
logerror("%06X:nile target2 write to offset %02X = %08X & %08X\n", space.device().safe_pc(), offset*4, data, mem_mask);
|
||||
logerror("%08X:nile target2 write to offset %02X = %08X & %08X\n", m_cpu->device_t::safe_pc(), offset*4, data, mem_mask);
|
||||
}
|
||||
|
||||
// DMA Transfer
|
||||
void vrc4373_device::dma_transfer(int which)
|
||||
{
|
||||
if (LOG_NILE)
|
||||
logerror("%08X:nile Start dma PCI: %08X MEM: %08X Words: %X\n", m_cpu->space(AS_PROGRAM).device().safe_pc(), m_cpu_regs[NREG_DMA_CPAR], m_cpu_regs[NREG_DMA_CMAR], m_cpu_regs[NREG_DMA_REM]);
|
||||
int pciSel = (m_cpu_regs[NREG_DMACR1+which*0xC] & DMA_MIO) ? AS_DATA : AS_IO;
|
||||
UINT32 mem_mask = 0xffffffff;
|
||||
while (m_cpu_regs[NREG_DMA_REM]>0) {
|
||||
if (0 && LOG_NILE)
|
||||
logerror("dma_transfer PCI: %08X Mem: %08X Words Remaining: %X\n", m_cpu_regs[NREG_DMA_CPAR], m_cpu_regs[NREG_DMA_CMAR], m_cpu_regs[NREG_DMA_REM]);
|
||||
if (m_cpu_regs[NREG_DMACR1+which*0xC]&DMA_RW) {
|
||||
// Read data from PCI and write to local
|
||||
m_cpu->space(AS_PROGRAM).write_dword(m_cpu_regs[NREG_DMA_CMAR], this->space(pciSel).read_dword(m_cpu_regs[NREG_DMA_CPAR], mem_mask), mem_mask);
|
||||
} else {
|
||||
// Read data from local and write to PCI
|
||||
this->space(pciSel).write_dword(m_cpu_regs[NREG_DMA_CPAR], m_cpu->space(AS_PROGRAM).read_dword(m_cpu_regs[NREG_DMA_CMAR], mem_mask), mem_mask);
|
||||
}
|
||||
m_cpu_regs[NREG_DMA_CMAR] += 0x4;
|
||||
m_cpu_regs[NREG_DMA_CPAR] += 0x4;
|
||||
m_cpu_regs[NREG_DMA_REM]--;
|
||||
}
|
||||
}
|
||||
// CPU I/F
|
||||
READ32_MEMBER (vrc4373_device::cpu_if_r)
|
||||
{
|
||||
@ -253,6 +275,15 @@ READ32_MEMBER (vrc4373_device::cpu_if_r)
|
||||
case NREG_PCICDR:
|
||||
result = config_data_r(space, offset);
|
||||
break;
|
||||
case NREG_DMACR1:
|
||||
case NREG_DMACR2:
|
||||
// Clear busy and go on read
|
||||
if (m_cpu_regs[NREG_DMA_REM]==0) {
|
||||
int which = (offset-NREG_DMACR1)>>3;
|
||||
m_cpu_regs[NREG_DMACR1+which*0xc] &= ~DMA_BUSY;
|
||||
m_cpu_regs[NREG_DMACR1+which*0xc] &= ~DMA_GO;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -266,7 +297,8 @@ WRITE32_MEMBER(vrc4373_device::cpu_if_w)
|
||||
if (LOG_NILE)
|
||||
logerror("%06X:nile write to offset %02X = %08X & %08X\n", space.device().safe_pc(), offset*4, data, mem_mask);
|
||||
|
||||
UINT32 modData;
|
||||
UINT32 modData, oldData;
|
||||
oldData = m_cpu_regs[offset];
|
||||
COMBINE_DATA(&m_cpu_regs[offset]);
|
||||
switch (offset) {
|
||||
case NREG_PCIMW1:
|
||||
@ -312,6 +344,23 @@ WRITE32_MEMBER(vrc4373_device::cpu_if_w)
|
||||
case NREG_PCICDR:
|
||||
pci_host_device::config_data_w(space, offset, data);
|
||||
break;
|
||||
case NREG_DMACR1:
|
||||
case NREG_DMACR2:
|
||||
// Start when DMA_GO bit is set
|
||||
if (!(oldData & DMA_GO) && (data & DMA_GO)) {
|
||||
int which = (offset-NREG_DMACR1)>>3;
|
||||
// Check to see DMA is not already started
|
||||
if (!(data&DMA_BUSY)) {
|
||||
// Set counts and address
|
||||
m_cpu_regs[NREG_DMA_CPAR] = m_cpu_regs[NREG_DMAPCI1+which*0xC];
|
||||
m_cpu_regs[NREG_DMA_CMAR] = m_cpu_regs[NREG_DMAMAR1+which*0xC];
|
||||
m_cpu_regs[NREG_DMA_REM] = (data & DMA_BLK_SIZE)>>2;
|
||||
m_cpu_regs[NREG_DMACR1+which*0xc] |= DMA_BUSY;
|
||||
// Start the transfer
|
||||
dma_transfer(which);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case NREG_BMCR:
|
||||
if ((data>>3)&0x1) {
|
||||
m_ram_size = 1<<22; // 4MB
|
||||
|
@ -38,13 +38,24 @@
|
||||
#define NREG_DRAMRCR (0x058/4)
|
||||
#define NREG_BOOTWP (0x05C/4)
|
||||
#define NREG_PCIEAR (0x060/4)
|
||||
#define NREG_DMA_WR (0x064/4)
|
||||
#define NREG_DMA_REM (0x064/4)
|
||||
#define NREG_DMA_CMAR (0x068/4)
|
||||
#define NREG_DMA_CPAR (0x06C/4)
|
||||
#define NREG_PCIRC (0x070/4)
|
||||
#define NREG_PCIEN (0x074/4)
|
||||
#define NREG_PMIR (0x078/4)
|
||||
|
||||
#define DMA_BUSY 0x80000000
|
||||
#define DMA_INT_EN 0x40000000
|
||||
#define DMA_RW 0x20000000
|
||||
#define DMA_GO 0x10000000
|
||||
#define DMA_SUS 0x08000000
|
||||
#define DMA_INC 0x04000000
|
||||
#define DMA_MIO 0x02000000
|
||||
#define DMA_RST 0x01000000
|
||||
#define DMA_BLK_SIZE 0x000fffff
|
||||
|
||||
|
||||
class vrc4373_device : public pci_host_device {
|
||||
public:
|
||||
vrc4373_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
@ -86,6 +97,7 @@ protected:
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum) const;
|
||||
virtual void device_start();
|
||||
virtual void device_reset();
|
||||
void dma_transfer(int which);
|
||||
|
||||
private:
|
||||
cpu_device *m_cpu;
|
||||
@ -108,6 +120,7 @@ private:
|
||||
|
||||
UINT32 m_pci1_laddr, m_pci2_laddr, m_pci_io_laddr;
|
||||
UINT32 m_target1_laddr, m_target2_laddr;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -1,6 +1,16 @@
|
||||
#include "es1373.h"
|
||||
|
||||
#define LOG_ES (1)
|
||||
#define LOG_ES_REG (0)
|
||||
|
||||
static MACHINE_CONFIG_FRAGMENT( es1373 )
|
||||
MCFG_TIMER_DRIVER_ADD_PERIODIC("sound_timer", es1373_device, es_timer_callback, attotime::from_hz(44100/16384))
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
machine_config_constructor es1373_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( es1373 );
|
||||
}
|
||||
|
||||
const device_type ES1373 = &device_creator<es1373_device>;
|
||||
|
||||
@ -9,12 +19,21 @@ DEVICE_ADDRESS_MAP_START(map, 32, es1373_device)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
es1373_device::es1373_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: pci_device(mconfig, ES1373, "Creative Labs Ensoniq AudioPCI97 ES1373", tag, owner, clock, "es1373", __FILE__)
|
||||
: pci_device(mconfig, ES1373, "Creative Labs Ensoniq AudioPCI97 ES1373", tag, owner, clock, "es1373", __FILE__),
|
||||
m_irq_num(-1)
|
||||
{
|
||||
}
|
||||
|
||||
void es1373_device::set_irq_info(const char *tag, const int irq_num)
|
||||
{
|
||||
m_cpu_tag = tag;
|
||||
m_irq_num = irq_num;
|
||||
}
|
||||
|
||||
void es1373_device::device_start()
|
||||
{
|
||||
//m_cpu = machine().device<cpu_device>(":maincpu");
|
||||
m_cpu = machine().device<cpu_device>(m_cpu_tag);
|
||||
pci_device::device_start();
|
||||
add_map(0x40, M_IO, FUNC(es1373_device::map));
|
||||
}
|
||||
@ -25,6 +44,144 @@ void es1373_device::device_reset()
|
||||
memset(m_es_regs, 0, sizeof(m_es_regs));
|
||||
memset(m_ac97_regs, 0, sizeof(m_ac97_regs));
|
||||
m_ac97_regs[0] = 0x0800;
|
||||
// Reset ADC channel info
|
||||
m_adc.enable = false;
|
||||
m_adc.int_en = false;
|
||||
m_adc.loop_en = false;
|
||||
m_adc.initialized = false;
|
||||
m_adc.buf_count = 0;
|
||||
m_adc.buf_size = 0;
|
||||
m_adc.buf_rptr = 0x20;
|
||||
m_adc.buf_wptr = 0x20;
|
||||
// Reset DAC1 channel info
|
||||
m_dac1.enable = false;
|
||||
m_dac1.int_en = false;
|
||||
m_dac1.loop_en = false;
|
||||
m_dac1.initialized = false;
|
||||
m_dac1.buf_count = 0;
|
||||
m_dac1.buf_size = 0;
|
||||
m_dac1.buf_rptr = 0x0;
|
||||
m_dac1.buf_wptr = 0x0;
|
||||
// Reset DAC2 channel info
|
||||
m_dac2.enable = false;
|
||||
m_dac2.int_en = false;
|
||||
m_dac2.loop_en = false;
|
||||
m_dac2.initialized = false;
|
||||
m_dac2.buf_count = 0;
|
||||
m_dac2.buf_size = 0;
|
||||
m_dac2.buf_rptr = 0x10;
|
||||
m_dac2.buf_wptr = 0x10;
|
||||
}
|
||||
|
||||
void es1373_device::map_extra(UINT64 memory_window_start, UINT64 memory_window_end, UINT64 memory_offset, address_space *memory_space,
|
||||
UINT64 io_window_start, UINT64 io_window_end, UINT64 io_offset, address_space *io_space)
|
||||
{
|
||||
m_memory_space = memory_space;
|
||||
}
|
||||
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(es1373_device::es_timer_callback)
|
||||
{
|
||||
// Only transfer PCI data if bus mastering is enabled
|
||||
if (command & 0x4) {
|
||||
if (m_dac2.enable && (!(m_dac2.buf_rptr&0x7))) {
|
||||
transfer_pci_audio(m_dac2, ES_PCI_READ);
|
||||
}
|
||||
if (m_dac2.pci_count>8) {
|
||||
m_dac2.initialized = true;
|
||||
}
|
||||
}
|
||||
if (m_dac2.enable) {
|
||||
// The initalized is to signal that inital buffer has been written
|
||||
if (m_dac2.buf_count<=m_dac2.buf_size && m_dac2.initialized) {
|
||||
// Send data to sound???
|
||||
// sound = m_sound_cache[chan.buf_rptr]
|
||||
if (0 && LOG_ES)
|
||||
logerror("%X: DAC2 buf_count: %i buf_size: %X buf_rptr: %X buf_wptr: %X\n", machine().device("maincpu")->safe_pc(),
|
||||
m_dac2.buf_count, m_dac2.buf_size, m_dac2.buf_rptr, m_dac2.buf_wptr);
|
||||
if (m_dac2.buf_count==m_dac2.buf_size) {
|
||||
if (m_dac2.int_en) {
|
||||
m_es_regs[ES_INT_CS_STATUS] |= ICSTATUS_DAC2_INT_MASK;
|
||||
if (LOG_ES)
|
||||
logerror("%X: es_timer_callback Setting DAC2 interrupt\n", machine().device("maincpu")->safe_pc());
|
||||
}
|
||||
if (m_dac2.loop_en) {
|
||||
// Keep playing
|
||||
m_dac2.buf_count = m_dac2.buf_count + 1 - 4; // Should check SCTRL_P2_END_MASK
|
||||
} else {
|
||||
// Stop
|
||||
//m_dac2.enable = false;
|
||||
}
|
||||
} else {
|
||||
m_dac2.buf_count++;
|
||||
}
|
||||
m_dac2.buf_rptr++;
|
||||
if (!(m_dac2.buf_rptr&0xf)) {
|
||||
m_dac2.buf_rptr -= 0x10;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (m_adc.enable) {
|
||||
if (m_adc.buf_count<=m_adc.buf_size) {
|
||||
if (LOG_ES)
|
||||
logerror("%s: ADC buf_count: %i buf_size: %i buf_rptr: %i buf_wptr: %i\n", machine().describe_context(),
|
||||
m_adc.buf_count, m_adc.buf_size, m_adc.buf_rptr, m_adc.buf_wptr);
|
||||
if (m_adc.int_en && m_adc.buf_count==m_adc.buf_size) {
|
||||
m_es_regs[ES_INT_CS_STATUS] |= ICSTATUS_ADC_INT_MASK;
|
||||
if (LOG_ES)
|
||||
logerror("%s: es_timer_callback Setting ADC interrupt\n", tag());
|
||||
}
|
||||
m_adc.buf_count++;
|
||||
m_adc.buf_wptr++;
|
||||
if (!(m_adc.buf_wptr&0xf)) {
|
||||
m_adc.buf_wptr -= 0x10;
|
||||
}
|
||||
}
|
||||
}
|
||||
// PCI Write Transfer
|
||||
if (command & 0x4) {
|
||||
if (m_adc.enable && (!(m_adc.buf_wptr&0x7))) {
|
||||
transfer_pci_audio(m_adc, ES_PCI_WRITE);
|
||||
}
|
||||
}
|
||||
if (m_es_regs[ES_INT_CS_STATUS]&(ICSTATUS_DAC1_INT_MASK|ICSTATUS_DAC2_INT_MASK|ICSTATUS_ADC_INT_MASK)) {
|
||||
m_es_regs[ES_INT_CS_STATUS] |= ICSTATUS_INTR_MASK;
|
||||
// Assert interrupt
|
||||
//m_cpu->set_input_line(ES_IRQ_NUM, ASSERT_LINE);
|
||||
if (m_irq_num!=-1) {
|
||||
m_cpu->set_input_line(m_irq_num, ASSERT_LINE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void es1373_device::transfer_pci_audio(chan_info& chan, int type)
|
||||
{
|
||||
UINT32 pci_addr, data;
|
||||
pci_addr = chan.pci_addr + (chan.pci_count<<2);
|
||||
if (type==ES_PCI_READ) {
|
||||
// Transfer from PCI to sound cache
|
||||
// Always transfer 8 longwords
|
||||
for (int i=0; i<8 && (chan.pci_count<=chan.pci_size); i++) {
|
||||
data = m_memory_space->read_dword(pci_addr, 0xffffffff);
|
||||
m_sound_cache[chan.buf_wptr++] = data;
|
||||
if (!(chan.buf_wptr&0xf)) {
|
||||
chan.buf_wptr -= 0x10;
|
||||
}
|
||||
chan.pci_count++;
|
||||
pci_addr += 4;
|
||||
}
|
||||
} else {
|
||||
// Transfer from sound cache to PCI
|
||||
// Always transfer 8 longwords
|
||||
for (int i=0; i<8 && chan.pci_count<=chan.pci_size; i++) {
|
||||
data = m_sound_cache[chan.buf_rptr++];
|
||||
m_memory_space->write_dword(pci_addr, data);
|
||||
if (!(chan.buf_rptr&0xf)) {
|
||||
chan.buf_rptr -= 0x10;
|
||||
}
|
||||
chan.pci_count++;
|
||||
pci_addr += 4;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
READ32_MEMBER (es1373_device::reg_r)
|
||||
@ -33,62 +190,51 @@ READ32_MEMBER (es1373_device::reg_r)
|
||||
switch (offset) {
|
||||
case ES_CODEC:
|
||||
break;
|
||||
case ES_DAC2_CNT:
|
||||
result = ((m_dac2.buf_size-m_dac2.buf_count)<<16) | m_dac2.buf_size;
|
||||
break;
|
||||
case ES_HOST_IF0: // 0x30
|
||||
result = m_sound_cache[(m_es_regs[ES_MEM_PAGE]<<2) | 0x0];
|
||||
switch (m_es_regs[ES_MEM_PAGE]&0xf) {
|
||||
case 0xc:
|
||||
result = m_dac1_fr.pci_addr;
|
||||
result = m_dac1.pci_addr;
|
||||
break;
|
||||
case 0xd:
|
||||
result = m_adc_fr.pci_addr;
|
||||
result = m_adc.pci_addr;
|
||||
break;
|
||||
case 0xe:
|
||||
case 0xf:
|
||||
logerror("%06X:ES1373 Read UART offset %02X & %08X\n", space.device().safe_pc(), offset*4, mem_mask);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case ES_HOST_IF1: // 0x34
|
||||
result = m_sound_cache[(m_es_regs[ES_MEM_PAGE]<<2) | 0x1];
|
||||
switch (m_es_regs[ES_MEM_PAGE]&0xf) {
|
||||
case 0xc:
|
||||
result = (m_dac1_fr.curr_count<<16) | m_dac1_fr.buff_size;
|
||||
result = (m_dac1.pci_count<<16) | m_dac1.pci_size;
|
||||
break;
|
||||
case 0xd:
|
||||
result = (m_adc_fr.curr_count<<16) | m_adc_fr.buff_size;
|
||||
result = (m_adc.pci_count<<16) | m_adc.pci_size;
|
||||
break;
|
||||
case 0xe:
|
||||
case 0xf:
|
||||
logerror("%06X:ES1373 write UART offset %02X & %08X\n", space.device().safe_pc(), offset*4, mem_mask);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case ES_HOST_IF2: // 0x38
|
||||
result = m_sound_cache[(m_es_regs[ES_MEM_PAGE]<<2) | 0x2];
|
||||
switch (m_es_regs[ES_MEM_PAGE]&0xf) {
|
||||
case 0xc:
|
||||
result = m_dac2_fr.pci_addr;
|
||||
result = m_dac2.pci_addr;
|
||||
break;
|
||||
case 0xd:
|
||||
logerror("%06X:ES1373 read Unknown place offset %02X & %08X\n", space.device().safe_pc(), offset*4, mem_mask);
|
||||
break;
|
||||
case 0xe:
|
||||
case 0xf:
|
||||
logerror("%06X:ES1373 read UART offset %02X & %08X\n", space.device().safe_pc(), offset*4, mem_mask);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case ES_HOST_IF3: // 0x3C
|
||||
result = m_sound_cache[(m_es_regs[ES_MEM_PAGE]<<2) | 0x3];
|
||||
switch (m_es_regs[ES_MEM_PAGE]&0xf) {
|
||||
case 0xc:
|
||||
result = (m_dac2_fr.curr_count<<16) | m_dac2_fr.buff_size;
|
||||
result = ((m_dac2.pci_count)<<16) | m_dac2.pci_size;
|
||||
break;
|
||||
case 0xd:
|
||||
logerror("%06X:ES1373 read Unknown place offset %02X & %08X\n", space.device().safe_pc(), offset*4, mem_mask);
|
||||
break;
|
||||
case 0xe:
|
||||
case 0xf:
|
||||
logerror("%06X:ES1373 read UART offset %02X & %08X\n", space.device().safe_pc(), offset*4, mem_mask);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -96,8 +242,8 @@ READ32_MEMBER (es1373_device::reg_r)
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (LOG_ES)
|
||||
logerror("%06X:ES1373 read from offset %02X = %08X & %08X\n", space.device().safe_pc(), offset*4, result, mem_mask);
|
||||
if (LOG_ES_REG)
|
||||
logerror("%08X:ES1373 read from offset %02X = %08X & %08X\n", machine().device("maincpu")->safe_pc(), offset*4, result, mem_mask);
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -105,6 +251,11 @@ WRITE32_MEMBER(es1373_device::reg_w)
|
||||
{
|
||||
COMBINE_DATA(&m_es_regs[offset]);
|
||||
switch (offset) {
|
||||
case ES_INT_CS_CTRL:
|
||||
m_dac1.enable = (m_es_regs[ES_INT_CS_CTRL] & ICCTRL_DAC1_EN_MASK);
|
||||
m_dac2.enable = (m_es_regs[ES_INT_CS_CTRL] & ICCTRL_DAC2_EN_MASK);
|
||||
m_adc.enable = (m_es_regs[ES_INT_CS_CTRL] & ICCTRL_ADC_EN_MASK);
|
||||
break;
|
||||
case ES_SRC_IF:
|
||||
if (data&(1<<24)) {
|
||||
// Write to Sample Rate Converter Ram
|
||||
@ -123,65 +274,78 @@ WRITE32_MEMBER(es1373_device::reg_w)
|
||||
m_ac97_regs[(data>>16)&0x7f] = data&0xFFFF;
|
||||
}
|
||||
break;
|
||||
case ES_SERIAL_CTRL:
|
||||
m_adc.loop_en = !(m_es_regs[ES_SERIAL_CTRL] & SCTRL_R1_LOOP_MASK);
|
||||
m_dac2.loop_en = !(m_es_regs[ES_SERIAL_CTRL] & SCTRL_P2_LOOP_MASK);
|
||||
m_dac1.loop_en = !(m_es_regs[ES_SERIAL_CTRL] & SCTRL_P1_LOOP_MASK);
|
||||
m_adc.int_en = m_es_regs[ES_SERIAL_CTRL] & SCTRL_R1_INT_EN_MASK;
|
||||
m_dac2.int_en = m_es_regs[ES_SERIAL_CTRL] & SCTRL_P2_INT_EN_MASK;
|
||||
m_dac1.int_en = m_es_regs[ES_SERIAL_CTRL] & SCTRL_P1_INT_EN_MASK;
|
||||
if (!m_adc.int_en) m_es_regs[ES_INT_CS_STATUS] &= ~ICSTATUS_ADC_INT_MASK;
|
||||
if (!m_dac1.int_en) m_es_regs[ES_INT_CS_STATUS] &= ~ICSTATUS_DAC1_INT_MASK;
|
||||
if (!m_dac2.int_en) m_es_regs[ES_INT_CS_STATUS] &= ~ICSTATUS_DAC2_INT_MASK;
|
||||
// Clear the summary interrupt and irq line
|
||||
if (!(m_es_regs[ES_INT_CS_STATUS]&(ICSTATUS_DAC1_INT_MASK|ICSTATUS_DAC2_INT_MASK|ICSTATUS_ADC_INT_MASK))) {
|
||||
// Deassert interrupt
|
||||
if (m_es_regs[ES_INT_CS_STATUS]&ICSTATUS_INTR_MASK && m_irq_num!=-1) {
|
||||
m_cpu->set_input_line(m_irq_num, CLEAR_LINE);
|
||||
m_es_regs[ES_INT_CS_STATUS] &= ~ICSTATUS_INTR_MASK;
|
||||
if (LOG_ES)
|
||||
logerror("%X: es1373_device::reg_w Clearing interrupt\n", machine().device("maincpu")->safe_pc());
|
||||
}
|
||||
}
|
||||
if (LOG_ES_REG)
|
||||
logerror("%s: es1373_device::reg_w adc_int_en: %i dac1_int_en: %i dac2_int_en: %i\n", tag(), m_adc.int_en, m_dac1.int_en, m_dac2.int_en);
|
||||
break;
|
||||
case ES_DAC2_CNT:
|
||||
m_dac2.buf_count = 0;
|
||||
m_dac2.buf_size = data&0xffff;
|
||||
break;
|
||||
case ES_HOST_IF0: // 0x30
|
||||
m_sound_cache[(m_es_regs[ES_MEM_PAGE]<<2) | 0x0] = data;
|
||||
switch (m_es_regs[ES_MEM_PAGE]&0xf) {
|
||||
case 0xc:
|
||||
m_dac1_fr.pci_addr = data;
|
||||
m_dac1.pci_addr = data;
|
||||
break;
|
||||
case 0xd:
|
||||
m_adc_fr.pci_addr = data;
|
||||
m_adc.pci_addr = data;
|
||||
break;
|
||||
case 0xe:
|
||||
case 0xf:
|
||||
logerror("%06X:ES1373 write UART offset %02X = %08X & %08X\n", space.device().safe_pc(), offset*4, data, mem_mask);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case ES_HOST_IF1: // 0x34
|
||||
m_sound_cache[(m_es_regs[ES_MEM_PAGE]<<2) | 0x1] = data;
|
||||
switch (m_es_regs[ES_MEM_PAGE]&0xf) {
|
||||
case 0xc:
|
||||
m_dac1_fr.curr_count = (data>>16)&0xffff;
|
||||
m_dac1_fr.buff_size = data&0xffff;
|
||||
m_dac1.pci_count = (data>>16)&0xffff;
|
||||
m_dac1.pci_size = data&0xffff;
|
||||
break;
|
||||
case 0xd:
|
||||
m_adc_fr.curr_count = (data>>16)&0xffff;
|
||||
m_adc_fr.buff_size = data&0xffff;
|
||||
m_adc.pci_count = (data>>16)&0xffff;
|
||||
m_adc.pci_size = data&0xffff;
|
||||
break;
|
||||
case 0xe:
|
||||
case 0xf:
|
||||
logerror("%06X:ES1373 write UART offset %02X = %08X & %08X\n", space.device().safe_pc(), offset*4, data, mem_mask);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case ES_HOST_IF2: // 0x38
|
||||
m_sound_cache[(m_es_regs[ES_MEM_PAGE]<<2) | 0x2] = data;
|
||||
switch (m_es_regs[ES_MEM_PAGE]&0xf) {
|
||||
case 0xc:
|
||||
m_dac2_fr.pci_addr = data;
|
||||
m_dac2.pci_addr = data;
|
||||
break;
|
||||
case 0xd:
|
||||
logerror("%06X:ES1373 write Unknown place offset %02X = %08X & %08X\n", space.device().safe_pc(), offset*4, data, mem_mask);
|
||||
break;
|
||||
case 0xe:
|
||||
case 0xf:
|
||||
logerror("%06X:ES1373 write UART offset %02X = %08X & %08X\n", space.device().safe_pc(), offset*4, data, mem_mask);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case ES_HOST_IF3: // 0x3C
|
||||
m_sound_cache[(m_es_regs[ES_MEM_PAGE]<<2) | 0x3] = data;
|
||||
switch (m_es_regs[ES_MEM_PAGE]&0xf) {
|
||||
case 0xc:
|
||||
m_dac2_fr.curr_count = (data>>16)&0xffff;
|
||||
m_dac2_fr.buff_size = data&0xffff;
|
||||
m_dac2.pci_count = (data>>16)&0xffff;
|
||||
m_dac2.pci_size = data&0xffff;
|
||||
break;
|
||||
case 0xd:
|
||||
logerror("%06X:ES1373 write Unknown place offset %02X = %08X & %08X\n", space.device().safe_pc(), offset*4, data, mem_mask);
|
||||
break;
|
||||
case 0xe:
|
||||
case 0xf:
|
||||
logerror("%06X:ES1373 write UART offset %02X = %08X & %08X\n", space.device().safe_pc(), offset*4, data, mem_mask);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -190,7 +354,7 @@ WRITE32_MEMBER(es1373_device::reg_w)
|
||||
break;
|
||||
}
|
||||
|
||||
if (LOG_ES)
|
||||
logerror("%06X:ES1373 write to offset %02X = %08X & %08X\n", space.device().safe_pc(), offset*4, data, mem_mask);
|
||||
if (LOG_ES_REG)
|
||||
logerror("%08X:ES1373 write to offset %02X = %08X & %08X\n", machine().device("maincpu")->safe_pc(), offset*4, data, mem_mask);
|
||||
|
||||
}
|
||||
|
@ -5,57 +5,116 @@
|
||||
|
||||
#include "machine/pci.h"
|
||||
|
||||
// No interrupts
|
||||
#define MCFG_ES1373_ADD(_tag) \
|
||||
MCFG_PCI_DEVICE_ADD(_tag, ES1373, 0x12741371, 0x04, 0x040100, 0x12741371)
|
||||
|
||||
#define MCFG_ES1373_IRQ_ADD(_cpu_tag, _irq_num) \
|
||||
downcast<es1373_device *>(device)->set_irq_info(_cpu_tag, _irq_num);
|
||||
|
||||
/* Ensonic ES1373 registers 0x00-0x3f */
|
||||
#define ES_INT_CS_CTRL (0x00/4)
|
||||
#define ES_INT_CS_STATUS (0x04/4)
|
||||
#define ES_UART_DATA (0x08/4)
|
||||
#define ES_UART_STATUS (0x09/4)
|
||||
#define ES_UART_CTRL (0x09/4)
|
||||
#define ES_UART_RSVD (0x0A/4)
|
||||
#define ES_MEM_PAGE (0x0C/4)
|
||||
#define ES_UART_DATA (0x08/4)
|
||||
#define ES_UART_STATUS (0x09/4)
|
||||
#define ES_UART_CTRL (0x09/4)
|
||||
#define ES_UART_RSVD (0x0A/4)
|
||||
#define ES_MEM_PAGE (0x0C/4)
|
||||
#define ES_SRC_IF (0x10/4)
|
||||
#define ES_CODEC (0x14/4)
|
||||
#define ES_LEGACY (0x18/4)
|
||||
#define ES_CHAN_CTRL (0x1C/4)
|
||||
#define ES_CODEC (0x14/4)
|
||||
#define ES_LEGACY (0x18/4)
|
||||
#define ES_CHAN_CTRL (0x1C/4)
|
||||
#define ES_SERIAL_CTRL (0x20/4)
|
||||
#define ES_DAC1_CNT (0x24/4)
|
||||
#define ES_DAC2_CNT (0x28/4)
|
||||
#define ES_ADC_CNT (0x2C/4)
|
||||
#define ES_ADC_CNT (0x2C/4)
|
||||
#define ES_HOST_IF0 (0x30/4)
|
||||
#define ES_HOST_IF1 (0x34/4)
|
||||
#define ES_HOST_IF2 (0x38/4)
|
||||
#define ES_HOST_IF3 (0x3C/4)
|
||||
|
||||
struct frame_reg {
|
||||
UINT32 pci_addr;
|
||||
UINT16 curr_count;
|
||||
UINT16 buff_size;
|
||||
frame_reg() : pci_addr(0), curr_count(0), buff_size(0) {}
|
||||
// Interrupt/Chip Select Control Register (ES_INT_CS_CTRL) bits
|
||||
#define ICCTRL_ADC_STOP_MASK 0x00002000
|
||||
#define ICCTRL_DAC1_EN_MASK 0x00000040
|
||||
#define ICCTRL_DAC2_EN_MASK 0x00000020
|
||||
#define ICCTRL_ADC_EN_MASK 0x00000010
|
||||
#define ICCTRL_UART_EN_MASK 0x00000008
|
||||
#define ICCTRL_JYSTK_EN_MASK 0x00000004
|
||||
|
||||
// Interrupt/Chip Select Status Register (ES_INT_CS_STATUS) bits
|
||||
#define ICSTATUS_INTR_MASK 0x80000000
|
||||
#define ICSTATUS_DAC1_INT_MASK 0x00000004
|
||||
#define ICSTATUS_DAC2_INT_MASK 0x00000002
|
||||
#define ICSTATUS_ADC_INT_MASK 0x00000001
|
||||
|
||||
// Serial Interface Control Register (ES_SERIAL_CTRL) bits
|
||||
#define SCTRL_P2_END_MASK 0x00380000
|
||||
#define SCTRL_P2_START_MASK 0x00070000
|
||||
#define SCTRL_R1_LOOP_MASK 0x00008000
|
||||
#define SCTRL_P2_LOOP_MASK 0x00004000
|
||||
#define SCTRL_P1_LOOP_MASK 0x00002000
|
||||
#define SCTRL_P2_PAUSE_MASK 0x00001000
|
||||
#define SCTRL_P1_PAUSE_MASK 0x00000800
|
||||
#define SCTRL_R1_INT_EN_MASK 0x00000400
|
||||
#define SCTRL_P2_INT_EN_MASK 0x00000200
|
||||
#define SCTRL_P1_INT_EN_MASK 0x00000100
|
||||
#define SCTRL_P1_RELOAD_MASK 0x00000080
|
||||
#define SCTRL_P2_STOP_MASK 0x00000040
|
||||
#define SCTRL_R1_S_MASK 0x00000030
|
||||
#define SCTRL_P2_S_MASK 0x0000000C
|
||||
#define SCTRL_P1_S_MASK 0x00000003
|
||||
|
||||
#define ES_PCI_READ 0
|
||||
#define ES_PCI_WRITE 1
|
||||
|
||||
struct chan_info {
|
||||
bool enable;
|
||||
bool int_en;
|
||||
bool loop_en;
|
||||
bool initialized;
|
||||
UINT32 samp_size; // Size of one sample in log2(bytes)
|
||||
UINT32 buf_wptr; // Address to sample cache memory
|
||||
UINT32 buf_rptr; // Address to sample cache memory
|
||||
UINT16 buf_count; // Number of samples that have been played
|
||||
UINT16 buf_size; // Number of samples minus one to play
|
||||
UINT32 pci_addr; // PCI Addresss for system memory accesses
|
||||
UINT16 pci_count; // Number of 32 bits transfered
|
||||
UINT16 pci_size; // Total number of words (32 bits) minus one in system memory
|
||||
};
|
||||
|
||||
class es1373_device : public pci_device {
|
||||
public:
|
||||
es1373_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
virtual void map_extra(UINT64 memory_window_start, UINT64 memory_window_end, UINT64 memory_offset, address_space *memory_space,
|
||||
UINT64 io_window_start, UINT64 io_window_end, UINT64 io_offset, address_space *io_space);
|
||||
|
||||
void set_irq_info(const char *tag, const int irq_num);
|
||||
|
||||
DECLARE_READ32_MEMBER (reg_r);
|
||||
DECLARE_WRITE32_MEMBER(reg_w);
|
||||
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(es_timer_callback);
|
||||
// optional information overrides
|
||||
virtual machine_config_constructor device_mconfig_additions() const;
|
||||
protected:
|
||||
virtual void device_start();
|
||||
virtual void device_reset();
|
||||
address_space *m_memory_space;
|
||||
//virtual const address_space_config *memory_space_config(address_spacenum spacenum) const;
|
||||
|
||||
private:
|
||||
const char *m_cpu_tag;
|
||||
cpu_device *m_cpu;
|
||||
int m_irq_num;
|
||||
DECLARE_ADDRESS_MAP(map, 32);
|
||||
UINT16 m_ac97_regs[0x80];
|
||||
UINT32 m_es_regs[0x10];
|
||||
UINT32 m_sound_cache[0x40];
|
||||
UINT16 m_src_ram[0x80];
|
||||
frame_reg m_dac1_fr;
|
||||
frame_reg m_dac2_fr;
|
||||
frame_reg m_adc_fr;
|
||||
chan_info m_dac1;
|
||||
chan_info m_dac2;
|
||||
chan_info m_adc;
|
||||
void transfer_pci_audio(chan_info& chan, int type);
|
||||
|
||||
};
|
||||
|
||||
extern const device_type ES1373;
|
||||
|
@ -71,20 +71,6 @@ struct ssg_callbacks
|
||||
#define ym2612_update_req(chip) ym2612_update_request(chip);
|
||||
#endif /* (BUILD_YM2612||BUILD_YM3438) */
|
||||
|
||||
/* compiler dependence */
|
||||
#if 0
|
||||
#ifndef OSD_CPU_H
|
||||
#define OSD_CPU_H
|
||||
typedef unsigned char UINT8; /* unsigned 8bit */
|
||||
typedef unsigned short UINT16; /* unsigned 16bit */
|
||||
typedef unsigned int UINT32; /* unsigned 32bit */
|
||||
typedef signed char INT8; /* signed 8bit */
|
||||
typedef signed short INT16; /* signed 16bit */
|
||||
typedef signed int INT32; /* signed 32bit */
|
||||
#endif /* OSD_CPU_H */
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
typedef stream_sample_t FMSAMPLE;
|
||||
/*
|
||||
|
@ -42,7 +42,7 @@
|
||||
|
||||
6 ---------------- ---------------- ----------------
|
||||
|
||||
7 ---------------- ---------------- ----------------
|
||||
7 ---------------- ---------------- llllllllrrrrrrrr left/right volume
|
||||
|
||||
8 ---------------- ---------------- ---------------- (read only?)
|
||||
|
||||
@ -69,6 +69,7 @@
|
||||
|
||||
Some of the other ports on the HNG64 sound CPU may also be tied
|
||||
to this chip, this isn't yet clear.
|
||||
Port $8 bit 8 is keyon, low byte is sound status related (masked with 0x7f)
|
||||
|
||||
Sample data format TBA
|
||||
|
||||
@ -93,9 +94,10 @@ const device_type L7A1045 = &device_creator<l7a1045_sound_device>;
|
||||
l7a1045_sound_device::l7a1045_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: device_t(mconfig, L7A1045, "L7A1045 L6028 DSP-A", tag, owner, clock, "l7a1045_custom", __FILE__),
|
||||
device_sound_interface(mconfig, *this),
|
||||
m_stream(NULL)
|
||||
/*m_key(0),
|
||||
m_base(NULL)*/
|
||||
m_stream(NULL),
|
||||
m_key(0),
|
||||
m_rom(NULL),
|
||||
m_rom_size(0)
|
||||
{
|
||||
}
|
||||
|
||||
@ -107,7 +109,10 @@ l7a1045_sound_device::l7a1045_sound_device(const machine_config &mconfig, const
|
||||
void l7a1045_sound_device::device_start()
|
||||
{
|
||||
/* Allocate the stream */
|
||||
m_stream = stream_alloc(0, 2, clock() / 384);
|
||||
m_stream = stream_alloc(0, 2, 44100/4); //clock() / 384);
|
||||
|
||||
m_rom = m_region->base();
|
||||
m_rom_size = m_region->bytes();
|
||||
}
|
||||
|
||||
|
||||
@ -120,6 +125,44 @@ void l7a1045_sound_device::sound_stream_update(sound_stream &stream, stream_samp
|
||||
/* Clear the buffers */
|
||||
memset(outputs[0], 0, samples*sizeof(*outputs[0]));
|
||||
memset(outputs[1], 0, samples*sizeof(*outputs[1]));
|
||||
|
||||
for (int i = 0; i < 32; i++)
|
||||
{
|
||||
if (m_key & (1 << i))
|
||||
{
|
||||
l7a1045_voice *vptr = &m_voice[i];
|
||||
|
||||
UINT32 start = vptr->start;
|
||||
UINT32 end = vptr->start+0x002000;
|
||||
UINT32 step = 0x0400;
|
||||
|
||||
UINT32 pos = vptr->pos;
|
||||
UINT32 frac = vptr->frac;
|
||||
|
||||
for (int j = 0; j < samples; j++)
|
||||
{
|
||||
INT32 sample;
|
||||
|
||||
pos += 1;//(frac >> 12);
|
||||
frac &= 0xfff;
|
||||
|
||||
if ((start + pos) >= end)
|
||||
{
|
||||
m_key &= ~(1 << i);
|
||||
|
||||
}
|
||||
|
||||
sample = (INT8)m_rom[(start + pos) & (m_rom_size-1)];
|
||||
frac += step;
|
||||
|
||||
outputs[0][j] += ((sample * 0x8000) >> 8);
|
||||
outputs[1][j] += ((sample * 0x8000) >> 8);
|
||||
}
|
||||
|
||||
vptr->pos = pos;
|
||||
vptr->frac = frac;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -196,7 +239,7 @@ WRITE16_MEMBER(l7a1045_sound_device::l7a1045_sound_data_02_w) // upper? word of
|
||||
printf("%08x: unexpected write port 0x0002 register %02x chansel %02x data %04x (%04x%04x%04x)\n", space.device().safe_pc(), m_audioregister, m_audiochannel, data, m_audiodat[m_audioregister][m_audiochannel].dat[0], m_audiodat[m_audioregister][m_audiochannel].dat[1], m_audiodat[m_audioregister][m_audiochannel].dat[2]);
|
||||
break;
|
||||
|
||||
case 0x00:
|
||||
// case 0x00:
|
||||
case 0x01:
|
||||
case 0x04:
|
||||
case 0x06:
|
||||
@ -209,6 +252,23 @@ WRITE16_MEMBER(l7a1045_sound_device::l7a1045_sound_data_02_w) // upper? word of
|
||||
// printf("%08x: write port 0x0002 register %02x chansel %02x data %04x (%04x%04x%04x)\n", space.device().safe_pc(), m_audioregister, m_audiochannel, data, m_audiodat[m_audioregister][m_audiochannel].dat[0], m_audiodat[m_audioregister][m_audiochannel].dat[1], m_audiodat[m_audioregister][m_audiochannel].dat[2]);
|
||||
break;
|
||||
|
||||
case 0x00:
|
||||
// hack
|
||||
l7a1045_voice *vptr = &m_voice[m_audiochannel];
|
||||
|
||||
m_key |= 1 << m_audiochannel;
|
||||
|
||||
vptr->frac = 0;
|
||||
vptr->pos = 0;
|
||||
|
||||
vptr->start = (m_audiodat[0][m_audiochannel].dat[0] & 0x000f) << (16 + 4);
|
||||
vptr->start |= (m_audiodat[0][m_audiochannel].dat[1] & 0xffff) << (4);
|
||||
vptr->start |= (m_audiodat[0][m_audiochannel].dat[2] & 0xf000) >> (12);
|
||||
|
||||
vptr->start &= m_rom_size - 1;
|
||||
|
||||
//printf("%08x: REGISTER 00 write port 0x0002 chansel %02x data %04x (%04x%04x%04x)\n", space.device().safe_pc(), m_audiochannel, data, m_audiodat[m_audioregister][m_audiochannel].dat[0], m_audiodat[m_audioregister][m_audiochannel].dat[1], m_audiodat[m_audioregister][m_audiochannel].dat[2]);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
@ -231,7 +291,7 @@ WRITE16_MEMBER(l7a1045_sound_device::l7a1045_sound_data_04_w) // lower? word of
|
||||
printf("%08x: unexpected write port 0x0004 register %02x chansel %02x data %04x (%04x%04x%04x)\n", space.device().safe_pc(), m_audioregister, m_audiochannel, data, m_audiodat[m_audioregister][m_audiochannel].dat[0], m_audiodat[m_audioregister][m_audiochannel].dat[1], m_audiodat[m_audioregister][m_audiochannel].dat[2]);
|
||||
break;
|
||||
|
||||
case 0x00:
|
||||
// case 0x00:
|
||||
case 0x04:
|
||||
case 0x06:
|
||||
case 0x05:
|
||||
@ -243,6 +303,10 @@ WRITE16_MEMBER(l7a1045_sound_device::l7a1045_sound_data_04_w) // lower? word of
|
||||
case 0x0a:
|
||||
//printf("%08x: write port 0x0004 register %02x chansel %02x data %04x (%04x%04x%04x)\n", space.device().safe_pc(), m_audioregister, m_audiochannel, data, m_audiodat[m_audioregister][m_audiochannel].dat[0], m_audiodat[m_audioregister][m_audiochannel].dat[1], m_audiodat[m_audioregister][m_audiochannel].dat[2]);
|
||||
break;
|
||||
|
||||
case 0x00:
|
||||
//printf("%08x: REGISTER 00 write port 0x0004 chansel %02x data %04x (%04x%04x%04x)\n", space.device().safe_pc(), m_audiochannel, data, m_audiodat[m_audioregister][m_audiochannel].dat[0], m_audiodat[m_audioregister][m_audiochannel].dat[1], m_audiodat[m_audioregister][m_audiochannel].dat[2]);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
@ -268,11 +332,19 @@ WRITE16_MEMBER(l7a1045_sound_device::l7a1045_sound_data_06_w) // other part? of
|
||||
printf("%08x: unexpected write port 0x0006 register %02x chansel %02x data %04x (%04x%04x%04x)\n", space.device().safe_pc(), m_audioregister, m_audiochannel, data, m_audiodat[m_audioregister][m_audiochannel].dat[0], m_audiodat[m_audioregister][m_audiochannel].dat[1], m_audiodat[m_audioregister][m_audiochannel].dat[2]);
|
||||
break;
|
||||
|
||||
case 0x00:
|
||||
// case 0x00:
|
||||
case 0x01:
|
||||
//printf("%08x: unexpected write port 0x0006 register %02x chansel %02x data %04x (%04x%04x%04x)\n", space.device().safe_pc(), m_audioregister, m_audiochannel, data, m_audiodat[m_audioregister][m_audiochannel].dat[0], m_audiodat[m_audioregister][m_audiochannel].dat[1], m_audiodat[m_audioregister][m_audiochannel].dat[2]);
|
||||
break;
|
||||
|
||||
case 0x00:
|
||||
|
||||
// it writes 2 values here for each sample
|
||||
// the 2nd one seems to contain the upper 4 bits of the sample address
|
||||
// so why does it write different data first?
|
||||
//printf("%08x: REGISTER 00 write port 0x0006 chansel %02x data %04x (%04x%04x%04x)\n", space.device().safe_pc(), m_audiochannel, data, m_audiodat[m_audioregister][m_audiochannel].dat[0], m_audiodat[m_audioregister][m_audiochannel].dat[1], m_audiodat[m_audioregister][m_audiochannel].dat[2]);
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4,18 +4,18 @@
|
||||
|
||||
struct l7a1045_voice
|
||||
{
|
||||
/*
|
||||
l7a1045_voice() :
|
||||
pos(0),
|
||||
frac(0)
|
||||
{
|
||||
memset(regs, 0, sizeof(UINT32)*8);
|
||||
//memset(regs, 0, sizeof(UINT32)*8);
|
||||
start = 0;
|
||||
}
|
||||
|
||||
UINT32 regs[8];
|
||||
UINT32 start;
|
||||
UINT32 pos;
|
||||
UINT32 frac;
|
||||
*/
|
||||
|
||||
};
|
||||
|
||||
// ======================> l7a1045_sound_device
|
||||
@ -41,9 +41,10 @@ protected:
|
||||
|
||||
private:
|
||||
sound_stream *m_stream;
|
||||
// l7a1045_voice m_voice[32];
|
||||
// UINT16 m_key;
|
||||
// INT8* m_base;
|
||||
l7a1045_voice m_voice[32];
|
||||
UINT32 m_key;
|
||||
UINT8 *m_rom;
|
||||
INT32 m_rom_size;
|
||||
|
||||
UINT8 m_audiochannel;
|
||||
UINT8 m_audioregister;
|
||||
|
@ -122,8 +122,8 @@ void segapcm_device::sound_stream_update(sound_stream &stream, stream_sample_t *
|
||||
v = rom[(addr >> 8) & m_rom.mask()] - 0x80;
|
||||
|
||||
/* apply panning and advance */
|
||||
outputs[0][i] += v * regs[2];
|
||||
outputs[1][i] += v * regs[3];
|
||||
outputs[0][i] += v * (regs[2] & 0x7f);
|
||||
outputs[1][i] += v * (regs[3] & 0x7f);
|
||||
addr = (addr + regs[7]) & 0xffffff;
|
||||
}
|
||||
|
||||
|
@ -435,7 +435,7 @@ INLINE void rgbaint_bilinear_filter(rgbaint *color, rgb_t const &rgb00, rgb_t co
|
||||
}
|
||||
|
||||
// altivec.h somehow redefines "bool" in a bad way on PowerPC Mac OS X. really.
|
||||
#ifdef SDLMAME_MACOSX
|
||||
#ifdef OSX_PPC
|
||||
#undef vector
|
||||
#undef pixel
|
||||
#undef bool
|
||||
|
@ -94,11 +94,11 @@
|
||||
// select which one we will be using
|
||||
#if defined(__GNUC__)
|
||||
/* does not work in versions over 4.7.x of 32bit MINGW */
|
||||
#if ((defined(__MINGW32__) && !defined(__x86_64) && defined(__i386__) && (__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)))
|
||||
#if defined(__MINGW32__) && !defined(__x86_64) && defined(__i386__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)))
|
||||
#define USE_DELEGATE_TYPE DELEGATE_TYPE_COMPATIBLE
|
||||
#elif defined(SDLMAME_EMSCRIPTEN)
|
||||
#elif defined(EMSCRIPTEN)
|
||||
#define USE_DELEGATE_TYPE DELEGATE_TYPE_COMPATIBLE
|
||||
#elif defined(SDLMAME_ARM)
|
||||
#elif defined(__arm__) || defined(__ARMEL__)
|
||||
#define USE_DELEGATE_TYPE DELEGATE_TYPE_COMPATIBLE
|
||||
#else
|
||||
#define USE_DELEGATE_TYPE DELEGATE_TYPE_INTERNAL
|
||||
|
@ -194,7 +194,6 @@ WRITE16_MEMBER(hng64_state::hng64_sound_port_0008_w)
|
||||
// logerror("hng64_sound_port_0008_w %04x %04x\n", data, mem_mask);
|
||||
// seems to one or more of the DMARQ on the V53, writes here when it expects DMA channel 3 to transfer ~0x20 bytes just after startup
|
||||
|
||||
printf("transfer\n");
|
||||
m_audiocpu->dreq3_w(data&1);
|
||||
// m_audiocpu->hack_w(1);
|
||||
|
||||
|
@ -779,6 +779,18 @@ static INPUT_PORTS_START( berzerk )
|
||||
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
INPUT_PORTS_END
|
||||
|
||||
// this set has French speech roms, so default the language to French
|
||||
static INPUT_PORTS_START( berzerkf )
|
||||
PORT_INCLUDE( berzerk )
|
||||
|
||||
PORT_MODIFY("F3")
|
||||
PORT_DIPNAME( 0xc0, 0x80, DEF_STR( Language ) ) PORT_DIPLOCATION("F3:7,8")
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( English ) )
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( German ) )
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( French ) )
|
||||
PORT_DIPSETTING( 0xc0, DEF_STR( Spanish ) )
|
||||
INPUT_PORTS_END
|
||||
|
||||
// this set has German speech roms, so default the language to German
|
||||
static INPUT_PORTS_START( berzerkg )
|
||||
PORT_INCLUDE( berzerk )
|
||||
@ -1177,6 +1189,21 @@ ROM_START( berzerk1 )
|
||||
ROM_LOAD( "berzerk_r_vo_2c.2c", 0x0800, 0x0800, CRC(d2b6324e) SHA1(20a6611ad6ec19409ac138bdae7bdfaeab6c47cf) ) /* ditto */
|
||||
ROM_END
|
||||
|
||||
ROM_START( berzerkf )
|
||||
ROM_REGION( 0x10000, "maincpu", 0 )
|
||||
ROM_LOAD( "rc31f.1c", 0x0000, 0x0800, CRC(3ba6e56e) SHA1(f2b02dcdc3fe1de28cace39055a88f6aa0798fd1) )
|
||||
ROM_LOAD( "rc31f.1d", 0x1000, 0x0800, CRC(a1de2a3e) SHA1(86ac3717ec26aeb2632583a65de6a0c2e7ea7419) )
|
||||
ROM_LOAD( "rc31f.3d", 0x1800, 0x0800, CRC(bc31c478) SHA1(906d0acdee208a0bf714bd06be99321722b531c6) )
|
||||
ROM_LOAD( "rc31f.5d", 0x2000, 0x0800, CRC(316192b5) SHA1(50f4ba2b59423a48c1d51fc6e4d9ea098d6f3743) )
|
||||
ROM_LOAD( "rc31f.6d", 0x2800, 0x0800, CRC(cd51238c) SHA1(f0b65bdd1f225c151a93ea62812b4bb64969acac) )
|
||||
ROM_LOAD( "rc31f.5c", 0x3000, 0x0800, CRC(563b13b6) SHA1(f8d137cd26535efe92780560d2f69f12d3f0fa42) )
|
||||
ROM_FILL( 0x3800, 0x0800, 0xff )
|
||||
|
||||
ROM_REGION( 0x01000, "speech", 0 ) /* voice data */
|
||||
ROM_LOAD( "rvof.1c", 0x0000, 0x0800, CRC(d7bfaca2) SHA1(b8c22db0f6e86d90f3c2ac9ff9e9d0ccff314919) ) /* VSU-1000 board */
|
||||
ROM_LOAD( "rvof.2c", 0x0800, 0x0800, CRC(7bdc3573) SHA1(f346f0ac9813812f2e3fe68ebbf79151975babcb) ) /* ditto */
|
||||
ROM_END
|
||||
|
||||
ROM_START( berzerkg )
|
||||
ROM_REGION( 0x10000, "maincpu", 0 )
|
||||
ROM_LOAD( "cpu rom 00.1c", 0x0000, 0x0800, CRC(77923a9e) SHA1(3760800b7aa1245f2141897b2406f0f5af5a8d71) )
|
||||
@ -1250,8 +1277,9 @@ DRIVER_INIT_MEMBER(berzerk_state,moonwarp)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
GAME( 1980, berzerk, 0, berzerk, berzerk, driver_device, 0, ROT0, "Stern Electronics", "Berzerk (set 1)", 0 )
|
||||
GAME( 1980, berzerk1, berzerk, berzerk, berzerk, driver_device, 0, ROT0, "Stern Electronics", "Berzerk (set 2)", 0 )
|
||||
GAME( 1980, berzerkg, berzerk, berzerk, berzerkg, driver_device,0, ROT0, "Stern Electronics", "Berzerk (German Speech)", 0 )
|
||||
GAME( 1981, frenzy, 0, frenzy, frenzy, driver_device, 0, ROT0, "Stern Electronics", "Frenzy", 0 )
|
||||
GAME( 1981, moonwarp, 0, frenzy, moonwarp, berzerk_state,moonwarp, ROT0, "Stern Electronics", "Moon War (prototype on Frenzy hardware)", 0)
|
||||
GAME( 1980, berzerk, 0, berzerk, berzerk, driver_device, 0, ROT0, "Stern Electronics", "Berzerk (set 1)", 0 )
|
||||
GAME( 1980, berzerk1, berzerk, berzerk, berzerk, driver_device, 0, ROT0, "Stern Electronics", "Berzerk (set 2)", 0 )
|
||||
GAME( 1980, berzerkf, berzerk, berzerk, berzerkf, driver_device, 0, ROT0, "Stern Electronics", "Berzerk (French Speech)", 0 )
|
||||
GAME( 1980, berzerkg, berzerk, berzerk, berzerkg, driver_device, 0, ROT0, "Stern Electronics", "Berzerk (German Speech)", 0 )
|
||||
GAME( 1981, frenzy, 0, frenzy, frenzy, driver_device, 0, ROT0, "Stern Electronics", "Frenzy", 0 )
|
||||
GAME( 1981, moonwarp, 0, frenzy, moonwarp, berzerk_state, moonwarp, ROT0, "Stern Electronics", "Moon War (prototype on Frenzy hardware)", 0)
|
||||
|
@ -48,9 +48,9 @@ static ADDRESS_MAP_START( bigstrkb_map, AS_PROGRAM, 16, bigstrkb_state )
|
||||
|
||||
AM_RANGE(0x0D0000, 0x0dffff) AM_RAM // 0xd2000 - 0xd3fff? 0xd8000?
|
||||
|
||||
AM_RANGE(0x0e0000, 0x0e3fff) AM_RAM_WRITE(bsb_videoram2_w) AM_SHARE("videoram2")
|
||||
AM_RANGE(0x0e8000, 0x0ebfff) AM_RAM_WRITE(bsb_videoram3_w) AM_SHARE("videoram3")
|
||||
AM_RANGE(0x0ec000, 0x0effff) AM_RAM_WRITE(bsb_videoram_w) AM_SHARE("videoram")
|
||||
AM_RANGE(0x0e0000, 0x0e3fff) AM_RAM_WRITE(videoram2_w) AM_SHARE("videoram2")
|
||||
AM_RANGE(0x0e8000, 0x0ebfff) AM_RAM_WRITE(videoram3_w) AM_SHARE("videoram3")
|
||||
AM_RANGE(0x0ec000, 0x0effff) AM_RAM_WRITE(videoram_w) AM_SHARE("videoram")
|
||||
|
||||
AM_RANGE(0x0f0000, 0x0f7fff) AM_RAM
|
||||
AM_RANGE(0x0f8000, 0x0f87ff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette")
|
||||
@ -207,7 +207,7 @@ static MACHINE_CONFIG_START( bigstrkb, bigstrkb_state )
|
||||
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
|
||||
MCFG_SCREEN_SIZE(32*8, 32*8)
|
||||
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
|
||||
MCFG_SCREEN_UPDATE_DRIVER(bigstrkb_state, screen_update_bigstrkb)
|
||||
MCFG_SCREEN_UPDATE_DRIVER(bigstrkb_state, screen_update)
|
||||
MCFG_SCREEN_PALETTE("palette")
|
||||
|
||||
MCFG_PALETTE_ADD("palette", 0x400)
|
||||
@ -292,5 +292,5 @@ ROM_END
|
||||
|
||||
/* GAME drivers */
|
||||
|
||||
GAME( 1992, bigstrkb, bigstrik, bigstrkb, bigstrkb, driver_device, 0, ROT0, "bootleg", "Big Striker (bootleg)", GAME_IMPERFECT_SOUND | GAME_NO_COCKTAIL )
|
||||
GAME( 1992, bigstrkba,bigstrik, bigstrkb, bigstrkb, driver_device, 0, ROT0, "bootleg", "Big Striker (bootleg w/Italian teams)", GAME_IMPERFECT_SOUND | GAME_NO_COCKTAIL )
|
||||
GAME( 1992, bigstrkb, bigstrik, bigstrkb, bigstrkb, driver_device, 0, ROT0, "bootleg", "Big Striker (bootleg)", GAME_IMPERFECT_SOUND | GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE )
|
||||
GAME( 1992, bigstrkba,bigstrik, bigstrkb, bigstrkb, driver_device, 0, ROT0, "bootleg", "Big Striker (bootleg w/Italian teams)", GAME_IMPERFECT_SOUND | GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE )
|
||||
|
@ -5373,7 +5373,7 @@ ROM_START( mtwins )
|
||||
ROM_LOAD( "sou1", 0x0000, 0x0117, CRC(84f4b2fe) SHA1(dcc9e86cc36316fe42eace02d6df75d08bc8bb6d) )
|
||||
|
||||
ROM_REGION( 0x0200, "bboardplds", 0 )
|
||||
ROM_LOAD( "ck24b.1a", 0x0000, 0x0117, NO_DUMP )
|
||||
ROM_LOAD( "ck24b.1a", 0x0000, 0x0117, CRC(bd99c448) SHA1(2692c158f76769b0743103cc3a6d1c5d1f4f52ec) )
|
||||
ROM_LOAD( "iob1.11e", 0x0000, 0x0117, CRC(3abc0700) SHA1(973043aa46ec6d5d1db20dc9d5937005a0f9f6ae) )
|
||||
ROM_END
|
||||
|
||||
|
@ -809,6 +809,18 @@ ROM_START( dsmbl )
|
||||
ROM_LOAD16_WORD_SWAP( "u24", 0x400000, 0x400000, CRC(3b673326) SHA1(1ae847eb4e752fef1d72081d82344f0ad0537c31) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( dfkbl )
|
||||
ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF)
|
||||
ROM_LOAD16_WORD_SWAP( "u4", 0x000000, 0x400000, CRC(8092ca9d) SHA1(75e16cd7c8d0f9c715115ce12da5c245fbcd2416) ) /* (2010/1/18 BLACK LABEL) */
|
||||
|
||||
ROM_REGION( 0x8400000, "game", ROMREGION_ERASEFF)
|
||||
ROM_LOAD( "u2", 0x000000, 0x8400000, CRC(29f9d73a) SHA1(ed978ab5e3ad8c05e7778a91bfb5aaa17b0f72d9) )
|
||||
|
||||
ROM_REGION( 0x800000, "ymz770", ROMREGION_ERASEFF)
|
||||
ROM_LOAD16_WORD_SWAP( "u23", 0x000000, 0x400000, CRC(36d4093b) SHA1(4aed7e2f7c0d2c9bceeb110a9907d8d99d55f4c3) )
|
||||
ROM_LOAD16_WORD_SWAP( "u24", 0x400000, 0x400000, CRC(31f9eb0a) SHA1(322158779e969bb321241065dd49c1167b91ff6c) )
|
||||
ROM_END
|
||||
|
||||
|
||||
|
||||
READ64_MEMBER( cv1k_state::mushisam_speedup_r )
|
||||
@ -923,13 +935,13 @@ GAME( 2006, futari15, 0, cv1k, cv1k, cv1k_state, pinkswts, ROT270, "
|
||||
GAME( 2006, futari15a, futari15, cv1k, cv1k, cv1k_state, pinkswts, ROT270, "Cave (AMI license)", "Mushihime-Sama Futari Ver 1.5 (2006/12/8 MASTER VER 1.54)", 0 )
|
||||
GAME( 2006, futari10, futari15, cv1k, cv1k, cv1k_state, pinkswts, ROT270, "Cave (AMI license)", "Mushihime-Sama Futari Ver 1.0 (2006/10/23 MASTER VER.)", 0 )
|
||||
|
||||
// CA015B Mushihime-Sama Futari Black Label
|
||||
GAME( 2007, futaribl, 0, cv1k, cv1k, cv1k_state, pinkswts, ROT270, "Cave (AMI license)", "Mushihime-Sama Futari Black Label - Another Ver (2009/11/27 INTERNATIONAL BL)", 0 )
|
||||
GAME( 2007, futariblj, futaribl, cv1k, cv1k, cv1k_state, pinkswts, ROT270, "Cave (AMI license)", "Mushihime-Sama Futari Black Label (2007/12/11 BLACK LABEL VER)", 0 )
|
||||
|
||||
// CA016 Muchi Muchi Pork!
|
||||
GAME( 2007, mmpork, 0, cv1k, cv1k, cv1k_state, pinkswts, ROT270, "Cave (AMI license)", "Muchi Muchi Pork! (2007/ 4/17 MASTER VER.)", 0 )
|
||||
|
||||
// CA015B Mushihime-Sama Futari Black Label
|
||||
GAME( 2007, futaribl, 0, cv1k, cv1k, cv1k_state, pinkswts, ROT270, "Cave (AMI license)", "Mushihime-Sama Futari Black Label (2009/11/27 INTERNATIONAL BL)", 0 )
|
||||
GAME( 2007, futariblj, futaribl, cv1k, cv1k, cv1k_state, pinkswts, ROT270, "Cave (AMI license)", "Mushihime-Sama Futari Black Label (2007/12/11 BLACK LABEL VER)", 0 )
|
||||
|
||||
// CA017 Deathsmiles
|
||||
GAME( 2007, deathsml, 0, cv1k, cv1k, cv1k_state, deathsml, ROT0, "Cave (AMI license)", "Deathsmiles (2007/10/09 MASTER VER)", 0 )
|
||||
|
||||
@ -940,5 +952,8 @@ GAME( 2008, dsmbl, 0, cv1k_d, cv1k, cv1k_state, dpddfk, ROT0, "
|
||||
GAME( 2008, ddpdfk, 0, cv1k_d, cv1k, cv1k_state, dpddfk, ROT270, "Cave (AMI license)", "DoDonPachi Dai-Fukkatsu Ver 1.5 (2008/06/23 MASTER VER 1.5)", 0 )
|
||||
GAME( 2008, ddpdfk10, ddpdfk, cv1k_d, cv1k, cv1k_state, dpddfk, ROT270, "Cave (AMI license)", "DoDonPachi Dai-Fukkatsu Ver 1.0 (2008/05/16 MASTER VER)", 0 )
|
||||
|
||||
// CA019B Do-Don-Pachi Dai-Fukkatsu Black Label
|
||||
GAME( 2010, dfkbl, 0, cv1k_d, cv1k, cv1k_state, dpddfk, ROT270, "Cave (AMI license)", "DoDonPachi Dai-Fukkatsu Black Label (2010/1/18 BLACK LABEL)", 0 )
|
||||
|
||||
// CMDL01 Medal Mahjong Moukari Bancho
|
||||
GAME( 2007, mmmbanc, 0, cv1k, cv1k, cv1k_state, pinkswts, ROT0, "Cave (AMI license)", "Medal Mahjong Moukari Bancho (2007/06/05 MASTER VER.)", GAME_NOT_WORKING )
|
||||
|
@ -1196,7 +1196,7 @@ static INPUT_PORTS_START( cmv4_service )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Key Out / Attendant")
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings")
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats")
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats") // on some sets a DSW must be on/off to access this menu
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( cmv4_dsw1 )
|
||||
@ -3467,7 +3467,7 @@ static INPUT_PORTS_START( bingowng )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
INPUT_PORTS_END
|
||||
|
||||
INPUT_PORTS_START( bingownga )
|
||||
static INPUT_PORTS_START( bingownga )
|
||||
PORT_INCLUDE( bingowng )
|
||||
|
||||
PORT_MODIFY("DSW4")
|
||||
@ -3995,16 +3995,18 @@ static INPUT_PORTS_START( nfb96 )
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( Yes ) )
|
||||
INPUT_PORTS_END
|
||||
|
||||
/* Displays tkt info on screen but has no settings or hopper controls */
|
||||
|
||||
/* Displays tkt info on screen but has no settings or hopper controls other than "Ticket Out By" DSW */
|
||||
/* All marked as "Unknown" until a manual or more information is found */
|
||||
static INPUT_PORTS_START( nfb96tx )
|
||||
PORT_START("IN0")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) // unused coin switch
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused coin switch */
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SLOT_STOP_ALL ) PORT_NAME("Stop All / Big")
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SLOT_STOP1 ) PORT_NAME("Stop 1 / D-UP")
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SLOT_STOP3 ) PORT_NAME("Stop 3 / Take / Select Card")
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_NAME("Play (Bet)")
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SLOT_STOP2 ) PORT_NAME("Stop 2 / Small")
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SLOT_STOP2 ) PORT_NAME("Stop 2 / Small / Info")
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Start")
|
||||
|
||||
PORT_START("IN1")
|
||||
@ -4014,15 +4016,15 @@ static INPUT_PORTS_START( nfb96tx )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) PORT_NAME("Ticket In")
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) /* Key In shows in test mode but not used by game */
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused keyin? - causes counter errors */
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2)
|
||||
|
||||
PORT_START("IN2")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused coin switch */
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused coin switch */
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Key Out / Attendant")
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused keyout? */
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings")
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats")
|
||||
@ -4071,7 +4073,7 @@ static INPUT_PORTS_START( nfb96tx )
|
||||
PORT_DIPSETTING( 0x28, "125" )
|
||||
PORT_DIPSETTING( 0x30, "250" )
|
||||
PORT_DIPSETTING( 0x38, "500" )
|
||||
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW2:7") /* unknown */
|
||||
PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW2:7") /* unknown */
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x80, 0x00, "WARNING: Always Off" ) PORT_DIPLOCATION("DSW2:8") /* Listed that way in other manuals */
|
||||
@ -4079,91 +4081,80 @@ static INPUT_PORTS_START( nfb96tx )
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
|
||||
|
||||
PORT_START("DSW3")
|
||||
PORT_DIPNAME( 0x03, 0x02, "Minimum Play to Start" ) PORT_DIPLOCATION("DSW3:1,2") /* OK */
|
||||
PORT_DIPNAME( 0x03, 0x00, "Minimum Play to Start" ) PORT_DIPLOCATION("DSW3:1,2") /* OK */
|
||||
PORT_DIPSETTING( 0x00, "1" )
|
||||
PORT_DIPSETTING( 0x01, "8" )
|
||||
PORT_DIPSETTING( 0x02, "16" )
|
||||
PORT_DIPSETTING( 0x03, "24" )
|
||||
PORT_DIPNAME( 0x0c, 0x08, "Max Coin In & Note In Points" ) PORT_DIPLOCATION("DSW3:3,4") /* OK */
|
||||
PORT_DIPNAME( 0x0c, 0x08, "Coin In Limit" ) PORT_DIPLOCATION("DSW3:3,4") /* OK */
|
||||
PORT_DIPSETTING( 0x00, "1000" )
|
||||
PORT_DIPSETTING( 0x04, "5000" )
|
||||
PORT_DIPSETTING( 0x08, "10000" )
|
||||
PORT_DIPSETTING( 0x0c, "90000" )
|
||||
PORT_DIPNAME( 0xf0, 0x00, "Clear / Ticket Unit" ) PORT_DIPLOCATION("DSW3:5,6,7,8") /* OK */
|
||||
PORT_DIPSETTING( 0x00, "1" )
|
||||
PORT_DIPSETTING( 0x10, "4" )
|
||||
PORT_DIPSETTING( 0x20, "5" )
|
||||
PORT_DIPSETTING( 0x30, "10" )
|
||||
PORT_DIPSETTING( 0x40, "15" )
|
||||
PORT_DIPSETTING( 0x50, "20" )
|
||||
PORT_DIPSETTING( 0x60, "25" )
|
||||
PORT_DIPSETTING( 0x70, "30" )
|
||||
PORT_DIPSETTING( 0x80, "40" )
|
||||
PORT_DIPSETTING( 0x90, "50" )
|
||||
PORT_DIPSETTING( 0xa0, "60" )
|
||||
PORT_DIPSETTING( 0xb0, "75" )
|
||||
PORT_DIPSETTING( 0xc0, "80" )
|
||||
PORT_DIPSETTING( 0xd0, "100" )
|
||||
PORT_DIPSETTING( 0xe0, "200" )
|
||||
PORT_DIPSETTING( 0xf0, "500" )
|
||||
PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW3:5") /* unknown */
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW3:6") /* unknown */
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW3:7") /* unknown */
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW3:8") /* unknown */
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
|
||||
|
||||
PORT_START("DSW4")
|
||||
PORT_DIPNAME( 0x01, 0x01, "Check Account" ) PORT_DIPLOCATION("DSW4:1") /* OK */
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( Yes ) )
|
||||
PORT_DIPNAME( 0x02, 0x00, "Show In Confirm Screen" ) PORT_DIPLOCATION("DSW4:2") /* OK */
|
||||
PORT_DIPSETTING( 0x00, "Level of Difficulty" ) /* percentage in the manual */
|
||||
PORT_DIPSETTING( 0x02, "Percentage" ) /* level of difficulty in the manual */
|
||||
PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW4:2") /* unknown */
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x04, 0x00, "Initial Bonus Settings After Reset" ) PORT_DIPLOCATION("DSW4:3") /* OK (need a reset after change) */
|
||||
PORT_DIPSETTING( 0x00, "Type 1" )
|
||||
PORT_DIPSETTING( 0x04, "Type 2" )
|
||||
PORT_DIPNAME( 0x08, 0x08, "Bonus Accumulation" ) PORT_DIPLOCATION("DSW4:4") /* OK (need a reset after change) */
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( Yes ) )
|
||||
PORT_DIPNAME( 0x10, 0x10, "Auto Ticket Dispense" ) PORT_DIPLOCATION("DSW4:5") /* OK (need a reset after change) */
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( Yes ) )
|
||||
PORT_DIPNAME( 0xe0, 0xe0, "Ticket Dispense Mode" ) PORT_DIPLOCATION("DSW4:6,7,8") /* OK */
|
||||
PORT_DIPSETTING( 0xe0, "Continuous" )
|
||||
PORT_DIPSETTING( 0xc0, "Max 1 Ticket Per Game" )
|
||||
PORT_DIPSETTING( 0xa0, "Max 2 Ticket Per Game" )
|
||||
PORT_DIPSETTING( 0x80, "Max 3 Ticket Per Game" )
|
||||
PORT_DIPSETTING( 0x60, "Max 4 Ticket Per Game" )
|
||||
PORT_DIPSETTING( 0x40, "Max 5 Ticket Per Game" )
|
||||
PORT_DIPSETTING( 0x20, "Max 8 Ticket Per Game" )
|
||||
PORT_DIPSETTING( 0x00, "Max 10 Ticket Per Game" )
|
||||
PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW4:5") /* unknown */
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW4:6") /* unknown */
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW4:7") /* unknown */
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW4:8") /* unknown */
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
|
||||
|
||||
PORT_START("DSW5")
|
||||
PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unused ) ) PORT_DIPLOCATION("DSW5:1") /* OK */
|
||||
PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unused ) ) PORT_DIPLOCATION("DSW5:1") /* OK */
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x02, 0x00, "Limit Score of Each Game to Max 10x Bet or $5.00" ) PORT_DIPLOCATION("DSW5:2") /* OK */
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( No ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10)
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( Yes ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10)
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Unused ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00)
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( Unused ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00)
|
||||
PORT_DIPNAME( 0x04, 0x00, "Use Printer" ) PORT_DIPLOCATION("DSW5:3") /* OK */
|
||||
PORT_DIPSETTING( 0x00, "Interfase" )
|
||||
PORT_DIPSETTING( 0x04, "Direct Driver" )
|
||||
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW5:4") /* OK */
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW5:5") /* OK */
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x20, 0x20, "Play Score when no point left" ) PORT_DIPLOCATION("DSW5:6") /* OK (turn the machine off/on after change) */
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( No ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10)
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10)
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( Unused ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00)
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Unused ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00)
|
||||
PORT_DIPNAME( 0x40, 0x00, "Reset Remaining Score when Game Over" ) PORT_DIPLOCATION("DSW5:7") /* OK (turn the machine off/on after change) */
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( No ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10)
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x10)
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( Unused ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00)
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Unused ) ) PORT_CONDITION("DSW4",0x10,EQUALS,0x00)
|
||||
PORT_DIPNAME( 0x80, 0x00, "Advanced Count Game" ) PORT_DIPLOCATION("DSW5:8") /* OK (turn the machine off/on after change) */
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( Yes ) )
|
||||
PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW5:2") /* unknown */
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x04, 0x00, "Ticket Out By" ) PORT_DIPLOCATION("DSW5:3") /* OK */
|
||||
PORT_DIPSETTING( 0x00, "Interface" )
|
||||
PORT_DIPSETTING( 0x04, "Direct Drive" )
|
||||
PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW5:4") /* unknown */
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW5:5") /* unknown */
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW5:6") /* unknown */
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW5:7") /* unknown */
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW5:8") /* unknown */
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( roypok96 )
|
||||
@ -4690,10 +4681,10 @@ static INPUT_PORTS_START( nfb96bl )
|
||||
PORT_DIPSETTING( 0xc0, "32" )
|
||||
|
||||
PORT_START("DSW2")
|
||||
PORT_DIPNAME( 0x01, 0x01, "Double-Up Game" ) PORT_DIPLOCATION("DSW2:1") /* OK */
|
||||
PORT_DIPNAME( 0x01, 0x01, "Double-Up Game" ) PORT_DIPLOCATION("DSW2:1") /* OK */
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( Yes ) )
|
||||
PORT_DIPNAME( 0x02, 0x02, "Skill Spinning" ) PORT_DIPLOCATION("DSW2:2") /* OK */
|
||||
PORT_DIPNAME( 0x02, 0x02, "Skill Spinning" ) PORT_DIPLOCATION("DSW2:2") /* OK */
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( Yes ) )
|
||||
PORT_DIPNAME( 0x1c, 0x10, "Coin In" ) PORT_DIPLOCATION("DSW2:3,4,5") /* OK */
|
||||
@ -4705,12 +4696,12 @@ static INPUT_PORTS_START( nfb96bl )
|
||||
PORT_DIPSETTING( 0x14, "1 Coin/20 Credits" )
|
||||
PORT_DIPSETTING( 0x18, "1 Coin/25 Credits" )
|
||||
PORT_DIPSETTING( 0x1c, "1 Coin/100 Credits" )
|
||||
PORT_DIPNAME( 0x60, 0x00, "Note In Value" ) PORT_DIPLOCATION("DSW2:6,7") /* OK */
|
||||
PORT_DIPNAME( 0x60, 0x00, "Note In Value" ) PORT_DIPLOCATION("DSW2:6,7") /* OK */
|
||||
PORT_DIPSETTING( 0x00, "100" )
|
||||
PORT_DIPSETTING( 0x20, "200" )
|
||||
PORT_DIPSETTING( 0x40, "500" )
|
||||
PORT_DIPSETTING( 0x60, "1000" )
|
||||
PORT_DIPNAME( 0x80, 0x00, "WARNING: Always Off" ) PORT_DIPLOCATION("DSW2:8") /* Listed that way in the manual */
|
||||
PORT_DIPNAME( 0x80, 0x00, "WARNING: Always Off" ) PORT_DIPLOCATION("DSW2:8") /* Listed that way in the manual */
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
|
||||
|
||||
@ -4720,7 +4711,7 @@ static INPUT_PORTS_START( nfb96bl )
|
||||
PORT_DIPSETTING( 0x01, "8" )
|
||||
PORT_DIPSETTING( 0x02, "16" )
|
||||
PORT_DIPSETTING( 0x03, "24" )
|
||||
PORT_DIPNAME( 0x0c, 0x08, "Max Coin In & Note In Point" ) PORT_DIPLOCATION("DSW3:3,4") /* OK */
|
||||
PORT_DIPNAME( 0x0c, 0x08, "Max Coin In & Note In Points" ) PORT_DIPLOCATION("DSW3:3,4") /* OK */
|
||||
PORT_DIPSETTING( 0x00, "1000" )
|
||||
PORT_DIPSETTING( 0x04, "5000" )
|
||||
PORT_DIPSETTING( 0x08, "10000" )
|
||||
@ -4744,35 +4735,57 @@ static INPUT_PORTS_START( nfb96bl )
|
||||
PORT_DIPSETTING( 0xf0, "500" )
|
||||
|
||||
PORT_START("DSW4")
|
||||
PORT_DIPNAME( 0x01, 0x01, "Check Account" ) PORT_DIPLOCATION("DSW4:1") /* OK */
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( Yes ) )
|
||||
PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW4:2") /* unknown */
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x04, 0x00, "Initial Bonus Settings After Reset" ) PORT_DIPLOCATION("DSW4:3") /* not checked */
|
||||
PORT_DIPNAME( 0x01, 0x01, "Check Account" ) PORT_DIPLOCATION("DSW4:1") /* OK */
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( No ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
|
||||
PORT_DIPNAME( 0x02, 0x00, "Show Coin In Limit On Screen" ) PORT_DIPLOCATION("DSW4:2") /* OK */
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
|
||||
PORT_DIPNAME( 0x04, 0x00, "Initial Bonus Settings After Reset" ) PORT_DIPLOCATION("DSW4:3") /* OK (need a reset after change) */
|
||||
PORT_DIPSETTING( 0x00, "Type 1" )
|
||||
PORT_DIPSETTING( 0x04, "Type 2" )
|
||||
PORT_DIPNAME( 0x08, 0x08, "Bonus Accumulation" ) PORT_DIPLOCATION("DSW4:4") /* not checked */
|
||||
PORT_DIPNAME( 0x08, 0x08, "Bonus Accumulation" ) PORT_DIPLOCATION("DSW4:4") /* OK (need a reset after change) */
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( Yes ) )
|
||||
PORT_DIPNAME( 0x10, 0x10, "Auto Ticket Dispense" ) PORT_DIPLOCATION("DSW4:5") /* not checked */
|
||||
PORT_DIPNAME( 0x10, 0x10, "Auto Ticket Dispense" ) PORT_DIPLOCATION("DSW4:5") /* OK (need a reset after change) */
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( Yes ) )
|
||||
PORT_DIPNAME( 0xe0, 0xe0, "Ticket Dispense Mode" ) PORT_DIPLOCATION("DSW4:6,7,8") /* OK */
|
||||
PORT_DIPSETTING( 0xe0, "Continuous" )
|
||||
PORT_DIPSETTING( 0xc0, "Max 1 Ticket Per Game" )
|
||||
PORT_DIPSETTING( 0xa0, "Max 2 Ticket Per Game" )
|
||||
PORT_DIPSETTING( 0x80, "Max 3 Ticket Per Game" )
|
||||
PORT_DIPSETTING( 0x60, "Max 4 Ticket Per Game" )
|
||||
PORT_DIPSETTING( 0x40, "Max 5 Ticket Per Game" )
|
||||
PORT_DIPSETTING( 0x20, "Max 8 Ticket Per Game" )
|
||||
PORT_DIPSETTING( 0x00, "Max 10 Ticket Per Game" )
|
||||
PORT_DIPNAME( 0x60, 0x00, "Ticket Dispense Mode" ) PORT_DIPLOCATION("DSW4:6,7") /* OK */
|
||||
PORT_DIPSETTING( 0x60, "Continuous" )
|
||||
PORT_DIPSETTING( 0x40, "Max 1 Ticket Per Game" )
|
||||
PORT_DIPSETTING( 0x20, "Max 5 Tickets Per Game" )
|
||||
PORT_DIPSETTING( 0x00, "Max 10 Tickets Per Game" )
|
||||
PORT_DIPNAME( 0x80, 0x00, "Show In Confirm Screen" ) PORT_DIPLOCATION("DSW4:8") /* OK */
|
||||
PORT_DIPSETTING( 0x00, "Level of Difficulty" )
|
||||
PORT_DIPSETTING( 0x80, "Percentage" )
|
||||
|
||||
PORT_START("DSW5")
|
||||
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
INPUT_PORTS_END
|
||||
|
||||
/* no manual - similiar to nfb96 sets */
|
||||
static INPUT_PORTS_START( nfm )
|
||||
PORT_INCLUDE( nfb96bl )
|
||||
|
||||
PORT_MODIFY( "IN2")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* tied to hopper somehow? fill/empty switch? */
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* display ticket value? */
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Key Out / Attendant")
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* keyin? tied to ticket clear value */
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings")
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats") /* DSW4-1 must be on to access account menu */
|
||||
|
||||
PORT_MODIFY( "DSW2" )
|
||||
PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW2:2") /* unknown */
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x80, 0x00, "Spin Length" ) PORT_DIPLOCATION("DSW2:8") /* OK */
|
||||
PORT_DIPSETTING( 0x00, "Long" )
|
||||
PORT_DIPSETTING( 0x80, "Short" )
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
static INPUT_PORTS_START( unkch_controls )
|
||||
PORT_START("IN0")
|
||||
@ -13135,7 +13148,7 @@ GAME( 1996, nfb96seb, nfb96, amcoe2, nfb96bl, driver_device, 0,
|
||||
GAME( 2002, carb2002, nfb96, amcoe2, nfb96bl, driver_device, 0, ROT0, "bootleg", "Carriage Bonus 2002 (bootleg)", GAME_WRONG_COLORS )
|
||||
GAME( 2003, carb2003, nfb96, amcoe2, nfb96bl, driver_device, 0, ROT0, "bootleg", "Carriage Bonus 2003 (bootleg)", GAME_WRONG_COLORS )
|
||||
|
||||
GAME( 2003, nfm, 0, nfm, nfb96bl, driver_device, 0, ROT0, "Ming-Yang Electronic", "New Fruit Machine (Ming-Yang Electronic)", GAME_NOT_WORKING ) // vFB02-07A "Copyright By Ms. Liu Orchis 2003/03/06"
|
||||
GAME( 2003, nfm, 0, nfm, nfm, driver_device, 0, ROT0, "Ming-Yang Electronic", "New Fruit Machine (Ming-Yang Electronic)", GAME_NOT_WORKING ) // vFB02-07A "Copyright By Ms. Liu Orchis 2003/03/06"
|
||||
|
||||
// these have 'cherry 1994' in the program roms, but also "Super Cherry / New Cherry Gold '99" probably hacks of a 1994 version of Cherry Bonus / Cherry Master (Super Cherry Master?)
|
||||
GAMEL(1999, unkch1, 0, unkch, unkch, unkch_state, unkch1, ROT0, "bootleg", "New Cherry Gold '99 (bootleg of Super Cherry Master) (set 1)", 0, layout_unkch )
|
||||
|
@ -132,7 +132,7 @@ PCB Layout (Bottom)
|
||||
| CONN10 |
|
||||
| |
|
||||
| |
|
||||
| PSRAM4 ASIC9 SRAM4 CPU1 Y1 |
|
||||
| PSRAM4 ASIC9 SRAM4 CPU2 Y1 |
|
||||
| PSRAM3 SRAM1 SRAM3 |
|
||||
| SRAM2 |
|
||||
| |
|
||||
@ -167,7 +167,7 @@ No. PCB Label IC Markings IC Package
|
||||
16 SRAM2 TC55257DFL-85L SOP28
|
||||
17 SRAM3 TC551001BFL-70L SOP32
|
||||
18 SRAM4 TC551001BFL-70L SOP32
|
||||
19 Y1 D320L7 XTAL
|
||||
19 Y1 D320L7 XTAL (32MHz)
|
||||
|
||||
|
||||
INTERFACE PCB
|
||||
@ -948,8 +948,8 @@ WRITE16_MEMBER(hng64_state::main_sound_comms_w)
|
||||
COMBINE_DATA(&main_latch[1]);
|
||||
break;
|
||||
case 0x08:
|
||||
m_audiocpu->set_input_line(5, ASSERT_LINE);
|
||||
if(data != 1)
|
||||
m_audiocpu->set_input_line(5, (data & 1) ? ASSERT_LINE : CLEAR_LINE);
|
||||
if(data & 0xfe)
|
||||
printf("IRQ send %02x?\n",data);
|
||||
break;
|
||||
default:
|
||||
@ -1040,8 +1040,8 @@ static INPUT_PORTS_START( hng64 )
|
||||
|
||||
PORT_START("SYSTEM")
|
||||
PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x00010000, IP_ACTIVE_HIGH, IPT_COIN1 )
|
||||
PORT_BIT( 0x00020000, IP_ACTIVE_HIGH, IPT_COIN2 )
|
||||
PORT_BIT( 0x00010000, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1)
|
||||
PORT_BIT( 0x00020000, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_IMPULSE(1)
|
||||
PORT_BIT( 0x00040000, IP_ACTIVE_HIGH, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x00080000, IP_ACTIVE_HIGH, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x00100000, IP_ACTIVE_HIGH, IPT_UNKNOWN )
|
||||
@ -1234,9 +1234,9 @@ static INPUT_PORTS_START( bbust2 )
|
||||
|
||||
PORT_START("D_IN")
|
||||
PORT_BIT( 0x000000ff, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x00000100, IP_ACTIVE_HIGH, IPT_COIN1 )
|
||||
PORT_BIT( 0x00000200, IP_ACTIVE_HIGH, IPT_COIN2 )
|
||||
PORT_BIT( 0x00000400, IP_ACTIVE_HIGH, IPT_COIN3 )
|
||||
PORT_BIT( 0x00000100, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1)
|
||||
PORT_BIT( 0x00000200, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_IMPULSE(1)
|
||||
PORT_BIT( 0x00000400, IP_ACTIVE_HIGH, IPT_COIN3 ) PORT_IMPULSE(1)
|
||||
PORT_BIT( 0x00000800, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x00001000, IP_ACTIVE_HIGH, IPT_SERVICE1 )
|
||||
PORT_BIT( 0x00002000, IP_ACTIVE_HIGH, IPT_SERVICE2 )
|
||||
@ -1616,7 +1616,7 @@ ROM_START( hng64 )
|
||||
ROM_REGION( 0x4000, "sprtile", ROMREGION_ERASEFF )
|
||||
ROM_REGION( 0x1000000, "textures", ROMREGION_ERASEFF )
|
||||
ROM_REGION16_BE( 0x0c00000, "verts", ROMREGION_ERASEFF )
|
||||
ROM_REGION( 0x1000000, "samples", ROMREGION_ERASEFF ) /* Sound Samples */
|
||||
ROM_REGION( 0x1000000, "l7a1045", ROMREGION_ERASEFF ) /* Sound Samples */
|
||||
ROM_END
|
||||
|
||||
|
||||
@ -1667,7 +1667,7 @@ ROM_START( roadedge )
|
||||
ROMX_LOAD( "001vt02a.18", 0x0000002, 0x400000, CRC(449f94d0) SHA1(2228690532d82d2661285aeb4260689b027597cb), ROM_GROUPWORD | ROM_SKIP(4) )
|
||||
ROMX_LOAD( "001vt03a.19", 0x0000004, 0x400000, CRC(50ac8639) SHA1(dd2d3689466990a7c479bb8f11bd930ea45e47b5), ROM_GROUPWORD | ROM_SKIP(4) )
|
||||
|
||||
ROM_REGION( 0x1000000, "samples", 0 ) /* Sound Samples */
|
||||
ROM_REGION( 0x1000000, "l7a1045", 0 ) /* Sound Samples */
|
||||
ROM_LOAD( "001sd01a.77", 0x0000000, 0x400000, CRC(a851da99) SHA1(2ba24feddafc5fadec155cdb7af305fdffcf6690) )
|
||||
ROM_LOAD( "001sd02a.78", 0x0400000, 0x400000, CRC(ca5cec15) SHA1(05e91a602728a048d61bf86aa8d43bb4186aeac1) )
|
||||
ROM_END
|
||||
@ -1721,7 +1721,7 @@ ROM_START( sams64 )
|
||||
ROMX_LOAD( "002-vt05a.21", 0x0c00002, 0x400000, CRC(d32ee9cb) SHA1(a768dfc15899924eb05eccbf8e85cb29c7b60396), ROM_GROUPWORD | ROM_SKIP(4) )
|
||||
ROMX_LOAD( "002-vt06a.22", 0x0c00004, 0x400000, CRC(13bf3636) SHA1(7c704bf66b571350207bccc7a2d6ed1ec9de4cd5), ROM_GROUPWORD | ROM_SKIP(4) )
|
||||
|
||||
ROM_REGION( 0x1000000, "samples", 0 ) /* Sound Samples */
|
||||
ROM_REGION( 0x1000000, "l7a1045", 0 ) /* Sound Samples */
|
||||
ROM_LOAD( "002-sd01a.77", 0x0000000, 0x400000, CRC(6215036b) SHA1(ded71dce98b7f7ef78ef32d966a292bbf0d15332) )
|
||||
ROM_LOAD( "002-sd02a.78", 0x0400000, 0x400000, CRC(32b28310) SHA1(5b80750a66c12b035b493d06e3842741a3334d0f) )
|
||||
ROM_LOAD( "002-sd03a.79", 0x0800000, 0x400000, CRC(53591413) SHA1(36c7efa1aced0ca38b3ce7b95af28755973698f3) )
|
||||
@ -1763,7 +1763,7 @@ ROM_START( xrally )
|
||||
ROMX_LOAD( "003-vt02a.18", 0x0000002, 0x400000, CRC(da7b956e) SHA1(c57cbb8c51145ae224faba5b6a1a7e61cb2bee64), ROM_GROUPWORD | ROM_SKIP(4) )
|
||||
ROMX_LOAD( "003-vt03a.19", 0x0000004, 0x400000, CRC(4fe72cb7) SHA1(9f8e662f0656f201924834d1ee78498d4223745e), ROM_GROUPWORD | ROM_SKIP(4) )
|
||||
|
||||
ROM_REGION( 0x1000000, "samples", 0 ) /* Sound Samples */
|
||||
ROM_REGION( 0x1000000, "l7a1045", 0 ) /* Sound Samples */
|
||||
ROM_LOAD( "003-sd01a.77", 0x0000000, 0x400000, CRC(c43898ff) SHA1(0e49b87181b56c62a674d255d326f761942b99b1) )
|
||||
ROM_LOAD( "003-sd02a.78", 0x0400000, 0x400000, CRC(079a3d5a) SHA1(a97b052de69fee7d605cae30f5a228e6ffeabb26) )
|
||||
ROM_LOAD( "003-sd03a.79", 0x0800000, 0x400000, CRC(96c0991a) SHA1(01be872b3e307258236fe96a544417dd8a0bc8bd) )
|
||||
@ -1811,7 +1811,7 @@ ROM_START( bbust2 )
|
||||
ROMX_LOAD( "004-vt02a.18", 0x0000002, 0x400000, CRC(279fc216) SHA1(eb90cc347745491c1d1b1fb611fd6e227310731c), ROM_GROUPWORD | ROM_SKIP(4) )
|
||||
ROMX_LOAD( "004-vt03a.19", 0x0000004, 0x400000, CRC(e0cf6a42) SHA1(dd09b3d05739cf030c820cd7dbaea2e7262764ab), ROM_GROUPWORD | ROM_SKIP(4) )
|
||||
|
||||
ROM_REGION( 0x1000000, "samples", 0 ) /* Sound Samples */
|
||||
ROM_REGION( 0x1000000, "l7a1045", 0 ) /* Sound Samples */
|
||||
ROM_LOAD( "004-sd01a.77", 0x0000000, 0x400000, CRC(2ef868bd) SHA1(0a1ef002efe6738698ebe98a1c3695b151fdd282) )
|
||||
ROM_LOAD( "004-sd02a.78", 0x0400000, 0x400000, CRC(07fb3135) SHA1(56cc8e29ba9b13f82a4c9248bff02e2b7a0c49b0) )
|
||||
ROM_LOAD( "004-sd03a.79", 0x0800000, 0x400000, CRC(42571f1d) SHA1(425cbd3f7c8aea1c0f057ea8f186acffb0091dc0) )
|
||||
@ -1882,7 +1882,7 @@ ROM_START( sams64_2 )
|
||||
ROMX_LOAD( "005vt05a.21", 0x0c00002, 0x400000, CRC(49c82bec) SHA1(09255279edb9a204bbe1cce8cef58d5c81e86d1f), ROM_GROUPWORD | ROM_SKIP(4) )
|
||||
ROMX_LOAD( "005vt06a.22", 0x0c00004, 0x400000, CRC(7ba05b6c) SHA1(729c1d182d74998dd904b587a2405f55af9825e0), ROM_GROUPWORD | ROM_SKIP(4) )
|
||||
|
||||
ROM_REGION( 0x1000000, "samples", 0 ) /* Sound Samples */
|
||||
ROM_REGION( 0x1000000, "l7a1045", 0 ) /* Sound Samples */
|
||||
ROM_LOAD( "005sd01a.77", 0x0000000, 0x400000, CRC(8f68150f) SHA1(a1e5efdfd1ed29f81e25c8da669851ddb7b0c826) )
|
||||
ROM_LOAD( "005sd02a.78", 0x0400000, 0x400000, CRC(6b4da6a0) SHA1(8606c413c129635bdaaa37254edbfd19b10426bb) )
|
||||
ROM_LOAD( "005sd03a.79", 0x0800000, 0x400000, CRC(a529fab3) SHA1(8559d402c8f66f638590b8b57ec9efa775010c96) )
|
||||
@ -1947,7 +1947,7 @@ ROM_START( fatfurwa )
|
||||
ROMX_LOAD( "006vt02a.18", 0x0000002, 0x400000, CRC(150eb717) SHA1(9acb067346eb386256047c0f1d24dc8fcc2118ca), ROM_GROUPWORD | ROM_SKIP(4) )
|
||||
ROMX_LOAD( "006vt03a.19", 0x0000004, 0x400000, CRC(021cfcaf) SHA1(fb8b5f50d3490b31f0a4c3e6d3ae1b98bae41c97), ROM_GROUPWORD | ROM_SKIP(4) )
|
||||
|
||||
ROM_REGION( 0x1000000, "samples", 0 ) /* Sound Samples */
|
||||
ROM_REGION( 0x1000000, "l7a1045", 0 ) /* Sound Samples */
|
||||
ROM_LOAD( "006sd01a.77", 0x0000000, 0x400000, CRC(790efb6d) SHA1(23ddd3ee8ae808e58cbcaf92a9ef56d3ca6289b5) )
|
||||
ROM_LOAD( "006sd02a.78", 0x0400000, 0x400000, CRC(f7f020c7) SHA1(b72fde4ff6384b80166a3cb67d31bf7afda750bc) )
|
||||
ROM_LOAD( "006sd03a.79", 0x0800000, 0x400000, CRC(1a678084) SHA1(f52efb6145102d289f332d8341d89a5d231ba003) )
|
||||
@ -2014,7 +2014,7 @@ ROM_START( buriki )
|
||||
ROMX_LOAD( "007vt02a.18", 0x0000002, 0x400000, CRC(f365f608) SHA1(035fd9b829b7720c4aee6fdf204c080e6157994f), ROM_GROUPWORD | ROM_SKIP(4) )
|
||||
ROMX_LOAD( "007vt03a.19", 0x0000004, 0x400000, CRC(ba05654d) SHA1(b7fe532732c0af7860c8eded3c5abd304d74e08e), ROM_GROUPWORD | ROM_SKIP(4) )
|
||||
|
||||
ROM_REGION( 0x1000000, "samples", 0 ) /* Sound Samples */
|
||||
ROM_REGION( 0x1000000, "l7a1045", 0 ) /* Sound Samples */
|
||||
ROM_LOAD( "007sd01a.77", 0x0000000, 0x400000, CRC(1afb48c6) SHA1(b072d4fe72d6c5267864818d300b32e85b426213) )
|
||||
ROM_LOAD( "007sd02a.78", 0x0400000, 0x400000, CRC(c65f1dd5) SHA1(7f504c585a10c1090dbd1ac31a3a0db920c992a0) )
|
||||
ROM_LOAD( "007sd03a.79", 0x0800000, 0x400000, CRC(356f25c8) SHA1(5250865900894232960686f40c5da35b3868b78c) )
|
||||
|
@ -135,6 +135,7 @@ static MACHINE_CONFIG_START( gtfore, iteagle_state )
|
||||
MCFG_ITEAGLE_FPGA_ADD( ":pci:06.0")
|
||||
MCFG_ITEAGLE_IDE_ADD( ":pci:06.1")
|
||||
MCFG_ES1373_ADD( ":pci:07.0")
|
||||
MCFG_ES1373_IRQ_ADD( ":maincpu", MIPS3_IRQ3)
|
||||
MCFG_VOODOO_ADD( ":pci:09.0")
|
||||
MCFG_ITEAGLE_EEPROM_ADD( ":pci:0a.0")
|
||||
|
||||
@ -161,7 +162,43 @@ static INPUT_PORTS_START( iteagle )
|
||||
PORT_DIPSETTING(0x1, "Medium" )
|
||||
PORT_DIPSETTING(0x0, "Low" )
|
||||
PORT_DIPSETTING(0x2, "Low_Alt" )
|
||||
PORT_DIPNAME( 0xC, 0x0, "Always" )
|
||||
|
||||
PORT_START("SW51")
|
||||
PORT_DIPNAME( 0x3, 0x0, "Mode" )
|
||||
PORT_DIPSETTING(0x0, "Normal" )
|
||||
PORT_DIPSETTING(0x1, "Operator" )
|
||||
|
||||
PORT_START("IN1")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_START1 )
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME( "Left" )
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME( "Right" )
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME( "Fly By" )
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME( "Backspin" )
|
||||
PORT_BIT( 0x00c0, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_COIN2 )
|
||||
PORT_BIT( 0xfe00, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
|
||||
PORT_START("SYSTEM")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_SERVICE )
|
||||
PORT_SERVICE_NO_TOGGLE( 0x0002, IP_ACTIVE_HIGH )
|
||||
PORT_BIT( 0x00fc, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_VOLUME_UP )
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_VOLUME_DOWN )
|
||||
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BILL1 )
|
||||
PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x3000, IP_ACTIVE_HIGH, IPT_UNKNOWN )
|
||||
PORT_DIPNAME( 0xC000, 0xC000, "Voltage" )
|
||||
PORT_DIPSETTING(0xC000, "OK" )
|
||||
PORT_DIPSETTING(0x8000, "Low" )
|
||||
PORT_DIPSETTING(0x4000, "High" )
|
||||
PORT_DIPSETTING(0x0000, "Not Detected" )
|
||||
|
||||
PORT_START("TRACKX1")
|
||||
PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(25) PORT_KEYDELTA(32) PORT_REVERSE PORT_PLAYER(1)
|
||||
|
||||
PORT_START("TRACKY1")
|
||||
PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(25) PORT_KEYDELTA(32) PORT_PLAYER(1)
|
||||
|
||||
PORT_START("VERSION")
|
||||
PORT_DIPNAME( 0x0F00, 0x0000, "GAME" )
|
||||
@ -243,12 +280,11 @@ INPUT_PORTS_END
|
||||
ROM_LOAD( "17s20lpc_sb4.u26", 0x000000, 0x008000, CRC(62c4af8a) SHA1(6eca277b9c66a401990599e98fdca64a9e38cc9a) ) \
|
||||
ROM_LOAD( "17s20lpc_sb5.u26", 0x008000, 0x008000, CRC(c88b9d42) SHA1(b912d0fc50ecdc6a198c626f6e1644e8405fac6e) ) \
|
||||
ROM_LOAD( "17s50a_red1.u26", 0x010000, 0x020000, CRC(f5cf3187) SHA1(83b4a14de9959e5a776d97d424945d43501bda7f) ) \
|
||||
ROM_REGION( 0x80, "eeprom", 0 ) \
|
||||
ROM_COPY( "fpga", 0x0, 0x0, 0x80 ) \
|
||||
ROM_REGION( 0x2000, "pals", 0 ) \
|
||||
ROM_LOAD( "e2-card1.u22.jed", 0x000000, 0x000bd1, CRC(9d1e1ace) SHA1(287d6a30e9f32137ef4eba54f0effa092c97a6eb) ) \
|
||||
ROM_LOAD( "e2-res3.u117.jed", 0x001000, 0x000bd1, CRC(4f1ff45a) SHA1(213cbdd6cd37ad9b5bfc9545084892a68d29f5ff) )
|
||||
|
||||
|
||||
ROM_START( iteagle )
|
||||
EAGLE_BIOS
|
||||
|
||||
|
@ -146,10 +146,10 @@ Super PE+
|
||||
XMP00002 through XMP00006 & XMP00024 Use the XM000xxP Multi-Poker Data
|
||||
XMP00014, XMP00017 & XMP00030 Use the WING Board add-on and use the XnnnnnnP Poker Data (Not all are compatible!)
|
||||
XMP00013, XMP00022 & XMP00026 Use the WING Board add-on & CG2346 + CAPX2346 for Spanish paytables
|
||||
XMP00025 Uses the Wing Board add-on and is for the International markets. Auto Hold always enabled.
|
||||
XMP00025 Uses the XM000xxP Multi-Poker Data roms and is for the International markets. Auto Hold always enabled.
|
||||
XMnnnnnP Multi-Poker Data. Contains poker games + paytable percentages: Requires specific CG graphics + CAP color prom
|
||||
XKnnnnnn Spot Keno Programs. Different options for each set, but all use the same XnnnnnnK data roms
|
||||
XnnnnnnK Spot Keno Data. Uses CG2120 with CAP1267
|
||||
XnnnnnnK Spot Keno Data. Uses CG2120 with CAPX1267
|
||||
XSnnnnnn Slot Programs. Different options for each set, but all use the same XnnnnnnS data roms
|
||||
XnnnnnnT Tournament Slot Programs? Different options for each set, but all use the same XnnnnnnS data roms
|
||||
XnnnnnnS Slot Data. Each set requires specific CG graphics + CAP color prom
|
||||
@ -9723,9 +9723,9 @@ GAMEL(1995, pex0053p, 0, peplus, peplus_poker, peplus_state, peplussb,
|
||||
GAMEL(1995, pex0054p, 0, peplus, peplus_poker, peplus_state, peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (X000054P+XP000038) Deuces Wild Poker", 0, layout_pe_poker )
|
||||
GAMEL(1995, pex0055p, 0, peplus, peplus_poker, peplus_state, peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (X000055P+XP000019) Deuces Wild Poker", 0, layout_pe_poker )
|
||||
GAMEL(1995, pex0055pa, pex0055p, peplus, peplus_poker, peplus_state, peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (X000055P+XP000022) Deuces Wild Poker (The Orleans)", 0, layout_pe_poker )
|
||||
GAMEL(1995, pex0055pb, pex0055p, peplus, peplus_poker, peplus_state, peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (X000055P+XP000023) Deuces Wild Poker (The Fun Ships)", GAME_WRONG_COLORS, layout_pe_poker ) /* CAP2399 not dumped */
|
||||
GAMEL(1995, pex0055pb, pex0055p, peplus, peplus_poker, peplus_state, peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (X000055P+XP000023) Deuces Wild Poker (The Fun Ships)", GAME_WRONG_COLORS, layout_pe_poker ) /* CAPX2399 not dumped */
|
||||
GAMEL(1995, pex0055pc, pex0055p, peplus, peplus_poker, peplus_state, peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (X000055P+XP000028) Deuces Wild Poker (Horseshoe)", 0, layout_pe_poker )
|
||||
GAMEL(1995, pex0055pd, pex0055p, peplus, peplus_poker, peplus_state, peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (X000055P+XP000035) Deuces Wild Poker (The Wild Wild West Casino)", GAME_WRONG_COLORS, layout_pe_poker ) /* CAP2389 not dumped */
|
||||
GAMEL(1995, pex0055pd, pex0055p, peplus, peplus_poker, peplus_state, peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (X000055P+XP000035) Deuces Wild Poker (The Wild Wild West Casino)", GAME_WRONG_COLORS, layout_pe_poker ) /* CAPX2389 not dumped */
|
||||
GAMEL(1995, pex0055pe, pex0055p, peplus, peplus_poker, peplus_state, peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (X000055P+XP000038) Deuces Wild Poker", 0, layout_pe_poker )
|
||||
GAMEL(1995, pex0055pf, pex0055p, peplus, peplus_poker, peplus_state, peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (X000055P+XP000040) Deuces Wild Poker", 0, layout_pe_poker )
|
||||
GAMEL(1995, pex0055pg, pex0055p, peplus, peplus_poker, peplus_state, peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (X000055P+XP000053) Deuces Wild Poker", 0, layout_pe_poker )
|
||||
@ -9821,8 +9821,8 @@ GAMEL(1995, pex2251p, 0, peplus, peplus_poker, peplus_state, peplussb,
|
||||
GAMEL(1995, pex2272p, 0, peplus, peplus_poker, peplus_state, peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (X002272P+XP000055) Black Jack Bonus Poker", 0, layout_pe_poker )
|
||||
GAMEL(1995, pex2275p, 0, peplus, peplus_poker, peplus_state, peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (X002275P+XP000055) Black Jack Bonus Poker", 0, layout_pe_poker )
|
||||
GAMEL(1995, pex2276p, 0, peplus, peplus_poker, peplus_state, peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (X002276P+XP000055) Black Jack Bonus Poker", 0, layout_pe_poker )
|
||||
GAMEL(1995, pex2283p, 0, peplus, peplus_poker, peplus_state, peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (X002283P+XP000057) Dealt Deuces Wild Bonus Poker", 0, layout_pe_poker ) /* Undumped color CAP but should have correct colors anyways */
|
||||
GAMEL(1995, pex2284p, 0, peplus, peplus_poker, peplus_state, peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (X002284P+XP000057) Barbaric Decues Wild Bonus Poker", 0, layout_pe_poker ) /* Undumped color CAP but should have correct colors anyways */
|
||||
GAMEL(1995, pex2283p, 0, peplus, peplus_poker, peplus_state, peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (X002283P+XP000057) Dealt Deuces Wild Bonus Poker", 0, layout_pe_poker ) /* Undumped color CAPX but should have correct colors anyways */
|
||||
GAMEL(1995, pex2284p, 0, peplus, peplus_poker, peplus_state, peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (X002284P+XP000057) Barbaric Decues Wild Bonus Poker", 0, layout_pe_poker ) /* Undumped color CAPX but should have correct colors anyways */
|
||||
GAMEL(1995, pex2302p, 0, peplus, peplus_poker, peplus_state, peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (X002302P+XP000038) Bonus Poker Deluxe", 0, layout_pe_poker )
|
||||
GAMEL(1995, pex2303p, 0, peplus, peplus_poker, peplus_state, peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (X002303P+XP000112) White Hot Aces Poker", 0, layout_pe_poker )
|
||||
GAMEL(1995, pex2306p, 0, peplus, peplus_poker, peplus_state, peplussb, ROT0, "IGT - International Game Technology", "Player's Edge Plus (X002306P+XP000112) Triple Double Bonus Poker", 0, layout_pe_poker )
|
||||
|
@ -1044,6 +1044,14 @@ WRITE8_MEMBER(vicdual_state::invds_io_w)
|
||||
if (offset & 0x40) vicdual_palette_bank_w(space, 0, data);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(vicdual_state::carhntds_io_w)
|
||||
{
|
||||
if (offset & 0x01) { /* invinco_audio_w(space, 0, data); */ }
|
||||
if (offset & 0x02) { /* deepscan_audio_w(0, data) */ }
|
||||
if (offset & 0x08) assert_coin_status();
|
||||
if (offset & 0x40) vicdual_palette_bank_w(space, 0, data);
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER(vicdual_state::sspacaho_io_w)
|
||||
{
|
||||
@ -1115,12 +1123,18 @@ WRITE8_MEMBER(vicdual_state::alphaho_io_w)
|
||||
|
||||
|
||||
static ADDRESS_MAP_START( vicdual_dualgame_map, AS_PROGRAM, 8, vicdual_state )
|
||||
AM_RANGE(0x0000, 0x3fff) AM_MIRROR(0x4000) AM_ROM
|
||||
AM_RANGE(0x0000, 0x3fff) AM_MIRROR(0x4000) AM_ROM
|
||||
AM_RANGE(0x8000, 0x83ff) AM_MIRROR(0x7000) AM_RAM_WRITE(vicdual_videoram_w) AM_SHARE("videoram")
|
||||
AM_RANGE(0x8400, 0x87ff) AM_MIRROR(0x7000) AM_RAM
|
||||
AM_RANGE(0x8800, 0x8fff) AM_MIRROR(0x7000) AM_RAM_WRITE(vicdual_characterram_w) AM_SHARE("characterram")
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( carhntds_dualgame_map, AS_PROGRAM, 8, vicdual_state )
|
||||
AM_RANGE(0x0000, 0x7fff) AM_ROM // also has part of a rom mapped at 0x4000
|
||||
AM_RANGE(0x8000, 0x83ff) AM_MIRROR(0x7000) AM_RAM_WRITE(vicdual_videoram_w) AM_SHARE("videoram")
|
||||
AM_RANGE(0x8400, 0x87ff) AM_MIRROR(0x7000) AM_RAM
|
||||
AM_RANGE(0x8800, 0x8fff) AM_MIRROR(0x7000) AM_RAM_WRITE(vicdual_characterram_w) AM_SHARE("characterram")
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( invho2_io_map, AS_IO, 8, vicdual_state )
|
||||
ADDRESS_MAP_GLOBAL_MASK(0x7f)
|
||||
@ -1149,6 +1163,18 @@ static ADDRESS_MAP_START( invds_io_map, AS_IO, 8, vicdual_state )
|
||||
AM_RANGE(0x00, 0x7f) AM_WRITE(invds_io_w)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( carhntds_io_map, AS_IO, 8, vicdual_state )
|
||||
ADDRESS_MAP_GLOBAL_MASK(0x7f)
|
||||
|
||||
AM_RANGE(0x00, 0x00) AM_MIRROR(0x7c) AM_READ_PORT("IN0")
|
||||
AM_RANGE(0x01, 0x01) AM_MIRROR(0x7c) AM_READ_PORT("IN1")
|
||||
AM_RANGE(0x02, 0x02) AM_MIRROR(0x7c) AM_READ_PORT("IN2")
|
||||
AM_RANGE(0x03, 0x03) AM_MIRROR(0x7c) AM_READ_PORT("IN3")
|
||||
|
||||
/* no decoder, just logic gates, so in theory the
|
||||
game can write to multiple locations at once */
|
||||
AM_RANGE(0x00, 0x7f) AM_WRITE(carhntds_io_w)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( sspacaho_io_map, AS_IO, 8, vicdual_state )
|
||||
ADDRESS_MAP_GLOBAL_MASK(0x7f)
|
||||
@ -1339,6 +1365,63 @@ static INPUT_PORTS_START( invho2 )
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
static INPUT_PORTS_START( carhntds )
|
||||
PORT_START("IN0")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_fake_lives_r, (void *)0x001)
|
||||
PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:5") // SW1 @ C1, 6-pos (is #6 unconnected?)
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_4WAY PORT_NAME("P1 Up / Fire Left") // it's UP on Car Hunt but Fire Left on Deep Scan, what was it on the control panel??
|
||||
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("IN1")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_fake_lives_r, (void *)0x002)
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_get_composite_blank_comp, NULL)
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY
|
||||
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("IN2")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_fake_lives_r, (void *)0x101)
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_get_timer_value, NULL)
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 )
|
||||
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("IN3")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_fake_lives_r, (void *)0x102)
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_read_coin_status, NULL)
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Game Select") PORT_TOGGLE
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
|
||||
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_COIN_DEFAULT
|
||||
|
||||
PORT_START("FAKE_LIVES1")
|
||||
PORT_DIPNAME( 0x03, 0x01, "Car Hunt Lives" ) PORT_DIPLOCATION("SW1:1,2")
|
||||
PORT_DIPSETTING( 0x03, "1" )
|
||||
PORT_DIPSETTING( 0x02, "2" )
|
||||
PORT_DIPSETTING( 0x01, "3" )
|
||||
PORT_DIPSETTING( 0x00, "4" )
|
||||
|
||||
PORT_START("FAKE_LIVES2")
|
||||
PORT_DIPNAME( 0x03, 0x03, "Deep Scan Lives" ) PORT_DIPLOCATION("SW1:3,4")
|
||||
PORT_DIPSETTING( 0x02, "1" )
|
||||
PORT_DIPSETTING( 0x01, "2" )
|
||||
PORT_DIPSETTING( 0x00, "3" )
|
||||
PORT_DIPSETTING( 0x03, "4" )
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
static INPUT_PORTS_START( invds )
|
||||
PORT_START("IN0")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
|
||||
@ -1883,6 +1966,7 @@ static MACHINE_CONFIG_DERIVED( vicdual_dualgame_root, vicdual_root )
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
|
||||
static MACHINE_CONFIG_DERIVED( invho2, vicdual_dualgame_root )
|
||||
|
||||
/* basic machine hardware */
|
||||
@ -1896,6 +1980,7 @@ static MACHINE_CONFIG_DERIVED( invho2, vicdual_dualgame_root )
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
|
||||
static MACHINE_CONFIG_DERIVED( invds, vicdual_dualgame_root )
|
||||
|
||||
/* basic machine hardware */
|
||||
@ -1907,6 +1992,13 @@ static MACHINE_CONFIG_DERIVED( invds, vicdual_dualgame_root )
|
||||
MCFG_FRAGMENT_ADD(invinco_audio)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
static MACHINE_CONFIG_DERIVED( carhntds, vicdual_dualgame_root )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_MODIFY("maincpu")
|
||||
MCFG_CPU_PROGRAM_MAP(carhntds_dualgame_map)
|
||||
MCFG_CPU_IO_MAP(carhntds_io_map)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
static MACHINE_CONFIG_DERIVED( sspacaho, vicdual_dualgame_root )
|
||||
|
||||
@ -2985,6 +3077,30 @@ ROM_START( invds )
|
||||
ROM_LOAD( "316-0206.u14", 0x0000, 0x0020, CRC(9617d796) SHA1(7cff2741866095ff42eadd8022bea349ec8d2f39) ) /* control PROM */
|
||||
ROM_END
|
||||
|
||||
ROM_START( carhntds )
|
||||
ROM_REGION( 0x10000, "maincpu", 0 )
|
||||
ROM_LOAD( "epr617.u33", 0x0000, 0x0400, CRC(0bbfdb4e) SHA1(383599276923264602a0b5efeac9697d9c15a20f) )
|
||||
ROM_CONTINUE(0x4000, 0x400)
|
||||
ROM_LOAD( "epr618.u32", 0x0400, 0x0400, CRC(5a080b1d) SHA1(3c3d6b8b16d9a8976ee63435e949b67f025e38d8) )
|
||||
ROM_LOAD( "epr619.u31", 0x0800, 0x0400, CRC(c6f2f399) SHA1(4bb34816042ec352b0bb71d2d654ebb6fb5083e9) )
|
||||
ROM_LOAD( "epr620.u30", 0x0c00, 0x0400, CRC(d9deb88f) SHA1(a863f29cfed782c8871a2268aa28a67ccced1b45) )
|
||||
ROM_LOAD( "epr621.u29", 0x1000, 0x0400, CRC(43e5de5c) SHA1(3adff5042be73f4693cee7977c88f425e930532d) )
|
||||
ROM_LOAD( "epr622.u28", 0x1400, 0x0400, CRC(c881a3bc) SHA1(fbff24c4075103fd686cfb376b08cf0677522222) )
|
||||
ROM_LOAD( "epr623.u27", 0x1800, 0x0400, CRC(297e7f42) SHA1(9e1042fe96f3bf55228b759b905467eff814ad84) )
|
||||
ROM_LOAD( "epr624.u26", 0x1c00, 0x0400, CRC(dc943125) SHA1(39f18e29cc3d03ee1b98a969f739e22dfd76b6f7) )
|
||||
ROM_LOAD( "epr625.u8", 0x2000, 0x0400, CRC(c86a0842) SHA1(5c59fe64985936b847a4c033a805153f627b1883) )
|
||||
ROM_LOAD( "epr626.u7", 0x2400, 0x0400, CRC(9a48c939) SHA1(2c898810f6fd97d4a6edb97236aaa29d08f5598a) )
|
||||
ROM_LOAD( "epr627.u6", 0x2800, 0x0400, CRC(b4b147e2) SHA1(8880f80708711b253f5da352679820500680ebab) )
|
||||
ROM_LOAD( "epr628.u5", 0x2c00, 0x0400, CRC(aecf3c26) SHA1(2f4419c6ccf03042cf32a415160e41d52fd0ef9c) )
|
||||
ROM_LOAD( "epr629.u4", 0x3000, 0x0400, CRC(c5be665b) SHA1(8bb145c140afa6166f08881b7e820335c3f83c08) )
|
||||
ROM_LOAD( "epr630.u3", 0x3400, 0x0400, CRC(4312388b) SHA1(d0b53d505276754651d2aeda4b17f2d600f65166) )
|
||||
ROM_LOAD( "epr631.u2", 0x3800, 0x0400, CRC(6766c7e5) SHA1(05b0ac31894c3c80d3940206aac2ef21a96ff849) )
|
||||
ROM_LOAD( "epr632.u1", 0x3c00, 0x0400, CRC(ae68b7d5) SHA1(de449b62ba39331a4ecf3dfe81511b21b7c881d5) )
|
||||
|
||||
ROM_REGION( 0x0020, "proms", 0 )
|
||||
ROM_LOAD( "316.0390.u49", 0x0000, 0x0020, CRC(a0811288) SHA1(a6e78c26f7eeb70125eee715eb6a3e3c82ed7fc8) ) /* color PROM */
|
||||
ROM_END
|
||||
|
||||
ROM_START( tranqgun )
|
||||
ROM_REGION( 0x10000, "maincpu", 0 )
|
||||
ROM_LOAD( "u33.bin", 0x0000, 0x0400, CRC(6d50e902) SHA1(1d14c0b28cb3650bb57b9ef61265fe94c453d648) )
|
||||
@ -3517,6 +3633,7 @@ GAME( 1980, nsub, 0, nsub, nsub, driver_device, 0, ROT270
|
||||
GAME( 1980, samurai, 0, samurai, samurai, driver_device, 0, ROT270, "Sega", "Samurai", GAME_NO_SOUND )
|
||||
GAME( 1979, invinco, 0, invinco, invinco, driver_device, 0, ROT270, "Sega", "Invinco", GAME_IMPERFECT_SOUND )
|
||||
GAME( 1979, invds, 0, invds, invds, driver_device, 0, ROT270, "Sega", "Invinco / Deep Scan", GAME_IMPERFECT_SOUND )
|
||||
GAME( 1979, carhntds, 0, carhntds, carhntds, driver_device, 0, ROT270, "Sega", "Car Hunt / Deep Scan (France)", GAME_NO_SOUND )
|
||||
GAME( 1980, tranqgun, 0, tranqgun, tranqgun, driver_device, 0, ROT270, "Sega", "Tranquilizer Gun", GAME_NO_SOUND )
|
||||
GAME( 1980, spacetrk, 0, spacetrk, spacetrk, driver_device, 0, ROT270, "Sega", "Space Trek (upright)", GAME_NO_SOUND )
|
||||
GAME( 1980, spacetrkc, spacetrk, spacetrk, spacetrkc, driver_device, 0, ROT270, "Sega", "Space Trek (cocktail)", GAME_NO_SOUND )
|
||||
|
@ -105,29 +105,32 @@ public:
|
||||
tilemap_t *m_text_tilemap;
|
||||
tilemap_t *m_starfield_tilemap;
|
||||
UINT8 m_regs[0x28];
|
||||
DECLARE_WRITE8_MEMBER(warpspeed_hardware_w);
|
||||
DECLARE_WRITE8_MEMBER(warpspeed_vidram_w);
|
||||
DECLARE_DRIVER_INIT(warpspeed);
|
||||
TILE_GET_INFO_MEMBER(get_warpspeed_text_tile_info);
|
||||
TILE_GET_INFO_MEMBER(get_warpspeed_starfield_tile_info);
|
||||
|
||||
DECLARE_WRITE8_MEMBER(hardware_w);
|
||||
DECLARE_WRITE8_MEMBER(vidram_w);
|
||||
|
||||
TILE_GET_INFO_MEMBER(get_text_tile_info);
|
||||
TILE_GET_INFO_MEMBER(get_starfield_tile_info);
|
||||
|
||||
virtual void video_start();
|
||||
DECLARE_PALETTE_INIT(warpspeed);
|
||||
UINT32 screen_update_warpspeed(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
|
||||
UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void draw_circles(bitmap_ind16 &bitmap);
|
||||
};
|
||||
|
||||
WRITE8_MEMBER(warpspeed_state::warpspeed_hardware_w)
|
||||
WRITE8_MEMBER(warpspeed_state::hardware_w)
|
||||
{
|
||||
m_regs[offset] = data;
|
||||
}
|
||||
|
||||
TILE_GET_INFO_MEMBER(warpspeed_state::get_warpspeed_text_tile_info)
|
||||
TILE_GET_INFO_MEMBER(warpspeed_state::get_text_tile_info)
|
||||
{
|
||||
UINT8 code = m_videoram[tile_index] & 0x3f;
|
||||
SET_TILE_INFO_MEMBER(0, code, 0, 0);
|
||||
}
|
||||
|
||||
TILE_GET_INFO_MEMBER(warpspeed_state::get_warpspeed_starfield_tile_info)
|
||||
TILE_GET_INFO_MEMBER(warpspeed_state::get_starfield_tile_info)
|
||||
{
|
||||
UINT8 code = 0x3f;
|
||||
if ( tile_index & 1 )
|
||||
@ -137,7 +140,7 @@ TILE_GET_INFO_MEMBER(warpspeed_state::get_warpspeed_starfield_tile_info)
|
||||
SET_TILE_INFO_MEMBER(1, code, 0, 0);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(warpspeed_state::warpspeed_vidram_w)
|
||||
WRITE8_MEMBER(warpspeed_state::vidram_w)
|
||||
{
|
||||
m_videoram[offset] = data;
|
||||
m_text_tilemap->mark_tile_dirty(offset);
|
||||
@ -145,10 +148,12 @@ WRITE8_MEMBER(warpspeed_state::warpspeed_vidram_w)
|
||||
|
||||
void warpspeed_state::video_start()
|
||||
{
|
||||
m_text_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(warpspeed_state::get_warpspeed_text_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
|
||||
m_text_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(warpspeed_state::get_text_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
|
||||
m_text_tilemap->set_transparent_pen(0);
|
||||
m_starfield_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(warpspeed_state::get_warpspeed_starfield_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
|
||||
m_starfield_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(warpspeed_state::get_starfield_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
|
||||
m_starfield_tilemap->mark_all_dirty();
|
||||
|
||||
save_item(NAME(m_regs));
|
||||
}
|
||||
|
||||
static void draw_circle_line(bitmap_ind16 &bitmap, int x, int y, int l, int color)
|
||||
@ -170,7 +175,7 @@ static void draw_circle_line(bitmap_ind16 &bitmap, int x, int y, int l, int colo
|
||||
}
|
||||
}
|
||||
|
||||
static void warpspeed_draw_circle(bitmap_ind16 &bitmap, INT16 cx, INT16 cy, UINT16 radius, UINT8 color )
|
||||
static void draw_circle(bitmap_ind16 &bitmap, INT16 cx, INT16 cy, UINT16 radius, UINT8 color )
|
||||
{
|
||||
/* Bresenham's circle algorithm */
|
||||
|
||||
@ -210,11 +215,11 @@ void warpspeed_state::draw_circles(bitmap_ind16 &bitmap)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
warpspeed_draw_circle(bitmap, midx + 128 + 16, midy + 128 + 16, radius, (m_regs[i*8 + 6] & 0x07) + 2);
|
||||
draw_circle(bitmap, midx + 128 + 16, midy + 128 + 16, radius, (m_regs[i*8 + 6] & 0x07) + 2);
|
||||
}
|
||||
}
|
||||
|
||||
UINT32 warpspeed_state::screen_update_warpspeed(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
UINT32 warpspeed_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
m_starfield_tilemap->draw(screen, bitmap, cliprect, 0, 0);
|
||||
draw_circles(bitmap);
|
||||
@ -224,7 +229,7 @@ UINT32 warpspeed_state::screen_update_warpspeed(screen_device &screen, bitmap_in
|
||||
|
||||
static ADDRESS_MAP_START( warpspeed_map, AS_PROGRAM, 8, warpspeed_state )
|
||||
AM_RANGE(0x0000, 0x0dff) AM_ROM
|
||||
AM_RANGE(0x1800, 0x1bff) AM_RAM_WRITE(warpspeed_vidram_w ) AM_SHARE("videoram")
|
||||
AM_RANGE(0x1800, 0x1bff) AM_RAM_WRITE(vidram_w ) AM_SHARE("videoram")
|
||||
AM_RANGE(0x1c00, 0x1cff) AM_RAM AM_SHARE("workram")
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -234,7 +239,7 @@ static ADDRESS_MAP_START ( warpspeed_io_map, AS_IO, 8, warpspeed_state )
|
||||
AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1")
|
||||
AM_RANGE(0x02, 0x02) AM_READ_PORT("DSW")
|
||||
AM_RANGE(0x03, 0x03) AM_READ_PORT("IN2")
|
||||
AM_RANGE(0x00, 0x27) AM_WRITE(warpspeed_hardware_w )
|
||||
AM_RANGE(0x00, 0x27) AM_WRITE(hardware_w )
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static INPUT_PORTS_START( warpspeed )
|
||||
@ -278,7 +283,7 @@ static INPUT_PORTS_START( warpspeed )
|
||||
PORT_DIPUNUSED( 0x80, 0x00 )
|
||||
INPUT_PORTS_END
|
||||
|
||||
static const gfx_layout warpspeed_charlayout =
|
||||
static const gfx_layout charlayout =
|
||||
{
|
||||
8,8,
|
||||
RGN_FRAC(1,1),
|
||||
@ -290,8 +295,8 @@ static const gfx_layout warpspeed_charlayout =
|
||||
};
|
||||
|
||||
static GFXDECODE_START( warpspeed )
|
||||
GFXDECODE_ENTRY( "gfx1", 0, warpspeed_charlayout, 0, 1 )
|
||||
GFXDECODE_ENTRY( "gfx2", 0, warpspeed_charlayout, 0, 1 )
|
||||
GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 1 )
|
||||
GFXDECODE_ENTRY( "gfx2", 0, charlayout, 0, 1 )
|
||||
GFXDECODE_END
|
||||
|
||||
PALETTE_INIT_MEMBER(warpspeed_state, warpspeed)
|
||||
@ -322,7 +327,7 @@ static MACHINE_CONFIG_START( warpspeed, warpspeed_state )
|
||||
MCFG_SCREEN_SIZE((32)*8, (32)*8)
|
||||
MCFG_SCREEN_VISIBLE_AREA(4*8, 32*8-1, 8*8, 32*8-1)
|
||||
MCFG_SCREEN_PALETTE("palette")
|
||||
MCFG_SCREEN_UPDATE_DRIVER(warpspeed_state, screen_update_warpspeed)
|
||||
MCFG_SCREEN_UPDATE_DRIVER(warpspeed_state, screen_update)
|
||||
|
||||
MCFG_GFXDECODE_ADD("gfxdecode", "palette", warpspeed)
|
||||
MCFG_PALETTE_ADD("palette", 2+8)
|
||||
@ -364,8 +369,5 @@ ROM_START( warpsped )
|
||||
|
||||
ROM_END
|
||||
|
||||
DRIVER_INIT_MEMBER(warpspeed_state,warpspeed)
|
||||
{
|
||||
}
|
||||
|
||||
GAME( 1979?, warpsped, 0, warpspeed, warpspeed, warpspeed_state, warpspeed, ROT0, "Meadows Games, Inc.", "Warp Speed (prototype)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_COLORS | GAME_NO_SOUND ) // year not shown, 1979 is according to date stamps on PCB chips.
|
||||
GAME( 1979?, warpsped, 0, warpspeed, warpspeed, driver_device, 0, ROT0, "Meadows Games, Inc.", "Warp Speed (prototype)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_COLORS | GAME_NO_SOUND | GAME_SUPPORTS_SAVE ) // year not shown, 1979 is according to date stamps on PCB chips.
|
||||
|
@ -94,7 +94,7 @@ TODO:
|
||||
original (weird), or some strange form of protection.
|
||||
- Is wiz protection emulation complete?
|
||||
- Wiz: the supplier of the screenshot says there still may be some wrong
|
||||
colors. Just before the break on Level 2 there is a cresent moon,
|
||||
colors. Just before the break on Level 2 there is a crescent moon,
|
||||
the background should probably be black.
|
||||
|
||||
|
||||
@ -177,7 +177,6 @@ Stephh's notes (based on the games Z80 code and some tests) :
|
||||
#include "emu.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "sound/ay8910.h"
|
||||
#include "sound/discrete.h"
|
||||
#include "includes/wiz.h"
|
||||
|
||||
|
||||
@ -1147,12 +1146,12 @@ DRIVER_INIT_MEMBER(wiz_state,stinger)
|
||||
}
|
||||
|
||||
|
||||
GAME( 1983, stinger, 0, stinger, stinger, wiz_state, stinger, ROT90, "Seibu Denshi", "Stinger", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_COLORS )
|
||||
GAME( 1983, stinger2, stinger, stinger, stinger2, wiz_state, stinger, ROT90, "Seibu Denshi", "Stinger (prototype?)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_COLORS )
|
||||
GAME( 1984, scion, 0, scion, scion, driver_device, 0, ROT0, "Seibu Denshi", "Scion", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_COLORS )
|
||||
GAME( 1984, scionc, scion, scion, scion, driver_device, 0, ROT0, "Seibu Denshi (Cinematronics license)", "Scion (Cinematronics)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_COLORS )
|
||||
GAME( 1984, kungfut, 0, kungfut, kungfut, driver_device, 0, ROT0, "Seibu Kaihatsu", "Kung-Fu Taikun (set 1)", 0 )
|
||||
GAME( 1984, kungfuta, kungfut, kungfut, kungfut, driver_device, 0, ROT0, "Seibu Kaihatsu", "Kung-Fu Taikun (set 2)", 0 ) /* board was a bootleg but set might still be original */
|
||||
GAME( 1985, wiz, 0, wiz, wiz, driver_device, 0, ROT270, "Seibu Kaihatsu", "Wiz", 0 )
|
||||
GAME( 1985, wizt, wiz, wiz, wiz, driver_device, 0, ROT270, "Seibu Kaihatsu (Taito license)", "Wiz (Taito, set 1)", 0 )
|
||||
GAME( 1985, wizta, wiz, wiz, wiz, driver_device, 0, ROT270, "Seibu Kaihatsu (Taito license)", "Wiz (Taito, set 2)", 0 )
|
||||
GAME( 1983, stinger, 0, stinger, stinger, wiz_state, stinger, ROT90, "Seibu Denshi", "Stinger", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_COLORS | GAME_SUPPORTS_SAVE )
|
||||
GAME( 1983, stinger2, stinger, stinger, stinger2, wiz_state, stinger, ROT90, "Seibu Denshi", "Stinger (prototype?)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_COLORS | GAME_SUPPORTS_SAVE )
|
||||
GAME( 1984, scion, 0, scion, scion, driver_device, 0, ROT0, "Seibu Denshi", "Scion", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_COLORS | GAME_SUPPORTS_SAVE )
|
||||
GAME( 1984, scionc, scion, scion, scion, driver_device, 0, ROT0, "Seibu Denshi (Cinematronics license)", "Scion (Cinematronics)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_COLORS | GAME_SUPPORTS_SAVE )
|
||||
GAME( 1984, kungfut, 0, kungfut, kungfut, driver_device, 0, ROT0, "Seibu Kaihatsu", "Kung-Fu Taikun (set 1)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1984, kungfuta, kungfut, kungfut, kungfut, driver_device, 0, ROT0, "Seibu Kaihatsu", "Kung-Fu Taikun (set 2)", GAME_SUPPORTS_SAVE ) /* board was a bootleg but set might still be original */
|
||||
GAME( 1985, wiz, 0, wiz, wiz, driver_device, 0, ROT270, "Seibu Kaihatsu", "Wiz", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1985, wizt, wiz, wiz, wiz, driver_device, 0, ROT270, "Seibu Kaihatsu (Taito license)", "Wiz (Taito, set 1)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1985, wizta, wiz, wiz, wiz, driver_device, 0, ROT270, "Seibu Kaihatsu (Taito license)", "Wiz (Taito, set 2)", GAME_SUPPORTS_SAVE )
|
||||
|
@ -3,39 +3,42 @@ class bigstrkb_state : public driver_device
|
||||
public:
|
||||
bigstrkb_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_gfxdecode(*this, "gfxdecode"),
|
||||
m_palette(*this, "palette"),
|
||||
m_videoram2(*this, "videoram2"),
|
||||
m_videoram3(*this, "videoram3"),
|
||||
m_videoram(*this, "videoram"),
|
||||
m_spriteram(*this, "spriteram"),
|
||||
m_vidreg1(*this, "vidreg1"),
|
||||
m_vidreg2(*this, "vidreg2"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_gfxdecode(*this, "gfxdecode"),
|
||||
m_palette(*this, "palette") { }
|
||||
m_vidreg2(*this, "vidreg2") { }
|
||||
|
||||
tilemap_t *m_tilemap;
|
||||
tilemap_t *m_tilemap2;
|
||||
tilemap_t *m_tilemap3;
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
required_device<palette_device> m_palette;
|
||||
|
||||
required_shared_ptr<UINT16> m_videoram2;
|
||||
required_shared_ptr<UINT16> m_videoram3;
|
||||
required_shared_ptr<UINT16> m_videoram;
|
||||
required_shared_ptr<UINT16> m_spriteram;
|
||||
|
||||
required_shared_ptr<UINT16> m_vidreg1;
|
||||
required_shared_ptr<UINT16> m_vidreg2;
|
||||
|
||||
DECLARE_WRITE16_MEMBER(bsb_videoram_w);
|
||||
DECLARE_WRITE16_MEMBER(bsb_videoram2_w);
|
||||
DECLARE_WRITE16_MEMBER(bsb_videoram3_w);
|
||||
TILEMAP_MAPPER_MEMBER(bsb_bg_scan);
|
||||
TILE_GET_INFO_MEMBER(get_bsb_tile_info);
|
||||
TILE_GET_INFO_MEMBER(get_bsb_tile2_info);
|
||||
TILE_GET_INFO_MEMBER(get_bsb_tile3_info);
|
||||
tilemap_t *m_tilemap;
|
||||
tilemap_t *m_tilemap2;
|
||||
tilemap_t *m_tilemap3;
|
||||
|
||||
DECLARE_WRITE16_MEMBER(videoram_w);
|
||||
DECLARE_WRITE16_MEMBER(videoram2_w);
|
||||
DECLARE_WRITE16_MEMBER(videoram3_w);
|
||||
|
||||
TILEMAP_MAPPER_MEMBER(bg_scan);
|
||||
TILE_GET_INFO_MEMBER(get_tile_info);
|
||||
TILE_GET_INFO_MEMBER(get_tile2_info);
|
||||
TILE_GET_INFO_MEMBER(get_tile3_info);
|
||||
|
||||
virtual void video_start();
|
||||
UINT32 screen_update_bigstrkb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
|
||||
UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect );
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
required_device<palette_device> m_palette;
|
||||
};
|
||||
|
@ -66,6 +66,7 @@ public:
|
||||
DECLARE_WRITE8_MEMBER(digger_io_w);
|
||||
DECLARE_WRITE8_MEMBER(invho2_io_w);
|
||||
DECLARE_WRITE8_MEMBER(invds_io_w);
|
||||
DECLARE_WRITE8_MEMBER(carhntds_io_w);
|
||||
DECLARE_WRITE8_MEMBER(sspacaho_io_w);
|
||||
DECLARE_WRITE8_MEMBER(tranqgun_io_w);
|
||||
DECLARE_WRITE8_MEMBER(spacetrk_io_w);
|
||||
|
@ -2894,6 +2894,7 @@ mmmbanc // (c) 2007 Cave (AMI license) - 2007/06/05 MASTER VER.
|
||||
ddpdfk // (c) 2008 Cave (AMI license) - 2008/06/23 MASTER VER 1.5
|
||||
ddpdfk10 // (c) 2008 Cave (AMI license) - 2008/05/16 MASTER VER
|
||||
dsmbl // (c) 2008 Cave (AMI license) - 2008/10/06 MEGABLACK LABEL VER
|
||||
dfkbl // (c) 2010 Cave (AMI license) - 2010/1/18 BLACK LABEL
|
||||
|
||||
deathsm2
|
||||
|
||||
@ -4332,6 +4333,7 @@ nsub // 268-275 (c) 1980 Sega
|
||||
samurai // 289-302 + upgrades (c) 1980 Sega
|
||||
invinco // 310-318 (c) 1979 Sega
|
||||
invds // 367-382 (c) 1979 Sega
|
||||
carhntds //
|
||||
tranqgun // 413-428 (c) 1980 Sega
|
||||
// 450-465 Tranquilizer Gun (different version?)
|
||||
// ???-??? Car Hunt / Deep Scan
|
||||
@ -7942,6 +7944,7 @@ shadfrcejv2 // TA-0032 (c) 1993 (Japan)
|
||||
// Stern "Berzerk hardware" games
|
||||
berzerk // (c) 1980
|
||||
berzerk1 // (c) 1980
|
||||
berzerkf // (c) 1980
|
||||
berzerkg // (c) 1980
|
||||
frenzy // (c) 1982
|
||||
moonwarp // (c) 1982 - prototype
|
||||
|
@ -47,7 +47,7 @@ void bigstrkb_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprec
|
||||
|
||||
/* Tilemaps */
|
||||
|
||||
TILEMAP_MAPPER_MEMBER(bigstrkb_state::bsb_bg_scan)
|
||||
TILEMAP_MAPPER_MEMBER(bigstrkb_state::bg_scan)
|
||||
{
|
||||
int offset;
|
||||
|
||||
@ -58,7 +58,7 @@ TILEMAP_MAPPER_MEMBER(bigstrkb_state::bsb_bg_scan)
|
||||
return offset;
|
||||
}
|
||||
|
||||
TILE_GET_INFO_MEMBER(bigstrkb_state::get_bsb_tile_info)
|
||||
TILE_GET_INFO_MEMBER(bigstrkb_state::get_tile_info)
|
||||
{
|
||||
int tileno,col;
|
||||
|
||||
@ -68,13 +68,13 @@ TILE_GET_INFO_MEMBER(bigstrkb_state::get_bsb_tile_info)
|
||||
SET_TILE_INFO_MEMBER(0,tileno,col>>12,0);
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(bigstrkb_state::bsb_videoram_w)
|
||||
WRITE16_MEMBER(bigstrkb_state::videoram_w)
|
||||
{
|
||||
m_videoram[offset] = data;
|
||||
m_tilemap->mark_tile_dirty(offset);
|
||||
}
|
||||
|
||||
TILE_GET_INFO_MEMBER(bigstrkb_state::get_bsb_tile2_info)
|
||||
TILE_GET_INFO_MEMBER(bigstrkb_state::get_tile2_info)
|
||||
{
|
||||
int tileno,col;
|
||||
|
||||
@ -84,14 +84,14 @@ TILE_GET_INFO_MEMBER(bigstrkb_state::get_bsb_tile2_info)
|
||||
SET_TILE_INFO_MEMBER(1,tileno,col>>12,0);
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(bigstrkb_state::bsb_videoram2_w)
|
||||
WRITE16_MEMBER(bigstrkb_state::videoram2_w)
|
||||
{
|
||||
m_videoram2[offset] = data;
|
||||
m_tilemap2->mark_tile_dirty(offset);
|
||||
}
|
||||
|
||||
|
||||
TILE_GET_INFO_MEMBER(bigstrkb_state::get_bsb_tile3_info)
|
||||
TILE_GET_INFO_MEMBER(bigstrkb_state::get_tile3_info)
|
||||
{
|
||||
int tileno,col;
|
||||
|
||||
@ -101,7 +101,7 @@ TILE_GET_INFO_MEMBER(bigstrkb_state::get_bsb_tile3_info)
|
||||
SET_TILE_INFO_MEMBER(1,tileno+0x2000,(col>>12)+(0x100/16),0);
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(bigstrkb_state::bsb_videoram3_w)
|
||||
WRITE16_MEMBER(bigstrkb_state::videoram3_w)
|
||||
{
|
||||
m_videoram3[offset] = data;
|
||||
m_tilemap3->mark_tile_dirty(offset);
|
||||
@ -111,16 +111,16 @@ WRITE16_MEMBER(bigstrkb_state::bsb_videoram3_w)
|
||||
|
||||
void bigstrkb_state::video_start()
|
||||
{
|
||||
m_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(bigstrkb_state::get_bsb_tile_info),this),TILEMAP_SCAN_COLS, 8, 8,64,32);
|
||||
m_tilemap2 = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(bigstrkb_state::get_bsb_tile2_info),this),tilemap_mapper_delegate(FUNC(bigstrkb_state::bsb_bg_scan),this), 16, 16,128,64);
|
||||
m_tilemap3 = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(bigstrkb_state::get_bsb_tile3_info),this),tilemap_mapper_delegate(FUNC(bigstrkb_state::bsb_bg_scan),this), 16, 16,128,64);
|
||||
m_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(bigstrkb_state::get_tile_info),this),TILEMAP_SCAN_COLS, 8, 8,64,32);
|
||||
m_tilemap2 = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(bigstrkb_state::get_tile2_info),this),tilemap_mapper_delegate(FUNC(bigstrkb_state::bg_scan),this), 16, 16,128,64);
|
||||
m_tilemap3 = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(bigstrkb_state::get_tile3_info),this),tilemap_mapper_delegate(FUNC(bigstrkb_state::bg_scan),this), 16, 16,128,64);
|
||||
|
||||
m_tilemap->set_transparent_pen(15);
|
||||
//m_tilemap2->set_transparent_pen(15);
|
||||
m_tilemap3->set_transparent_pen(15);
|
||||
}
|
||||
|
||||
UINT32 bigstrkb_state::screen_update_bigstrkb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
UINT32 bigstrkb_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
// bitmap.fill(m_palette->black_pen(), cliprect);
|
||||
|
||||
@ -136,6 +136,6 @@ UINT32 bigstrkb_state::screen_update_bigstrkb(screen_device &screen, bitmap_ind1
|
||||
draw_sprites(bitmap,cliprect);
|
||||
m_tilemap->draw(screen, bitmap, cliprect, 0,0);
|
||||
|
||||
// popmessage ("Regs %08x %08x %08x %08x",bsb_vidreg2[0],bsb_vidreg2[1],bsb_vidreg2[2],bsb_vidreg2[3]);
|
||||
// popmessage ("Regs %08x %08x %08x %08x",m_vidreg2[0],m_vidreg2[1],m_vidreg2[2],m_vidreg2[3]);
|
||||
return 0;
|
||||
}
|
||||
|
@ -5,15 +5,26 @@
|
||||
** subclass of hh_tms1k_state (includes/hh_tms1k.h, drivers/hh_tms1k.c) **
|
||||
|
||||
Marx Series 300 Electronic Bowling Game
|
||||
Main board:
|
||||
* TMS1100NLL MP3403 DBS 7836 SINGAPORE
|
||||
* 4*SN75492 quad segment driver, 2*SN74259 8-line demultiplexer,
|
||||
2*CD4043 quad r/s input latch
|
||||
* 5 7seg LEDs, 15 lamps(10 lamps projected to bowling pins reflection),
|
||||
1bit-sound with crude volume control
|
||||
* edge connector to sensor board, inputs, ...?
|
||||
|
||||
10 lamps for bowling pins + 3 more bulbs, and 7segs for frame number and
|
||||
scores. Board size is 10-12" by 6-8".
|
||||
lamp translation table: SN74259.u5(mux 1) goes to MESS output lamp5x,
|
||||
SN74259.u6(mux 2) goes to MESS output lamp6x. u1-u3 are SN75492 ICs,
|
||||
where other: u1 A2 is N/C, u3 A1 is from O2 and goes to digits seg C.
|
||||
|
||||
some clues:
|
||||
- it's from 1978
|
||||
- Merlin is MP3404, Amaze-A-Tron is MP3405, this one is MP3403
|
||||
- it plays some short jingles (you need to be lucky with button mashing)
|
||||
u5 Q0 -> u1 A4 -> L2 (pin #2) u6 Q0 -> u3 A4 -> L1 (pin #1)
|
||||
u5 Q1 -> u1 A5 -> L4 (pin #4) u6 Q1 -> u3 A5 -> L5 (pin #5)
|
||||
u5 Q2 -> u1 A6 -> L7 (pin #7) u6 Q2 -> u2 A3 -> L11 (player 1)
|
||||
u5 Q3 -> u1 A1 -> L8 (pin #8) u6 Q3 -> u2 A2 -> L12 (player 2)
|
||||
u5 Q4 -> u3 A2 -> L3 (pin #3) u6 Q4 -> u2 A1 -> L15 (?)
|
||||
u5 Q5 -> u2 A6 -> L6 (pin #6) u6 Q5 -> u3 A6 -> L14 (?)
|
||||
u5 Q6 -> u2 A5 -> L10 (pin #10) u6 Q6 -> u1 A3 -> L13 (spare)
|
||||
u5 Q7 -> u2 A4 -> L9 (pin #9) u6 Q7 -> u3 A3 -> digit 4 B+C
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
@ -28,15 +39,43 @@ public:
|
||||
: hh_tms1k_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void prepare_display();
|
||||
DECLARE_WRITE16_MEMBER(write_r);
|
||||
DECLARE_WRITE16_MEMBER(write_o);
|
||||
DECLARE_READ8_MEMBER(read_k);
|
||||
|
||||
protected:
|
||||
virtual void machine_start();
|
||||
};
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
Display
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
void elecbowl_state::prepare_display()
|
||||
{
|
||||
// standard 7segs
|
||||
for (int y = 0; y < 4; y++)
|
||||
{
|
||||
m_display_segmask[y] = 0x7f;
|
||||
m_display_state[y] = (m_r >> (y + 4) & 1) ? m_o : 0;
|
||||
}
|
||||
|
||||
// lamp muxes
|
||||
UINT8 d = m_r >> 1 & 1;
|
||||
m_display_state[5] = (m_r & 1) ? (d << (m_o & 7)) : 0;
|
||||
m_display_state[6] = (m_r >> 2 & 1) ? (d << (m_o & 7)) : 0;
|
||||
|
||||
// digit 4 is from u6 Q7
|
||||
m_display_segmask[4] = 6;
|
||||
m_display_state[4] = (m_display_state[6] & 0x80) ? 6 : 0;
|
||||
|
||||
set_display_size(8, 7);
|
||||
display_update();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
I/O
|
||||
@ -45,19 +84,29 @@ protected:
|
||||
|
||||
WRITE16_MEMBER(elecbowl_state::write_r)
|
||||
{
|
||||
// R4-R7: input mux
|
||||
m_inp_mux = data >> 4 & 0xf;
|
||||
// R5-R7,R10: input mux
|
||||
m_inp_mux = (data >> 5 & 7) | (data >> 7 & 8);
|
||||
|
||||
// R9: speaker out
|
||||
// R3,R8: speaker volume..
|
||||
m_speaker->level_w(data >> 9 & 1);
|
||||
|
||||
// R10: maybe a switch or other button row?
|
||||
// others: ?
|
||||
// R4-R7: select digit
|
||||
// R0,R2: lamp muxes enable
|
||||
// R1: lamp muxes state
|
||||
m_r = data;
|
||||
prepare_display();
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(elecbowl_state::write_o)
|
||||
{
|
||||
// ?
|
||||
// O0-O2: lamp mux
|
||||
// O0-O6: digit segments A-G
|
||||
// O7: N/C
|
||||
//if (data & 0x80) printf("%X ",data&0x7f);
|
||||
|
||||
m_o = data & 0x7f;
|
||||
prepare_display();
|
||||
}
|
||||
|
||||
READ8_MEMBER(elecbowl_state::read_k)
|
||||
@ -74,25 +123,25 @@ READ8_MEMBER(elecbowl_state::read_k)
|
||||
***************************************************************************/
|
||||
|
||||
static INPUT_PORTS_START( elecbowl )
|
||||
PORT_START("IN.0") // R4
|
||||
PORT_START("IN.0") // R5
|
||||
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_1)
|
||||
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_2)
|
||||
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_3)
|
||||
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_4)
|
||||
|
||||
PORT_START("IN.1") // R5
|
||||
PORT_START("IN.1") // R6
|
||||
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q)
|
||||
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_W)
|
||||
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_E)
|
||||
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_R)
|
||||
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) // reset/newgame?
|
||||
|
||||
PORT_START("IN.2") // R6
|
||||
PORT_START("IN.2") // R7
|
||||
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_A)
|
||||
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_S)
|
||||
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_D)
|
||||
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) // reset/newgame?
|
||||
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F)
|
||||
|
||||
PORT_START("IN.3") // R7
|
||||
PORT_START("IN.3") // R10
|
||||
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z)
|
||||
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_X)
|
||||
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_C)
|
||||
@ -107,30 +156,35 @@ INPUT_PORTS_END
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
void elecbowl_state::machine_start()
|
||||
{
|
||||
hh_tms1k_state::machine_start();
|
||||
}
|
||||
|
||||
|
||||
// output PLA is not dumped
|
||||
static const UINT16 elecbowl_output_pla[0x20] =
|
||||
{
|
||||
/* O output PLA configuration currently unknown */
|
||||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
|
||||
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
|
||||
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
|
||||
0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f
|
||||
lA+lB+lC+lD+lE+lF, // 0
|
||||
lB+lC, // 1
|
||||
lA+lB+lG+lE+lD, // 2
|
||||
lA+lB+lG+lC+lD, // 3
|
||||
lF+lB+lG+lC, // 4
|
||||
lA+lF+lG+lC+lD, // 5
|
||||
lA+lF+lG+lC+lD+lE, // 6
|
||||
lA+lB+lC, // 7
|
||||
lA+lB+lC+lD+lE+lF+lG, // 8
|
||||
lA+lB+lG+lF+lC+lD, // 9
|
||||
|
||||
0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
|
||||
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
|
||||
0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f
|
||||
};
|
||||
|
||||
static MACHINE_CONFIG_START( elecbowl, elecbowl_state )
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", TMS1100, 300000) // approximation - unknown freq
|
||||
MCFG_CPU_ADD("maincpu", TMS1100, 350000) // RC osc. R=33K, C=100pf -> ~350kHz
|
||||
MCFG_TMS1XXX_OUTPUT_PLA(elecbowl_output_pla)
|
||||
MCFG_TMS1XXX_READ_K_CB(READ8(elecbowl_state, read_k))
|
||||
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(elecbowl_state, write_r))
|
||||
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(elecbowl_state, write_o))
|
||||
|
||||
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1))
|
||||
MCFG_DEFAULT_LAYOUT(layout_elecbowl)
|
||||
|
||||
/* no video! */
|
||||
@ -151,7 +205,7 @@ MACHINE_CONFIG_END
|
||||
|
||||
ROM_START( elecbowl )
|
||||
ROM_REGION( 0x0800, "maincpu", 0 )
|
||||
ROM_LOAD( "mp3403", 0x0000, 0x0800, CRC(9eabaa7d) SHA1(b1f54587ed7f2bbf3a5d49075c807296384c2b06) )
|
||||
ROM_LOAD( "mp3403.u9", 0x0000, 0x0800, CRC(9eabaa7d) SHA1(b1f54587ed7f2bbf3a5d49075c807296384c2b06) )
|
||||
|
||||
ROM_REGION( 867, "maincpu:mpla", 0 )
|
||||
ROM_LOAD( "tms1100_default_mpla.pla", 0, 867, BAD_DUMP CRC(62445fc9) SHA1(d6297f2a4bc7a870b76cc498d19dbb0ce7d69fec) ) // not verified
|
||||
@ -160,4 +214,4 @@ ROM_START( elecbowl )
|
||||
ROM_END
|
||||
|
||||
|
||||
CONS( 1978, elecbowl, 0, 0, elecbowl, elecbowl, driver_device, 0, "Marx", "Electronic Bowling (Marx)", GAME_SUPPORTS_SAVE | GAME_MECHANICAL | GAME_NOT_WORKING )
|
||||
CONS( 1978, elecbowl, 0, 0, elecbowl, elecbowl, driver_device, 0, "Marx", "Electronic Bowling (Marx)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND | GAME_MECHANICAL | GAME_NOT_WORKING )
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -51,12 +51,10 @@ public:
|
||||
UINT8 m_b; // MCU port B data
|
||||
UINT8 m_c; // MCU port C data
|
||||
|
||||
virtual void machine_start();
|
||||
|
||||
// display common
|
||||
int m_display_wait; // led/lamp off-delay in microseconds (default 33ms)
|
||||
int m_display_maxy; // display matrix number of rows
|
||||
int m_display_maxx; // display matrix number of columns
|
||||
int m_display_maxx; // display matrix number of columns (max 31 for now)
|
||||
|
||||
UINT32 m_display_state[0x20]; // display matrix rows data (last bit is used for always-on)
|
||||
UINT16 m_display_segmask[0x20]; // if not 0, display matrix row is a digit, mask indicates connected segments
|
||||
@ -68,11 +66,14 @@ public:
|
||||
void set_display_size(int maxx, int maxy);
|
||||
void display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety);
|
||||
|
||||
// game-specific handlers
|
||||
DECLARE_WRITE8_MEMBER(maniac_output_w);
|
||||
protected:
|
||||
virtual void machine_start();
|
||||
virtual void machine_reset();
|
||||
};
|
||||
|
||||
|
||||
// machine start/reset
|
||||
|
||||
void hh_pic16_state::machine_start()
|
||||
{
|
||||
// zerofill
|
||||
@ -98,6 +99,10 @@ void hh_pic16_state::machine_start()
|
||||
save_item(NAME(m_c));
|
||||
}
|
||||
|
||||
void hh_pic16_state::machine_reset()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
@ -124,7 +129,7 @@ void hh_pic16_state::display_update()
|
||||
m_display_decay[y][x] = m_display_wait;
|
||||
|
||||
// determine active state
|
||||
int ds = (m_display_decay[y][x] != 0) ? 1 : 0;
|
||||
UINT32 ds = (m_display_decay[y][x] != 0) ? 1 : 0;
|
||||
active_state[y] |= (ds << x);
|
||||
}
|
||||
}
|
||||
@ -195,7 +200,7 @@ void hh_pic16_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
Minidrivers (I/O, Inputs, Machine Config)
|
||||
Minidrivers (subclass, I/O, Inputs, Machine Config)
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
@ -207,7 +212,19 @@ void hh_pic16_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
WRITE8_MEMBER(hh_pic16_state::maniac_output_w)
|
||||
class maniac_state : public hh_pic16_state
|
||||
{
|
||||
public:
|
||||
maniac_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: hh_pic16_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
DECLARE_WRITE8_MEMBER(output_w);
|
||||
};
|
||||
|
||||
// handlers
|
||||
|
||||
WRITE8_MEMBER(maniac_state::output_w)
|
||||
{
|
||||
// B,C: outputs
|
||||
offset -= PIC16C5x_PORTB;
|
||||
@ -228,6 +245,8 @@ WRITE8_MEMBER(hh_pic16_state::maniac_output_w)
|
||||
}
|
||||
|
||||
|
||||
// config
|
||||
|
||||
static INPUT_PORTS_START( maniac )
|
||||
PORT_START("IN.0") // port A
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) // bottom-right
|
||||
@ -239,13 +258,13 @@ INPUT_PORTS_END
|
||||
|
||||
static const INT16 maniac_speaker_levels[] = { 0, 32767, -32768, 0 };
|
||||
|
||||
static MACHINE_CONFIG_START( maniac, hh_pic16_state )
|
||||
static MACHINE_CONFIG_START( maniac, maniac_state )
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", PIC16C55, 850000) // RC osc. R=13.4K, C=470pf, but unknown RC curve - measured 800-890kHz
|
||||
MCFG_PIC16C5x_READ_A_CB(IOPORT("IN.0"))
|
||||
MCFG_PIC16C5x_WRITE_B_CB(WRITE8(hh_pic16_state, maniac_output_w))
|
||||
MCFG_PIC16C5x_WRITE_C_CB(WRITE8(hh_pic16_state, maniac_output_w))
|
||||
MCFG_PIC16C5x_WRITE_B_CB(WRITE8(maniac_state, output_w))
|
||||
MCFG_PIC16C5x_WRITE_C_CB(WRITE8(maniac_state, output_w))
|
||||
MCFG_PIC16C5x_SET_CONFIG(0) // ?
|
||||
|
||||
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_pic16_state, display_decay_tick, attotime::from_msec(1))
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -54,17 +54,15 @@ public:
|
||||
optional_device<speaker_sound_device> m_speaker;
|
||||
|
||||
// misc common
|
||||
UINT8 m_port[9]; // MCU port A-I write data
|
||||
UINT8 m_port[9]; // MCU port A-I write data (optional)
|
||||
UINT16 m_inp_mux; // multiplexed inputs mask
|
||||
|
||||
UINT8 read_inputs(int columns);
|
||||
|
||||
virtual void machine_start();
|
||||
|
||||
// display common
|
||||
int m_display_wait; // led/lamp off-delay in microseconds (default 33ms)
|
||||
int m_display_maxy; // display matrix number of rows
|
||||
int m_display_maxx; // display matrix number of columns
|
||||
int m_display_maxx; // display matrix number of columns (max 31 for now)
|
||||
|
||||
UINT32 m_grid; // VFD current row data
|
||||
UINT32 m_plate; // VFD current column data
|
||||
@ -79,41 +77,14 @@ public:
|
||||
void set_display_size(int maxx, int maxy);
|
||||
void display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety);
|
||||
|
||||
// game-specific handlers
|
||||
void ssfball_display();
|
||||
DECLARE_WRITE8_MEMBER(ssfball_grid_w);
|
||||
DECLARE_WRITE8_MEMBER(ssfball_plate_w);
|
||||
DECLARE_READ8_MEMBER(ssfball_input_b_r);
|
||||
|
||||
void splasfgt_display();
|
||||
DECLARE_WRITE8_MEMBER(splasfgt_grid_w);
|
||||
DECLARE_WRITE8_MEMBER(splasfgt_plate_w);
|
||||
DECLARE_READ8_MEMBER(splasfgt_input_b_r);
|
||||
|
||||
void astrocmd_display();
|
||||
DECLARE_WRITE8_MEMBER(astrocmd_grid_w);
|
||||
DECLARE_WRITE8_MEMBER(astrocmd_plate_w);
|
||||
|
||||
DECLARE_WRITE8_MEMBER(edracula_grid_w);
|
||||
DECLARE_WRITE8_MEMBER(edracula_plate_w);
|
||||
|
||||
DECLARE_WRITE8_MEMBER(tmtennis_grid_w);
|
||||
DECLARE_WRITE8_MEMBER(tmtennis_plate_w);
|
||||
DECLARE_WRITE8_MEMBER(tmtennis_port_e_w);
|
||||
DECLARE_READ8_MEMBER(tmtennis_input_r);
|
||||
void tmtennis_set_clock();
|
||||
DECLARE_INPUT_CHANGED_MEMBER(tmtennis_difficulty_switch);
|
||||
DECLARE_MACHINE_RESET(tmtennis);
|
||||
|
||||
void tmpacman_display();
|
||||
DECLARE_WRITE8_MEMBER(tmpacman_grid_w);
|
||||
DECLARE_WRITE8_MEMBER(tmpacman_plate_w);
|
||||
|
||||
DECLARE_WRITE8_MEMBER(alnchase_output_w);
|
||||
DECLARE_READ8_MEMBER(alnchase_input_r);
|
||||
protected:
|
||||
virtual void machine_start();
|
||||
virtual void machine_reset();
|
||||
};
|
||||
|
||||
|
||||
// machine start/reset
|
||||
|
||||
void hh_ucom4_state::machine_start()
|
||||
{
|
||||
// zerofill
|
||||
@ -143,6 +114,10 @@ void hh_ucom4_state::machine_start()
|
||||
save_item(NAME(m_plate));
|
||||
}
|
||||
|
||||
void hh_ucom4_state::machine_reset()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
@ -169,7 +144,7 @@ void hh_ucom4_state::display_update()
|
||||
m_display_decay[y][x] = m_display_wait;
|
||||
|
||||
// determine active state
|
||||
int ds = (m_display_decay[y][x] != 0) ? 1 : 0;
|
||||
UINT32 ds = (m_display_decay[y][x] != 0) ? 1 : 0;
|
||||
active_state[y] |= (ds << x);
|
||||
}
|
||||
}
|
||||
@ -253,7 +228,7 @@ UINT8 hh_ucom4_state::read_inputs(int columns)
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
Minidrivers (I/O, Inputs, Machine Config)
|
||||
Minidrivers (subclass, I/O, Inputs, Machine Config)
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
@ -272,23 +247,36 @@ UINT8 hh_ucom4_state::read_inputs(int columns)
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
void hh_ucom4_state::ssfball_display()
|
||||
class ssfball_state : public hh_ucom4_state
|
||||
{
|
||||
public:
|
||||
ssfball_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: hh_ucom4_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void prepare_display();
|
||||
DECLARE_WRITE8_MEMBER(grid_w);
|
||||
DECLARE_WRITE8_MEMBER(plate_w);
|
||||
DECLARE_READ8_MEMBER(input_b_r);
|
||||
};
|
||||
|
||||
// handlers
|
||||
|
||||
void ssfball_state::prepare_display()
|
||||
{
|
||||
UINT32 plate = BITSWAP24(m_plate,23,22,21,20,19,11,7,3,12,17,13,18,16,14,15,10,9,8,0,1,2,4,5,6);
|
||||
|
||||
display_matrix(16, 9, plate, m_grid);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(hh_ucom4_state::ssfball_grid_w)
|
||||
WRITE8_MEMBER(ssfball_state::grid_w)
|
||||
{
|
||||
// C,D(,E): vfd matrix grid 0-7(,8)
|
||||
// C,D(,E3): vfd matrix grid 0-7(,8)
|
||||
int shift = (offset - NEC_UCOM4_PORTC) * 4;
|
||||
m_grid = (m_grid & ~(0xf << shift)) | (data << shift);
|
||||
|
||||
ssfball_display();
|
||||
prepare_display();
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(hh_ucom4_state::ssfball_plate_w)
|
||||
WRITE8_MEMBER(ssfball_state::plate_w)
|
||||
{
|
||||
m_port[offset] = data;
|
||||
|
||||
@ -302,18 +290,20 @@ WRITE8_MEMBER(hh_ucom4_state::ssfball_plate_w)
|
||||
|
||||
// E3: vfd matrix grid 8
|
||||
if (offset == NEC_UCOM4_PORTE)
|
||||
ssfball_grid_w(space, offset, data >> 3 & 1);
|
||||
grid_w(space, offset, data >> 3 & 1);
|
||||
else
|
||||
ssfball_display();
|
||||
prepare_display();
|
||||
}
|
||||
|
||||
READ8_MEMBER(hh_ucom4_state::ssfball_input_b_r)
|
||||
READ8_MEMBER(ssfball_state::input_b_r)
|
||||
{
|
||||
// B: input port 2, where B3 is multiplexed
|
||||
return m_inp_matrix[2]->read() | read_inputs(2);
|
||||
}
|
||||
|
||||
|
||||
// config
|
||||
|
||||
static INPUT_PORTS_START( ssfball )
|
||||
PORT_START("IN.0") // F3 port B3
|
||||
PORT_BIT( 0x07, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
@ -341,19 +331,19 @@ INPUT_PORTS_END
|
||||
|
||||
static const INT16 ssfball_speaker_levels[] = { 0, 32767, -32768, 0 };
|
||||
|
||||
static MACHINE_CONFIG_START( ssfball, hh_ucom4_state )
|
||||
static MACHINE_CONFIG_START( ssfball, ssfball_state )
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", NEC_D553, XTAL_400kHz)
|
||||
MCFG_UCOM4_READ_A_CB(IOPORT("IN.3"))
|
||||
MCFG_UCOM4_READ_B_CB(READ8(hh_ucom4_state, ssfball_input_b_r))
|
||||
MCFG_UCOM4_WRITE_C_CB(WRITE8(hh_ucom4_state, ssfball_grid_w))
|
||||
MCFG_UCOM4_WRITE_D_CB(WRITE8(hh_ucom4_state, ssfball_grid_w))
|
||||
MCFG_UCOM4_WRITE_E_CB(WRITE8(hh_ucom4_state, ssfball_plate_w))
|
||||
MCFG_UCOM4_WRITE_F_CB(WRITE8(hh_ucom4_state, ssfball_plate_w))
|
||||
MCFG_UCOM4_WRITE_G_CB(WRITE8(hh_ucom4_state, ssfball_plate_w))
|
||||
MCFG_UCOM4_WRITE_H_CB(WRITE8(hh_ucom4_state, ssfball_plate_w))
|
||||
MCFG_UCOM4_WRITE_I_CB(WRITE8(hh_ucom4_state, ssfball_plate_w))
|
||||
MCFG_UCOM4_READ_B_CB(READ8(ssfball_state, input_b_r))
|
||||
MCFG_UCOM4_WRITE_C_CB(WRITE8(ssfball_state, grid_w))
|
||||
MCFG_UCOM4_WRITE_D_CB(WRITE8(ssfball_state, grid_w))
|
||||
MCFG_UCOM4_WRITE_E_CB(WRITE8(ssfball_state, plate_w))
|
||||
MCFG_UCOM4_WRITE_F_CB(WRITE8(ssfball_state, plate_w))
|
||||
MCFG_UCOM4_WRITE_G_CB(WRITE8(ssfball_state, plate_w))
|
||||
MCFG_UCOM4_WRITE_H_CB(WRITE8(ssfball_state, plate_w))
|
||||
MCFG_UCOM4_WRITE_I_CB(WRITE8(ssfball_state, plate_w))
|
||||
|
||||
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_ucom4_state, display_decay_tick, attotime::from_msec(1))
|
||||
MCFG_DEFAULT_LAYOUT(layout_hh_ucom4_test)
|
||||
@ -382,14 +372,28 @@ MACHINE_CONFIG_END
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
void hh_ucom4_state::splasfgt_display()
|
||||
class splasfgt_state : public hh_ucom4_state
|
||||
{
|
||||
public:
|
||||
splasfgt_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: hh_ucom4_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void prepare_display();
|
||||
DECLARE_WRITE8_MEMBER(grid_w);
|
||||
DECLARE_WRITE8_MEMBER(plate_w);
|
||||
DECLARE_READ8_MEMBER(input_b_r);
|
||||
};
|
||||
|
||||
// handlers
|
||||
|
||||
void splasfgt_state::prepare_display()
|
||||
{
|
||||
UINT32 plate = BITSWAP24(m_plate,23,22,21,20,19,18,17,13,1,0,8,6,0,10,11,14,15,16,9,5,7,4,2,3);
|
||||
|
||||
display_matrix(16, 9, plate, m_grid);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(hh_ucom4_state::splasfgt_grid_w)
|
||||
WRITE8_MEMBER(splasfgt_state::grid_w)
|
||||
{
|
||||
// G,H,I0: vfd matrix grid
|
||||
int shift = (offset - NEC_UCOM4_PORTG) * 4;
|
||||
@ -400,31 +404,32 @@ WRITE8_MEMBER(hh_ucom4_state::splasfgt_grid_w)
|
||||
|
||||
// I2: vfd matrix plate 6
|
||||
if (offset == NEC_UCOM4_PORTI)
|
||||
m_plate = (m_plate & 0xffff) | (data << 14 & 0x10000);
|
||||
|
||||
splasfgt_display();
|
||||
plate_w(space, 4 + NEC_UCOM4_PORTC, data >> 2 & 1);
|
||||
else
|
||||
prepare_display();
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(hh_ucom4_state::splasfgt_plate_w)
|
||||
WRITE8_MEMBER(splasfgt_state::plate_w)
|
||||
{
|
||||
// C,D,E,F23: vfd matrix plate
|
||||
int shift = (offset - NEC_UCOM4_PORTC) * 4;
|
||||
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
|
||||
|
||||
// F01: speaker out
|
||||
if (offset == NEC_UCOM4_PORTF)
|
||||
m_speaker->level_w(data & 3);
|
||||
|
||||
ssfball_display();
|
||||
// C,D,E,F23(,I2): vfd matrix plate
|
||||
int shift = (offset - NEC_UCOM4_PORTC) * 4;
|
||||
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
|
||||
prepare_display();
|
||||
}
|
||||
|
||||
READ8_MEMBER(hh_ucom4_state::splasfgt_input_b_r)
|
||||
READ8_MEMBER(splasfgt_state::input_b_r)
|
||||
{
|
||||
// B: multiplexed buttons
|
||||
return read_inputs(4);
|
||||
}
|
||||
|
||||
|
||||
// config
|
||||
|
||||
/* physical button layout and labels is like this:
|
||||
|
||||
* left = P1 side * * right = P2 side * (note: in 1P mode, switch sides between turns)
|
||||
@ -475,19 +480,19 @@ INPUT_PORTS_END
|
||||
|
||||
static const INT16 splasfgt_speaker_levels[] = { 0, 32767, -32768, 0 };
|
||||
|
||||
static MACHINE_CONFIG_START( splasfgt, hh_ucom4_state )
|
||||
static MACHINE_CONFIG_START( splasfgt, splasfgt_state )
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", NEC_D553, XTAL_400kHz)
|
||||
MCFG_UCOM4_READ_A_CB(IOPORT("IN.4"))
|
||||
MCFG_UCOM4_READ_B_CB(READ8(hh_ucom4_state, splasfgt_input_b_r))
|
||||
MCFG_UCOM4_WRITE_C_CB(WRITE8(hh_ucom4_state, splasfgt_plate_w))
|
||||
MCFG_UCOM4_WRITE_D_CB(WRITE8(hh_ucom4_state, splasfgt_plate_w))
|
||||
MCFG_UCOM4_WRITE_E_CB(WRITE8(hh_ucom4_state, splasfgt_plate_w))
|
||||
MCFG_UCOM4_WRITE_F_CB(WRITE8(hh_ucom4_state, splasfgt_plate_w))
|
||||
MCFG_UCOM4_WRITE_G_CB(WRITE8(hh_ucom4_state, splasfgt_grid_w))
|
||||
MCFG_UCOM4_WRITE_H_CB(WRITE8(hh_ucom4_state, splasfgt_grid_w))
|
||||
MCFG_UCOM4_WRITE_I_CB(WRITE8(hh_ucom4_state, splasfgt_grid_w))
|
||||
MCFG_UCOM4_READ_B_CB(READ8(splasfgt_state, input_b_r))
|
||||
MCFG_UCOM4_WRITE_C_CB(WRITE8(splasfgt_state, plate_w))
|
||||
MCFG_UCOM4_WRITE_D_CB(WRITE8(splasfgt_state, plate_w))
|
||||
MCFG_UCOM4_WRITE_E_CB(WRITE8(splasfgt_state, plate_w))
|
||||
MCFG_UCOM4_WRITE_F_CB(WRITE8(splasfgt_state, plate_w))
|
||||
MCFG_UCOM4_WRITE_G_CB(WRITE8(splasfgt_state, grid_w))
|
||||
MCFG_UCOM4_WRITE_H_CB(WRITE8(splasfgt_state, grid_w))
|
||||
MCFG_UCOM4_WRITE_I_CB(WRITE8(splasfgt_state, grid_w))
|
||||
|
||||
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_ucom4_state, display_decay_tick, attotime::from_msec(1))
|
||||
MCFG_DEFAULT_LAYOUT(layout_hh_ucom4_test)
|
||||
@ -521,24 +526,36 @@ MACHINE_CONFIG_END
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
void hh_ucom4_state::astrocmd_display()
|
||||
class astrocmd_state : public hh_ucom4_state
|
||||
{
|
||||
public:
|
||||
astrocmd_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: hh_ucom4_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void prepare_display();
|
||||
DECLARE_WRITE8_MEMBER(grid_w);
|
||||
DECLARE_WRITE8_MEMBER(plate_w);
|
||||
};
|
||||
|
||||
// handlers
|
||||
|
||||
void astrocmd_state::prepare_display()
|
||||
{
|
||||
UINT16 grid = BITSWAP16(m_grid,15,14,13,12,11,10,9,8,4,5,6,7,0,1,2,3);
|
||||
UINT32 plate = BITSWAP24(m_plate,23,22,21,20,19,3,2,12,13,14,15,16,17,18,0,1,4,8,5,9,7,11,6,10);
|
||||
|
||||
display_matrix(17, 9, plate, grid);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(hh_ucom4_state::astrocmd_grid_w)
|
||||
WRITE8_MEMBER(astrocmd_state::grid_w)
|
||||
{
|
||||
// C,D(,E3): vfd matrix grid
|
||||
int shift = (offset - NEC_UCOM4_PORTC) * 4;
|
||||
m_grid = (m_grid & ~(0xf << shift)) | (data << shift);
|
||||
|
||||
astrocmd_display();
|
||||
prepare_display();
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(hh_ucom4_state::astrocmd_plate_w)
|
||||
WRITE8_MEMBER(astrocmd_state::plate_w)
|
||||
{
|
||||
// E01,F,G,H,I: vfd matrix plate
|
||||
int shift = (offset - NEC_UCOM4_PORTE) * 4;
|
||||
@ -550,13 +567,15 @@ WRITE8_MEMBER(hh_ucom4_state::astrocmd_plate_w)
|
||||
m_speaker->level_w(data >> 2 & 1);
|
||||
|
||||
// E3: vfd matrix grid 8
|
||||
astrocmd_grid_w(space, offset, data >> 3 & 1);
|
||||
grid_w(space, offset, data >> 3 & 1);
|
||||
}
|
||||
else
|
||||
astrocmd_display();
|
||||
prepare_display();
|
||||
}
|
||||
|
||||
|
||||
// config
|
||||
|
||||
static INPUT_PORTS_START( astrocmd )
|
||||
PORT_START("IN.0") // port A
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SELECT )
|
||||
@ -571,20 +590,19 @@ static INPUT_PORTS_START( astrocmd )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT )
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
static MACHINE_CONFIG_START( astrocmd, hh_ucom4_state )
|
||||
static MACHINE_CONFIG_START( astrocmd, astrocmd_state )
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", NEC_D553, XTAL_400kHz)
|
||||
MCFG_UCOM4_READ_A_CB(IOPORT("IN.0"))
|
||||
MCFG_UCOM4_READ_B_CB(IOPORT("IN.1"))
|
||||
MCFG_UCOM4_WRITE_C_CB(WRITE8(hh_ucom4_state, astrocmd_grid_w))
|
||||
MCFG_UCOM4_WRITE_D_CB(WRITE8(hh_ucom4_state, astrocmd_grid_w))
|
||||
MCFG_UCOM4_WRITE_E_CB(WRITE8(hh_ucom4_state, astrocmd_plate_w))
|
||||
MCFG_UCOM4_WRITE_F_CB(WRITE8(hh_ucom4_state, astrocmd_plate_w))
|
||||
MCFG_UCOM4_WRITE_G_CB(WRITE8(hh_ucom4_state, astrocmd_plate_w))
|
||||
MCFG_UCOM4_WRITE_H_CB(WRITE8(hh_ucom4_state, astrocmd_plate_w))
|
||||
MCFG_UCOM4_WRITE_I_CB(WRITE8(hh_ucom4_state, astrocmd_plate_w))
|
||||
MCFG_UCOM4_WRITE_C_CB(WRITE8(astrocmd_state, grid_w))
|
||||
MCFG_UCOM4_WRITE_D_CB(WRITE8(astrocmd_state, grid_w))
|
||||
MCFG_UCOM4_WRITE_E_CB(WRITE8(astrocmd_state, plate_w))
|
||||
MCFG_UCOM4_WRITE_F_CB(WRITE8(astrocmd_state, plate_w))
|
||||
MCFG_UCOM4_WRITE_G_CB(WRITE8(astrocmd_state, plate_w))
|
||||
MCFG_UCOM4_WRITE_H_CB(WRITE8(astrocmd_state, plate_w))
|
||||
MCFG_UCOM4_WRITE_I_CB(WRITE8(astrocmd_state, plate_w))
|
||||
|
||||
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_ucom4_state, display_decay_tick, attotime::from_msec(1))
|
||||
MCFG_DEFAULT_LAYOUT(layout_hh_ucom4_test)
|
||||
@ -617,16 +635,28 @@ MACHINE_CONFIG_END
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
WRITE8_MEMBER(hh_ucom4_state::edracula_grid_w)
|
||||
class edracula_state : public hh_ucom4_state
|
||||
{
|
||||
public:
|
||||
edracula_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: hh_ucom4_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
DECLARE_WRITE8_MEMBER(grid_w);
|
||||
DECLARE_WRITE8_MEMBER(plate_w);
|
||||
};
|
||||
|
||||
// handlers
|
||||
|
||||
WRITE8_MEMBER(edracula_state::grid_w)
|
||||
{
|
||||
// C,D: vfd matrix grid
|
||||
int shift = (offset - NEC_UCOM4_PORTC) * 4;
|
||||
m_grid = (m_grid & ~(0xf << shift)) | (data << shift);
|
||||
|
||||
display_matrix(18+1, 8, m_plate, m_grid);
|
||||
display_matrix(18, 8, m_plate, m_grid);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(hh_ucom4_state::edracula_plate_w)
|
||||
WRITE8_MEMBER(edracula_state::plate_w)
|
||||
{
|
||||
// I2: speaker out
|
||||
if (offset == NEC_UCOM4_PORTI)
|
||||
@ -635,11 +665,12 @@ WRITE8_MEMBER(hh_ucom4_state::edracula_plate_w)
|
||||
// E,F,G,H,I01: vfd matrix plate
|
||||
int shift = (offset - NEC_UCOM4_PORTE) * 4;
|
||||
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
|
||||
|
||||
display_matrix(18, 8, m_plate, m_grid);
|
||||
}
|
||||
|
||||
|
||||
// config
|
||||
|
||||
static INPUT_PORTS_START( edracula )
|
||||
PORT_START("IN.0") // port A
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SELECT )
|
||||
@ -654,20 +685,19 @@ static INPUT_PORTS_START( edracula )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT )
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
static MACHINE_CONFIG_START( edracula, hh_ucom4_state )
|
||||
static MACHINE_CONFIG_START( edracula, edracula_state )
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", NEC_D553, XTAL_400kHz)
|
||||
MCFG_UCOM4_READ_A_CB(IOPORT("IN.0"))
|
||||
MCFG_UCOM4_READ_B_CB(IOPORT("IN.1"))
|
||||
MCFG_UCOM4_WRITE_C_CB(WRITE8(hh_ucom4_state, edracula_grid_w))
|
||||
MCFG_UCOM4_WRITE_D_CB(WRITE8(hh_ucom4_state, edracula_grid_w))
|
||||
MCFG_UCOM4_WRITE_E_CB(WRITE8(hh_ucom4_state, edracula_plate_w))
|
||||
MCFG_UCOM4_WRITE_F_CB(WRITE8(hh_ucom4_state, edracula_plate_w))
|
||||
MCFG_UCOM4_WRITE_G_CB(WRITE8(hh_ucom4_state, edracula_plate_w))
|
||||
MCFG_UCOM4_WRITE_H_CB(WRITE8(hh_ucom4_state, edracula_plate_w))
|
||||
MCFG_UCOM4_WRITE_I_CB(WRITE8(hh_ucom4_state, edracula_plate_w))
|
||||
MCFG_UCOM4_WRITE_C_CB(WRITE8(edracula_state, grid_w))
|
||||
MCFG_UCOM4_WRITE_D_CB(WRITE8(edracula_state, grid_w))
|
||||
MCFG_UCOM4_WRITE_E_CB(WRITE8(edracula_state, plate_w))
|
||||
MCFG_UCOM4_WRITE_F_CB(WRITE8(edracula_state, plate_w))
|
||||
MCFG_UCOM4_WRITE_G_CB(WRITE8(edracula_state, plate_w))
|
||||
MCFG_UCOM4_WRITE_H_CB(WRITE8(edracula_state, plate_w))
|
||||
MCFG_UCOM4_WRITE_I_CB(WRITE8(edracula_state, plate_w))
|
||||
|
||||
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_ucom4_state, display_decay_tick, attotime::from_msec(1))
|
||||
MCFG_DEFAULT_LAYOUT(layout_hh_ucom4_test)
|
||||
@ -701,26 +731,45 @@ MACHINE_CONFIG_END
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
WRITE8_MEMBER(hh_ucom4_state::tmtennis_grid_w)
|
||||
class tmtennis_state : public hh_ucom4_state
|
||||
{
|
||||
public:
|
||||
tmtennis_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: hh_ucom4_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
DECLARE_WRITE8_MEMBER(grid_w);
|
||||
DECLARE_WRITE8_MEMBER(plate_w);
|
||||
DECLARE_WRITE8_MEMBER(port_e_w);
|
||||
DECLARE_READ8_MEMBER(input_r);
|
||||
|
||||
void set_clock();
|
||||
DECLARE_INPUT_CHANGED_MEMBER(difficulty_switch);
|
||||
|
||||
protected:
|
||||
virtual void machine_reset();
|
||||
};
|
||||
|
||||
// handlers
|
||||
|
||||
WRITE8_MEMBER(tmtennis_state::grid_w)
|
||||
{
|
||||
// G,H,I: vfd matrix grid
|
||||
int shift = (offset - NEC_UCOM4_PORTG) * 4;
|
||||
m_grid = (m_grid & ~(0xf << shift)) | (data << shift);
|
||||
|
||||
display_matrix(12, 12, m_plate, m_grid);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(hh_ucom4_state::tmtennis_plate_w)
|
||||
WRITE8_MEMBER(tmtennis_state::plate_w)
|
||||
{
|
||||
// C,D,F: vfd matrix plate
|
||||
if (offset == NEC_UCOM4_PORTF) offset--;
|
||||
int shift = (offset - NEC_UCOM4_PORTC) * 4;
|
||||
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
|
||||
|
||||
display_matrix(12, 12, m_plate, m_grid);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(hh_ucom4_state::tmtennis_port_e_w)
|
||||
WRITE8_MEMBER(tmtennis_state::port_e_w)
|
||||
{
|
||||
// E01: input mux
|
||||
// E2: speaker out
|
||||
@ -729,13 +778,15 @@ WRITE8_MEMBER(hh_ucom4_state::tmtennis_port_e_w)
|
||||
m_speaker->level_w(data >> 2 & 1);
|
||||
}
|
||||
|
||||
READ8_MEMBER(hh_ucom4_state::tmtennis_input_r)
|
||||
READ8_MEMBER(tmtennis_state::input_r)
|
||||
{
|
||||
// A,B: multiplexed buttons
|
||||
return ~read_inputs(2) >> (offset*4);
|
||||
}
|
||||
|
||||
|
||||
// config
|
||||
|
||||
/* Pro-Tennis physical button layout and labels is like this:
|
||||
|
||||
* left = P2/CPU side * * right = P1 side *
|
||||
@ -758,9 +809,9 @@ static INPUT_PORTS_START( tmtennis )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_J) PORT_NAME("P1 Button 6")
|
||||
|
||||
PORT_START("IN.1") // E1 port A/B
|
||||
PORT_CONFNAME( 0x101, 0x100, DEF_STR( Difficulty ) ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_ucom4_state, tmtennis_difficulty_switch, NULL)
|
||||
PORT_CONFNAME( 0x101, 0x100, DEF_STR( Difficulty ) ) PORT_CHANGED_MEMBER(DEVICE_SELF, tmtennis_state, difficulty_switch, NULL)
|
||||
PORT_CONFSETTING( 0x001, "Practice" )
|
||||
PORT_CONFSETTING( 0x100, "Pro 1" ) // -> tmtennis_difficulty_switch
|
||||
PORT_CONFSETTING( 0x100, "Pro 1" ) // -> difficulty_switch
|
||||
PORT_CONFSETTING( 0x000, "Pro 2" )
|
||||
PORT_CONFNAME( 0x02, 0x00, "Players" )
|
||||
PORT_CONFSETTING( 0x00, "1" )
|
||||
@ -773,8 +824,13 @@ static INPUT_PORTS_START( tmtennis )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_D) PORT_NAME("P2 Button 6")
|
||||
INPUT_PORTS_END
|
||||
|
||||
INPUT_CHANGED_MEMBER(tmtennis_state::difficulty_switch)
|
||||
{
|
||||
set_clock();
|
||||
}
|
||||
|
||||
void hh_ucom4_state::tmtennis_set_clock()
|
||||
|
||||
void tmtennis_state::set_clock()
|
||||
{
|
||||
// MCU clock is from an LC circuit oscillating by default at ~360kHz,
|
||||
// but on PRO1, the difficulty switch puts a capacitor across the LC circuit
|
||||
@ -782,35 +838,29 @@ void hh_ucom4_state::tmtennis_set_clock()
|
||||
m_maincpu->set_unscaled_clock((m_inp_matrix[1]->read() & 0x100) ? 260000 : 360000);
|
||||
}
|
||||
|
||||
INPUT_CHANGED_MEMBER(hh_ucom4_state::tmtennis_difficulty_switch)
|
||||
void tmtennis_state::machine_reset()
|
||||
{
|
||||
tmtennis_set_clock();
|
||||
hh_ucom4_state::machine_reset();
|
||||
set_clock();
|
||||
}
|
||||
|
||||
MACHINE_RESET_MEMBER(hh_ucom4_state, tmtennis)
|
||||
{
|
||||
tmtennis_set_clock();
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_START( tmtennis, hh_ucom4_state )
|
||||
static MACHINE_CONFIG_START( tmtennis, tmtennis_state )
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", NEC_D552, 360000) // see tmtennis_set_clock
|
||||
MCFG_UCOM4_READ_A_CB(READ8(hh_ucom4_state, tmtennis_input_r))
|
||||
MCFG_UCOM4_READ_B_CB(READ8(hh_ucom4_state, tmtennis_input_r))
|
||||
MCFG_UCOM4_WRITE_C_CB(WRITE8(hh_ucom4_state, tmtennis_plate_w))
|
||||
MCFG_UCOM4_WRITE_D_CB(WRITE8(hh_ucom4_state, tmtennis_plate_w))
|
||||
MCFG_UCOM4_WRITE_E_CB(WRITE8(hh_ucom4_state, tmtennis_port_e_w))
|
||||
MCFG_UCOM4_WRITE_F_CB(WRITE8(hh_ucom4_state, tmtennis_plate_w))
|
||||
MCFG_UCOM4_WRITE_G_CB(WRITE8(hh_ucom4_state, tmtennis_grid_w))
|
||||
MCFG_UCOM4_WRITE_H_CB(WRITE8(hh_ucom4_state, tmtennis_grid_w))
|
||||
MCFG_UCOM4_WRITE_I_CB(WRITE8(hh_ucom4_state, tmtennis_grid_w))
|
||||
MCFG_CPU_ADD("maincpu", NEC_D552, 360000) // see set_clock
|
||||
MCFG_UCOM4_READ_A_CB(READ8(tmtennis_state, input_r))
|
||||
MCFG_UCOM4_READ_B_CB(READ8(tmtennis_state, input_r))
|
||||
MCFG_UCOM4_WRITE_C_CB(WRITE8(tmtennis_state, plate_w))
|
||||
MCFG_UCOM4_WRITE_D_CB(WRITE8(tmtennis_state, plate_w))
|
||||
MCFG_UCOM4_WRITE_E_CB(WRITE8(tmtennis_state, port_e_w))
|
||||
MCFG_UCOM4_WRITE_F_CB(WRITE8(tmtennis_state, plate_w))
|
||||
MCFG_UCOM4_WRITE_G_CB(WRITE8(tmtennis_state, grid_w))
|
||||
MCFG_UCOM4_WRITE_H_CB(WRITE8(tmtennis_state, grid_w))
|
||||
MCFG_UCOM4_WRITE_I_CB(WRITE8(tmtennis_state, grid_w))
|
||||
|
||||
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_ucom4_state, display_decay_tick, attotime::from_msec(1))
|
||||
MCFG_DEFAULT_LAYOUT(layout_hh_ucom4_test)
|
||||
|
||||
MCFG_MACHINE_RESET_OVERRIDE(hh_ucom4_state, tmtennis)
|
||||
|
||||
/* no video! */
|
||||
|
||||
/* sound hardware */
|
||||
@ -844,24 +894,36 @@ MACHINE_CONFIG_END
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
void hh_ucom4_state::tmpacman_display()
|
||||
class tmpacman_state : public hh_ucom4_state
|
||||
{
|
||||
public:
|
||||
tmpacman_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: hh_ucom4_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void prepare_display();
|
||||
DECLARE_WRITE8_MEMBER(grid_w);
|
||||
DECLARE_WRITE8_MEMBER(plate_w);
|
||||
};
|
||||
|
||||
// handlers
|
||||
|
||||
void tmpacman_state::prepare_display()
|
||||
{
|
||||
UINT16 grid = BITSWAP8(m_grid,0,1,2,3,4,5,6,7);
|
||||
UINT32 plate = BITSWAP24(m_plate,23,22,21,20,19,16,17,18,11,10,9,8,0,2,3,1,4,5,6,7,12,13,14,15);
|
||||
|
||||
display_matrix(19, 8, plate, grid);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(hh_ucom4_state::tmpacman_grid_w)
|
||||
WRITE8_MEMBER(tmpacman_state::grid_w)
|
||||
{
|
||||
// C,D: vfd matrix grid
|
||||
int shift = (offset - NEC_UCOM4_PORTC) * 4;
|
||||
m_grid = (m_grid & ~(0xf << shift)) | (data << shift);
|
||||
|
||||
tmpacman_display();
|
||||
prepare_display();
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(hh_ucom4_state::tmpacman_plate_w)
|
||||
WRITE8_MEMBER(tmpacman_state::plate_w)
|
||||
{
|
||||
// E1: speaker out
|
||||
if (offset == NEC_UCOM4_PORTE)
|
||||
@ -870,11 +932,12 @@ WRITE8_MEMBER(hh_ucom4_state::tmpacman_plate_w)
|
||||
// E023,F,G,H,I: vfd matrix plate
|
||||
int shift = (offset - NEC_UCOM4_PORTE) * 4;
|
||||
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
|
||||
|
||||
tmpacman_display();
|
||||
prepare_display();
|
||||
}
|
||||
|
||||
|
||||
// config
|
||||
|
||||
static INPUT_PORTS_START( tmpacman )
|
||||
PORT_START("IN.0") // port A
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY // separate directional buttons, hence 16way
|
||||
@ -889,20 +952,19 @@ static INPUT_PORTS_START( tmpacman )
|
||||
PORT_BIT( 0x0e, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
static MACHINE_CONFIG_START( tmpacman, hh_ucom4_state )
|
||||
static MACHINE_CONFIG_START( tmpacman, tmpacman_state )
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", NEC_D553, XTAL_430kHz)
|
||||
MCFG_UCOM4_READ_A_CB(IOPORT("IN.0"))
|
||||
MCFG_UCOM4_READ_B_CB(IOPORT("IN.1"))
|
||||
MCFG_UCOM4_WRITE_C_CB(WRITE8(hh_ucom4_state, tmpacman_grid_w))
|
||||
MCFG_UCOM4_WRITE_D_CB(WRITE8(hh_ucom4_state, tmpacman_grid_w))
|
||||
MCFG_UCOM4_WRITE_E_CB(WRITE8(hh_ucom4_state, tmpacman_plate_w))
|
||||
MCFG_UCOM4_WRITE_F_CB(WRITE8(hh_ucom4_state, tmpacman_plate_w))
|
||||
MCFG_UCOM4_WRITE_G_CB(WRITE8(hh_ucom4_state, tmpacman_plate_w))
|
||||
MCFG_UCOM4_WRITE_H_CB(WRITE8(hh_ucom4_state, tmpacman_plate_w))
|
||||
MCFG_UCOM4_WRITE_I_CB(WRITE8(hh_ucom4_state, tmpacman_plate_w))
|
||||
MCFG_UCOM4_WRITE_C_CB(WRITE8(tmpacman_state, grid_w))
|
||||
MCFG_UCOM4_WRITE_D_CB(WRITE8(tmpacman_state, grid_w))
|
||||
MCFG_UCOM4_WRITE_E_CB(WRITE8(tmpacman_state, plate_w))
|
||||
MCFG_UCOM4_WRITE_F_CB(WRITE8(tmpacman_state, plate_w))
|
||||
MCFG_UCOM4_WRITE_G_CB(WRITE8(tmpacman_state, plate_w))
|
||||
MCFG_UCOM4_WRITE_H_CB(WRITE8(tmpacman_state, plate_w))
|
||||
MCFG_UCOM4_WRITE_I_CB(WRITE8(tmpacman_state, plate_w))
|
||||
|
||||
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_ucom4_state, display_decay_tick, attotime::from_msec(1))
|
||||
MCFG_DEFAULT_LAYOUT(layout_hh_ucom4_test)
|
||||
@ -937,7 +999,20 @@ MACHINE_CONFIG_END
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
WRITE8_MEMBER(hh_ucom4_state::alnchase_output_w)
|
||||
class alnchase_state : public hh_ucom4_state
|
||||
{
|
||||
public:
|
||||
alnchase_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: hh_ucom4_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
DECLARE_WRITE8_MEMBER(output_w);
|
||||
DECLARE_READ8_MEMBER(input_r);
|
||||
};
|
||||
|
||||
// handlers
|
||||
|
||||
WRITE8_MEMBER(alnchase_state::output_w)
|
||||
{
|
||||
if (offset <= NEC_UCOM4_PORTE)
|
||||
{
|
||||
@ -964,13 +1039,15 @@ WRITE8_MEMBER(hh_ucom4_state::alnchase_output_w)
|
||||
display_matrix(17, 9, m_plate, m_grid);
|
||||
}
|
||||
|
||||
READ8_MEMBER(hh_ucom4_state::alnchase_input_r)
|
||||
READ8_MEMBER(alnchase_state::input_r)
|
||||
{
|
||||
// A: buttons
|
||||
return read_inputs(2);
|
||||
}
|
||||
|
||||
|
||||
// config
|
||||
|
||||
/* physical button layout and labels is like this:
|
||||
|
||||
POWER SOUND LEVEL PLAYER
|
||||
@ -1008,20 +1085,19 @@ static INPUT_PORTS_START( alnchase )
|
||||
PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
static MACHINE_CONFIG_START( alnchase, hh_ucom4_state )
|
||||
static MACHINE_CONFIG_START( alnchase, alnchase_state )
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", NEC_D553, XTAL_400kHz)
|
||||
MCFG_UCOM4_READ_A_CB(READ8(hh_ucom4_state, alnchase_input_r))
|
||||
MCFG_UCOM4_READ_A_CB(READ8(alnchase_state, input_r))
|
||||
MCFG_UCOM4_READ_B_CB(IOPORT("IN.2"))
|
||||
MCFG_UCOM4_WRITE_C_CB(WRITE8(hh_ucom4_state, alnchase_output_w))
|
||||
MCFG_UCOM4_WRITE_D_CB(WRITE8(hh_ucom4_state, alnchase_output_w))
|
||||
MCFG_UCOM4_WRITE_E_CB(WRITE8(hh_ucom4_state, alnchase_output_w))
|
||||
MCFG_UCOM4_WRITE_F_CB(WRITE8(hh_ucom4_state, alnchase_output_w))
|
||||
MCFG_UCOM4_WRITE_G_CB(WRITE8(hh_ucom4_state, alnchase_output_w))
|
||||
MCFG_UCOM4_WRITE_H_CB(WRITE8(hh_ucom4_state, alnchase_output_w))
|
||||
MCFG_UCOM4_WRITE_I_CB(WRITE8(hh_ucom4_state, alnchase_output_w))
|
||||
MCFG_UCOM4_WRITE_C_CB(WRITE8(alnchase_state, output_w))
|
||||
MCFG_UCOM4_WRITE_D_CB(WRITE8(alnchase_state, output_w))
|
||||
MCFG_UCOM4_WRITE_E_CB(WRITE8(alnchase_state, output_w))
|
||||
MCFG_UCOM4_WRITE_F_CB(WRITE8(alnchase_state, output_w))
|
||||
MCFG_UCOM4_WRITE_G_CB(WRITE8(alnchase_state, output_w))
|
||||
MCFG_UCOM4_WRITE_H_CB(WRITE8(alnchase_state, output_w))
|
||||
MCFG_UCOM4_WRITE_I_CB(WRITE8(alnchase_state, output_w))
|
||||
|
||||
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_ucom4_state, display_decay_tick, attotime::from_msec(1))
|
||||
MCFG_DEFAULT_LAYOUT(layout_hh_ucom4_test)
|
||||
|
@ -8,7 +8,7 @@
|
||||
* TMS1400NLL MP7332-N1.U1(Rev. B) or MP7332-N2LL(Rev. C), die labeled MP7332
|
||||
(assume same ROM contents between revisions)
|
||||
* SN75494N MOS-to-LED digit driver
|
||||
* rotating reel + lightsensor
|
||||
* rotating reel + lightsensor, 1bit-sound
|
||||
|
||||
This is a board game, it obviously requires game pieces and the board.
|
||||
The emulated part is the centerpiece, a black tower with a rotating card
|
||||
@ -32,7 +32,7 @@ public:
|
||||
: hh_tms1k_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void mbdtower_display();
|
||||
void prepare_display();
|
||||
bool sensor_led_on() { return m_display_decay[0][0] != 0; }
|
||||
|
||||
int m_motor_pos;
|
||||
@ -58,7 +58,7 @@ protected:
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
void mbdtower_state::mbdtower_display()
|
||||
void mbdtower_state::prepare_display()
|
||||
{
|
||||
// declare display matrix size and the 2 7segs
|
||||
set_display_size(7, 3);
|
||||
@ -148,7 +148,7 @@ WRITE16_MEMBER(mbdtower_state::write_r)
|
||||
// R5-R7: tower lamps
|
||||
// R8: rotation sensor led
|
||||
m_r = data;
|
||||
mbdtower_display();
|
||||
prepare_display();
|
||||
|
||||
// R10: speaker out
|
||||
m_speaker->level_w(~data >> 4 & data >> 10 & 1);
|
||||
@ -159,7 +159,7 @@ WRITE16_MEMBER(mbdtower_state::write_o)
|
||||
// O0-O6: led segments A-G
|
||||
// O7: digit select
|
||||
m_o = data;
|
||||
mbdtower_display();
|
||||
prepare_display();
|
||||
}
|
||||
|
||||
READ8_MEMBER(mbdtower_state::read_k)
|
||||
@ -226,13 +226,14 @@ void mbdtower_state::machine_start()
|
||||
{
|
||||
hh_tms1k_state::machine_start();
|
||||
|
||||
// zerofill/register for savestates
|
||||
// zerofill
|
||||
m_motor_pos = 0;
|
||||
m_motor_pos_prev = -1;
|
||||
m_motor_decay = 0;
|
||||
m_motor_on = false;
|
||||
m_sensor_blind = false;
|
||||
|
||||
// register for savestates
|
||||
save_item(NAME(m_motor_pos));
|
||||
/* save_item(NAME(m_motor_pos_prev)); */ // don't save!
|
||||
save_item(NAME(m_motor_decay));
|
||||
|
@ -162,6 +162,8 @@ public:
|
||||
DECLARE_WRITE_LINE_MEMBER(pc88va_tc_w);
|
||||
DECLARE_READ8_MEMBER(fdc_dma_r);
|
||||
DECLARE_WRITE8_MEMBER(fdc_dma_w);
|
||||
DECLARE_READ8_MEMBER(dma_memr_cb);
|
||||
DECLARE_WRITE8_MEMBER(dma_memw_cb);
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER(fdc_irq);
|
||||
DECLARE_WRITE_LINE_MEMBER(fdc_drq);
|
||||
@ -1761,6 +1763,18 @@ static SLOT_INTERFACE_START( pc88va_floppies )
|
||||
SLOT_INTERFACE( "525hd", FLOPPY_525_HD )
|
||||
SLOT_INTERFACE_END
|
||||
|
||||
READ8_MEMBER(pc88va_state::dma_memr_cb)
|
||||
{
|
||||
printf("%08x\n",offset);
|
||||
return 0;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(pc88va_state::dma_memw_cb)
|
||||
{
|
||||
printf("%08x %02x\n",offset,data);
|
||||
}
|
||||
|
||||
|
||||
static MACHINE_CONFIG_START( pc88va, pc88va_state )
|
||||
|
||||
MCFG_CPU_ADD("maincpu", V30, 8000000) /* 8 MHz */
|
||||
@ -1816,6 +1830,8 @@ static MACHINE_CONFIG_START( pc88va, pc88va_state )
|
||||
MCFG_AM9517A_OUT_EOP_CB(WRITELINE(pc88va_state, pc88va_tc_w))
|
||||
MCFG_AM9517A_IN_IOR_2_CB(READ8(pc88va_state, fdc_dma_r))
|
||||
MCFG_AM9517A_OUT_IOW_2_CB(WRITE8(pc88va_state, fdc_dma_w))
|
||||
MCFG_AM9517A_IN_MEMR_CB(READ8(pc88va_state, dma_memr_cb))
|
||||
MCFG_AM9517A_OUT_MEMW_CB(WRITE8(pc88va_state, dma_memw_cb))
|
||||
|
||||
|
||||
MCFG_UPD765A_ADD("upd765", false, true)
|
||||
|
@ -31,37 +31,6 @@ public:
|
||||
: hh_tms1k_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void display_matrix_seg(int maxx, int maxy, UINT32 setx, UINT32 sety, UINT16 segmask);
|
||||
|
||||
// calculator-specific handlers
|
||||
void tisr16_display();
|
||||
DECLARE_WRITE16_MEMBER(tisr16_write_o);
|
||||
DECLARE_WRITE16_MEMBER(tisr16_write_r);
|
||||
DECLARE_READ8_MEMBER(tisr16_read_k);
|
||||
|
||||
DECLARE_WRITE16_MEMBER(ti1270_write_o);
|
||||
DECLARE_WRITE16_MEMBER(ti1270_write_r);
|
||||
DECLARE_READ8_MEMBER(ti1270_read_k);
|
||||
|
||||
DECLARE_WRITE16_MEMBER(ti1000_write_o);
|
||||
DECLARE_WRITE16_MEMBER(ti1000_write_r);
|
||||
DECLARE_READ8_MEMBER(ti1000_read_k);
|
||||
|
||||
DECLARE_WRITE16_MEMBER(wizatron_write_o);
|
||||
DECLARE_WRITE16_MEMBER(wizatron_write_r);
|
||||
DECLARE_READ8_MEMBER(wizatron_read_k);
|
||||
|
||||
DECLARE_WRITE16_MEMBER(lilprof_write_o);
|
||||
DECLARE_READ8_MEMBER(lilprof_read_k);
|
||||
|
||||
DECLARE_WRITE16_MEMBER(lilprof78_write_o);
|
||||
DECLARE_WRITE16_MEMBER(lilprof78_write_r);
|
||||
DECLARE_READ8_MEMBER(lilprof78_read_k);
|
||||
|
||||
DECLARE_WRITE16_MEMBER(ti30_write_o);
|
||||
DECLARE_WRITE16_MEMBER(ti30_write_r);
|
||||
DECLARE_READ8_MEMBER(ti30_read_k);
|
||||
|
||||
protected:
|
||||
virtual void machine_start();
|
||||
};
|
||||
@ -73,31 +42,41 @@ void ticalc1x_state::machine_start()
|
||||
memset(m_display_segmask, ~0, sizeof(m_display_segmask)); // !
|
||||
}
|
||||
|
||||
void ticalc1x_state::display_matrix_seg(int maxx, int maxy, UINT32 setx, UINT32 sety, UINT16 segmask)
|
||||
{
|
||||
for (int y = 0; y < maxy; y++)
|
||||
m_display_segmask[y] &= segmask;
|
||||
|
||||
display_matrix(maxx, maxy, setx, sety);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
Minidrivers (I/O, Inputs, Machine Config)
|
||||
Minidrivers (subclass, I/O, Inputs, Machine Config)
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
TI SR-16
|
||||
* TMS1000 MCU labeled TMS1001NL. die labeled 1000, 1001A
|
||||
TI SR-16, SR-16 II
|
||||
* SR-16: TMS1000 MCU labeled TMS1001NL. die labeled 1000, 1001A
|
||||
* SR-16 II: TMS1000 MCU labeled TMS1016NL. die labeled 1000B, 1016A
|
||||
* 12-digit 7seg LED display
|
||||
|
||||
SR-16 II is a cost-reduced 'sequel', [10^x] was removed, and [pi] was added.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
void ticalc1x_state::tisr16_display()
|
||||
class tisr16_state : public ticalc1x_state
|
||||
{
|
||||
public:
|
||||
tisr16_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: ticalc1x_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void prepare_display();
|
||||
DECLARE_WRITE16_MEMBER(write_o);
|
||||
DECLARE_WRITE16_MEMBER(write_r);
|
||||
DECLARE_READ8_MEMBER(read_k);
|
||||
};
|
||||
|
||||
// handlers
|
||||
|
||||
void tisr16_state::prepare_display()
|
||||
{
|
||||
// update leds state
|
||||
for (int y = 0; y < 11; y++)
|
||||
@ -111,27 +90,29 @@ void ticalc1x_state::tisr16_display()
|
||||
display_update();
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(ticalc1x_state::tisr16_write_r)
|
||||
WRITE16_MEMBER(tisr16_state::write_r)
|
||||
{
|
||||
// R0-R10: input mux
|
||||
// R0-R10: select digit (right-to-left)
|
||||
m_r = m_inp_mux = data;
|
||||
tisr16_display();
|
||||
prepare_display();
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(ticalc1x_state::tisr16_write_o)
|
||||
WRITE16_MEMBER(tisr16_state::write_o)
|
||||
{
|
||||
// O0-O7: digit segments
|
||||
m_o = data;
|
||||
tisr16_display();
|
||||
prepare_display();
|
||||
}
|
||||
|
||||
READ8_MEMBER(ticalc1x_state::tisr16_read_k)
|
||||
READ8_MEMBER(tisr16_state::read_k)
|
||||
{
|
||||
return read_inputs(11);
|
||||
}
|
||||
|
||||
|
||||
// config
|
||||
|
||||
static INPUT_PORTS_START( tisr16 )
|
||||
PORT_START("IN.0") // R0
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
@ -201,38 +182,6 @@ static INPUT_PORTS_START( tisr16 )
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
static MACHINE_CONFIG_START( tisr16, ticalc1x_state )
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", TMS1000, 300000) // RC osc. R=43K, C=68pf -> ~300kHz
|
||||
MCFG_TMS1XXX_READ_K_CB(READ8(ticalc1x_state, tisr16_read_k))
|
||||
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(ticalc1x_state, tisr16_write_o))
|
||||
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(ticalc1x_state, tisr16_write_r))
|
||||
|
||||
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1))
|
||||
MCFG_DEFAULT_LAYOUT(layout_tisr16)
|
||||
|
||||
/* no video! */
|
||||
|
||||
/* no sound! */
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
TI SR-16 II
|
||||
* TMS1000 MCU labeled TMS1016NL. die labeled 1000B, 1016A
|
||||
* 12-digit 7seg LED display
|
||||
|
||||
A cost-reduced 'sequel', [10^x] was removed, and [pi] was added.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
// hardware is nearly identical to TI SR-16 above, so we simply use those handlers
|
||||
|
||||
static INPUT_PORTS_START( tisr16ii )
|
||||
PORT_START("IN.0") // R0
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
@ -302,10 +251,20 @@ static INPUT_PORTS_START( tisr16ii )
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
static MACHINE_CONFIG_DERIVED( tisr16ii, tisr16 )
|
||||
static MACHINE_CONFIG_START( tisr16, tisr16_state )
|
||||
|
||||
/* basic machine hardware */
|
||||
// the MCU RC osc. is different: R=30K, C=100pf -> ~300kHz(same freq as tisr16, no change needed)
|
||||
MCFG_CPU_ADD("maincpu", TMS1000, 300000) // RC osc. R=43K, C=68pf -> ~300kHz (note: tisr16ii MCU RC osc. is different: R=30K, C=100pf -> also ~300kHz)
|
||||
MCFG_TMS1XXX_READ_K_CB(READ8(tisr16_state, read_k))
|
||||
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(tisr16_state, write_o))
|
||||
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(tisr16_state, write_r))
|
||||
|
||||
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1))
|
||||
MCFG_DEFAULT_LAYOUT(layout_tisr16)
|
||||
|
||||
/* no video! */
|
||||
|
||||
/* no sound! */
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
@ -320,13 +279,27 @@ MACHINE_CONFIG_END
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
WRITE16_MEMBER(ticalc1x_state::ti1270_write_r)
|
||||
class ti1270_state : public ticalc1x_state
|
||||
{
|
||||
public:
|
||||
ti1270_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: ticalc1x_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
DECLARE_WRITE16_MEMBER(write_o);
|
||||
DECLARE_WRITE16_MEMBER(write_r);
|
||||
DECLARE_READ8_MEMBER(read_k);
|
||||
};
|
||||
|
||||
// handlers
|
||||
|
||||
WRITE16_MEMBER(ti1270_state::write_r)
|
||||
{
|
||||
// R0-R7: select digit (right-to-left)
|
||||
display_matrix_seg(8, 8, m_o, data, 0xff);
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(ticalc1x_state::ti1270_write_o)
|
||||
WRITE16_MEMBER(ti1270_state::write_o)
|
||||
{
|
||||
// O1-O5,O7: input mux
|
||||
// O0-O7: digit segments
|
||||
@ -334,12 +307,14 @@ WRITE16_MEMBER(ticalc1x_state::ti1270_write_o)
|
||||
m_o = data;
|
||||
}
|
||||
|
||||
READ8_MEMBER(ticalc1x_state::ti1270_read_k)
|
||||
READ8_MEMBER(ti1270_state::read_k)
|
||||
{
|
||||
return read_inputs(6);
|
||||
}
|
||||
|
||||
|
||||
// config
|
||||
|
||||
static INPUT_PORTS_START( ti1270 )
|
||||
PORT_START("IN.0") // O1
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSPACE) PORT_CODE(KEYCODE_DEL) PORT_NAME("CE/C")
|
||||
@ -378,14 +353,13 @@ static INPUT_PORTS_START( ti1270 )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS) PORT_NAME("+/-")
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
static MACHINE_CONFIG_START( ti1270, ticalc1x_state )
|
||||
static MACHINE_CONFIG_START( ti1270, ti1270_state )
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", TMS0970, 250000) // guessed
|
||||
MCFG_TMS1XXX_READ_K_CB(READ8(ticalc1x_state, ti1270_read_k))
|
||||
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(ticalc1x_state, ti1270_write_o))
|
||||
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(ticalc1x_state, ti1270_write_r))
|
||||
MCFG_TMS1XXX_READ_K_CB(READ8(ti1270_state, read_k))
|
||||
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(ti1270_state, write_o))
|
||||
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(ti1270_state, write_r))
|
||||
|
||||
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1))
|
||||
MCFG_DEFAULT_LAYOUT(layout_ti1270)
|
||||
@ -407,14 +381,28 @@ MACHINE_CONFIG_END
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
WRITE16_MEMBER(ticalc1x_state::ti1000_write_r)
|
||||
class ti1000_state : public ticalc1x_state
|
||||
{
|
||||
public:
|
||||
ti1000_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: ticalc1x_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
DECLARE_WRITE16_MEMBER(write_o);
|
||||
DECLARE_WRITE16_MEMBER(write_r);
|
||||
DECLARE_READ8_MEMBER(read_k);
|
||||
};
|
||||
|
||||
// handlers
|
||||
|
||||
WRITE16_MEMBER(ti1000_state::write_r)
|
||||
{
|
||||
// R0-R7: select digit (right-to-left)
|
||||
UINT8 o = BITSWAP8(m_o,7,4,3,2,1,0,6,5);
|
||||
display_matrix_seg(8, 8, o, data, 0xff);
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(ticalc1x_state::ti1000_write_o)
|
||||
WRITE16_MEMBER(ti1000_state::write_o)
|
||||
{
|
||||
// O0-O3,O5(?): input mux
|
||||
// O0-O7: digit segments
|
||||
@ -422,12 +410,14 @@ WRITE16_MEMBER(ticalc1x_state::ti1000_write_o)
|
||||
m_o = data;
|
||||
}
|
||||
|
||||
READ8_MEMBER(ticalc1x_state::ti1000_read_k)
|
||||
READ8_MEMBER(ti1000_state::read_k)
|
||||
{
|
||||
return read_inputs(5);
|
||||
}
|
||||
|
||||
|
||||
// config
|
||||
|
||||
static INPUT_PORTS_START( ti1000 )
|
||||
PORT_START("IN.0") // O0
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("1")
|
||||
@ -449,26 +439,25 @@ static INPUT_PORTS_START( ti1000 )
|
||||
|
||||
// note: even though power buttons are on the matrix, they are not CPU-controlled
|
||||
PORT_START("IN.3") // O3 or O4?
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGDN) PORT_NAME("Off") PORT_CHANGED_MEMBER(DEVICE_SELF, ticalc1x_state, power_button, (void *)false)
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGDN) PORT_NAME("Off") PORT_CHANGED_MEMBER(DEVICE_SELF, hh_tms1k_state, power_button, (void *)false)
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS) PORT_NAME("+/-")
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH) PORT_NAME("%")
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH_PAD) PORT_NAME(UTF8_DIVIDE)
|
||||
|
||||
PORT_START("IN.4") // O5
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGUP) PORT_CODE(KEYCODE_DEL) PORT_NAME("On/C") PORT_CHANGED_MEMBER(DEVICE_SELF, ticalc1x_state, power_button, (void *)true)
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGUP) PORT_CODE(KEYCODE_DEL) PORT_NAME("On/C") PORT_CHANGED_MEMBER(DEVICE_SELF, hh_tms1k_state, power_button, (void *)true)
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("0")
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_STOP) PORT_CODE(KEYCODE_DEL_PAD) PORT_NAME(".")
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("=")
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
static MACHINE_CONFIG_START( ti1000, ticalc1x_state )
|
||||
static MACHINE_CONFIG_START( ti1000, ti1000_state )
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", TMS1990, 250000) // guessed
|
||||
MCFG_TMS1XXX_READ_K_CB(READ8(ticalc1x_state, ti1000_read_k))
|
||||
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(ticalc1x_state, ti1000_write_o))
|
||||
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(ticalc1x_state, ti1000_write_r))
|
||||
MCFG_TMS1XXX_READ_K_CB(READ8(ti1000_state, read_k))
|
||||
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(ti1000_state, write_o))
|
||||
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(ti1000_state, write_r))
|
||||
|
||||
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1))
|
||||
MCFG_DEFAULT_LAYOUT(layout_ti1270)
|
||||
@ -490,7 +479,21 @@ MACHINE_CONFIG_END
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
WRITE16_MEMBER(ticalc1x_state::wizatron_write_r)
|
||||
class wizatron_state : public ticalc1x_state
|
||||
{
|
||||
public:
|
||||
wizatron_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: ticalc1x_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
virtual DECLARE_WRITE16_MEMBER(write_o);
|
||||
virtual DECLARE_WRITE16_MEMBER(write_r);
|
||||
virtual DECLARE_READ8_MEMBER(read_k);
|
||||
};
|
||||
|
||||
// handlers
|
||||
|
||||
WRITE16_MEMBER(wizatron_state::write_r)
|
||||
{
|
||||
// 6th digit is custom(not 7seg), for math symbols, like this:
|
||||
// \./ GAB
|
||||
@ -505,7 +508,7 @@ WRITE16_MEMBER(ticalc1x_state::wizatron_write_r)
|
||||
display_matrix_seg(7, 9, m_o, data, 0x7f);
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(ticalc1x_state::wizatron_write_o)
|
||||
WRITE16_MEMBER(wizatron_state::write_o)
|
||||
{
|
||||
// O1-O4: input mux
|
||||
// O0-O6: digit segments A-G
|
||||
@ -514,12 +517,14 @@ WRITE16_MEMBER(ticalc1x_state::wizatron_write_o)
|
||||
m_o = data & 0x7f;
|
||||
}
|
||||
|
||||
READ8_MEMBER(ticalc1x_state::wizatron_read_k)
|
||||
READ8_MEMBER(wizatron_state::read_k)
|
||||
{
|
||||
return read_inputs(4);
|
||||
}
|
||||
|
||||
|
||||
// config
|
||||
|
||||
static INPUT_PORTS_START( wizatron )
|
||||
PORT_START("IN.0") // O1
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_DEL) PORT_NAME("Clear")
|
||||
@ -546,14 +551,13 @@ static INPUT_PORTS_START( wizatron )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_SLASH_PAD) PORT_NAME(UTF8_DIVIDE)
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
static MACHINE_CONFIG_START( wizatron, ticalc1x_state )
|
||||
static MACHINE_CONFIG_START( wizatron, wizatron_state )
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", TMS0970, 250000) // guessed
|
||||
MCFG_TMS1XXX_READ_K_CB(READ8(ticalc1x_state, wizatron_read_k))
|
||||
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(ticalc1x_state, wizatron_write_o))
|
||||
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(ticalc1x_state, wizatron_write_r))
|
||||
MCFG_TMS1XXX_READ_K_CB(READ8(wizatron_state, read_k))
|
||||
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(wizatron_state, write_o))
|
||||
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(wizatron_state, write_r))
|
||||
|
||||
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1))
|
||||
MCFG_DEFAULT_LAYOUT(layout_wizatron)
|
||||
@ -578,7 +582,20 @@ MACHINE_CONFIG_END
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
WRITE16_MEMBER(ticalc1x_state::lilprof_write_o)
|
||||
class lilprof_state : public wizatron_state
|
||||
{
|
||||
public:
|
||||
lilprof_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: wizatron_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
virtual DECLARE_WRITE16_MEMBER(write_o);
|
||||
virtual DECLARE_READ8_MEMBER(read_k);
|
||||
};
|
||||
|
||||
// handlers
|
||||
|
||||
WRITE16_MEMBER(lilprof_state::write_o)
|
||||
{
|
||||
// O1-O4,O7: input mux
|
||||
// O0-O6: digit segments A-G
|
||||
@ -586,12 +603,14 @@ WRITE16_MEMBER(ticalc1x_state::lilprof_write_o)
|
||||
m_o = data;
|
||||
}
|
||||
|
||||
READ8_MEMBER(ticalc1x_state::lilprof_read_k)
|
||||
READ8_MEMBER(lilprof_state::read_k)
|
||||
{
|
||||
return read_inputs(5);
|
||||
}
|
||||
|
||||
|
||||
// config
|
||||
|
||||
static INPUT_PORTS_START( lilprof )
|
||||
PORT_INCLUDE( wizatron )
|
||||
|
||||
@ -607,14 +626,13 @@ static INPUT_PORTS_START( lilprof )
|
||||
PORT_CONFSETTING( 0x08, "4" )
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
static MACHINE_CONFIG_START( lilprof, ticalc1x_state )
|
||||
static MACHINE_CONFIG_START( lilprof, lilprof_state )
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", TMS0970, 250000) // guessed
|
||||
MCFG_TMS1XXX_READ_K_CB(READ8(ticalc1x_state, lilprof_read_k))
|
||||
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(ticalc1x_state, lilprof_write_o))
|
||||
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(ticalc1x_state, wizatron_write_r))
|
||||
MCFG_TMS1XXX_READ_K_CB(READ8(lilprof_state, read_k))
|
||||
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(lilprof_state, write_o))
|
||||
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(wizatron_state, write_r))
|
||||
|
||||
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1))
|
||||
MCFG_DEFAULT_LAYOUT(layout_wizatron)
|
||||
@ -639,7 +657,21 @@ MACHINE_CONFIG_END
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
WRITE16_MEMBER(ticalc1x_state::lilprof78_write_r)
|
||||
class lilprof78_state : public ticalc1x_state
|
||||
{
|
||||
public:
|
||||
lilprof78_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: ticalc1x_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
DECLARE_WRITE16_MEMBER(write_o);
|
||||
DECLARE_WRITE16_MEMBER(write_r);
|
||||
DECLARE_READ8_MEMBER(read_k);
|
||||
};
|
||||
|
||||
// handlers
|
||||
|
||||
WRITE16_MEMBER(lilprof78_state::write_r)
|
||||
{
|
||||
// update leds state
|
||||
UINT8 o = BITSWAP8(m_o,7,4,3,2,1,0,6,5) & 0x7f;
|
||||
@ -651,14 +683,14 @@ WRITE16_MEMBER(ticalc1x_state::lilprof78_write_r)
|
||||
// 3rd digit A/G(equals sign) is from O7
|
||||
m_display_state[3] = (m_o & 0x80) ? 0x41 : 0;
|
||||
|
||||
// 6th digit is a custom 7seg for math symbols (see wizatron_write_r)
|
||||
// 6th digit is a custom 7seg for math symbols (see wizatron_state write_r)
|
||||
m_display_state[6] = BITSWAP8(m_display_state[6],7,6,1,4,2,3,5,0);
|
||||
|
||||
set_display_size(7, 9);
|
||||
display_update();
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(ticalc1x_state::lilprof78_write_o)
|
||||
WRITE16_MEMBER(lilprof78_state::write_o)
|
||||
{
|
||||
// O0-O3,O5(?): input mux
|
||||
// O0-O6: digit segments A-G
|
||||
@ -667,12 +699,14 @@ WRITE16_MEMBER(ticalc1x_state::lilprof78_write_o)
|
||||
m_o = data;
|
||||
}
|
||||
|
||||
READ8_MEMBER(ticalc1x_state::lilprof78_read_k)
|
||||
READ8_MEMBER(lilprof78_state::read_k)
|
||||
{
|
||||
return read_inputs(5);
|
||||
}
|
||||
|
||||
|
||||
// config
|
||||
|
||||
static INPUT_PORTS_START( lilprof78 )
|
||||
PORT_START("IN.0") // O0
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("1")
|
||||
@ -694,26 +728,25 @@ static INPUT_PORTS_START( lilprof78 )
|
||||
|
||||
// note: even though power buttons are on the matrix, they are not CPU-controlled
|
||||
PORT_START("IN.3") // O3 or O4?
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_PGDN) PORT_NAME("Off") PORT_CHANGED_MEMBER(DEVICE_SELF, ticalc1x_state, power_button, (void *)false)
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_PGDN) PORT_NAME("Off") PORT_CHANGED_MEMBER(DEVICE_SELF, hh_tms1k_state, power_button, (void *)false)
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_S) PORT_NAME("Set")
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_L) PORT_NAME("Level")
|
||||
|
||||
PORT_START("IN.4") // O5
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_PGUP) PORT_CODE(KEYCODE_DEL) PORT_NAME("On") PORT_CHANGED_MEMBER(DEVICE_SELF, ticalc1x_state, power_button, (void *)true)
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_PGUP) PORT_CODE(KEYCODE_DEL) PORT_NAME("On") PORT_CHANGED_MEMBER(DEVICE_SELF, hh_tms1k_state, power_button, (void *)true)
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("0")
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("Go")
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_PLUS_PAD) PORT_NAME("+")
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
static MACHINE_CONFIG_START( lilprof78, ticalc1x_state )
|
||||
static MACHINE_CONFIG_START( lilprof78, lilprof78_state )
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", TMS1990, 250000) // guessed
|
||||
MCFG_TMS1XXX_READ_K_CB(READ8(ticalc1x_state, lilprof78_read_k))
|
||||
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(ticalc1x_state, lilprof78_write_o))
|
||||
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(ticalc1x_state, lilprof78_write_r))
|
||||
MCFG_TMS1XXX_READ_K_CB(READ8(lilprof78_state, read_k))
|
||||
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(lilprof78_state, write_o))
|
||||
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(lilprof78_state, write_r))
|
||||
|
||||
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1))
|
||||
MCFG_DEFAULT_LAYOUT(layout_wizatron)
|
||||
@ -737,7 +770,21 @@ MACHINE_CONFIG_END
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
WRITE16_MEMBER(ticalc1x_state::ti30_write_r)
|
||||
class majestic_state : public ticalc1x_state
|
||||
{
|
||||
public:
|
||||
majestic_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: ticalc1x_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
DECLARE_WRITE16_MEMBER(write_o);
|
||||
DECLARE_WRITE16_MEMBER(write_r);
|
||||
DECLARE_READ8_MEMBER(read_k);
|
||||
};
|
||||
|
||||
// handlers
|
||||
|
||||
WRITE16_MEMBER(majestic_state::write_r)
|
||||
{
|
||||
// note: 1st digit only has segments B,F,G,DP
|
||||
m_display_segmask[0] = 0xe2;
|
||||
@ -747,7 +794,7 @@ WRITE16_MEMBER(ticalc1x_state::ti30_write_r)
|
||||
display_matrix_seg(8, 9, o, data, 0xff);
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(ticalc1x_state::ti30_write_o)
|
||||
WRITE16_MEMBER(majestic_state::write_o)
|
||||
{
|
||||
// O0-O2,O4-O7: input mux
|
||||
// O0-O7: digit segments
|
||||
@ -755,13 +802,15 @@ WRITE16_MEMBER(ticalc1x_state::ti30_write_o)
|
||||
m_o = data;
|
||||
}
|
||||
|
||||
READ8_MEMBER(ticalc1x_state::ti30_read_k)
|
||||
READ8_MEMBER(majestic_state::read_k)
|
||||
{
|
||||
// note: the Vss row is always on
|
||||
return m_inp_matrix[7]->read() | read_inputs(7);
|
||||
}
|
||||
|
||||
|
||||
// config
|
||||
|
||||
static INPUT_PORTS_START( ti30 )
|
||||
PORT_START("IN.0") // O0
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y) PORT_NAME("y" UTF8_POW_X)
|
||||
@ -814,11 +863,11 @@ static INPUT_PORTS_START( ti30 )
|
||||
|
||||
// note: even though power buttons are on the matrix, they are not CPU-controlled
|
||||
PORT_START("IN.7") // Vss!
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGUP) PORT_CODE(KEYCODE_DEL) PORT_NAME("ON/C") PORT_CHANGED_MEMBER(DEVICE_SELF, ticalc1x_state, power_button, (void *)true)
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGUP) PORT_CODE(KEYCODE_DEL) PORT_NAME("ON/C") PORT_CHANGED_MEMBER(DEVICE_SELF, hh_tms1k_state, power_button, (void *)true)
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_NAME("1/x")
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R) PORT_NAME(UTF8_SQUAREROOT"x")
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_NAME("x" UTF8_POW_2)
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGDN) PORT_NAME("OFF") PORT_CHANGED_MEMBER(DEVICE_SELF, ticalc1x_state, power_button, (void *)false)
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGDN) PORT_NAME("OFF") PORT_CHANGED_MEMBER(DEVICE_SELF, hh_tms1k_state, power_button, (void *)false)
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
@ -874,11 +923,11 @@ static INPUT_PORTS_START( tiprog )
|
||||
|
||||
// note: even though power buttons are on the matrix, they are not CPU-controlled
|
||||
PORT_START("IN.7") // Vss!
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_DEL) PORT_CODE(KEYCODE_PGUP) PORT_NAME("C/ON") PORT_CHANGED_MEMBER(DEVICE_SELF, ticalc1x_state, power_button, (void *)true)
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_DEL) PORT_CODE(KEYCODE_PGUP) PORT_NAME("C/ON") PORT_CHANGED_MEMBER(DEVICE_SELF, hh_tms1k_state, power_button, (void *)true)
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) PORT_NAME("DEC")
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_NAME("OCT")
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_NAME("HEX")
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGDN) PORT_NAME("OFF") PORT_CHANGED_MEMBER(DEVICE_SELF, ticalc1x_state, power_button, (void *)false)
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGDN) PORT_NAME("OFF") PORT_CHANGED_MEMBER(DEVICE_SELF, hh_tms1k_state, power_button, (void *)false)
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
@ -935,22 +984,22 @@ static INPUT_PORTS_START( tibusan1 )
|
||||
|
||||
// note: even though power buttons are on the matrix, they are not CPU-controlled
|
||||
PORT_START("IN.7") // Vss!
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGUP) PORT_CODE(KEYCODE_DEL) PORT_NAME("ON/C") PORT_CHANGED_MEMBER(DEVICE_SELF, ticalc1x_state, power_button, (void *)true)
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGUP) PORT_CODE(KEYCODE_DEL) PORT_NAME("ON/C") PORT_CHANGED_MEMBER(DEVICE_SELF, hh_tms1k_state, power_button, (void *)true)
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_NAME("2nd")
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_NAME("x" UTF8_POW_2" " UTF8_SQUAREROOT"x")
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_NAME("ln(x) e" UTF8_POW_X)
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGDN) PORT_NAME("OFF") PORT_CHANGED_MEMBER(DEVICE_SELF, ticalc1x_state, power_button, (void *)false)
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGDN) PORT_NAME("OFF") PORT_CHANGED_MEMBER(DEVICE_SELF, hh_tms1k_state, power_button, (void *)false)
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
static MACHINE_CONFIG_START( ti30, ticalc1x_state )
|
||||
static MACHINE_CONFIG_START( majestic, majestic_state )
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", TMS0980, 400000) // guessed
|
||||
MCFG_TMS1XXX_READ_K_CB(READ8(ticalc1x_state, ti30_read_k))
|
||||
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(ticalc1x_state, ti30_write_o))
|
||||
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(ticalc1x_state, ti30_write_r))
|
||||
MCFG_TMS1XXX_POWER_OFF_CB(WRITELINE(ticalc1x_state, auto_power_off))
|
||||
MCFG_TMS1XXX_READ_K_CB(READ8(majestic_state, read_k))
|
||||
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(majestic_state, write_o))
|
||||
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(majestic_state, write_r))
|
||||
MCFG_TMS1XXX_POWER_OFF_CB(WRITELINE(hh_tms1k_state, auto_power_off))
|
||||
|
||||
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1))
|
||||
MCFG_DEFAULT_LAYOUT(layout_ti30)
|
||||
@ -1114,7 +1163,7 @@ ROM_END
|
||||
|
||||
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY, FULLNAME, FLAGS */
|
||||
COMP( 1974, tisr16, 0, 0, tisr16, tisr16, driver_device, 0, "Texas Instruments", "SR-16", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW )
|
||||
COMP( 1975, tisr16ii, 0, 0, tisr16ii, tisr16ii, driver_device, 0, "Texas Instruments", "SR-16 II", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW )
|
||||
COMP( 1975, tisr16ii, 0, 0, tisr16, tisr16ii, driver_device, 0, "Texas Instruments", "SR-16 II", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW )
|
||||
|
||||
COMP( 1976, ti1270, 0, 0, ti1270, ti1270, driver_device, 0, "Texas Instruments", "TI-1270", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW )
|
||||
COMP( 1977, ti1000, 0, 0, ti1000, ti1000, driver_device, 0, "Texas Instruments", "TI-1000", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW )
|
||||
@ -1122,6 +1171,6 @@ COMP( 1977, wizatron, 0, 0, wizatron, wizatron, driver_device, 0, "Tex
|
||||
COMP( 1976, lilprof, 0, 0, lilprof, lilprof, driver_device, 0, "Texas Instruments", "Little Professor (1976 version)", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW )
|
||||
COMP( 1978, lilprof78, lilprof, 0, lilprof78, lilprof78, driver_device, 0, "Texas Instruments", "Little Professor (1978 version)", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW )
|
||||
|
||||
COMP( 1976, ti30, 0, 0, ti30, ti30, driver_device, 0, "Texas Instruments", "TI-30", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW )
|
||||
COMP( 1977, tiprog, 0, 0, ti30, tiprog, driver_device, 0, "Texas Instruments", "TI Programmer", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW )
|
||||
COMP( 1979, tibusan1, 0, 0, ti30, tibusan1, driver_device, 0, "Texas Instruments", "TI Business Analyst-I", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW )
|
||||
COMP( 1976, ti30, 0, 0, majestic, ti30, driver_device, 0, "Texas Instruments", "TI-30", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW )
|
||||
COMP( 1977, tiprog, 0, 0, majestic, tiprog, driver_device, 0, "Texas Instruments", "TI Programmer", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW )
|
||||
COMP( 1979, tibusan1, 0, 0, majestic, tibusan1, driver_device, 0, "Texas Instruments", "TI Business Analyst-I", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW )
|
||||
|
@ -314,6 +314,7 @@ public:
|
||||
// cartridge
|
||||
UINT32 m_cart_max_size;
|
||||
UINT8* m_cart_base;
|
||||
void init_cartridge();
|
||||
DECLARE_DEVICE_IMAGE_LOAD_MEMBER(tispeak_cartridge);
|
||||
DECLARE_DRIVER_INIT(snspell);
|
||||
DECLARE_DRIVER_INIT(lantutor);
|
||||
@ -326,20 +327,40 @@ public:
|
||||
|
||||
DECLARE_INPUT_CHANGED_MEMBER(snspell_power_button);
|
||||
void snspell_power_off();
|
||||
void snspell_display();
|
||||
void prepare_display();
|
||||
|
||||
protected:
|
||||
virtual void machine_start();
|
||||
};
|
||||
|
||||
|
||||
void tispeak_state::machine_start()
|
||||
{
|
||||
hh_tms1k_state::machine_start();
|
||||
memset(m_display_segmask, ~0, sizeof(m_display_segmask)); // !
|
||||
|
||||
init_cartridge();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
File Handling
|
||||
Cartridge Handling
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
void tispeak_state::init_cartridge()
|
||||
{
|
||||
if (m_cart != NULL && m_cart->exists())
|
||||
{
|
||||
astring region_tag;
|
||||
memory_region *src = memregion(region_tag.cpy(m_cart->tag()).cat(GENERIC_ROM_REGION_TAG));
|
||||
if (src)
|
||||
memcpy(m_cart_base, src->base(), src->bytes());
|
||||
}
|
||||
}
|
||||
|
||||
DEVICE_IMAGE_LOAD_MEMBER(tispeak_state, tispeak_cartridge)
|
||||
{
|
||||
UINT32 size = m_cart->common_get_size("rom");
|
||||
@ -379,18 +400,9 @@ DRIVER_INIT_MEMBER(tispeak_state, lantutor)
|
||||
|
||||
// common/snspell
|
||||
|
||||
void tispeak_state::snspell_display()
|
||||
void tispeak_state::prepare_display()
|
||||
{
|
||||
for (int y = 0; y < 16; y++)
|
||||
m_display_segmask[y] = 0x3fff;
|
||||
|
||||
display_matrix(16, 16, m_o, (m_r & 0x8000) ? (m_r & 0x21ff) : 0);
|
||||
}
|
||||
|
||||
READ8_MEMBER(tispeak_state::snspell_read_k)
|
||||
{
|
||||
// note: the Vss row is always on
|
||||
return m_inp_matrix[8]->read() | read_inputs(8);
|
||||
display_matrix_seg(16, 16, m_o, (m_r & 0x8000) ? (m_r & 0x21ff) : 0, 0x3fff);
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(tispeak_state::snspell_write_r)
|
||||
@ -403,7 +415,7 @@ WRITE16_MEMBER(tispeak_state::snspell_write_r)
|
||||
// R15: filament on
|
||||
// other bits: MCU internal use
|
||||
m_r = m_inp_mux = data;
|
||||
snspell_display();
|
||||
prepare_display();
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(tispeak_state::snspell_write_o)
|
||||
@ -411,7 +423,13 @@ WRITE16_MEMBER(tispeak_state::snspell_write_o)
|
||||
// reorder opla to led14seg, plus DP as d14 and AP as d15:
|
||||
// E,D,C,G,B,A,I,M,L,K,N,J,[AP],H,F,[DP] (sidenote: TI KLMN = MAME MLNK)
|
||||
m_o = BITSWAP16(data,12,15,10,7,8,9,11,6,13,3,14,0,1,2,4,5);
|
||||
snspell_display();
|
||||
prepare_display();
|
||||
}
|
||||
|
||||
READ8_MEMBER(tispeak_state::snspell_read_k)
|
||||
{
|
||||
// note: the Vss row is always on
|
||||
return m_inp_matrix[8]->read() | read_inputs(8);
|
||||
}
|
||||
|
||||
|
||||
@ -432,7 +450,7 @@ WRITE16_MEMBER(tispeak_state::snmath_write_o)
|
||||
// reorder opla to led14seg, plus DP as d14 and AP as d15:
|
||||
// [DP],D,C,H,F,B,I,M,L,K,N,J,[AP],E,G,A (sidenote: TI KLMN = MAME MLNK)
|
||||
m_o = BITSWAP16(data,12,0,10,7,8,9,11,6,3,14,4,13,1,2,5,15);
|
||||
snspell_display();
|
||||
prepare_display();
|
||||
}
|
||||
|
||||
|
||||
@ -442,7 +460,7 @@ WRITE16_MEMBER(tispeak_state::lantutor_write_r)
|
||||
{
|
||||
// same as default, except R13 is used for an extra digit
|
||||
m_r = m_inp_mux = data;
|
||||
snspell_display();
|
||||
prepare_display();
|
||||
}
|
||||
|
||||
|
||||
@ -639,21 +657,6 @@ INPUT_PORTS_END
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
void tispeak_state::machine_start()
|
||||
{
|
||||
hh_tms1k_state::machine_start();
|
||||
|
||||
// init cartridge
|
||||
if (m_cart != NULL && m_cart->exists())
|
||||
{
|
||||
astring region_tag;
|
||||
memory_region *src = memregion(region_tag.cpy(m_cart->tag()).cat(GENERIC_ROM_REGION_TAG));
|
||||
if (src)
|
||||
memcpy(m_cart_base, src->base(), src->bytes());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static MACHINE_CONFIG_START( snmath, tispeak_state )
|
||||
|
||||
/* basic machine hardware */
|
||||
@ -919,17 +922,18 @@ ROM_END
|
||||
|
||||
|
||||
|
||||
COMP( 1978, snspell, 0, 0, snspell, snspell, tispeak_state, snspell, "Texas Instruments", "Speak & Spell (US, 1978 version/prototype)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND )
|
||||
COMP( 1979, snspella, snspell, 0, snspell, snspell, tispeak_state, snspell, "Texas Instruments", "Speak & Spell (US, 1979 version)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) // incomplete dump, uses prototype MCU ROM
|
||||
COMP( 1980, snspellb, snspell, 0, snspell, snspell, tispeak_state, snspell, "Texas Instruments", "Speak & Spell (US, 1980 version)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) // incomplete dump, uses prototype MCU ROM
|
||||
COMP( 1978, snspelluk, snspell, 0, snspell, snspell, tispeak_state, snspell, "Texas Instruments", "Speak & Spell (UK, 1978 version)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) // incomplete dump, uses prototype MCU ROM
|
||||
COMP( 1981, snspelluka, snspell, 0, snspell, snspell, tispeak_state, snspell, "Texas Instruments", "Speak & Spell (UK, 1981 version)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) // incomplete dump, uses prototype MCU ROM
|
||||
COMP( 1979, snspelljp, snspell, 0, snspell, snspell, tispeak_state, snspell, "Texas Instruments", "Speak & Spell (Japan)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) // incomplete dump, uses prototype MCU ROM
|
||||
COMP( 1980, ladictee, snspell, 0, snspell, snspell, tispeak_state, snspell, "Texas Instruments", "La Dictee Magique (France)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) // doesn't work due to missing CD2702 MCU dump, German/Italian version has CD2702 too
|
||||
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY, FULLNAME, FLAGS */
|
||||
COMP( 1978, snspell, 0, 0, snspell, snspell, tispeak_state, snspell, "Texas Instruments", "Speak & Spell (US, 1978 version/prototype)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND )
|
||||
COMP( 1979, snspella, snspell, 0, snspell, snspell, tispeak_state, snspell, "Texas Instruments", "Speak & Spell (US, 1979 version)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) // incomplete dump, uses prototype MCU ROM
|
||||
COMP( 1980, snspellb, snspell, 0, snspell, snspell, tispeak_state, snspell, "Texas Instruments", "Speak & Spell (US, 1980 version)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) // incomplete dump, uses prototype MCU ROM
|
||||
COMP( 1978, snspelluk, snspell, 0, snspell, snspell, tispeak_state, snspell, "Texas Instruments", "Speak & Spell (UK, 1978 version)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) // incomplete dump, uses prototype MCU ROM
|
||||
COMP( 1981, snspelluka, snspell, 0, snspell, snspell, tispeak_state, snspell, "Texas Instruments", "Speak & Spell (UK, 1981 version)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) // incomplete dump, uses prototype MCU ROM
|
||||
COMP( 1979, snspelljp, snspell, 0, snspell, snspell, tispeak_state, snspell, "Texas Instruments", "Speak & Spell (Japan)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) // incomplete dump, uses prototype MCU ROM
|
||||
COMP( 1980, ladictee, snspell, 0, snspell, snspell, tispeak_state, snspell, "Texas Instruments", "La Dictee Magique (France)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) // doesn't work due to missing CD2702 MCU dump, German/Italian version has CD2702 too
|
||||
|
||||
COMP( 1986, snmath, 0, 0, snmath, snmath, driver_device, 0, "Texas Instruments", "Speak & Math (US, 1986 version)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND )
|
||||
COMP( 1980, snmathp, snmath, 0, snmath, snmath, driver_device, 0, "Texas Instruments", "Speak & Math (US, 1980 version/prototype)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING )
|
||||
COMP( 1986, snmath, 0, 0, snmath, snmath, driver_device, 0, "Texas Instruments", "Speak & Math (US, 1986 version)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND )
|
||||
COMP( 1980, snmathp, snmath, 0, snmath, snmath, driver_device, 0, "Texas Instruments", "Speak & Math (US, 1980 version/prototype)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING )
|
||||
|
||||
COMP( 1980, snread, 0, 0, snread, snread, tispeak_state, snspell, "Texas Instruments", "Speak & Read (US)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND )
|
||||
COMP( 1980, snread, 0, 0, snread, snread, tispeak_state, snspell, "Texas Instruments", "Speak & Read (US)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND )
|
||||
|
||||
COMP( 1979, lantutor, 0, 0, lantutor, lantutor, tispeak_state, lantutor, "Texas Instruments", "Language Tutor (prototype)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING )
|
||||
COMP( 1979, lantutor, 0, 0, lantutor, lantutor, tispeak_state, lantutor, "Texas Instruments", "Language Tutor (prototype)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING )
|
||||
|
@ -46,7 +46,7 @@ public:
|
||||
// display common
|
||||
int m_display_wait; // led/lamp off-delay in microseconds (default 33ms)
|
||||
int m_display_maxy; // display matrix number of rows
|
||||
int m_display_maxx; // display matrix number of columns
|
||||
int m_display_maxx; // display matrix number of columns (max 31 for now)
|
||||
|
||||
UINT32 m_display_state[0x20]; // display matrix rows data (last bit is used for always-on)
|
||||
UINT16 m_display_segmask[0x20]; // if not 0, display matrix row is a digit, mask indicates connected segments
|
||||
@ -57,94 +57,7 @@ public:
|
||||
void display_update();
|
||||
void set_display_size(int maxx, int maxy);
|
||||
void display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety);
|
||||
|
||||
// game-specific handlers
|
||||
void mathmagi_display();
|
||||
DECLARE_WRITE16_MEMBER(mathmagi_write_r);
|
||||
DECLARE_WRITE16_MEMBER(mathmagi_write_o);
|
||||
DECLARE_READ8_MEMBER(mathmagi_read_k);
|
||||
|
||||
void amaztron_display();
|
||||
DECLARE_WRITE16_MEMBER(amaztron_write_r);
|
||||
DECLARE_WRITE16_MEMBER(amaztron_write_o);
|
||||
DECLARE_READ8_MEMBER(amaztron_read_k);
|
||||
|
||||
void tc4_display();
|
||||
DECLARE_WRITE16_MEMBER(tc4_write_r);
|
||||
DECLARE_WRITE16_MEMBER(tc4_write_o);
|
||||
DECLARE_READ8_MEMBER(tc4_read_k);
|
||||
|
||||
void ebball_display();
|
||||
DECLARE_WRITE16_MEMBER(ebball_write_r);
|
||||
DECLARE_WRITE16_MEMBER(ebball_write_o);
|
||||
DECLARE_READ8_MEMBER(ebball_read_k);
|
||||
|
||||
void ebball2_display();
|
||||
DECLARE_WRITE16_MEMBER(ebball2_write_r);
|
||||
DECLARE_WRITE16_MEMBER(ebball2_write_o);
|
||||
DECLARE_READ8_MEMBER(ebball2_read_k);
|
||||
|
||||
void ebball3_display();
|
||||
DECLARE_WRITE16_MEMBER(ebball3_write_r);
|
||||
DECLARE_WRITE16_MEMBER(ebball3_write_o);
|
||||
DECLARE_READ8_MEMBER(ebball3_read_k);
|
||||
void ebball3_set_clock();
|
||||
DECLARE_INPUT_CHANGED_MEMBER(ebball3_difficulty_switch);
|
||||
DECLARE_MACHINE_RESET(ebball3);
|
||||
|
||||
DECLARE_WRITE16_MEMBER(elecdet_write_r);
|
||||
DECLARE_WRITE16_MEMBER(elecdet_write_o);
|
||||
DECLARE_READ8_MEMBER(elecdet_read_k);
|
||||
|
||||
void starwbc_display();
|
||||
DECLARE_WRITE16_MEMBER(starwbc_write_r);
|
||||
DECLARE_WRITE16_MEMBER(starwbc_write_o);
|
||||
DECLARE_READ8_MEMBER(starwbc_read_k);
|
||||
|
||||
void astro_display();
|
||||
DECLARE_WRITE16_MEMBER(astro_write_r);
|
||||
DECLARE_WRITE16_MEMBER(astro_write_o);
|
||||
DECLARE_READ8_MEMBER(astro_read_k);
|
||||
|
||||
DECLARE_WRITE16_MEMBER(comp4_write_r);
|
||||
DECLARE_WRITE16_MEMBER(comp4_write_o);
|
||||
DECLARE_READ8_MEMBER(comp4_read_k);
|
||||
|
||||
DECLARE_WRITE16_MEMBER(simon_write_r);
|
||||
DECLARE_WRITE16_MEMBER(simon_write_o);
|
||||
DECLARE_READ8_MEMBER(simon_read_k);
|
||||
|
||||
DECLARE_WRITE16_MEMBER(ssimon_write_r);
|
||||
DECLARE_WRITE16_MEMBER(ssimon_write_o);
|
||||
DECLARE_READ8_MEMBER(ssimon_read_k);
|
||||
void ssimon_set_clock();
|
||||
DECLARE_INPUT_CHANGED_MEMBER(ssimon_speed_switch);
|
||||
DECLARE_MACHINE_RESET(ssimon);
|
||||
|
||||
DECLARE_WRITE16_MEMBER(cnsector_write_r);
|
||||
DECLARE_WRITE16_MEMBER(cnsector_write_o);
|
||||
DECLARE_READ8_MEMBER(cnsector_read_k);
|
||||
|
||||
DECLARE_WRITE16_MEMBER(merlin_write_r);
|
||||
DECLARE_WRITE16_MEMBER(merlin_write_o);
|
||||
DECLARE_READ8_MEMBER(merlin_read_k);
|
||||
|
||||
DECLARE_WRITE16_MEMBER(stopthief_write_r);
|
||||
DECLARE_WRITE16_MEMBER(stopthief_write_o);
|
||||
DECLARE_READ8_MEMBER(stopthief_read_k);
|
||||
|
||||
DECLARE_WRITE16_MEMBER(bankshot_write_r);
|
||||
DECLARE_WRITE16_MEMBER(bankshot_write_o);
|
||||
DECLARE_READ8_MEMBER(bankshot_read_k);
|
||||
|
||||
DECLARE_WRITE16_MEMBER(splitsec_write_r);
|
||||
DECLARE_WRITE16_MEMBER(splitsec_write_o);
|
||||
DECLARE_READ8_MEMBER(splitsec_read_k);
|
||||
|
||||
void tandy12_display();
|
||||
DECLARE_WRITE16_MEMBER(tandy12_write_r);
|
||||
DECLARE_WRITE16_MEMBER(tandy12_write_o);
|
||||
DECLARE_READ8_MEMBER(tandy12_read_k);
|
||||
void display_matrix_seg(int maxx, int maxy, UINT32 setx, UINT32 sety, UINT16 segmask);
|
||||
|
||||
protected:
|
||||
virtual void machine_start();
|
||||
|
@ -9,6 +9,11 @@
|
||||
<led7seg><color red="1.0" green="0.2" blue="0.2" /></led7seg>
|
||||
</element>
|
||||
|
||||
<element name="lamp" defstate="0">
|
||||
<disk state="0"><color red="0.2" green="0.18" blue="0.16" /></disk>
|
||||
<disk state="1"><color red="1.0" green="0.95" blue="0.9" /></disk>
|
||||
</element>
|
||||
|
||||
|
||||
|
||||
<!-- build screen -->
|
||||
@ -19,6 +24,36 @@
|
||||
<bounds left="0" right="100" top="0" bottom="100" />
|
||||
</bezel>
|
||||
|
||||
<bezel name="digit2" element="digit"><bounds x="0" y="0" width="10" height="15" /></bezel>
|
||||
<bezel name="digit1" element="digit"><bounds x="10" y="0" width="10" height="15" /></bezel>
|
||||
<bezel name="digit0" element="digit"><bounds x="20" y="0" width="10" height="15" /></bezel>
|
||||
|
||||
<bezel name="digit4" element="digit"><bounds x="50" y="0" width="10" height="15" /></bezel>
|
||||
<bezel name="digit3" element="digit"><bounds x="60" y="0" width="10" height="15" /></bezel>
|
||||
|
||||
|
||||
<bezel name="lamp52" element="lamp"><bounds x="0" y="20" width="10" height="10" /></bezel>
|
||||
<bezel name="lamp53" element="lamp"><bounds x="10" y="20" width="10" height="10" /></bezel>
|
||||
<bezel name="lamp57" element="lamp"><bounds x="20" y="20" width="10" height="10" /></bezel>
|
||||
<bezel name="lamp56" element="lamp"><bounds x="30" y="20" width="10" height="10" /></bezel>
|
||||
|
||||
<bezel name="lamp51" element="lamp"><bounds x="5" y="30" width="10" height="10" /></bezel>
|
||||
<bezel name="lamp61" element="lamp"><bounds x="15" y="30" width="10" height="10" /></bezel>
|
||||
<bezel name="lamp55" element="lamp"><bounds x="25" y="30" width="10" height="10" /></bezel>
|
||||
|
||||
<bezel name="lamp50" element="lamp"><bounds x="10" y="40" width="10" height="10" /></bezel>
|
||||
<bezel name="lamp54" element="lamp"><bounds x="20" y="40" width="10" height="10" /></bezel>
|
||||
|
||||
<bezel name="lamp60" element="lamp"><bounds x="15" y="50" width="10" height="10" /></bezel>
|
||||
|
||||
|
||||
<bezel name="lamp64" element="lamp"><bounds x="0" y="70" width="10" height="10" /></bezel>
|
||||
<bezel name="lamp65" element="lamp"><bounds x="10" y="70" width="10" height="10" /></bezel>
|
||||
<bezel name="lamp66" element="lamp"><bounds x="20" y="70" width="10" height="10" /></bezel>
|
||||
|
||||
<bezel name="lamp62" element="lamp"><bounds x="50" y="70" width="10" height="10" /></bezel>
|
||||
<bezel name="lamp63" element="lamp"><bounds x="50" y="80" width="10" height="10" /></bezel>
|
||||
|
||||
|
||||
</view>
|
||||
</mamelayout>
|
||||
|
@ -196,7 +196,7 @@ public:
|
||||
}
|
||||
|
||||
};
|
||||
#else /* SDLMAME_UNIX */
|
||||
#else /* SDLMAME_MACOSX */
|
||||
MODULE_NOT_SUPPORTED(font_osx, OSD_FONT_PROVIDER, "osx")
|
||||
#endif
|
||||
|
||||
|
@ -163,6 +163,7 @@ void osd_common_t::register_options()
|
||||
REGISTER_MODULE(m_mod_man, FONT_NONE);
|
||||
|
||||
REGISTER_MODULE(m_mod_man, SOUND_DSOUND);
|
||||
REGISTER_MODULE(m_mod_man, SOUND_COREAUDIO);
|
||||
REGISTER_MODULE(m_mod_man, SOUND_JS);
|
||||
REGISTER_MODULE(m_mod_man, SOUND_SDL);
|
||||
REGISTER_MODULE(m_mod_man, SOUND_NONE);
|
||||
@ -204,11 +205,11 @@ void osd_common_t::register_options()
|
||||
|
||||
#if 0
|
||||
// Register midi options and update options
|
||||
m_mod_man.get_module_names(OSD_DEBUG_PROVIDER, 20, &num, names);
|
||||
m_mod_man.get_module_names(OSD_MIDI_PROVIDER, 20, &num, names);
|
||||
dnames.reset();
|
||||
for (int i = 0; i < num; i++)
|
||||
dnames.append(names[i]);
|
||||
update_option(OSD_DEBUG_PROVIDER, dnames);
|
||||
update_option(OSD_MIDI_PROVIDER, dnames);
|
||||
#endif
|
||||
|
||||
// Register debugger options and update options
|
||||
|
@ -189,7 +189,14 @@ void netdev_pcap::set_mac(const char *mac)
|
||||
|
||||
int netdev_pcap::send(UINT8 *buf, int len)
|
||||
{
|
||||
if(!m_p) return 0;
|
||||
int ret;
|
||||
if(!m_p) {
|
||||
printf("send invoked, but no pcap context\n");
|
||||
return 0;
|
||||
}
|
||||
ret = pcap_sendpacket_dl(m_p, buf, len);
|
||||
printf("sent packet length %d, returned %d\n", len, ret);
|
||||
return ret ? len : 0;
|
||||
return (!pcap_sendpacket_dl(m_p, buf, len))?len:0;
|
||||
}
|
||||
|
||||
@ -219,6 +226,7 @@ int netdev_pcap::recv_dev(UINT8 **buf)
|
||||
netdev_pcap::~netdev_pcap()
|
||||
{
|
||||
if(m_p) pcap_close_dl(m_p);
|
||||
m_p = NULL;
|
||||
}
|
||||
|
||||
static CREATE_NETDEV(create_pcap)
|
||||
@ -279,7 +287,11 @@ int pcap_module::init()
|
||||
|
||||
while(devs)
|
||||
{
|
||||
add_netdev(devs->name, devs->description, create_pcap);
|
||||
if(devs->description) {
|
||||
add_netdev(devs->name, devs->description, create_pcap);
|
||||
} else {
|
||||
add_netdev(devs->name, devs->name, create_pcap);
|
||||
}
|
||||
devs = devs->next;
|
||||
}
|
||||
return 0;
|
||||
|
@ -32,8 +32,8 @@
|
||||
#include "modules/lib/osdlib.h"
|
||||
#include "modules/lib/osdobj_common.h"
|
||||
|
||||
#ifdef OSD_WINDOWS
|
||||
#define SDLMAME_SDL2 1
|
||||
#if defined(OSD_WINDOWS) && !defined(SDLMAME_SDL2)
|
||||
#define SDLMAME_SDL2 0
|
||||
#endif
|
||||
|
||||
// OpenGL headers
|
||||
@ -189,9 +189,8 @@ enum
|
||||
// TYPES
|
||||
//============================================================
|
||||
|
||||
#if (SDLMAME_SDL2)
|
||||
#if defined(OSD_WINDOWS)
|
||||
|
||||
#ifdef OSD_WINDOWS
|
||||
class win_gl_context : public osd_gl_context
|
||||
{
|
||||
public:
|
||||
@ -347,7 +346,8 @@ private:
|
||||
HMODULE win_gl_context::m_module;
|
||||
|
||||
|
||||
#else
|
||||
#elif SDLMAME_SDL2
|
||||
|
||||
class sdl_gl_context : public osd_gl_context
|
||||
{
|
||||
public:
|
||||
@ -396,7 +396,7 @@ private:
|
||||
SDL_Window *m_window;
|
||||
char m_error[256];
|
||||
};
|
||||
#endif
|
||||
|
||||
#else
|
||||
// SDL 1.2
|
||||
class sdl12_gl_context : public osd_gl_context
|
||||
@ -442,7 +442,6 @@ private:
|
||||
char m_error[256];
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
//============================================================
|
||||
@ -763,12 +762,13 @@ int drawogl_init(running_machine &machine, osd_draw_callbacks *callbacks)
|
||||
dll_loaded = 0;
|
||||
|
||||
load_gl_lib(machine);
|
||||
if (SDLMAME_SDL2)
|
||||
{
|
||||
osd_printf_verbose("Using SDL multi-window OpenGL driver (SDL 2.0+)\n");
|
||||
}
|
||||
else
|
||||
osd_printf_verbose("Using SDL single-window OpenGL driver (SDL 1.2)\n");
|
||||
#if defined(OSD_WINDOWS)
|
||||
osd_printf_verbose("Using Windows OpenGL driver\n");
|
||||
#elif SDLMAME_SDL2
|
||||
osd_printf_verbose("Using SDL multi-window OpenGL driver (SDL 2.0+)\n");
|
||||
#else
|
||||
osd_printf_verbose("Using SDL single-window OpenGL driver (SDL 1.2)\n");
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -1030,13 +1030,11 @@ void sdl_info_ogl::initialize_gl()
|
||||
|
||||
int sdl_info_ogl::create()
|
||||
{
|
||||
#if (SDLMAME_SDL2)
|
||||
// create renderer
|
||||
#ifdef OSD_WINDOWS
|
||||
#if defined(OSD_WINDOWS)
|
||||
m_gl_context = global_alloc(win_gl_context(window().m_hwnd));
|
||||
#else
|
||||
#elif SDLMAME_SDL2
|
||||
m_gl_context = global_alloc(sdl_gl_context(window().sdl_window()));
|
||||
#endif
|
||||
#else
|
||||
m_gl_context = global_alloc(sdl12_gl_context(window().sdl_surface()));
|
||||
#endif
|
||||
@ -1530,7 +1528,7 @@ int sdl_info_ogl::draw(const int update)
|
||||
if (m_init_context)
|
||||
{
|
||||
// do some one-time OpenGL setup
|
||||
#if (SDLMAME_SDL2)
|
||||
#if SDLMAME_SDL2
|
||||
// FIXME: SRGB conversion is working on SDL2, may be of use
|
||||
// when we eventually target gamma and monitor profiles.
|
||||
//glEnable(GL_FRAMEBUFFER_SRGB);
|
||||
@ -1560,7 +1558,7 @@ int sdl_info_ogl::draw(const int update)
|
||||
loadGLExtensions();
|
||||
}
|
||||
|
||||
#if (!SDLMAME_SDL2)
|
||||
#if !defined(OSD_WINDOWS) && !SDLMAME_SDL2
|
||||
// force all textures to be regenerated
|
||||
destroy_all_textures();
|
||||
#endif
|
||||
|
316
src/osd/modules/sound/coreaudio_sound.c
Normal file
316
src/osd/modules/sound/coreaudio_sound.c
Normal file
@ -0,0 +1,316 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Vas Crabb
|
||||
//============================================================
|
||||
//
|
||||
// sound.c - CoreAudio implementation of MAME sound routines
|
||||
//
|
||||
// Copyright (c) 1996-2015, Nicola Salmoria and the MAME Team.
|
||||
// Visit http://mamedev.org for licensing and usage restrictions.
|
||||
//
|
||||
//============================================================
|
||||
|
||||
#include "sound_module.h"
|
||||
#include "modules/osdmodule.h"
|
||||
|
||||
#ifdef SDLMAME_MACOSX
|
||||
|
||||
#include <AudioUnit/AudioUnit.h>
|
||||
#include <CoreAudio/CoreAudio.h>
|
||||
#include <CoreServices/CoreServices.h>
|
||||
|
||||
|
||||
class sound_coreaudio : public osd_module, public sound_module
|
||||
{
|
||||
public:
|
||||
sound_coreaudio() :
|
||||
osd_module(OSD_SOUND_PROVIDER, "coreaudio"),
|
||||
sound_module(),
|
||||
m_open(false),
|
||||
m_sample_bytes(0),
|
||||
m_headroom(0),
|
||||
m_buffer_size(0),
|
||||
m_buffer(NULL),
|
||||
m_playpos(0),
|
||||
m_writepos(0),
|
||||
m_in_underrun(false),
|
||||
m_scale(128),
|
||||
m_overflows(0),
|
||||
m_underflows(0)
|
||||
{
|
||||
}
|
||||
virtual ~sound_coreaudio()
|
||||
{
|
||||
}
|
||||
|
||||
virtual int init();
|
||||
virtual void exit();
|
||||
|
||||
// sound_module
|
||||
|
||||
virtual void update_audio_stream(bool is_throttled, INT16 const *buffer, int samples_this_frame);
|
||||
virtual void set_mastervolume(int attenuation);
|
||||
|
||||
private:
|
||||
enum
|
||||
{
|
||||
LATENCY_MIN = 1,
|
||||
LATENCY_MAX = 5
|
||||
};
|
||||
|
||||
UINT32 clamped_latency() const { return MAX(MIN(m_audio_latency, LATENCY_MAX), LATENCY_MIN); }
|
||||
UINT32 buffer_avail() const { return ((m_writepos >= m_playpos) ? m_buffer_size : 0) + m_playpos - m_writepos; }
|
||||
UINT32 buffer_used() const { return ((m_playpos > m_writepos) ? m_buffer_size : 0) + m_writepos - m_playpos; }
|
||||
|
||||
void copy_scaled(void *dst, void const *src, UINT32 bytes) const
|
||||
{
|
||||
bytes /= sizeof(INT16);
|
||||
INT16 const *s = (INT16 const *)src;
|
||||
for (INT16 *d = (INT16 *)dst; bytes > 0; bytes--, s++, d++)
|
||||
*d = (*s * m_scale) >> 7;
|
||||
}
|
||||
|
||||
OSStatus render(
|
||||
AudioUnitRenderActionFlags *action_flags,
|
||||
const AudioTimeStamp *timestamp,
|
||||
UInt32 bus_number,
|
||||
UInt32 number_frames,
|
||||
AudioBufferList *data);
|
||||
|
||||
static OSStatus render_callback(
|
||||
void *refcon,
|
||||
AudioUnitRenderActionFlags *action_flags,
|
||||
const AudioTimeStamp *timestamp,
|
||||
UInt32 bus_number,
|
||||
UInt32 number_frames,
|
||||
AudioBufferList *data);
|
||||
|
||||
bool m_open;
|
||||
AudioUnit m_output;
|
||||
UINT32 m_sample_bytes;
|
||||
UINT32 m_headroom;
|
||||
UINT32 m_buffer_size;
|
||||
INT8 *m_buffer;
|
||||
UINT32 m_playpos;
|
||||
UINT32 m_writepos;
|
||||
bool m_in_underrun;
|
||||
INT32 m_scale;
|
||||
unsigned m_overflows;
|
||||
unsigned m_underflows;
|
||||
};
|
||||
|
||||
|
||||
int sound_coreaudio::init()
|
||||
{
|
||||
OSStatus err;
|
||||
|
||||
// Don't bother with any of this if sound is disabled
|
||||
if (sample_rate() == 0)
|
||||
return 0;
|
||||
|
||||
// Get the Default Output AudioUnit component and open an instance
|
||||
ComponentDescription output_desc;
|
||||
output_desc.componentType = kAudioUnitType_Output;
|
||||
output_desc.componentSubType = kAudioUnitSubType_DefaultOutput;
|
||||
output_desc.componentManufacturer = kAudioUnitManufacturer_Apple;
|
||||
output_desc.componentFlags = 0;
|
||||
output_desc.componentFlagsMask = 0;
|
||||
Component output_comp = FindNextComponent(NULL, &output_desc);
|
||||
if (!output_comp)
|
||||
{
|
||||
osd_printf_error("Could not find Default Output AudioUnit component\n");
|
||||
return -1;
|
||||
}
|
||||
err = OpenAComponent(output_comp, &m_output);
|
||||
if (noErr != err)
|
||||
{
|
||||
osd_printf_error("Could not open Default Output AudioUnit component (%ld)\n", (long)err);
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Set render callback
|
||||
AURenderCallbackStruct renderer;
|
||||
renderer.inputProc = sound_coreaudio::render_callback;
|
||||
renderer.inputProcRefCon = this;
|
||||
err = AudioUnitSetProperty(m_output, kAudioUnitProperty_SetRenderCallback, kAudioUnitScope_Input, 0, &renderer, sizeof(renderer));
|
||||
if (noErr != err)
|
||||
{
|
||||
CloseComponent(m_output);
|
||||
osd_printf_error("Could not set audio output render callback (%ld)\n", (long)err);
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Set audio stream format for two-channel native-endian 16-bit packed linear PCM
|
||||
AudioStreamBasicDescription format;
|
||||
format.mSampleRate = sample_rate();
|
||||
format.mFormatID = kAudioFormatLinearPCM;
|
||||
format.mFormatFlags = kAudioFormatFlagsNativeEndian
|
||||
| kLinearPCMFormatFlagIsSignedInteger
|
||||
| kLinearPCMFormatFlagIsPacked;
|
||||
format.mFramesPerPacket = 1;
|
||||
format.mChannelsPerFrame = 2;
|
||||
format.mBitsPerChannel = 16;
|
||||
format.mBytesPerFrame = format.mChannelsPerFrame * format.mBitsPerChannel / 8;
|
||||
format.mBytesPerPacket = format.mFramesPerPacket * format.mBytesPerFrame;
|
||||
err = AudioUnitSetProperty(m_output, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Input, 0, &format, sizeof(format));
|
||||
if (noErr != err)
|
||||
{
|
||||
CloseComponent(m_output);
|
||||
osd_printf_error("Could not set audio output stream format (%ld)\n", (long)err);
|
||||
return -1;
|
||||
}
|
||||
m_sample_bytes = format.mBytesPerFrame;
|
||||
|
||||
// Allocate buffer
|
||||
m_headroom = m_sample_bytes * (clamped_latency() * sample_rate() / 40);
|
||||
m_buffer_size = m_sample_bytes * MAX(sample_rate() * (clamped_latency() + 3) / 40, 256);
|
||||
m_buffer = global_alloc_array_clear(INT8, m_buffer_size);
|
||||
if (!m_buffer)
|
||||
{
|
||||
CloseComponent(m_output);
|
||||
osd_printf_error("Could not allocate stream buffer\n");
|
||||
return -1;
|
||||
}
|
||||
m_playpos = 0;
|
||||
m_writepos = m_headroom;
|
||||
m_in_underrun = false;
|
||||
m_scale = 128;
|
||||
m_overflows = m_underflows = 0;
|
||||
|
||||
// Initialise and start
|
||||
err = AudioUnitInitialize(m_output);
|
||||
if (noErr != err)
|
||||
{
|
||||
CloseComponent(m_output);
|
||||
global_free_array(m_buffer);
|
||||
m_buffer = NULL;
|
||||
osd_printf_error("Could not initialize audio output (%ld)\n", (long)err);
|
||||
return -1;
|
||||
}
|
||||
err = AudioOutputUnitStart(m_output);
|
||||
if (noErr != err)
|
||||
{
|
||||
AudioUnitUninitialize(m_output);
|
||||
CloseComponent(m_output);
|
||||
global_free_array(m_buffer);
|
||||
m_buffer = NULL;
|
||||
osd_printf_error("Could not start audio output (%ld)\n", (long)err);
|
||||
return -1;
|
||||
}
|
||||
m_open = true;
|
||||
osd_printf_verbose("Audio: End initialization\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void sound_coreaudio::exit()
|
||||
{
|
||||
if (m_open)
|
||||
{
|
||||
osd_printf_verbose("Closing output AudioUnit component\n");
|
||||
AudioOutputUnitStop(m_output);
|
||||
AudioUnitUninitialize(m_output);
|
||||
CloseComponent(m_output);
|
||||
m_open = false;
|
||||
}
|
||||
if (m_buffer)
|
||||
{
|
||||
global_free_array(m_buffer);
|
||||
m_buffer = NULL;
|
||||
}
|
||||
if (m_overflows || m_underflows)
|
||||
osd_printf_verbose("Sound buffer: overflows=%u underflows=%u\n", m_overflows, m_underflows);
|
||||
}
|
||||
|
||||
|
||||
void sound_coreaudio::update_audio_stream(bool is_throttled, INT16 const *buffer, int samples_this_frame)
|
||||
{
|
||||
if ((sample_rate() == 0) || !m_buffer)
|
||||
return;
|
||||
|
||||
UINT32 const bytes_this_frame = samples_this_frame * m_sample_bytes;
|
||||
if (bytes_this_frame >= buffer_avail())
|
||||
{
|
||||
m_overflows++;
|
||||
return;
|
||||
}
|
||||
|
||||
UINT32 const chunk = MIN(m_buffer_size - m_writepos, bytes_this_frame);
|
||||
memcpy(m_buffer + m_writepos, (INT8 *)buffer, chunk);
|
||||
m_writepos += chunk;
|
||||
if (m_writepos >= m_buffer_size)
|
||||
m_writepos = 0;
|
||||
|
||||
if (chunk < bytes_this_frame)
|
||||
{
|
||||
assert(0U == m_writepos);
|
||||
assert(m_playpos > (bytes_this_frame - chunk));
|
||||
memcpy(m_buffer, (INT8 *)buffer + chunk, bytes_this_frame - chunk);
|
||||
m_writepos += bytes_this_frame - chunk;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void sound_coreaudio::set_mastervolume(int attenuation)
|
||||
{
|
||||
int const clamped_attenuation = MAX(MIN(attenuation, 0), -32);
|
||||
m_scale = (-32 == clamped_attenuation) ? 0 : (INT32)(pow(10.0, clamped_attenuation / 20.0) * 128);
|
||||
}
|
||||
|
||||
|
||||
OSStatus sound_coreaudio::render(
|
||||
AudioUnitRenderActionFlags *action_flags,
|
||||
const AudioTimeStamp *timestamp,
|
||||
UInt32 bus_number,
|
||||
UInt32 number_frames,
|
||||
AudioBufferList *data)
|
||||
{
|
||||
UINT32 const number_bytes = number_frames * m_sample_bytes;
|
||||
UINT32 const used = buffer_used();
|
||||
if (m_in_underrun && (used < m_headroom))
|
||||
{
|
||||
memset(data->mBuffers[0].mData, 0, number_bytes);
|
||||
return noErr;
|
||||
}
|
||||
m_in_underrun = false;
|
||||
if (number_bytes > used)
|
||||
{
|
||||
m_in_underrun = true;
|
||||
m_underflows++;
|
||||
memset(data->mBuffers[0].mData, 0, number_bytes);
|
||||
return noErr;
|
||||
}
|
||||
|
||||
UINT32 const chunk = MIN(m_buffer_size - m_playpos, number_bytes);
|
||||
copy_scaled((INT8 *)data->mBuffers[0].mData, m_buffer + m_playpos, chunk);
|
||||
m_playpos += chunk;
|
||||
if (m_playpos >= m_buffer_size)
|
||||
m_playpos = 0;
|
||||
|
||||
if (chunk < number_bytes)
|
||||
{
|
||||
assert(0U == m_playpos);
|
||||
assert(m_writepos >= (number_bytes - chunk));
|
||||
copy_scaled((INT8 *)data->mBuffers[0].mData + chunk, m_buffer, number_bytes - chunk);
|
||||
m_playpos += number_bytes - chunk;
|
||||
}
|
||||
|
||||
return noErr;
|
||||
}
|
||||
|
||||
|
||||
OSStatus sound_coreaudio::render_callback(
|
||||
void *refcon,
|
||||
AudioUnitRenderActionFlags *action_flags,
|
||||
const AudioTimeStamp *timestamp,
|
||||
UInt32 bus_number,
|
||||
UInt32 number_frames,
|
||||
AudioBufferList *data)
|
||||
{
|
||||
return ((sound_coreaudio *)refcon)->render(action_flags, timestamp, bus_number, number_frames, data);
|
||||
}
|
||||
|
||||
#else /* SDLMAME_MACOSX */
|
||||
MODULE_NOT_SUPPORTED(sound_coreaudio, OSD_SOUND_PROVIDER, "coreaudio")
|
||||
#endif
|
||||
|
||||
MODULE_DEFINITION(SOUND_COREAUDIO, sound_coreaudio)
|
@ -275,7 +275,7 @@ HRESULT sound_direct_sound::dsound_init()
|
||||
}
|
||||
|
||||
// set the cooperative level
|
||||
#ifdef SDLMAME_WIN32
|
||||
#ifdef SDLMAME_WIN32
|
||||
SDL_SysWMinfo wminfo;
|
||||
SDL_VERSION(&wminfo.version);
|
||||
#if (SDLMAME_SDL2)
|
||||
@ -287,7 +287,7 @@ HRESULT sound_direct_sound::dsound_init()
|
||||
#endif
|
||||
#else
|
||||
result = IDirectSound_SetCooperativeLevel(dsound, win_window_list->m_hwnd, DSSCL_PRIORITY);
|
||||
#endif
|
||||
#endif
|
||||
if (result != DS_OK)
|
||||
{
|
||||
osd_printf_error("Error setting DirectSound cooperative level: %08x\n", (UINT32)result);
|
||||
|
@ -332,20 +332,14 @@ void sound_sdl::update_audio_stream(bool is_throttled, const INT16 *buffer, int
|
||||
void sound_sdl::set_mastervolume(int _attenuation)
|
||||
{
|
||||
// clamp the attenuation to 0-32 range
|
||||
if (_attenuation > 0)
|
||||
_attenuation = 0;
|
||||
if (_attenuation < -32)
|
||||
_attenuation = -32;
|
||||
attenuation = MAX(MIN(_attenuation, 0), -32);
|
||||
|
||||
attenuation = _attenuation;
|
||||
|
||||
if ((attenuation == -32) && (stream_in_initialized))
|
||||
if (stream_in_initialized)
|
||||
{
|
||||
SDL_PauseAudio(1);
|
||||
}
|
||||
else if (stream_in_initialized)
|
||||
{
|
||||
SDL_PauseAudio(0);
|
||||
if (attenuation == -32)
|
||||
SDL_PauseAudio(1);
|
||||
else
|
||||
SDL_PauseAudio(0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -455,17 +449,8 @@ int sound_sdl::init()
|
||||
|
||||
sdl_xfer_samples = obtained.samples;
|
||||
|
||||
audio_latency = m_audio_latency;
|
||||
|
||||
// pin audio latency
|
||||
if (audio_latency > MAX_AUDIO_LATENCY)
|
||||
{
|
||||
audio_latency = MAX_AUDIO_LATENCY;
|
||||
}
|
||||
else if (audio_latency < 1)
|
||||
{
|
||||
audio_latency = 1;
|
||||
}
|
||||
audio_latency = MAX(MIN(m_audio_latency, MAX_AUDIO_LATENCY), 1);
|
||||
|
||||
// compute the buffer sizes
|
||||
stream_buffer_size = (sample_rate() * 2 * sizeof(INT16) * (2 + audio_latency)) / 30;
|
||||
|
@ -17,7 +17,7 @@
|
||||
SYNCHRONIZATION INTERFACES - Events
|
||||
***************************************************************************/
|
||||
|
||||
#define OSD_EVENT_WAIT_INFINITE -1
|
||||
#define OSD_EVENT_WAIT_INFINITE (~(osd_ticks_t)0)
|
||||
|
||||
/* osd_event is an opaque type which represents a setable/resetable event */
|
||||
|
||||
|
@ -74,6 +74,8 @@ public:
|
||||
// midi interface
|
||||
virtual osd_midi_device *create_midi_device() = 0;
|
||||
|
||||
protected:
|
||||
virtual ~osd_interface() { }
|
||||
};
|
||||
|
||||
#endif /* __OSDEPEND_H__ */
|
||||
|
@ -39,11 +39,15 @@ class osd_netdev *open_netdev(int id, class device_network_interface *ifdev, int
|
||||
osd_netdev::osd_netdev(class device_network_interface *ifdev, int rate)
|
||||
{
|
||||
m_dev = ifdev;
|
||||
ifdev->device().machine().scheduler().timer_pulse(attotime::from_hz(rate), timer_expired_delegate(FUNC(osd_netdev::recv), this));
|
||||
m_stop = false;
|
||||
m_timer = ifdev->device().machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(osd_netdev::recv), this));
|
||||
m_timer->adjust(attotime::from_hz(rate), 0, attotime::from_hz(rate));
|
||||
}
|
||||
|
||||
osd_netdev::~osd_netdev()
|
||||
{
|
||||
m_stop = true;
|
||||
m_timer->reset();
|
||||
}
|
||||
|
||||
int osd_netdev::send(UINT8 *buf, int len)
|
||||
@ -56,7 +60,7 @@ void osd_netdev::recv(void *ptr, int param)
|
||||
UINT8 *buf;
|
||||
int len;
|
||||
//const char atalkmac[] = { 0x09, 0x00, 0x07, 0xff, 0xff, 0xff };
|
||||
while((len = recv_dev(&buf)))
|
||||
while((!m_stop) && (len = recv_dev(&buf)))
|
||||
{
|
||||
#if 0
|
||||
if(buf[0] & 1)
|
||||
|
@ -36,6 +36,8 @@ private:
|
||||
void recv(void *ptr, int param);
|
||||
|
||||
class device_network_interface *m_dev;
|
||||
emu_timer *m_timer;
|
||||
bool m_stop;
|
||||
};
|
||||
|
||||
class osd_netdev *open_netdev(int id, class device_network_interface *ifdev, int rate);
|
||||
|
@ -37,14 +37,6 @@ extern "C" int _tmain(int argc, TCHAR **argv)
|
||||
int i, rc;
|
||||
char **utf8_argv;
|
||||
|
||||
#ifdef OSD_SDL
|
||||
#ifdef MALLOC_DEBUG
|
||||
{
|
||||
extern int winalloc_in_main_code;
|
||||
winalloc_in_main_code = TRUE;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* convert arguments to UTF-8 */
|
||||
utf8_argv = (char **) malloc(argc * sizeof(*argv));
|
||||
if (utf8_argv == NULL)
|
||||
@ -64,16 +56,5 @@ extern "C" int _tmain(int argc, TCHAR **argv)
|
||||
osd_free(utf8_argv[i]);
|
||||
free(utf8_argv);
|
||||
|
||||
#ifdef OSD_SDL
|
||||
#ifdef MALLOC_DEBUG
|
||||
{
|
||||
void check_unfreed_mem(void);
|
||||
check_unfreed_mem();
|
||||
}
|
||||
winalloc_in_main_code = FALSE;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
@ -252,16 +252,16 @@ int main(int argc, char *argv[])
|
||||
|
||||
// FIXME: this should be done differently
|
||||
|
||||
#ifdef SDLMAME_UNIX
|
||||
#ifdef SDLMAME_UNIX
|
||||
sdl_entered_debugger = 0;
|
||||
#if (!defined(SDLMAME_MACOSX)) && (!defined(SDLMAME_HAIKU)) && (!defined(SDLMAME_EMSCRIPTEN))
|
||||
#if (!defined(SDLMAME_MACOSX)) && (!defined(SDLMAME_HAIKU)) && (!defined(SDLMAME_EMSCRIPTEN))
|
||||
FcInit();
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef SDLMAME_OS2
|
||||
#ifdef SDLMAME_OS2
|
||||
MorphToPM();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(SDLMAME_X11) && (SDL_MAJOR_VERSION == 1) && (SDL_MINOR_VERSION == 2)
|
||||
if (SDL_Linked_Version()->patch < 10)
|
||||
@ -290,21 +290,14 @@ int main(int argc, char *argv[])
|
||||
res = frontend.execute(argc, argv);
|
||||
}
|
||||
|
||||
#ifdef MALLOC_DEBUG
|
||||
{
|
||||
void check_unfreed_mem(void);
|
||||
check_unfreed_mem();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SDLMAME_UNIX
|
||||
#if (!defined(SDLMAME_MACOSX)) && (!defined(SDLMAME_HAIKU)) && (!defined(SDLMAME_EMSCRIPTEN))
|
||||
#ifdef SDLMAME_UNIX
|
||||
#if (!defined(SDLMAME_MACOSX)) && (!defined(SDLMAME_HAIKU)) && (!defined(SDLMAME_EMSCRIPTEN))
|
||||
if (!sdl_entered_debugger)
|
||||
{
|
||||
FcFini();
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
exit(res);
|
||||
}
|
||||
|
@ -12,6 +12,11 @@
|
||||
#ifndef __SDLVIDEO__
|
||||
#define __SDLVIDEO__
|
||||
|
||||
#if defined(SDLMAME_WIN32) && !(SDLMAME_SDL2)
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#include "osdsdl.h"
|
||||
|
||||
//============================================================
|
||||
|
@ -9,6 +9,11 @@
|
||||
//
|
||||
//============================================================
|
||||
|
||||
#ifdef SDLMAME_WIN32
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
// standard SDL headers
|
||||
#include "sdlinc.h"
|
||||
|
||||
@ -60,16 +65,16 @@
|
||||
// minimum window dimension
|
||||
#define MIN_WINDOW_DIM 200
|
||||
|
||||
//#ifndef SDLMAME_WIN32
|
||||
#define WMSZ_TOP (0)
|
||||
#define WMSZ_BOTTOM (1)
|
||||
#ifndef SDLMAME_WIN32
|
||||
#define WMSZ_TOP (0)
|
||||
#define WMSZ_BOTTOM (1)
|
||||
#define WMSZ_BOTTOMLEFT (2)
|
||||
#define WMSZ_BOTTOMRIGHT (3)
|
||||
#define WMSZ_LEFT (4)
|
||||
#define WMSZ_LEFT (4)
|
||||
#define WMSZ_TOPLEFT (5)
|
||||
#define WMSZ_TOPRIGHT (6)
|
||||
#define WMSZ_RIGHT (7)
|
||||
//#endif
|
||||
#define WMSZ_RIGHT (7)
|
||||
#endif
|
||||
|
||||
//============================================================
|
||||
// GLOBAL VARIABLES
|
||||
|
@ -7,9 +7,6 @@
|
||||
//============================================================
|
||||
|
||||
// standard windows headers
|
||||
#ifdef OSD_SDL
|
||||
#define _WIN32_WINNT 0x0400
|
||||
#endif
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#include <tchar.h>
|
||||
@ -37,14 +34,6 @@ extern "C" int _tmain(int argc, TCHAR **argv)
|
||||
int i, rc;
|
||||
char **utf8_argv;
|
||||
|
||||
#ifdef OSD_SDL
|
||||
#ifdef MALLOC_DEBUG
|
||||
{
|
||||
extern int winalloc_in_main_code;
|
||||
winalloc_in_main_code = TRUE;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* convert arguments to UTF-8 */
|
||||
utf8_argv = (char **) malloc(argc * sizeof(*argv));
|
||||
if (utf8_argv == NULL)
|
||||
@ -64,16 +53,5 @@ extern "C" int _tmain(int argc, TCHAR **argv)
|
||||
osd_free(utf8_argv[i]);
|
||||
free(utf8_argv);
|
||||
|
||||
#ifdef OSD_SDL
|
||||
#ifdef MALLOC_DEBUG
|
||||
{
|
||||
void check_unfreed_mem(void);
|
||||
check_unfreed_mem();
|
||||
}
|
||||
winalloc_in_main_code = FALSE;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
@ -7,5 +7,5 @@
|
||||
|
||||
******************************************************************************/
|
||||
|
||||
#src/mame/tiny.lst
|
||||
#src/mess/tiny.lst
|
||||
#../../../../../src/mame/tiny.lst
|
||||
#../../../../../src/mess/tiny.lst
|
||||
|
@ -7,5 +7,5 @@
|
||||
|
||||
******************************************************************************/
|
||||
|
||||
#src/mame/mame.lst
|
||||
#src/mess/mess.lst
|
||||
#../../../../../src/mame/mame.lst
|
||||
#../../../../../src/mess/mess.lst
|
||||
|
Loading…
Reference in New Issue
Block a user