-Added support for directory names in SOURCES=

-Retired the messshared project (combined with shared).

-bus/nubus: Added table of video modes for Mac monitor sense values.
This commit is contained in:
Vas Crabb 2022-06-30 00:37:49 +10:00
parent da028cd724
commit c51c443be1
27 changed files with 48 additions and 39 deletions

View File

@ -722,7 +722,7 @@ def scan_source_dependencies(root, sources):
parser = CppParser(handler)
seen = set('/'.join(x for x in split_path(source) if x) for source in sources)
remaining = list([(x, 0) for x in seen])
default_roots = ((('src', 'devices'), 0), (('src', 'mame', 'shared'), 0), (('src', 'mame', 'messshared'), 0), (('src', 'lib'), 0))
default_roots = ((('src', 'devices'), 0), (('src', 'mame', 'shared'), 0), (('src', 'lib'), 0))
while remaining:
source, depth = remaining.pop()
components = tuple(source.split('/'))
@ -768,7 +768,6 @@ def write_project(options, projectfile, mappings, sources, single):
' MAME_DIR .. "src/emu",\n' \
' MAME_DIR .. "src/devices",\n' \
' MAME_DIR .. "src/mame/shared",\n' \
' MAME_DIR .. "src/mame/messshared",\n' \
' MAME_DIR .. "src/lib",\n' \
' MAME_DIR .. "src/lib/util",\n' \
' MAME_DIR .. "src/lib/netlist",\n' \
@ -821,7 +820,6 @@ def write_project(options, projectfile, mappings, sources, single):
' MAME_DIR .. "src/emu",\n' \
' MAME_DIR .. "src/devices",\n' \
' MAME_DIR .. "src/mame/shared",\n' \
' MAME_DIR .. "src/mame/messshared",\n' \
' MAME_DIR .. "src/lib",\n' \
' MAME_DIR .. "src/lib/util",\n' \
' MAME_DIR .. "src/lib/netlist",\n' \
@ -839,12 +837,10 @@ def write_project(options, projectfile, mappings, sources, single):
'function linkProjects_mame_%s(_target, _subtarget)\n' \
' links {\n' % (options.target, ))
for lib in libnames:
if (lib != 'shared') and (lib != 'messshared'):
if lib != 'shared':
projectfile.write(' "%s",\n' % (lib, ))
if 'shared' in libraries:
projectfile.write(' "shared",\n')
if 'messshared' in libraries:
projectfile.write(' "messshared",\n')
projectfile.write(
' }\n' \
'end\n' \
@ -861,12 +857,29 @@ def write_project(options, projectfile, mappings, sources, single):
projectfile.write('end\n')
def collect_sources(root, sources):
result = [ ]
for source in sources:
fullpath = os.path.join(root, source)
if os.path.isdir(fullpath):
for subdir, dirs, files in os.walk(fullpath):
for candidate in files:
if os.path.splitext(candidate)[1] == '.cpp':
if subdir != fullpath:
result.append(os.path.join(source, os.path.relpath(subdir, fullpath), candidate))
else:
result.append(os.path.join(source, candidate))
else:
result.append(source)
return result
def write_filter(options, filterfile):
sources = set()
DriverFilter().parse_list(options.list, lambda n: sources.add(n), lambda n: None)
drivers = set()
for source in options.sources:
for source in collect_sources(options.root, options.sources):
components = tuple(x for x in split_path(source) if x)
if (len(components) > 3) and (components[:2] == ('src', 'mame')):
ext = os.path.splitext(components[-1])[1].lower()
@ -881,7 +894,7 @@ if __name__ == '__main__':
options = parse_command_line()
if options.command == 'sourcesproject':
header_to_optional = collect_lua_directives(options)
source_dependencies = scan_source_dependencies(options.root, options.sources)
source_dependencies = scan_source_dependencies(options.root, collect_sources(options.root, options.sources))
write_project(options, sys.stdout, header_to_optional, source_dependencies, True)
elif options.command == 'filterproject':
header_to_optional = collect_lua_directives(options)

View File

@ -1434,8 +1434,9 @@ if _OPTIONS["SOURCES"] ~= nil then
local str = _OPTIONS["SOURCES"]
local sourceargs = ""
for word in string.gmatch(str, '([^,]+)') do
if not os.isfile(path.join(MAME_DIR, word)) then
error("File " .. word .. " does not exist")
local fullpath = path.join(MAME_DIR, word)
if (not os.isfile(fullpath)) and (not os.isdir(fullpath)) then
error("File/directory " .. word .. " does not exist")
end
sourceargs = sourceargs .. " " .. word
end

View File

@ -1603,7 +1603,6 @@ function linkProjects_mame_mame(_target, _subtarget)
"zpa",
"zvt",
"shared", -- must stay near the end
"messshared", -- must stay near the end
}
end
@ -1621,7 +1620,6 @@ function createMAMEProjects(_target, _subtarget, _name)
MAME_DIR .. "src/emu",
MAME_DIR .. "src/devices",
MAME_DIR .. "src/mame/shared",
MAME_DIR .. "src/mame/messshared",
MAME_DIR .. "src/lib",
MAME_DIR .. "src/lib/util",
MAME_DIR .. "3rdparty",
@ -1653,12 +1651,6 @@ files {
MAME_DIR .. "src/mame/shared/*.cpp",
}
createMAMEProjects(_target, _subtarget, "messshared")
files {
MAME_DIR .. "src/mame/messshared/*.h",
MAME_DIR .. "src/mame/messshared/*.cpp",
}
--------------------------------------------------
-- manufacturer-specific groupings for drivers
--------------------------------------------------

