Added lamps support to Golden Star (IGS) sets. Also fixed

the inputs accordingly. [Roberto Fresca]
This commit is contained in:
Roberto Fresca 2014-03-13 06:04:19 +00:00
parent 436d7fe1bd
commit ab7a80001d
5 changed files with 336 additions and 16 deletions

1
.gitattributes vendored
View File

@ -5965,6 +5965,7 @@ src/mame/layout/gldnpkr.lay svneol=native#text/xml
src/mame/layout/globalfr.lay svneol=native#text/xml
src/mame/layout/goldenc.lay svneol=native#text/xml
src/mame/layout/goldnpkr.lay svneol=native#text/xml
src/mame/layout/goldstar.lay svneol=native#text/xml
src/mame/layout/gorf.lay svneol=native#text/xml
src/mame/layout/grchamp.lay svneol=native#text/xml
src/mame/layout/gridiron.lay svneol=native#text/xml

View File

@ -117,6 +117,7 @@
#include "machine/nvram.h"
#include "includes/goldstar.h"
#include "goldstar.lh"
#include "cherryb3.lh"
#include "lucky8.lh"
#include "bingowng.lh"
@ -136,21 +137,42 @@ READ8_MEMBER(goldstar_state::protection_r)
return data[m_dataoffset++];
}
WRITE8_MEMBER(goldstar_state::goldstar_lamps_w)
{
/* bits
7654 3210
---- ---x Bet Red / Card 2.
---- --x- Stop 3 / Small / Info / Card 1
---- -x-- Bet Blue / Double / Card 3
---- x--- Stop 1 / Take
---x ---- Stop 2 / Big / Bonus
--x- ---- Start / Stop All / Card 4
*/
output_set_lamp_value(0, (data) & 1); /* Bet Red / Card 2 */
output_set_lamp_value(1, (data >> 1) & 1); /* Stop 3 / Small / Info / Card 1 */
output_set_lamp_value(2, (data >> 2) & 1); /* Bet Blue / Double / Card 3 */
output_set_lamp_value(3, (data >> 3) & 1); /* Stop 1 / Take */
output_set_lamp_value(4, (data >> 4) & 1); /* Stop 2 / Big / Bonus */
output_set_lamp_value(5, (data >> 5) & 1); /* Start / Stop All / Card 4 */
// popmessage("lamps: %02X", data);
}
WRITE8_MEMBER(goldstar_state::cb3_lamps_w)
{
/* bits
7654 3210
---- ---x Stop 2 / Big
---- --x- Bet / Double
---- --x- Blue Bet / Double
---- -x-- Stop 1 / Take
---- x--- Collect or separate Bet?
---- x--- Red Bet
---x ---- Stop 3 / Small / Info
--x- ---- Start / Stop All
*/
output_set_lamp_value(0, (data) & 1); /* Stop 2 / Big */
output_set_lamp_value(1, (data >> 1) & 1); /* Bet / Double */
output_set_lamp_value(1, (data >> 1) & 1); /* Blue Bet / Double */
output_set_lamp_value(2, (data >> 2) & 1); /* Stop 1 / Take */
output_set_lamp_value(3, (data >> 3) & 1); /* Collect or separate Bet */
output_set_lamp_value(3, (data >> 3) & 1); /* Red Bet */
output_set_lamp_value(4, (data >> 4) & 1); /* Stop 3 / Small / Info */
output_set_lamp_value(5, (data >> 5) & 1); /* Start / Stop All */
@ -183,6 +205,7 @@ static ADDRESS_MAP_START( goldstar_map, AS_PROGRAM, 8, goldstar_state )
AM_RANGE(0xf820, 0xf820) AM_READ_PORT("DSW2")
AM_RANGE(0xf830, 0xf830) AM_DEVREADWRITE("aysnd", ay8910_device, data_r, data_w)
AM_RANGE(0xf840, 0xf840) AM_DEVWRITE("aysnd", ay8910_device, address_w)
AM_RANGE(0xf900, 0xf900) AM_WRITE(goldstar_lamps_w)
AM_RANGE(0xfa00, 0xfa00) AM_WRITE(goldstar_fa00_w)
AM_RANGE(0xfb00, 0xfb00) AM_DEVREADWRITE("oki", okim6295_device, read, write)
AM_RANGE(0xfd00, 0xfdff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette")
@ -274,7 +297,7 @@ static ADDRESS_MAP_START( wcherry_map, AS_PROGRAM, 8, goldstar_state )
AM_RANGE(0xb800, 0xbfff) AM_RAM AM_SHARE("nvram")
AM_RANGE(0xc000, 0xc7ff) AM_ROM
/* Not sure... Need to be checked */
/* Video RAM and reels stuff are there just as placeholder, and obviously in wrong offset */
AM_RANGE(0xc800, 0xcfff) AM_RAM_WRITE(goldstar_fg_vidram_w ) AM_SHARE("fg_vidram")
AM_RANGE(0xd000, 0xd7ff) AM_RAM_WRITE(goldstar_fg_atrram_w ) AM_SHARE("fg_atrram")
AM_RANGE(0xd800, 0xd9ff) AM_RAM_WRITE(goldstar_reel1_ram_w ) AM_SHARE("reel1_ram")
@ -1691,13 +1714,13 @@ INPUT_PORTS_END
static INPUT_PORTS_START( goldstar )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) // appear in the input test but seems that lack of functions.
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) // appear in the input test but seems that lack of functions.
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_V) PORT_NAME("Bet Red / 2")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SLOT_STOP3 ) PORT_NAME("Stop 3 / Small / 1 / Info")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SLOT_STOP3 ) PORT_CODE(KEYCODE_C) PORT_NAME("Stop 3 / Small / 1 / Info")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_B) PORT_NAME("Bet Blue / D-UP / 3")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SLOT_STOP1 ) PORT_NAME("Stop 1 / Take")
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SLOT_STOP2 ) PORT_NAME("Stop 2 / Big / Ticket")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SLOT_STOP1 ) PORT_CODE(KEYCODE_Z) PORT_NAME("Stop 1 / Take")
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SLOT_STOP2 ) PORT_CODE(KEYCODE_X) PORT_NAME("Stop 2 / Big / Ticket")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_N) PORT_NAME("Start / Stop All / 4")
PORT_START("IN1")
@ -1705,9 +1728,10 @@ static INPUT_PORTS_START( goldstar )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* this is not a coin, not sure what it is */
/* maybe it's used to buy tickets. Will check soon. */
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
/* this is not a coin, not sure what it is */
/* maybe it's used to buy tickets. Will check soon. */
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_W) PORT_NAME("Collect")
PORT_SERVICE_NO_TOGGLE( 0x40, IP_ACTIVE_LOW )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_F1) PORT_NAME("Statistics")
@ -12277,8 +12301,8 @@ DRIVER_INIT_MEMBER(goldstar_state, wcherry)
**********************************************
YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS LAYOUT */
GAME( 199?, goldstar, 0, goldstar, goldstar, goldstar_state, goldstar, ROT0, "IGS", "Golden Star", 0 )
GAME( 199?, goldstbl, goldstar, goldstbl, goldstar, driver_device, 0, ROT0, "IGS", "Golden Star (Blue version)", 0 )
GAMEL( 199?, goldstar, 0, goldstar, goldstar, goldstar_state, goldstar, ROT0, "IGS", "Golden Star", 0, layout_goldstar )
GAMEL( 199?, goldstbl, goldstar, goldstbl, goldstar, driver_device, 0, ROT0, "IGS", "Golden Star (Blue version)", 0, layout_goldstar )
GAME( 199?, moonlght, goldstar, moonlght, goldstar, driver_device, 0, ROT0, "bootleg", "Moon Light (bootleg of Golden Star)", 0 )
GAME( 199?, chrygld, 0, chrygld, chrygld, goldstar_state, chrygld, ROT0, "bootleg", "Cherry Gold I", 0 )
GAME( 199?, chry10, 0, chrygld, chry10, goldstar_state, chry10, ROT0, "bootleg", "Cherry 10 (bootleg with PIC16F84)", 0 )

