videoart: add internal artwork

This commit is contained in:
hap 2023-10-28 22:11:18 +02:00
parent 0e4b21121f
commit 461916276f
2 changed files with 77 additions and 3 deletions

View File

@ -0,0 +1,72 @@
<?xml version="1.0"?>
<!--
license:CC0-1.0
-->
<mamelayout version="2">
<!-- define elements -->
<element name="white"><rect><color red="0.85" green="0.85" blue="0.86" /></rect></element>
<element name="nothing" defstate="0"><rect><color alpha="0" /></rect></element>
<element name="text_erase">
<rect><color red="1" green="1" blue="1" /></rect>
<text string="ERASE" align="1"><color red="0.66" green="0.66" blue="0.66" /></text>
</element>
<element name="text_color">
<rect><color red="1" green="1" blue="1" /></rect>
<text string="COLOR" align="1"><color red="0.66" green="0.66" blue="0.66" /></text>
</element>
<element name="led" defstate="0">
<disk state="1"><color red="1.0" green="0.1" blue="0.15" /></disk>
<disk state="0"><color red="0.1" green="0.01" blue="0.015" /></disk>
</element>
<element name="color" defstate="0">
<rect><bounds x="0" y="0" width="300" height="1" /><color red="0.85" green="0.85" blue="0.86" /></rect>
<!-- palette taken from driver (except for black) -->
<rect><bounds x="16" y="0" width="20" height="1" /><color red="1.00" green="1.00" blue="1.00" /></rect> <!-- 0 white -->
<rect><bounds x="32" y="0" width="20" height="1" /><color red="0.50" green="0.50" blue="0.50" /></rect> <!-- 1 gray -->
<rect><bounds x="48" y="0" width="20" height="1" /><color red="0.10" green="0.10" blue="0.10" /></rect> <!-- 2 black -->
<rect><bounds x="64" y="0" width="20" height="1" /><color red="0.09" green="0.38" blue="0.00" /></rect> <!-- 3 dark green -->
<rect><bounds x="80" y="0" width="20" height="1" /><color red="0.47" green="0.69" blue="0.09" /></rect> <!-- 4 lime green -->
<rect><bounds x="96" y="0" width="20" height="1" /><color red="0.28" green="0.69" blue="0.13" /></rect> <!-- 5 green -->
<rect><bounds x="112" y="0" width="20" height="1" /><color red="0.41" green="0.66" blue="1.00" /></rect> <!-- 6 cyan -->
<rect><bounds x="128" y="0" width="20" height="1" /><color red="0.03" green="0.09" blue="0.53" /></rect> <!-- 7 blue -->
<rect><bounds x="144" y="0" width="20" height="1" /><color red="0.25" green="0.06" blue="0.38" /></rect> <!-- 8 purple -->
<rect><bounds x="160" y="0" width="20" height="1" /><color red="0.85" green="0.47" blue="1.00" /></rect> <!-- 9 lilac -->
<rect><bounds x="176" y="0" width="20" height="1" /><color red="0.19" green="0.16" blue="0.03" /></rect> <!-- a brown -->
<rect><bounds x="192" y="0" width="20" height="1" /><color red="0.31" green="0.09" blue="0.28" /></rect> <!-- b dark pink -->
<rect><bounds x="208" y="0" width="20" height="1" /><color red="1.00" green="0.47" blue="1.00" /></rect> <!-- c pink -->
<rect><bounds x="224" y="0" width="20" height="1" /><color red="0.38" green="0.06" blue="0.06" /></rect> <!-- d dark red -->
<rect><bounds x="240" y="0" width="20" height="1" /><color red="0.88" green="0.38" blue="0.35" /></rect> <!-- e light red -->
<rect><bounds x="256" y="0" width="16" height="1" /><color red="0.82" green="0.47" blue="0.13" /></rect> <!-- f orange -->
<text string="×" align="1">
<bounds state="0" x="259" y="0" width="20" height="0.9" />
<bounds state="255" x="4" y="0" width="20" height="0.9" />
<color red="0" green="0" blue="0" />
</text>
</element>
<!-- build screen -->
<view name="Internal Layout">
<bounds left="0" right="400" top="0" bottom="312" />
<element ref="white"><bounds x="0" y="0" width="400" height="12" /></element>
<element ref="text_erase" blend="multiply"><bounds x="47.5" yc="6" width="30" height="6" /></element>
<element name="led" ref="led"><bounds x="64" yc="6" width="4" height="4" /></element>
<element ref="nothing" inputtag="AN0" inputmask="0x00" inputraw="yes"><bounds x="128" y="2" width="150" height="8" /></element> <!-- block clickable input -->
<element ref="color" inputtag="AN0" inputmask="0xff" inputraw="yes"><bounds x="128" y="2" width="150" height="8" /></element>
<element ref="text_color" blend="multiply"><bounds x="118" yc="6" width="30" height="6" /></element>
<screen index="0"><bounds x="0" y="12" width="400" height="300" /></screen>
</view>
</mamelayout>

View File

@ -23,8 +23,6 @@ Hardware notes:
- RF NTSC video, no sound
TODO:
- internal artwork for color picker? or instead, the user can just put the cursor
in a corner to check the color
- palette is approximated from photos/videos
*******************************************************************************/
@ -41,6 +39,8 @@ TODO:
#include "screen.h"
#include "softlist_dev.h"
#include "videoart.lh"
namespace {
@ -330,7 +330,7 @@ static INPUT_PORTS_START( videoart )
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_BUTTON4) PORT_NAME("Erase")
PORT_START("AN0")
PORT_BIT(0xff, 0x80, IPT_AD_STICK_X) PORT_SENSITIVITY(50) PORT_KEYDELTA(2) PORT_CENTERDELTA(0) PORT_REVERSE PORT_PLAYER(2) PORT_NAME("Color")
PORT_BIT(0xff, 0x7b, IPT_AD_STICK_X) PORT_SENSITIVITY(50) PORT_KEYDELTA(2) PORT_CENTERDELTA(0) PORT_REVERSE PORT_MINMAX(0x00, 0xf6) PORT_PLAYER(2) PORT_NAME("Color")
PORT_START("AN1")
PORT_BIT(0xff, 0x80, IPT_AD_STICK_X) PORT_SENSITIVITY(50) PORT_KEYDELTA(4) PORT_CENTERDELTA(0)
@ -378,6 +378,8 @@ void videoart_state::videoart(machine_config &config)
m_screen->set_visarea(0, 512-1, 48, 256-1);
m_screen->set_palette("palette");
config.set_default_layout(layout_videoart);
// cartridge
GENERIC_CARTSLOT(config, m_cart, generic_linear_slot, "videoart");
m_cart->set_device_load(FUNC(videoart_state::cart_load));