summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author hap <happppp@users.noreply.github.com>2020-07-15 23:23:54 +0200
committer hap <happppp@users.noreply.github.com>2020-07-15 23:23:54 +0200
commita7a68269fe559a5fc01dacfd804a827e0ba56830 (patch)
treef1af9470fb826c37540b1b6de3142e941fc79ebe
parent76101dea1d2fb09e1790dd33f9361a8fd5f07982 (diff)
intchess: add 7seg panel to layout
-rw-r--r--src/mame/drivers/saitek_intchess.cpp12
-rw-r--r--src/mame/layout/saitek_intchess.lay30
2 files changed, 39 insertions, 3 deletions
diff --git a/src/mame/drivers/saitek_intchess.cpp b/src/mame/drivers/saitek_intchess.cpp
index 8ec9f963b24..01fdf59ecdf 100644
--- a/src/mame/drivers/saitek_intchess.cpp
+++ b/src/mame/drivers/saitek_intchess.cpp
@@ -3,6 +3,7 @@
// thanks-to:Berger, Achim
/******************************************************************************
+SciSys Intelligent Chess
Hardware notes:
- Synertek 6502A @ ~1.1MHz
@@ -13,7 +14,10 @@ Hardware notes:
- tape deck with microphone
- 4-digit 7seg display
-TODO: WIP
+TODO:
+- colors are estimated from photos (black and white are obvious, but the green
+ and cyan are not standard 0x00ff00 / 0x00ffff)
+- video timing is unknown, sprite offsets are estimated from photos
******************************************************************************/
@@ -30,6 +34,7 @@ TODO: WIP
#include "speaker.h"
// internal artwork
+#include "saitek_intchess.lh" // clickable
namespace {
@@ -107,12 +112,12 @@ void intchess_state::init_palette(palette_device &palette) const
u32 intchess_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
- // draw chessboard
+ // draw chessboard background
for (int y = cliprect.top(); y <= cliprect.bottom(); y++)
for (int x = cliprect.left(); x <= cliprect.right(); x++)
bitmap.pix16(y, x) = ((x / 20) ^ (y / 16)) << 1 & 2;
- // draw the pieces
+ // draw the sprites
for (int i = 0; i < 64; i++)
{
int code = (m_vram[i] & 7) << 2;
@@ -293,6 +298,7 @@ void intchess_state::intchess(machine_config &config)
PWM_DISPLAY(config, m_display).set_size(4, 8);
m_display->set_segmask(0xf, 0x7f);
+ config.set_default_layout(layout_saitek_intchess);
// sound hardware
SPEAKER(config, "speaker").front_center();
diff --git a/src/mame/layout/saitek_intchess.lay b/src/mame/layout/saitek_intchess.lay
new file mode 100644
index 00000000000..b895805a4cb
--- /dev/null
+++ b/src/mame/layout/saitek_intchess.lay
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<!--
+license:CC0
+-->
+<mamelayout version="2">
+
+<!-- define elements -->
+
+ <element name="digit" defstate="0">
+ <led7seg><color red="1.0" green="0.1" blue="0.15" /></led7seg>
+ </element>
+
+ <group name="panel">
+ <bounds x="0" y="0" width="40" height="15" />
+ <bezel name="digit0" element="digit"><bounds x="0" y="0" width="10" height="15" /></bezel>
+ <bezel name="digit1" element="digit"><bounds x="10" y="0" width="10" height="15" /></bezel>
+ <bezel name="digit2" element="digit"><bounds x="20" y="0" width="10" height="15" /></bezel>
+ <bezel name="digit3" element="digit"><bounds x="30" y="0" width="10" height="15" /></bezel>
+ </group>
+
+
+<!-- build screen -->
+
+ <view name="Internal Layout">
+ <bounds left="0" right="40" top="0" bottom="40" />
+ <screen index="0"><bounds x="0" y="0" width="40" height="30" /></screen>
+ <group ref="panel"><bounds x="10" y="31" width="20" height="7.5" /></group>
+
+ </view>
+</mamelayout>