Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 30 additions & 12 deletions src/mame/jpm/jpmimpct.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ Thanks to Tony Friery and JPeMU for I/O routines and documentation.

#include "jpmimpct.lh"
#include "cluedo.lh"
#include "trivialp.lh"
#include "scrabble.lh"
#include "hngmnjpm.lh"
#include "coronatn.lh"
#include "tqst.lh"


DEFINE_DEVICE_TYPE(JPM_TOUCHSCREEN, jpmtouch_device, "jpmtouch", "JPM Touchscreen")
Expand Down Expand Up @@ -439,7 +444,20 @@ void jpmimpct_state::lamps_w(offs_t offset, uint16_t data, uint16_t mem_mask)

void jpmimpct_state::digits_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
m_digits[m_lamp_strobe & 0xf] = data;
// This bit mapping is based on Scrabble which appears to be only game in this driver that uses 16-segment displays
// The actual Scrabble machine has 16 segment displays, however, the top 2 and bottom 2 LEDs are always driven in unisson like 14-segment display
// - Bit 3 is used for each of the bottom two segments
// - Bits 7 and 15 are used for the top two segments. Each letter has either both set or both clear
int digit_index = (m_lamp_strobe / 2) & 0x7;
int data_shift = !(m_lamp_strobe & 1) * 8;
uint16_t masked_data = (data & mem_mask) << data_shift;
uint16_t temp_mask = 0, temp_digit = 0;

temp_mask =
bitswap<16>(0xff << data_shift, 10, 9, 1, 2, 0, 8, 14, 6, 5, 4, 3, 3, 12, 13, 7, 15);
temp_digit =
bitswap<16>(masked_data, 10, 9, 1, 2, 0, 8, 14, 6, 5, 4, 3, 3, 12, 13, 7, 15);
m_digits[digit_index] = (m_digits[digit_index] & ~temp_mask & 0xFFFF) | temp_digit;
}

