summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author ImJezze <jezze@gmx.net>2016-02-22 18:29:53 +0100
committer ImJezze <jezze@gmx.net>2016-02-22 18:29:53 +0100
commitd44f8f4c2bdf19fdd55a45c779b746160d90d4fa (patch)
tree16d68eab6a3734ac0aaad0a6bc35e764a5a6fde9 /src
parent3be56e3cef6e7778c0ad5b7aac253e6da2876cd2 (diff)
parent72dd79838fc7b942cedc9099a9cffb01b3bb8637 (diff)
Merge pull request #13 from mamedev/master
Sync to base master
Diffstat (limited to 'src')
-rw-r--r--src/emu/emuopts.cpp4
-rw-r--r--src/emu/emuopts.h11
-rw-r--r--src/emu/ui/cheatopt.cpp5
-rw-r--r--src/emu/ui/custui.cpp97
-rw-r--r--src/emu/ui/datmenu.cpp18
-rw-r--r--src/emu/ui/dirmenu.cpp629
-rw-r--r--src/emu/ui/dirmenu.h43
-rw-r--r--src/emu/ui/dsplmenu.cpp4
-rw-r--r--src/emu/ui/miscmenu.cpp36
-rw-r--r--src/emu/ui/moptions.cpp4
-rw-r--r--src/emu/ui/moptions.h11
-rw-r--r--src/emu/ui/optsmenu.cpp20
-rw-r--r--src/emu/ui/selector.cpp4
-rw-r--r--src/emu/ui/selgame.cpp28
-rw-r--r--src/emu/ui/selsoft.cpp40
-rw-r--r--src/emu/ui/simpleselgame.cpp4
-rw-r--r--src/emu/ui/slotopt.cpp4
-rw-r--r--src/emu/ui/sndmenu.cpp10
-rw-r--r--src/emu/ui/ui.cpp120
-rw-r--r--src/emu/ui/videoopt.cpp16
-rw-r--r--src/emu/ui/viewgfx.cpp2
-rw-r--r--src/mame/drivers/at.cpp11
-rw-r--r--src/mame/drivers/hh_cop400.cpp53
-rw-r--r--src/mame/drivers/hh_tms1k.cpp230
-rw-r--r--src/mame/drivers/pc9801.cpp159
-rw-r--r--src/mame/drivers/viper.cpp9
-rw-r--r--src/mame/layout/amaztron.lay235
-rw-r--r--src/mame/layout/mdndclab.lay271
-rw-r--r--src/mame/mess.lst1
-rw-r--r--src/osd/modules/render/draw13.cpp26
-rw-r--r--src/osd/modules/render/draw13.h24
-rw-r--r--src/osd/modules/render/drawbgfx.cpp20
-rw-r--r--src/osd/modules/render/drawbgfx.h6
-rw-r--r--src/osd/modules/render/drawd3d.cpp9
-rw-r--r--src/osd/modules/render/drawd3d.h6
-rw-r--r--src/osd/modules/render/drawgdi.h4
-rw-r--r--src/osd/modules/render/drawnone.h4
-rw-r--r--src/osd/modules/render/drawogl.cpp3
-rw-r--r--src/osd/modules/render/drawogl.h4
-rw-r--r--src/osd/modules/render/drawsdl.h5
-rw-r--r--src/osd/modules/sound/js_sound.js24
-rw-r--r--src/osd/sdl/man/mame.612
-rw-r--r--src/osd/sdl/man/mess.612
-rw-r--r--src/osd/sdl/sdlprefix.h2
-rw-r--r--src/osd/sdl/window.cpp27
-rw-r--r--src/osd/windows/video.cpp1
-rw-r--r--src/osd/windows/window.cpp35
47 files changed, 1462 insertions, 841 deletions
diff --git a/src/emu/emuopts.cpp b/src/emu/emuopts.cpp
index ccb7c5d9487..1fb827ed1a6 100644
--- a/src/emu/emuopts.cpp
+++ b/src/emu/emuopts.cpp
@@ -183,8 +183,12 @@ const options_entry emu_options::s_option_entries[] =
{ OPTION_DRC_LOG_NATIVE, "0", OPTION_BOOLEAN, "write DRC native disassembly log" },
{ OPTION_BIOS, nullptr, OPTION_STRING, "select the system BIOS to use" },
{ OPTION_CHEAT ";c", "0", OPTION_BOOLEAN, "enable cheat subsystem" },
+ { OPTION_SKIP_GAMEINFO, "0", OPTION_BOOLEAN, "skip displaying the information screen at startup" },
+ { OPTION_UI_FONT, "default", OPTION_STRING, "specify a font to use" },
{ OPTION_UI, "cabinet", OPTION_STRING, "type of UI (simple|cabinet)" },
{ OPTION_RAMSIZE ";ram", nullptr, OPTION_STRING, "size of RAM (if supported by driver)" },
+ { OPTION_CONFIRM_QUIT, "0", OPTION_BOOLEAN, "display confirm quit screen on exit" },
+ { OPTION_UI_MOUSE, "1", OPTION_BOOLEAN, "display ui mouse cursor" },
{ OPTION_AUTOBOOT_COMMAND ";ab", nullptr, OPTION_STRING, "command to execute after machine boot" },
{ OPTION_AUTOBOOT_DELAY, "2", OPTION_INTEGER, "timer delay in sec to trigger command execution on autoboot" },
{ OPTION_AUTOBOOT_SCRIPT ";script", nullptr, OPTION_STRING, "lua script to execute after machine boot" },
diff --git a/src/emu/emuopts.h b/src/emu/emuopts.h
index c0aefb6ac28..85e054a4c43 100644
--- a/src/emu/emuopts.h
+++ b/src/emu/emuopts.h
@@ -176,6 +176,8 @@ enum
#define OPTION_DRC_LOG_NATIVE "drc_log_native"
#define OPTION_BIOS "bios"
#define OPTION_CHEAT "cheat"
+#define OPTION_SKIP_GAMEINFO "skip_gameinfo"
+#define OPTION_UI_FONT "uifont"
#define OPTION_UI "ui"
#define OPTION_RAMSIZE "ramsize"
@@ -185,6 +187,9 @@ enum
#define OPTION_COMM_REMOTE_HOST "comm_remotehost"
#define OPTION_COMM_REMOTE_PORT "comm_remoteport"
+#define OPTION_CONFIRM_QUIT "confirm_quit"
+#define OPTION_UI_MOUSE "ui_mouse"
+
#define OPTION_AUTOBOOT_COMMAND "autoboot_command"
#define OPTION_AUTOBOOT_DELAY "autoboot_delay"
#define OPTION_AUTOBOOT_SCRIPT "autoboot_script"
@@ -353,6 +358,8 @@ public:
bool drc_log_native() const { return bool_value(OPTION_DRC_LOG_NATIVE); }
const char *bios() const { return value(OPTION_BIOS); }
bool cheat() const { return bool_value(OPTION_CHEAT); }
+ bool skip_gameinfo() const { return bool_value(OPTION_SKIP_GAMEINFO); }
+ const char *ui_font() const { return value(OPTION_UI_FONT); }
const char *ui() const { return value(OPTION_UI); }
const char *ram_size() const { return value(OPTION_RAMSIZE); }
@@ -362,6 +369,10 @@ public:
const char *comm_remotehost() const { return value(OPTION_COMM_REMOTE_HOST); }
const char *comm_remoteport() const { return value(OPTION_COMM_REMOTE_PORT); }
+
+ bool confirm_quit() const { return bool_value(OPTION_CONFIRM_QUIT); }
+ bool ui_mouse() const { return bool_value(OPTION_UI_MOUSE); }
+
const char *autoboot_command() const { return value(OPTION_AUTOBOOT_COMMAND); }
int autoboot_delay() const { return int_value(OPTION_AUTOBOOT_DELAY); }
const char *autoboot_script() const { return value(OPTION_AUTOBOOT_SCRIPT); }
diff --git a/src/emu/ui/cheatopt.cpp b/src/emu/ui/cheatopt.cpp
index 1d13f8e8c94..6de3cb55936 100644
--- a/src/emu/ui/cheatopt.cpp
+++ b/src/emu/ui/cheatopt.cpp
@@ -34,16 +34,15 @@ void ui_menu_cheat::handle()
machine().popmessage(nullptr);
/* handle reset all + reset all cheats for reload all option */
- if (menu_event->itemref < ITEMREF_CHEATS_FIRST_ITEM && menu_event->iptkey == IPT_UI_SELECT)
+ if ((menu_event->itemref == ITEMREF_CHEATS_RESET_ALL || menu_event->itemref == ITEMREF_CHEATS_RELOAD_ALL) && menu_event->iptkey == IPT_UI_SELECT)
{
for (cheat_entry *curcheat = machine().cheat().first(); curcheat != nullptr; curcheat = curcheat->next())
if (curcheat->select_default_state())
changed = true;
}
-
/* handle individual cheats */
- else if (menu_event->itemref > ITEMREF_CHEATS_FIRST_ITEM)
+ else if (menu_event->itemref >= ITEMREF_CHEATS_FIRST_ITEM)
{
cheat_entry *curcheat = reinterpret_cast<cheat_entry *>(menu_event->itemref);
const char *string;
diff --git a/src/emu/ui/custui.cpp b/src/emu/ui/custui.cpp
index 09ab2e0bf0b..6492faebabf 100644
--- a/src/emu/ui/custui.cpp
+++ b/src/emu/ui/custui.cpp
@@ -16,7 +16,11 @@
#include "ui/utils.h"
#include <algorithm>
-const char *ui_menu_custom_ui::hide_status[] = { "Show All", "Hide Filters", "Hide Info/Image", "Hide Both" };
+const char *ui_menu_custom_ui::hide_status[] = {
+ __("Show All"),
+ __("Hide Filters"),
+ __("Hide Info/Image"),
+ __("Hide Both") };
//-------------------------------------------------
// ctor
@@ -29,7 +33,7 @@ ui_menu_custom_ui::ui_menu_custom_ui(running_machine &machine, render_container
const char *lang = machine.options().language();
const osd_directory_entry *dirent;
int cnt = 0;
- for (int x = 0; (dirent = path.next()) != nullptr; ++x)
+ while ((dirent = path.next()) != nullptr)
if (dirent->type == ENTTYPE_DIR && strcmp(dirent->name, ".") != 0 && strcmp(dirent->name, "..") != 0)
{
auto name = std::string(dirent->name);
@@ -94,7 +98,7 @@ void ui_menu_custom_ui::handle()
int total = ARRAY_LENGTH(hide_status);
std::vector<std::string> s_sel(total);
for (int index = 0; index < total; ++index)
- s_sel[index] = hide_status[index];
+ s_sel[index] = _(hide_status[index]);
ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, s_sel, ui_globals::panels_status));
}
@@ -130,17 +134,17 @@ void ui_menu_custom_ui::handle()
void ui_menu_custom_ui::populate()
{
UINT32 arrow_flags;
- item_append("Fonts", nullptr, 0, (void *)(FPTR)FONT_MENU);
- item_append("Colors", nullptr, 0, (void *)(FPTR)COLORS_MENU);
+ item_append(_("Fonts"), nullptr, 0, (void *)(FPTR)FONT_MENU);
+ item_append(_("Colors"), nullptr, 0, (void *)(FPTR)COLORS_MENU);
if (!m_lang.empty())
{
arrow_flags = get_arrow_flags(0, m_lang.size() - 1, m_currlang);
- item_append("Language", m_lang[m_currlang].c_str(), arrow_flags, (void *)(FPTR)LANGUAGE_MENU);
+ item_append(_("Language"), m_lang[m_currlang].c_str(), arrow_flags, (void *)(FPTR)LANGUAGE_MENU);
}
arrow_flags = get_arrow_flags(0, (int)HIDE_BOTH, ui_globals::panels_status);
- item_append("Show side panels", hide_status[ui_globals::panels_status], arrow_flags, (void *)(FPTR)HIDE_MENU);
+ item_append(_("Show side panels"), _(hide_status[ui_globals::panels_status]), arrow_flags, (void *)(FPTR)HIDE_MENU);
item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
customtop = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
@@ -155,7 +159,7 @@ void ui_menu_custom_ui::custom_render(void *selectedref, float top, float bottom
float width;
ui_manager &mui = machine().ui();
- mui.draw_text_full(container, "Custom UI Settings", 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
+ mui.draw_text_full(container, _("Custom UI Settings"), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
width += 2 * UI_BOX_LR_BORDER;
float maxwidth = MAX(origx2 - origx1, width);
@@ -175,7 +179,7 @@ void ui_menu_custom_ui::custom_render(void *selectedref, float top, float bottom
y1 += UI_BOX_TB_BORDER;
// draw the text within it
- mui.draw_text_full(container, "Custom UI Settings", x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
+ mui.draw_text_full(container, _("Custom UI Settings"), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
}
@@ -188,7 +192,7 @@ ui_menu_font_ui::ui_menu_font_ui(running_machine &machine, render_container *con
ui_options &moptions = machine.ui().options();
#ifdef UI_WINDOWS
- std::string name(machine.ui().options().ui_font());
+ std::string name(machine.options().ui_font());
list();
m_bold = (strreplace(name, "[B]", "") + strreplace(name, "[b]", "") > 0);
@@ -281,7 +285,8 @@ ui_menu_font_ui::~ui_menu_font_ui()
if (m_bold)
name.insert(0, "[B]");
}
- moptions.set_value(OPTION_UI_FONT, name.c_str(), OPTION_PRIORITY_CMDLINE, error_string);
+ machine().options().set_value(OPTION_UI_FONT, name.c_str(), OPTION_PRIORITY_CMDLINE, error_string);
+ machine().options().mark_changed(OPTION_UI_FONT);
#endif
moptions.set_value(OPTION_INFOS_SIZE, m_info_size, OPTION_PRIORITY_CMDLINE, error_string);
@@ -362,18 +367,18 @@ void ui_menu_font_ui::populate()
// add fonts option
arrow_flags = get_arrow_flags(0, m_fonts.size() - 1, m_actual);
std::string name(m_fonts[m_actual]);
- item_append("UI Font", name.c_str(), arrow_flags, (void *)(FPTR)MUI_FNT);
+ item_append(_("UI Font"), name.c_str(), arrow_flags, (void *)(FPTR)MUI_FNT);
if (name != "default")
{
- item_append("Bold", m_bold ? "On" : "Off", m_bold ? MENU_FLAG_RIGHT_ARROW : MENU_FLAG_LEFT_ARROW, (void *)(FPTR)MUI_BOLD);
- item_append("Italic", m_italic ? "On" : "Off", m_italic ? MENU_FLAG_RIGHT_ARROW : MENU_FLAG_LEFT_ARROW, (void *)(FPTR)MUI_ITALIC);
+ item_append(_("Bold"), m_bold ? "On" : "Off", m_bold ? MENU_FLAG_RIGHT_ARROW : MENU_FLAG_LEFT_ARROW, (void *)(FPTR)MUI_BOLD);
+ item_append(_("Italic"), m_italic ? "On" : "Off", m_italic ? MENU_FLAG_RIGHT_ARROW : MENU_FLAG_LEFT_ARROW, (void *)(FPTR)MUI_ITALIC);
}
#endif
arrow_flags = get_arrow_flags(m_font_min, m_font_max, m_font_size);
strprintf(tmptxt, "%2d", m_font_size);
- item_append("Lines", tmptxt.c_str(), arrow_flags, (void *)(FPTR)FONT_SIZE);
+ item_append(_("Lines"), tmptxt.c_str(), arrow_flags, (void *)(FPTR)FONT_SIZE);
item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
@@ -381,7 +386,7 @@ void ui_menu_font_ui::populate()
tmptxt.clear();
strprintf(tmptxt, "%3.2f", m_info_size);
arrow_flags = get_arrow_flags(m_info_min, m_info_max, m_info_size);
- item_append("Infos text size", tmptxt.c_str(), arrow_flags, (void *)(FPTR)INFOS_SIZE);
+ item_append(_("Infos text size"), tmptxt.c_str(), arrow_flags, (void *)(FPTR)INFOS_SIZE);
item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
@@ -398,7 +403,7 @@ void ui_menu_font_ui::custom_render(void *selectedref, float top, float bottom,
ui_manager &mui = machine().ui();
// top text
- std::string topbuf("UI Fonts Settings");
+ std::string topbuf(_("UI Fonts Settings"));
mui.draw_text_full(container, topbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
@@ -425,7 +430,7 @@ void ui_menu_font_ui::custom_render(void *selectedref, float top, float bottom,
if ((FPTR)selectedref == INFOS_SIZE)
{
- topbuf = "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit.";
+ topbuf = _("Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
mui.draw_text_full(container, topbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_LEFT, WRAP_NEVER,
DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr, m_info_size);
@@ -523,25 +528,25 @@ void ui_menu_colors_ui::handle()
void ui_menu_colors_ui::populate()
{
- item_append("Normal text", nullptr, 0, (void *)(FPTR)MUI_TEXT_COLOR);
- item_append("Selected color", nullptr, 0, (void *)(FPTR)MUI_SELECTED_COLOR);
- item_append("Normal text background", nullptr, 0, (void *)(FPTR)MUI_TEXT_BG_COLOR);
- item_append("Selected background color", nullptr, 0, (void *)(FPTR)MUI_SELECTED_BG_COLOR);
- item_append("Subitem color", nullptr, 0, (void *)(FPTR)MUI_SUBITEM_COLOR);
- item_append("Clone", nullptr, 0, (void *)(FPTR)MUI_CLONE_COLOR);
- item_append("Border", nullptr, 0, (void *)(FPTR)MUI_BORDER_COLOR);
- item_append("Background", nullptr, 0, (void *)(FPTR)MUI_BACKGROUND_COLOR);
- item_append("Dipswitch", nullptr, 0, (void *)(FPTR)MUI_DIPSW_COLOR);
- item_append("Unavailable color", nullptr, 0, (void *)(FPTR)MUI_UNAVAILABLE_COLOR);
- item_append("Slider color", nullptr, 0, (void *)(FPTR)MUI_SLIDER_COLOR);
- item_append("Gfx viewer background", nullptr, 0, (void *)(FPTR)MUI_GFXVIEWER_BG_COLOR);
- item_append("Mouse over color", nullptr, 0, (void *)(FPTR)MUI_MOUSEOVER_COLOR);
- item_append("Mouse over background color", nullptr, 0, (void *)(FPTR)MUI_MOUSEOVER_BG_COLOR);
- item_append("Mouse down color", nullptr, 0, (void *)(FPTR)MUI_MOUSEDOWN_COLOR);
- item_append("Mouse down background color", nullptr, 0, (void *)(FPTR)MUI_MOUSEDOWN_BG_COLOR);
+ item_append(_("Normal text"), nullptr, 0, (void *)(FPTR)MUI_TEXT_COLOR);
+ item_append(_("Selected color"), nullptr, 0, (void *)(FPTR)MUI_SELECTED_COLOR);
+ item_append(_("Normal text background"), nullptr, 0, (void *)(FPTR)MUI_TEXT_BG_COLOR);
+ item_append(_("Selected background color"), nullptr, 0, (void *)(FPTR)MUI_SELECTED_BG_COLOR);
+ item_append(_("Subitem color"), nullptr, 0, (void *)(FPTR)MUI_SUBITEM_COLOR);
+ item_append(_("Clone"), nullptr, 0, (void *)(FPTR)MUI_CLONE_COLOR);
+ item_append(_("Border"), nullptr, 0, (void *)(FPTR)MUI_BORDER_COLOR);
+ item_append(_("Background"), nullptr, 0, (void *)(FPTR)MUI_BACKGROUND_COLOR);
+ item_append(_("Dipswitch"), nullptr, 0, (void *)(FPTR)MUI_DIPSW_COLOR);
+ item_append(_("Unavailable color"), nullptr, 0, (void *)(FPTR)MUI_UNAVAILABLE_COLOR);
+ item_append(_("Slider color"), nullptr, 0, (void *)(FPTR)MUI_SLIDER_COLOR);
+ item_append(_("Gfx viewer background"), nullptr, 0, (void *)(FPTR)MUI_GFXVIEWER_BG_COLOR);
+ item_append(_("Mouse over color"), nullptr, 0, (void *)(FPTR)MUI_MOUSEOVER_COLOR);
+ item_append(_("Mouse over background color"), nullptr, 0, (void *)(FPTR)MUI_MOUSEOVER_BG_COLOR);
+ item_append(_("Mouse down color"), nullptr, 0, (void *)(FPTR)MUI_MOUSEDOWN_COLOR);
+ item_append(_("Mouse down background color"), nullptr, 0, (void *)(FPTR)MUI_MOUSEDOWN_BG_COLOR);
item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
- item_append("Restore originals colors", nullptr, 0, (void *)(FPTR)MUI_RESTORE);
+ item_append(_("Restore originals colors"), nullptr, 0, (void *)(FPTR)MUI_RESTORE);
custombottom = customtop = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
}
@@ -557,7 +562,7 @@ void ui_menu_colors_ui::custom_render(void *selectedref, float top, float bottom
float line_height = mui.get_line_height();
// top text
- std::string topbuf("UI Colors Settings");
+ std::string topbuf(_("UI Colors Settings"));
mui.draw_text_full(container, topbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER,
DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
@@ -585,7 +590,7 @@ void ui_menu_colors_ui::custom_render(void *selectedref, float top, float bottom
// bottom text
// get the text for 'UI Select'
std::string ui_select_text = machine().input().seq_name(machine().ioport().type_seq(IPT_UI_SELECT, 0, SEQ_TYPE_STANDARD));
- topbuf.assign("Double click or press ").append(ui_select_text.c_str()).append(" to change the color value");
+ topbuf.assign(_("Double click or press ")).append(ui_select_text.c_str()).append(_(" to change the color value"));
mui.draw_text_full(container, topbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER,
DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
@@ -611,7 +616,7 @@ void ui_menu_colors_ui::custom_render(void *selectedref, float top, float bottom
DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
// compute maxwidth
- topbuf = "Menu Preview";
+ topbuf = _("Menu Preview");
mui.draw_text_full(container, topbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER,
DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
@@ -619,11 +624,11 @@ void ui_menu_colors_ui::custom_render(void *selectedref, float top, float bottom
std::string sampletxt[5];
- sampletxt[0] = "Normal";
- sampletxt[1] = "Subitem";
- sampletxt[2] = "Selected";
- sampletxt[3] = "Mouse Over";
- sampletxt[4] = "Clone";
+ sampletxt[0] = _("Normal");
+ sampletxt[1] = _("Subitem");
+ sampletxt[2] = _("Selected");
+ sampletxt[3] = _("Mouse Over");
+ sampletxt[4] = _("Clone");
for (auto & elem: sampletxt)
{
@@ -889,7 +894,7 @@ void ui_menu_rgb_ui::populate()
item_append("Blue", s_text.c_str(), 0, (void *)(FPTR)RGB_BLUE);
item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
- item_append("Choose from palette", nullptr, 0, (void *)(FPTR)PALETTE_CHOOSE);
+ item_append(_("Choose from palette"), nullptr, 0, (void *)(FPTR)PALETTE_CHOOSE);
item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
custombottom = customtop = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
@@ -905,7 +910,7 @@ void ui_menu_rgb_ui::custom_render(void *selectedref, float top, float bottom, f
ui_manager &mui = machine().ui();
// top text
- std::string topbuf = std::string(m_title).append(" - ARGB Settings");
+ std::string topbuf = std::string(m_title).append(_(" - ARGB Settings"));
mui.draw_text_full(container, topbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER,
DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
width += 2 * UI_BOX_LR_BORDER;
@@ -929,7 +934,7 @@ void ui_menu_rgb_ui::custom_render(void *selectedref, float top, float bottom, f
mui.draw_text_full(container, topbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER,
DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
- std::string sampletxt("Color preview =");
+ std::string sampletxt(_("Color preview ="));
maxwidth = origx2 - origx1;
mui.draw_text_full(container, sampletxt.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER,
DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
diff --git a/src/emu/ui/datmenu.cpp b/src/emu/ui/datmenu.cpp
index 5e2d574edc0..ba8dde22bad 100644
--- a/src/emu/ui/datmenu.cpp
+++ b/src/emu/ui/datmenu.cpp
@@ -56,9 +56,9 @@ ui_menu_dats_view::ui_menu_dats_view(running_machine &machine, render_container
issoft = true;
if (machine.datfile().has_software(m_list, m_short, m_parent))
- m_items_list.emplace_back("Software History", UI_HISTORY_LOAD, machine.datfile().rev_history());
+ m_items_list.emplace_back(_("Software History"), UI_HISTORY_LOAD, machine.datfile().rev_history());
if (swinfo && !swinfo->usage.empty())
- m_items_list.emplace_back("Software Usage", 0, "");
+ m_items_list.emplace_back(_("Software Usage"), 0, "");
}
//-------------------------------------------------
@@ -196,7 +196,7 @@ void ui_menu_dats_view::custom_render(void *selectedref, float top, float bottom
// bottom
std::string revision;
- revision.assign("Revision: ").append(m_items_list[actual].revision);
+ revision.assign(_("Revision: ")).append(m_items_list[actual].revision);
mui.draw_text_full(container, revision.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
width += 2 * UI_BOX_LR_BORDER;
@@ -288,16 +288,16 @@ void ui_menu_dats_view::init_items()
{
datfile_manager &datfile = machine().datfile();
if (datfile.has_history(m_driver))
- m_items_list.emplace_back("History", UI_HISTORY_LOAD, datfile.rev_history());
+ m_items_list.emplace_back(_("History"), UI_HISTORY_LOAD, datfile.rev_history());
if (datfile.has_mameinfo(m_driver))
- m_items_list.emplace_back("Mameinfo", UI_MAMEINFO_LOAD, datfile.rev_mameinfo());
+ m_items_list.emplace_back(_("Mameinfo"), UI_MAMEINFO_LOAD, datfile.rev_mameinfo());
if (datfile.has_messinfo(m_driver))
- m_items_list.emplace_back("Messinfo", UI_MESSINFO_LOAD, datfile.rev_messinfo());
+ m_items_list.emplace_back(_("Messinfo"), UI_MESSINFO_LOAD, datfile.rev_messinfo());
if (datfile.has_sysinfo(m_driver))
- m_items_list.emplace_back("Sysinfo", UI_SYSINFO_LOAD, datfile.rev_sysinfo());
+ m_items_list.emplace_back(_("Sysinfo"), UI_SYSINFO_LOAD, datfile.rev_sysinfo());
if (datfile.has_story(m_driver))
- m_items_list.emplace_back("Mamescore", UI_STORY_LOAD, datfile.rev_storyinfo());
+ m_items_list.emplace_back(_("Mamescore"), UI_STORY_LOAD, datfile.rev_storyinfo());
if (datfile.has_command(m_driver))
- m_items_list.emplace_back("Command", UI_COMMAND_LOAD, "");
+ m_items_list.emplace_back(_("Command"), UI_COMMAND_LOAD, "");
}
diff --git a/src/emu/ui/dirmenu.cpp b/src/emu/ui/dirmenu.cpp
index 69c360920dd..f1cc16bae0b 100644
--- a/src/emu/ui/dirmenu.cpp
+++ b/src/emu/ui/dirmenu.cpp
@@ -16,54 +16,266 @@
#include "ui/utils.h"
#include "ui/optsmenu.h"
+static int ADDING = 1;
+static int CHANGE = 2;
+
struct folders_entry
{
const char *name;
const char *option;
+ const int action;
};
-static const folders_entry s_folders_entry[] =
+static const folders_entry s_folders[] =
{
- { "ROMs", OPTION_MEDIAPATH },
- { "UI", OPTION_UI_PATH },
- { "Samples", OPTION_SAMPLEPATH },
- { "DATs", OPTION_HISTORY_PATH },
- { "INIs", OPTION_INIPATH },
- { "Extra INIs", OPTION_EXTRAINI_PATH },
- { "Icons", OPTION_ICONS_PATH },
- { "Cheats", OPTION_CHEATPATH },
- { "Snapshots", OPTION_SNAPSHOT_DIRECTORY },
- { "Cabinets", OPTION_CABINETS_PATH },
- { "Flyers", OPTION_FLYERS_PATH },
- { "Titles", OPTION_TITLES_PATH },
- { "Ends", OPTION_ENDS_PATH },
- { "PCBs", OPTION_PCBS_PATH },
- { "Marquees", OPTION_MARQUEES_PATH },
- { "Controls Panels", OPTION_CPANELS_PATH },
- { "Crosshairs", OPTION_CROSSHAIRPATH },
- { "Artworks", OPTION_ARTPATH },
- { "Bosses", OPTION_BOSSES_PATH },
- { "Artworks Preview", OPTION_ARTPREV_PATH },
- { "Select", OPTION_SELECT_PATH },
- { "GameOver", OPTION_GAMEOVER_PATH },
- { "HowTo", OPTION_HOWTO_PATH },
- { "Logos", OPTION_LOGOS_PATH },
- { "Scores", OPTION_SCORES_PATH },
- { "Versus", OPTION_VERSUS_PATH },
- { nullptr }
+ { __("ROMs"), OPTION_MEDIAPATH, ADDING },
+ { __("UI"), OPTION_UI_PATH, CHANGE },
+ { __("Language"), OPTION_LANGUAGEPATH, CHANGE },
+ { __("Samples"), OPTION_SAMPLEPATH, ADDING },
+ { __("DATs"), OPTION_HISTORY_PATH, CHANGE },
+ { __("INIs"), OPTION_INIPATH, ADDING },
+ { __("Extra INIs"), OPTION_EXTRAINI_PATH, CHANGE },
+ { __("Icons"), OPTION_ICONS_PATH, ADDING },
+ { __("Cheats"), OPTION_CHEATPATH, ADDING },
+ { __("Snapshots"), OPTION_SNAPSHOT_DIRECTORY, ADDING },
+ { __("Cabinets"), OPTION_CABINETS_PATH, ADDING },
+ { __("Flyers"), OPTION_FLYERS_PATH, ADDING },
+ { __("Titles"), OPTION_TITLES_PATH, ADDING },
+ { __("Ends"), OPTION_ENDS_PATH, ADDING },
+ { __("PCBs"), OPTION_PCBS_PATH, ADDING },
+ { __("Marquees"), OPTION_MARQUEES_PATH, ADDING },
+ { __("Controls Panels"), OPTION_CPANELS_PATH, ADDING },
+ { __("Crosshairs"), OPTION_CROSSHAIRPATH, ADDING },
+ { __("Artworks"), OPTION_ARTPATH, ADDING },
+ { __("Bosses"), OPTION_BOSSES_PATH, ADDING },
+ { __("Artworks Preview"), OPTION_ARTPREV_PATH, ADDING },
+ { __("Select"), OPTION_SELECT_PATH, ADDING },
+ { __("GameOver"), OPTION_GAMEOVER_PATH, ADDING },
+ { __("HowTo"), OPTION_HOWTO_PATH, ADDING },
+ { __("Logos"), OPTION_LOGOS_PATH, ADDING },
+ { __("Scores"), OPTION_SCORES_PATH, ADDING },
+ { __("Versus"), OPTION_VERSUS_PATH, ADDING },
};
+
+/**************************************************
+ MENU DIRECTORY
+**************************************************/
+//-------------------------------------------------
+// ctor / dtor
+//-------------------------------------------------
+
+ui_menu_directory::ui_menu_directory(running_machine &machine, render_container *container) : ui_menu(machine, container)
+{
+}
+
+ui_menu_directory::~ui_menu_directory()
+{
+ save_ui_options(machine());
+ ui_globals::reset = true;
+}
+
+//-------------------------------------------------
+// handle
+//-------------------------------------------------
+
+void ui_menu_directory::handle()
+{
+ // process the menu
+ const ui_menu_event *m_event = process(0);
+
+ if (m_event != nullptr && m_event->itemref != nullptr && m_event->iptkey == IPT_UI_SELECT)
+ ui_menu::stack_push(global_alloc_clear<ui_menu_display_actual>(machine(), container, selected));
+}
+
+//-------------------------------------------------
+// populate
+//-------------------------------------------------
+
+void ui_menu_directory::populate()
+{
+
+ for (auto & elem : s_folders)
+ item_append(_(elem.name), nullptr, 0, (void *)(FPTR)elem.action);
+
+ item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
+ customtop = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
+}
+
+//-------------------------------------------------
+// perform our special rendering
+//-------------------------------------------------
+
+void ui_menu_directory::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2)
+{
+ float width;
+ ui_manager &mui = machine().ui();
+
+ // get the size of the text
+ mui.draw_text_full(container, _("Folders Setup"), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
+ DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
+ width += (2.0f * UI_BOX_LR_BORDER) + 0.01f;
+ float maxwidth = MAX(width, origx2 - origx1);
+
+ // compute our bounds
+ float x1 = 0.5f - 0.5f * maxwidth;
+ float x2 = x1 + maxwidth;
+ float y1 = origy1 - top;
+ float y2 = origy1 - UI_BOX_TB_BORDER;
+
+ // draw a box
+ mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR);
+
+ // take off the borders
+ x1 += UI_BOX_LR_BORDER;
+ x2 -= UI_BOX_LR_BORDER;
+ y1 += UI_BOX_TB_BORDER;
+
+ // draw the text within it
+ mui.draw_text_full(container, _("Folders Setup"), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
+ DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
+}
+
+/**************************************************
+ MENU DISPLAY PATH
+**************************************************/
+//-------------------------------------------------
+// ctor / dtor
+//-------------------------------------------------
+
+ui_menu_display_actual::ui_menu_display_actual(running_machine &machine, render_container *container, int ref)
+ : ui_menu(machine, container), m_ref(ref)
+{
+}
+
+ui_menu_display_actual::~ui_menu_display_actual()
+{
+}
+
+//-------------------------------------------------
+// handle
+//-------------------------------------------------
+
+void ui_menu_display_actual::handle()
+{
+ // process the menu
+ const ui_menu_event *m_event = process(0);
+ if (m_event != nullptr && m_event->itemref != nullptr && m_event->iptkey == IPT_UI_SELECT)
+ switch ((FPTR)m_event->itemref)
+ {
+ case REMOVE:
+ ui_menu::stack_push(global_alloc_clear<ui_menu_remove_folder>(machine(), container, m_ref));
+ break;
+
+ case ADD_CHANGE:
+ ui_menu::stack_push(global_alloc_clear<ui_menu_add_change_folder>(machine(), container, m_ref));
+ break;
+ }
+}
+
+//-------------------------------------------------
+// populate
+//-------------------------------------------------
+
+void ui_menu_display_actual::populate()
+{
+ m_tempbuf.assign(_("Current ")).append(_(s_folders[m_ref].name)).append(_(" Folders"));
+ if (machine().ui().options().exists(s_folders[m_ref].option)) {
+ m_searchpath.assign(machine().ui().options().value(s_folders[m_ref].option));
+ }
+ else {
+ m_searchpath.assign(machine().options().value(s_folders[m_ref].option));
+ }
+ path_iterator path(m_searchpath.c_str());
+ std::string curpath;
+ m_folders.clear();
+ while (path.next(curpath, nullptr))
+ m_folders.push_back(curpath);
+
+ item_append((s_folders[m_ref].action == CHANGE) ? _("Change Folder") : _("Add Folder"), nullptr, 0, (void *)ADD_CHANGE);
+
+ if (m_folders.size() > 1)
+ item_append(_("Remove Folder"), nullptr, 0, (void *)REMOVE);
+
+ item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
+ customtop = (m_folders.size() + 1) * machine().ui().get_line_height() + 6.0f * UI_BOX_TB_BORDER;
+}
+
+//-------------------------------------------------
+// perform our special rendering
+//-------------------------------------------------
+
+void ui_menu_display_actual::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2)
+{
+ float width, maxwidth = origx2 - origx1;
+ ui_manager &mui = machine().ui();
+ float lineh = mui.get_line_height();
+
+ for (auto & elem : m_folders)
+ {
+ mui.draw_text_full(container, elem.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_LEFT, WRAP_TRUNCATE, DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
+ width += (2.0f * UI_BOX_LR_BORDER) + 0.01f;
+ maxwidth = MAX(maxwidth, width);
+ }
+
+ // get the size of the text
+ mui.draw_text_full(container, m_tempbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
+ width += (2.0f * UI_BOX_LR_BORDER) + 0.01f;
+ maxwidth = MAX(width, maxwidth);
+
+ // compute our bounds
+ float x1 = 0.5f - 0.5f * maxwidth;
+ float x2 = x1 + maxwidth;
+ float y1 = origy1 - top;
+ float y2 = y1 + lineh + 2.0f * UI_BOX_TB_BORDER;
+
+ // draw a box
+ mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR);
+
+ // take off the borders
+ x1 += UI_BOX_LR_BORDER;
+ x2 -= UI_BOX_LR_BORDER;
+ y1 += UI_BOX_TB_BORDER;
+
+ // draw the text within it
+ mui.draw_text_full(container, m_tempbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
+ DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
+
+ // compute our bounds
+ x1 = 0.5f - 0.5f * maxwidth;
+ x2 = x1 + maxwidth;
+ y1 = y2 + 2.0f * UI_BOX_TB_BORDER;
+ y2 = origy1 - UI_BOX_TB_BORDER;
+
+ // draw a box
+ mui.draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR);
+
+ // take off the borders
+ x1 += UI_BOX_LR_BORDER;
+ x2 -= UI_BOX_LR_BORDER;
+ y1 += UI_BOX_TB_BORDER;
+
+ // draw the text within it
+ for (auto & elem : m_folders)
+ {
+ mui.draw_text_full(container, elem.c_str(), x1, y1, x2 - x1, JUSTIFY_LEFT, WRAP_TRUNCATE,
+ DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
+ y1 += lineh;
+ }
+
+}
+
/**************************************************
- MENU ADD FOLDER
+MENU ADD FOLDER
**************************************************/
//-------------------------------------------------
// ctor / dtor
//-------------------------------------------------
-ui_menu_add_change_folder::ui_menu_add_change_folder(running_machine &machine, render_container *container, int ref, bool _change) : ui_menu(machine, container)
+ui_menu_add_change_folder::ui_menu_add_change_folder(running_machine &machine, render_container *container, int ref) : ui_menu(machine, container)
{
- m_ref = ref - 1;
- m_change = _change;
+ m_ref = ref;
+ m_change = (s_folders[ref].action == CHANGE);
m_search[0] = '\0';
// configure the starting path
@@ -71,6 +283,22 @@ ui_menu_add_change_folder::ui_menu_add_change_folder(running_machine &machine, r
osd_get_full_path(&dst, ".");
m_current_path = dst;
osd_free(dst);
+
+ std::string searchpath;
+ if (machine.ui().options().exists(s_folders[m_ref].option))
+ {
+ searchpath = machine.ui().options().value(s_folders[m_ref].option);
+ }
+ else
+ {
+ searchpath = machine.options().value(s_folders[m_ref].option);
+ }
+
+ path_iterator path(searchpath.c_str());
+ std::string curpath;
+ while (path.next(curpath, nullptr))
+ m_folders.push_back(curpath);
+
}
ui_menu_add_change_folder::~ui_menu_add_change_folder()
@@ -144,38 +372,41 @@ void ui_menu_add_change_folder::handle()
std::string error_string;
if (m_change)
{
- if (machine().ui().options().exists(s_folders_entry[m_ref].option))
+ if (machine().ui().options().exists(s_folders[m_ref].option))
{
- machine().ui().options().set_value(s_folders_entry[m_ref].option, m_current_path.c_str(), OPTION_PRIORITY_CMDLINE, error_string);
+ machine().ui().options().set_value(s_folders[m_ref].option, m_current_path.c_str(), OPTION_PRIORITY_CMDLINE, error_string);
}
- else {
- if (strcmp(machine().options().value(s_folders_entry[m_ref].option), m_current_path.c_str()) != 0)
+ else
+ {
+ if (strcmp(machine().options().value(s_folders[m_ref].option), m_current_path.c_str()) != 0)
{
- machine().options().set_value(s_folders_entry[m_ref].option, m_current_path.c_str(), OPTION_PRIORITY_CMDLINE, error_string);
- machine().options().mark_changed(s_folders_entry[m_ref].option);
+ machine().options().set_value(s_folders[m_ref].option, m_current_path.c_str(), OPTION_PRIORITY_CMDLINE, error_string);
+ machine().options().mark_changed(s_folders[m_ref].option);
}
}
machine().datfile().reset_run();
}
else
{
+ m_folders.push_back(m_current_path);
std::string tmppath;
- if (machine().ui().options().exists(s_folders_entry[m_ref].option)) {
- tmppath.assign(machine().ui().options().value(s_folders_entry[m_ref].option)).append(";").append(m_current_path.c_str());
- }
- else {
- tmppath.assign(machine().options().value(s_folders_entry[m_ref].option)).append(";").append(m_current_path.c_str());
+ for (int x = 0; x < m_folders.size(); ++x)
+ {
+ tmppath.append(m_folders[x]);
+ if (x != m_folders.size() - 1)
+ tmppath.append(";");
}
-
- if (machine().ui().options().exists(s_folders_entry[m_ref].option))
+
+ if (machine().ui().options().exists(s_folders[m_ref].option))
{
- machine().ui().options().set_value(s_folders_entry[m_ref].option, tmppath.c_str(), OPTION_PRIORITY_CMDLINE, error_string);
+ machine().ui().options().set_value(s_folders[m_ref].option, tmppath.c_str(), OPTION_PRIORITY_CMDLINE, error_string);
}
- else {
- if (strcmp(machine().options().value(s_folders_entry[m_ref].option), tmppath.c_str()) != 0)
+ else
+ {
+ if (strcmp(machine().options().value(s_folders[m_ref].option), tmppath.c_str()) != 0)
{
- machine().options().set_value(s_folders_entry[m_ref].option, tmppath.c_str(), OPTION_PRIORITY_CMDLINE, error_string);
- machine().options().mark_changed(s_folders_entry[m_ref].option);
+ machine().options().set_value(s_folders[m_ref].option, tmppath.c_str(), OPTION_PRIORITY_CMDLINE, error_string);
+ machine().options().mark_changed(s_folders[m_ref].option);
}
}
}
@@ -278,15 +509,15 @@ void ui_menu_add_change_folder::custom_render(void *selectedref, float top, floa
float width, maxwidth = origx2 - origx1;
ui_manager &mui = machine().ui();
std::string tempbuf[2];
- tempbuf[0] = (m_change) ? "Change" : "Add";
- tempbuf[0].append(" ").append(s_folders_entry[m_ref].name).append(" Folder - Search: ").append(m_search).append("_");
+ tempbuf[0] = (m_change) ? _("Change)") : _("Add");
+ tempbuf[0].append(" ").append(_(s_folders[m_ref].name)).append(_(" Folder - Search: ")).append(m_search).append("_");
tempbuf[1] = m_current_path;
// get the size of the text
- for (auto & elem: tempbuf)
+ for (auto & elem : tempbuf)
{
mui.draw_text_full(container, elem.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER,
- DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
+ DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
width += (2.0f * UI_BOX_LR_BORDER) + 0.01f;
maxwidth = MAX(width, maxwidth);
}
@@ -314,7 +545,7 @@ void ui_menu_add_change_folder::custom_render(void *selectedref, float top, floa
}
// bottom text
- tempbuf[0] = "Press TAB to set";
+ tempbuf[0] = _("Press TAB to set");
mui.draw_text_full(container, tempbuf[0].c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
@@ -342,261 +573,24 @@ void ui_menu_add_change_folder::custom_render(void *selectedref, float top, floa
}
/**************************************************
- MENU DIRECTORY
-**************************************************/
-//-------------------------------------------------
-// ctor / dtor
-//-------------------------------------------------
-
-ui_menu_directory::ui_menu_directory(running_machine &machine, render_container *container) : ui_menu(machine, container)
-{
-}
-
-ui_menu_directory::~ui_menu_directory()
-{
- save_ui_options(machine());
- ui_globals::reset = true;
-}
-
-//-------------------------------------------------
-// handle
-//-------------------------------------------------
-
-void ui_menu_directory::handle()
-{
- // process the menu
- const ui_menu_event *m_event = process(0);
-
- if (m_event != nullptr && m_event->itemref != nullptr && m_event->iptkey == IPT_UI_SELECT)
- {
- int ref = (FPTR)m_event->itemref;
- bool change = (ref == HISTORY_FOLDERS || ref == EXTRAINI_FOLDERS || ref == UI_FOLDERS);
- ui_menu::stack_push(global_alloc_clear<ui_menu_display_actual>(machine(), container, ref, change));
- }
-}
-
-//-------------------------------------------------
-// populate
-//-------------------------------------------------
-
-void ui_menu_directory::populate()
-{
- item_append("Roms", nullptr, 0, (void *)(FPTR)ROM_FOLDERS);
- item_append("UI", nullptr, 0, (void *)(FPTR)UI_FOLDERS);
- item_append("Samples", nullptr, 0, (void *)(FPTR)SAMPLE_FOLDERS);
- item_append("INIs", nullptr, 0, (void *)(FPTR)INI_FOLDERS);
- item_append("Artwork", nullptr, 0, (void *)(FPTR)ARTWORK_FOLDERS);
- item_append("DATs (History, Mameinfo, etc...)", nullptr, 0, (void *)(FPTR)HISTORY_FOLDERS);
- item_append("Extra INI (Category, etc...)", nullptr, 0, (void *)(FPTR)EXTRAINI_FOLDERS);
- item_append("Icons", nullptr, 0, (void *)(FPTR)ICON_FOLDERS);
- item_append("Cheats", nullptr, 0, (void *)(FPTR)CHEAT_FOLDERS);
- item_append("Snapshots", nullptr, 0, (void *)(FPTR)SNAPSHOT_FOLDERS);
- item_append("Cabinets", nullptr, 0, (void *)(FPTR)CABINET_FOLDERS);
- item_append("Flyers", nullptr, 0, (void *)(FPTR)FLYER_FOLDERS);
- item_append("Titles", nullptr, 0, (void *)(FPTR)TITLE_FOLDERS);
- item_append("Ends", nullptr, 0, (void *)(FPTR)ENDS_FOLDERS);
- item_append("PCBs", nullptr, 0, (void *)(FPTR)PCB_FOLDERS);
- item_append("Marquees", nullptr, 0, (void *)(FPTR)MARQUEES_FOLDERS);
- item_append("Control Panels", nullptr, 0, (void *)(FPTR)CPANEL_FOLDERS);
- item_append("Bosses", nullptr, 0, (void *)(FPTR)BOSSES_FOLDERS);
- item_append("Versus", nullptr, 0, (void *)(FPTR)VERSUS_FOLDERS);
- item_append("Game Over", nullptr, 0, (void *)(FPTR)GAMEOVER_FOLDERS);
- item_append("How To", nullptr, 0, (void *)(FPTR)HOWTO_FOLDERS);
- item_append("Select", nullptr, 0, (void *)(FPTR)SELECT_FOLDERS);
- item_append("Artwork Preview", nullptr, 0, (void *)(FPTR)ARTPREV_FOLDERS);
- item_append("Scores", nullptr, 0, (void *)(FPTR)SCORES_FOLDERS);
- item_append("Logos", nullptr, 0, (void *)(FPTR)LOGO_FOLDERS);
- item_append("Crosshairs", nullptr, 0, (void *)(FPTR)CROSSHAIR_FOLDERS);
-
- item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
- customtop = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
-}
-
-//-------------------------------------------------
-// perform our special rendering
-//-------------------------------------------------
-
-void ui_menu_directory::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2)
-{
- float width;
- ui_manager &mui = machine().ui();
-
- // get the size of the text
- mui.draw_text_full(container, "Folder Setup", 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
- width += (2.0f * UI_BOX_LR_BORDER) + 0.01f;
- float maxwidth = MAX(width, origx2 - origx1);
-
- // compute our bounds
- float x1 = 0.5f - 0.5f * maxwidth;
- float x2 = x1 + maxwidth;
- float y1 = origy1 - top;
- float y2 = origy1 - UI_BOX_TB_BORDER;
-
- // draw a box
- mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR);
-
- // take off the borders
- x1 += UI_BOX_LR_BORDER;
- x2 -= UI_BOX_LR_BORDER;
- y1 += UI_BOX_TB_BORDER;
-
- // draw the text within it
- mui.draw_text_full(container, "Folder Setup", x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
-}
-
-/**************************************************
- MENU DISPLAY PATH
+ MENU REMOVE FOLDER
**************************************************/
//-------------------------------------------------
// ctor / dtor
//-------------------------------------------------
-ui_menu_display_actual::ui_menu_display_actual(running_machine &machine, render_container *container, int ref, bool _change) : ui_menu(machine, container)
+ui_menu_remove_folder::ui_menu_remove_folder(running_machine &machine, render_container *container, int ref) : ui_menu(machine, container)
{
m_ref = ref;
- m_change = _change;
-}
-
-ui_menu_display_actual::~ui_menu_display_actual()
-{
-}
-
-//-------------------------------------------------
-// handle
-//-------------------------------------------------
-
-void ui_menu_display_actual::handle()
-{
- // process the menu
- const ui_menu_event *m_event = process(0);
- if (m_event != nullptr && m_event->itemref != nullptr && m_event->iptkey == IPT_UI_SELECT)
- switch ((FPTR)m_event->itemref)
- {
- case REMOVE_FOLDER:
- ui_menu::stack_push(global_alloc_clear<ui_menu_remove_folder>(machine(), container, m_ref));
- break;
-
- case ADD_FOLDER:
- case CHANGE_FOLDER:
- ui_menu::stack_push(global_alloc_clear<ui_menu_add_change_folder>(machine(), container, m_ref, m_change));
- break;
- }
-}
-
-//-------------------------------------------------
-// populate
-//-------------------------------------------------
+ if (machine.ui().options().exists(s_folders[m_ref].option))
+ m_searchpath.assign(machine.ui().options().value(s_folders[m_ref].option));
+ else
+ m_searchpath.assign(machine.options().value(s_folders[m_ref].option));
-void ui_menu_display_actual::populate()
-{
- m_tempbuf.assign("Current ").append(s_folders_entry[m_ref - 1].name).append(" Folders");
- if (machine().ui().options().exists(s_folders_entry[m_ref - 1].option)) {
- m_searchpath.assign(machine().ui().options().value(s_folders_entry[m_ref - 1].option));
- }
- else {
- m_searchpath.assign(machine().options().value(s_folders_entry[m_ref - 1].option));
- }
path_iterator path(m_searchpath.c_str());
std::string curpath;
- m_folders.clear();
while (path.next(curpath, nullptr))
m_folders.push_back(curpath);
-
- if (m_change)
- item_append("Change Folder", nullptr, 0, (void *)CHANGE_FOLDER);
- else
- item_append("Add Folder", nullptr, 0, (void *)ADD_FOLDER);
-
- if (m_folders.size() > 1)
- item_append("Remove Folder", nullptr, 0, (void *)REMOVE_FOLDER);
-
- item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
- customtop = (m_folders.size() + 1) * machine().ui().get_line_height() + 6.0f * UI_BOX_TB_BORDER;
-}
-
-//-------------------------------------------------
-// perform our special rendering
-//-------------------------------------------------
-
-void ui_menu_display_actual::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2)
-{
- float width, maxwidth = origx2 - origx1;
- ui_manager &mui = machine().ui();
- float lineh = mui.get_line_height();
-
- for (auto & elem : m_folders)
- {
- mui.draw_text_full(container, elem.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_LEFT, WRAP_TRUNCATE, DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
- width += (2.0f * UI_BOX_LR_BORDER) + 0.01f;
- maxwidth = MAX(maxwidth, width);
- }
-
- // get the size of the text
- mui.draw_text_full(container, m_tempbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
- width += (2.0f * UI_BOX_LR_BORDER) + 0.01f;
- maxwidth = MAX(width, maxwidth);
-
- // compute our bounds
- float x1 = 0.5f - 0.5f * maxwidth;
- float x2 = x1 + maxwidth;
- float y1 = origy1 - top;
- float y2 = y1 + lineh + 2.0f * UI_BOX_TB_BORDER;
-
- // draw a box
- mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR);
-
- // take off the borders
- x1 += UI_BOX_LR_BORDER;
- x2 -= UI_BOX_LR_BORDER;
- y1 += UI_BOX_TB_BORDER;
-
- // draw the text within it
- mui.draw_text_full(container, m_tempbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
-
- // compute our bounds
- x1 = 0.5f - 0.5f * maxwidth;
- x2 = x1 + maxwidth;
- y1 = y2 + 2.0f * UI_BOX_TB_BORDER;
- y2 = origy1 - UI_BOX_TB_BORDER;
-
- // draw a box
- mui.draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR);
-
- // take off the borders
- x1 += UI_BOX_LR_BORDER;
- x2 -= UI_BOX_LR_BORDER;
- y1 += UI_BOX_TB_BORDER;
-
- // draw the text within it
- for (auto & elem : m_folders)
- {
- mui.draw_text_full(container, elem.c_str(), x1, y1, x2 - x1, JUSTIFY_LEFT, WRAP_TRUNCATE,
- DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
- y1 += lineh;
- }
-
-}
-
-/**************************************************
- MENU REMOVE FOLDER
-**************************************************/
-//-------------------------------------------------
-// ctor / dtor
-//-------------------------------------------------
-
-ui_menu_remove_folder::ui_menu_remove_folder(running_machine &machine, render_container *container, int ref) : ui_menu(machine, container)
-{
- m_ref = ref - 1;
- if (machine.ui().options().exists(s_folders_entry[m_ref].option)) {
- m_searchpath.assign(machine.ui().options().value(s_folders_entry[m_ref].option));
- }
- else {
- m_searchpath.assign(machine.options().value(s_folders_entry[m_ref].option));
- }
-
}
ui_menu_remove_folder::~ui_menu_remove_folder()
@@ -613,23 +607,25 @@ void ui_menu_remove_folder::handle()
const ui_menu_event *m_event = process(0);
if (m_event != nullptr && m_event->itemref != nullptr && m_event->iptkey == IPT_UI_SELECT)
{
- int index = (FPTR)m_event->itemref - 1;
- std::string tmppath;
- for (size_t i = 0; i < item.size() - 2; i++)
- if (i != index)
- tmppath.append(item[i].text).append(";");
-
- tmppath.substr(0, tmppath.size() - 1);
- std::string error_string;
- if (machine().ui().options().exists(s_folders_entry[m_ref].option))
+ std::string tmppath, error_string;
+ for (int x = 0; x < m_folders.size(); ++x)
+ {
+ if (x != selected)
+ tmppath.append(m_folders[x]);
+ if (x < m_folders.size() - 1)
+ tmppath.append(";");
+ }
+
+ if (machine().ui().options().exists(s_folders[m_ref].option))
{
- machine().ui().options().set_value(s_folders_entry[m_ref].option, tmppath.c_str(), OPTION_PRIORITY_CMDLINE, error_string);
+ machine().ui().options().set_value(s_folders[m_ref].option, tmppath.c_str(), OPTION_PRIORITY_CMDLINE, error_string);
}
- else {
- if (strcmp(machine().options().value(s_folders_entry[m_ref].option),tmppath.c_str())!=0)
+ else
+ {
+ if (strcmp(machine().options().value(s_folders[m_ref].option),tmppath.c_str())!=0)
{
- machine().options().set_value(s_folders_entry[m_ref].option, tmppath.c_str(), OPTION_PRIORITY_CMDLINE, error_string);
- machine().options().mark_changed(s_folders_entry[m_ref].option);
+ machine().options().set_value(s_folders[m_ref].option, tmppath.c_str(), OPTION_PRIORITY_CMDLINE, error_string);
+ machine().options().mark_changed(s_folders[m_ref].option);
}
}
@@ -644,12 +640,9 @@ void ui_menu_remove_folder::handle()
void ui_menu_remove_folder::populate()
{
- path_iterator path(m_searchpath.c_str());
- std::string curpath;
int folders_count = 0;
-
- while (path.next(curpath, nullptr))
- item_append(curpath.c_str(), nullptr, 0, (void *)(FPTR)++folders_count);
+ for (auto & elem : m_folders)
+ item_append(elem.c_str(), nullptr, 0, (void *)(FPTR)++folders_count);
item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
@@ -664,7 +657,7 @@ void ui_menu_remove_folder::custom_render(void *selectedref, float top, float bo
{
float width;
ui_manager &mui = machine().ui();
- std::string tempbuf = std::string("Remove ").append(s_folders_entry[m_ref].name).append(" Folder");
+ std::string tempbuf = std::string(_("Remove ")).append(_(s_folders[m_ref].name)).append(_(" Folder"));
// get the size of the text
mui.draw_text_full(container, tempbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER, DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
diff --git a/src/emu/ui/dirmenu.h b/src/emu/ui/dirmenu.h
index 47734fc6542..5c48d9ad696 100644
--- a/src/emu/ui/dirmenu.h
+++ b/src/emu/ui/dirmenu.h
@@ -25,37 +25,6 @@ public:
virtual void populate() override;
virtual void handle() override;
virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override;
-
-private:
- enum
- {
- ROM_FOLDERS = 1,
- UI_FOLDERS,
- SAMPLE_FOLDERS,
- HISTORY_FOLDERS,
- INI_FOLDERS,
- EXTRAINI_FOLDERS,
- ICON_FOLDERS,
- CHEAT_FOLDERS,
- SNAPSHOT_FOLDERS,
- CABINET_FOLDERS,
- FLYER_FOLDERS,
- TITLE_FOLDERS,
- ENDS_FOLDERS,
- PCB_FOLDERS,
- MARQUEES_FOLDERS,
- CPANEL_FOLDERS,
- CROSSHAIR_FOLDERS,
- ARTWORK_FOLDERS,
- BOSSES_FOLDERS,
- ARTPREV_FOLDERS,
- SELECT_FOLDERS,
- GAMEOVER_FOLDERS,
- HOWTO_FOLDERS,
- LOGO_FOLDERS,
- SCORES_FOLDERS,
- VERSUS_FOLDERS
- };
};
//-------------------------------------------------
@@ -65,7 +34,7 @@ private:
class ui_menu_display_actual : public ui_menu
{
public:
- ui_menu_display_actual(running_machine &machine, render_container *container, int selectedref, bool _change);
+ ui_menu_display_actual(running_machine &machine, render_container *container, int selectedref);
virtual ~ui_menu_display_actual();
virtual void populate() override;
virtual void handle() override;
@@ -75,13 +44,11 @@ private:
std::string m_tempbuf, m_searchpath;
std::vector<std::string> m_folders;
int m_ref;
- bool m_change;
enum
{
- ADD_FOLDER = 1,
- REMOVE_FOLDER,
- CHANGE_FOLDER
+ ADD_CHANGE = 1,
+ REMOVE,
};
};
@@ -101,6 +68,7 @@ public:
private:
std::string m_searchpath;
int m_ref;
+ std::vector<std::string> m_folders;
};
//-------------------------------------------------
@@ -110,7 +78,7 @@ private:
class ui_menu_add_change_folder : public ui_menu
{
public:
- ui_menu_add_change_folder(running_machine &machine, render_container *container, int ref, bool change);
+ ui_menu_add_change_folder(running_machine &machine, render_container *container, int ref);
virtual ~ui_menu_add_change_folder();
virtual void populate() override;
virtual void handle() override;
@@ -123,6 +91,7 @@ private:
std::string m_current_path;
char m_search[40];
bool m_change;
+ std::vector<std::string> m_folders;
};
#endif /* __UI_DIRMENU_H__ */
diff --git a/src/emu/ui/dsplmenu.cpp b/src/emu/ui/dsplmenu.cpp
index 01ee9c19578..93cf3771133 100644
--- a/src/emu/ui/dsplmenu.cpp
+++ b/src/emu/ui/dsplmenu.cpp
@@ -202,7 +202,7 @@ void ui_menu_display_options::custom_render(void *selectedref, float top, float
{
float width;
ui_manager &mui = machine().ui();
- mui.draw_text_full(container, "Display Options", 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NONE,
+ mui.draw_text_full(container, _("Display Options"), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NONE,
ARGB_WHITE, ARGB_BLACK, &width, nullptr);
width += 2 * UI_BOX_LR_BORDER;
float maxwidth = MAX(origx2 - origx1, width);
@@ -222,6 +222,6 @@ void ui_menu_display_options::custom_render(void *selectedref, float top, float
y1 += UI_BOX_TB_BORDER;
// draw the text within it
- mui.draw_text_full(container, "Display Options", x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NORMAL,
+ mui.draw_text_full(container, _("Display Options"), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NORMAL,
UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
}
diff --git a/src/emu/ui/miscmenu.cpp b/src/emu/ui/miscmenu.cpp
index 0b41eed95bb..5d232729bd2 100644
--- a/src/emu/ui/miscmenu.cpp
+++ b/src/emu/ui/miscmenu.cpp
@@ -32,7 +32,7 @@ ui_menu_keyboard_mode::ui_menu_keyboard_mode(running_machine &machine, render_co
void ui_menu_keyboard_mode::populate()
{
bool natural = machine().ui().use_natural_keyboard();
- item_append("Keyboard Mode:", natural ? "Natural" : "Emulated", natural ? MENU_FLAG_LEFT_ARROW : MENU_FLAG_RIGHT_ARROW, nullptr);
+ item_append(_("Keyboard Mode:"), natural ? _("Natural") : _("Emulated"), natural ? MENU_FLAG_LEFT_ARROW : MENU_FLAG_RIGHT_ARROW, nullptr);
}
ui_menu_keyboard_mode::~ui_menu_keyboard_mode()
@@ -86,7 +86,7 @@ void ui_menu_bios_selection::populate()
}
item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
- item_append("Reset", nullptr, 0, (void *)1);
+ item_append(_("Reset"), nullptr, 0, (void *)1);
}
ui_menu_bios_selection::~ui_menu_bios_selection()
@@ -260,7 +260,7 @@ void ui_menu_bookkeeping::populate()
/* display whether or not we are locked out */
if (machine().bookkeeping().coin_lockout_get_state(ctrnum))
- tempstring.append(" (locked)");
+ tempstring.append(_(" (locked)"));
tempstring.append("\n");
}
@@ -520,7 +520,7 @@ void ui_menu_crosshair::populate()
/* add CROSSHAIR_ITEM_AUTO_TIME menu */
sprintf(temp_text, "%d", settings.auto_time);
- item_append("Visible Delay", temp_text, flags, data);
+ item_append(_("Visible Delay"), temp_text, flags, data);
}
// else
// /* leave a blank filler line when not in auto time so size does not rescale */
@@ -559,17 +559,17 @@ void ui_menu_quit_game::handle()
ui_menu_misc_options::misc_option ui_menu_misc_options::m_options[] = {
{ 0, nullptr, nullptr },
- { 0, "Re-select last machine played", OPTION_REMEMBER_LAST },
- { 0, "Enlarge images in the right panel", OPTION_ENLARGE_SNAPS },
- { 0, "DATs info", OPTION_DATS_ENABLED },
- { 0, "Cheats", OPTION_CHEAT },
- { 0, "Show mouse pointer", OPTION_UI_MOUSE },
- { 0, "Confirm quit from machines", OPTION_UI_CONFIRM_QUIT },
- { 0, "Skip displaying information's screen at startup", OPTION_UI_SKIP_GAMEINFO },
- { 0, "Force 4:3 appearance for software snapshot", OPTION_FORCED4X3 },
- { 0, "Use image as background", OPTION_USE_BACKGROUND },
- { 0, "Skip bios selection menu", OPTION_SKIP_BIOS_MENU },
- { 0, "Skip software parts selection menu", OPTION_SKIP_PARTS_MENU }
+ { 0, __("Re-select last machine played"), OPTION_REMEMBER_LAST },
+ { 0, __("Enlarge images in the right panel"), OPTION_ENLARGE_SNAPS },
+ { 0, __("DATs info"), OPTION_DATS_ENABLED },
+ { 0, __("Cheats"), OPTION_CHEAT },
+ { 0, __("Show mouse pointer"), OPTION_UI_MOUSE },
+ { 0, __("Confirm quit from machines"), OPTION_CONFIRM_QUIT },
+ { 0, __("Skip displaying information's screen at startup"), OPTION_SKIP_GAMEINFO },
+ { 0, __("Force 4:3 appearance for software snapshot"), OPTION_FORCED4X3 },
+ { 0, __("Use image as background"), OPTION_USE_BACKGROUND },
+ { 0, __("Skip bios selection menu"), OPTION_SKIP_BIOS_MENU },
+ { 0, __("Skip software parts selection menu"), OPTION_SKIP_PARTS_MENU }
};
//-------------------------------------------------
@@ -635,7 +635,7 @@ void ui_menu_misc_options::populate()
{
// add options items
for (int opt = 1; opt < ARRAY_LENGTH(m_options); ++opt)
- item_append(m_options[opt].description, m_options[opt].status ? "On" : "Off", m_options[opt].status ? MENU_FLAG_RIGHT_ARROW : MENU_FLAG_LEFT_ARROW, (void *)(FPTR)opt);
+ item_append(_(m_options[opt].description), m_options[opt].status ? "On" : "Off", m_options[opt].status ? MENU_FLAG_RIGHT_ARROW : MENU_FLAG_LEFT_ARROW, (void *)(FPTR)opt);
item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
customtop = machine().ui().get_line_height() + (3.0f * UI_BOX_TB_BORDER);
@@ -650,7 +650,7 @@ void ui_menu_misc_options::custom_render(void *selectedref, float top, float bot
float width;
ui_manager &mui = machine().ui();
- mui.draw_text_full(container, "Miscellaneous Options", 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
+ mui.draw_text_full(container, _("Miscellaneous Options"), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
width += 2 * UI_BOX_LR_BORDER;
float maxwidth = MAX(origx2 - origx1, width);
@@ -670,6 +670,6 @@ void ui_menu_misc_options::custom_render(void *selectedref, float top, float bot
y1 += UI_BOX_TB_BORDER;
// draw the text within it
- mui.draw_text_full(container, "Miscellaneous Options", x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
+ mui.draw_text_full(container, _("Miscellaneous Options"), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
}
diff --git a/src/emu/ui/moptions.cpp b/src/emu/ui/moptions.cpp
index dd4897749fc..63c51d26438 100644
--- a/src/emu/ui/moptions.cpp
+++ b/src/emu/ui/moptions.cpp
@@ -52,10 +52,6 @@ const options_entry ui_options::s_option_entries[] =
{ OPTION_LAST_USED_FILTER, "", OPTION_STRING, "latest used filter" },
{ OPTION_LAST_USED_MACHINE, "", OPTION_STRING, "latest used machine" },
{ OPTION_INFO_AUTO_AUDIT, "0", OPTION_BOOLEAN, "enable auto audit in the general info panel" },
- { OPTION_UI_SKIP_GAMEINFO, "0", OPTION_BOOLEAN, "skip displaying the information screen at startup" },
- { OPTION_UI_FONT, "default", OPTION_STRING, "specify a font to use" },
- { OPTION_UI_CONFIRM_QUIT, "0", OPTION_BOOLEAN, "display confirm quit screen on exit" },
- { OPTION_UI_MOUSE, "1", OPTION_BOOLEAN, "display ui mouse cursor" },
// UI options
{ nullptr, nullptr, OPTION_HEADER, "UI OPTIONS" },
diff --git a/src/emu/ui/moptions.h b/src/emu/ui/moptions.h
index 3b1ab8948c0..9706dcda7f5 100644
--- a/src/emu/ui/moptions.h
+++ b/src/emu/ui/moptions.h
@@ -70,12 +70,6 @@
#define OPTION_UI_DIPSW_COLOR "ui_dipsw_color"
#define OPTION_UI_SLIDER_COLOR "ui_slider_color"
-#define OPTION_UI_FONT "uifont"
-#define OPTION_UI_CONFIRM_QUIT "confirm_quit"
-#define OPTION_UI_MOUSE "ui_mouse"
-#define OPTION_UI_SKIP_GAMEINFO "skip_gameinfo"
-
-
class ui_options : public core_options
{
public:
@@ -136,11 +130,6 @@ public:
const char *ui_mousedown_bg_color() const { return value(OPTION_UI_MOUSEDOWN_BG_COLOR); }
const char *ui_dipsw_color() const { return value(OPTION_UI_DIPSW_COLOR); }
const char *ui_slider_color() const { return value(OPTION_UI_SLIDER_COLOR); }
-
- bool skip_gameinfo() const { return bool_value(OPTION_UI_SKIP_GAMEINFO); }
- const char *ui_font() const { return value(OPTION_UI_FONT); }
- bool confirm_quit() const { return bool_value(OPTION_UI_CONFIRM_QUIT); }
- bool ui_mouse() const { return bool_value(OPTION_UI_MOUSE); }
private:
static const options_entry s_option_entries[];
};
diff --git a/src/emu/ui/optsmenu.cpp b/src/emu/ui/optsmenu.cpp
index 44ed9e11a37..54e269bf4ed 100644
--- a/src/emu/ui/optsmenu.cpp
+++ b/src/emu/ui/optsmenu.cpp
@@ -198,7 +198,7 @@ void ui_menu_game_options::populate()
// add filter item
UINT32 arrow_flags = get_arrow_flags((int)FILTER_FIRST, (int)FILTER_LAST, main_filters::actual);
- item_append("Filter", main_filters::text[main_filters::actual], arrow_flags, (void *)(FPTR)FILTER_MENU);
+ item_append(_("Filter"), main_filters::text[main_filters::actual], arrow_flags, (void *)(FPTR)FILTER_MENU);
// add category subitem
if (main_filters::actual == FILTER_CATEGORY && !machine().inifile().ini_index.empty())
@@ -243,13 +243,13 @@ void ui_menu_game_options::populate()
item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
// add options items
- item_append("Customize UI", nullptr, 0, (void *)(FPTR)CUSTOM_MENU);
+ item_append(_("Customize UI"), nullptr, 0, (void *)(FPTR)CUSTOM_MENU);
}
- item_append("Display Options", nullptr, 0, (void *)(FPTR)DISPLAY_MENU);
- item_append("Sound Options", nullptr, 0, (void *)(FPTR)SOUND_MENU);
- item_append("Miscellaneous Options", nullptr, 0, (void *)(FPTR)MISC_MENU);
- item_append("Device Mapping", nullptr, 0, (void *)(FPTR)CONTROLLER_MENU);
- item_append("General Inputs", nullptr, 0, (void *)(FPTR)CGI_MENU);
+ item_append(_("Display Options"), nullptr, 0, (void *)(FPTR)DISPLAY_MENU);
+ item_append(_("Sound Options"), nullptr, 0, (void *)(FPTR)SOUND_MENU);
+ item_append(_("Miscellaneous Options"), nullptr, 0, (void *)(FPTR)MISC_MENU);
+ item_append(_("Device Mapping"), nullptr, 0, (void *)(FPTR)CONTROLLER_MENU);
+ item_append(_("General Inputs"), nullptr, 0, (void *)(FPTR)CGI_MENU);
item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
custombottom = 2.0f * machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
@@ -264,7 +264,7 @@ void ui_menu_game_options::custom_render(void *selectedref, float top, float bot
{
float width;
ui_manager &mui = machine().ui();
- mui.draw_text_full(container, "Settings", 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
+ mui.draw_text_full(container, _("Settings"), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
width += 2 * UI_BOX_LR_BORDER;
float maxwidth = MAX(origx2 - origx1, width);
@@ -284,7 +284,7 @@ void ui_menu_game_options::custom_render(void *selectedref, float top, float bot
y1 += UI_BOX_TB_BORDER;
// draw the text within it
- mui.draw_text_full(container, "Settings", x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
+ mui.draw_text_full(container, _("Settings"), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
}
@@ -304,5 +304,5 @@ void save_ui_options(running_machine &machine)
file.close();
}
else
- machine.popmessage("**Error to save ui.ini**", emulator_info::get_configname());
+ machine.popmessage(_("**Error to save ui.ini**"));
}
diff --git a/src/emu/ui/selector.cpp b/src/emu/ui/selector.cpp
index c9cc3c7b6c0..f4c94e6bc2d 100644
--- a/src/emu/ui/selector.cpp
+++ b/src/emu/ui/selector.cpp
@@ -149,7 +149,7 @@ void ui_menu_selector::custom_render(void *selectedref, float top, float bottom,
{
float width;
ui_manager &mui = machine().ui();
- std::string tempbuf = std::string("Selection List - Search: ").append(m_search).append("_");
+ std::string tempbuf = std::string(_("Selection List - Search: ")).append(m_search).append("_");
// get the size of the text
mui.draw_text_full(container, tempbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
@@ -178,7 +178,7 @@ void ui_menu_selector::custom_render(void *selectedref, float top, float bottom,
// bottom text
// get the text for 'UI Select'
std::string ui_select_text = machine().input().seq_name(machine().ioport().type_seq(IPT_UI_SELECT, 0, SEQ_TYPE_STANDARD));
- tempbuf.assign("Double click or press ").append(ui_select_text).append(" to select");
+ tempbuf.assign(_("Double click or press ")).append(ui_select_text).append(_(" to select"));
mui.draw_text_full(container, tempbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER,
DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
diff --git a/src/emu/ui/selgame.cpp b/src/emu/ui/selgame.cpp
index 9614061c6cf..e950c96b1b9 100644
--- a/src/emu/ui/selgame.cpp
+++ b/src/emu/ui/selgame.cpp
@@ -620,9 +620,9 @@ void ui_menu_select_game::populate()
// add special items
if (ui_menu::stack_has_special_main_menu())
{
- item_append("Configure Options", nullptr, MENU_FLAG_UI, (void *)(FPTR)1);
- item_append("Configure Directories", nullptr, MENU_FLAG_UI, (void *)(FPTR)2);
- item_append("Save Configuration", nullptr, MENU_FLAG_UI, (void *)(FPTR)3);
+ item_append(_("Configure Options"), nullptr, MENU_FLAG_UI, (void *)(FPTR)1);
+ item_append(_("Configure Directories"), nullptr, MENU_FLAG_UI, (void *)(FPTR)2);
+ item_append(_("Save Configuration"), nullptr, MENU_FLAG_UI, (void *)(FPTR)3);
skip_main_items = 3;
}
else
@@ -743,7 +743,7 @@ void ui_menu_select_game::custom_render(void *selectedref, float top, float bott
if (isfavorite())
tempbuf[1].clear();
else
- tempbuf[1].assign(filtered).append(" Search: ").append(m_search).append("_");
+ tempbuf[1].assign(filtered).append(_(" Search: ")).append(m_search).append("_");
// get the size of the text
for (int line = 0; line < 2; ++line)
@@ -1758,12 +1758,12 @@ float ui_menu_select_game::draw_left_panel(float x1, float y1, float x2, float y
hover = phover + filter;
}
- if (afilter == filter)
+/* if (afilter == filter)
{
bgcolor = UI_SELECTED_BG_COLOR;
fgcolor = UI_SELECTED_COLOR;
}
-
+*/
if (bgcolor != UI_TEXT_BG_COLOR)
container->add_rect(x1, y1, x2, y1 + line_height_max, bgcolor, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXWRAP(TRUE));
@@ -1790,6 +1790,12 @@ float ui_menu_select_game::draw_left_panel(float x1, float y1, float x2, float y
}
convert_command_glyph(str);
}
+ else if (filter == main_filters::actual)
+ {
+ str.assign("@custom1 ").append(text[filter]);
+ x1t -= text_sign;
+ convert_command_glyph(str);
+ }
mui.draw_text_full(container, str.c_str(), x1t, y1, x2 - x1, JUSTIFY_LEFT, WRAP_NEVER,
DRAW_NORMAL, fgcolor, bgcolor, nullptr, nullptr, text_size);
@@ -1942,7 +1948,7 @@ void ui_menu_select_game::infos_render(void *selectedref, float origx1, float or
if (buffer.empty())
{
- mui.draw_text_full(container, "No Infos Available", origx1, (origy2 + origy1) * 0.5f, origx2 - origx1, JUSTIFY_CENTER,
+ mui.draw_text_full(container, _("No Infos Available"), origx1, (origy2 + origy1) * 0.5f, origx2 - origx1, JUSTIFY_CENTER,
WRAP_WORD, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
return;
}
@@ -2045,7 +2051,7 @@ void ui_menu_select_game::infos_render(void *selectedref, float origx1, float or
// apply title to right panel
if (soft->usage.empty())
{
- mui.draw_text_full(container, "History", origx1, origy1, origx2 - origx1, JUSTIFY_CENTER, WRAP_TRUNCATE,
+ mui.draw_text_full(container, _("History"), origx1, origy1, origx2 - origx1, JUSTIFY_CENTER, WRAP_TRUNCATE,
DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
ui_globals::cur_sw_dats_view = 0;
}
@@ -2054,8 +2060,8 @@ void ui_menu_select_game::infos_render(void *selectedref, float origx1, float or
float title_size = 0.0f;
float txt_lenght = 0.0f;
std::string t_text[2];
- t_text[0] = "History";
- t_text[1] = "Usage";
+ t_text[0] = _("History");
+ t_text[1] = _("Usage");
for (auto & elem: t_text)
{
@@ -2089,7 +2095,7 @@ void ui_menu_select_game::infos_render(void *selectedref, float origx1, float or
if (buffer.empty())
{
- mui.draw_text_full(container, "No Infos Available", origx1, (origy2 + origy1) * 0.5f, origx2 - origx1, JUSTIFY_CENTER,
+ mui.draw_text_full(container, _("No Infos Available"), origx1, (origy2 + origy1) * 0.5f, origx2 - origx1, JUSTIFY_CENTER,
WRAP_WORD, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
return;
}
diff --git a/src/emu/ui/selsoft.cpp b/src/emu/ui/selsoft.cpp
index 985a7d31bfc..3122f286917 100644
--- a/src/emu/ui/selsoft.cpp
+++ b/src/emu/ui/selsoft.cpp
@@ -106,7 +106,7 @@ bool has_multiple_bios(const game_driver *driver, std::vector<s_bios> &biosname)
if (bname == default_name)
{
- name.append(" (default)");
+ name.append(_(" (default)"));
biosname.emplace(biosname.begin(), name, bios_flags - 1);
}
else
@@ -618,17 +618,17 @@ void ui_menu_select_software::custom_render(void *selectedref, float top, float
tempbuf[1].assign("Driver: \"").append(m_driver->description).append("\" software list ");
if (sw_filters::actual == UI_SW_REGION && m_filter.region.ui.size() != 0)
- filtered.assign("Region: ").append(m_filter.region.ui[m_filter.region.actual]).append(" - ");
+ filtered.assign(_("Region: ")).append(m_filter.region.ui[m_filter.region.actual]).append(" - ");
else if (sw_filters::actual == UI_SW_PUBLISHERS)
- filtered.assign("Publisher: ").append(m_filter.publisher.ui[m_filter.publisher.actual]).append(" - ");
+ filtered.assign(_("Publisher: ")).append(m_filter.publisher.ui[m_filter.publisher.actual]).append(" - ");
else if (sw_filters::actual == UI_SW_YEARS)
- filtered.assign("Year: ").append(m_filter.year.ui[m_filter.year.actual]).append(" - ");
+ filtered.assign(_("Year: ")).append(m_filter.year.ui[m_filter.year.actual]).append(" - ");
else if (sw_filters::actual == UI_SW_LIST)
- filtered.assign("Software List: ").append(m_filter.swlist.description[m_filter.swlist.actual]).append(" - ");
+ filtered.assign(_("Software List: ")).append(m_filter.swlist.description[m_filter.swlist.actual]).append(" - ");
else if (sw_filters::actual == UI_SW_TYPE)
- filtered.assign("Device type: ").append(m_filter.type.ui[m_filter.type.actual]).append(" - ");
+ filtered.assign(_("Device type: ")).append(m_filter.type.ui[m_filter.type.actual]).append(" - ");
- tempbuf[2].assign(filtered).append("Search: ").append(m_search).append("_");
+ tempbuf[2].assign(filtered).append(_("Search: ")).append(m_search).append("_");
// get the size of the text
float maxwidth = origx2 - origx1;
@@ -1319,12 +1319,12 @@ float ui_menu_select_software::draw_left_panel(float x1, float y1, float x2, flo
hover = phover + filter;
}
- if (afilter == filter)
+/* if (afilter == filter)
{
bgcolor = UI_SELECTED_BG_COLOR;
fgcolor = UI_SELECTED_COLOR;
}
-
+*/
if (bgcolor != UI_TEXT_BG_COLOR)
container->add_rect(x1, y1, x2, y1 + line_height, bgcolor, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXWRAP(TRUE));
@@ -1351,6 +1351,12 @@ float ui_menu_select_software::draw_left_panel(float x1, float y1, float x2, flo
}
convert_command_glyph(str);
}
+ else if (filter == sw_filters::actual)
+ {
+ str.assign("@custom1 ").append(text[filter]);
+ x1t -= text_sign;
+ convert_command_glyph(str);
+ }
mui.draw_text_full(container, str.c_str(), x1t, y1, x2 - x1, JUSTIFY_LEFT, WRAP_NEVER,
DRAW_NORMAL, fgcolor, bgcolor, nullptr, nullptr, text_size);
@@ -1432,7 +1438,7 @@ void ui_menu_select_software::infos_render(void *selectedref, float origx1, floa
// apply title to right panel
if (soft && soft->usage.empty())
{
- mui.draw_text_full(container, "History", origx1, origy1, origx2 - origx1, JUSTIFY_CENTER, WRAP_TRUNCATE,
+ mui.draw_text_full(container, _("History"), origx1, origy1, origx2 - origx1, JUSTIFY_CENTER, WRAP_TRUNCATE,
DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
ui_globals::cur_sw_dats_view = 0;
}
@@ -1441,8 +1447,8 @@ void ui_menu_select_software::infos_render(void *selectedref, float origx1, floa
float title_size = 0.0f;
float txt_lenght = 0.0f;
std::string t_text[2];
- t_text[0] = "History";
- t_text[1] = "Usage";
+ t_text[0] = _("History");
+ t_text[1] = _("Usage");
for (auto & elem : t_text)
{
@@ -1477,7 +1483,7 @@ void ui_menu_select_software::infos_render(void *selectedref, float origx1, floa
if (buffer.empty())
{
- mui.draw_text_full(container, "No Infos Available", origx1, (origy2 + origy1) * 0.5f, origx2 - origx1, JUSTIFY_CENTER,
+ mui.draw_text_full(container, _("No Infos Available"), origx1, (origy2 + origy1) * 0.5f, origx2 - origx1, JUSTIFY_CENTER,
WRAP_WORD, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
return;
}
@@ -1813,7 +1819,7 @@ void ui_software_parts::custom_render(void *selectedref, float top, float bottom
{
float width;
ui_manager &mui = machine().ui();
- mui.draw_text_full(container, "Software part selection:", 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
+ mui.draw_text_full(container, _("Software part selection:"), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
width += 2 * UI_BOX_LR_BORDER;
float maxwidth = MAX(origx2 - origx1, width);
@@ -1833,7 +1839,7 @@ void ui_software_parts::custom_render(void *selectedref, float top, float bottom
y1 += UI_BOX_TB_BORDER;
// draw the text within it
- mui.draw_text_full(container, "Software part selection:", x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
+ mui.draw_text_full(container, _("Software part selection:"), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
}
@@ -1951,7 +1957,7 @@ void ui_bios_selection::custom_render(void *selectedref, float top, float bottom
{
float width;
ui_manager &mui = machine().ui();
- mui.draw_text_full(container, "Bios selection:", 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
+ mui.draw_text_full(container, _("Bios selection:"), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
width += 2 * UI_BOX_LR_BORDER;
float maxwidth = MAX(origx2 - origx1, width);
@@ -1971,6 +1977,6 @@ void ui_bios_selection::custom_render(void *selectedref, float top, float bottom
y1 += UI_BOX_TB_BORDER;
// draw the text within it
- mui.draw_text_full(container, "Bios selection:", x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
+ mui.draw_text_full(container, _("Bios selection:"), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
}
diff --git a/src/emu/ui/simpleselgame.cpp b/src/emu/ui/simpleselgame.cpp
index a0cf9412f6b..429ea61c9b7 100644
--- a/src/emu/ui/simpleselgame.cpp
+++ b/src/emu/ui/simpleselgame.cpp
@@ -261,8 +261,8 @@ void ui_simple_menu_select_game::populate()
if (ui_menu::stack_has_special_main_menu())
{
item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
- item_append("Configure Options", nullptr, 0, (void *)1);
- item_append("Save Configuration", nullptr, 0, (void *)2);
+ item_append(_("Configure Options"), nullptr, 0, (void *)1);
+ item_append(_("Save Configuration"), nullptr, 0, (void *)2);
skip_main_items = 2;
}
diff --git a/src/emu/ui/slotopt.cpp b/src/emu/ui/slotopt.cpp
index 959fef74adc..a67c217c7f1 100644
--- a/src/emu/ui/slotopt.cpp
+++ b/src/emu/ui/slotopt.cpp
@@ -163,13 +163,13 @@ void ui_menu_slot_devices::populate()
{
opt_name.assign(option->name());
if (slot->fixed() || slot_get_length(slot) == 0)
- opt_name.append(" [internal]");
+ opt_name.append(_(" [internal]"));
}
item_append(slot->device().tag() + 1, opt_name.c_str(), (slot->fixed() || slot_get_length(slot) == 0) ? 0 : (MENU_FLAG_LEFT_ARROW | MENU_FLAG_RIGHT_ARROW), (void *)slot);
}
item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
- item_append("Reset", nullptr, 0, (void *)1);
+ item_append(_("Reset"), nullptr, 0, (void *)1);
}
ui_menu_slot_devices::~ui_menu_slot_devices()
diff --git a/src/emu/ui/sndmenu.cpp b/src/emu/ui/sndmenu.cpp
index 06563c661b3..37134f8db25 100644
--- a/src/emu/ui/sndmenu.cpp
+++ b/src/emu/ui/sndmenu.cpp
@@ -133,9 +133,9 @@ void ui_menu_sound_options::populate()
strprintf(s_text, "%d", m_sample_rate);
// add options items
- item_append("Sound", m_sound ? "On" : "Off", m_sound ? MENU_FLAG_RIGHT_ARROW : MENU_FLAG_LEFT_ARROW, (void *)(FPTR)ENABLE_SOUND);
- item_append("Sample Rate", s_text.c_str(), arrow_flags, (void *)(FPTR)SAMPLE_RATE);
- item_append("Use External Samples", m_samples ? "On" : "Off", m_samples ? MENU_FLAG_RIGHT_ARROW : MENU_FLAG_LEFT_ARROW, (void *)(FPTR)ENABLE_SAMPLES);
+ item_append(_("Sound"), m_sound ? "On" : "Off", m_sound ? MENU_FLAG_RIGHT_ARROW : MENU_FLAG_LEFT_ARROW, (void *)(FPTR)ENABLE_SOUND);
+ item_append(_("Sample Rate"), s_text.c_str(), arrow_flags, (void *)(FPTR)SAMPLE_RATE);
+ item_append(_("Use External Samples"), m_samples ? "On" : "Off", m_samples ? MENU_FLAG_RIGHT_ARROW : MENU_FLAG_LEFT_ARROW, (void *)(FPTR)ENABLE_SAMPLES);
item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
customtop = machine().ui().get_line_height() + (3.0f * UI_BOX_TB_BORDER);
@@ -149,7 +149,7 @@ void ui_menu_sound_options::custom_render(void *selectedref, float top, float bo
{
float width;
ui_manager &mui = machine().ui();
- mui.draw_text_full(container, "Sound Options", 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
+ mui.draw_text_full(container, _("Sound Options"), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
width += 2 * UI_BOX_LR_BORDER;
float maxwidth = MAX(origx2 - origx1, width);
@@ -169,6 +169,6 @@ void ui_menu_sound_options::custom_render(void *selectedref, float top, float bo
y1 += UI_BOX_TB_BORDER;
// draw the text within it
- mui.draw_text_full(container, "Sound Options", x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
+ mui.draw_text_full(container, _("Sound Options"), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
}
diff --git a/src/emu/ui/ui.cpp b/src/emu/ui/ui.cpp
index 6652bf0b8e8..f3ce51feea6 100644
--- a/src/emu/ui/ui.cpp
+++ b/src/emu/ui/ui.cpp
@@ -363,7 +363,7 @@ void ui_manager::display_startup_screens(bool first_time, bool show_disclaimer)
{
const int maxstate = 4;
int str = machine().options().seconds_to_run();
- bool show_gameinfo = !machine().ui().options().skip_gameinfo();
+ bool show_gameinfo = !machine().options().skip_gameinfo();
bool show_warnings = true, show_mandatory_fileman = true;
int state;
@@ -412,7 +412,7 @@ void ui_manager::display_startup_screens(bool first_time, bool show_disclaimer)
if (show_mandatory_fileman && machine().image().mandatory_scan(messagebox_text).length() > 0)
{
std::string warning;
- warning.assign("This driver requires images to be loaded in the following device(s): ").append(messagebox_text.substr(0, messagebox_text.length() - 2));
+ warning.assign(_("This driver requires images to be loaded in the following device(s): ")).append(messagebox_text.substr(0, messagebox_text.length() - 2));
ui_menu_file_manager::force_file_manager(machine(), &machine().render().ui_container(), warning.c_str());
}
break;
@@ -499,7 +499,7 @@ void ui_manager::update_and_render(render_container *container)
m_popup_text_end = 0;
// display the internal mouse cursor
- if (m_mouse_show || (is_menu_active() && machine().ui().options().ui_mouse()))
+ if (m_mouse_show || (is_menu_active() && machine().options().ui_mouse()))
{
INT32 mouse_target_x, mouse_target_y;
bool mouse_button;
@@ -530,7 +530,7 @@ render_font *ui_manager::get_font()
{
// allocate the font and messagebox string
if (m_font == nullptr)
- m_font = machine().render().font_alloc(machine().ui().options().ui_font());
+ m_font = machine().render().font_alloc(machine().options().ui_font());
return m_font;
}
@@ -1059,9 +1059,9 @@ bool ui_manager::show_timecode_total()
std::string &ui_manager::disclaimer_string(std::string &str)
{
- str.assign("Usage of emulators in conjunction with ROMs you don't own is forbidden by copyright law.\n\n");
- strcatprintf(str, "IF YOU ARE NOT LEGALLY ENTITLED TO PLAY \"%s\" ON THIS EMULATOR, PRESS ESC.\n\n", machine().system().description);
- str.append("Otherwise, type OK or move the joystick left then right to continue");
+ str.assign(_("Usage of emulators in conjunction with ROMs you don't own is forbidden by copyright law.\n\n"));
+ strcatprintf(str, _("IF YOU ARE NOT LEGALLY ENTITLED TO PLAY \"%s\" ON THIS EMULATOR, PRESS ESC.\n\n"), machine().system().description);
+ str.append(_("Otherwise, type OK or move the joystick left then right to continue"));
return str;
}
@@ -1096,7 +1096,7 @@ std::string &ui_manager::warnings_string(std::string &str)
// add a warning if any ROMs were loaded with warnings
if (machine().rom_load().warnings() > 0)
{
- str.append("One or more ROMs/CHDs for this machine are incorrect. The machine may not run correctly.\n");
+ str.append(_("One or more ROMs/CHDs for this machine are incorrect. The machine may not run correctly.\n"));
if (machine().system().flags & WARNING_FLAGS)
str.append("\n");
}
@@ -1109,42 +1109,42 @@ std::string &ui_manager::warnings_string(std::string &str)
// if we have at least one warning flag, print the general header
if ((machine().system().flags & WARNING_FLAGS) || machine().rom_load().knownbad() > 0)
{
- str.append("There are known problems with this machine\n\n");
+ str.append(_("There are known problems with this machine\n\n"));
// add a warning if any ROMs are flagged BAD_DUMP/NO_DUMP
if (machine().rom_load().knownbad() > 0) {
- str.append("One or more ROMs/CHDs for this machine have not been correctly dumped.\n");
+ str.append(_("One or more ROMs/CHDs for this machine have not been correctly dumped.\n"));
}
// add one line per warning flag
if (machine().system().flags & MACHINE_IMPERFECT_KEYBOARD)
- str.append("The keyboard emulation may not be 100% accurate.\n");
+ str.append(_("The keyboard emulation may not be 100% accurate.\n"));
if (machine().system().flags & MACHINE_IMPERFECT_COLORS)
- str.append("The colors aren't 100% accurate.\n");
+ str.append(_("The colors aren't 100% accurate.\n"));
if (machine().system().flags & MACHINE_WRONG_COLORS)
- str.append("The colors are completely wrong.\n");
+ str.append(_("The colors are completely wrong.\n"));
if (machine().system().flags & MACHINE_IMPERFECT_GRAPHICS)
- str.append("The video emulation isn't 100% accurate.\n");
+ str.append(_("The video emulation isn't 100% accurate.\n"));
if (machine().system().flags & MACHINE_IMPERFECT_SOUND)
- str.append("The sound emulation isn't 100% accurate.\n");
+ str.append(_("The sound emulation isn't 100% accurate.\n"));
if (machine().system().flags & MACHINE_NO_SOUND) {
- str.append("The machine lacks sound.\n");
+ str.append(_("The machine lacks sound.\n"));
}
if (machine().system().flags & MACHINE_NO_COCKTAIL)
- str.append("Screen flipping in cocktail mode is not supported.\n");
+ str.append(_("Screen flipping in cocktail mode is not supported.\n"));
// check if external artwork is present before displaying this warning?
if (machine().system().flags & MACHINE_REQUIRES_ARTWORK) {
- str.append("The machine requires external artwork files\n");
+ str.append(_("The machine requires external artwork files\n"));
}
if (machine().system().flags & MACHINE_IS_INCOMPLETE )
{
- str.append("This machine was never completed. It may exhibit strange behavior or missing elements that are not bugs in the emulation.\n");
+ str.append(_("This machine was never completed. It may exhibit strange behavior or missing elements that are not bugs in the emulation.\n"));
}
if (machine().system().flags & MACHINE_NO_SOUND_HW )
{
- str.append("This machine has no sound hardware, MAME will produce no sounds, this is expected behaviour.\n");
+ str.append(_("This machine has no sound hardware, MAME will produce no sounds, this is expected behaviour.\n"));
}
// if there's a NOT WORKING, UNEMULATED PROTECTION or GAME MECHANICAL warning, make it stronger
@@ -1152,15 +1152,15 @@ std::string &ui_manager::warnings_string(std::string &str)
{
// add the strings for these warnings
if (machine().system().flags & MACHINE_UNEMULATED_PROTECTION) {
- str.append("The machine has protection which isn't fully emulated.\n");
+ str.append(_("The machine has protection which isn't fully emulated.\n"));
}
if (machine().system().flags & MACHINE_NOT_WORKING) {
- str.append("\nTHIS MACHINE DOESN'T WORK. The emulation for this machine is not yet complete. "
- "There is nothing you can do to fix this problem except wait for the developers to improve the emulation.\n");
+ str.append(_("\nTHIS MACHINE DOESN'T WORK. The emulation for this machine is not yet complete. "
+ "There is nothing you can do to fix this problem except wait for the developers to improve the emulation.\n"));
}
if (machine().system().flags & MACHINE_MECHANICAL) {
- str.append("\nCertain elements of this machine cannot be emulated as it requires actual physical interaction or consists of mechanical devices. "
- "It is not possible to fully play this machine.\n");
+ str.append(_("\nCertain elements of this machine cannot be emulated as it requires actual physical interaction or consists of mechanical devices. "
+ "It is not possible to fully play this machine.\n"));
}
// find the parent of this driver
@@ -1178,7 +1178,7 @@ std::string &ui_manager::warnings_string(std::string &str)
{
// this one works, add a header and display the name of the clone
if (!foundworking) {
- str.append("\n\nThere are working clones of this machine: ");
+ str.append(_("\n\nThere are working clones of this machine: "));
}
else
str.append(", ");
@@ -1192,7 +1192,7 @@ std::string &ui_manager::warnings_string(std::string &str)
}
// add the 'press OK' string
- str.append("\n\nType OK or move the joystick left then right to continue");
+ str.append(_("\n\nType OK or move the joystick left then right to continue"));
return str;
}
@@ -1251,7 +1251,7 @@ std::string &ui_manager::game_info_astring(std::string &str)
// append the Sound: string
if (!found_sound)
- str.append("\nSound:\n");
+ str.append(_("\nSound:\n"));
found_sound = true;
// count how many identical sound chips we have
@@ -1279,11 +1279,11 @@ std::string &ui_manager::game_info_astring(std::string &str)
}
// display screen information
- str.append("\nVideo:\n");
+ str.append(_("\nVideo:\n"));
screen_device_iterator scriter(machine().root_device());
int scrcount = scriter.count();
if (scrcount == 0)
- str.append("None\n");
+ str.append(_("None\n"));
else
{
for (screen_device *screen = scriter.first(); screen != nullptr; screen = scriter.next())
@@ -1295,7 +1295,7 @@ std::string &ui_manager::game_info_astring(std::string &str)
}
if (screen->screen_type() == SCREEN_TYPE_VECTOR)
- str.append("Vector\n");
+ str.append(_("Vector\n"));
else
{
const rectangle &visarea = screen->visible_area();
@@ -1587,22 +1587,22 @@ UINT32 ui_manager::handler_ingame(running_machine &machine, render_container *co
if (machine.ui_active())
{
machine.ui().popup_time(2, "%s\n%s\n%s\n%s\n%s\n%s\n",
- "Keyboard Emulation Status",
+ _("Keyboard Emulation Status"),
"-------------------------",
- "Mode: PARTIAL Emulation",
- "UI: Enabled",
+ _("Mode: PARTIAL Emulation"),
+ _("UI: Enabled"),
"-------------------------",
- "**Use ScrLock to toggle**");
+ _("**Use ScrLock to toggle**"));
}
else
{
machine.ui().popup_time(2, "%s\n%s\n%s\n%s\n%s\n%s\n",
- "Keyboard Emulation Status",
+ _("Keyboard Emulation Status"),
"-------------------------",
- "Mode: FULL Emulation",
- "UI: Disabled",
+ _("Mode: FULL Emulation"),
+ _("UI: Disabled"),
"-------------------------",
- "**Use ScrLock to toggle**");
+ _("**Use ScrLock to toggle**"));
}
}
}
@@ -1746,13 +1746,13 @@ UINT32 ui_manager::handler_ingame(running_machine &machine, render_container *co
{
if (!machine.options().cheat())
{
- machine.popmessage("Autofire can't be enabled");
+ machine.popmessage(_("Autofire can't be enabled"));
}
else
{
bool autofire_toggle = machine.ioport().get_autofire_toggle();
machine.ioport().set_autofire_toggle(!autofire_toggle);
- machine.popmessage("Autofire %s", autofire_toggle ? "Enabled" : "Disabled");
+ machine.popmessage("Autofire %s", autofire_toggle ? _("Enabled") : _("Disabled"));
}
}
@@ -1785,9 +1785,9 @@ UINT32 ui_manager::handler_load_save(running_machine &machine, render_container
// okay, we're waiting for a key to select a slot; display a message
if (state == LOADSAVE_SAVE)
- machine.ui().draw_message_window(container, "Select position to save to");
+ machine.ui().draw_message_window(container, _("Select position to save to"));
else
- machine.ui().draw_message_window(container, "Select position to load from");
+ machine.ui().draw_message_window(container, _("Select position to load from"));
// if load/save state sequence is still being pressed, do not read the filename yet
if (machine.ui().m_load_save_hold) {
@@ -1811,9 +1811,9 @@ UINT32 ui_manager::handler_load_save(running_machine &machine, render_container
{
// display a popup indicating things were cancelled
if (state == LOADSAVE_SAVE)
- machine.popmessage("Save cancelled");
+ machine.popmessage(_("Save cancelled"));
else
- machine.popmessage("Load cancelled");
+ machine.popmessage(_("Load cancelled"));
// reset the state
machine.resume();
@@ -1856,12 +1856,12 @@ UINT32 ui_manager::handler_load_save(running_machine &machine, render_container
// display a popup indicating that the save will proceed
if (state == LOADSAVE_SAVE)
{
- machine.popmessage("Save to position %s", filename);
+ machine.popmessage(_("Save to position %s"), filename);
machine.schedule_save(filename);
}
else
{
- machine.popmessage("Load from position %s", filename);
+ machine.popmessage(_("Load from position %s"), filename);
machine.schedule_load(filename);
}
@@ -1880,7 +1880,7 @@ UINT32 ui_manager::handler_load_save(running_machine &machine, render_container
void ui_manager::request_quit()
{
- if (!machine().ui().options().confirm_quit())
+ if (!machine().options().confirm_quit())
machine().schedule_exit();
else
set_handler(handler_confirm_quit, 0);
@@ -1901,9 +1901,9 @@ UINT32 ui_manager::handler_confirm_quit(running_machine &machine, render_contain
std::string ui_cancel_text = machine.input().seq_name(machine.ioport().type_seq(IPT_UI_CANCEL, 0, SEQ_TYPE_STANDARD));
// assemble the quit message
- std::string quit_message = strformat("Are you sure you want to quit?\n\n"
+ std::string quit_message = strformat(_("Are you sure you want to quit?\n\n"
"Press ''%s'' to quit,\n"
- "Press ''%s'' to return to emulation.",
+ "Press ''%s'' to return to emulation."),
ui_select_text.c_str(),
ui_cancel_text.c_str());
@@ -1977,7 +1977,7 @@ static slider_state *slider_init(running_machine &machine)
int item;
// add overall volume
- *tailptr = slider_alloc(machine, "Master Volume", -32, 0, 0, 1, slider_volume, nullptr);
+ *tailptr = slider_alloc(machine, _("Master Volume"), -32, 0, 0, 1, slider_volume, nullptr);
tailptr = &(*tailptr)->next;
// add per-channel volume
@@ -1988,7 +1988,7 @@ static slider_state *slider_init(running_machine &machine)
INT32 defval = 1000;
str.assign(info.stream->input_name(info.inputnum));
- str.append(" Volume");
+ str.append(_(" Volume"));
*tailptr = slider_alloc(machine, str.c_str(), 0, defval, maxval, 20, slider_mixervol, (void *)(FPTR)item);
tailptr = &(*tailptr)->next;
}
@@ -2091,13 +2091,13 @@ static slider_state *slider_init(running_machine &machine)
if (screen->screen_type() == SCREEN_TYPE_VECTOR)
{
// add vector control
- *tailptr = slider_alloc(machine, "Vector Flicker", 0, 0, 1000, 10, slider_flicker, nullptr);
+ *tailptr = slider_alloc(machine, _("Vector Flicker"), 0, 0, 1000, 10, slider_flicker, nullptr);
tailptr = &(*tailptr)->next;
- *tailptr = slider_alloc(machine, "Beam Width Minimum", 1, 100, 1000, 1, slider_beam_width_min, nullptr);
+ *tailptr = slider_alloc(machine, _("Beam Width Minimum"), 1, 100, 1000, 1, slider_beam_width_min, nullptr);
tailptr = &(*tailptr)->next;
- *tailptr = slider_alloc(machine, "Beam Width Maximum", 1, 100, 1000, 1, slider_beam_width_max, nullptr);
+ *tailptr = slider_alloc(machine, _("Beam Width Maximum"), 1, 100, 1000, 1, slider_beam_width_max, nullptr);
tailptr = &(*tailptr)->next;
- *tailptr = slider_alloc(machine, "Beam Intensity Weight", -1000, 0, 1000, 10, slider_beam_intensity_weight, nullptr);
+ *tailptr = slider_alloc(machine, _("Beam Intensity Weight"), -1000, 0, 1000, 10, slider_beam_intensity_weight, nullptr);
tailptr = &(*tailptr)->next;
break;
}
@@ -2537,9 +2537,9 @@ static char *slider_get_screen_desc(screen_device &screen)
static char descbuf[256];
if (scrcount > 1)
- sprintf(descbuf, "Screen '%s'", screen.tag());
+ sprintf(descbuf, _("Screen '%s'"), screen.tag());
else
- strcpy(descbuf, "Screen");
+ strcpy(descbuf, _("Screen"));
return descbuf;
}
@@ -2557,7 +2557,7 @@ static INT32 slider_crossscale(running_machine &machine, void *arg, std::string
if (newval != SLIDER_NOCHANGE)
field->set_crosshair_scale(float(newval) * 0.001);
if (str != nullptr)
- strprintf(*str,"%s %s %1.3f", "Crosshair Scale", (field->crosshair_axis() == CROSSHAIR_AXIS_X) ? "X" : "Y", float(newval) * 0.001f);
+ strprintf(*str,"%s %s %1.3f", _("Crosshair Scale"), (field->crosshair_axis() == CROSSHAIR_AXIS_X) ? "X" : "Y", float(newval) * 0.001f);
return floor(field->crosshair_scale() * 1000.0f + 0.5f);
}
#endif
@@ -2576,7 +2576,7 @@ static INT32 slider_crossoffset(running_machine &machine, void *arg, std::string
if (newval != SLIDER_NOCHANGE)
field->set_crosshair_offset(float(newval) * 0.001f);
if (str != nullptr)
- strprintf(*str,"%s %s %1.3f", "Crosshair Offset", (field->crosshair_axis() == CROSSHAIR_AXIS_X) ? "X" : "Y", float(newval) * 0.001f);
+ strprintf(*str,"%s %s %1.3f", _("Crosshair Offset"), (field->crosshair_axis() == CROSSHAIR_AXIS_X) ? "X" : "Y", float(newval) * 0.001f);
return field->crosshair_offset();
}
#endif
diff --git a/src/emu/ui/videoopt.cpp b/src/emu/ui/videoopt.cpp
index aa3bc21dd5f..6ba6aa710f3 100644
--- a/src/emu/ui/videoopt.cpp
+++ b/src/emu/ui/videoopt.cpp
@@ -52,7 +52,7 @@ void ui_menu_video_targets::populate()
break;
/* add a menu item */
- sprintf(buffer, "Screen #%d", targetnum);
+ sprintf(buffer, _("Screen #%d"), targetnum);
item_append(buffer, nullptr, 0, target);
}
}
@@ -200,31 +200,31 @@ void ui_menu_video_options::populate()
case ROT180: subtext = "180" UTF8_DEGREES; break;
case ROT270: subtext = "CCW 90" UTF8_DEGREES; break;
}
- item_append("Rotate", subtext, MENU_FLAG_LEFT_ARROW | MENU_FLAG_RIGHT_ARROW, (void *)VIDEO_ITEM_ROTATE);
+ item_append(_("Rotate"), subtext, MENU_FLAG_LEFT_ARROW | MENU_FLAG_RIGHT_ARROW, (void *)VIDEO_ITEM_ROTATE);
/* backdrop item */
enabled = target->backdrops_enabled();
- item_append("Backdrops", enabled ? "Enabled" : "Disabled", enabled ? MENU_FLAG_LEFT_ARROW : MENU_FLAG_RIGHT_ARROW, (void *)VIDEO_ITEM_BACKDROPS);
+ item_append(_("Backdrops"), enabled ? _("Enabled") : _("Disabled"), enabled ? MENU_FLAG_LEFT_ARROW : MENU_FLAG_RIGHT_ARROW, (void *)VIDEO_ITEM_BACKDROPS);
/* overlay item */
enabled = target->overlays_enabled();
- item_append("Overlays", enabled ? "Enabled" : "Disabled", enabled ? MENU_FLAG_LEFT_ARROW : MENU_FLAG_RIGHT_ARROW, (void *)VIDEO_ITEM_OVERLAYS);
+ item_append(_("Overlays"), enabled ? _("Enabled") : _("Disabled"), enabled ? MENU_FLAG_LEFT_ARROW : MENU_FLAG_RIGHT_ARROW, (void *)VIDEO_ITEM_OVERLAYS);
/* bezel item */
enabled = target->bezels_enabled();
- item_append("Bezels", enabled ? "Enabled" : "Disabled", enabled ? MENU_FLAG_LEFT_ARROW : MENU_FLAG_RIGHT_ARROW, (void *)VIDEO_ITEM_BEZELS);
+ item_append(_("Bezels"), enabled ? _("Enabled") : _("Disabled"), enabled ? MENU_FLAG_LEFT_ARROW : MENU_FLAG_RIGHT_ARROW, (void *)VIDEO_ITEM_BEZELS);
/* cpanel item */
enabled = target->cpanels_enabled();
- item_append("CPanels", enabled ? "Enabled" : "Disabled", enabled ? MENU_FLAG_LEFT_ARROW : MENU_FLAG_RIGHT_ARROW, (void *)VIDEO_ITEM_CPANELS);
+ item_append(_("CPanels"), enabled ? _("Enabled") : _("Disabled"), enabled ? MENU_FLAG_LEFT_ARROW : MENU_FLAG_RIGHT_ARROW, (void *)VIDEO_ITEM_CPANELS);
/* marquee item */
enabled = target->marquees_enabled();
- item_append("Marquees", enabled ? "Enabled" : "Disabled", enabled ? MENU_FLAG_LEFT_ARROW : MENU_FLAG_RIGHT_ARROW, (void *)VIDEO_ITEM_MARQUEES);
+ item_append(_("Marquees"), enabled ? _("Enabled") : _("Disabled"), enabled ? MENU_FLAG_LEFT_ARROW : MENU_FLAG_RIGHT_ARROW, (void *)VIDEO_ITEM_MARQUEES);
/* cropping */
enabled = target->zoom_to_screen();
- item_append("View", enabled ? "Cropped" : "Full", enabled ? MENU_FLAG_RIGHT_ARROW : MENU_FLAG_LEFT_ARROW, (void *)VIDEO_ITEM_ZOOM);
+ item_append(_("View"), enabled ? _("Cropped") : _("Full"), enabled ? MENU_FLAG_RIGHT_ARROW : MENU_FLAG_LEFT_ARROW, (void *)VIDEO_ITEM_ZOOM);
}
ui_menu_video_options::~ui_menu_video_options()
diff --git a/src/emu/ui/viewgfx.cpp b/src/emu/ui/viewgfx.cpp
index 326e67779c9..ff34e732f1e 100644
--- a/src/emu/ui/viewgfx.cpp
+++ b/src/emu/ui/viewgfx.cpp
@@ -388,7 +388,7 @@ static void palette_handler(running_machine &machine, render_container *containe
cellboxbounds.y0 += 3.0f * chheight;
// figure out the title and expand the outer box to fit
- const char *suffix = palette->indirect_entries() == 0 ? "" : state.palette.which ? " COLORS" : " PENS";
+ const char *suffix = palette->indirect_entries() == 0 ? "" : state.palette.which ? _(" COLORS") : _(" PENS");
sprintf(title, "'%s'%s", palette->tag(), suffix);
titlewidth = ui_font->string_width(chheight, machine.render().ui_aspect(), title);
x0 = 0.0f;
diff --git a/src/mame/drivers/at.cpp b/src/mame/drivers/at.cpp
index d1fe3f3307d..4ac472fe0c1 100644
--- a/src/mame/drivers/at.cpp
+++ b/src/mame/drivers/at.cpp
@@ -1177,10 +1177,10 @@ AMI 8921MBK 90X8551 1987 --> 72X7560
*/
ROM_START( i8580071 )
ROM_REGION(0x1000000,"maincpu", 0)
- ROM_LOAD( "90x8548.bin", 0xe0000, 0x8000, CRC(1f13eea5) SHA1(0bf53ad86f47db3825a713ea2e4ef23715cc4f79))
- ROM_LOAD( "90x8549.bin", 0xe0001, 0x8000, CRC(9e0f4a99) SHA1(b8600f04159ed281a57416274390ba9302be541b))
- ROM_LOAD( "90x8550.bin", 0xf0000, 0x8000, CRC(cb21df96) SHA1(0c2765f6becfa3f9171c4f13f7b74d19c4c9acc2))
- ROM_LOAD( "90x8551.bin", 0xf0001, 0x8000, CRC(3d7e9868) SHA1(2928fe0e48a573cc2c0c41bd7f7188a54a908229))
+ ROM_LOAD32_BYTE( "90x8548.bin", 0xe0000, 0x8000, CRC(1f13eea5) SHA1(0bf53ad86f47db3825a713ea2e4ef23715cc4f79))
+ ROM_LOAD32_BYTE( "90x8549.bin", 0xe0001, 0x8000, CRC(9e0f4a99) SHA1(b8600f04159ed281a57416274390ba9302be541b))
+ ROM_LOAD32_BYTE( "90x8550.bin", 0xe0002, 0x8000, CRC(cb21df96) SHA1(0c2765f6becfa3f9171c4f13f7b74d19c4c9acc2))
+ ROM_LOAD32_BYTE( "90x8551.bin", 0xe0003, 0x8000, CRC(3d7e9868) SHA1(2928fe0e48a573cc2c0c41bd7f7188a54a908229))
ROM_END
/*
@@ -1598,7 +1598,8 @@ ROM_END
ROM_START( aprpand )
ROM_REGION(0x1000000,"maincpu", 0)
- ROM_LOAD( "pf10226.std", 0xe0000, 0x20000, CRC(7396fb87) SHA1(a109cbad2179eec55f86c0297a59bb015461da21))
+ ROM_LOAD16_BYTE( "pf10226.std", 0xe0000, 0x10000, CRC(7396fb87) SHA1(a109cbad2179eec55f86c0297a59bb015461da21))
+ ROM_CONTINUE( 0xe0001, 0x10000 )
ROM_END
ROM_START( aprfte )
diff --git a/src/mame/drivers/hh_cop400.cpp b/src/mame/drivers/hh_cop400.cpp
index 4b5046bde85..a032acec210 100644
--- a/src/mame/drivers/hh_cop400.cpp
+++ b/src/mame/drivers/hh_cop400.cpp
@@ -278,6 +278,51 @@ MACHINE_CONFIG_END
/***************************************************************************
+ Coleco Head to Head Basketball
+ * COP420 MCU labeled COP420L-NEZ/N
+ * 2-digit 7seg display, 41 other leds, 1-bit sound
+
+***************************************************************************/
+
+class h2hbaskb_state : public hh_cop400_state
+{
+public:
+ h2hbaskb_state(const machine_config &mconfig, device_type type, const char *tag)
+ : hh_cop400_state(mconfig, type, tag)
+ { }
+};
+
+// handlers
+
+//..
+
+
+// config
+
+static INPUT_PORTS_START( h2hbaskb )
+INPUT_PORTS_END
+
+static MACHINE_CONFIG_START( h2hbaskb, h2hbaskb_state )
+
+ /* basic machine hardware */
+ MCFG_CPU_ADD("maincpu", COP420, 1000000) // approximation - RC osc. R=43K to +9V, C=101pf to GND
+ MCFG_COP400_CONFIG(COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, COP400_MICROBUS_DISABLED) // guessed
+
+ MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_cop400_state, display_decay_tick, attotime::from_msec(1))
+// MCFG_DEFAULT_LAYOUT(layout_h2hbaskb)
+
+ /* sound hardware */
+ MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+MACHINE_CONFIG_END
+
+
+
+
+
+/***************************************************************************
+
Entex Space Invader
* COP444L MCU labeled /B138 COPL444-HRZ/N INV II (die labeled HRZ COP 444L/A)
* 3 7seg LEDs, LED matrix and overlay mask, 1-bit sound
@@ -787,6 +832,12 @@ ROM_START( ctstein )
ROM_END
+ROM_START( h2hbaskb )
+ ROM_REGION( 0x0400, "maincpu", 0 )
+ ROM_LOAD( "cop420l-nmy", 0x0000, 0x0400, CRC(87152509) SHA1(acdb869b65d49b3b9855a557ed671cbbb0f61e2c) )
+ROM_END
+
+
ROM_START( einvaderc )
ROM_REGION( 0x0800, "maincpu", 0 )
ROM_LOAD( "copl444-hrz_n_inv_ii", 0x0000, 0x0800, CRC(76400f38) SHA1(0e92ab0517f7b7687293b189d30d57110df20fe0) )
@@ -821,6 +872,8 @@ ROM_END
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY, FULLNAME, FLAGS */
CONS( 1979, ctstein, 0, 0, ctstein, ctstein, driver_device, 0, "Castle Toy", "Einstein (Castle Toy)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
+CONS( 1979, h2hbaskb, 0, 0, h2hbaskb, h2hbaskb, driver_device, 0, "Coleco", "Head to Head Basketball (COP420L)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
+
CONS( 1981, einvaderc, einvader, 0, einvaderc, einvaderc, driver_device, 0, "Entex", "Space Invader (Entex, COP444)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK | MACHINE_NOT_WORKING )
CONS( 1979, funjacks, 0, 0, funjacks, funjacks, driver_device, 0, "Mattel", "Funtronics Jacks", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
diff --git a/src/mame/drivers/hh_tms1k.cpp b/src/mame/drivers/hh_tms1k.cpp
index 87c4e51a772..a201672c98f 100644
--- a/src/mame/drivers/hh_tms1k.cpp
+++ b/src/mame/drivers/hh_tms1k.cpp
@@ -78,7 +78,7 @@
MP7324 TMS1400 1985, Tiger K28/Coleco Talking Teacher -> tispeak.cpp
MP7332 TMS1400 1981, Milton Bradley Dark Tower -> mbdtower.cpp
@MP7334 TMS1400 1981, Coleco Total Control 4
- @MP7351 TMS1400CR 1982, Parker Brothers Master Merlin
+ @MP7351 TMS1400 1982, Parker Brothers Master Merlin
@MP7551 TMS1670 1980, Entex Color Football 4 (6009)
@MPF553 TMS1670 1980, Gakken Jackpot: Gin Rummy & Black Jack (note: assume F to be a misprint)
*MP7573 TMS1670? 1981, Entex Select-a-Game cartridge: Football 4 (? note: 40-pin, VFD-capable)
@@ -110,7 +110,7 @@
#include "sound/beep.h"
// internal artwork
-#include "amaztron.lh"
+#include "amaztron.lh" // clickable
#include "astro.lh"
#include "bankshot.lh"
#include "bigtrak.lh"
@@ -131,6 +131,7 @@
#include "h2hfootb.lh"
#include "lostreas.lh"
#include "mathmagi.lh"
+#include "mdndclab.lh" // clickable
#include "merlin.lh" // clickable
#include "mmerlin.lh" // clickable
#include "simon.lh" // clickable
@@ -537,11 +538,10 @@ MACHINE_CONFIG_END
Coleco Amaze-A-Tron, by Ralph Baer
* TMS1100 MCU, labeled MP3405(die label too)
* 2-digit 7seg LED display + 2 LEDs(one red, one green), 1-bit sound
- * 5x5 pressure-sensitive playing board
+ * 5*5 pressure-sensitive playing board(buttons), 4 game pieces
This is an electronic board game with a selection of 8 maze games,
- most of them for 2 players. A 5x5 playing grid and four markers are
- required to play. Refer to the official manual for more information.
+ most of them for 2 players.
***************************************************************************/
@@ -562,18 +562,8 @@ public:
void amaztron_state::prepare_display()
{
- // R8,R9: select digit
- for (int y = 0; y < 2; y++)
- {
- m_display_segmask[y] = 0x7f;
- m_display_state[y] = (m_r >> (y + 8) & 1) ? m_o : 0;
- }
-
- // R6,R7: lamps (-> lamp20,21)
- m_display_state[2] = m_r >> 6 & 3;
-
- set_display_size(8, 3);
- display_update();
+ set_display_segmask(0xc, 0x7f);
+ display_matrix(7, 4, m_o, m_r);
}
WRITE16_MEMBER(amaztron_state::write_r)
@@ -584,8 +574,9 @@ WRITE16_MEMBER(amaztron_state::write_r)
// R10: speaker out
m_speaker->level_w(data >> 10 & 1);
- // other bits:
- m_r = data;
+ // R6,R7: leds
+ // R8,R9: select digit
+ m_r = data >> 6 & 0xf;
prepare_display();
}
@@ -612,50 +603,50 @@ READ8_MEMBER(amaztron_state::read_k)
static INPUT_PORTS_START( amaztron )
PORT_START("IN.0") // R0
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_NAME("Grid 1")
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_NAME("Grid 6")
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Q) PORT_NAME("Grid 11")
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_A) PORT_NAME("Grid 16")
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Z) PORT_NAME("Grid 21")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square 1")
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square 6")
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square 11")
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square 16")
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square 21")
PORT_START("IN.1") // R1
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_NAME("Grid 2")
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_7) PORT_NAME("Grid 7")
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_W) PORT_NAME("Grid 12")
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_S) PORT_NAME("Grid 17")
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_X) PORT_NAME("Grid 22")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square 2")
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square 7")
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square 12")
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square 17")
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square 22")
PORT_START("IN.2") // R2
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_NAME("Grid 3")
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_8) PORT_NAME("Grid 8")
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) PORT_NAME("Grid 13")
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_D) PORT_NAME("Grid 18")
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_C) PORT_NAME("Grid 23")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square 3")
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square 8")
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square 13")
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square 18")
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square 23")
PORT_START("IN.3") // R3
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_NAME("Grid 4")
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_9) PORT_NAME("Grid 9")
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) PORT_NAME("Grid 14")
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_F) PORT_NAME("Grid 19")
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_V) PORT_NAME("Grid 24")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square 4")
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square 9")
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square 14")
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square 19")
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square 24")
PORT_START("IN.4") // R4
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_NAME("Grid 5")
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_0) PORT_NAME("Grid 10")
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T) PORT_NAME("Grid 15")
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_G) PORT_NAME("Grid 20")
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_B) PORT_NAME("Grid 25")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square 5")
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square 10")
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square 15")
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square 20")
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square 25")
PORT_START("IN.5") // R5
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_M) PORT_NAME("Game Select")
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_N) PORT_NAME("Game Start")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_SELECT) PORT_NAME("Game Select")
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_START) PORT_NAME("Game Start")
PORT_BIT(0x1c, IP_ACTIVE_HIGH, IPT_UNUSED)
INPUT_PORTS_END
static MACHINE_CONFIG_START( amaztron, amaztron_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", TMS1100, 350000) // approximation - RC osc. R=33K?, C=100pf
+ MCFG_CPU_ADD("maincpu", TMS1100, 300000) // approximation - RC osc. R=33K?, C=100pf
MCFG_TMS1XXX_READ_K_CB(READ8(amaztron_state, read_k))
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(amaztron_state, write_r))
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(amaztron_state, write_o))
@@ -3104,64 +3095,54 @@ READ8_MEMBER(mdndclab_state::read_k)
// config
-/* physical button layout and labels is like this:
-
- 8 buttons on the left, top-to-bottom: (lower 6 are just for sound-preview)
- [Switch Key] [Next Turn / Level 1/2] [Dragon Flying / Defeat Tune] [Dragon Attacks / Dragon Wakes]
- [Wall / Door] [Illegal Move / Warrior Moves] [Warrior 1 / Winner] [Warrior 2 / Treasure]
-
- 8*8 buttons to the right of that, making the gameboard
-
-*/
-
static INPUT_PORTS_START( mdndclab )
PORT_START("IN.0") // O0
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid a4")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid a3")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid a2")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid a1")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square a4")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square a3")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square a2")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square a1")
PORT_START("IN.1") // O1
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid b4")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid b3")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid b2")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid b1")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square b4")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square b3")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square b2")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square b1")
PORT_START("IN.2") // O2
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid c4")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid c3")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid c2")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid c1")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square c4")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square c3")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square c2")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square c1")
PORT_START("IN.3") // O3
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid d4")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid d3")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid d2")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid d1")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square d4")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square d3")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square d2")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square d1")
PORT_START("IN.4") // O4
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid e4")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid e3")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid e2")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid e1")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square e4")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square e3")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square e2")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square e1")
PORT_START("IN.5") // O5
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid f4")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid f3")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid f2")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid f1")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square f4")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square f3")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square f2")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square f1")
PORT_START("IN.6") // O6
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid g4")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid g3")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid g2")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid g1")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square g4")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square g3")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square g2")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square g1")
PORT_START("IN.7") // O7
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid h4")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid h3")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid h2")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid h1")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square h4")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square h3")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square h2")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square h1")
PORT_START("IN.8") // R0
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("Wall / Door")
@@ -3170,52 +3151,52 @@ static INPUT_PORTS_START( mdndclab )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("Warrior 2 / Treasure")
PORT_START("IN.9") // R1
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid a8")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid a7")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid a6")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid a5")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square a8")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square a7")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square a6")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square a5")
PORT_START("IN.10") // R2
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid b8")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid b7")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid b6")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid b5")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square b8")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square b7")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square b6")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square b5")
PORT_START("IN.11") // R3
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid c8")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid c7")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid c6")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid c5")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square c8")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square c7")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square c6")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square c5")
PORT_START("IN.12") // R4
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid d8")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid d7")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid d6")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid d5")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square d8")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square d7")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square d6")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square d5")
PORT_START("IN.13") // R5
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid e8")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid e7")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid e6")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid e5")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square e8")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square e7")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square e6")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square e5")
PORT_START("IN.14") // R6
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid f8")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid f7")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid f6")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid f5")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square f8")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square f7")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square f6")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square f5")
PORT_START("IN.15") // R7
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid g8")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid g7")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid g6")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid g5")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square g8")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square g7")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square g6")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square g5")
PORT_START("IN.16") // R8
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid h8")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid h7")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid h6")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Grid h5")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square h8")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square h7")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square h6")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square h5")
PORT_START("IN.17") // R9
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_NAME("Switch Key")
@@ -3228,12 +3209,13 @@ INPUT_PORTS_END
static MACHINE_CONFIG_START( mdndclab, mdndclab_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", TMS1100, 500000) // approximation - RC osc. R=27K, C=100pf
+ MCFG_CPU_ADD("maincpu", TMS1100, 475000) // approximation - RC osc. R=27K, C=100pf
MCFG_TMS1XXX_READ_K_CB(READ8(mdndclab_state, read_k))
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(mdndclab_state, write_r))
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(mdndclab_state, write_o))
/* no visual feedback! */
+ MCFG_DEFAULT_LAYOUT(layout_mdndclab) // playing board
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -5445,7 +5427,7 @@ ROM_END
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY, FULLNAME, FLAGS */
COMP( 1980, mathmagi, 0, 0, mathmagi, mathmagi, driver_device, 0, "APF Electronics Inc.", "Mathemagician", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW )
-CONS( 1979, amaztron, 0, 0, amaztron, amaztron, driver_device, 0, "Coleco", "Amaze-A-Tron", MACHINE_SUPPORTS_SAVE )
+CONS( 1978, amaztron, 0, 0, amaztron, amaztron, driver_device, 0, "Coleco", "Amaze-A-Tron", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) // ***
COMP( 1979, zodiac, 0, 0, zodiac, zodiac, driver_device, 0, "Coleco", "Zodiac - The Astrology Computer", MACHINE_SUPPORTS_SAVE )
CONS( 1978, cqback, 0, 0, cqback, cqback, driver_device, 0, "Coleco", "Electronic Quarterback", MACHINE_SUPPORTS_SAVE )
CONS( 1980, h2hfootb, 0, 0, h2hfootb, h2hfootb, driver_device, 0, "Coleco", "Head to Head Football", MACHINE_SUPPORTS_SAVE )
@@ -5472,7 +5454,7 @@ CONS( 1979, starwbcp, starwbc, 0, starwbc, starwbc, driver_device, 0, "Ken
COMP( 1979, astro, 0, 0, astro, astro, driver_device, 0, "Kosmos", "Astro", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW )
-CONS( 1980, mdndclab, 0, 0, mdndclab, mdndclab, driver_device, 0, "Mattel", "Dungeons & Dragons - Computer Labyrinth Game", MACHINE_SUPPORTS_SAVE ) // ***
+CONS( 1980, mdndclab, 0, 0, mdndclab, mdndclab, driver_device, 0, "Mattel", "Dungeons & Dragons - Computer Labyrinth Game", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) // ***
CONS( 1977, comp4, 0, 0, comp4, comp4, driver_device, 0, "Milton Bradley", "Comp IV", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW )
CONS( 1978, simon, 0, 0, simon, simon, driver_device, 0, "Milton Bradley", "Simon (Rev. A)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
diff --git a/src/mame/drivers/pc9801.cpp b/src/mame/drivers/pc9801.cpp
index 81e799f64f6..0ea049f807a 100644
--- a/src/mame/drivers/pc9801.cpp
+++ b/src/mame/drivers/pc9801.cpp
@@ -398,6 +398,7 @@ Keyboard TX commands:
#include "machine/upd765.h"
#include "machine/upd1990a.h"
#include "machine/i8251.h"
+#include "machine/bankdev.h"
#include "bus/scsi/pc9801_sasi.h"
#include "bus/scsi/scsi.h"
@@ -465,6 +466,7 @@ public:
m_ext_gvram(*this, "ext_gvram"),
m_beeper(*this, "beeper"),
m_ram(*this, RAM_TAG),
+ m_ipl(*this, "ipl_bank"),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette"),
m_screen(*this, "screen")
@@ -494,6 +496,7 @@ public:
optional_shared_ptr<UINT32> m_ext_gvram;
required_device<beep_device> m_beeper;
optional_device<ram_device> m_ram;
+ optional_device<address_map_bank_device> m_ipl;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
required_device<screen_device> m_screen;
@@ -508,7 +511,6 @@ public:
};
emu_timer *m_vbirq;
- UINT8 *m_ipl_rom;
UINT8 *m_char_rom;
UINT8 *m_kanji_rom;
@@ -526,8 +528,6 @@ public:
UINT8 m_font_line;
UINT16 m_font_lr;
- UINT8 m_keyb_press;
-
UINT8 m_fdc_2dd_ctrl,m_fdc_2hd_ctrl;
UINT8 m_nmi_ff;
@@ -537,7 +537,6 @@ public:
/* PC9801RS specific */
UINT8 m_gate_a20; //A20 line
UINT8 m_access_ctrl; // DMA related
- UINT8 m_rom_bank;
UINT8 m_fdc_ctrl;
UINT8 m_ex_video_ff[128];
struct {
@@ -626,7 +625,6 @@ public:
int m_sasi_data_enable;
UINT8 m_sasi_ctrl;
- DECLARE_READ8_MEMBER(pc9801rs_ipl_r);
DECLARE_READ8_MEMBER(pc9801rs_knjram_r);
DECLARE_WRITE8_MEMBER(pc9801rs_knjram_w);
DECLARE_WRITE8_MEMBER(pc9801rs_bank_w);
@@ -646,8 +644,6 @@ public:
DECLARE_READ8_MEMBER(midi_r);
// DECLARE_READ8_MEMBER(winram_r);
// DECLARE_WRITE8_MEMBER(winram_w);
-// DECLARE_READ8_MEMBER(pc9801_ext_opna_r);
-// DECLARE_WRITE8_MEMBER(pc9801_ext_opna_w);
DECLARE_READ8_MEMBER(pic_r);
DECLARE_WRITE8_MEMBER(pic_w);
@@ -1001,7 +997,7 @@ WRITE8_MEMBER(pc9801_state::dmapg8_w)
WRITE8_MEMBER(pc9801_state::nmi_ctrl_w)
{
- m_nmi_ff = (offset & 2) >> 1;
+ m_nmi_ff = offset;
}
WRITE8_MEMBER(pc9801_state::vrtc_clear_w)
@@ -1735,15 +1731,12 @@ static ADDRESS_MAP_START( pc9801_io, AS_IO, 16, pc9801_state )
AM_IMPORT_FROM(pc9801_common_io)
ADDRESS_MAP_END
-
/*************************************
*
* PC-9801RS specific handlers (IA-32)
*
************************************/
-READ8_MEMBER(pc9801_state::pc9801rs_ipl_r) { return m_ipl_rom[(offset & 0x1ffff)+(m_rom_bank*0x20000)]; }
-
/* TODO: it's possible that the offset calculation is actually linear. */
/* TODO: having this non-linear makes the system to boot in BASIC for PC-9821. Perhaps it stores settings? How to change these? */
READ8_MEMBER(pc9801_state::pc9801rs_knjram_r)
@@ -1795,7 +1788,7 @@ WRITE8_MEMBER(pc9801_state::pc9801rs_bank_w)
{
if((data & 0xed) == 0x00)
{
- m_rom_bank = (data & 2) >> 1;
+ m_ipl->set_bank((data & 2) >> 1);
return;
}
}
@@ -2103,13 +2096,17 @@ WRITE16_MEMBER(pc9801_state::grcg_gvram0_w)
upd7220_grcg_w(space, offset | (m_vram_bank << 16), data, mem_mask);
}
+static ADDRESS_MAP_START( ipl_bank, AS_0, 16, pc9801_state )
+ AM_RANGE(0x00000, 0x2ffff) AM_ROM AM_REGION("ipl", 0)
+ADDRESS_MAP_END
+
static ADDRESS_MAP_START( pc9801ux_map, AS_PROGRAM, 16, pc9801_state )
AM_RANGE(0x000000, 0x09ffff) AM_RAMBANK("wram")
AM_RANGE(0x0a0000, 0x0a3fff) AM_READWRITE(tvram_r, tvram_w)
AM_RANGE(0x0a4000, 0x0a4fff) AM_READWRITE8(pc9801rs_knjram_r, pc9801rs_knjram_w, 0xffff)
AM_RANGE(0x0a8000, 0x0bffff) AM_READWRITE(grcg_gvram_r, grcg_gvram_w)
AM_RANGE(0x0e0000, 0x0e7fff) AM_READWRITE(grcg_gvram0_r,grcg_gvram0_w)
- AM_RANGE(0x0e0000, 0x0fffff) AM_READ8(pc9801rs_ipl_r, 0xffff)
+ AM_RANGE(0x0e8000, 0x0fffff) AM_DEVICE("ipl_bank", address_map_bank_device, amap16)
ADDRESS_MAP_END
static ADDRESS_MAP_START( pc9801ux_io, AS_IO, 16, pc9801_state )
@@ -2134,8 +2131,8 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( pc9801rs_map, AS_PROGRAM, 16, pc9801_state )
// AM_RANGE(0x0d8000, 0x0d9fff) AM_ROM AM_REGION("ide",0)
AM_RANGE(0x0da000, 0x0dbfff) AM_RAM // ide ram
- AM_RANGE(0xee0000, 0xefffff) AM_READ8(pc9801rs_ipl_r, 0xffff)
- AM_RANGE(0xfe0000, 0xffffff) AM_READ8(pc9801rs_ipl_r, 0xffff)
+ AM_RANGE(0xee8000, 0xefffff) AM_DEVICE("ipl_bank", address_map_bank_device, amap16)
+ AM_RANGE(0xfe8000, 0xffffff) AM_DEVICE("ipl_bank", address_map_bank_device, amap16)
AM_IMPORT_FROM(pc9801ux_map)
ADDRESS_MAP_END
@@ -2343,10 +2340,10 @@ static ADDRESS_MAP_START( pc9821_map, AS_PROGRAM, 32, pc9801_state )
// AM_RANGE(0x000d8000, 0x000d9fff) AM_ROM AM_REGION("ide",0)
AM_RANGE(0x000da000, 0x000dbfff) AM_RAM // ide ram
AM_RANGE(0x000e0000, 0x000e7fff) AM_READWRITE16(grcg_gvram0_r,grcg_gvram0_w, 0xffffffff)
- AM_RANGE(0x000e0000, 0x000fffff) AM_READ8(pc9801rs_ipl_r, 0xffffffff)
+ AM_RANGE(0x000e8000, 0x000fffff) AM_DEVICE16("ipl_bank", address_map_bank_device, amap16, 0xffffffff)
AM_RANGE(0x00f00000, 0x00f9ffff) AM_RAM AM_SHARE("ext_gvram")
- AM_RANGE(0xffee0000, 0xffefffff) AM_READ8(pc9801rs_ipl_r, 0xffffffff)
- AM_RANGE(0xfffe0000, 0xffffffff) AM_READ8(pc9801rs_ipl_r, 0xffffffff)
+ AM_RANGE(0xffee8000, 0xffefffff) AM_DEVICE16("ipl_bank", address_map_bank_device, amap16, 0xffffffff)
+ AM_RANGE(0xfffe8000, 0xffffffff) AM_DEVICE16("ipl_bank", address_map_bank_device, amap16, 0xffffffff)
ADDRESS_MAP_END
static ADDRESS_MAP_START( pc9821_io, AS_IO, 32, pc9801_state )
@@ -2435,7 +2432,7 @@ static ADDRESS_MAP_START( pc9821_io, AS_IO, 32, pc9801_state )
ADDRESS_MAP_END
static ADDRESS_MAP_START( upd7220_1_map, AS_0, 16, pc9801_state )
- AM_RANGE(0x00000, 0x3ffff) AM_RAM AM_SHARE("video_ram_1")
+ AM_RANGE(0x00000, 0x03fff) AM_RAM AM_SHARE("video_ram_1")
ADDRESS_MAP_END
static ADDRESS_MAP_START( upd7220_2_map, AS_0, 16, pc9801_state )
@@ -2965,7 +2962,6 @@ MACHINE_START_MEMBER(pc9801_state,pc9801_common)
m_rtc->cs_w(1);
m_rtc->oe_w(1);
- m_ipl_rom = memregion("ipl")->base();
m_vbirq = timer_alloc(TIMER_VBIRQ);
save_item(NAME(m_sasi_data));
@@ -3075,13 +3071,10 @@ MACHINE_RESET_MEMBER(pc9801_state,pc9801rs)
MACHINE_RESET_CALL_MEMBER(pc9801_common);
m_gate_a20 = 0;
- m_rom_bank = 0;
m_fdc_ctrl = 3;
m_access_ctrl = 0;
m_ide_sel = 0;
m_ide1_irq = m_ide2_irq = false;
- m_keyb_press = 0xff; // temp kludge, for PC-9821 booting
-// m_has_opna = ioport("SOUND_CONFIG")->read() & 1;
m_maincpu->set_input_line(INPUT_LINE_A20, m_gate_a20);
if(memregion("ide"))
@@ -3306,15 +3299,6 @@ static MACHINE_CONFIG_START( pc9801, pc9801_state )
MCFG_PALETTE_INIT_OWNER(pc9801_state,pc9801)
MACHINE_CONFIG_END
-static MACHINE_CONFIG_DERIVED( pc9801vm, pc9801 )
- MCFG_CPU_REPLACE("maincpu",V30,10000000)
- MCFG_CPU_PROGRAM_MAP(pc9801ux_map)
- MCFG_CPU_IO_MAP(pc9801ux_io)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", pc9801_state, vrtc_irq)
-
- MCFG_MACHINE_START_OVERRIDE(pc9801_state,pc9801_common)
- MCFG_MACHINE_RESET_OVERRIDE(pc9801_state,pc9801_common)
-MACHINE_CONFIG_END
static MACHINE_CONFIG_START( pc9801rs, pc9801_state )
MCFG_CPU_ADD("maincpu", I386SX, MAIN_CLOCK_X1*8) // unknown clock.
@@ -3325,6 +3309,13 @@ static MACHINE_CONFIG_START( pc9801rs, pc9801_state )
MCFG_FRAGMENT_ADD(pc9801_common)
+ MCFG_DEVICE_ADD("ipl_bank", ADDRESS_MAP_BANK, 0)
+ MCFG_DEVICE_PROGRAM_MAP(ipl_bank)
+ MCFG_ADDRESS_MAP_BANK_ENDIANNESS(ENDIANNESS_LITTLE)
+ MCFG_ADDRESS_MAP_BANK_DATABUS_WIDTH(16)
+ MCFG_ADDRESS_MAP_BANK_ADDRBUS_WIDTH(18)
+ MCFG_ADDRESS_MAP_BANK_STRIDE(0x18000)
+
MCFG_MACHINE_START_OVERRIDE(pc9801_state,pc9801rs)
MCFG_MACHINE_RESET_OVERRIDE(pc9801_state,pc9801rs)
@@ -3345,6 +3336,20 @@ static MACHINE_CONFIG_START( pc9801rs, pc9801_state )
MCFG_PALETTE_INIT_OWNER(pc9801_state,pc9801)
MACHINE_CONFIG_END
+static MACHINE_CONFIG_DERIVED( pc9801vm, pc9801rs )
+ MCFG_CPU_REPLACE("maincpu",V30,10000000)
+ MCFG_CPU_PROGRAM_MAP(pc9801ux_map)
+ MCFG_CPU_IO_MAP(pc9801ux_io)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", pc9801_state, vrtc_irq)
+
+ MCFG_DEVICE_MODIFY(RAM_TAG)
+ MCFG_RAM_DEFAULT_SIZE("640K")
+ MCFG_RAM_EXTRA_OPTIONS("640K")
+
+ MCFG_MACHINE_START_OVERRIDE(pc9801_state,pc9801_common)
+ MCFG_MACHINE_RESET_OVERRIDE(pc9801_state,pc9801_common)
+MACHINE_CONFIG_END
+
static MACHINE_CONFIG_DERIVED( pc9801ux, pc9801rs )
MCFG_CPU_REPLACE("maincpu",I80286,10000000)
MCFG_CPU_PROGRAM_MAP(pc9801ux_map)
@@ -3468,9 +3473,9 @@ UX - 80286 10 + V30 8
*/
ROM_START( pc9801ux )
- ROM_REGION( 0x60000, "ipl", ROMREGION_ERASEFF )
- ROM_LOAD( "itf_ux.rom", 0x18000, 0x08000, CRC(c7942563) SHA1(61bb210d64c7264be939b11df1e9cd14ffeee3c9) )
- ROM_LOAD( "bios_ux.rom", 0x28000, 0x18000, BAD_DUMP CRC(97375ca2) SHA1(bfe458f671d90692104d0640730972ca8dc0a100) )
+ ROM_REGION( 0x30000, "ipl", ROMREGION_ERASEFF )
+ ROM_LOAD( "itf_ux.rom", 0x10000, 0x08000, CRC(c7942563) SHA1(61bb210d64c7264be939b11df1e9cd14ffeee3c9) )
+ ROM_LOAD( "bios_ux.rom", 0x18000, 0x18000, BAD_DUMP CRC(97375ca2) SHA1(bfe458f671d90692104d0640730972ca8dc0a100) )
ROM_REGION( 0x10000, "sound_bios", 0 )
ROM_LOAD( "sound_ux.rom", 0x0000, 0x4000, CRC(80eabfde) SHA1(e09c54152c8093e1724842c711aed6417169db23) )
@@ -3489,11 +3494,11 @@ The bios is from a 386 model not an RX
*/
ROM_START( pc9801rx )
- ROM_REGION( 0x60000, "ipl", ROMREGION_ERASEFF )
- ROM_LOAD( "itf_rs.rom", 0x18000, 0x08000, BAD_DUMP CRC(c1815325) SHA1(a2fb11c000ed7c976520622cfb7940ed6ddc904e) )
- ROM_LOAD( "bios_rx.rom", 0x28000, 0x018000, BAD_DUMP CRC(0a682b93) SHA1(76a7360502fa0296ea93b4c537174610a834d367) )
+ ROM_REGION( 0x30000, "ipl", ROMREGION_ERASEFF )
+ ROM_LOAD( "itf_rs.rom", 0x10000, 0x08000, BAD_DUMP CRC(c1815325) SHA1(a2fb11c000ed7c976520622cfb7940ed6ddc904e) )
+ ROM_LOAD( "bios_rx.rom", 0x18000, 0x18000, BAD_DUMP CRC(0a682b93) SHA1(76a7360502fa0296ea93b4c537174610a834d367) )
// fix csum
- ROM_FILL(0x3fffe, 1, 0x0d)
+ ROM_FILL(0x2fffe, 1, 0x0d)
ROM_REGION( 0x10000, "sound_bios", 0 )
ROM_LOAD( "sound_rx.rom", 0x000000, 0x004000, CRC(fe9f57f2) SHA1(d5dbc4fea3b8367024d363f5351baecd6adcd8ef) )
@@ -3512,9 +3517,9 @@ RS - 386SX 16
*/
ROM_START( pc9801rs )
- ROM_REGION( 0x60000, "ipl", ROMREGION_ERASEFF )
- ROM_LOAD( "itf_rs.rom", 0x18000, 0x08000, CRC(c1815325) SHA1(a2fb11c000ed7c976520622cfb7940ed6ddc904e) )
- ROM_LOAD( "bios_rs.rom", 0x28000, 0x18000, BAD_DUMP CRC(315d2703) SHA1(4f208d1dbb68373080d23bff5636bb6b71eb7565) )
+ ROM_REGION( 0x30000, "ipl", ROMREGION_ERASEFF )
+ ROM_LOAD( "itf_rs.rom", 0x10000, 0x08000, CRC(c1815325) SHA1(a2fb11c000ed7c976520622cfb7940ed6ddc904e) )
+ ROM_LOAD( "bios_rs.rom", 0x18000, 0x18000, BAD_DUMP CRC(315d2703) SHA1(4f208d1dbb68373080d23bff5636bb6b71eb7565) )
/* following is an emulator memory dump, should be checked and nuked */
ROM_REGION( 0x100000, "memory", 0 )
@@ -3544,12 +3549,12 @@ Yet another franken-dump done with a lame program, shrug
*/
ROM_START( pc9801bx2 )
- ROM_REGION( 0x60000, "ipl", ROMREGION_ERASEFF )
+ ROM_REGION( 0x30000, "ipl", ROMREGION_ERASEFF )
ROM_LOAD( "pc98bank0.bin", 0x00000, 0x08000, BAD_DUMP CRC(bfd100cc) SHA1(cf8e6a5679cca7761481abef0ba4b35ead39efdb) )
ROM_LOAD( "pc98bank1.bin", 0x00000, 0x08000, BAD_DUMP CRC(d0562af8) SHA1(2c4fd27eb598f4b8a00f3e86941ba27007d58e47) )
ROM_LOAD( "pc98bank2.bin", 0x00000, 0x08000, BAD_DUMP CRC(12818a14) SHA1(9c31e8ac85d78fa779d6bbc2095557065294ec09) )
ROM_LOAD( "pc98bank3.bin", 0x00000, 0x08000, BAD_DUMP CRC(d0bda44e) SHA1(c1022a3b2be4d2a1e43914df9e4605254e5f99d5) )
- ROM_LOAD( "pc98bank4.bin", 0x18000, 0x08000, BAD_DUMP CRC(be8092f4) SHA1(12c8a166b8c6ebbef85568b67e1f098562883365) )
+ ROM_LOAD( "pc98bank4.bin", 0x10000, 0x08000, BAD_DUMP CRC(be8092f4) SHA1(12c8a166b8c6ebbef85568b67e1f098562883365) )
ROM_LOAD( "pc98bank5.bin", 0x00000, 0x08000, BAD_DUMP CRC(4e32081e) SHA1(e23571273b7cad01aa116cb7414c5115a1093f85) )
ROM_LOAD( "pc98bank6.bin", 0x00000, 0x08000, BAD_DUMP CRC(f878c160) SHA1(cad47f09075ffe4f7b51bb937c9f716c709d4596) )
ROM_LOAD( "pc98bank7.bin", 0x00000, 0x08000, BAD_DUMP CRC(1bd6537b) SHA1(ff9ee1c976a12b87851635ce8991ac4ad607675b) )
@@ -3571,9 +3576,9 @@ TODO: this ISN'T a real VM model!
*/
ROM_START( pc9801vm )
- ROM_REGION( 0x60000, "ipl", ROMREGION_ERASEFF )
- ROM_LOAD( "itf_ux.rom", 0x18000, 0x08000, BAD_DUMP CRC(c7942563) SHA1(61bb210d64c7264be939b11df1e9cd14ffeee3c9) )
- ROM_LOAD( "bios_vm.rom", 0x28000, 0x018000, CRC(2e2d7cee) SHA1(159549f845dc70bf61955f9469d2281a0131b47f) )
+ ROM_REGION( 0x30000, "ipl", ROMREGION_ERASEFF )
+ ROM_LOAD( "itf_ux.rom", 0x10000, 0x08000, BAD_DUMP CRC(c7942563) SHA1(61bb210d64c7264be939b11df1e9cd14ffeee3c9) )
+ ROM_LOAD( "bios_vm.rom", 0x18000, 0x18000, CRC(2e2d7cee) SHA1(159549f845dc70bf61955f9469d2281a0131b47f) )
ROM_REGION( 0x10000, "sound_bios", 0 )
ROM_LOAD( "sound_vm.rom", 0x000000, 0x004000, CRC(fe9f57f2) SHA1(d5dbc4fea3b8367024d363f5351baecd6adcd8ef) )
@@ -3592,13 +3597,13 @@ ROM_END
*/
ROM_START( pc9821 )
- ROM_REGION( 0x60000, "ipl", ROMREGION_ERASEFF )
- ROM_LOAD( "itf.rom", 0x18000, 0x08000, CRC(dd4c7bb8) SHA1(cf3aa193df2722899066246bccbed03f2e79a74a) )
- ROM_LOAD( "bios.rom", 0x28000, 0x18000, BAD_DUMP CRC(34a19a59) SHA1(2e92346727b0355bc1ec9a7ded1b444a4917f2b9) )
- ROM_FILL(0x34c40, 4, 0) // hide the _32_ marker until we have a 32-bit clean IDE bios otherwise windows tries to
+ ROM_REGION( 0x30000, "ipl", ROMREGION_ERASEFF )
+ ROM_LOAD( "itf.rom", 0x10000, 0x08000, CRC(dd4c7bb8) SHA1(cf3aa193df2722899066246bccbed03f2e79a74a) )
+ ROM_LOAD( "bios.rom", 0x18000, 0x18000, BAD_DUMP CRC(34a19a59) SHA1(2e92346727b0355bc1ec9a7ded1b444a4917f2b9) )
+ ROM_FILL(0x24c40, 4, 0) // hide the _32_ marker until we have a 32-bit clean IDE bios otherwise windows tries to
// make a 32-bit call into 16-bit code
- ROM_FILL(0x37ffe, 1, 0x92)
- ROM_FILL(0x37fff, 1, 0xd7)
+ ROM_FILL(0x27ffe, 1, 0x92)
+ ROM_FILL(0x27fff, 1, 0xd7)
ROM_REGION( 0x10000, "sound_bios", 0 )
ROM_LOAD( "sound.rom", 0x0000, 0x4000, CRC(a21ef796) SHA1(34137c287c39c44300b04ee97c1e6459bb826b60) )
@@ -3615,9 +3620,9 @@ As - 80486DX 33
*/
ROM_START( pc9821as )
- ROM_REGION( 0x60000, "ipl", ROMREGION_ERASEFF )
- ROM_LOAD( "itf.rom", 0x18000, 0x08000, BAD_DUMP CRC(dd4c7bb8) SHA1(cf3aa193df2722899066246bccbed03f2e79a74a) )
- ROM_LOAD( "bios_as.rom", 0x28000, 0x018000, BAD_DUMP CRC(0a682b93) SHA1(76a7360502fa0296ea93b4c537174610a834d367) )
+ ROM_REGION( 0x30000, "ipl", ROMREGION_ERASEFF )
+ ROM_LOAD( "itf.rom", 0x10000, 0x08000, BAD_DUMP CRC(dd4c7bb8) SHA1(cf3aa193df2722899066246bccbed03f2e79a74a) )
+ ROM_LOAD( "bios_as.rom", 0x18000, 0x18000, BAD_DUMP CRC(0a682b93) SHA1(76a7360502fa0296ea93b4c537174610a834d367) )
ROM_REGION( 0x10000, "sound_bios", 0 )
ROM_LOAD( "sound_as.rom", 0x000000, 0x004000, CRC(fe9f57f2) SHA1(d5dbc4fea3b8367024d363f5351baecd6adcd8ef) )
@@ -3647,9 +3652,9 @@ ROM_START( pc9821ap2 )
ROM_SYSTEM_BIOS(1, "phd0102", "PHD0102")
ROMX_LOAD( "phd0102.rom", 0x000000, 0x80000, CRC(3036774c) SHA1(59856a348f156adf5eca06326f967aca54ff871c), ROM_BIOS(2) )
- ROM_REGION( 0x60000, "ipl", ROMREGION_ERASEFF ) // TODO: identify ROM banks
- ROM_COPY( "biosrom", 0x20000, 0x18000, 0x08000 )
- ROM_COPY( "biosrom", 0x30000, 0x28000, 0x18000 )
+ ROM_REGION( 0x30000, "ipl", ROMREGION_ERASEFF ) // TODO: identify ROM banks
+ ROM_COPY( "biosrom", 0x20000, 0x10000, 0x08000 )
+ ROM_COPY( "biosrom", 0x30000, 0x18000, 0x18000 )
ROM_REGION( 0x10000, "sound_bios", 0 )
ROM_LOAD( "sound.rom", 0x0000, 0x4000, CRC(a21ef796) SHA1(34137c287c39c44300b04ee97c1e6459bb826b60) )
@@ -3667,9 +3672,9 @@ ROM_END
*/
ROM_START( pc9821ne )
- ROM_REGION( 0x60000, "ipl", ROMREGION_ERASEFF )
- ROM_LOAD( "itf.rom", 0x18000, 0x08000, CRC(dd4c7bb8) SHA1(cf3aa193df2722899066246bccbed03f2e79a74a) )
- ROM_LOAD( "bios_ne.rom", 0x28000, 0x18000, BAD_DUMP CRC(2ae070c4) SHA1(d7963942042bfd84ed5fc9b7ba8f1c327c094172) )
+ ROM_REGION( 0x30000, "ipl", ROMREGION_ERASEFF )
+ ROM_LOAD( "itf.rom", 0x10000, 0x08000, CRC(dd4c7bb8) SHA1(cf3aa193df2722899066246bccbed03f2e79a74a) )
+ ROM_LOAD( "bios_ne.rom", 0x18000, 0x18000, BAD_DUMP CRC(2ae070c4) SHA1(d7963942042bfd84ed5fc9b7ba8f1c327c094172) )
ROM_REGION( 0x10000, "sound_bios", 0 )
ROM_LOAD( "sound_ne.rom", 0x0000, 0x4000, CRC(a21ef796) SHA1(34137c287c39c44300b04ee97c1e6459bb826b60) )
@@ -3686,9 +3691,9 @@ Epson PC-486MU - 486 based, unknown clock
*/
ROM_START( pc486mu )
- ROM_REGION( 0x60000, "ipl", ROMREGION_ERASEFF )
- ROM_LOAD( "bios_486mu.rom", 0x08000, 0x18000, BAD_DUMP CRC(57b5d701) SHA1(15029800842e93e07615b0fd91fb9f2bfe3e3c24))
- ROM_RELOAD( 0x28000, 0x18000 ) // missing rom?
+ ROM_REGION( 0x30000, "ipl", ROMREGION_ERASEFF )
+ ROM_LOAD( "bios_486mu.rom", 0x00000, 0x18000, BAD_DUMP CRC(57b5d701) SHA1(15029800842e93e07615b0fd91fb9f2bfe3e3c24))
+ ROM_RELOAD( 0x18000, 0x18000 ) // missing rom?
ROM_REGION( 0x10000, "sound_bios", 0 )
ROM_LOAD( "sound_486mu.rom", 0x0000, 0x4000, CRC(6cdfa793) SHA1(4b8250f9b9db66548b79f961d61010558d6d6e1c))
@@ -3705,9 +3710,9 @@ ROM_END
*/
ROM_START( pc9821ce2 )
- ROM_REGION( 0x60000, "ipl", ROMREGION_ERASEFF )
- ROM_LOAD( "itf_ce2.rom", 0x18000, 0x08000, CRC(273e9e88) SHA1(9bca7d5116788776ed0f297bccb4dfc485379b41) )
- ROM_LOAD( "bios_ce2.rom", 0x28000, 0x018000, BAD_DUMP CRC(76affd90) SHA1(910fae6763c0cd59b3957b6cde479c72e21f33c1) )
+ ROM_REGION( 0x30000, "ipl", ROMREGION_ERASEFF )
+ ROM_LOAD( "itf_ce2.rom", 0x10000, 0x08000, CRC(273e9e88) SHA1(9bca7d5116788776ed0f297bccb4dfc485379b41) )
+ ROM_LOAD( "bios_ce2.rom", 0x18000, 0x018000, BAD_DUMP CRC(76affd90) SHA1(910fae6763c0cd59b3957b6cde479c72e21f33c1) )
ROM_REGION( 0x10000, "sound_bios", 0 )
ROM_LOAD( "sound_ce2.rom", 0x000000, 0x004000, CRC(a21ef796) SHA1(34137c287c39c44300b04ee97c1e6459bb826b60) )
@@ -3724,9 +3729,9 @@ ROM_END
*/
ROM_START( pc9821xs )
- ROM_REGION( 0x60000, "ipl", ROMREGION_ERASEFF )
- ROM_LOAD( "itf.rom", 0x18000, 0x08000, BAD_DUMP CRC(dd4c7bb8) SHA1(cf3aa193df2722899066246bccbed03f2e79a74a) )
- ROM_LOAD( "bios_xs.rom", 0x28000, 0x018000, BAD_DUMP CRC(0a682b93) SHA1(76a7360502fa0296ea93b4c537174610a834d367) )
+ ROM_REGION( 0x30000, "ipl", ROMREGION_ERASEFF )
+ ROM_LOAD( "itf.rom", 0x10000, 0x08000, BAD_DUMP CRC(dd4c7bb8) SHA1(cf3aa193df2722899066246bccbed03f2e79a74a) )
+ ROM_LOAD( "bios_xs.rom", 0x18000, 0x018000, BAD_DUMP CRC(0a682b93) SHA1(76a7360502fa0296ea93b4c537174610a834d367) )
ROM_REGION( 0x10000, "sound_bios", 0 )
ROM_LOAD( "sound_xs.rom", 0x000000, 0x004000, CRC(80eabfde) SHA1(e09c54152c8093e1724842c711aed6417169db23) )
@@ -3744,9 +3749,9 @@ ROM_END
*/
ROM_START( pc9821v13 )
- ROM_REGION( 0x60000, "ipl", ROMREGION_ERASEFF )
- ROM_LOAD( "itf.rom", 0x18000, 0x08000, CRC(dd4c7bb8) SHA1(cf3aa193df2722899066246bccbed03f2e79a74a) )
- ROM_LOAD( "bios_v13.rom", 0x28000, 0x18000, BAD_DUMP CRC(0a682b93) SHA1(76a7360502fa0296ea93b4c537174610a834d367) )
+ ROM_REGION( 0x30000, "ipl", ROMREGION_ERASEFF )
+ ROM_LOAD( "itf.rom", 0x10000, 0x08000, CRC(dd4c7bb8) SHA1(cf3aa193df2722899066246bccbed03f2e79a74a) )
+ ROM_LOAD( "bios_v13.rom", 0x18000, 0x18000, BAD_DUMP CRC(0a682b93) SHA1(76a7360502fa0296ea93b4c537174610a834d367) )
ROM_REGION( 0x10000, "sound_bios", 0 )
ROM_LOAD( "sound_v13.rom", 0x0000, 0x4000, CRC(a21ef796) SHA1(34137c287c39c44300b04ee97c1e6459bb826b60) )
@@ -3763,9 +3768,9 @@ ROM_END
*/
ROM_START( pc9821v20 )
- ROM_REGION( 0x60000, "ipl", ROMREGION_ERASEFF )
- ROM_LOAD( "itf_v20.rom", 0x38000, 0x08000, CRC(10e52302) SHA1(f95b8648e3f5a23e507a9fbda8ab2e317d8e5151) )
- ROM_LOAD( "bios_v20.rom", 0x08000, 0x018000, BAD_DUMP CRC(d5d1f13b) SHA1(bf44b5f4e138e036f1b848d6616fbd41b5549764) )
+ ROM_REGION( 0x30000, "ipl", ROMREGION_ERASEFF )
+ ROM_LOAD( "itf_v20.rom", 0x10000, 0x08000, CRC(10e52302) SHA1(f95b8648e3f5a23e507a9fbda8ab2e317d8e5151) )
+ ROM_LOAD( "bios_v20.rom", 0x18000, 0x18000, BAD_DUMP CRC(d5d1f13b) SHA1(bf44b5f4e138e036f1b848d6616fbd41b5549764) )
ROM_REGION( 0x10000, "sound_bios", 0 )
ROM_LOAD( "sound_v20.rom", 0x000000, 0x004000, CRC(80eabfde) SHA1(e09c54152c8093e1724842c711aed6417169db23) )
diff --git a/src/mame/drivers/viper.cpp b/src/mame/drivers/viper.cpp
index e71413b1f1d..a0ab486f11e 100644
--- a/src/mame/drivers/viper.cpp
+++ b/src/mame/drivers/viper.cpp
@@ -2449,7 +2449,7 @@ ROM_START(p911ea)
ROM_LOAD("a00eaa_nvram.u39", 0x000000, 0x2000, CRC(4f3497b6) SHA1(3045c54f98dff92cdf3a1fc0cd4c76ba82d632d7) )
DISK_REGION( "ata:0:hdd:image" )
- DISK_IMAGE( "a00eaa02", 0, SHA1(fa057bf17f4c0fb9b9a09b820ff7a101e44fab7d) )
+ DISK_IMAGE( "a00eaa02_ea", 0, SHA1(fa057bf17f4c0fb9b9a09b820ff7a101e44fab7d) )
ROM_END
ROM_START(p911j) //*
@@ -2684,9 +2684,10 @@ ROM_START(wcombatu) //*
DISK_REGION( "ata:0:hdd:image" )
// CHD image provided had evidence of being altered by Windows, probably was put in a Windows machine without write protection hardware (bad idea)
// label was the same as this, so this should be a clean and correct version.
- DISK_IMAGE( "c22d02", 0, SHA1(69a24c9e36b073021d55bec27d89fcc0254a60cc) ) // chs 978,8,3
+ DISK_IMAGE( "c22d02", 0, SHA1(69a24c9e36b073021d55bec27d89fcc0254a60cc) ) // chs 978,8,32
ROM_END
+/* This CF card has sticker C22A02 */
ROM_START(wcombatj) //*
VIPER_BIOS
@@ -2697,7 +2698,7 @@ ROM_START(wcombatj) //*
ROM_LOAD("wcombatj_nvram.u39", 0x00000, 0x2000, CRC(bd8a6640) SHA1(2d409197ef3fb07d984d27fa943f29c7a711d715))
DISK_REGION( "ata:0:hdd:image" )
- DISK_IMAGE( "c22a02", 0, BAD_DUMP SHA1(b607fb2ddfd0bd552b7a736cea4ac1aa3ea021bd) )
+ DISK_IMAGE( "c22a02", 0, SHA1(7200c7c436491fd8027d6d7139a80ee3b984697b) ) // chs 978,8,32
ROM_END
ROM_START(xtrial) //*
@@ -2718,7 +2719,7 @@ ROM_END
/*
Mahjong Fight Club (Konami Viper h/w)
Konami, 2002
-
+78,8,3)
PCB number - GM941-PWB(A)C Copyright 1999 Konami Made In Japan
Mahjong Fight Club is a multi player Mahjong battle game for up to 8 players. A
diff --git a/src/mame/layout/amaztron.lay b/src/mame/layout/amaztron.lay
index 8b31f239489..947ff563f7f 100644
--- a/src/mame/layout/amaztron.lay
+++ b/src/mame/layout/amaztron.lay
@@ -3,31 +3,252 @@
<!-- define elements -->
+ <element name="static_black"><rect><color red="0" green="0" blue="0" /></rect></element>
+ <element name="static_blue"><rect><color red="0.2" green="0.5" blue="0.8" /></rect></element>
+ <element name="static_green"><rect><color red="0.2" green="0.8" blue="0.5" /></rect></element>
+ <element name="static_white"><rect><color red="0.88" green="0.88" blue="0.88" /></rect></element>
+
+ <element name="hl" defstate="0">
+ <text string=" ">
+ <bounds x="0.0" y="0.0" width="1.0" height="1.0" />
+ <color red="0.0" green="0.0" blue="0.0" />
+ </text>
+ <disk state="1">
+ <bounds x="0.07" y="0.07" width="0.86" height="0.86" />
+ <color red="1.0" green="1.0" blue="1.0" />
+ </disk>
+ </element>
+
<element name="digit" defstate="0">
<led7seg><color red="1.0" green="0.2" blue="0.2" /></led7seg>
</element>
- <element name="lamp_red" defstate="0">
+ <element name="ledr" defstate="0">
<disk state="0"><color red="0.2" green="0.04" blue="0.04" /></disk>
<disk state="1"><color red="1.0" green="0.2" blue="0.2" /></disk>
</element>
- <element name="lamp_green" defstate="0">
+ <element name="ledg" defstate="0">
<disk state="0"><color red="0.04" green="0.2" blue="0.04" /></disk>
<disk state="1"><color red="0.2" green="1.0" blue="0.2" /></disk>
</element>
+ <!-- note: some boards have blue text, the US/Canada one has black text -->
+ <element name="text_1">
+ <rect><color red="0.88" green="0.88" blue="0.88" /></rect>
+ <text string="1"><color red="0.03" green="0.03" blue="0.03" /></text>
+ </element>
+ <element name="text_2">
+ <rect><color red="0.88" green="0.88" blue="0.88" /></rect>
+ <text string="2"><color red="0.03" green="0.03" blue="0.03" /></text>
+ </element>
+ <element name="text_3">
+ <rect><color red="0.88" green="0.88" blue="0.88" /></rect>
+ <text string="3"><color red="0.03" green="0.03" blue="0.03" /></text>
+ </element>
+ <element name="text_4">
+ <rect><color red="0.88" green="0.88" blue="0.88" /></rect>
+ <text string="4"><color red="0.03" green="0.03" blue="0.03" /></text>
+ </element>
+ <element name="text_5">
+ <rect><color red="0.88" green="0.88" blue="0.88" /></rect>
+ <text string="5"><color red="0.03" green="0.03" blue="0.03" /></text>
+ </element>
+ <element name="text_6">
+ <rect><color red="0.88" green="0.88" blue="0.88" /></rect>
+ <text string="6"><color red="0.03" green="0.03" blue="0.03" /></text>
+ </element>
+ <element name="text_7">
+ <rect><color red="0.88" green="0.88" blue="0.88" /></rect>
+ <text string="7"><color red="0.03" green="0.03" blue="0.03" /></text>
+ </element>
+ <element name="text_8">
+ <rect><color red="0.88" green="0.88" blue="0.88" /></rect>
+ <text string="8"><color red="0.03" green="0.03" blue="0.03" /></text>
+ </element>
+ <element name="text_9">
+ <rect><color red="0.88" green="0.88" blue="0.88" /></rect>
+ <text string="9"><color red="0.03" green="0.03" blue="0.03" /></text>
+ </element>
+ <element name="text_10">
+ <rect><color red="0.88" green="0.88" blue="0.88" /></rect>
+ <text string="10"><color red="0.03" green="0.03" blue="0.03" /></text>
+ </element>
+ <element name="text_11">
+ <rect><color red="0.88" green="0.88" blue="0.88" /></rect>
+ <text string="11"><color red="0.03" green="0.03" blue="0.03" /></text>
+ </element>
+ <element name="text_12">
+ <rect><color red="0.88" green="0.88" blue="0.88" /></rect>
+ <text string="12"><color red="0.03" green="0.03" blue="0.03" /></text>
+ </element>
+ <element name="text_13">
+ <rect><color red="0.88" green="0.88" blue="0.88" /></rect>
+ <text string="13"><color red="0.03" green="0.03" blue="0.03" /></text>
+ </element>
+ <element name="text_14">
+ <rect><color red="0.88" green="0.88" blue="0.88" /></rect>
+ <text string="14"><color red="0.03" green="0.03" blue="0.03" /></text>
+ </element>
+ <element name="text_15">
+ <rect><color red="0.88" green="0.88" blue="0.88" /></rect>
+ <text string="15"><color red="0.03" green="0.03" blue="0.03" /></text>
+ </element>
+ <element name="text_16">
+ <rect><color red="0.88" green="0.88" blue="0.88" /></rect>
+ <text string="16"><color red="0.03" green="0.03" blue="0.03" /></text>
+ </element>
+ <element name="text_17">
+ <rect><color red="0.88" green="0.88" blue="0.88" /></rect>
+ <text string="17"><color red="0.03" green="0.03" blue="0.03" /></text>
+ </element>
+ <element name="text_18">
+ <rect><color red="0.88" green="0.88" blue="0.88" /></rect>
+ <text string="18"><color red="0.03" green="0.03" blue="0.03" /></text>
+ </element>
+ <element name="text_19">
+ <rect><color red="0.88" green="0.88" blue="0.88" /></rect>
+ <text string="19"><color red="0.03" green="0.03" blue="0.03" /></text>
+ </element>
+ <element name="text_20">
+ <rect><color red="0.88" green="0.88" blue="0.88" /></rect>
+ <text string="20"><color red="0.03" green="0.03" blue="0.03" /></text>
+ </element>
+ <element name="text_21">
+ <rect><color red="0.88" green="0.88" blue="0.88" /></rect>
+ <text string="21"><color red="0.03" green="0.03" blue="0.03" /></text>
+ </element>
+ <element name="text_22">
+ <rect><color red="0.88" green="0.88" blue="0.88" /></rect>
+ <text string="22"><color red="0.03" green="0.03" blue="0.03" /></text>
+ </element>
+ <element name="text_23">
+ <rect><color red="0.88" green="0.88" blue="0.88" /></rect>
+ <text string="23"><color red="0.03" green="0.03" blue="0.03" /></text>
+ </element>
+ <element name="text_24">
+ <rect><color red="0.88" green="0.88" blue="0.88" /></rect>
+ <text string="24"><color red="0.03" green="0.03" blue="0.03" /></text>
+ </element>
+ <element name="text_25">
+ <rect><color red="0.88" green="0.88" blue="0.88" /></rect>
+ <text string="25"><color red="0.03" green="0.03" blue="0.03" /></text>
+ </element>
+
+ <element name="text_game"><text string="GAME"><color red="0.9" green="0.9" blue="0.9" /></text></element>
+ <element name="text_select"><text string="SELECT"><color red="0.9" green="0.9" blue="0.9" /></text></element>
+ <element name="text_start"><text string="START"><color red="0.9" green="0.9" blue="0.9" /></text></element>
<!-- build screen -->
<view name="Internal Layout">
- <bounds left="0" right="50" top="0" bottom="15" />
+ <bounds left="1" right="57" top="1" bottom="93" />
+ <bezel element="static_blue">
+ <bounds left="0" right="58" top="0" bottom="58" />
+ </bezel>
+
+ <!-- playing board buttons -->
+
+ <bezel element="static_white"><bounds x="5" y="5" width="8" height="8" /></bezel>
+ <bezel element="static_white"><bounds x="15" y="5" width="8" height="8" /></bezel>
+ <bezel element="static_white"><bounds x="25" y="5" width="8" height="8" /></bezel>
+ <bezel element="static_white"><bounds x="35" y="5" width="8" height="8" /></bezel>
+ <bezel element="static_white"><bounds x="45" y="5" width="8" height="8" /></bezel>
+ <bezel element="static_white"><bounds x="5" y="15" width="8" height="8" /></bezel>
+ <bezel element="static_white"><bounds x="15" y="15" width="8" height="8" /></bezel>
+ <bezel element="static_white"><bounds x="25" y="15" width="8" height="8" /></bezel>
+ <bezel element="static_white"><bounds x="35" y="15" width="8" height="8" /></bezel>
+ <bezel element="static_white"><bounds x="45" y="15" width="8" height="8" /></bezel>
+ <bezel element="static_white"><bounds x="5" y="25" width="8" height="8" /></bezel>
+ <bezel element="static_white"><bounds x="15" y="25" width="8" height="8" /></bezel>
+ <bezel element="static_white"><bounds x="25" y="25" width="8" height="8" /></bezel>
+ <bezel element="static_white"><bounds x="35" y="25" width="8" height="8" /></bezel>
+ <bezel element="static_white"><bounds x="45" y="25" width="8" height="8" /></bezel>
+ <bezel element="static_white"><bounds x="5" y="35" width="8" height="8" /></bezel>
+ <bezel element="static_white"><bounds x="15" y="35" width="8" height="8" /></bezel>
+ <bezel element="static_white"><bounds x="25" y="35" width="8" height="8" /></bezel>
+ <bezel element="static_white"><bounds x="35" y="35" width="8" height="8" /></bezel>
+ <bezel element="static_white"><bounds x="45" y="35" width="8" height="8" /></bezel>
+ <bezel element="static_white"><bounds x="5" y="45" width="8" height="8" /></bezel>
+ <bezel element="static_white"><bounds x="15" y="45" width="8" height="8" /></bezel>
+ <bezel element="static_white"><bounds x="25" y="45" width="8" height="8" /></bezel>
+ <bezel element="static_white"><bounds x="35" y="45" width="8" height="8" /></bezel>
+ <bezel element="static_white"><bounds x="45" y="45" width="8" height="8" /></bezel>
+
+ <bezel element="text_1"><bounds x="5.1" y="6" width="7.8" height="6" /></bezel>
+ <bezel element="text_2"><bounds x="15.1" y="6" width="7.8" height="6" /></bezel>
+ <bezel element="text_3"><bounds x="25.1" y="6" width="7.8" height="6" /></bezel>
+ <bezel element="text_4"><bounds x="35.1" y="6" width="7.8" height="6" /></bezel>
+ <bezel element="text_5"><bounds x="45.1" y="6" width="7.8" height="6" /></bezel>
+ <bezel element="text_6"><bounds x="5.1" y="16" width="7.8" height="6" /></bezel>
+ <bezel element="text_7"><bounds x="15.1" y="16" width="7.8" height="6" /></bezel>
+ <bezel element="text_8"><bounds x="25.1" y="16" width="7.8" height="6" /></bezel>
+ <bezel element="text_9"><bounds x="35.1" y="16" width="7.8" height="6" /></bezel>
+ <bezel element="text_10"><bounds x="45.1" y="16" width="7.8" height="6" /></bezel>
+ <bezel element="text_11"><bounds x="5.1" y="26" width="7.8" height="6" /></bezel>
+ <bezel element="text_12"><bounds x="15.1" y="26" width="7.8" height="6" /></bezel>
+ <bezel element="text_13"><bounds x="25.1" y="26" width="7.8" height="6" /></bezel>
+ <bezel element="text_14"><bounds x="35.1" y="26" width="7.8" height="6" /></bezel>
+ <bezel element="text_15"><bounds x="45.1" y="26" width="7.8" height="6" /></bezel>
+ <bezel element="text_16"><bounds x="5.1" y="36" width="7.8" height="6" /></bezel>
+ <bezel element="text_17"><bounds x="15.1" y="36" width="7.8" height="6" /></bezel>
+ <bezel element="text_18"><bounds x="25.1" y="36" width="7.8" height="6" /></bezel>
+ <bezel element="text_19"><bounds x="35.1" y="36" width="7.8" height="6" /></bezel>
+ <bezel element="text_20"><bounds x="45.1" y="36" width="7.8" height="6" /></bezel>
+ <bezel element="text_21"><bounds x="5.1" y="46" width="7.8" height="6" /></bezel>
+ <bezel element="text_22"><bounds x="15.1" y="46" width="7.8" height="6" /></bezel>
+ <bezel element="text_23"><bounds x="25.1" y="46" width="7.8" height="6" /></bezel>
+ <bezel element="text_24"><bounds x="35.1" y="46" width="7.8" height="6" /></bezel>
+ <bezel element="text_25"><bounds x="45.1" y="46" width="7.8" height="6" /></bezel>
+
+ <bezel element="hl" inputtag="IN.0" inputmask="0x01"><bounds x="5" y="5" width="8" height="8" /><color alpha="0.5" /></bezel>
+ <bezel element="hl" inputtag="IN.1" inputmask="0x01"><bounds x="15" y="5" width="8" height="8" /><color alpha="0.5" /></bezel>
+ <bezel element="hl" inputtag="IN.2" inputmask="0x01"><bounds x="25" y="5" width="8" height="8" /><color alpha="0.5" /></bezel>
+ <bezel element="hl" inputtag="IN.3" inputmask="0x01"><bounds x="35" y="5" width="8" height="8" /><color alpha="0.5" /></bezel>
+ <bezel element="hl" inputtag="IN.4" inputmask="0x01"><bounds x="45" y="5" width="8" height="8" /><color alpha="0.5" /></bezel>
+ <bezel element="hl" inputtag="IN.0" inputmask="0x02"><bounds x="5" y="15" width="8" height="8" /><color alpha="0.5" /></bezel>
+ <bezel element="hl" inputtag="IN.1" inputmask="0x02"><bounds x="15" y="15" width="8" height="8" /><color alpha="0.5" /></bezel>
+ <bezel element="hl" inputtag="IN.2" inputmask="0x02"><bounds x="25" y="15" width="8" height="8" /><color alpha="0.5" /></bezel>
+ <bezel element="hl" inputtag="IN.3" inputmask="0x02"><bounds x="35" y="15" width="8" height="8" /><color alpha="0.5" /></bezel>
+ <bezel element="hl" inputtag="IN.4" inputmask="0x02"><bounds x="45" y="15" width="8" height="8" /><color alpha="0.5" /></bezel>
+ <bezel element="hl" inputtag="IN.0" inputmask="0x04"><bounds x="5" y="25" width="8" height="8" /><color alpha="0.5" /></bezel>
+ <bezel element="hl" inputtag="IN.1" inputmask="0x04"><bounds x="15" y="25" width="8" height="8" /><color alpha="0.5" /></bezel>
+ <bezel element="hl" inputtag="IN.2" inputmask="0x04"><bounds x="25" y="25" width="8" height="8" /><color alpha="0.5" /></bezel>
+ <bezel element="hl" inputtag="IN.3" inputmask="0x04"><bounds x="35" y="25" width="8" height="8" /><color alpha="0.5" /></bezel>
+ <bezel element="hl" inputtag="IN.4" inputmask="0x04"><bounds x="45" y="25" width="8" height="8" /><color alpha="0.5" /></bezel>
+ <bezel element="hl" inputtag="IN.0" inputmask="0x08"><bounds x="5" y="35" width="8" height="8" /><color alpha="0.5" /></bezel>
+ <bezel element="hl" inputtag="IN.1" inputmask="0x08"><bounds x="15" y="35" width="8" height="8" /><color alpha="0.5" /></bezel>
+ <bezel element="hl" inputtag="IN.2" inputmask="0x08"><bounds x="25" y="35" width="8" height="8" /><color alpha="0.5" /></bezel>
+ <bezel element="hl" inputtag="IN.3" inputmask="0x08"><bounds x="35" y="35" width="8" height="8" /><color alpha="0.5" /></bezel>
+ <bezel element="hl" inputtag="IN.4" inputmask="0x08"><bounds x="45" y="35" width="8" height="8" /><color alpha="0.5" /></bezel>
+ <bezel element="hl" inputtag="IN.0" inputmask="0x10"><bounds x="5" y="45" width="8" height="8" /><color alpha="0.5" /></bezel>
+ <bezel element="hl" inputtag="IN.1" inputmask="0x10"><bounds x="15" y="45" width="8" height="8" /><color alpha="0.5" /></bezel>
+ <bezel element="hl" inputtag="IN.2" inputmask="0x10"><bounds x="25" y="45" width="8" height="8" /><color alpha="0.5" /></bezel>
+ <bezel element="hl" inputtag="IN.3" inputmask="0x10"><bounds x="35" y="45" width="8" height="8" /><color alpha="0.5" /></bezel>
+ <bezel element="hl" inputtag="IN.4" inputmask="0x10"><bounds x="45" y="45" width="8" height="8" /><color alpha="0.5" /></bezel>
+
+ <!-- bottom side -->
+
+ <bezel element="static_white"><bounds x="0" y="57" width="58" height="60" /></bezel>
+ <bezel element="static_black"><bounds x="3" y="59" width="52" height="14" /></bezel>
+ <bezel element="static_black"><bounds x="3" y="75" width="52" height="24" /></bezel>
+
+ <bezel name="0.a" element="ledr"><bounds x="8.75" y="64.75" width="2.5" height="2.5" /></bezel>
+ <bezel name="1.a" element="ledg"><bounds x="18.75" y="64.75" width="2.5" height="2.5" /></bezel>
+
+ <bezel name="digit3" element="digit"><bounds x="40" y="62" width="5.33" height="8" /></bezel>
+ <bezel name="digit2" element="digit"><bounds x="45.33" y="62" width="5.33" height="8" /></bezel>
+
+ <bezel element="static_blue"><bounds x="5" y="78" width="8" height="8" /></bezel>
+ <bezel element="static_green"><bounds x="15" y="78" width="8" height="8" /></bezel>
+ <bezel element="hl" inputtag="IN.5" inputmask="0x02"><bounds x="5.5" y="78.5" width="7" height="7" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.5" inputmask="0x01"><bounds x="15.5" y="78.5" width="7" height="7" /><color alpha="0.3" /></bezel>
- <bezel name="lamp20" element="lamp_red"><bounds x="3.5" y="6" width="3" height="3" /></bezel>
- <bezel name="lamp21" element="lamp_green"><bounds x="13.5" y="6" width="3" height="3" /></bezel>
+ <bezel element="text_game"><bounds x="4" y="86.5" width="10" height="2" /></bezel>
+ <bezel element="text_start"><bounds x="4" y="88.5" width="10" height="2" /></bezel>
+ <bezel element="text_game"><bounds x="14" y="86.5" width="10" height="2" /></bezel>
+ <bezel element="text_select"><bounds x="14" y="88.5" width="10" height="2" /></bezel>
- <bezel name="digit1" element="digit"><bounds x="30" y="0" width="10" height="15" /></bezel>
- <bezel name="digit0" element="digit"><bounds x="40" y="0" width="10" height="15" /></bezel>
</view>
</mamelayout>
diff --git a/src/mame/layout/mdndclab.lay b/src/mame/layout/mdndclab.lay
new file mode 100644
index 00000000000..365f2dc8fec
--- /dev/null
+++ b/src/mame/layout/mdndclab.lay
@@ -0,0 +1,271 @@
+<?xml version="1.0"?>
+<mamelayout version="2">
+
+<!-- define elements -->
+
+ <element name="static_black"><rect><color red="0.07" green="0.07" blue="0.06" /></rect></element>
+ <element name="static_red"><rect><color red="0.55" green="0.1" blue="0.05" /></rect></element>
+ <element name="static_white"><rect><color red="0.8" green="0.75" blue="0.7" /></rect></element>
+
+ <element name="hl" defstate="0">
+ <text string=" ">
+ <bounds x="0.0" y="0.0" width="1.0" height="1.0" />
+ <color red="0.0" green="0.0" blue="0.0" />
+ </text>
+ <disk state="1">
+ <bounds x="0.12" y="0.12" width="0.76" height="0.76" />
+ <color red="1.0" green="1.0" blue="1.0" />
+ </disk>
+ </element>
+
+ <element name="hlr" defstate="0">
+ <rect><color red="0.4" green="0.07" blue="0.02" /></rect>
+ <disk state="1">
+ <bounds x="0.12" y="0.12" width="0.76" height="0.76" />
+ <color red="0.5" green="0.1" blue="0.03" />
+ </disk>
+ </element>
+
+ <element name="text_l01">
+ <rect><color red="0.55" green="0.1" blue="0.05" /></rect>
+ <text string="Switch"><color red="0.8" green="0.75" blue="0.7" /></text>
+ </element>
+ <element name="text_l02">
+ <rect><color red="0.55" green="0.1" blue="0.05" /></rect>
+ <text string="Key"><color red="0.8" green="0.75" blue="0.7" /></text>
+ </element>
+
+ <element name="text_l11">
+ <rect><color red="0.55" green="0.1" blue="0.05" /></rect>
+ <text string="Next Turn"><color red="0.8" green="0.75" blue="0.7" /></text>
+ </element>
+ <element name="text_l12">
+ <rect><color red="0.55" green="0.1" blue="0.05" /></rect>
+ <text string="Level 1/2"><color red="0.8" green="0.75" blue="0.7" /></text>
+ </element>
+
+ <element name="text_l21">
+ <rect><color red="0.55" green="0.1" blue="0.05" /></rect>
+ <text string="Dragon"><color red="0.8" green="0.75" blue="0.7" /></text>
+ </element>
+ <element name="text_l22">
+ <rect><color red="0.55" green="0.1" blue="0.05" /></rect>
+ <text string="Flying"><color red="0.8" green="0.75" blue="0.7" /></text>
+ </element>
+ <element name="text_l23">
+ <rect><color red="0.55" green="0.1" blue="0.05" /></rect>
+ <text string="Defeat"><color red="0.8" green="0.75" blue="0.7" /></text>
+ </element>
+ <element name="text_l24">
+ <rect><color red="0.55" green="0.1" blue="0.05" /></rect>
+ <text string="Tune"><color red="0.8" green="0.75" blue="0.7" /></text>
+ </element>
+
+ <element name="text_l31">
+ <rect><color red="0.55" green="0.1" blue="0.05" /></rect>
+ <text string="Dragon"><color red="0.8" green="0.75" blue="0.7" /></text>
+ </element>
+ <element name="text_l32">
+ <rect><color red="0.55" green="0.1" blue="0.05" /></rect>
+ <text string="Attacks"><color red="0.8" green="0.75" blue="0.7" /></text>
+ </element>
+ <element name="text_l33">
+ <rect><color red="0.55" green="0.1" blue="0.05" /></rect>
+ <text string="Dragon"><color red="0.8" green="0.75" blue="0.7" /></text>
+ </element>
+ <element name="text_l34">
+ <rect><color red="0.55" green="0.1" blue="0.05" /></rect>
+ <text string="Waits"><color red="0.8" green="0.75" blue="0.7" /></text>
+ </element>
+
+ <element name="text_l41">
+ <rect><color red="0.55" green="0.1" blue="0.05" /></rect>
+ <text string="Wall"><color red="0.8" green="0.75" blue="0.7" /></text>
+ </element>
+ <element name="text_l42">
+ <rect><color red="0.55" green="0.1" blue="0.05" /></rect>
+ <text string="Door"><color red="0.8" green="0.75" blue="0.7" /></text>
+ </element>
+
+ <element name="text_l51">
+ <rect><color red="0.55" green="0.1" blue="0.05" /></rect>
+ <text string="Illegal"><color red="0.8" green="0.75" blue="0.7" /></text>
+ </element>
+ <element name="text_l52">
+ <rect><color red="0.55" green="0.1" blue="0.05" /></rect>
+ <text string="Move"><color red="0.8" green="0.75" blue="0.7" /></text>
+ </element>
+ <element name="text_l53">
+ <rect><color red="0.55" green="0.1" blue="0.05" /></rect>
+ <text string="Warrior"><color red="0.8" green="0.75" blue="0.7" /></text>
+ </element>
+ <element name="text_l54">
+ <rect><color red="0.55" green="0.1" blue="0.05" /></rect>
+ <text string="Moves"><color red="0.8" green="0.75" blue="0.7" /></text>
+ </element>
+
+ <element name="text_l61">
+ <rect><color red="0.55" green="0.1" blue="0.05" /></rect>
+ <text string="Warrior 1"><color red="0.8" green="0.75" blue="0.7" /></text>
+ </element>
+ <element name="text_l62">
+ <rect><color red="0.55" green="0.1" blue="0.05" /></rect>
+ <text string="Winner"><color red="0.8" green="0.75" blue="0.7" /></text>
+ </element>
+
+ <element name="text_l71">
+ <rect><color red="0.55" green="0.1" blue="0.05" /></rect>
+ <text string="Warrior 2"><color red="0.8" green="0.75" blue="0.7" /></text>
+ </element>
+ <element name="text_l72">
+ <rect><color red="0.55" green="0.1" blue="0.05" /></rect>
+ <text string="Treasure"><color red="0.8" green="0.75" blue="0.7" /></text>
+ </element>
+
+
+<!-- build screen -->
+
+ <view name="Internal Layout">
+ <bounds left="-15" right="80" top="-2.5" bottom="80" />
+ <bezel element="static_black">
+ <bounds left="-16" right="81" top="-3" bottom="81" />
+ </bezel>
+
+ <!-- 8*8 buttons -->
+
+ <bezel element="hlr" inputtag="IN.9" inputmask="0x01"><bounds x="0" y="0" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.10" inputmask="0x01"><bounds x="10" y="0" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.11" inputmask="0x01"><bounds x="20" y="0" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.12" inputmask="0x01"><bounds x="30" y="0" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.13" inputmask="0x01"><bounds x="40" y="0" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.14" inputmask="0x01"><bounds x="50" y="0" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.15" inputmask="0x01"><bounds x="60" y="0" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.16" inputmask="0x01"><bounds x="70" y="0" width="7.5" height="7.5" /></bezel>
+
+ <bezel element="hlr" inputtag="IN.9" inputmask="0x02"><bounds x="0" y="10" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.10" inputmask="0x02"><bounds x="10" y="10" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.11" inputmask="0x02"><bounds x="20" y="10" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.12" inputmask="0x02"><bounds x="30" y="10" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.13" inputmask="0x02"><bounds x="40" y="10" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.14" inputmask="0x02"><bounds x="50" y="10" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.15" inputmask="0x02"><bounds x="60" y="10" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.16" inputmask="0x02"><bounds x="70" y="10" width="7.5" height="7.5" /></bezel>
+
+ <bezel element="hlr" inputtag="IN.9" inputmask="0x04"><bounds x="0" y="20" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.10" inputmask="0x04"><bounds x="10" y="20" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.11" inputmask="0x04"><bounds x="20" y="20" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.12" inputmask="0x04"><bounds x="30" y="20" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.13" inputmask="0x04"><bounds x="40" y="20" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.14" inputmask="0x04"><bounds x="50" y="20" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.15" inputmask="0x04"><bounds x="60" y="20" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.16" inputmask="0x04"><bounds x="70" y="20" width="7.5" height="7.5" /></bezel>
+
+ <bezel element="hlr" inputtag="IN.9" inputmask="0x08"><bounds x="0" y="30" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.10" inputmask="0x08"><bounds x="10" y="30" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.11" inputmask="0x08"><bounds x="20" y="30" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.12" inputmask="0x08"><bounds x="30" y="30" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.13" inputmask="0x08"><bounds x="40" y="30" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.14" inputmask="0x08"><bounds x="50" y="30" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.15" inputmask="0x08"><bounds x="60" y="30" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.16" inputmask="0x08"><bounds x="70" y="30" width="7.5" height="7.5" /></bezel>
+
+ <bezel element="hlr" inputtag="IN.0" inputmask="0x01"><bounds x="0" y="40" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.1" inputmask="0x01"><bounds x="10" y="40" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.2" inputmask="0x01"><bounds x="20" y="40" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.3" inputmask="0x01"><bounds x="30" y="40" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.4" inputmask="0x01"><bounds x="40" y="40" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.5" inputmask="0x01"><bounds x="50" y="40" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.6" inputmask="0x01"><bounds x="60" y="40" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.7" inputmask="0x01"><bounds x="70" y="40" width="7.5" height="7.5" /></bezel>
+
+ <bezel element="hlr" inputtag="IN.0" inputmask="0x02"><bounds x="0" y="50" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.1" inputmask="0x02"><bounds x="10" y="50" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.2" inputmask="0x02"><bounds x="20" y="50" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.3" inputmask="0x02"><bounds x="30" y="50" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.4" inputmask="0x02"><bounds x="40" y="50" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.5" inputmask="0x02"><bounds x="50" y="50" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.6" inputmask="0x02"><bounds x="60" y="50" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.7" inputmask="0x02"><bounds x="70" y="50" width="7.5" height="7.5" /></bezel>
+
+ <bezel element="hlr" inputtag="IN.0" inputmask="0x04"><bounds x="0" y="60" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.1" inputmask="0x04"><bounds x="10" y="60" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.2" inputmask="0x04"><bounds x="20" y="60" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.3" inputmask="0x04"><bounds x="30" y="60" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.4" inputmask="0x04"><bounds x="40" y="60" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.5" inputmask="0x04"><bounds x="50" y="60" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.6" inputmask="0x04"><bounds x="60" y="60" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.7" inputmask="0x04"><bounds x="70" y="60" width="7.5" height="7.5" /></bezel>
+
+ <bezel element="hlr" inputtag="IN.0" inputmask="0x08"><bounds x="0" y="70" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.1" inputmask="0x08"><bounds x="10" y="70" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.2" inputmask="0x08"><bounds x="20" y="70" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.3" inputmask="0x08"><bounds x="30" y="70" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.4" inputmask="0x08"><bounds x="40" y="70" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.5" inputmask="0x08"><bounds x="50" y="70" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.6" inputmask="0x08"><bounds x="60" y="70" width="7.5" height="7.5" /></bezel>
+ <bezel element="hlr" inputtag="IN.7" inputmask="0x08"><bounds x="70" y="70" width="7.5" height="7.5" /></bezel>
+
+ <!-- left side -->
+
+ <bezel element="static_red"><bounds x="-12.5" y="0" width="7.5" height="7.5" /></bezel>
+ <bezel element="static_red"><bounds x="-12.5" y="10" width="7.5" height="7.5" /></bezel>
+ <bezel element="static_red"><bounds x="-12.5" y="20" width="7.5" height="7.5" /></bezel>
+ <bezel element="static_red"><bounds x="-12.5" y="30" width="7.5" height="7.5" /></bezel>
+ <bezel element="static_red"><bounds x="-12.5" y="40" width="7.5" height="7.5" /></bezel>
+ <bezel element="static_red"><bounds x="-12.5" y="50" width="7.5" height="7.5" /></bezel>
+ <bezel element="static_red"><bounds x="-12.5" y="60" width="7.5" height="7.5" /></bezel>
+ <bezel element="static_red"><bounds x="-12.5" y="70" width="7.5" height="7.5" /></bezel>
+
+ <bezel element="text_l01"><bounds x="-12.5" y="2" width="7.5" height="1.5" /></bezel>
+ <bezel element="text_l02"><bounds x="-12.5" y="4" width="7.5" height="1.5" /></bezel>
+
+ <bezel element="text_l11"><bounds x="-12.5" y="11.5" width="7.5" height="1.5" /></bezel>
+ <bezel element="text_l12"><bounds x="-12.5" y="14.5" width="7.5" height="1.5" /></bezel>
+
+ <bezel element="text_l21"><bounds x="-12.5" y="20.5" width="7.5" height="1.5" /></bezel>
+ <bezel element="text_l22"><bounds x="-12.5" y="22" width="7.5" height="1.5" /></bezel>
+ <bezel element="text_l23"><bounds x="-12.5" y="24" width="7.5" height="1.5" /></bezel>
+ <bezel element="text_l24"><bounds x="-12.5" y="25.5" width="7.5" height="1.5" /></bezel>
+
+ <bezel element="text_l31"><bounds x="-12.5" y="30.5" width="7.5" height="1.5" /></bezel>
+ <bezel element="text_l32"><bounds x="-12.5" y="32" width="7.5" height="1.5" /></bezel>
+ <bezel element="text_l33"><bounds x="-12.5" y="34" width="7.5" height="1.5" /></bezel>
+ <bezel element="text_l34"><bounds x="-12.5" y="35.5" width="7.5" height="1.5" /></bezel>
+
+ <bezel element="text_l41"><bounds x="-12.5" y="41.5" width="7.5" height="1.5" /></bezel>
+ <bezel element="text_l42"><bounds x="-12.5" y="44.5" width="7.5" height="1.5" /></bezel>
+
+ <bezel element="text_l51"><bounds x="-12.5" y="50.5" width="7.5" height="1.5" /></bezel>
+ <bezel element="text_l52"><bounds x="-12.5" y="52" width="7.5" height="1.5" /></bezel>
+ <bezel element="text_l53"><bounds x="-12.5" y="54" width="7.5" height="1.5" /></bezel>
+ <bezel element="text_l54"><bounds x="-12.5" y="55.5" width="7.5" height="1.5" /></bezel>
+
+ <bezel element="text_l61"><bounds x="-12.5" y="61.5" width="7.5" height="1.5" /></bezel>
+ <bezel element="text_l62"><bounds x="-12.5" y="64.5" width="7.5" height="1.5" /></bezel>
+
+ <bezel element="text_l71"><bounds x="-12.5" y="71.5" width="7.5" height="1.5" /></bezel>
+ <bezel element="text_l72"><bounds x="-12.5" y="74.5" width="7.5" height="1.5" /></bezel>
+
+ <bezel element="static_white"><bounds x="-12.6" y="13.65" width="7.7" height="0.2" /></bezel>
+ <bezel element="static_white"><bounds x="-12.6" y="23.65" width="7.7" height="0.2" /></bezel>
+ <bezel element="static_white"><bounds x="-12.6" y="33.65" width="7.7" height="0.2" /></bezel>
+ <bezel element="static_white"><bounds x="-12.6" y="43.65" width="7.7" height="0.2" /></bezel>
+ <bezel element="static_white"><bounds x="-12.6" y="53.65" width="7.7" height="0.2" /></bezel>
+ <bezel element="static_white"><bounds x="-12.6" y="63.65" width="7.7" height="0.2" /></bezel>
+ <bezel element="static_white"><bounds x="-12.6" y="73.65" width="7.7" height="0.2" /></bezel>
+
+ <bezel element="static_black"><bounds x="-5" y="-1" width="1" height="80" /></bezel>
+ <bezel element="static_black"><bounds x="-13.5" y="-1" width="1" height="80" /></bezel>
+
+ <bezel element="hl" inputtag="IN.17" inputmask="0x01"><bounds x="-12.5" y="0" width="7.5" height="7.5" /><color alpha="0.13" /></bezel>
+ <bezel element="hl" inputtag="IN.17" inputmask="0x02"><bounds x="-12.5" y="10" width="7.5" height="7.5" /><color alpha="0.13" /></bezel>
+ <bezel element="hl" inputtag="IN.17" inputmask="0x04"><bounds x="-12.5" y="20" width="7.5" height="7.5" /><color alpha="0.13" /></bezel>
+ <bezel element="hl" inputtag="IN.17" inputmask="0x08"><bounds x="-12.5" y="30" width="7.5" height="7.5" /><color alpha="0.13" /></bezel>
+ <bezel element="hl" inputtag="IN.8" inputmask="0x01"><bounds x="-12.5" y="40" width="7.5" height="7.5" /><color alpha="0.13" /></bezel>
+ <bezel element="hl" inputtag="IN.8" inputmask="0x02"><bounds x="-12.5" y="50" width="7.5" height="7.5" /><color alpha="0.13" /></bezel>
+ <bezel element="hl" inputtag="IN.8" inputmask="0x04"><bounds x="-12.5" y="60" width="7.5" height="7.5" /><color alpha="0.13" /></bezel>
+ <bezel element="hl" inputtag="IN.8" inputmask="0x08"><bounds x="-12.5" y="70" width="7.5" height="7.5" /><color alpha="0.13" /></bezel>
+
+
+ </view>
+</mamelayout>
diff --git a/src/mame/mess.lst b/src/mame/mess.lst
index 850a407603f..0d6cdc46abb 100644
--- a/src/mame/mess.lst
+++ b/src/mame/mess.lst
@@ -2232,6 +2232,7 @@ ngenb38 // 1991
// hh_cop400
ctstein // Castle Toy
+h2hbaskb // Coleco
einvaderc // Entex
funjacks // Mattel
funrlgl // Mattel
diff --git a/src/osd/modules/render/draw13.cpp b/src/osd/modules/render/draw13.cpp
index 7874cd16ea1..acf946b715d 100644
--- a/src/osd/modules/render/draw13.cpp
+++ b/src/osd/modules/render/draw13.cpp
@@ -899,6 +899,32 @@ texture_info *renderer_sdl1::texture_find(const render_primitive &prim, const qu
}
//============================================================
+// exit
+//============================================================
+
+void renderer_sdl1::exit()
+{
+ if (s_blit_info_initialized)
+ {
+ for (int i = 0; i <= SDL_TEXFORMAT_LAST; i++)
+ {
+ for (copy_info_t *bi = s_blit_info[i]; bi != nullptr; )
+ {
+ if (bi->pixel_count)
+ osd_printf_verbose("%s -> %s %s blendmode 0x%02x, %d samples: %d KPixel/sec\n", bi->srcname, bi->dstname,
+ bi->blitter->m_is_rot ? "rot" : "norot", bi->bm_mask, bi->samples,
+ (int) bi->perf);
+ copy_info_t *freeme = bi;
+ bi = bi->next;
+ global_free(freeme);
+ }
+ s_blit_info[i] = nullptr;
+ }
+ s_blit_info_initialized = false;
+ }
+}
+
+//============================================================
// texture_update
//============================================================
diff --git a/src/osd/modules/render/draw13.h b/src/osd/modules/render/draw13.h
index 7335bd5be81..8923f53317a 100644
--- a/src/osd/modules/render/draw13.h
+++ b/src/osd/modules/render/draw13.h
@@ -156,32 +156,16 @@ public:
destroy_all_textures();
SDL_DestroyRenderer(m_sdl_renderer);
m_sdl_renderer = nullptr;
-
- if (s_blit_info_initialized)
- {
- for (int i = 0; i <= SDL_TEXFORMAT_LAST; i++)
- {
- for (copy_info_t *bi = s_blit_info[i]; bi != nullptr; )
- {
- if (bi->pixel_count)
- osd_printf_verbose("%s -> %s %s blendmode 0x%02x, %d samples: %d KPixel/sec\n", bi->srcname, bi->dstname,
- bi->blitter->m_is_rot ? "rot" : "norot", bi->bm_mask, bi->samples,
- (int) bi->perf);
- copy_info_t *freeme = bi;
- bi = bi->next;
- global_free(freeme);
- }
- s_blit_info[i] = nullptr;
- }
- s_blit_info_initialized = false;
- }
}
- virtual int create() override;
static bool init(running_machine &machine);
+ static void exit();
+
+ virtual int create() override;
virtual int draw(const int update) override;
virtual int xy_to_render_target(const int x, const int y, int *xt, int *yt) override;
virtual render_primitive_list *get_primitives() override;
+
int RendererSupportsFormat(Uint32 format, Uint32 access, const char *sformat);
SDL_Renderer * m_sdl_renderer;
diff --git a/src/osd/modules/render/drawbgfx.cpp b/src/osd/modules/render/drawbgfx.cpp
index f2d58f4e4d5..e359de4624a 100644
--- a/src/osd/modules/render/drawbgfx.cpp
+++ b/src/osd/modules/render/drawbgfx.cpp
@@ -62,6 +62,7 @@
// TYPES
//============================================================
+bool renderer_bgfx::s_window_set = false;
//============================================================
// renderer_bgfx::create
@@ -100,6 +101,18 @@ int renderer_bgfx::create()
m_height[window().m_index] = wdim.height();
if (window().m_index == 0)
{
+ if (!s_window_set)
+ {
+ s_window_set = true;
+ ScreenVertex::init();
+ }
+ else
+ {
+ bgfx::shutdown();
+ bgfx::PlatformData blank_pd;
+ memset(&blank_pd, 0, sizeof(bgfx::PlatformData));
+ bgfx::setPlatformData(blank_pd);
+ }
#ifdef OSD_WINDOWS
bgfx::winSetHwnd(window().m_hwnd);
#else
@@ -110,8 +123,6 @@ int renderer_bgfx::create()
// Enable debug text.
bgfx::setDebug(BGFX_DEBUG_TEXT); //BGFX_DEBUG_STATS
m_dimensions = osd_dim(m_width[0], m_height[0]);
-
- ScreenVertex::init();
}
m_textures = new texture_manager();
@@ -160,11 +171,14 @@ renderer_bgfx::~renderer_bgfx()
delete m_textures;
delete m_effects;
delete m_shaders;
+}
+void renderer_bgfx::exit()
+{
bgfx::shutdown();
+ s_window_set = false;
}
-
//============================================================
// drawsdl_xy_to_render_target
//============================================================
diff --git a/src/osd/modules/render/drawbgfx.h b/src/osd/modules/render/drawbgfx.h
index 7ce7c75a1de..924ee0add29 100644
--- a/src/osd/modules/render/drawbgfx.h
+++ b/src/osd/modules/render/drawbgfx.h
@@ -29,9 +29,11 @@ public:
}
virtual ~renderer_bgfx();
+ static bool init(running_machine &machine) { return false; }
+ static void exit();
+
virtual int create() override;
virtual slider_state* get_slider_list() override;
- static bool init(running_machine &machine) { return false; }
virtual int draw(const int update) override;
#ifdef OSD_SDL
virtual int xy_to_render_target(const int x, const int y, int *xt, int *yt) override;
@@ -118,6 +120,8 @@ private:
enum : uint16_t { CACHE_SIZE = 1024 };
enum : uint32_t { PACKABLE_SIZE = 128 };
enum : UINT32 { WHITE_HASH = 0x87654321 };
+
+ static bool s_window_set;
};
#endif
diff --git a/src/osd/modules/render/drawd3d.cpp b/src/osd/modules/render/drawd3d.cpp
index 301e3de3df6..144de46dfd6 100644
--- a/src/osd/modules/render/drawd3d.cpp
+++ b/src/osd/modules/render/drawd3d.cpp
@@ -1018,9 +1018,6 @@ renderer_d3d9::~renderer_d3d9()
if (get_shaders() != nullptr && get_shaders()->recording())
get_shaders()->window_record();
- if (d3dintf != nullptr)
- (*d3dintf->d3d.release)(d3dintf);
-
device_delete();
if (m_shaders_options != nullptr)
@@ -1030,6 +1027,12 @@ renderer_d3d9::~renderer_d3d9()
}
}
+void renderer_d3d9::exit()
+{
+ if (d3dintf != nullptr)
+ (*d3dintf->d3d.release)(d3dintf);
+}
+
void renderer_d3d9::device_delete()
{
if (m_shaders != nullptr)
diff --git a/src/osd/modules/render/drawd3d.h b/src/osd/modules/render/drawd3d.h
index 31246f5baf8..02f63dd65e3 100644
--- a/src/osd/modules/render/drawd3d.h
+++ b/src/osd/modules/render/drawd3d.h
@@ -6,6 +6,8 @@
//
//============================================================
+#pragma once
+
#ifndef __WIN_DRAWD3D__
#define __WIN_DRAWD3D__
@@ -41,9 +43,11 @@ public:
renderer_d3d9(osd_window *window);
virtual ~renderer_d3d9();
+ static bool init(running_machine &machine);
+ static void exit();
+
virtual int create() override;
virtual slider_state* get_slider_list() override;
- static bool init(running_machine &machine);
virtual render_primitive_list *get_primitives() override;
virtual int draw(const int update) override;
virtual void save() override;
diff --git a/src/osd/modules/render/drawgdi.h b/src/osd/modules/render/drawgdi.h
index af52eac1e77..016eb487dee 100644
--- a/src/osd/modules/render/drawgdi.h
+++ b/src/osd/modules/render/drawgdi.h
@@ -37,8 +37,10 @@ public:
}
virtual ~renderer_gdi();
- virtual int create() override;
static bool init(running_machine &machine) { return false; }
+ static void exit() { }
+
+ virtual int create() override;
virtual render_primitive_list *get_primitives() override;
virtual int draw(const int update) override;
virtual void save() override {};
diff --git a/src/osd/modules/render/drawnone.h b/src/osd/modules/render/drawnone.h
index e6f49aa1727..a426805683e 100644
--- a/src/osd/modules/render/drawnone.h
+++ b/src/osd/modules/render/drawnone.h
@@ -22,8 +22,10 @@ public:
virtual ~renderer_none() { }
- virtual int create() override { return 0; }
static bool init(running_machine &machine) { return false; }
+ static void exit() { }
+
+ virtual int create() override { return 0; }
virtual render_primitive_list *get_primitives() override;
virtual int draw(const int update) override { return 0; }
virtual void save() override { }
diff --git a/src/osd/modules/render/drawogl.cpp b/src/osd/modules/render/drawogl.cpp
index e90d74a40e6..96c1559b23a 100644
--- a/src/osd/modules/render/drawogl.cpp
+++ b/src/osd/modules/render/drawogl.cpp
@@ -302,7 +302,10 @@ renderer_ogl::~renderer_ogl()
global_free(m_gl_context);
m_gl_context = nullptr;
+}
+void renderer_ogl::exit()
+{
for (int i = 0; i < video_config.glsl_shader_mamebm_num; i++)
{
if (nullptr != video_config.glsl_shader_mamebm[i])
diff --git a/src/osd/modules/render/drawogl.h b/src/osd/modules/render/drawogl.h
index 5c96277f247..8427ec62cce 100644
--- a/src/osd/modules/render/drawogl.h
+++ b/src/osd/modules/render/drawogl.h
@@ -130,8 +130,10 @@ public:
}
virtual ~renderer_ogl();
- virtual int create() override;
static bool init(running_machine &machine);
+ static void exit();
+
+ virtual int create() override;
virtual int draw(const int update) override;
#ifndef OSD_WINDOWS
diff --git a/src/osd/modules/render/drawsdl.h b/src/osd/modules/render/drawsdl.h
index 28ddd7ebc36..9e864019a6c 100644
--- a/src/osd/modules/render/drawsdl.h
+++ b/src/osd/modules/render/drawsdl.h
@@ -36,13 +36,14 @@ public:
}
virtual ~renderer_sdl2();
+ static bool init(running_machine &machine);
+ static void exit() { }
+
virtual int create() override;
virtual int draw(const int update) override;
virtual int xy_to_render_target(const int x, const int y, int *xt, int *yt) override;
virtual render_primitive_list *get_primitives() override;
- static bool init(running_machine &machine);
-
private:
void show_info(struct SDL_RendererInfo *render_info);
diff --git a/src/osd/modules/sound/js_sound.js b/src/osd/modules/sound/js_sound.js
index b06cbb44365..90756018a05 100644
--- a/src/osd/modules/sound/js_sound.js
+++ b/src/osd/modules/sound/js_sound.js
@@ -185,18 +185,18 @@ function get_context() {
};
function sample_count() {
- //TODO get someone to call this from the emulator,
- //so the emulator can do proper audio buffering by
- //knowing how many samples are left:
- if (!context) {
- //Use impossible value as an error code:
- return -1;
- }
- var count = rear - start;
- if (start > rear) {
- count += bufferSize;
- }
- return count;
+ //TODO get someone to call this from the emulator,
+ //so the emulator can do proper audio buffering by
+ //knowing how many samples are left:
+ if (!context) {
+ //Use impossible value as an error code:
+ return -1;
+ }
+ var count = rear - start;
+ if (start > rear) {
+ count += bufferSize;
+ }
+ return count;
}
return {
diff --git a/src/osd/sdl/man/mame.6 b/src/osd/sdl/man/mame.6
index de5b6216041..a2449f15df3 100644
--- a/src/osd/sdl/man/mame.6
+++ b/src/osd/sdl/man/mame.6
@@ -368,6 +368,13 @@ consistent, you should only record and playback with all configuration
(.cfg), NVRAM (.nv), and memory card files deleted. The default is NULL
(no recording).
.TP
+.B \-[no]record_timecode
+Specify whether to create a timecode file. It contains a line with elapsed
+times on each press of timecode shortcut key (default is F12).
+This option works only when recording mode is enabled (\-record option).
+The file is saved on inp folder.
+Default is OFF (\-norecord_timecode).
+.TP
.B \-mngwrite \fIfilename
Writes each video frame to the given \fIfilename\fP in MNG format, producing
an animation of the game session. Note that \-mngwrite only writes video
@@ -1094,8 +1101,9 @@ systems that make use of a BIOS. The \-listxml output will list all of
the possible BIOS names for a game. The default is 'default'.
.TP
.B \-[no]cheat, \-[no]c
-Enables the reading of the cheat database, if present, and the Cheat
-menu in the user interface. The default is OFF (\-nocheat).
+Activates the cheat menu with autofire options and other tricks from
+the cheat database, if present.
+The default is OFF (\-nocheat).
.TP
.B \-[no]skip_gameinfo
Forces MAME to skip displaying the game info screen. The default is OFF
diff --git a/src/osd/sdl/man/mess.6 b/src/osd/sdl/man/mess.6
index f1932d48f03..1c7142080d6 100644
--- a/src/osd/sdl/man/mess.6
+++ b/src/osd/sdl/man/mess.6
@@ -374,6 +374,13 @@ consistent, you should only record and playback with all configuration
(.cfg), NVRAM (.nv), and memory card files deleted. The default is NULL
(no recording).
.TP
+.B \-[no]record_timecode
+Specify whether to create a timecode file. It contains a line with elapsed
+times on each press of timecode shortcut key (default is F12).
+This option works only when recording mode is enabled (\-record option).
+The file is saved on inp folder.
+Default is OFF (\-norecord_timecode).
+.TP
.B \-mngwrite \fIfilename
Writes each video frame to the given file in MNG format, producing
an animation of the system session.
@@ -1101,8 +1108,9 @@ systems that make use of a BIOS. The \-listxml output will list all of
the possible BIOS names for a system. The default is 'default'.
.TP
.B \-[no]cheat, \-[no]c
-Enables the reading of the cheat database, if present, and the Cheat
-menu in the user interface. The default is OFF (\-nocheat).
+Activates the cheat menu with autofire options and other tricks from
+the cheat database, if present.
+The default is OFF (\-nocheat).
.TP
.B \-[no]skip_gameinfo
Forces MESS to skip displaying the system info screen. The default is OFF
diff --git a/src/osd/sdl/sdlprefix.h b/src/osd/sdl/sdlprefix.h
index d84f762089e..1da6e9d5b8b 100644
--- a/src/osd/sdl/sdlprefix.h
+++ b/src/osd/sdl/sdlprefix.h
@@ -14,7 +14,7 @@
/* Only problems ... */
#if defined(_WIN32)
-#define SDLMAME_WIN32
+#define SDLMAME_WIN32 1
#define _SDL_main_h
#endif
diff --git a/src/osd/sdl/window.cpp b/src/osd/sdl/window.cpp
index 49e8ed48477..eed3a9afd67 100644
--- a/src/osd/sdl/window.cpp
+++ b/src/osd/sdl/window.cpp
@@ -351,6 +351,26 @@ void sdl_osd_interface::window_exit()
global_free(temp);
}
+ switch(video_config.mode)
+ {
+ case VIDEO_MODE_SDL2ACCEL:
+ renderer_sdl2::exit();
+ break;
+ case VIDEO_MODE_SOFT:
+ renderer_sdl1::exit();
+ break;
+ case VIDEO_MODE_BGFX:
+ renderer_bgfx::exit();
+ break;
+#if (USE_OPENGL)
+ case VIDEO_MODE_OPENGL:
+ renderer_ogl::exit();
+ break;
+#endif
+ default:
+ break;
+ }
+
// if we're multithreaded, clean up the window thread
if (multithreading_enabled)
{
@@ -541,8 +561,11 @@ OSDWORK_CALLBACK( sdl_window_info::sdlwindow_toggle_full_screen_wt )
window->m_windowed_dim = window->get_size();
}
- delete window->m_renderer;
- window->m_renderer = nullptr;
+ if (window->m_renderer != nullptr)
+ {
+ delete window->m_renderer;
+ window->m_renderer = nullptr;
+ }
bool is_osx = false;
#ifdef SDLMAME_MACOSX
diff --git a/src/osd/windows/video.cpp b/src/osd/windows/video.cpp
index 6406221a471..b2fa493469d 100644
--- a/src/osd/windows/video.cpp
+++ b/src/osd/windows/video.cpp
@@ -370,6 +370,7 @@ void windows_osd_interface::extract_video_config()
video_config.filter = options().filter();
video_config.keepaspect = options().keep_aspect();
video_config.numscreens = options().numscreens();
+ video_config.fullstretch = options().uneven_stretch();
// if we are in debug mode, never go full screen
if (machine().debug_flags & DEBUG_FLAG_OSD_ENABLED)
diff --git a/src/osd/windows/window.cpp b/src/osd/windows/window.cpp
index ee78e574a67..bb81f0b9de5 100644
--- a/src/osd/windows/window.cpp
+++ b/src/osd/windows/window.cpp
@@ -325,6 +325,29 @@ void windows_osd_interface::window_exit()
global_free(temp);
}
+ switch(video_config.mode)
+ {
+ case VIDEO_MODE_NONE:
+ renderer_none::exit();
+ break;
+ case VIDEO_MODE_GDI:
+ renderer_gdi::exit();
+ break;
+ case VIDEO_MODE_BGFX:
+ renderer_bgfx::exit();
+ break;
+#if (USE_OPENGL)
+ case VIDEO_MODE_OPENGL:
+ renderer_ogl::exit();
+ break;
+#endif
+ case VIDEO_MODE_D3D:
+ renderer_d3d9::exit();
+ break;
+ default:
+ break;
+ }
+
// if we're multithreaded, clean up the window thread
if (multithreading_enabled)
{
@@ -375,6 +398,10 @@ win_window_info::win_window_info(running_machine &machine)
win_window_info::~win_window_info()
{
+ if (m_renderer != nullptr)
+ {
+ delete m_renderer;
+ }
}
@@ -1283,7 +1310,7 @@ int win_window_info::complete_create()
// finish off by trying to initialize DirectX; if we fail, ignore it
if (m_renderer != nullptr)
{
- global_free(m_renderer);
+ delete m_renderer;
}
m_renderer = osd_renderer::make_for_type(video_config.mode, reinterpret_cast<osd_window *>(this));
if (m_renderer->create())
@@ -1938,7 +1965,7 @@ void win_window_info::set_fullscreen(int fullscreen)
m_fullscreen = fullscreen;
// kill off the drawers
- global_free(m_renderer);
+ delete m_renderer;
m_renderer = nullptr;
// hide ourself
@@ -1996,10 +2023,6 @@ void win_window_info::set_fullscreen(int fullscreen)
if (video_config.mode != VIDEO_MODE_NONE)
ShowWindow(m_hwnd, SW_SHOW);
- if (m_renderer != nullptr)
- {
- delete m_renderer;
- }
m_renderer = reinterpret_cast<osd_renderer *>(osd_renderer::make_for_type(video_config.mode, reinterpret_cast<osd_window *>(this)));
if (m_renderer->create())
exit(1);