milton: add internal artwork (nw)

This commit is contained in:
hap 2019-05-15 15:13:54 +02:00
parent 9df2514cea
commit fd0d4bf93b
3 changed files with 158 additions and 40 deletions

View File

@ -36,20 +36,20 @@ should be 312, but 312 = 39*8 so it doesn't look right because a divider by 39 i
DEFINE_DEVICE_TYPE(SP0250, sp0250_device, "sp0250", "GI SP0250 LPC") DEFINE_DEVICE_TYPE(SP0250, sp0250_device, "sp0250", "GI SP0250 LPC")
sp0250_device::sp0250_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) sp0250_device::sp0250_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
: device_t(mconfig, SP0250, tag, owner, clock), device_t(mconfig, SP0250, tag, owner, clock),
device_sound_interface(mconfig, *this), device_sound_interface(mconfig, *this),
m_amp(0), m_amp(0),
m_pitch(0), m_pitch(0),
m_repeat(0), m_repeat(0),
m_pcount(0), m_pcount(0),
m_rcount(0), m_rcount(0),
m_playing(0), m_playing(0),
m_RNG(0), m_RNG(0),
m_stream(nullptr), m_stream(nullptr),
m_voiced(0), m_voiced(0),
m_fifo_pos(0), m_fifo_pos(0),
m_drq(*this) m_drq(*this)
{ {
for (auto & elem : m_fifo) for (auto & elem : m_fifo)
{ {
@ -75,7 +75,7 @@ void sp0250_device::device_start()
m_drq.resolve_safe(); m_drq.resolve_safe();
if (!m_drq.isnull()) if (!m_drq.isnull())
{ {
m_drq( ASSERT_LINE); m_drq(ASSERT_LINE);
m_tick_timer= machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(sp0250_device::timer_tick), this)); m_tick_timer= machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(sp0250_device::timer_tick), this));
m_tick_timer->adjust(attotime::from_hz(clock()) * CLOCK_DIVIDER, 0, attotime::from_hz(clock()) * CLOCK_DIVIDER); m_tick_timer->adjust(attotime::from_hz(clock()) * CLOCK_DIVIDER, 0, attotime::from_hz(clock()) * CLOCK_DIVIDER);
} }
@ -122,9 +122,6 @@ static int16_t sp0250_gc(uint8_t v)
void sp0250_device::load_values() void sp0250_device::load_values()
{ {
int f;
m_filter[0].B = sp0250_gc(m_fifo[ 0]); m_filter[0].B = sp0250_gc(m_fifo[ 0]);
m_filter[0].F = sp0250_gc(m_fifo[ 1]); m_filter[0].F = sp0250_gc(m_fifo[ 1]);
m_amp = sp0250_ga(m_fifo[ 2]); m_amp = sp0250_ga(m_fifo[ 2]);
@ -147,7 +144,7 @@ void sp0250_device::load_values()
m_pcount = 0; m_pcount = 0;
m_rcount = 0; m_rcount = 0;
for (f = 0; f < 6; f++) for (int f = 0; f < 6; f++)
m_filter[f].z1 = m_filter[f].z2 = 0; m_filter[f].z1 = m_filter[f].z2 = 0;
m_playing = 1; m_playing = 1;
@ -185,13 +182,11 @@ uint8_t sp0250_device::drq_r()
void sp0250_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) void sp0250_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples)
{ {
stream_sample_t *output = outputs[0]; stream_sample_t *output = outputs[0];
int i; for (int i = 0; i < samples; i++)
for (i = 0; i < samples; i++)
{ {
if (m_playing) if (m_playing)
{ {
int16_t z0; int16_t z0;
int f;
if (m_voiced) if (m_voiced)
{ {
@ -214,7 +209,7 @@ void sp0250_device::sound_stream_update(sound_stream &stream, stream_sample_t **
m_RNG >>= 1; m_RNG >>= 1;
} }
for (f = 0; f < 6; f++) for (int f = 0; f < 6; f++)
{ {
z0 += ((m_filter[f].z1 * m_filter[f].F) >> 8) z0 += ((m_filter[f].z1 * m_filter[f].F) >> 8)
+ ((m_filter[f].z2 * m_filter[f].B) >> 9); + ((m_filter[f].z2 * m_filter[f].B) >> 9);

View File

@ -7,6 +7,10 @@ Milton Bradley Milton
This is the talking tabletop game, not the chess computer with the same name. This is the talking tabletop game, not the chess computer with the same name.
Game 1: Match beginning of a phrase(red button) with end of phrase(yellow button).
Game 2: Same as game 1, but all in one turn.
Game 3: Press phrase end buttons, memorize them, press Go and match them.
Hardware is an odd combination: MC6805P2 MCU, GI SP0250 speech + 2*TMC0430 GROM. Hardware is an odd combination: MC6805P2 MCU, GI SP0250 speech + 2*TMC0430 GROM.
See patent 4326710 for detailed information, except MC6805 clocked from SP0250 3.12MHz See patent 4326710 for detailed information, except MC6805 clocked from SP0250 3.12MHz
and GROM clocked by 3.12MHz/8=390kHz. and GROM clocked by 3.12MHz/8=390kHz.
@ -23,6 +27,9 @@ TODO:
#include "sound/sp0250.h" #include "sound/sp0250.h"
#include "speaker.h" #include "speaker.h"
// internal artwork
#include "milton.lh" // clickable
namespace { namespace {
@ -86,7 +93,7 @@ READ8_MEMBER(milton_state::data_r)
return 0; return 0;
// TMC0430 data // TMC0430 data
u8 data = 0xff; u8 data = 0;
m_grom[0]->readz(&data); m_grom[0]->readz(&data);
m_grom[1]->readz(&data); m_grom[1]->readz(&data);
return data; return data;
@ -150,15 +157,15 @@ READ8_MEMBER(milton_state::input_r)
static INPUT_PORTS_START( milton ) static INPUT_PORTS_START( milton )
PORT_START("IN.0") PORT_START("IN.0")
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_J) PORT_NAME("Red Button 7") PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_U) PORT_NAME("Red Button 7")
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_H) PORT_NAME("Red Button 6") PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Y) PORT_NAME("Red Button 6")
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_G) PORT_NAME("Red Button 5") PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T) PORT_NAME("Red Button 5")
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_F) PORT_NAME("Red Button 4") PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) PORT_NAME("Red Button 4")
PORT_START("IN.1") PORT_START("IN.1")
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_D) PORT_NAME("Red Button 3") PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) PORT_NAME("Red Button 3")
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_S) PORT_NAME("Red Button 2") PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_W) PORT_NAME("Red Button 2")
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_A) PORT_NAME("Red Button 1") PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Q) PORT_NAME("Red Button 1")
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_NAME("Purple Button 1") PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_NAME("Purple Button 1")
PORT_START("IN.2") PORT_START("IN.2")
@ -169,15 +176,15 @@ static INPUT_PORTS_START( milton )
PORT_START("IN.3") PORT_START("IN.3")
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_C) PORT_NAME("Reset") PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_C) PORT_NAME("Reset")
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Q) PORT_NAME("Yellow Button 1") // starting at top, then clockwise PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_A) PORT_NAME("Yellow Button 1") // starting at top, then clockwise
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_W) PORT_NAME("Yellow Button 2") PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_S) PORT_NAME("Yellow Button 2")
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) PORT_NAME("Yellow Button 3") PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_D) PORT_NAME("Yellow Button 3")
PORT_START("IN.4") PORT_START("IN.4")
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) PORT_NAME("Yellow Button 4") PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_F) PORT_NAME("Yellow Button 4")
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T) PORT_NAME("Yellow Button 5") PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_G) PORT_NAME("Yellow Button 5")
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Y) PORT_NAME("Yellow Button 6") PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_H) PORT_NAME("Yellow Button 6")
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_U) PORT_NAME("Yellow Button 7") PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_J) PORT_NAME("Yellow Button 7")
INPUT_PORTS_END INPUT_PORTS_END
@ -203,6 +210,8 @@ void milton_state::milton(machine_config &config)
gromclock.signal_handler().set(m_grom[0], FUNC(tmc0430_device::gclock_in)); gromclock.signal_handler().set(m_grom[0], FUNC(tmc0430_device::gclock_in));
gromclock.signal_handler().append(m_grom[1], FUNC(tmc0430_device::gclock_in)); gromclock.signal_handler().append(m_grom[1], FUNC(tmc0430_device::gclock_in));
config.set_default_layout(layout_milton);
/* sound hardware */ /* sound hardware */
SPEAKER(config, "speaker").front_center(); SPEAKER(config, "speaker").front_center();
SP0250(config, m_speech, 3.12_MHz_XTAL).add_route(ALL_OUTPUTS, "speaker", 1.0); SP0250(config, m_speech, 3.12_MHz_XTAL).add_route(ALL_OUTPUTS, "speaker", 1.0);
@ -218,7 +227,7 @@ ROM_START( milton )
ROM_REGION( 0x800, "maincpu", 0 ) ROM_REGION( 0x800, "maincpu", 0 )
ROM_LOAD("sc87008p_783-4043-001", 0x000, 0x800, CRC(b054dbea) SHA1(b5339c8170e773b68505c3d60dc75249a583d60a) ) ROM_LOAD("sc87008p_783-4043-001", 0x000, 0x800, CRC(b054dbea) SHA1(b5339c8170e773b68505c3d60dc75249a583d60a) )
ROM_REGION( 0x4000, "groms", ROMREGION_ERASEFF ) ROM_REGION( 0x4000, "groms", ROMREGION_ERASE00 )
ROM_LOAD("4043-003", 0x0000, 0x1800, CRC(d95df757) SHA1(6723480866f6393d310e304ef3b61e3a319a7beb) ) ROM_LOAD("4043-003", 0x0000, 0x1800, CRC(d95df757) SHA1(6723480866f6393d310e304ef3b61e3a319a7beb) )
ROM_LOAD("4043-004", 0x2000, 0x1800, CRC(9ac929f7) SHA1(1a27d56fc49eb4e58ea3b5c58d7fbedc5a751592) ) ROM_LOAD("4043-004", 0x2000, 0x1800, CRC(9ac929f7) SHA1(1a27d56fc49eb4e58ea3b5c58d7fbedc5a751592) )
ROM_END ROM_END
@ -232,4 +241,4 @@ ROM_END
******************************************************************************/ ******************************************************************************/
// YEAR NAME PARENT CMP MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS // YEAR NAME PARENT CMP MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS
CONS( 1980, milton, 0, 0, milton, milton, milton_state, empty_init, "Milton Bradley", "Electronic Milton", MACHINE_SUPPORTS_SAVE ) CONS( 1980, milton, 0, 0, milton, milton, milton_state, empty_init, "Milton Bradley", "Electronic Milton", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )

