hh_tms1k: added internal clickable layout for bship

New NOT_WORKING machine added
-----------
Electronic Battleship [hap, Sean Riddle]
This commit is contained in:
hap 2016-05-15 14:22:31 +02:00
parent 394664a787
commit 14db0a2f48
3 changed files with 230 additions and 4 deletions

View File

@ -124,6 +124,7 @@
#include "astro.lh"
#include "bankshot.lh"
#include "bigtrak.lh"
#include "bship.lh" // clickable
#include "cnfball.lh"
#include "cnfball2.lh"
#include "cnsector.lh" // clickable
@ -3656,6 +3657,8 @@ WRITE16_MEMBER(bship_state::write_r)
WRITE16_MEMBER(bship_state::write_o)
{
//printf("%X ",m_maincpu->debug_peek_o_index());
// O7: 75494 to light bulb
display_matrix(1, 1, data >> 7 & 1, 1);
}
@ -3734,7 +3737,7 @@ static INPUT_PORTS_START( bship )
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("P1 Fire")
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Fire")
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_TOGGLE PORT_CODE(KEYCODE_F1) PORT_NAME("Load/Go") // switch
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_TOGGLE PORT_CODE(KEYCODE_F1) PORT_NAME("Load/Go") // switch
PORT_START("IN.11") // Vss!
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_DEL) PORT_NAME("P1 Clear Memory") // CM
@ -3752,7 +3755,7 @@ static MACHINE_CONFIG_START( bship, bship_state )
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(bship_state, write_o))
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1))
MCFG_DEFAULT_LAYOUT(layout_hh_tms1k_test)
MCFG_DEFAULT_LAYOUT(layout_bship)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@ -6130,7 +6133,7 @@ COMP( 1979, astro, 0, 0, astro, astro, driver_device, 0, "Kos
CONS( 1980, mdndclab, 0, 0, mdndclab, mdndclab, driver_device, 0, "Mattel", "Dungeons & Dragons - Computer Labyrinth Game", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) // ***
CONS( 1977, comp4, 0, 0, comp4, comp4, driver_device, 0, "Milton Bradley", "Comp IV", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_NO_SOUND_HW )
CONS( 1977, bship, 0, 0, bship, bship, driver_device, 0, "Milton Bradley", "Electronic Battleship (1977/1979 version)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) // ***
CONS( 1977, bship, 0, 0, bship, bship, driver_device, 0, "Milton Bradley", "Electronic Battleship (1977/1979 version)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING ) // ***
CONS( 1978, simon, 0, 0, simon, simon, driver_device, 0, "Milton Bradley", "Simon (Rev. A)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
CONS( 1979, ssimon, 0, 0, ssimon, ssimon, driver_device, 0, "Milton Bradley", "Super Simon", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
CONS( 1979, bigtrak, 0, 0, bigtrak, bigtrak, driver_device, 0, "Milton Bradley", "Big Trak", MACHINE_SUPPORTS_SAVE | MACHINE_MECHANICAL ) // ***

View File

@ -34,7 +34,7 @@ public:
{ }
// devices
required_device<cpu_device> m_maincpu;
required_device<tms1k_base_device> m_maincpu;
optional_ioport_array<18> m_inp_matrix; // max 18
optional_device<speaker_sound_device> m_speaker;

223
src/mame/layout/bship.lay Normal file
View File

@ -0,0 +1,223 @@
<?xml version="1.0"?>
<mamelayout version="2">
<!-- define elements -->
<element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element>
<element name="static_gray"><rect><color red="0.1" green="0.1" blue="0.11" /></rect></element>
<element name="static_red"><rect><color red="0.8" green="0.1" blue="0.15" /></rect></element>
<element name="text_fire">
<rect><color red="0.8" green="0.1" blue="0.15" /></rect>
<text string="FIRE"><color red="0.8" green="0.8" blue="0.8" /></text>
</element>
<element name="lamp" defstate="0">
<disk state="0"><color red="0.15" green="0.03" blue="0.033" /></disk>
<disk state="1"><color red="1.0" green="0.2" blue="0.23" /></disk>
</element>
<element name="button_blue" defstate="0">
<rect state="0">
<bounds x="0.0" y="0.0" width="1.0" height="1.0" />
<color red="0.1" green="0.1" blue="0.11" />
</rect>
<rect state="1">
<bounds x="0.0" y="0.0" width="1.0" height="1.0" />
<color red="0.15" green="0.5" blue="0.8" />
</rect>
<rect>
<bounds x="0.15" y="0.15" width="0.7" height="0.7" />
<color red="0.0" green="0.0" blue="0.0" />
</rect>
</element>
<element name="button_yellow" defstate="0">
<rect state="0">
<bounds x="0.0" y="0.0" width="1.0" height="1.0" />
<color red="0.1" green="0.1" blue="0.11" />
</rect>
<rect state="1">
<bounds x="0.0" y="0.0" width="1.0" height="1.0" />
<color red="0.8" green="0.75" blue="0.15" />
</rect>
<rect>
<bounds x="0.15" y="0.15" width="0.7" height="0.7" />
<color red="0.0" green="0.0" blue="0.0" />
</rect>
</element>
<element name="hlb" defstate="0">
<text string=" ">
<bounds x="0.0" y="0.0" width="1.0" height="1.0" />
<color red="0.0" green="0.0" blue="0.0" />
</text>
<rect state="1">
<bounds x="0.0" y="0.0" width="1.0" height="1.0" />
<color red="0.0" green="0.0" blue="0.0" />
</rect>
</element>
<element name="text_lg" defstate="0">
<rect><color red="0.1" green="0.1" blue="0.11" /></rect>
<text state="0" string="LOAD">
<bounds x="0.0" y="0.32" width="1.0" height="0.36" />
<color red="0.82" green="0.82" blue="0.82" />
</text>
<text state="1" string="GO">
<bounds x="0.0" y="0.32" width="1.0" height="0.36" />
<color red="0.82" green="0.82" blue="0.82" />
</text>
</element>
<element name="text_p1"><text string="player 1"><color red="0.4" green="0.4" blue="0.4" /></text></element>
<element name="text_p2"><text string="player 2"><color red="0.4" green="0.4" blue="0.4" /></text></element>
<element name="text_cm"><text string="CM"><color red="0.7" green="0.7" blue="0.7" /></text></element>
<element name="text_cle"><text string="CLE"><color red="0.7" green="0.7" blue="0.7" /></text></element>
<element name="text_1"><text string="1"><color red="0.7" green="0.7" blue="0.7" /></text></element>
<element name="text_2"><text string="2"><color red="0.7" green="0.7" blue="0.7" /></text></element>
<element name="text_3"><text string="3"><color red="0.7" green="0.7" blue="0.7" /></text></element>
<element name="text_4"><text string="4"><color red="0.7" green="0.7" blue="0.7" /></text></element>
<element name="text_5"><text string="5"><color red="0.7" green="0.7" blue="0.7" /></text></element>
<element name="text_6"><text string="6"><color red="0.7" green="0.7" blue="0.7" /></text></element>
<element name="text_7"><text string="7"><color red="0.7" green="0.7" blue="0.7" /></text></element>
<element name="text_8"><text string="8"><color red="0.7" green="0.7" blue="0.7" /></text></element>
<element name="text_9"><text string="9"><color red="0.7" green="0.7" blue="0.7" /></text></element>
<element name="text_10"><text string="10"><color red="0.7" green="0.7" blue="0.7" /></text></element>
<element name="text_a"><text string="A"><color red="0.7" green="0.7" blue="0.7" /></text></element>
<element name="text_b"><text string="B"><color red="0.7" green="0.7" blue="0.7" /></text></element>
<element name="text_c"><text string="C"><color red="0.7" green="0.7" blue="0.7" /></text></element>
<element name="text_d"><text string="D"><color red="0.7" green="0.7" blue="0.7" /></text></element>
<element name="text_e"><text string="E"><color red="0.7" green="0.7" blue="0.7" /></text></element>
<element name="text_f"><text string="F"><color red="0.7" green="0.7" blue="0.7" /></text></element>
<element name="text_g"><text string="G"><color red="0.7" green="0.7" blue="0.7" /></text></element>
<element name="text_h"><text string="H"><color red="0.7" green="0.7" blue="0.7" /></text></element>
<element name="text_i"><text string="I"><color red="0.7" green="0.7" blue="0.7" /></text></element>
<element name="text_j"><text string="J"><color red="0.7" green="0.7" blue="0.7" /></text></element>
<!-- build screen -->
<view name="Internal Layout">
<bounds left="-2" right="278" top="-16" bottom="31" />
<bezel name="0.0" element="lamp"><bounds x="44" y="-14" width="60" height="10" /></bezel>
<bezel name="0.0" element="lamp"><bounds x="186" y="-14" width="60" height="10" /></bezel>
<bezel element="text_p1"><bounds x="44" y="23" width="60" height="6" /></bezel>
<bezel element="text_p2"><bounds x="186" y="23" width="60" height="6" /></bezel>
<bezel element="static_gray"><bounds x="137.75" y="-15" width="0.5" height="45" /></bezel>
<!-- player 1 buttons -->
<bezel element="static_red"><bounds x="0" y="0" width="10" height="10" /></bezel>
<bezel element="text_fire"><bounds x="0" y="3" width="10" height="4" /></bezel>
<bezel element="hlb" inputtag="IN.10" inputmask="0x01"><bounds x="0" y="0" width="10" height="10" /><color alpha="0.3" /></bezel>
<bezel element="button_yellow" inputtag="IN.11" inputmask="0x01"><bounds x="14" y="0" width="10" height="10" /></bezel>
<bezel element="button_yellow" inputtag="IN.0" inputmask="0x01"><bounds x="25" y="0" width="10" height="10" /></bezel>
<bezel element="button_yellow" inputtag="IN.1" inputmask="0x01"><bounds x="36" y="0" width="10" height="10" /></bezel>
<bezel element="button_yellow" inputtag="IN.2" inputmask="0x01"><bounds x="47" y="0" width="10" height="10" /></bezel>
<bezel element="button_yellow" inputtag="IN.3" inputmask="0x01"><bounds x="58" y="0" width="10" height="10" /></bezel>
<bezel element="button_yellow" inputtag="IN.4" inputmask="0x01"><bounds x="69" y="0" width="10" height="10" /></bezel>
<bezel element="button_yellow" inputtag="IN.5" inputmask="0x01"><bounds x="80" y="0" width="10" height="10" /></bezel>
<bezel element="button_yellow" inputtag="IN.6" inputmask="0x01"><bounds x="91" y="0" width="10" height="10" /></bezel>
<bezel element="button_yellow" inputtag="IN.7" inputmask="0x01"><bounds x="102" y="0" width="10" height="10" /></bezel>
<bezel element="button_yellow" inputtag="IN.8" inputmask="0x01"><bounds x="113" y="0" width="10" height="10" /></bezel>
<bezel element="button_yellow" inputtag="IN.9" inputmask="0x01"><bounds x="124" y="0" width="10" height="10" /></bezel>
<bezel element="text_cm"><bounds x="14" y="3" width="10" height="4" /></bezel>
<bezel element="text_1"><bounds x="25" y="2" width="10" height="6" /></bezel>
<bezel element="text_2"><bounds x="36" y="2" width="10" height="6" /></bezel>
<bezel element="text_3"><bounds x="47" y="2" width="10" height="6" /></bezel>
<bezel element="text_4"><bounds x="58" y="2" width="10" height="6" /></bezel>
<bezel element="text_5"><bounds x="69" y="2" width="10" height="6" /></bezel>
<bezel element="text_6"><bounds x="80" y="2" width="10" height="6" /></bezel>
<bezel element="text_7"><bounds x="91" y="2" width="10" height="6" /></bezel>
<bezel element="text_8"><bounds x="102" y="2" width="10" height="6" /></bezel>
<bezel element="text_9"><bounds x="113" y="2" width="10" height="6" /></bezel>
<bezel element="text_10"><bounds x="124" y="2" width="10" height="6" /></bezel>
<bezel element="button_blue" inputtag="IN.11" inputmask="0x02"><bounds x="14" y="11" width="10" height="10" /></bezel>
<bezel element="button_blue" inputtag="IN.0" inputmask="0x02"><bounds x="25" y="11" width="10" height="10" /></bezel>
<bezel element="button_blue" inputtag="IN.1" inputmask="0x02"><bounds x="36" y="11" width="10" height="10" /></bezel>
<bezel element="button_blue" inputtag="IN.2" inputmask="0x02"><bounds x="47" y="11" width="10" height="10" /></bezel>
<bezel element="button_blue" inputtag="IN.3" inputmask="0x02"><bounds x="58" y="11" width="10" height="10" /></bezel>
<bezel element="button_blue" inputtag="IN.4" inputmask="0x02"><bounds x="69" y="11" width="10" height="10" /></bezel>
<bezel element="button_blue" inputtag="IN.5" inputmask="0x02"><bounds x="80" y="11" width="10" height="10" /></bezel>
<bezel element="button_blue" inputtag="IN.6" inputmask="0x02"><bounds x="91" y="11" width="10" height="10" /></bezel>
<bezel element="button_blue" inputtag="IN.7" inputmask="0x02"><bounds x="102" y="11" width="10" height="10" /></bezel>
<bezel element="button_blue" inputtag="IN.8" inputmask="0x02"><bounds x="113" y="11" width="10" height="10" /></bezel>
<bezel element="button_blue" inputtag="IN.9" inputmask="0x02"><bounds x="124" y="11" width="10" height="10" /></bezel>
<bezel element="text_cle"><bounds x="14" y="14" width="10" height="4" /></bezel>
<bezel element="text_a"><bounds x="25" y="13" width="10" height="6" /></bezel>
<bezel element="text_b"><bounds x="36" y="13" width="10" height="6" /></bezel>
<bezel element="text_c"><bounds x="47" y="13" width="10" height="6" /></bezel>
<bezel element="text_d"><bounds x="58" y="13" width="10" height="6" /></bezel>
<bezel element="text_e"><bounds x="69" y="13" width="10" height="6" /></bezel>
<bezel element="text_f"><bounds x="80" y="13" width="10" height="6" /></bezel>
<bezel element="text_g"><bounds x="91" y="13" width="10" height="6" /></bezel>
<bezel element="text_h"><bounds x="102" y="13" width="10" height="6" /></bezel>
<bezel element="text_i"><bounds x="113" y="13" width="10" height="6" /></bezel>
<bezel element="text_j"><bounds x="124" y="13" width="10" height="6" /></bezel>
<!-- player 2 buttons -->
<bezel element="static_red"><bounds x="142" y="0" width="10" height="10" /></bezel>
<bezel element="text_fire"><bounds x="142" y="3" width="10" height="4" /></bezel>
<bezel element="hlb" inputtag="IN.10" inputmask="0x04"><bounds x="142" y="0" width="10" height="10" /><color alpha="0.3" /></bezel>
<bezel element="text_lg" inputtag="IN.10" inputmask="0x08"><bounds x="142" y="11" width="10" height="10" /></bezel>
<bezel element="button_yellow" inputtag="IN.11" inputmask="0x04"><bounds x="156" y="0" width="10" height="10" /></bezel>
<bezel element="button_yellow" inputtag="IN.0" inputmask="0x04"><bounds x="167" y="0" width="10" height="10" /></bezel>
<bezel element="button_yellow" inputtag="IN.1" inputmask="0x04"><bounds x="178" y="0" width="10" height="10" /></bezel>
<bezel element="button_yellow" inputtag="IN.2" inputmask="0x04"><bounds x="189" y="0" width="10" height="10" /></bezel>
<bezel element="button_yellow" inputtag="IN.3" inputmask="0x04"><bounds x="200" y="0" width="10" height="10" /></bezel>
<bezel element="button_yellow" inputtag="IN.4" inputmask="0x04"><bounds x="211" y="0" width="10" height="10" /></bezel>
<bezel element="button_yellow" inputtag="IN.5" inputmask="0x04"><bounds x="222" y="0" width="10" height="10" /></bezel>
<bezel element="button_yellow" inputtag="IN.6" inputmask="0x04"><bounds x="233" y="0" width="10" height="10" /></bezel>
<bezel element="button_yellow" inputtag="IN.7" inputmask="0x04"><bounds x="244" y="0" width="10" height="10" /></bezel>
<bezel element="button_yellow" inputtag="IN.8" inputmask="0x04"><bounds x="255" y="0" width="10" height="10" /></bezel>
<bezel element="button_yellow" inputtag="IN.9" inputmask="0x04"><bounds x="266" y="0" width="10" height="10" /></bezel>
<bezel element="text_cm"><bounds x="156" y="3" width="10" height="4" /></bezel>
<bezel element="text_1"><bounds x="167" y="2" width="10" height="6" /></bezel>
<bezel element="text_2"><bounds x="178" y="2" width="10" height="6" /></bezel>
<bezel element="text_3"><bounds x="189" y="2" width="10" height="6" /></bezel>
<bezel element="text_4"><bounds x="200" y="2" width="10" height="6" /></bezel>
<bezel element="text_5"><bounds x="211" y="2" width="10" height="6" /></bezel>
<bezel element="text_6"><bounds x="222" y="2" width="10" height="6" /></bezel>
<bezel element="text_7"><bounds x="233" y="2" width="10" height="6" /></bezel>
<bezel element="text_8"><bounds x="244" y="2" width="10" height="6" /></bezel>
<bezel element="text_9"><bounds x="255" y="2" width="10" height="6" /></bezel>
<bezel element="text_10"><bounds x="266" y="2" width="10" height="6" /></bezel>
<bezel element="button_blue" inputtag="IN.11" inputmask="0x08"><bounds x="156" y="11" width="10" height="10" /></bezel>
<bezel element="button_blue" inputtag="IN.0" inputmask="0x08"><bounds x="167" y="11" width="10" height="10" /></bezel>
<bezel element="button_blue" inputtag="IN.1" inputmask="0x08"><bounds x="178" y="11" width="10" height="10" /></bezel>
<bezel element="button_blue" inputtag="IN.2" inputmask="0x08"><bounds x="189" y="11" width="10" height="10" /></bezel>
<bezel element="button_blue" inputtag="IN.3" inputmask="0x08"><bounds x="200" y="11" width="10" height="10" /></bezel>
<bezel element="button_blue" inputtag="IN.4" inputmask="0x08"><bounds x="211" y="11" width="10" height="10" /></bezel>
<bezel element="button_blue" inputtag="IN.5" inputmask="0x08"><bounds x="222" y="11" width="10" height="10" /></bezel>
<bezel element="button_blue" inputtag="IN.6" inputmask="0x08"><bounds x="233" y="11" width="10" height="10" /></bezel>
<bezel element="button_blue" inputtag="IN.7" inputmask="0x08"><bounds x="244" y="11" width="10" height="10" /></bezel>
<bezel element="button_blue" inputtag="IN.8" inputmask="0x08"><bounds x="255" y="11" width="10" height="10" /></bezel>
<bezel element="button_blue" inputtag="IN.9" inputmask="0x08"><bounds x="266" y="11" width="10" height="10" /></bezel>
<bezel element="text_cle"><bounds x="156" y="14" width="10" height="4" /></bezel>
<bezel element="text_a"><bounds x="167" y="13" width="10" height="6" /></bezel>
<bezel element="text_b"><bounds x="178" y="13" width="10" height="6" /></bezel>
<bezel element="text_c"><bounds x="189" y="13" width="10" height="6" /></bezel>
<bezel element="text_d"><bounds x="200" y="13" width="10" height="6" /></bezel>
<bezel element="text_e"><bounds x="211" y="13" width="10" height="6" /></bezel>
<bezel element="text_f"><bounds x="222" y="13" width="10" height="6" /></bezel>
<bezel element="text_g"><bounds x="233" y="13" width="10" height="6" /></bezel>
<bezel element="text_h"><bounds x="244" y="13" width="10" height="6" /></bezel>
<bezel element="text_i"><bounds x="255" y="13" width="10" height="6" /></bezel>
<bezel element="text_j"><bounds x="266" y="13" width="10" height="6" /></bezel>
</view>
</mamelayout>