summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author hap <happppp@users.noreply.github.com>2019-06-28 16:59:41 +0200
committer hap <happppp@users.noreply.github.com>2019-06-28 16:59:54 +0200
commit9e84835983f145e2d8e51ce6a0002beb62c77b69 (patch)
treeeece9ebd442cc995bc661601f90d381530d3d98f
parentb910a955e2e12199c2ffee2f90b895e30a1b9eb3 (diff)
savant: add screen overlay (nw)
-rw-r--r--src/mame/drivers/novag_presto.cpp10
-rw-r--r--src/mame/drivers/novag_savant.cpp15
-rw-r--r--src/mame/layout/ave_arb.lay34
-rw-r--r--src/mame/layout/novag_savant.lay75
4 files changed, 108 insertions, 26 deletions
diff --git a/src/mame/drivers/novag_presto.cpp b/src/mame/drivers/novag_presto.cpp
index c8d4a9b7738..3b8293589c2 100644
--- a/src/mame/drivers/novag_presto.cpp
+++ b/src/mame/drivers/novag_presto.cpp
@@ -45,7 +45,7 @@ public:
m_display(*this, "display"),
m_board(*this, "board"),
m_dac(*this, "dac"),
- m_inputs(*this, "IN.%u", 0)
+ m_keypad(*this, "IN.0")
{ }
// machine drivers
@@ -58,7 +58,7 @@ protected:
required_device<pwm_display_device> m_display;
required_device<sensorboard_device> m_board;
optional_device<dac_bit_interface> m_dac;
- required_ioport_array<1> m_inputs;
+ required_ioport m_keypad;
// I/O handlers
void update_display();
@@ -152,14 +152,14 @@ READ8_MEMBER(presto_state::input_r)
u8 data = 0;
// P10-P17: multiplexed inputs
- // read chessboard
+ // read chessboard buttons
for (int i = 0; i < 8; i++)
if (BIT(m_inp_mux, i))
data |= m_board->read_rank(i);
- // read keypad
+ // read sidepanel keypad
if (m_kp_select)
- data |= m_inputs[0]->read();
+ data |= m_keypad->read();
return ~data;
}
diff --git a/src/mame/drivers/novag_savant.cpp b/src/mame/drivers/novag_savant.cpp
index 3ac82d788a4..fd11dd14e90 100644
--- a/src/mame/drivers/novag_savant.cpp
+++ b/src/mame/drivers/novag_savant.cpp
@@ -20,7 +20,6 @@ anymore in original working order.
TODO:
- get rid of m_wait_in hack when Z80 core accurately emulates WAIT pin
-- internal artwork
******************************************************************************/
@@ -38,7 +37,7 @@ TODO:
#include "speaker.h"
// internal artwork
-//#include "novag_savant.lh" // clickable
+#include "novag_savant.lh" // clickable
namespace {
@@ -63,6 +62,9 @@ public:
// machine drivers
void savant(machine_config &config);
+ // user-controlled light switch (9 light bulbs behind LCD panel)
+ DECLARE_INPUT_CHANGED_MEMBER(light_switch) { output().set_value("backlight", newval); }
+
protected:
virtual void machine_start() override;
@@ -332,6 +334,11 @@ static INPUT_PORTS_START( savant )
PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_H) PORT_NAME("Hint")
PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Y) PORT_NAME("Promote")
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_NAME("Set Up")
+
+ PORT_START("LIGHT")
+ PORT_CONFNAME( 0x01, 0x01, "LCD Backlight" ) PORT_CHANGED_MEMBER(DEVICE_SELF, savant_state, light_switch, nullptr)
+ PORT_CONFSETTING( 0x00, DEF_STR( Off ) )
+ PORT_CONFSETTING( 0x01, DEF_STR( On ) )
INPUT_PORTS_END
@@ -376,7 +383,7 @@ void savant_state::savant(machine_config &config)
screen.set_visarea_full();
PWM_DISPLAY(config, m_display).set_size(8, 24+27);
- //config.set_default_layout(layout_novag_savant);
+ config.set_default_layout(layout_novag_savant);
/* sound hardware */
SPEAKER(config, "speaker").front_center();
@@ -413,4 +420,4 @@ ROM_END
******************************************************************************/
// YEAR NAME PARENT CMP MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS
-CONS( 1981, savant, 0, 0, savant, savant, savant_state, empty_init, "Novag", "Savant", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
+CONS( 1981, savant, 0, 0, savant, savant, savant_state, empty_init, "Novag", "Savant", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
diff --git a/src/mame/layout/ave_arb.lay b/src/mame/layout/ave_arb.lay
index 1f45eb252aa..e9e555bd994 100644
--- a/src/mame/layout/ave_arb.lay
+++ b/src/mame/layout/ave_arb.lay
@@ -31,68 +31,68 @@
</element>
<element name="text_1">
- <rect><color red="0.5" green="0.37" blue="0.3" /></rect>
+ <rect><color red="0.5" green="0.3" blue="0.25" /></rect>
<text string="1"><color red="0.87" green="0.87" blue="0.84" /></text>
</element>
<element name="text_2">
- <rect><color red="0.5" green="0.37" blue="0.3" /></rect>
+ <rect><color red="0.5" green="0.3" blue="0.25" /></rect>
<text string="2"><color red="0.87" green="0.87" blue="0.84" /></text>
</element>
<element name="text_3">
- <rect><color red="0.5" green="0.37" blue="0.3" /></rect>
+ <rect><color red="0.5" green="0.3" blue="0.25" /></rect>
<text string="3"><color red="0.87" green="0.87" blue="0.84" /></text>
</element>
<element name="text_4">
- <rect><color red="0.5" green="0.37" blue="0.3" /></rect>
+ <rect><color red="0.5" green="0.3" blue="0.25" /></rect>
<text string="4"><color red="0.87" green="0.87" blue="0.84" /></text>
</element>
<element name="text_5">
- <rect><color red="0.5" green="0.37" blue="0.3" /></rect>
+ <rect><color red="0.5" green="0.3" blue="0.25" /></rect>
<text string="5"><color red="0.87" green="0.87" blue="0.84" /></text>
</element>
<element name="text_6">
- <rect><color red="0.5" green="0.37" blue="0.3" /></rect>
+ <rect><color red="0.5" green="0.3" blue="0.25" /></rect>
<text string="6"><color red="0.87" green="0.87" blue="0.84" /></text>
</element>
<element name="text_7">
- <rect><color red="0.5" green="0.37" blue="0.3" /></rect>
+ <rect><color red="0.5" green="0.3" blue="0.25" /></rect>
<text string="7"><color red="0.87" green="0.87" blue="0.84" /></text>
</element>
<element name="text_8">
- <rect><color red="0.5" green="0.37" blue="0.3" /></rect>
+ <rect><color red="0.5" green="0.3" blue="0.25" /></rect>
<text string="8"><color red="0.87" green="0.87" blue="0.84" /></text>
</element>
<element name="text_a">
- <rect><color red="0.5" green="0.37" blue="0.3" /></rect>
+ <rect><color red="0.5" green="0.3" blue="0.25" /></rect>
<text string="A"><color red="0.87" green="0.87" blue="0.84" /></text>
</element>
<element name="text_b">
- <rect><color red="0.5" green="0.37" blue="0.3" /></rect>
+ <rect><color red="0.5" green="0.3" blue="0.25" /></rect>
<text string="B"><color red="0.87" green="0.87" blue="0.84" /></text>
</element>
<element name="text_c">
- <rect><color red="0.5" green="0.37" blue="0.3" /></rect>
+ <rect><color red="0.5" green="0.3" blue="0.25" /></rect>
<text string="C"><color red="0.87" green="0.87" blue="0.84" /></text>
</element>
<element name="text_d">
- <rect><color red="0.5" green="0.37" blue="0.3" /></rect>
+ <rect><color red="0.5" green="0.3" blue="0.25" /></rect>
<text string="D"><color red="0.87" green="0.87" blue="0.84" /></text>
</element>
<element name="text_e">
- <rect><color red="0.5" green="0.37" blue="0.3" /></rect>
+ <rect><color red="0.5" green="0.3" blue="0.25" /></rect>
<text string="E"><color red="0.87" green="0.87" blue="0.84" /></text>
</element>
<element name="text_f">
- <rect><color red="0.5" green="0.37" blue="0.3" /></rect>
+ <rect><color red="0.5" green="0.3" blue="0.25" /></rect>
<text string="F"><color red="0.87" green="0.87" blue="0.84" /></text>
</element>
<element name="text_g">
- <rect><color red="0.5" green="0.37" blue="0.3" /></rect>
+ <rect><color red="0.5" green="0.3" blue="0.25" /></rect>
<text string="G"><color red="0.87" green="0.87" blue="0.84" /></text>
</element>
<element name="text_h">
- <rect><color red="0.5" green="0.37" blue="0.3" /></rect>
+ <rect><color red="0.5" green="0.3" blue="0.25" /></rect>
<text string="H"><color red="0.87" green="0.87" blue="0.84" /></text>
</element>
@@ -137,7 +137,7 @@
<!-- sb board -->
- <element name="cblack"><rect><color red="0.5" green="0.37" blue="0.3" /></rect></element>
+ <element name="cblack"><rect><color red="0.5" green="0.3" blue="0.25" /></rect></element>
<element name="cwhite"><rect><color red="0.85" green="0.83" blue="0.7" /></rect></element>
<element name="hlbb" defstate="0">
diff --git a/src/mame/layout/novag_savant.lay b/src/mame/layout/novag_savant.lay
new file mode 100644
index 00000000000..c484f3768b6
--- /dev/null
+++ b/src/mame/layout/novag_savant.lay
@@ -0,0 +1,75 @@
+<?xml version="1.0"?>
+<mamelayout version="2">
+
+<!-- define elements -->
+
+ <element name="blackb"><rect><color red="0" green="0" blue="0" /></rect></element>
+ <element name="cb_green"><rect><color red="0.3" green="0.8" blue="0.75" /></rect></element>
+ <element name="cb_light" defstate="1">
+ <rect state="0"><color red="0.33" green="0.3" blue="0.15" /></rect>
+ <rect state="1"><color red="1.0" green="0.79" blue="0.38" /></rect>
+ </element>
+
+ <element name="hl" defstate="0">
+ <text string=" "><bounds x="0" y="0" width="1" height="1.0034" /></text>
+ <disk state="1">
+ <bounds x="0.12" y="0.1217" width="0.76" height="0.7634" />
+ <color red="1" green="1" blue="1" />
+ </disk>
+ </element>
+
+
+<!-- display -->
+
+ <group name="display">
+ <bounds x="0" y="0" width="101" height="114" />
+ <screen index="0"><bounds x="0.5" y="0.5" width="100" height="112.735" /></screen>
+
+ <!-- squares -->
+ <repeat count="4">
+ <param name="y" start="10" increment="23.56" />
+ <repeat count="4">
+ <param name="x" start="14.84" increment="23.48" />
+ <overlay element="cb_green"><bounds x="~x~" y="~y~" width="11.74" height="11.78" /></overlay>
+ </repeat>
+ </repeat>
+ <repeat count="4">
+ <param name="y" start="21.78" increment="23.56" />
+ <repeat count="4">
+ <param name="x" start="3.1" increment="23.48" />
+ <overlay element="cb_green"><bounds x="~x~" y="~y~" width="11.74" height="11.78" /></overlay>
+ </repeat>
+ </repeat>
+
+ <overlay name="backlight" element="cb_light"><bounds x="0" y="0" width="101" height="114" /></overlay>
+
+ <!-- sensors -->
+ <repeat count="8">
+ <param name="y" start="10" increment="11.78" />
+ <param name="i" start="8" increment="-1" />
+ <repeat count="8">
+ <param name="x" start="3.1" increment="11.74" />
+ <param name="mask" start="0x01" lshift="1" />
+ <bezel element="hl" inputtag="board:RANK.~i~" inputmask="~mask~"><bounds x="~x~" y="~y~" width="11.74" height="11.78" /><color alpha="0.15" /></bezel>
+ </repeat>
+ </repeat>
+
+ <!-- mask edges -->
+ <bezel element="blackb"><bounds x="0" y="0" width="101" height="2" /></bezel>
+ <bezel element="blackb"><bounds x="0" y="8.2" width="101" height="1" /></bezel>
+ <bezel element="blackb"><bounds x="0" y="104.9" width="101" height="1" /></bezel>
+ <bezel element="blackb"><bounds x="0" y="111.7" width="101" height="2" /></bezel>
+
+ <bezel element="blackb"><bounds x="0" y="0" width="1.5" height="114" /></bezel>
+ <bezel element="blackb"><bounds x="98.7" y="0" width="2" height="114" /></bezel>
+ </group>
+
+
+<!-- build screen -->
+
+ <view name="Internal Layout">
+ <bounds left="1.5" right="98.7" top="2" bottom="111.7" />
+ <group ref="display"><bounds x="0" y="0" width="101" height="114" /></group>
+ </view>
+
+</mamelayout>