summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/emu/render.cpp10
-rw-r--r--src/emu/render.h4
-rw-r--r--src/emu/rendlay.cpp9
-rw-r--r--src/emu/screen.cpp3
-rw-r--r--src/frontend/mame/luaengine.cpp16
-rw-r--r--src/frontend/mame/luaengine.h3
-rw-r--r--src/frontend/mame/luaengine.ipp53
-rw-r--r--src/frontend/mame/luaengine_input.cpp23
-rw-r--r--src/frontend/mame/luaengine_render.cpp306
-rw-r--r--src/frontend/mame/ui/ui.cpp21
-rw-r--r--src/frontend/mame/ui/videoopt.cpp3
-rw-r--r--src/mame/drivers/goldnpkr.cpp378
-rw-r--r--src/mame/layout/upndown.lay18
-rw-r--r--src/mame/mame.lst24
-rw-r--r--src/mame/tiny.lst34
-rw-r--r--src/osd/modules/render/drawogl.cpp3
16 files changed, 318 insertions, 590 deletions
diff --git a/src/emu/render.cpp b/src/emu/render.cpp
index b2e278a59ea..26b7057ffb3 100644
--- a/src/emu/render.cpp
+++ b/src/emu/render.cpp
@@ -2634,10 +2634,8 @@ void render_target::config_load(util::xml::data_node const &targetnode)
// apply the opposite orientation to the UI
if (is_ui_target())
{
- render_container::user_settings settings;
render_container &ui_container = m_manager.ui_container();
-
- ui_container.get_user_settings(settings);
+ render_container::user_settings settings = ui_container.get_user_settings();
settings.m_orientation = orientation_add(orientation_reverse(rotate), settings.m_orientation);
ui_container.set_user_settings(settings);
}
@@ -3326,10 +3324,9 @@ void render_manager::config_load(config_type cfg_type, util::xml::data_node cons
{
int const index = screennode->get_attribute_int("index", -1);
render_container *container = m_screen_container_list.find(index);
- render_container::user_settings settings;
// fetch current settings
- container->get_user_settings(settings);
+ render_container::user_settings settings = container->get_user_settings();
// fetch color controls
settings.m_brightness = screennode->get_attribute_float("brightness", settings.m_brightness);
@@ -3395,8 +3392,7 @@ void render_manager::config_save(config_type cfg_type, util::xml::data_node *par
// output the basics
screennode->set_attribute_int("index", scrnum);
- render_container::user_settings settings;
- container->get_user_settings(settings);
+ render_container::user_settings settings = container->get_user_settings();
// output the color controls
if (settings.m_brightness != machine().options().brightness())
diff --git a/src/emu/render.h b/src/emu/render.h
index 3b945a08b8c..694c5bc8784 100644
--- a/src/emu/render.h
+++ b/src/emu/render.h
@@ -444,8 +444,8 @@ public:
float yscale() const { return m_user.m_yscale; }
float xoffset() const { return m_user.m_xoffset; }
float yoffset() const { return m_user.m_yoffset; }
- bool is_empty() const { return (m_itemlist.count() == 0); }
- void get_user_settings(user_settings &settings) const { settings = m_user; }
+ bool is_empty() const { return m_itemlist.empty(); }
+ const user_settings &get_user_settings() const { return m_user; }
// setters
void set_overlay(bitmap_argb32 *bitmap);
diff --git a/src/emu/rendlay.cpp b/src/emu/rendlay.cpp
index 50882d0d214..a71857175e1 100644
--- a/src/emu/rendlay.cpp
+++ b/src/emu/rendlay.cpp
@@ -5064,9 +5064,12 @@ layout_file::layout_file(
}
// load the content of the first script node
- util::xml::data_node const *const scriptnode = mamelayoutnode->get_child("script");
- if (scriptnode)
- emulator_info::layout_script_cb(*this, scriptnode->get_value());
+ if (!m_viewlist.empty())
+ {
+ util::xml::data_node const *const scriptnode = mamelayoutnode->get_child("script");
+ if (scriptnode)
+ emulator_info::layout_script_cb(*this, scriptnode->get_value());
+ }
}
catch (layout_syntax_error const &err)
{
diff --git a/src/emu/screen.cpp b/src/emu/screen.cpp
index 88e0dc00e8c..7b84b3d9b6b 100644
--- a/src/emu/screen.cpp
+++ b/src/emu/screen.cpp
@@ -826,8 +826,7 @@ void screen_device::device_start()
m_texture[1]->set_id((u64(m_unique_id) << 57) | 1);
// configure the default cliparea
- render_container::user_settings settings;
- m_container->get_user_settings(settings);
+ render_container::user_settings settings = m_container->get_user_settings();
settings.m_xoffset = m_xoffset;
settings.m_yoffset = m_yoffset;
settings.m_xscale = m_xscale;
diff --git a/src/frontend/mame/luaengine.cpp b/src/frontend/mame/luaengine.cpp
index 488bd2bc571..45e6367bdfc 100644
--- a/src/frontend/mame/luaengine.cpp
+++ b/src/frontend/mame/luaengine.cpp
@@ -79,7 +79,7 @@ int sol_lua_push(sol::types<buffer *>, lua_State *L, buffer *value)
}
template <typename T>
-struct usertype_container<lua_engine::devenum<T> > : lua_engine::immutable_container_helper<lua_engine::devenum<T>, T>
+struct usertype_container<lua_engine::devenum<T> > : lua_engine::immutable_collection_helper<lua_engine::devenum<T>, T>
{
private:
using enumerator = lua_engine::devenum<T>;
@@ -182,7 +182,7 @@ public:
template <typename T>
-struct usertype_container<lua_engine::object_ptr_vector_wrapper<T> > : lua_engine::immutable_container_helper<lua_engine::object_ptr_vector_wrapper<T>, std::vector<std::unique_ptr<T>> const, typename std::vector<std::unique_ptr<T>>::const_iterator>
+struct usertype_container<lua_engine::object_ptr_vector_wrapper<T> > : lua_engine::immutable_collection_helper<lua_engine::object_ptr_vector_wrapper<T>, std::vector<std::unique_ptr<T>> const, typename std::vector<std::unique_ptr<T>>::const_iterator>
{
private:
static int next_pairs(lua_State *L)
@@ -1173,6 +1173,7 @@ void lua_engine::initialize()
* machine:popmessage(str) - print str as popup
* machine:popmessage() - clear displayed popup message
* machine:logerror(str) - print str to log
+ *
* machine:system() - get game_driver for running driver
* machine:video() - get video_manager
* machine:sound() - get sound_manager
@@ -1196,7 +1197,7 @@ void lua_engine::initialize()
* machine.images[] - get available image devices table (k=type, v=device_image_interface)
*/
- auto machine_type = sol().registry().new_usertype<running_machine>("machine", "new", sol::no_constructor);
+ auto machine_type = sol().registry().new_usertype<running_machine>("machine", sol::no_constructor);
machine_type["exit"] = &running_machine::schedule_exit;
machine_type["hard_reset"] = &running_machine::schedule_hard_reset;
machine_type["soft_reset"] = &running_machine::schedule_soft_reset;
@@ -1231,6 +1232,9 @@ void lua_engine::initialize()
return false;
}
};
+ machine_type["popmessage"] = sol::overload(
+ [](running_machine &m, const char *str) { m.popmessage("%s", str); },
+ [](running_machine &m) { m.popmessage(); });
machine_type["system"] = &running_machine::system;
machine_type["video"] = &running_machine::video;
machine_type["sound"] = &running_machine::sound;
@@ -1245,7 +1249,7 @@ void lua_engine::initialize()
machine_type["debugger"] =
[this] (running_machine &m) -> sol::object
{
- if(!(m.debug_flags & DEBUG_FLAG_ENABLED))
+ if (!(m.debug_flags & DEBUG_FLAG_ENABLED))
return sol::make_object(sol(), sol::lua_nil);
return sol::make_object(sol(), &m.debugger());
};
@@ -1258,9 +1262,6 @@ void lua_engine::initialize()
machine_type["cassettes"] = sol::property([] (running_machine &m) { return devenum<cassette_device_enumerator>(m.root_device()); });
machine_type["images"] = sol::property([] (running_machine &m) { return devenum<image_interface_enumerator>(m.root_device()); });
machine_type["slots"] = sol::property([](running_machine &m) { return devenum<slot_interface_enumerator>(m.root_device()); });
- machine_type["popmessage"] = sol::overload(
- [](running_machine &m, const char *str) { m.popmessage("%s", str); },
- [](running_machine &m) { m.popmessage(); });
machine_type["logerror"] = [] (running_machine &m, const char *str) { m.logerror("[luaengine] %s\n", str); };
@@ -1608,6 +1609,7 @@ void lua_engine::initialize()
"screen_dev",
sol::no_constructor,
sol::base_classes, sol::bases<device_t>());
+ screen_dev_type.set("container", sol::property(&screen_device::container));
screen_dev_type.set("draw_box", [](screen_device &sdev, float x1, float y1, float x2, float y2, uint32_t bgcolor, uint32_t fgcolor) {
int sc_width = sdev.visible_area().width();
int sc_height = sdev.visible_area().height();
diff --git a/src/frontend/mame/luaengine.h b/src/frontend/mame/luaengine.h
index 1157d2083c2..b0bbf2210c3 100644
--- a/src/frontend/mame/luaengine.h
+++ b/src/frontend/mame/luaengine.h
@@ -37,7 +37,8 @@ public:
template <typename T> struct object_ptr_vector_wrapper;
template <typename T> struct tag_object_ptr_map;
template <typename T> using standard_tag_object_ptr_map = tag_object_ptr_map<std::unordered_map<std::string, std::unique_ptr<T> > >;
- template <typename T, typename C, typename I = typename C::iterator> struct immutable_container_helper;
+ template <typename T> struct immutable_container_helper;
+ template <typename T, typename C, typename I = typename C::iterator> struct immutable_collection_helper;
// construction/destruction
lua_engine();
diff --git a/src/frontend/mame/luaengine.ipp b/src/frontend/mame/luaengine.ipp
index ee4eb5d0030..3c878b68c2a 100644
--- a/src/frontend/mame/luaengine.ipp
+++ b/src/frontend/mame/luaengine.ipp
@@ -96,7 +96,7 @@ template <typename T> struct usertype_container<lua_engine::devenum<T> >;
template <typename T>
-struct usertype_container<lua_engine::simple_list_wrapper<T> > : lua_engine::immutable_container_helper<lua_engine::simple_list_wrapper<T>, simple_list<T> const, typename simple_list<T>::auto_iterator>
+struct usertype_container<lua_engine::simple_list_wrapper<T> > : lua_engine::immutable_collection_helper<lua_engine::simple_list_wrapper<T>, simple_list<T> const, typename simple_list<T>::auto_iterator>
{
private:
static int next_pairs(lua_State *L)
@@ -163,7 +163,7 @@ public:
template <typename T>
-struct usertype_container<lua_engine::tag_object_ptr_map<T> > : lua_engine::immutable_container_helper<lua_engine::tag_object_ptr_map<T>, T const, typename T::const_iterator>
+struct usertype_container<lua_engine::tag_object_ptr_map<T> > : lua_engine::immutable_collection_helper<lua_engine::tag_object_ptr_map<T>, T const, typename T::const_iterator>
{
private:
template <bool Indexed>
@@ -269,12 +269,10 @@ bool sol_lua_check(sol::types<osd_file::error>, lua_State *L, int index, Handler
int sol_lua_push(sol::types<map_handler_type>, lua_State *L, map_handler_type &&value);
-template <typename T, typename C, typename I>
+template <typename T>
struct lua_engine::immutable_container_helper
{
protected:
- using iterator = I;
-
static T &get_self(lua_State *L)
{
auto p(sol::stack::unqualified_check_get<T *>(L, 1));
@@ -285,22 +283,6 @@ protected:
return **p;
}
- struct indexed_iterator
- {
- indexed_iterator(C &s, iterator i) : src(s), it(i), ix(0U) { }
-
- C &src;
- iterator it;
- std::size_t ix;
-
- indexed_iterator &operator++()
- {
- ++it;
- ++ix;
- return *this;
- }
- };
-
public:
static int set(lua_State *L)
{
@@ -327,6 +309,11 @@ public:
return luaL_error(L, "sol: cannot call 'find' on type '%s': no supported comparison operator for the value type", sol::detail::demangle<T>().c_str());
}
+ static int index_of(lua_State *L)
+ {
+ return luaL_error(L, "sol: cannot call 'index_of' on type '%s': no supported comparison operator for the value type", sol::detail::demangle<T>().c_str());
+ }
+
static int clear(lua_State *L)
{
return luaL_error(L, "sol: cannot call 'clear' on type '%s': container is not modifiable", sol::detail::demangle<T>().c_str());
@@ -339,6 +326,30 @@ public:
};
+template <typename T, typename C, typename I>
+struct lua_engine::immutable_collection_helper : immutable_container_helper<T>
+{
+protected:
+ using iterator = I;
+
+ struct indexed_iterator
+ {
+ indexed_iterator(C &s, iterator i) : src(s), it(i), ix(0U) { }
+
+ C &src;
+ iterator it;
+ std::size_t ix;
+
+ indexed_iterator &operator++()
+ {
+ ++it;
+ ++ix;
+ return *this;
+ }
+ };
+};
+
+
struct lua_engine::addr_space
{
addr_space(address_space &s, device_memory_interface &d) : space(s), dev(d) { }
diff --git a/src/frontend/mame/luaengine_input.cpp b/src/frontend/mame/luaengine_input.cpp
index 30a4d34c181..77e002ce848 100644
--- a/src/frontend/mame/luaengine_input.cpp
+++ b/src/frontend/mame/luaengine_input.cpp
@@ -48,19 +48,9 @@ template <> struct is_container<natkbd_kbd_list> : std::true_type { };
template <>
-struct usertype_container<natkbd_kbd_list>
+struct usertype_container<natkbd_kbd_list> : lua_engine::immutable_container_helper<natkbd_kbd_list>
{
private:
- static natkbd_kbd_list &get_self(lua_State *L)
- {
- auto p(sol::stack::unqualified_check_get<natkbd_kbd_list *>(L, 1));
- if (!p)
- luaL_error(L, "sol: 'self' is not of type 'natkbd_kbd_list' (pass 'self' as first argument with ':' or call on proper type)");
- if (!*p)
- luaL_error(L, "sol: 'self' argument is nil (pass 'self' as first argument with ':' or call on a 'natkbd_kbd_list' type");
- return **p;
- }
-
template <bool Indexed>
static int next_pairs(lua_State *L)
{
@@ -127,17 +117,6 @@ public:
return stack::push(L, !self.manager.keyboard_count());
}
- // produce errors for unsupported operations
- static int set(lua_State *L) { return luaL_error(L, "sol: cannot call 'set(key, value)' on type 'natkbd_kbd_list': container is not modifiable"); }
- static int index_set(lua_State *L) { return luaL_error(L, "sol: cannot call 'container[key] = value' on type 'natkbd_kbd_list': container is not modifiable"); }
- static int add(lua_State *L) { return luaL_error(L, "sol: cannot call 'add' on type 'natkbd_kbd_list': container is not modifiable"); }
- static int insert(lua_State *L) { return luaL_error(L, "sol: cannot call 'insert' on type 'natkbd_kbd_list': container is not modifiable"); }
- static int find(lua_State *L) { return luaL_error(L, "sol: cannot call 'find' on type 'natkbd_kbd_list': no supported comparison operator for the value type"); }
- static int index_of(lua_State *L) { return luaL_error(L, "sol: cannot call 'index_of' on type 'natkbd_kbd_list': no supported comparison operator for the value type"); }
- static int clear(lua_State *L) { return luaL_error(L, "sol: cannot call 'clear' on type 'natkbd_kbd_list': container is not modifiable"); }
- static int erase(lua_State *L) { return luaL_error(L, "sol: cannot call 'erase' on type 'natkbd_kbd_list': container is not modifiable"); }
-
- // support for iteration with pairs and ipairs
static int next(lua_State *L) { return stack::push(L, next_pairs<false>); }
static int pairs(lua_State *L) { return start_pairs<false>(L); }
static int ipairs(lua_State *L) { return start_pairs<true>(L); }
diff --git a/src/frontend/mame/luaengine_render.cpp b/src/frontend/mame/luaengine_render.cpp
index 9fff8f4171b..ca472dba675 100644
--- a/src/frontend/mame/luaengine_render.cpp
+++ b/src/frontend/mame/luaengine_render.cpp
@@ -33,6 +33,15 @@ struct layout_view_items
layout_view &view;
};
+
+struct render_target_view_names
+{
+ render_target_view_names(render_target &t) : target(t), count(-1) { }
+
+ render_target &target;
+ int count;
+};
+
} // anonymous namespace
@@ -40,10 +49,11 @@ namespace sol {
template <> struct is_container<layout_file_views> : std::true_type { };
template <> struct is_container<layout_view_items> : std::true_type { };
+template <> struct is_container<render_target_view_names> : std::true_type { };
template <>
-struct usertype_container<layout_file_views> : lua_engine::immutable_container_helper<layout_file_views, layout_file::view_list>
+struct usertype_container<layout_file_views> : lua_engine::immutable_collection_helper<layout_file_views, layout_file::view_list>
{
private:
using view_list = layout_file::view_list;
@@ -140,7 +150,7 @@ public:
template <>
-struct usertype_container<layout_view_items> : lua_engine::immutable_container_helper<layout_view_items, layout_view::item_list>
+struct usertype_container<layout_view_items> : lua_engine::immutable_collection_helper<layout_view_items, layout_view::item_list>
{
private:
using item_list = layout_view::item_list;
@@ -231,6 +241,102 @@ public:
}
};
+
+template <>
+struct usertype_container<render_target_view_names> : lua_engine::immutable_container_helper<render_target_view_names>
+{
+private:
+ struct iterator
+ {
+ iterator(render_target &t, unsigned i) : target(t), index(i) { }
+
+ render_target &target;
+ unsigned index;
+ };
+
+ static int next_pairs(lua_State *L)
+ {
+ iterator &i(stack::unqualified_get<user<iterator> >(L, 1));
+ char const *name(i.target.view_name(i.index));
+ if (!name)
+ return stack::push(L, lua_nil);
+ int result = stack::push(L, i.index + 1);
+ result += stack::push(L, name);
+ ++i.index;
+ return result;
+ }
+
+public:
+ static int at(lua_State *L)
+ {
+ render_target_view_names &self(get_self(L));
+ unsigned const index(stack::unqualified_get<unsigned>(L, 2));
+ return stack::push(L, self.target.view_name(index - 1));
+ }
+
+ static int get(lua_State *L)
+ {
+ return at(L);
+ }
+
+ static int index_get(lua_State *L)
+ {
+ return at(L);
+ }
+
+ static int find(lua_State *L)
+ {
+ render_target_view_names &self(get_self(L));
+ char const *const key(stack::unqualified_get<char const *>(L, 2));
+ for (unsigned i = 0; ; ++i)
+ {
+ char const *const name(self.target.view_name(i));
+ if (!name)
+ return stack::push(L, lua_nil);
+ else if (!std::strcmp(key, name))
+ return stack::push(L, i + 1);
+ }
+ }
+
+ static int index_of(lua_State *L)
+ {
+ return find(L);
+ }
+
+ static int size(lua_State *L)
+ {
+ render_target_view_names &self(get_self(L));
+ if (0 > self.count)
+ for (self.count = 0; self.target.view_name(self.count); ++self.count) { }
+ return stack::push(L, self.count);
+ }
+
+ static int empty(lua_State *L)
+ {
+ render_target_view_names &self(get_self(L));
+ return stack::push(L, !self.target.view_name(0));
+ }
+
+ static int next(lua_State *L)
+ {
+ return stack::push(L, next_pairs);
+ }
+
+ static int pairs(lua_State *L)
+ {
+ render_target_view_names &self(get_self(L));
+ stack::push(L, next_pairs);
+ stack::push<user<iterator> >(L, self.target, 0);
+ stack::push(L, lua_nil);
+ return 3;
+ }
+
+ static int ipairs(lua_State *L)
+ {
+ return pairs(L);
+ }
+};
+
} // namespace sol
@@ -241,20 +347,6 @@ public:
void lua_engine::initialize_render(sol::table &emu)
{
-/* render_bounds library
- *
- * bounds:includes(x, y) - returns true if point is within bounds
- * bounds:set_xy(left, top, right, bottom) - set bounds
- * bounds:set_wh(left, top, width, height) - set bounds
- *
- * bounds.x0 - leftmost X coordinate
- * bounds.y0 - topmost Y coordinate
- * bounds.x1 - rightmost X coordinate
- * bounds.y1 - bottommost Y coordinate
- * bounds.width - get/set width
- * bounds.height - get/set height
- * bounds.aspect - read-only aspect ratio width:height
- */
auto bounds_type = emu.new_usertype<render_bounds>(
"render_bounds",
sol::call_constructor, sol::initializers(
@@ -272,15 +364,6 @@ void lua_engine::initialize_render(sol::table &emu)
bounds_type["aspect"] = sol::property(&render_bounds::aspect);
-/* render_color library
- *
- * set(a, r, g, b) - set color
- *
- * color.a - alpha channel
- * color.r - red channel
- * color.g - green channel
- * color.b - blue channel
- */
auto color_type = emu.new_usertype<render_color>(
"render_color",
sol::call_constructor, sol::initializers(
@@ -293,24 +376,6 @@ void lua_engine::initialize_render(sol::table &emu)
color_type["b"] = &render_color::b;
-/* layout_view library
- *
- * manager:machine():render().targets[target_index]:current_view()
- *
- * view:has_screen(screen) - returns whether a given screen is present in the view (including hidden screens)
- * view:set_prepare_items_callback(cb) - set additional tasks before adding items to render target
- * view:set_preload_callback(cb) - set additional tasks after preloading visible items
- * view:set_recomputed_callback(cb) - set additional tasks after recomputing for resize or visibility change
- *
- * view.items - get the items in the view (including hidden items)
- * view.name - display name for the view
- * view.unqualified_name - name of the view as specified in the layout file
- * view.visible_screen_count - number of screens items currently enabled
- * view.effective_aspect - effective aspect ratio in current configuration
- * view.bounds - effective bounds in current configuration
- * view.has_art - true if the view has non-screen items
- */
-
auto layout_view_type = sol().registry().new_usertype<layout_view>("layout_view", sol::no_constructor);
layout_view_type["has_screen"] = &layout_view::has_screen;
layout_view_type["set_prepare_items_callback"] =
@@ -340,25 +405,6 @@ void lua_engine::initialize_render(sol::table &emu)
layout_view_type["has_art"] = sol::property(&layout_view::has_art);
-/* layout_view::item library
- *
- * item:set_state(state) - set state value used in absence of bindings
- * item.set_element_state_callback(cb) - set callback to obtain element state
- * item.set_animation_state_callback(cb) - set callback to obtain animation state
- * item.set_bounds_callback(cb) - set callback to obtain item bounds
- * item.set_color_callback(cb) - set callback to obtain item color
- *
- * item.id - get optional item identifier
- * item.bounds_animated - true if bounds depend on state
- * item.color_animated - true if color depends on state
- * item.bounds - get bounds for current state
- * item.color - get color for current state
- * item.blend_mode - get blend mode or -1
- * item.orientation - get item orientation
- * item.element_state - get effective element state
- * item.animation_state - get effective animation state
- */
-
auto layout_view_item_type = sol().registry().new_usertype<layout_view::item>("layout_item", sol::no_constructor);
layout_view_item_type["set_state"] = &layout_view::item::set_state;
layout_view_item_type["set_element_state_callback"] =
@@ -449,14 +495,6 @@ void lua_engine::initialize_render(sol::table &emu)
layout_view_item_type["animation_state"] = sol::property(&layout_view::item::animation_state);
-/* layout_file library
- *
- * file:set_resolve_tags_callback(cb) - set additional tasks after resolving tags
- *
- * file.device - get device that caused the file to be loaded
- * file.views[] - get view table (k=name, v=layout_view)
- */
-
auto layout_file_type = sol().registry().new_usertype<layout_file>("layout_file", sol::no_constructor);
layout_file_type["set_resolve_tags_callback"] =
make_simple_callback_setter<void>(
@@ -468,79 +506,85 @@ void lua_engine::initialize_render(sol::table &emu)
layout_file_type["views"] = sol::property([] (layout_file &f) { return layout_file_views(f); });
-/* render_target library
- *
- * manager:machine():render().targets[target_index]
- * manager:machine():render():ui_target()
- *
- * target:current_view() - get current view for target
- * target:width() - get target width
- * target:height() - get target height
- * target:pixel_aspect() - get target aspect
- * target:hidden() - is target hidden
- * target:is_ui_target() - is ui render target
- * target:index() - target index
- * target:view_name([opt] index) - current target layout view name
- *
- * target.max_update_rate -
- * target.view - current target layout view
- * target.orientation - current target orientation
- * target.screen_overlay - enable overlays
- * target.zoom - enable zoom
- */
-
auto target_type = sol().registry().new_usertype<render_target>("target", sol::no_constructor);
- target_type["current_view"] = &render_target::current_view;
- target_type["width"] = &render_target::width;
- target_type["height"] = &render_target::height;
- target_type["pixel_aspect"] = &render_target::pixel_aspect;
- target_type["hidden"] = &render_target::hidden;
- target_type["is_ui_target"] = &render_target::is_ui_target;
- target_type["index"] = &render_target::index;
- target_type["view_name"] = &render_target::view_name;
+ target_type["index"] = sol::property([] (render_target const &t) { return t.index() + 1; });
+ target_type["width"] = sol::property(&render_target::width);
+ target_type["height"] = sol::property(&render_target::height);
+ target_type["pixel_aspect"] = sol::property(&render_target::pixel_aspect);
+ target_type["hidden"] = sol::property(&render_target::hidden);
+ target_type["is_ui_target"] = sol::property(&render_target::is_ui_target);
target_type["max_update_rate"] = sol::property(&render_target::max_update_rate, &render_target::set_max_update_rate);
- target_type["view"] = sol::property(&render_target::view, &render_target::set_view);
target_type["orientation"] = sol::property(&render_target::orientation, &render_target::set_orientation);
+ target_type["view_names"] = sol::property([] (render_target &t) { return render_target_view_names(t); });
+ target_type["current_view"] = sol::property(&render_target::current_view);
+ target_type["view_index"] = sol::property(
+ [] (render_target const &t) { return t.view() + 1; },
+ [] (render_target &t, unsigned v) { t.set_view(v - 1); });
+ target_type["visibility_mask"] = sol::property(&render_target::visibility_mask);
target_type["screen_overlay"] = sol::property(&render_target::screen_overlay_enabled, &render_target::set_screen_overlay_enabled);
- target_type["zoom"] = sol::property(&render_target::zoom_to_screen, &render_target::set_zoom_to_screen);
-
+ target_type["zoom_to_screen"] = sol::property(&render_target::zoom_to_screen, &render_target::set_zoom_to_screen);
-/* render_container library
- *
- * manager:machine():render():ui_container()
- *
- * container.orientation
- * container.xscale
- * container.yscale
- * container.xoffset
- * container.yoffset
- * container.is_empty
- */
auto render_container_type = sol().registry().new_usertype<render_container>("render_container", sol::no_constructor);
- render_container_type["orientation"] = sol::property(&render_container::orientation);
- render_container_type["xscale"] = sol::property(&render_container::xscale);
- render_container_type["yscale"] = sol::property(&render_container::yscale);
- render_container_type["xoffset"] = sol::property(&render_container::xoffset);
- render_container_type["yoffset"] = sol::property(&render_container::yoffset);
+ render_container_type["user_settings"] = sol::property(&render_container::get_user_settings, &render_container::set_user_settings);
+ render_container_type["orientation"] = sol::property(
+ &render_container::orientation,
+ [] (render_container &c, int v)
+ {
+ render_container::user_settings s(c.get_user_settings());
+ s.m_orientation = v;
+ c.set_user_settings(s);
+ });
+ render_container_type["xscale"] = sol::property(
+ &render_container::xscale,
+ [] (render_container &c, float v)
+ {
+ render_container::user_settings s(c.get_user_settings());
+ s.m_xscale = v;
+ c.set_user_settings(s);
+ });
+ render_container_type["yscale"] = sol::property(
+ &render_container::yscale,
+ [] (render_container &c, float v)
+ {
+ render_container::user_settings s(c.get_user_settings());
+ s.m_yscale = v;
+ c.set_user_settings(s);
+ });
+ render_container_type["xoffset"] = sol::property(
+ &render_container::xoffset,
+ [] (render_container &c, float v)
+ {
+ render_container::user_settings s(c.get_user_settings());
+ s.m_xoffset = v;
+ c.set_user_settings(s);
+ });
+ render_container_type["yoffset"] = sol::property(
+ &render_container::yoffset,
+ [] (render_container &c, float v)
+ {
+ render_container::user_settings s(c.get_user_settings());
+ s.m_yoffset = v;
+ c.set_user_settings(s);
+ });
render_container_type["is_empty"] = sol::property(&render_container::is_empty);
-/* render_manager library
- *
- * manager:machine():render()
- *
- * render:max_update_rate() -
- * render:ui_target() - render_target for ui drawing
- * render:ui_container() - render_container for ui drawing
- *
- * render.targets[] - render_target table
- */
+ auto user_settings_type = sol().registry().new_usertype<render_container::user_settings>("render_container_settings", sol::no_constructor);
+ user_settings_type["orientation"] = &render_container::user_settings::m_orientation;
+ user_settings_type["brightness"] = &render_container::user_settings::m_brightness;
+ user_settings_type["contrast"] = &render_container::user_settings::m_contrast;
+ user_settings_type["gamma"] = &render_container::user_settings::m_gamma;
+ user_settings_type["xscale"] = &render_container::user_settings::m_xscale;
+ user_settings_type["yscale"] = &render_container::user_settings::m_yscale;
+ user_settings_type["xoffset"] = &render_container::user_settings::m_xoffset;
+ user_settings_type["yoffset"] = &render_container::user_settings::m_yoffset;
+
auto render_type = sol().registry().new_usertype<render_manager>("render", sol::no_constructor);
- render_type["max_update_rate"] = &render_manager::max_update_rate;
- render_type["ui_target"] = &render_manager::ui_target;
- render_type["ui_container"] = &render_manager::ui_container;
+ render_type["max_update_rate"] = sol::property(&render_manager::max_update_rate);
+ render_type["ui_target"] = sol::property(&render_manager::ui_target);
+ render_type["ui_container"] = sol::property(&render_manager::ui_container);
render_type["targets"] = sol::property([] (render_manager &m) { return simple_list_wrapper<render_target>(m.targets()); });
}
diff --git a/src/frontend/mame/ui/ui.cpp b/src/frontend/mame/ui/ui.cpp
index 1400cc19295..5918d0e13d6 100644
--- a/src/frontend/mame/ui/ui.cpp
+++ b/src/frontend/mame/ui/ui.cpp
@@ -1839,9 +1839,8 @@ int32_t mame_ui_manager::slider_refresh(running_machine &machine, void *arg, int
int32_t mame_ui_manager::slider_brightness(running_machine &machine, void *arg, int id, std::string *str, int32_t newval)
{
screen_device *screen = reinterpret_cast<screen_device *>(arg);
- render_container::user_settings settings;
- screen->container().get_user_settings(settings);
+ render_container::user_settings settings = screen->container().get_user_settings();
if (newval != SLIDER_NOCHANGE)
{
settings.m_brightness = (float)newval * 0.001f;
@@ -1861,9 +1860,8 @@ int32_t mame_ui_manager::slider_brightness(running_machine &machine, void *arg,
int32_t mame_ui_manager::slider_contrast(running_machine &machine, void *arg, int id, std::string *str, int32_t newval)
{
screen_device *screen = reinterpret_cast<screen_device *>(arg);
- render_container::user_settings settings;
- screen->container().get_user_settings(settings);
+ render_container::user_settings settings = screen->container().get_user_settings();
if (newval != SLIDER_NOCHANGE)
{
settings.m_contrast = (float)newval * 0.001f;
@@ -1882,9 +1880,8 @@ int32_t mame_ui_manager::slider_contrast(running_machine &machine, void *arg, in
int32_t mame_ui_manager::slider_gamma(running_machine &machine, void *arg, int id, std::string *str, int32_t newval)
{
screen_device *screen = reinterpret_cast<screen_device *>(arg);
- render_container::user_settings settings;
- screen->container().get_user_settings(settings);
+ render_container::user_settings settings = screen->container().get_user_settings();
if (newval != SLIDER_NOCHANGE)
{
settings.m_gamma = (float)newval * 0.001f;
@@ -1904,9 +1901,8 @@ int32_t mame_ui_manager::slider_gamma(running_machine &machine, void *arg, int i
int32_t mame_ui_manager::slider_xscale(running_machine &machine, void *arg, int id, std::string *str, int32_t newval)
{
screen_device *screen = reinterpret_cast<screen_device *>(arg);
- render_container::user_settings settings;
- screen->container().get_user_settings(settings);
+ render_container::user_settings settings = screen->container().get_user_settings();
if (newval != SLIDER_NOCHANGE)
{
settings.m_xscale = (float)newval * 0.001f;
@@ -1926,9 +1922,8 @@ int32_t mame_ui_manager::slider_xscale(running_machine &machine, void *arg, int
int32_t mame_ui_manager::slider_yscale(running_machine &machine, void *arg, int id, std::string *str, int32_t newval)
{
screen_device *screen = reinterpret_cast<screen_device *>(arg);
- render_container::user_settings settings;
- screen->container().get_user_settings(settings);
+ render_container::user_settings settings = screen->container().get_user_settings();
if (newval != SLIDER_NOCHANGE)
{
settings.m_yscale = (float)newval * 0.001f;
@@ -1948,9 +1943,8 @@ int32_t mame_ui_manager::slider_yscale(running_machine &machine, void *arg, int
int32_t mame_ui_manager::slider_xoffset(running_machine &machine, void *arg, int id, std::string *str, int32_t newval)
{
screen_device *screen = reinterpret_cast<screen_device *>(arg);
- render_container::user_settings settings;
- screen->container().get_user_settings(settings);
+ render_container::user_settings settings = screen->container().get_user_settings();
if (newval != SLIDER_NOCHANGE)
{
settings.m_xoffset = (float)newval * 0.001f;
@@ -1970,9 +1964,8 @@ int32_t mame_ui_manager::slider_xoffset(running_machine &machine, void *arg, int
int32_t mame_ui_manager::slider_yoffset(running_machine &machine, void *arg, int id, std::string *str, int32_t newval)
{
screen_device *screen = reinterpret_cast<screen_device *>(arg);
- render_container::user_settings settings;
- screen->container().get_user_settings(settings);
+ render_container::user_settings settings = screen->container().get_user_settings();
if (newval != SLIDER_NOCHANGE)
{
settings.m_yoffset = (float)newval * 0.001f;
diff --git a/src/frontend/mame/ui/videoopt.cpp b/src/frontend/mame/ui/videoopt.cpp
index da8a554d550..81b01365764 100644
--- a/src/frontend/mame/ui/videoopt.cpp
+++ b/src/frontend/mame/ui/videoopt.cpp
@@ -152,8 +152,7 @@ void menu_video_options::handle()
m_target.set_orientation(orientation_add(delta, m_target.orientation()));
if (m_target.is_ui_target())
{
- render_container::user_settings settings;
- container().get_user_settings(settings);
+ render_container::user_settings settings = container().get_user_settings();
settings.m_orientation = orientation_add(delta ^ ROT180, settings.m_orientation);
container().set_user_settings(settings);
}
diff --git a/src/mame/drivers/goldnpkr.cpp b/src/mame/drivers/goldnpkr.cpp
index a1f1522eddb..5d62be8fda9 100644
--- a/src/mame/drivers/goldnpkr.cpp
+++ b/src/mame/drivers/goldnpkr.cpp
@@ -959,338 +959,6 @@
************************************************************************************
- DRIVER UPDATES:
-
-
- [2006-09-02]
-
- - Initial release.
-
-
- [2006-09-06]
-
- - Understood the GFX banks:
- - 1 bank (1bpp) for text layer and minor graphics.
- - 1 bank (3bpp) for the undumped cards deck graphics.
-
- - Partially added inputs through 6821 PIAs.
- ("Bitte techniker rufen" error messages. Press 'W' to reset the machine)
-
- - Confirmed the CPU as 6502. (was in doubt due to use of illegal opcodes)
-
-
- [2006-09-15]
-
- - Confirmed the GFX banks (a complete dump appeared!).
- - Improved technical notes and added a PCB layout based on PCB picture.
- - Found and fixed the 3rd bitplane of BigBoy gfx.
- - Renamed Big-Boy to Golden Poker Double Up. (Big-Boy and Mini-Boy are names of cabinet models).
- - Added 'Joker Poker' (Golden Poker version without the 'double-up' feature).
- - Added 'Jack Potten's Poker' (same as Joker Poker, but with 'Aces or better' instead of jacks).
- - Simulated colors for all sets till color PROMs appear.
- - Fixed bit corruption in goldnpkr rom u40_4a.bin.
- - Completed inputs in all sets (except DIP switches).
- - Removed flags MACHINE_WRONG_COLORS and MACHINE_IMPERFECT_GRAPHICS in all sets.
- - Removed flag MACHINE_NOT_WORKING. All sets are now playable. :)
-
-
- [2006-10-09]
-
- - Added service/settings mode to pmpoker.
- - Added PORT_IMPULSE to manage correct timings for most inputs in all games.
- (jokerpkr still trigger more than 1 credit for coin pulse).
-
-
- [2007-02-01]
-
- - Crystal documented via #define.
- - CPU clock derived from #defined crystal value.
- - Replaced simulated colors with proper color prom decode.
- - Renamed "Golden Poker Double Up" to "Golden Poker Double Up (Big Boy)".
- - Added set Golden Poker Double Up (Mini Boy).
- - Cleaned up the driver a bit.
- - Updated technical notes.
-
-
- [2007-05-05]
-
- - Removed all inputs hacks.
- - Connected both PIAs properly.
- - Demuxed all inputs for each game.
- - Documented all outputs.
- - Added lamps support.
- - Created different layout files to cover each game.
- - Add NVRAM support to all games.
- - Corrected the color PROM status for each set.
- - Figured out most of the DIP switches.
- - Added diplocations to goldnpkb.
- - Replaced the remaining IPT_SERVICE with IPT_BUTTON for regular buttons.
- - Updated technical notes.
- - Cleaned up the driver. Now is better organized and documented.
-
-
- [2007-07-07]
-
- - Added set goldnpkc (Golden Poker without the double up feature).
- - Updated technical notes.
-
-
- [2008-10-12] *** REWRITE ***
-
- - Added discrete sound support to Golden Poker hardware games based on schematics.
- - Added discrete sound support to Potten's Poker hardware games based on PCB analysis.
- - Added discrete circuitry diagrams for both hardware types.
- - Adjusted the CPU addressing to 15 bits for pmpoker/goldenpkr hardware.
- - Adjusted the CPU addressing to 14 bits for pottnpkr hardware.
- - Rewrote all the ROM loads based on these changes.
- - Defined MASTER Xtal & CPU clock.
- - Fixed the visible area based on M6845 registers.
- - Improved the lamps layouts to be more realistic.
- - Added Good Luck (potten's poker hybrid running in goldnpkr hardware).
- - Added Buena Suerte (Spanish) x 2 sets.
- - Added set Royale.
- - Added Witch Card and Spanish variants.
- - Added Super Loco 93 (Spanish) x 2 sets.
- - Renamed set goldnpkc to pottnpkr (parent Jack Potten's Poker set).
- - Renamed set jokerpkr to potnpkra, since is another Jack Potten's Poker set.
- - Added other 2 clones of Jack Potten's Poker.
- - Renamed/cleaned all sets based on code/hardware analysis.
- - Added intensity bit to the color system.
- - Implemented the blue killer bit for Witch Card hardware.
- - Implemented the extended graphics addressing bit for Witch Card hardware.
- - Added proper visible area to sloco93.
- - Rewrote the graphics & color decode system based on schematics. No more patched codes.
- - Changed the char gfx bank structure and rom load according to the new routines.
- - Adjusted the amount of color codes and PROM region size accordingly.
- - Updated all notes.
-
-
- [2008-11-29] *** REWRITE (part II) ***
-
- - Changed the driver name to goldnpkr.c (Golden Poker is the most representative hardware).
- - Splitted the PIA interfases to cover witchcrd/pottenpkr connections.
- - Fixed the witchcrd/pottnpkr/sloco93 double up mode.
- - Replaced the pottenpkr layout with goldnpkr one in all Jack Potten's Poker sets.
- - Updated game notes for Witch Card and Super Loco 93 sets.
- - Fixed al inputs & lamps to allow double up mode to the above games.
- - Added Witch Card (Video Klein) but still not working.
- - Added several Buena Suerte! sets.
- - Added new games: Maverik, Brasil 89 & Poker'91.
- - Reworked the sets parent-clone relationship (still in progress).
-
-
- [2008-12-26]
-
- - Correctly setup the MC6845 device for all systems.
- - Added common MC6845 device interface.
- - Merged witchcrd and sloco93 machine drivers.
- - Added/corrected the 50/60 Hz. DIP switches to all games.
- The 50hz mode needs to be corrected. Some games as most bsuerte sets have
- the 50/60 Hz. DIP switch connection patched.
-
-
- [2009-09-05]
-
- - Added 2 new Witch Card sets.
- - Reworked inputs for Witch Card (German set 1).
- - Created new inputs for Witch Card (English, witch game, lamps).
- - Added and connected lamps for both sets.
- - Added minimal bet and 50/60 Hz. switches to both sets.
- - Added DIP switches info for Witch Card (German, set 2).
-
- - Added Genius, running in a modified Golden Poker board.
-
-
- [2010-09-28]
-
- - Added 3 new Witch Card sets.
- - Added 3 new Falcons Wild sets (from 3 different hardwares).
- - Hooked the second CPU (still encrypted) to the Falcon hardware.
- - Partially decrypted the second CPU program from Falcon hardware.
- - Figured out the Falcons Wild (Video Klein) memory map and machine.
- - Defeated the evil Video Klein's Witch Card hardware.
- - Reworked inputs for some sets.
- - Added lamps layouts/connections to the new sets.
- - Figured out the multiplexed data/address from Falcon's boards sound.
- - Added full sound support to Falcon hardware.
- - Reorganized and partially cleaned-up the driver.
- - Added more technical notes.
-
-
- [2010-11-18]
-
- - Added Karateco Super Double (French)
- - Extended ROM space for goldnpkr game to include the 0x2000..0x3fff range
-
-
- [2011-01-20]
-
- - Lots of changes to get working the Video Klein games.
- - Renamed witchcde to witchjol --> Jolly Witch (Export, 6T/12T ver 1.57D).
- - Added Wild Witch (Export, 6T/12T ver 1.74A).
- - New video hardware and machine driver for Video Klein's extended tiles games.
- - Added Dallas DS1210 + battery backed RAM support to the Video Klein CPU boxed games.
- - Improved inputs for Jolli Witch and Wild Witch. Added the game selector switch.
- - Cleaned up some witch card sets.
- - Added technical and game notes.
-
-
- [2011-10-19]
-
- - Mapped the Dallas DS1210 for Video Klein sets that have one.
- - Mapped the 2800-2fff range as RAM for the non-Dallas Video Klein sets.
- - Added Witch Card (Video Klein CPU box, set 2)
- - Added Witch Game (Video Klein, set 2)
- - Some minor fixes.
-
-
- [2012-02-19]
-
- - Added Casino Poker (Ver PM86LO-35-5, German).
- - Inputs from the scratch.
- - Switched manufacturer 'Playman' to PM / Beck Elektronik, since
- it's PM and Beck Elektronik/Computer/etc...
- - Added technical and game notes.
-
-
- [2012-03-12]
-
- - Emulated the Video Klein extended hardware, with Dallas Timekeeper,
- and the insane 16 graphics banks scheme.
- - Added Witch Up & Down (Export, 6T/12T ver 0.99).
- - Added Witch Up & Down (Export, 6T/12T ver 1.02).
- - Switched Wild Witch and Jolli Witch to the extended hardware.
- - Accurate colors.
- - Inputs and lamps from the scratch.
- - Added technical notes.
-
-
- [2012-03-14]
-
- - Fixed and improved the Video Klein extended hardware banking.
- - Added Witch Strike (Export, 6T/12T ver 1.01A).
- - Added Witch Strike (Export, 6T/12T ver 1.01B).
- - Added technical notes.
-
-
- [2012-03-15]
-
- - Found and patched the Witch Strike protection scheme.
- - Proper inputs and lamps support for Witch Strike.
- - Promoted both Witch Strike sets to working state.
- - Added technical notes.
-
-
- [2012-03-17]
-
- - Added Wild Witch (Export, 6T/12T ver 1.57-SP).
- - Added Wild Witch (Export, 6T/12T ver 1.57-TE).
- - Added Wild Witch (Export, 6T/12T ver 1.62A).
- - Added Wild Witch (Export, 6T/12T ver 1.62B).
- - Added Wild Witch (Export, 6T/12T ver 1.62A-F).
- - Added Wild Witch (Export, 6T/12T ver 1.62A alt).
- - Added Wild Witch (Export, 6T/12T ver 1.62B alt).
- - Added Wild Witch (Export, 6T/12T ver 1.65A).
- - Added Wild Witch (Export, 6T/12T ver 1.65A-S).
- - Added Wild Witch (Export, 6T/12T ver 1.65A-S alt).
- - Added Wild Witch (Export, 6T/12T ver 1.65A-N).
- - Added Wild Witch (Export, 6T/12T ver 1.70A beta).
- - Added Wild Witch (Export, 6T/12T ver 1.70A).
- - Added Wild Witch (Export, 6T/12T ver 1.70A alt).
- - Added Wild Witch (Export, 6T/12T ver 1.74A-SP-BELG).
- - Added Wild Witch (Export, 6T/12T ver 1.74A).
- - Added Wild Witch (Export, 6T/12T ver 1.74A alt).
- - Added Wild Witch (Export, 6B/12B ver 1.75A-E English).
- - Added Wild Witch (Export, 6T/12T ver 1.76A).
- - Added Wild Witch (Export, 6T/12T ver 1.77A).
- - Added Wild Witch (Export, 6T/12T ver 1.79A).
- - Added Wild Witch (Export, 6T/12T ver 1.83A).
- - Added Wild Witch (Export, 6T/12T ver 1.84A).
- - Worked each game to temporarily bypass the protection,
- laying in the Dallas Timekeeper RAM.
- - Reworked the parent/clones relationship.
- - Added technical notes.
-
-
- [2012-03-18]
-
- - Added Witch Jackpot (Export, 6T/12T ver 0.25).
- - Added Witch Jack (Export, 6T/12T ver 0.40).
- - Added Witch Jack (Export, 6T/12T ver 0.40T).
- - Added Witch Jack (Export, 6T/12T ver 0.62).
- - Added Witch Jack (Export, 6T/12T ver 0.64).
- - Added Witch Jack (Export, 6T/12T ver 0.65).
- - Added Witch Jack (Export, 6T/12T ver 0.70S).
- - Added Witch Jack (Export, 6T/12T ver 0.70P).
- - Added Witch Jack (Export, 6T/12T ver 0.87).
- - Added Witch Jack (Export, 6T/12T ver 0.87-88).
- - Added Witch Jack (Export, 6T/12T ver 0.87-89).
- - Proper inputs and lamps.
-
-
- [2012-03-19]
-
- - Added Witch Up & Down (Export, 6T/12T ver 0.99, set 2).
- - Added Witch Up & Down (Export, 6T/12T ver 0.99, set 3).
- - Added Witch Up & Down (Export, 6T/12T ver 0.99T).
- - Added Falcons Wild - World Wide Poker (Video Klein, set 2).
- - Fixed a bug in the coinage input.
-
-
- [2013-05-04]
-
- - Added Bonne Chance! (Golden Poker prequel hardware).
- - Inverted the bipolar PROM data to get the proper palette.
- - Added technical notes.
-
- - Added Mundial/Mondial (Italian/French).
- - Implemented the program banking, but set the Italian lang
- as default till we can get some evidence.
- - Added technical notes.
-
-
- [2013-05-18]
-
- - Added 2 Videotron Poker sets...(cards selector and normal controls)
- - Added another Potten's Poker set with Royale cards back graphics.
- - Proper inputs for Videotron Poker selector.
- - Figured out the Royale multiplexer system.
- - Removed the unused Royale driver init.
- - Both Royale sets promoted to working.
- - Added technical notes.
-
-
- [2014-02-23]
-
- - Added a new Videotron set with cards selector.
- - Mundial/Mondial (Italian/French): Implemented the program banking
- properly. Now you can choose the program through a DIP switch.
-
-
- [2015-11-04]
-
- - Added new sets:
- * Genie (ICP-1, set 2).
- * Super 98 (ICP-1).
- * Jack Potten's Poker (set 8, Australian).
-
- - Derived a new machine with improved memory map for this new Genie set.
- - Minor fixes and clean-ups.
- - Added games & technical notes.
-
-
- [2015-11-09]
-
- - Renamed and rearranged the parent/clone relationship
- of Witch Jack sets.
- - Added partial decryption to the ICP1 daughterboard games.
- (currently only pokerduc set). Since it's just partial,
- commented out the code for now....
- - Added port impulse to the Golden Poker's second coin slot.
- This is needed for both royale sets.
- - Some fixes and clean-ups.
-
-
TODO:
- Missing PIA connections.
@@ -6279,7 +5947,7 @@ ROM_END
/* Witch Card (Spanish, set 1)
Unknown argentine manufacturer.
*/
-ROM_START( witchcda )
+ROM_START( witchcrda )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "w_card.256", 0x0000, 0x8000, CRC(63a471f8) SHA1(96a2140e2da0050e7865a6662f707cf024130832) )
@@ -6299,7 +5967,7 @@ ROM_END
/* Witch Card (Spanish, set 2)
Unknown argentine manufacturer.
*/
-ROM_START( witchcdb )
+ROM_START( witchcrdb )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "w_card.128", 0x4000, 0x4000, CRC(11ecac96) SHA1(717709b31f3dfa09be321c14fbf0e95d492ad2f2) )
@@ -6319,7 +5987,7 @@ ROM_END
/* Witch Card (English, no witch game)
Hack?
*/
-ROM_START( witchcdc )
+ROM_START( witchcrdc )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "wc_sbruj.256", 0x0000, 0x8000, CRC(5689ae41) SHA1(c7a624ec881204137489b147ce66cc9a9900650a) )
@@ -6345,7 +6013,7 @@ ROM_END
CASINOVERSION WC3050
***************************************/
-ROM_START( witchcdd )
+ROM_START( witchcrdd )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "12a.bin", 0x0000, 0x8000, CRC(a5c1186a) SHA1(b6c662bf489fbcccc3063ce55c957e630ba96ccb) )
@@ -6366,7 +6034,7 @@ ROM_END
Video Klein original with epoxy block module.
Alt set....
*/
- ROM_START( witchcde )
+ROM_START( witchcrde )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "27128_epoxy.bin", 0x4000, 0x4000, CRC(48186272) SHA1(d211bfa89404a292e6d0f0169ed11e1e74a361d9) ) // epoxy block program ROM
@@ -6396,7 +6064,7 @@ ROM_END
Copyright 1983/84/85
W.BECK ELEKTRONIK
*/
-ROM_START( witchcdf )
+ROM_START( witchcrdf )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "@25.bin", 0x5000, 0x1000, CRC(afd6cb4a) SHA1(4c769e1c724bada5875e028781086c32967953a1) )
ROM_LOAD( "@26.bin", 0x6000, 0x1000, CRC(ad11960c) SHA1(2b562cfe9401e21c9dcd90307165e2c2d1acfc5b) )
@@ -6427,7 +6095,7 @@ ROM_END
AY8910 is present.
*******************************************/
-ROM_START( witchcdg )
+ROM_START( witchcrdg )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "6.b9", 0x5000, 0x1000, CRC(70462a63) SHA1(9dfa18bf7d4e0803f2a68e64661ece392a7983cc) )
ROM_LOAD( "7.b11", 0x6000, 0x1000, CRC(227b3801) SHA1(aebabce01b1abdb42b3e49c38f4fe429e65c1a88) )
@@ -6458,7 +6126,7 @@ ROM_END
CASINOVERSION WC3050
***************************************/
-ROM_START( witchcdh )
+ROM_START( witchcrdh )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "prog3000.a12", 0x0000, 0x8000, CRC(a5c1186a) SHA1(b6c662bf489fbcccc3063ce55c957e630ba96ccb) )
@@ -6507,7 +6175,7 @@ ROM_END
03.a5 [3/4] ce-3-tvg.bin [1/4] 88.378906%
***************************************/
-ROM_START( witchcdi )
+ROM_START( witchcrdi )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "04.a12", 0x0000, 0x8000, CRC(0f662e02) SHA1(71d7344f63c11082beb4fb4eeb20b04780a9b14c) )
@@ -6558,7 +6226,7 @@ ROM_END
Video Klein original with epoxy block module.
Alt set....
*/
- ROM_START( witchcdk )
+ ROM_START( witchgmea )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "wc_epoxy.bin", 0x0000, 0x8000, CRC(33f1acd9) SHA1(2facb3d807b5b2a2978e567d0c1106c0a027621a) ) // epoxy block program ROM
@@ -11346,7 +11014,7 @@ ROM_END
Char ROM is identical to the Witch Card one.
*****************************************************/
-ROM_START( witchcdj )
+ROM_START( witchcrdj )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "c", 0x2000, 0x1000, CRC(b35b4108) SHA1(6504ba55511637334c65e88ee5c60b1503b854b3) )
ROM_LOAD( "d", 0x3000, 0x1000, CRC(c48096ed) SHA1(279ba433369c7dc9cd902a19200e889eea45d115) )
@@ -12254,22 +11922,22 @@ GAMEL( 1990, falcnwlda, falcnwld, wildcard, wildcard, goldnpkr_state, empty_init
GAMEL( 1990, falcnwldb, falcnwld, wildcard, wildcard, goldnpkr_state, empty_init, ROT0, "Video Klein", "Falcons Wild - World Wide Poker (Video Klein, set 2)", 0, layout_goldnpkr )
GAME( 1983, falcnwldc, falcnwld, wildcrdb, wildcard, goldnpkr_state, init_flcnw, ROT0, "Falcon", "Falcons Wild - World Wide Poker (Falcon original)", MACHINE_NOT_WORKING )
-GAME( 1987, super21p, 0, super21p, super21p, goldnpkr_state, empty_init, ROT0, "Public MNG", "Super 21", MACHINE_IMPERFECT_COLORS )
+GAME( 1987, super21p, 0, super21p, super21p, goldnpkr_state, empty_init, ROT0, "Public MNG", "Super 21", MACHINE_IMPERFECT_COLORS )
GAMEL( 1991, witchcrd, 0, witchcrd, witchcrd, goldnpkr_state, init_vkdlsc, ROT0, "Video Klein?", "Witch Card (Video Klein CPU box, set 1)", 0, layout_goldnpkr )
-GAME( 1991, witchcda, witchcrd, witchcrd, witchcda, goldnpkr_state, empty_init, ROT0, "<unknown>", "Witch Card (Spanish, witch game, set 1)", 0 )
-GAME( 1991, witchcdb, witchcrd, witchcrd, witchcda, goldnpkr_state, empty_init, ROT0, "<unknown>", "Witch Card (Spanish, witch game, set 2)", 0 )
-GAME( 1991, witchcdc, witchcrd, witchcrd, witchcdc, goldnpkr_state, empty_init, ROT0, "<unknown>", "Witch Card (English, no witch game)", 0 )
-GAMEL( 1994, witchcdd, witchcrd, witchcrd, witchcdd, goldnpkr_state, empty_init, ROT0, "Proma", "Witch Card (German, WC3050, set 1 )", 0, layout_goldnpkr )
-GAMEL( 1991, witchcde, witchcrd, witchcrd, witchcrd, goldnpkr_state, init_vkdlsc, ROT0, "Video Klein", "Witch Card (Video Klein CPU box, set 2)", 0, layout_goldnpkr )
-GAMEL( 1985, witchcdf, witchcrd, witchcrd, witchcdf, goldnpkr_state, empty_init, ROT0, "PM / Beck Elektronik", "Witch Card (English, witch game, lamps)", 0, layout_goldnpkr )
-GAMEL( 199?, witchcdg, witchcrd, wcfalcon, witchcrd, goldnpkr_state, empty_init, ROT0, "Falcon", "Witch Card (Falcon, enhanced sound)", 0, layout_goldnpkr )
-GAMEL( 1994, witchcdh, witchcrd, witchcrd, witchcdd, goldnpkr_state, empty_init, ROT0, "Proma", "Witch Card (German, WC3050, set 2 )", 0, layout_goldnpkr )
-GAMEL( 1994, witchcdi, witchcrd, witchcrd, witchcdd, goldnpkr_state, empty_init, ROT0, "Proma", "Witch Card (German, WC3050, 27-4-94)", 0, layout_goldnpkr )
-GAME( 199?, witchcdj, witchcrd, witchcdj, witchcrd, goldnpkr_state, init_icp1db, ROT0, "<unknown>", "Witch Card (ICP-1, encrypted)", 0 )
+GAME( 1991, witchcrda, witchcrd, witchcrd, witchcda, goldnpkr_state, empty_init, ROT0, "<unknown>", "Witch Card (Spanish, witch game, set 1)", 0 )
+GAME( 1991, witchcrdb, witchcrd, witchcrd, witchcda, goldnpkr_state, empty_init, ROT0, "<unknown>", "Witch Card (Spanish, witch game, set 2)", 0 )
+GAME( 1991, witchcrdc, witchcrd, witchcrd, witchcdc, goldnpkr_state, empty_init, ROT0, "<unknown>", "Witch Card (English, no witch game)", 0 )
+GAMEL( 1994, witchcrdd, witchcrd, witchcrd, witchcdd, goldnpkr_state, empty_init, ROT0, "Proma", "Witch Card (German, WC3050, set 1 )", 0, layout_goldnpkr )
+GAMEL( 1991, witchcrde, witchcrd, witchcrd, witchcrd, goldnpkr_state, init_vkdlsc, ROT0, "Video Klein", "Witch Card (Video Klein CPU box, set 2)", 0, layout_goldnpkr )
+GAMEL( 1985, witchcrdf, witchcrd, witchcrd, witchcdf, goldnpkr_state, empty_init, ROT0, "PM / Beck Elektronik", "Witch Card (English, witch game, lamps)", 0, layout_goldnpkr )
+GAMEL( 199?, witchcrdg, witchcrd, wcfalcon, witchcrd, goldnpkr_state, empty_init, ROT0, "Falcon", "Witch Card (Falcon, enhanced sound)", 0, layout_goldnpkr )
+GAMEL( 1994, witchcrdh, witchcrd, witchcrd, witchcdd, goldnpkr_state, empty_init, ROT0, "Proma", "Witch Card (German, WC3050, set 2 )", 0, layout_goldnpkr )
+GAMEL( 1994, witchcrdi, witchcrd, witchcrd, witchcdd, goldnpkr_state, empty_init, ROT0, "Proma", "Witch Card (German, WC3050, 27-4-94)", 0, layout_goldnpkr )
+GAME( 199?, witchcrdj, witchcrd, witchcdj, witchcrd, goldnpkr_state, init_icp1db, ROT0, "<unknown>", "Witch Card (ICP-1, encrypted)", 0 )
GAMEL( 1991, witchgme, 0, witchcrd, witchcrd, goldnpkr_state, empty_init, ROT0, "Video Klein", "Witch Game (Video Klein, set 1)", 0, layout_goldnpkr )
-GAMEL( 1997, witchcdk, witchgme, witchcrd, witchcrd, goldnpkr_state, empty_init, ROT0, "Video Klein", "Witch Game (Video Klein, set 2)", MACHINE_NOT_WORKING, layout_goldnpkr )
+GAMEL( 1997, witchgmea, witchgme, witchcrd, witchcrd, goldnpkr_state, empty_init, ROT0, "Video Klein", "Witch Game (Video Klein, set 2)", MACHINE_NOT_WORKING, layout_goldnpkr )
GAME( 199?, jokercar, witchcrd, witchcrd, witchcda, goldnpkr_state, empty_init, ROT0, "<unknown>", "Joker Card (witch game)", 0 )
diff --git a/src/mame/layout/upndown.lay b/src/mame/layout/upndown.lay
index dd975281636..2510eb944e5 100644
--- a/src/mame/layout/upndown.lay
+++ b/src/mame/layout/upndown.lay
@@ -73,32 +73,32 @@ license:CC0
<bounds left="0" top="0" right="4" bottom="3" />
</screen>
- <element name="lamp2" ref="HOLD">
+ <element name="lamp2" ref="HOLD" inputtag="IN0-2" inputmask="0x01">
<bounds x="0.0" y="3.45" width="0.35" height="0.24" />
</element>
- <element name="lamp2" ref="HOLD">
+ <element name="lamp2" ref="HOLD" inputtag="IN0-2" inputmask="0x02">
<bounds x="0.4" y="3.45" width="0.35" height="0.24" />
</element>
- <element name="lamp2" ref="HOLD">
+ <element name="lamp2" ref="HOLD" inputtag="IN0-2" inputmask="0x04">
<bounds x="0.8" y="3.45" width="0.35" height="0.24" />
</element>
- <element name="lamp2" ref="HOLD">
+ <element name="lamp2" ref="HOLD" inputtag="IN0-2" inputmask="0x08">
<bounds x="1.2" y="3.45" width="0.35" height="0.24" />
</element>
- <element name="lamp2" ref="HOLD">
+ <element name="lamp2" ref="HOLD" inputtag="IN0-2" inputmask="0x10">
<bounds x="1.6" y="3.45" width="0.35" height="0.24" />
</element>
- <element name="lamp2" ref="CANCEL">
+ <element name="lamp2" ref="CANCEL" inputtag="IN0-0" inputmask="0x10">
<bounds x="2.0" y="3.45" width="0.35" height="0.24" />
</element>
- <element name="lamp0" ref="BET">
+ <element name="lamp0" ref="BET" inputtag="IN0-0" inputmask="0x01">
<bounds x="2.85" y="3.45" width="0.35" height="0.24" />
</element>
- <element name="lamp1" ref="DEAL">
+ <element name="lamp1" ref="DEAL" inputtag="IN0-0" inputmask="0x08">
<bounds x="3.25" y="3.45" width="0.35" height="0.24" />
</element>
- <element name="lamp3" ref="TAKE">
+ <element name="lamp3" ref="TAKE" inputtag="IN0-1" inputmask="0x04">
<bounds x="3.65" y="3.45" width="0.35" height="0.24" />
</element>
</view>
diff --git a/src/mame/mame.lst b/src/mame/mame.lst
index 94b69b93ac1..178c67349a7 100644
--- a/src/mame/mame.lst
+++ b/src/mame/mame.lst
@@ -15208,19 +15208,19 @@ superdbl // 198? Karateco
videtrna // Unknown
videtron // Unknown
videtron2 // Unknown
-witchcda // 1991, Unknown
-witchcdb // 1991, Unknown
-witchcdc // 1991, Unknown
-witchcdd // (c) 1994, TV Game Elektronik - Proma
-witchcde // (c) 1991, Video Klein
-witchcdf // (c) 1991, PlayMan
-witchcdg // (c) 199?, Falcon
-witchcdh // (c) 1994, TV Game Elektronik - Proma
-witchcdi // (c) 1994, TV Game Elektronik - Proma
-witchcdj // 199?, Unknown
-witchcdk // (c) 1991, Video Klein
witchcrd // (c) 1991, Video Klein
-witchgme // (c) 1991 Video Klein
+witchcrda // 1991, Unknown
+witchcrdb // 1991, Unknown
+witchcrdc // 1991, Unknown
+witchcrdd // (c) 1994, TV Game Elektronik - Proma
+witchcrde // (c) 1991, Video Klein
+witchcrdf // (c) 1991, PlayMan
+witchcrdg // (c) 199?, Falcon
+witchcrdh // (c) 1994, TV Game Elektronik - Proma
+witchcrdi // (c) 1994, TV Game Elektronik - Proma
+witchcrdj // 199?, Unknown
+witchgme // (c) 1991, Video Klein
+witchgmea // (c) 1991, Video Klein
witchjol // 1994, Unknown
wldwitch // (c) 1992-2001, Video Klein
wldwitcha // (c) 1992-2001, Video Klein
diff --git a/src/mame/tiny.lst b/src/mame/tiny.lst
index 80d6de1e6b0..51014c2aff6 100644
--- a/src/mame/tiny.lst
+++ b/src/mame/tiny.lst
@@ -36,4 +36,38 @@ topgunnr // (c) 1986
looping // (c) 1982 Video Games GMBH
supertnk // (c) 1981 VIDEO GAMES GmbH, W.-GERMANY
+witchgme // (c) 1991 Video Klein
+witchjol // (c) 1994 Video Klein
+wldwitch // (c) 2001 Video Klein
+wldwitcha // (c) 1992 Video Klein
+wldwitchc // (c) 1994 Video Klein
+wldwitchd // (c) 1994 Video Klein
+wldwitchf // (c) 1994 Video Klein
+wldwitchg // (c) 1994 Video Klein
+wldwitchh // (c) 1995 Video Klein
+wldwitchi // (c) 1996 Video Klein
+wldwitchj // (c) 1996 Video Klein
+wldwitchk // (c) 1996 Video Klein
+wldwitchl // (c) 1996 Video Klein
+wldwitchm // (c) 1996 Video Klein
+wldwitchn // (c) 1997 Video Klein
+wldwitcho // (c) 1998 Video Klein
+wldwitchp // (c) 1998 Video Klein
+wldwitchq // (c) 1998 Video Klein
+wldwitchr // (c) 1999 Video Klein
+wldwitchs // (c) 1999 Video Klein
+wldwitcht // (c) 1999 Video Klein
+wldwitchu // (c) 2000 Video Klein
+wldwitchv // (c) 2001 Video Klein
+wupndown // (c) 1998 Video Klein
+wupndowna // (c) 1998 Video Klein
+wupndownb // (c) 1998 Video Klein
+wupndownc // (c) 1998 Video Klein
+wupndownd // (c) 1998 Video Klein
+wstrike // (c) 1992 Video Klein
+wstrikea // (c) 1992 Video Klein
+wtchjack // (c) 1996 Video Klein
+wtchjacka // (c) 1996 Video Klein
+wtchjackb // (c) 1996 Video Klein
+
wrally // (c) 1993 - Ref 930705
diff --git a/src/osd/modules/render/drawogl.cpp b/src/osd/modules/render/drawogl.cpp
index 6d3eae1e8ad..6b495dae3bb 100644
--- a/src/osd/modules/render/drawogl.cpp
+++ b/src/osd/modules/render/drawogl.cpp
@@ -2649,8 +2649,7 @@ void renderer_ogl::texture_shader_update(ogl_texture_info *texture, render_conta
if (container!=nullptr)
{
- render_container::user_settings settings;
- container->get_user_settings(settings);
+ render_container::user_settings settings = container->get_user_settings();
/* FIXME: the code below is in just for illustration issue on
* how to set shader variables. gamma, contrast and brightness are
* handled already by the core