void jpmimpct_state::lampstrobe_w(offs_t offset, uint16_t data, uint16_t mem_mask)
Expand Down Expand Up @@ -1844,20 +1862,20 @@ GAMEL( 1995, cluedo, 0, impact_video_touch, cluedo, jpmimpct_video_s
GAMEL( 1995, cluedod, cluedo, impact_video_touch, cluedo, jpmimpct_video_state, empty_init, ROT0, "JPM", "Cluedo (prod. 2D) (Protocol)",MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE, layout_cluedo )
GAMEL( 1995, cluedo2c, cluedo, impact_video_touch, cluedo, jpmimpct_video_state, empty_init, ROT0, "JPM", "Cluedo (prod. 2C)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE, layout_cluedo )
GAMEL( 1995, cluedo2, cluedo, impact_video_touch, cluedo, jpmimpct_video_state, empty_init, ROT0, "JPM", "Cluedo (prod. 2)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE, layout_cluedo )
GAME( 1996, trivialp, 0, impact_video_touch, trivialp, jpmimpct_video_state, empty_init, ROT0, "JPM", "Trivial Pursuit (New Edition) (prod. 1D)", MACHINE_SUPPORTS_SAVE )
GAME( 1996, trivialpd, trivialp, impact_video_touch, trivialp, jpmimpct_video_state, empty_init, ROT0, "JPM", "Trivial Pursuit (New Edition) (prod. 1D) (Protocol)",MACHINE_SUPPORTS_SAVE )
GAME( 1996, trivialpo, trivialp, impact_video_touch, trivialp, jpmimpct_video_state, empty_init, ROT0, "JPM", "Trivial Pursuit", MACHINE_SUPPORTS_SAVE )
GAME( 1997, scrabble, 0, impact_video_touch, scrabble, jpmimpct_video_state, empty_init, ROT0, "JPM", "Scrabble (rev. F)", MACHINE_SUPPORTS_SAVE )
GAME( 1997, scrabbled, scrabble, impact_video_touch, scrabble, jpmimpct_video_state, empty_init, ROT0, "JPM", "Scrabble (rev. F) (Protocol)",MACHINE_SUPPORTS_SAVE )
GAMEL( 1996, trivialp, 0, impact_video_touch, trivialp, jpmimpct_video_state, empty_init, ROT0, "JPM", "Trivial Pursuit (New Edition) (prod. 1D)", MACHINE_SUPPORTS_SAVE, layout_trivialp )
GAMEL( 1996, trivialpd, trivialp, impact_video_touch, trivialp, jpmimpct_video_state, empty_init, ROT0, "JPM", "Trivial Pursuit (New Edition) (prod. 1D) (Protocol)",MACHINE_SUPPORTS_SAVE, layout_trivialp )
GAMEL( 1996, trivialpo, trivialp, impact_video_touch, trivialp, jpmimpct_video_state, empty_init, ROT0, "JPM", "Trivial Pursuit", MACHINE_SUPPORTS_SAVE, layout_trivialp )
GAMEL( 1997, scrabble, 0, impact_video_touch, scrabble, jpmimpct_video_state, empty_init, ROT0, "JPM", "Scrabble (rev. F)", MACHINE_SUPPORTS_SAVE, layout_scrabble )
GAMEL( 1997, scrabbled, scrabble, impact_video_touch, scrabble, jpmimpct_video_state, empty_init, ROT0, "JPM", "Scrabble (rev. F) (Protocol)",MACHINE_SUPPORTS_SAVE, layout_scrabble )

// Non Touchscreen
GAME( 1998, hngmnjpm, 0, impact_video, hngmnjpm, jpmimpct_video_state, empty_init, ROT0, "JPM", "Hangman (JPM)", MACHINE_SUPPORTS_SAVE )
GAME( 1998, hngmnjpmd, hngmnjpm, impact_video, hngmnjpm, jpmimpct_video_state, empty_init, ROT0, "JPM", "Hangman (JPM) (Protocol)", MACHINE_SUPPORTS_SAVE )
GAME( 1999, coronatn, 0, impact_video, coronatn, jpmimpct_video_state, empty_init, ROT0, "JPM", "Coronation Street Quiz Game", MACHINE_SUPPORTS_SAVE )
GAME( 1999, coronatnd, coronatn, impact_video, coronatn, jpmimpct_video_state, empty_init, ROT0, "JPM", "Coronation Street Quiz Game (Protocol)", MACHINE_SUPPORTS_SAVE )
GAMEL( 1998, hngmnjpm, 0, impact_video, hngmnjpm, jpmimpct_video_state, empty_init, ROT0, "JPM", "Hangman (JPM)", MACHINE_SUPPORTS_SAVE, layout_hngmnjpm )
GAMEL( 1998, hngmnjpmd, hngmnjpm, impact_video, hngmnjpm, jpmimpct_video_state, empty_init, ROT0, "JPM", "Hangman (JPM) (Protocol)", MACHINE_SUPPORTS_SAVE, layout_hngmnjpm )
GAMEL( 1999, coronatn, 0, impact_video, coronatn, jpmimpct_video_state, empty_init, ROT0, "JPM", "Coronation Street Quiz Game", MACHINE_SUPPORTS_SAVE, layout_coronatn )
GAMEL( 1999, coronatnd, coronatn, impact_video, coronatn, jpmimpct_video_state, empty_init, ROT0, "JPM", "Coronation Street Quiz Game (Protocol)", MACHINE_SUPPORTS_SAVE, layout_coronatn )
// This acts a bit like a touchscreen game, is there an unmapped Dipswitch to enable touch support, or a different software revision?
GAME( 1996, tqst, 0, impact_video, tqst, jpmimpct_video_state, empty_init, ROT0, "Ace", "Treasure Quest" , MACHINE_SUPPORTS_SAVE)
GAME( 1996, tqstp, tqst, impact_video, tqst, jpmimpct_video_state, empty_init, ROT0, "Ace", "Treasure Quest (Protocol)" , MACHINE_SUPPORTS_SAVE)
GAMEL( 1996, tqst, 0, impact_video, tqst, jpmimpct_video_state, empty_init, ROT0, "Ace", "Treasure Quest" , MACHINE_SUPPORTS_SAVE, layout_tqst )
GAMEL( 1996, tqstp, tqst, impact_video, tqst, jpmimpct_video_state, empty_init, ROT0, "Ace", "Treasure Quest (Protocol)" , MACHINE_SUPPORTS_SAVE, layout_tqst )

// sets below are incomplete, missing video ROMs etc.
GAME( 199?, snlad, 0, impact_video, cluedo, jpmimpct_video_state, empty_init, ROT0, "JPM", "Snake & Ladders" , MACHINE_NOT_WORKING) // incomplete
Expand Down
107 changes: 55 additions & 52 deletions src/mame/layout/cluedo.lay
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ license: CC0-1.0
<bounds x="0.05" y="0.30" width="0.90" height="0.45" />
</text>
<text string="SUSPECT" state="0">
<color red="0.10" green="0.00" blue="0.00" />
<color red="0.20" green="0.00" blue="0.00" />
<bounds x="0.05" y="0.30" width="0.90" height="0.45" />
</text>
</element>
Expand All @@ -90,7 +90,7 @@ license: CC0-1.0
<bounds x="0.05" y="0.30" width="0.90" height="0.45" />
</text>
<text string="MURDERER" state="0">
<color red="0.10" green="0.00" blue="0.00" />
<color red="0.20" green="0.00" blue="0.00" />
<bounds x="0.05" y="0.30" width="0.90" height="0.45" />
</text>
</element>
Expand All @@ -100,7 +100,7 @@ license: CC0-1.0
<bounds x="0.05" y="0.30" width="0.90" height="0.45" />
</text>
<text string="WEAPON" state="0">
<color red="0.05" green="0.04" blue="0.00" />
<color red="0.10" green="0.08" blue="0.00" />
<bounds x="0.05" y="0.30" width="0.90" height="0.45" />
</text>
</element>
Expand All @@ -110,7 +110,7 @@ license: CC0-1.0
<bounds x="0.05" y="0.30" width="0.90" height="0.45" />
</text>
<text string="ROOM" state="0">
<color red="0.00" green="0.03" blue="0.04" />
<color red="0.00" green="0.06" blue="0.08" />
<bounds x="0.05" y="0.30" width="0.90" height="0.45" />
</text>
</element>
Expand All @@ -125,22 +125,30 @@ license: CC0-1.0
</text>
</element>
<element name="next_accusation_arrow">
<text string="&#x2192;" state="1">
<color red="1.00" green="0.70" blue="0.00" />
<bounds x="0.00" y="0.00" width="1.0" height="1.0" />
</text>
<text string="&#x2192;" state="0">
<color red="0.05" green="0.03" blue="0.00" />
<bounds x="0.00" y="0.00" width="1.0" height="1.0" />
</text>
<image state="1">
<data>
<![CDATA[
<svg xmlns="http://www.w3.org/2000/svg" width="10" height="30">
<rect x="0" y="5" width="4" height="20" fill="#ffb000" />
<polygon points="3,0 10,15 3,30" fill="#ffb000" />
</svg>
]]>
</data>
</image>
<image state="0">
<data>
<![CDATA[
<svg xmlns="http://www.w3.org/2000/svg" width="10" height="30">
<rect x="0" y="5" width="4" height="20" fill="#0f0b00" />
<polygon points="3,0 10,15 3,30" fill="#0f0b00" />
</svg>
]]>
</data>
</image>
</element>
<element name="murder_cards">
<text string="MURDER CARDS" state="1">
<color red="0.13" green="0.61" blue="0.32" />
<bounds x="0.05" y="0.30" width="0.90" height="0.45" />
</text>
<text string="MURDER CARDS" state="0">
<color red="0.01" green="0.03" blue="0.01" />
<text string="MURDER CARDS">
<color red="0.06" green="0.20" blue="0.15" />
<bounds x="0.05" y="0.30" width="0.90" height="0.45" />
</text>
</element>
Expand All @@ -155,61 +163,71 @@ license: CC0-1.0
</text>
</element>
<element name="1pound_award">
<text string="&#xA3;1" state="1">
<text string="£1" state="1">
<color red="1.00" green="0.70" blue="0.00" />
<bounds x="0.05" y="0.05" width="0.90" height="0.90" />
</text>
<text string="&#xA3;1" state="0">
<text string="£1" state="0">
<color red="0.10" green="0.07" blue="0.00" />
<bounds x="0.05" y="0.05" width="0.90" height="0.90" />
</text>
</element>
<element name="2pound_award">
<text string="&#xA3;2" state="1">
<text string="£2" state="1">
<color red="1.00" green="0.70" blue="0.00" />
<bounds x="0.05" y="0.05" width="0.90" height="0.90" />
</text>
<text string="&#xA3;2" state="0">
<text string="£2" state="0">
<color red="0.10" green="0.07" blue="0.00" />
<bounds x="0.05" y="0.05" width="0.90" height="0.90" />
</text>
</element>
<element name="4pound_award">
<text string="&#xA3;4" state="1">
<text string="£4" state="1">
<color red="1.00" green="0.70" blue="0.00" />
<bounds x="0.05" y="0.05" width="0.90" height="0.90" />
</text>
<text string="&#xA3;4" state="0">
<text string="£4" state="0">
<color red="0.10" green="0.07" blue="0.00" />
<bounds x="0.05" y="0.05" width="0.90" height="0.90" />
</text>
</element>
<element name="6pound_award">
<text string="&#xA3;6" state="1">
<text string="£6" state="1">
<color red="1.00" green="0.70" blue="0.00" />
<bounds x="0.05" y="0.05" width="0.90" height="0.90" />
</text>
<text string="&#xA3;6" state="0">
<text string="£6" state="0">
<color red="0.10" green="0.07" blue="0.00" />
<bounds x="0.05" y="0.05" width="0.90" height="0.90" />
</text>
</element>
<element name="8pound_award">
<text string="&#xA3;8" state="1">
<text string="£8" state="1">
<color red="1.00" green="0.70" blue="0.00" />
<bounds x="0.05" y="0.05" width="0.90" height="0.90" />
</text>
<text string="&#xA3;8" state="0">
<text string="£8" state="0">
<color red="0.10" green="0.07" blue="0.00" />
<bounds x="0.05" y="0.05" width="0.90" height="0.90" />
</text>
</element>
<element name="10pound_award">
<text string="&#xA3;10" state="1">
<element name="10pound_award_l">
<text string="£1" state="1" align="2">
<color red="1.00" green="0.70" blue="0.00" />
<bounds x="0.05" y="0.05" width="0.90" height="0.90" />
</text>
<text string="&#xA3;10" state="0">
<text string="£1" state="0" align="2">
<color red="0.10" green="0.07" blue="0.00" />
<bounds x="0.05" y="0.05" width="0.90" height="0.90" />
</text>
</element>
<element name="10pound_award_r">
<text string="0" state="1" align="1">
<color red="1.00" green="0.70" blue="0.00" />
<bounds x="0.05" y="0.05" width="0.90" height="0.90" />
</text>
<text string="0" state="0" align="1">
<color red="0.10" green="0.07" blue="0.00" />
<bounds x="0.05" y="0.05" width="0.90" height="0.90" />
</text>
Expand Down Expand Up @@ -1134,14 +1152,17 @@ license: CC0-1.0
<element name="lamp100" ref="room_accusation" state="0">
<bounds x="495" y="380" width="30" height="10" />
</element>
<element name="lamp97" ref="murder_cards" state="0">
<element ref="murder_cards">
<bounds x="495" y="390" width="30" height="10" />
</element>
<element name="lamp98" ref="pays_double" state="0">
<bounds x="495" y="400" width="30" height="10" />
</element>
<element name="lamp96" ref="10pound_award" state="0">
<bounds x="495" y="410" width="30" height="10" />
<element name="lamp96" ref="10pound_award_l" state="0">
<bounds x="493" y="410" width="20" height="10" />
</element>
<element name="lamp97" ref="10pound_award_r" state="0">
<bounds x="513" y="410" width="10" height="10" />
</element>


Expand Down Expand Up @@ -1226,23 +1247,5 @@ license: CC0-1.0
The lights blink on and off while collecting money from the bank. Afterwhich, they turn back on.
-->

<element name="lamp11" ref="undefined_lamp" state="0">
<bounds x="122" y="370" width="7" height="7" />
</element>
<element name="lamp14" ref="undefined_lamp" state="0">
<bounds x="118" y="378" width="7" height="7" />
</element>
<element name="lamp15" ref="undefined_lamp" state="0">
<bounds x="126" y="378" width="7" height="7" />
</element>
<element name="lamp224" ref="undefined_lamp" state="0">
<bounds x="114" y="386" width="7" height="7" />
</element>
<element name="lamp225" ref="undefined_lamp" state="0">
<bounds x="122" y="386" width="7" height="7" />
</element>
<element name="lamp226" ref="undefined_lamp" state="0">
<bounds x="130" y="386" width="7" height="7" />
</element>
</view>
</mamelayout>
Loading
Loading