View File

@ -203,22 +203,25 @@ ROM_END
// TODO: find a better place for this table to live
struct mac_monitor_info { bool mono; unsigned sense[4]; };
mac_monitor_info const f_monitors[] = {
{ false, { 0, 0, 0, 0 } }, // 0: RGB 21"
{ true, { 1, 1, 1, 0 } }, // 1: Full-Page (B&W 15")
{ false, { 2, 2, 0, 2 } }, // 2: RGB 12"
{ true, { 3, 3, 1, 2 } }, // 3: Two-Page (B&W 21")
{ false, { 4, 0, 4, 4 } }, // 4: NTSC Monitor
{ false, { 5, 1, 5, 4 } }, // 5: RGB 15"
{ false, { 6, 2, 4, 6 } }, // 6: Hi-Res (12-14")
{ false, { 6, 0, 0, 6 } }, // 7: Multiple Scan 14"
{ false, { 6, 0, 4, 6 } }, // 8: Multiple Scan 16"
{ false, { 6, 2, 0, 6 } }, // 9: Multiple Scan 21"
{ false, { 7, 0, 0, 0 } }, // 10: PAL Encoder
{ false, { 7, 1, 1, 0 } }, // 11: NTSC Encoder
{ false, { 7, 1, 1, 6 } }, // 12: VGA/Super VGA
{ false, { 7, 2, 5, 2 } }, // 13: RGB 16"
{ false, { 7, 3, 0, 0 } }, // 14: PAL Monitor
{ false, { 7, 3, 4, 4 } } }; // 15: RGB 19"
// 512×385 640×480 640×870 832×624 1024×768 1152×870
// 60.15 Hz 66.67 Hz 75.08 Hz 74.55 Hz 74.93 Hz 75.08 Hz 59.94 Hz 55.98 Hz 59.94 Hz 50.00 Hz
// portrait interlaced interlaced
{ false, { 0, 0, 0, 0 } }, // 0: RGB 21" yes
{ true, { 1, 1, 1, 0 } }, // 1: Full-Page (B&W 15") yes
{ false, { 2, 2, 0, 2 } }, // 2: RGB 12" yes
{ true, { 3, 3, 1, 2 } }, // 3: Two-Page (B&W 21") yes
{ false, { 4, 0, 4, 4 } }, // 4: NTSC Monitor yes
{ false, { 5, 1, 5, 4 } }, // 5: RGB 15" yes
{ false, { 6, 2, 4, 6 } }, // 6: Hi-Res (12-14") yes
{ false, { 6, 0, 0, 6 } }, // 7: Multiple Scan 14" yes yes
{ false, { 6, 0, 4, 6 } }, // 8: Multiple Scan 16" yes yes yes yes
{ false, { 6, 2, 0, 6 } }, // 9: Multiple Scan 21" yes yes yes yes
{ false, { 7, 0, 0, 0 } }, // 10: PAL Encoder yes
{ false, { 7, 1, 1, 0 } }, // 11: NTSC Encoder yes
{ false, { 7, 1, 1, 6 } }, // 12: VGA/Super VGA yes yes
{ false, { 7, 2, 5, 2 } }, // 13: RGB 16" yes
{ false, { 7, 3, 0, 0 } }, // 14: PAL Monitor yes
{ false, { 7, 3, 4, 4 } } }; // 15: RGB 19" yes
//-------------------------------------------------

View File

@ -75,7 +75,7 @@ are almost identical, except for much darker BG layer colors).
***************************************************************************/
#include "emu.h"
#include "dooyong_v.h"
#include "dooyong_tilemap.h"
#include "cpu/m68000/m68000.h"
#include "cpu/z80/z80.h"

View File

@ -1,7 +1,7 @@
// license:BSD-3-Clause
// copyright-holders:Vas Crabb
#include "emu.h"
#include "dooyong_v.h"
#include "dooyong_tilemap.h"
#include "screen.h"

View File

@ -1,7 +1,7 @@
// license:BSD-3-Clause
// copyright-holders:Vas Crabb
#ifndef MAME_VIDEO_DOOYONG_H
#define MAME_VIDEO_DOOYONG_H
#ifndef MAME_DOOYONG_DOOYONG_TILEMAP_H
#define MAME_DOOYONG_DOOYONG_TILEMAP_H
#pragma once
@ -153,4 +153,4 @@ private:
std::unique_ptr<u16[]> m_tileram;
};
#endif // MAME_VIDEO_DOOYONG_H
#endif // MAME_DOOYONG_DOOYONG_TILEMAP_H