From 769413bc0e9bc297c9a9e359ff5e79305d5f7642 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Sun, 24 Oct 2021 17:31:21 +1100 Subject: Remove compiled message catalogs on clean, show clean commands for VERBOSE=1. --- makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/makefile b/makefile index f27c940c3ac..232f54efb17 100644 --- a/makefile +++ b/makefile @@ -1712,8 +1712,9 @@ genieclean: clean: genieclean @echo Cleaning... - -@rm -rf $(BUILDDIR) - -@rm -rf 3rdparty/bgfx/.build + -$(SILENT)rm -f language/*/*.mo + -$(SILENT)rm -rf $(BUILDDIR) + -$(SILENT)rm -rf 3rdparty/bgfx/.build GEN_FOLDERS := $(GENDIR)/$(TARGET)/layout/ $(GENDIR)/$(TARGET)/$(SUBTARGET_FULL)/ $(GENDIR)/mame/drivers/ $(GENDIR)/mame/machine/ -- cgit v1.2.3 From 328b103fbccfb04d14becfc806fba3a588916b2d Mon Sep 17 00:00:00 2001 From: hap Date: Sun, 24 Oct 2021 11:23:24 +0200 Subject: novag_diablo: fix lockup problem at fresh start (cherry picked from commit 5a9ea65c0e1195be609f0dab001ee759e6e0e594) --- src/mame/drivers/novag_diablo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mame/drivers/novag_diablo.cpp b/src/mame/drivers/novag_diablo.cpp index 4c2f6d3b7ab..8139650bfc7 100644 --- a/src/mame/drivers/novag_diablo.cpp +++ b/src/mame/drivers/novag_diablo.cpp @@ -283,7 +283,7 @@ void diablo_state::diablo68k(machine_config &config) irq_clock.set_pulse_width(attotime::from_nsec(1380)); // active for 1.38us irq_clock.signal_handler().set_inputline(m_maincpu, M68K_IRQ_IPL1); - NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); + NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1); SENSORBOARD(config, m_board).set_type(sensorboard_device::MAGNETS); m_board->init_cb().set(m_board, FUNC(sensorboard_device::preset_chess)); -- cgit v1.2.3 From 4601e6039124b0ffc73485f78a9eaf0b0f6017fb Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Mon, 25 Oct 2021 01:57:07 +1100 Subject: plugins: Use SPDX short identifiers for licenses in exports (more precise and easier to localise), use CC0 for hiscore plugin rather than CC0. --- plugins/autofire/init.lua | 2 +- plugins/cheat/init.lua | 2 +- plugins/cheatfind/init.lua | 2 +- plugins/console/init.lua | 2 +- plugins/data/init.lua | 2 +- plugins/discord/init.lua | 2 +- plugins/dummy/init.lua | 2 +- plugins/gdbstub/init.lua | 2 +- plugins/hiscore/init.lua | 4 ++-- plugins/inputmacro/init.lua | 2 +- plugins/inputmacro/inputmacro_menu.lua | 4 ++++ plugins/inputmacro/inputmacro_persist.lua | 4 ++++ plugins/layout/init.lua | 2 +- plugins/portname/init.lua | 2 +- plugins/timer/init.lua | 2 +- 15 files changed, 22 insertions(+), 14 deletions(-) diff --git a/plugins/autofire/init.lua b/plugins/autofire/init.lua index d14533dc53b..57ea3d4bb27 100644 --- a/plugins/autofire/init.lua +++ b/plugins/autofire/init.lua @@ -4,7 +4,7 @@ local exports = { name = 'autofire', version = '0.0.4', description = 'Autofire plugin', - license = 'The BSD 3-Clause License', + license = 'BSD-3-Clause', author = { name = 'Jack Li' } } local autofire = exports diff --git a/plugins/cheat/init.lua b/plugins/cheat/init.lua index e0ae0c058ab..e5fc2245922 100644 --- a/plugins/cheat/init.lua +++ b/plugins/cheat/init.lua @@ -68,7 +68,7 @@ local exports = {} exports.name = "cheat" exports.version = "0.0.1" exports.description = "Cheat plugin" -exports.license = "The BSD 3-Clause License" +exports.license = "BSD-3-Clause" exports.author = { name = "Carl" } local cheat = exports diff --git a/plugins/cheatfind/init.lua b/plugins/cheatfind/init.lua index b9ff9ce3403..62b468ce920 100644 --- a/plugins/cheatfind/init.lua +++ b/plugins/cheatfind/init.lua @@ -5,7 +5,7 @@ local exports = {} exports.name = "cheatfind" exports.version = "0.0.1" exports.description = "Cheat finder helper library" -exports.license = "The BSD 3-Clause License" +exports.license = "BSD-3-Clause" exports.author = { name = "Carl" } local cheatfind = exports diff --git a/plugins/console/init.lua b/plugins/console/init.lua index de8a5844a68..cec818cc329 100644 --- a/plugins/console/init.lua +++ b/plugins/console/init.lua @@ -5,7 +5,7 @@ local exports = {} exports.name = "console" exports.version = "0.0.1" exports.description = "Console plugin" -exports.license = "The BSD 3-Clause License" +exports.license = "BSD-3-Clause" exports.author = { name = "Carl" } local console = exports diff --git a/plugins/data/init.lua b/plugins/data/init.lua index 4ef3675968f..5ec08cbec3c 100644 --- a/plugins/data/init.lua +++ b/plugins/data/init.lua @@ -8,7 +8,7 @@ local exports = {} exports.name = "data" exports.version = "0.0.1" exports.description = "Data plugin" -exports.license = "The BSD 3-Clause License" +exports.license = "BSD-3-Clause" exports.author = { name = "Carl" } local data = exports diff --git a/plugins/discord/init.lua b/plugins/discord/init.lua index f95030f1c46..b6e25d08aa7 100644 --- a/plugins/discord/init.lua +++ b/plugins/discord/init.lua @@ -4,7 +4,7 @@ local exports = {} exports.name = "discord" exports.version = "0.0.1" exports.description = "Discord presence" -exports.license = "The BSD 3-Clause License" +exports.license = "BSD-3-Clause" exports.author = { name = "Carl" } local discord = exports diff --git a/plugins/dummy/init.lua b/plugins/dummy/init.lua index 026e29397c1..45f6d78d570 100644 --- a/plugins/dummy/init.lua +++ b/plugins/dummy/init.lua @@ -4,7 +4,7 @@ local exports = { name = "dummy", version = "0.0.1", description = "A dummy example", - license = "The BSD 3-Clause License", + license = "BSD-3-Clause", author = { name = "Miodrag Milanovic" }} local dummy = exports diff --git a/plugins/gdbstub/init.lua b/plugins/gdbstub/init.lua index f7d4ceee6ba..8a28a68d8cc 100644 --- a/plugins/gdbstub/init.lua +++ b/plugins/gdbstub/init.lua @@ -4,7 +4,7 @@ local exports = {} exports.name = "gdbstub" exports.version = "0.0.1" exports.description = "GDB stub plugin" -exports.license = "The BSD 3-Clause License" +exports.license = "BSD-3-Clause" exports.author = { name = "Carl" } local gdbstub = exports diff --git a/plugins/hiscore/init.lua b/plugins/hiscore/init.lua index 0865caa2721..4ec94c9a590 100644 --- a/plugins/hiscore/init.lua +++ b/plugins/hiscore/init.lua @@ -1,5 +1,5 @@ -- hiscore.lua --- by borgar@borgar.net, WTFPL license +-- by borgar@borgar.net, CC0 license -- -- This uses MAME's built-in Lua scripting to implement -- high-score saving with hiscore.dat infom just as older @@ -9,7 +9,7 @@ local exports = { name = 'hiscore', version = '1.0.0', description = 'Hiscore', - license = 'WTFPL license', + license = 'CC0', author = { name = 'borgar@borgar.net' } } local hiscore = exports diff --git a/plugins/inputmacro/init.lua b/plugins/inputmacro/init.lua index ef88efeadcd..99e3d61f1d4 100644 --- a/plugins/inputmacro/init.lua +++ b/plugins/inputmacro/init.lua @@ -4,7 +4,7 @@ local exports = { name = 'inputmacro', version = '0.0.1', description = 'Input macro plugin', - license = 'The BSD 3-Clause License', + license = 'BSD-3-Clause', author = { name = 'Vas Crabb' } } diff --git a/plugins/inputmacro/inputmacro_menu.lua b/plugins/inputmacro/inputmacro_menu.lua index afb2071996b..7c03d5b95a7 100644 --- a/plugins/inputmacro/inputmacro_menu.lua +++ b/plugins/inputmacro/inputmacro_menu.lua @@ -1,3 +1,7 @@ +-- license:BSD-3-Clause +-- copyright-holders:Vas Crabb + + -- Constants local MENU_TYPES = { MACROS = 0, ADD = 1, EDIT = 2, INPUT = 3 } diff --git a/plugins/inputmacro/inputmacro_persist.lua b/plugins/inputmacro/inputmacro_persist.lua index 04d310faeef..9c9e9322eed 100644 --- a/plugins/inputmacro/inputmacro_persist.lua +++ b/plugins/inputmacro/inputmacro_persist.lua @@ -1,3 +1,7 @@ +-- license:BSD-3-Clause +-- copyright-holders:Vas Crabb + + -- Helpers local function settings_path() diff --git a/plugins/layout/init.lua b/plugins/layout/init.lua index 55cb433baf2..45b810c86b7 100644 --- a/plugins/layout/init.lua +++ b/plugins/layout/init.lua @@ -6,7 +6,7 @@ local exports = {} exports.name = "layout" exports.version = "0.0.1" exports.description = "Layout helper plugin" -exports.license = "The BSD 3-Clause License" +exports.license = "BSD-3-Clause" exports.author = { name = "Carl" } local layout = exports diff --git a/plugins/portname/init.lua b/plugins/portname/init.lua index 24cdc50facf..88cc0d20898 100644 --- a/plugins/portname/init.lua +++ b/plugins/portname/init.lua @@ -21,7 +21,7 @@ local exports = {} exports.name = "portname" exports.version = "0.0.1" exports.description = "IOPort name/translation plugin" -exports.license = "The BSD 3-Clause License" +exports.license = "BSD-3-Clause" exports.author = { name = "Carl" } local portname = exports diff --git a/plugins/timer/init.lua b/plugins/timer/init.lua index eb61f85bf84..9457c1fc038 100644 --- a/plugins/timer/init.lua +++ b/plugins/timer/init.lua @@ -6,7 +6,7 @@ local exports = {} exports.name = "timer" exports.version = "0.0.2" exports.description = "Game play timer" -exports.license = "The BSD 3-Clause License" +exports.license = "BSD-3-Clause" exports.author = { name = "Carl" } local timer = exports -- cgit v1.2.3 From 041ab6527d34c08358b0e0d5c31d4b961c6df420 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Mon, 25 Oct 2021 14:30:03 +1100 Subject: apple2_flop_clcracked.xml, apple2gs_flop_clcracked.xml: Correct some issues. --- hash/apple2_flop_clcracked.xml | 2 +- hash/apple2gs_flop_clcracked.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hash/apple2_flop_clcracked.xml b/hash/apple2_flop_clcracked.xml index d2d820dd043..9bc531a6c43 100644 --- a/hash/apple2_flop_clcracked.xml +++ b/hash/apple2_flop_clcracked.xml @@ -45727,7 +45727,7 @@ license:CC0 - + The Games: Winter Edition (cleanly cracked) 1985 Epyx diff --git a/hash/apple2gs_flop_clcracked.xml b/hash/apple2gs_flop_clcracked.xml index cfb67644ba0..9f3f9cb7cf4 100644 --- a/hash/apple2gs_flop_clcracked.xml +++ b/hash/apple2gs_flop_clcracked.xml @@ -1586,13 +1586,13 @@ license:CC0 - + - + -- cgit v1.2.3 From b11a2e60e151d00aefd896f9efabeb207a114aba Mon Sep 17 00:00:00 2001 From: Patrick Mackinlay Date: Mon, 25 Oct 2021 11:47:37 +0700 Subject: strconv: avoid msvc debug assertion --- src/osd/strconv.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/osd/strconv.cpp b/src/osd/strconv.cpp index 6e1103adfcb..b798161006c 100644 --- a/src/osd/strconv.cpp +++ b/src/osd/strconv.cpp @@ -26,7 +26,7 @@ inline std::string &mbstring_from_wstring(std::string &dst, UINT code_page, cons // convert UTF-16 to the specified code page const int dst_char_count = WideCharToMultiByte(code_page, 0, src.data(), src.length(), nullptr, 0, nullptr, nullptr); dst.resize(dst_char_count); - WideCharToMultiByte(code_page, 0, &src[0], src.length(), dst.data(), dst_char_count, nullptr, nullptr); + WideCharToMultiByte(code_page, 0, src.data(), src.length(), dst.data(), dst_char_count, nullptr, nullptr); return dst; } @@ -41,7 +41,7 @@ inline std::wstring &wstring_from_mbstring(std::wstring &dst, const std::string_ // convert multibyte string (in specified code page) to UTF-16 const int dst_char_count = MultiByteToWideChar(code_page, 0, src.data(), src.length(), nullptr, 0); dst.resize(dst_char_count); - MultiByteToWideChar(code_page, 0, &src[0], src.length(), dst.data(), dst_char_count); + MultiByteToWideChar(code_page, 0, src.data(), src.length(), dst.data(), dst_char_count); return dst; } -- cgit v1.2.3 From fc87679998630e743855f9ec8e5207cac0b9e9d1 Mon Sep 17 00:00:00 2001 From: Patrick Mackinlay Date: Mon, 25 Oct 2021 12:03:58 +0700 Subject: esripsys: fix debugger crash --- src/mame/drivers/esripsys.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mame/drivers/esripsys.cpp b/src/mame/drivers/esripsys.cpp index edaa9ff6ca3..06d014b2cff 100644 --- a/src/mame/drivers/esripsys.cpp +++ b/src/mame/drivers/esripsys.cpp @@ -629,6 +629,9 @@ void esripsys_state::init_esripsys() subdevice("nvram")->set_base(m_cmos_ram.get(), CMOS_RAM_SIZE); + // FIXME: arbitrarily initialize bank1 to avoid debugger crash + membank("bank1")->set_base(&memregion("game_cpu")->base()[0x10000]); + membank("bank2")->set_base(&rom[0x0000]); membank("bank3")->set_base(&rom[0x4000]); membank("bank4")->set_base(&rom[0x8000]); -- cgit v1.2.3 From f16565a556472bb4676afac46b4aaf7205c53d00 Mon Sep 17 00:00:00 2001 From: cracyc Date: Sun, 24 Oct 2021 20:46:57 -0500 Subject: plugin/data: handle multiple blocks in dat --- plugins/data/data_command.lua | 3 +-- plugins/data/load_dat.lua | 16 +++++++++++----- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/plugins/data/data_command.lua b/plugins/data/data_command.lua index f32544c5063..de2483bcdc9 100644 --- a/plugins/data/data_command.lua +++ b/plugins/data/data_command.lua @@ -7,7 +7,7 @@ do if not buttonchar then buttonchar = require("data/button_char") end return buttonchar(str) end - datread, ver = datread.open("command.dat", "# Version:", convert) + datread, ver = datread.open("command.dat", "#[^V]*Ver[^.:]*[.:]", convert) end function dat.check(set, softlist) @@ -19,7 +19,6 @@ function dat.check(set, softlist) if not status or not info then return nil end - info = "#jf\n" .. info return _("Command") end diff --git a/plugins/data/load_dat.lua b/plugins/data/load_dat.lua index ed13fbefdcc..1b067aef1eb 100644 --- a/plugins/data/load_dat.lua +++ b/plugins/data/load_dat.lua @@ -106,21 +106,21 @@ function datfile.open(file, vertag, fixupcb) local tags, data while not data do local npos - local spos, epos = buffer:find("[\n\r]$[^=]*=[^\n\r]*", pos) + local spos, epos = buffer:find("[\n\r]$[^=\n\r]*=[^\n\r]*", pos) if not spos then return nil end - npos, epos = buffer:find("[\n\r]$%w*[\n\r]+", epos) + npos, epos = buffer:find("[\n\r]$%w+%s*[\n\r]+", epos) if not npos then return nil end tags = buffer:sub(spos, epos) - spos, npos = buffer:find("[\n\r]$end[\n\r]", epos) + spos, npos = buffer:find("[\n\r]$[^=\n\r]*=[^\n\r]*", epos) if not spos then return nil end data = buffer:sub(epos, spos) - pos = npos + pos = spos end return tags, data end @@ -129,6 +129,8 @@ function datfile.open(file, vertag, fixupcb) for info, data in gmatchpos() do local tags = {} local infotype + info = info:gsub(utf8.char(0xfeff), "") --remove boms + data = data:gsub(utf8.char(0xfeff), "") for s in info:gmatch("[\n\r]$([^\n\r]*)") do if s:find("=", 1, true) then local m1, m2 = s:match("([^=]*)=(.*)") @@ -142,7 +144,11 @@ function datfile.open(file, vertag, fixupcb) break end end - + + data = data:gsub("[\n\r]$end%s*[\n\r]$%w+%s*[\n\r]", "\n") + data = data:gsub("[\n\r]$end%s*[\n\r].-[\n\r]$%w+%s*[\n\r]", "\n") + data = data:gsub("[\n\r]$end%s*[\n\r].*", "") + if #tags > 0 and infotype then data = data:gsub("\r", "") -- strip crs if fixupcb then -- cgit v1.2.3 From 27599c115e6fbb20042b113bb2e29b47bb027fce Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Mon, 25 Oct 2021 16:52:55 +1100 Subject: plugins/data: srcclean --- plugins/data/load_dat.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/data/load_dat.lua b/plugins/data/load_dat.lua index 1b067aef1eb..7209872ad32 100644 --- a/plugins/data/load_dat.lua +++ b/plugins/data/load_dat.lua @@ -144,11 +144,11 @@ function datfile.open(file, vertag, fixupcb) break end end - + data = data:gsub("[\n\r]$end%s*[\n\r]$%w+%s*[\n\r]", "\n") data = data:gsub("[\n\r]$end%s*[\n\r].-[\n\r]$%w+%s*[\n\r]", "\n") data = data:gsub("[\n\r]$end%s*[\n\r].*", "") - + if #tags > 0 and infotype then data = data:gsub("\r", "") -- strip crs if fixupcb then -- cgit v1.2.3