mirror of
https://github.com/holub/mame
synced 2025-04-23 08:49:55 +03:00
intchess: add 7seg panel to layout
This commit is contained in:
parent
76101dea1d
commit
a7a68269fe
@ -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();
|
||||
|
30
src/mame/layout/saitek_intchess.lay
Normal file
30
src/mame/layout/saitek_intchess.lay
Normal file
@ -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>
|
Loading…
Reference in New Issue
Block a user