114
src/mame/layout/milton.lay Normal file
View File

@ -0,0 +1,114 @@
<?xml version="1.0"?>
<mamelayout version="2">
<!-- define elements -->
<element name="white"><rect><color red="0.8" green="0.8" blue="0.8" /></rect></element>
<element name="disk_red"><disk><color red="0.9" green="0.1" blue="0.12" /></disk></element>
<element name="disk_purple"><disk><color red="0.6" green="0.1" blue="0.7" /></disk></element>
<element name="disk_yellow"><disk><color red="0.9" green="0.9" blue="0.15" /></disk></element>
<element name="disk_green"><disk><color red="0.1" green="0.7" blue="0.3" /></disk></element>
<element name="text_p1">
<disk><color red="0.6" green="0.1" blue="0.7" /></disk>
<text string="1"><color red="0.95" green="0.95" blue="0.95" /></text>
</element>
<element name="text_p2">
<disk><color red="0.6" green="0.1" blue="0.7" /></disk>
<text string="2"><color red="0.95" green="0.95" blue="0.95" /></text>
</element>
<element name="text_p3">
<disk><color red="0.6" green="0.1" blue="0.7" /></disk>
<text string="3"><color red="0.95" green="0.95" blue="0.95" /></text>
</element>
<element name="text_g1">
<rect><color red="0.1" green="0.7" blue="0.3" /></rect>
<text string="GO"><color red="0.95" green="0.95" blue="0.95" /></text>
</element>
<element name="text_g2">
<rect><color red="0.1" green="0.7" blue="0.3" /></rect>
<text string="SCORE"><color red="0.95" green="0.95" blue="0.95" /></text>
</element>
<element name="text_g3">
<rect><color red="0.1" green="0.7" blue="0.3" /></rect>
<text string="RESET"><color red="0.95" green="0.95" blue="0.95" /></text>
</element>
<element name="hl" defstate="0">
<text string=" "><color red="0.0" green="0.0" blue="0.0" /></text>
<disk state="1"><color red="0.0" green="0.0" blue="0.0" /></disk>
</element>
<element name="led" defstate="0">
<disk state="0"><color red="0.2" green="0.04" blue="0.05" /></disk>
<disk state="1"><color red="1.0" green="0.2" blue="0.23" /></disk>
</element>
<!-- build screen -->
<view name="Internal Layout">
<bounds left="0" right="6.95" top="-0.3" bottom="10.7" />
<bezel element="white"><bounds x="0" y="4.4" width="6.95" height="0.3" /></bezel>
<bezel element="white"><bounds x="0" y="5.7" width="6.95" height="0.3" /></bezel>
<bezel name="led" element="led"><bounds x="2.7" y="5.05" width="0.3" height="0.3" /></bezel>
<bezel name="led" element="led"><bounds x="3.95" y="5.05" width="0.3" height="0.3" /></bezel>
<bezel element="disk_red"><bounds x="3" y="0" width="1" height="1" /></bezel>
<bezel element="disk_red"><bounds x="4.2" y="0" width="1" height="1" /></bezel>
<bezel element="disk_red"><bounds x="2.25" y="0.98" width="1" height="1" /></bezel>
<bezel element="disk_red"><bounds x="4.95" y="0.98" width="1" height="1" /></bezel>
<bezel element="disk_red"><bounds x="2.5" y="2.17" width="1" height="1" /></bezel>
<bezel element="disk_red"><bounds x="4.7" y="2.17" width="1" height="1" /></bezel>
<bezel element="disk_red"><bounds x="3.6" y="2.7" width="1" height="1" /></bezel>
<bezel element="disk_purple"><bounds x="1" y="0.5" width="1" height="1" /></bezel>
<bezel element="disk_purple"><bounds x="1" y="1.7" width="1" height="1" /></bezel>
<bezel element="disk_purple"><bounds x="1" y="2.9" width="1" height="1" /></bezel>
<bezel element="text_p1"><bounds x="1.3" y="0.65" width="0.65" height="0.7" /></bezel>
<bezel element="text_p2"><bounds x="1.3" y="1.85" width="0.65" height="0.7" /></bezel>
<bezel element="text_p3"><bounds x="1.3" y="3.05" width="0.65" height="0.7" /></bezel>
<bezel element="disk_yellow"><bounds x="1.75" y="9.4" width="1" height="1" /></bezel>
<bezel element="disk_yellow"><bounds x="2.95" y="9.4" width="1" height="1" /></bezel>
<bezel element="disk_yellow"><bounds x="1" y="8.42" width="1" height="1" /></bezel>
<bezel element="disk_yellow"><bounds x="3.7" y="8.42" width="1" height="1" /></bezel>
<bezel element="disk_yellow"><bounds x="1.25" y="7.23" width="1" height="1" /></bezel>
<bezel element="disk_yellow"><bounds x="3.45" y="7.23" width="1" height="1" /></bezel>
<bezel element="disk_yellow"><bounds x="2.35" y="6.7" width="1" height="1" /></bezel>
<bezel element="disk_green"><bounds x="4.95" y="6.5" width="1" height="1" /></bezel>
<bezel element="disk_green"><bounds x="4.95" y="7.7" width="1" height="1" /></bezel>
<bezel element="disk_green"><bounds x="4.95" y="8.9" width="1" height="1" /></bezel>
<bezel element="text_g1"><bounds x="5.05" y="6.85" width="0.8" height="0.3" /></bezel>
<bezel element="text_g2"><bounds x="5.05" y="8.05" width="0.8" height="0.3" /></bezel>
<bezel element="text_g3"><bounds x="5.05" y="9.25" width="0.8" height="0.3" /></bezel>
<bezel element="hl" inputtag="IN.0" inputmask="0x08"><bounds x="3" y="0" width="1" height="1" /><color alpha="0.25" /></bezel>
<bezel element="hl" inputtag="IN.0" inputmask="0x04"><bounds x="4.2" y="0" width="1" height="1" /><color alpha="0.25" /></bezel>
<bezel element="hl" inputtag="IN.1" inputmask="0x01"><bounds x="2.25" y="0.98" width="1" height="1" /><color alpha="0.25" /></bezel>
<bezel element="hl" inputtag="IN.0" inputmask="0x02"><bounds x="4.95" y="0.98" width="1" height="1" /><color alpha="0.25" /></bezel>
<bezel element="hl" inputtag="IN.1" inputmask="0x02"><bounds x="2.5" y="2.17" width="1" height="1" /><color alpha="0.25" /></bezel>
<bezel element="hl" inputtag="IN.0" inputmask="0x01"><bounds x="4.7" y="2.17" width="1" height="1" /><color alpha="0.25" /></bezel>
<bezel element="hl" inputtag="IN.1" inputmask="0x04"><bounds x="3.6" y="2.7" width="1" height="1" /><color alpha="0.25" /></bezel>
<bezel element="hl" inputtag="IN.1" inputmask="0x08"><bounds x="1" y="0.5" width="1" height="1" /><color alpha="0.25" /></bezel>
<bezel element="hl" inputtag="IN.2" inputmask="0x01"><bounds x="1" y="1.7" width="1" height="1" /><color alpha="0.25" /></bezel>
<bezel element="hl" inputtag="IN.2" inputmask="0x02"><bounds x="1" y="2.9" width="1" height="1" /><color alpha="0.25" /></bezel>
<bezel element="hl" inputtag="IN.4" inputmask="0x02"><bounds x="1.75" y="9.4" width="1" height="1" /><color alpha="0.25" /></bezel>
<bezel element="hl" inputtag="IN.4" inputmask="0x01"><bounds x="2.95" y="9.4" width="1" height="1" /><color alpha="0.25" /></bezel>
<bezel element="hl" inputtag="IN.4" inputmask="0x04"><bounds x="1" y="8.42" width="1" height="1" /><color alpha="0.25" /></bezel>
<bezel element="hl" inputtag="IN.3" inputmask="0x08"><bounds x="3.7" y="8.42" width="1" height="1" /><color alpha="0.25" /></bezel>
<bezel element="hl" inputtag="IN.4" inputmask="0x08"><bounds x="1.25" y="7.23" width="1" height="1" /><color alpha="0.25" /></bezel>
<bezel element="hl" inputtag="IN.3" inputmask="0x04"><bounds x="3.45" y="7.23" width="1" height="1" /><color alpha="0.25" /></bezel>
<bezel element="hl" inputtag="IN.3" inputmask="0x02"><bounds x="2.35" y="6.7" width="1" height="1" /><color alpha="0.25" /></bezel>
<bezel element="hl" inputtag="IN.2" inputmask="0x04"><bounds x="4.95" y="6.5" width="1" height="1" /><color alpha="0.25" /></bezel>
<bezel element="hl" inputtag="IN.2" inputmask="0x08"><bounds x="4.95" y="7.7" width="1" height="1" /><color alpha="0.25" /></bezel>
<bezel element="hl" inputtag="IN.3" inputmask="0x01"><bounds x="4.95" y="8.9" width="1" height="1" /><color alpha="0.25" /></bezel>
</view>
</mamelayout>