View File

@ -54,6 +54,7 @@ public:
DECLARE_WRITE8_MEMBER(protection_w);
DECLARE_READ8_MEMBER(protection_r);
DECLARE_WRITE8_MEMBER(ncb3_port81_w);
DECLARE_WRITE8_MEMBER(goldstar_lamps_w);
DECLARE_WRITE8_MEMBER(cb3_lamps_w);
DECLARE_WRITE8_MEMBER(cm_outport1_w);
DECLARE_WRITE8_MEMBER(lucky8_outport_w);

View File

@ -0,0 +1,293 @@
<?xml version="1.0"?>
<mamelayout version="2">
<!--
Golden Star control panel.
Written by Roberto Fresca.
-->
<!-- define button-lamps -->
<element name="betred" defstate="0">
<rect state="1">
<color red="1.0" green="0.0" blue="0.0" />
</rect>
<rect state="0">
<color red="0.15" green="0.0" blue="0.0" />
</rect>
<text string="BET RED">
<color red="0.0" green="0.0" blue="0.0" />
<bounds x="0" y="0.1" width="1" height="0.25" />
</text>
<text string="------">
<color red="0.0" green="0.0" blue="0.0" />
<bounds x="0" y="0.35" width="1" height="0.25" />
</text>
<text string="CARD 2">
<color red="0.0" green="0.0" blue="0.0" />
<bounds x="0" y="0.60" width="1" height="0.25" />
</text>
</element>
<element name="betblue" defstate="0">
<rect state="1">
<color red="0.2" green="0.2" blue="1.0" />
</rect>
<rect state="0">
<color red="0.04" green="0.04" blue="0.20" />
</rect>
<text string="BET BLUE">
<color red="0.0" green="0.0" blue="0.0" />
<bounds x="0" y="0.1" width="1" height="0.25" />
</text>
<text string="DOUBLE">
<color red="0.0" green="0.0" blue="0.0" />
<bounds x="0" y="0.35" width="1" height="0.25" />
</text>
<text string="CARD 3">
<color red="0.0" green="0.0" blue="0.0" />
<bounds x="0" y="0.60" width="1" height="0.25" />
</text>
</element>
<element name="stop1" defstate="0">
<rect state="1">
<color red="1.0" green="0.5" blue="0.0" />
</rect>
<rect state="0">
<color red="0.15" green="0.075" blue="0.0" />
</rect>
<text string="STOP 1">
<color red="0.0" green="0.0" blue="0.0" />
<bounds x="0" y="0.1" width="1" height="0.25" />
</text>
<text string="TAKE">
<color red="0.0" green="0.0" blue="0.0" />
<bounds x="0" y="0.35" width="1" height="0.25" />
</text>
<text string="------">
<color red="0.0" green="0.0" blue="0.0" />
<bounds x="0" y="0.60" width="1" height="0.25" />
</text>
</element>
<element name="stop2" defstate="0">
<rect state="1">
<color red="1.0" green="0.5" blue="0.0" />
</rect>
<rect state="0">
<color red="0.15" green="0.075" blue="0.0" />
</rect>
<text string="STOP 2">
<color red="0.0" green="0.0" blue="0.0" />
<bounds x="0" y="0.1" width="1" height="0.25" />
</text>
<text string="BIG">
<color red="0.0" green="0.0" blue="0.0" />
<bounds x="0" y="0.35" width="1" height="0.25" />
</text>
<text string="BONUS">
<color red="0.0" green="0.0" blue="0.0" />
<bounds x="0" y="0.60" width="1" height="0.25" />
</text>
</element>
<element name="stop3" defstate="0">
<rect state="1">
<color red="1.0" green="0.5" blue="0.0" />
</rect>
<rect state="0">
<color red="0.15" green="0.075" blue="0.0" />
</rect>
<text string="STOP 3">
<color red="0.0" green="0.0" blue="0.0" />
<bounds x="0" y="0.1" width="1" height="0.25" />
</text>
<text string="SMALL/INFO">
<color red="0.0" green="0.0" blue="0.0" />
<bounds x="0" y="0.35" width="1" height="0.25" />
</text>
<text string="CARD 1">
<color red="0.0" green="0.0" blue="0.0" />
<bounds x="0" y="0.60" width="1" height="0.25" />
</text>
</element>
<element name="start" defstate="0">
<rect state="1">
<color red="0.0" green="1.0" blue="0.0" />
</rect>
<rect state="0">
<color red="0.0" green="0.15" blue="0.0" />
</rect>
<text string="START">
<color red="0.0" green="0.0" blue="0.0" />
<bounds x="0" y="0.1" width="1" height="0.25" />
</text>
<text string="STOP ALL">
<color red="0.0" green="0.0" blue="0.0" />
<bounds x="0" y="0.35" width="1" height="0.25" />
</text>
<text string="CARD 4">
<color red="0.0" green="0.0" blue="0.0" />
<bounds x="0" y="0.60" width="1" height="0.25" />
</text>
</element>
<!-- define basic elements -->
<element name="cpanel">
<rect>
<color red="0.0" green="0.0" blue="0.0" />
</rect>
</element>
<element name="stop_b" defstate="0">
<rect state="1">
<color red="0.7" green="0.35" blue="0.0" />
</rect>
<rect state="0">
<color red="0.1" green="0.05" blue="0.0" />
</rect>
</element>
<element name="betred_b" defstate="0">
<rect state="1">
<color red="0.7" green="0.0" blue="0.0" />
</rect>
<rect state="0">
<color red="0.1" green="0.0" blue="0.0" />
</rect>
</element>
<element name="betblue_b" defstate="0">
<rect state="1">
<color red="0.14" green="0.14" blue="0.7" />
</rect>
<rect state="0">
<color red="0.030" green="0.030" blue="0.15" />
</rect>
</element>
<element name="start_b" defstate="0">
<rect state="1">
<color red="0.0" green="0.7" blue="0.0" />
</rect>
<rect state="0">
<color red="0.0" green="0.1" blue="0.0" />
</rect>
</element>
<!-- define cpanel degradee elements -->
<element name="cpanel1">
<rect>
<color red="0.20" green="0.20" blue="0.20" />
</rect>
</element>
<element name="cpanel2">
<rect>
<color red="0.15" green="0.15" blue="0.15" />
</rect>
</element>
<element name="cpanel3">
<rect>
<color red="0.10" green="0.10" blue="0.10" />
</rect>
</element>
<element name="cpanel4">
<rect>
<color red="0.05" green="0.05" blue="0.05" />
</rect>
</element>
<!-- define background -->
<view name="Button Lamps">
<screen index="0">
<bounds left="0" top="0" right="4" bottom="3" />
</screen>
<bezel element="cpanel">
<bounds left="0" right="4" top="3" bottom="3.50" />
</bezel>
<bezel element="cpanel1">
<bounds left="0" right="4" top="3.01" bottom="3.49" />
</bezel>
<bezel element="cpanel2">
<bounds left="0" right="4" top="3.02" bottom="3.48" />
</bezel>
<bezel element="cpanel3">
<bounds left="0" right="4" top="3.03" bottom="3.47" />
</bezel>
<bezel element="cpanel4">
<bounds left="0" right="4" top="3.04" bottom="3.46" />
</bezel>
<bezel element="cpanel">
<bounds left="0" right="4" top="3.05" bottom="3.45" />
</bezel>
<!-- define lamps -->
<bezel name="lamp0" element="betred_b">
<bounds x="2.05" y="3.08" width="0.50" height="0.34" />
</bezel>
<bezel name="lamp0" element="betred">
<bounds x="2.07" y="3.10" width="0.46" height="0.30" />
</bezel>
<bezel name="lamp1" element="stop_b">
<bounds x="1.25" y="3.08" width="0.50" height="0.34" />
</bezel>
<bezel name="lamp1" element="stop3">
<bounds x="1.27" y="3.10" width="0.46" height="0.30" />
</bezel>
<bezel name="lamp2" element="betblue_b">
<bounds x="2.65" y="3.08" width="0.50" height="0.34" />
</bezel>
<bezel name="lamp2" element="betblue">
<bounds x="2.67" y="3.10" width="0.46" height="0.30" />
</bezel>
<bezel name="lamp3" element="stop_b">
<bounds x="0.05" y="3.08" width="0.50" height="0.34" />
</bezel>
<bezel name="lamp3" element="stop1">
<bounds x="0.07" y="3.10" width="0.46" height="0.30" />
</bezel>
<bezel name="lamp4" element="stop_b">
<bounds x="0.65" y="3.08" width="0.50" height="0.34" />
</bezel>
<bezel name="lamp4" element="stop2">
<bounds x="0.67" y="3.10" width="0.46" height="0.30" />
</bezel>
<bezel name="lamp5" element="start_b">
<bounds x="3.45" y="3.08" width="0.50" height="0.34" />
</bezel>
<bezel name="lamp5" element="start">
<bounds x="3.47" y="3.10" width="0.46" height="0.30" />
</bezel>
</view>
</mamelayout>

View File

@ -2458,7 +2458,8 @@ $(DRIVERS)/goldnpkr.o: $(LAYOUT)/goldnpkr.lh \
$(DRIVERS)/lbeach.o: $(LAYOUT)/lbeach.lh
$(DRIVERS)/goldstar.o: $(LAYOUT)/cherryb3.lh \
$(DRIVERS)/goldstar.o: $(LAYOUT)/goldstar.lh \
$(LAYOUT)/cherryb3.lh \
$(LAYOUT)/lucky8.lh \
$(LAYOUT)/bingowng.lh