Readded basics (without sound stuff) to peyper.c driver + default layout (no whatsnew)

This commit is contained in:
stephh 2011-08-10 09:55:31 +00:00
parent 4fbe22b4a8
commit bf178883fb
4 changed files with 440 additions and 31 deletions

1
.gitattributes vendored
View File

@ -3705,6 +3705,7 @@ src/mame/layout/pe_poker.lay svneol=native#text/plain
src/mame/layout/pe_schip.lay svneol=native#text/plain
src/mame/layout/pe_slots.lay svneol=native#text/plain
src/mame/layout/peplus.lay svneol=native#text/plain
src/mame/layout/peyper.lay svneol=native#text/plain
src/mame/layout/pirpok2.lay svneol=native#text/plain
src/mame/layout/pmpoker.lay svneol=native#text/plain
src/mame/layout/pmroulet.lay -text svneol=native#plain/text

View File

@ -1,33 +1,258 @@
#include "emu.h"
#include "cpu/z80/z80.h"
#include "peyper.lh"
class peyper_state : public driver_device
{
public:
peyper_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag) { }
UINT8 irq_state;
UINT8 display_block;
UINT8 display[16];
};
static READ8_HANDLER(sw_r)
{
return 0xff;
}
static WRITE8_HANDLER(col_w)
{
peyper_state *state = space->machine().driver_data<peyper_state>();
if (data==0x90) state->display_block = 0;
}
static const UINT8 hex_to_7seg[16] =
{0x3F, 0x06, 0x5B, 0x4F,
0x66, 0x6D, 0x7D, 0x07,
0x7F, 0x6F, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00 };
static WRITE8_HANDLER(disp_w)
{
peyper_state *state = space->machine().driver_data<peyper_state>();
state->display[state->display_block] = data;
UINT8 a = data & 0x0f;
UINT8 b = data >> 4;
UINT8 hex_a = hex_to_7seg[a];
UINT8 hex_b = hex_to_7seg[b];
/*
0 -> XA0 DPL25,DPL27
1 -> XA1 DPL26,DPL28
2 -> DPL23,DPL5
3 -> DPL22,DPL4
4 -> DPL21,DPL3
5 -> DPL20,DPL2
6 -> DPL19,DPL1
7 -> DPL30,DPL33
*/
switch(state->display_block) {
case 0 :
output_set_indexed_value("dpl_",25,hex_a);
output_set_indexed_value("dpl_",27,hex_b);
break;
case 1 :
output_set_indexed_value("dpl_",26,hex_a);
output_set_indexed_value("dpl_",28,hex_b);
break;
case 2 :
output_set_indexed_value("dpl_",23,hex_a);
output_set_indexed_value("dpl_",5,hex_b);
break;
case 3 :
output_set_indexed_value("dpl_",22,hex_a);
output_set_indexed_value("dpl_",4,hex_b);
break;
case 4 :
output_set_indexed_value("dpl_",21,hex_a);
output_set_indexed_value("dpl_",3,hex_b);
break;
case 5 :
output_set_indexed_value("dpl_",20,hex_a);
output_set_indexed_value("dpl_",2,hex_b);
break;
case 6 :
output_set_indexed_value("dpl_",19,hex_a);
output_set_indexed_value("dpl_",1,hex_b);
break;
case 7 :
output_set_indexed_value("dpl_",30,hex_a);
output_set_indexed_value("dpl_",33,hex_b);
break;
/*
8 -> XB0
9 -> XB1
10 -> DPL11,DPL17
11 -> DPL10,DPL16
12 -> DPL09,DPL15
13 -> DPL08,DPL14
14 -> DPL07,DPL13
15 -> DPL31,DPL32
*/
case 8 :
/*
if (BIT(a,3)) logerror("TILT\n");
if (BIT(a,2)) logerror("ONC\n");
if (BIT(a,1)) logerror("GAME OVER\n");
if (BIT(a,0)) logerror("BALL IN PLAY\n");
*/
output_set_indexed_value("led_",1,BIT(b,0)); // PLAYER 1
output_set_indexed_value("led_",2,BIT(b,1)); // PLAYER 2
output_set_indexed_value("led_",3,BIT(b,2)); // PLAYER 3
output_set_indexed_value("led_",4,BIT(b,3)); // PLAYER 4
break;
case 9 :
if (!BIT(b,0)) output_set_indexed_value("dpl_",6,hex_to_7seg[0]);
if (!BIT(b,1)) output_set_indexed_value("dpl_",12,hex_to_7seg[0]);
if (!BIT(b,2)) output_set_indexed_value("dpl_",24,hex_to_7seg[0]);
if (!BIT(b,3)) output_set_indexed_value("dpl_",18,hex_to_7seg[0]);
output_set_indexed_value("dpl_",29,hex_a);
break;
case 10 :
output_set_indexed_value("dpl_",11,hex_a);
output_set_indexed_value("dpl_",17,hex_b);
break;
case 11 :
output_set_indexed_value("dpl_",10,hex_a);
output_set_indexed_value("dpl_",16,hex_b);
break;
case 12 :
output_set_indexed_value("dpl_",9,hex_a);
output_set_indexed_value("dpl_",15,hex_b);
break;
case 13 :
output_set_indexed_value("dpl_",8,hex_a);
output_set_indexed_value("dpl_",14,hex_b);
break;
case 14 :
output_set_indexed_value("dpl_",7,hex_a);
output_set_indexed_value("dpl_",13,hex_b);
break;
case 15 :
output_set_indexed_value("dpl_",31,hex_a);
output_set_indexed_value("dpl_",32,hex_b);
break;
}
state->display_block++;
state->display_block&=0x0f;
}
static WRITE8_HANDLER(lamp_w)
{
//logerror("lamp_w %02x\n",data);
//logerror("[%d]= %02x\n",4+offset/4,data);
}
static WRITE8_HANDLER(lamp7_w)
{
//logerror("[7]= %02x\n",data);
}
static WRITE8_HANDLER(sol_w)
{
//logerror("sol_w %02x\n",data);
}
static ADDRESS_MAP_START( peyper_map, AS_PROGRAM, 8 )
AM_RANGE(0x0000, 0xffff) AM_NOP
// AM_RANGE(0x0000, 0xffff) AM_NOP
ADDRESS_MAP_UNMAP_HIGH
AM_RANGE(0x0000, 0x5FFF) AM_ROM
AM_RANGE(0x6000, 0x67FF) AM_RAM //AM_BASE_GENERIC(nvram)
ADDRESS_MAP_END
static ADDRESS_MAP_START( peyper_io, AS_IO, 8 )
AM_RANGE(0x0000, 0xffff) AM_NOP
// AM_RANGE(0x0000, 0xffff) AM_NOP
ADDRESS_MAP_UNMAP_HIGH
ADDRESS_MAP_GLOBAL_MASK(0xff)
AM_RANGE(0x00, 0x00) AM_READWRITE(sw_r,disp_w)
AM_RANGE(0x01, 0x01) AM_WRITE(col_w)
// AM_RANGE(0x04, 0x04) AM_DEVWRITE("ay8910_0", ay8910_address_w)
// AM_RANGE(0x06, 0x06) AM_DEVWRITE("ay8910_0", ay8910_data_w)
// AM_RANGE(0x08, 0x08) AM_DEVWRITE("ay8910_1", ay8910_address_w)
// AM_RANGE(0x0a, 0x0a) AM_DEVWRITE("ay8910_1", ay8910_data_w)
AM_RANGE(0x0c, 0x0c) AM_WRITE(sol_w)
AM_RANGE(0x10, 0x18) AM_WRITE(lamp_w)
AM_RANGE(0x20, 0x20) AM_READ_PORT("DSW0")
AM_RANGE(0x24, 0x24) AM_READ_PORT("DSW1")
AM_RANGE(0x28, 0x28) AM_READ_PORT("SW0")
AM_RANGE(0x2c, 0x2c) AM_WRITE(lamp7_w)
ADDRESS_MAP_END
static INPUT_PORTS_START( peyper )
PORT_START("SW0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) // N.C.
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // N.C.
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) // Reset
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_TILT ) // Tilt
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) // Start game
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) // Small coin
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 ) // Medium coin
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN3 ) // Big coin
PORT_START("DSW0")
PORT_DIPNAME( 0x80, 0x00, "Extra Ball" ) // Bola Extra
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
PORT_DIPSETTING( 0x80, DEF_STR( Yes ) )
PORT_DIPNAME( 0x40, 0x00, "Premio Loteria" ) // Premio Loteria
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
PORT_DIPSETTING( 0x40, DEF_STR( Yes ) )
PORT_DIPNAME( 0x20, 0x00, "Reclamo" ) // Reclamo
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
PORT_DIPSETTING( 0x20, DEF_STR( Yes ) )
PORT_DIPNAME( 0x18, 0x00, "Partidas/Moneda" ) // Partidas/Moneda
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x08, DEF_STR( On ) )
PORT_DIPSETTING( 0x10, DEF_STR( On ) )
PORT_DIPSETTING( 0x18, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x00, "Bolas Partida" ) // Bolas Partida
PORT_DIPSETTING( 0x00, "5" )
PORT_DIPSETTING( 0x04, "3" )
PORT_DIPNAME( 0x03, 0x00, "Premios / Puntos" ) // Premios / Puntos
PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x01, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x02, DEF_STR( 2C_3C ) )
PORT_DIPSETTING( 0x03, DEF_STR( 1C_2C ) )
PORT_START("DSW1")
PORT_DIPNAME( 0x80, 0x00, "NC" ) // N.C.
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
PORT_DIPSETTING( 0x80, DEF_STR( Yes ) )
PORT_DIPNAME( 0x40, 0x00, "NC" ) // N.C.
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
PORT_DIPSETTING( 0x40, DEF_STR( Yes ) )
PORT_DIPNAME( 0x20, 0x00, "NC" ) // N.C.
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
PORT_DIPSETTING( 0x20, DEF_STR( Yes ) )
PORT_DIPNAME( 0x10, 0x00, "NC" ) // N.C.
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x10, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x00, "NC" ) // N.C.
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPSETTING( 0x08, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x00, "Visualizac. H. Funcion" ) // Visualizac. H. Funcion
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
PORT_DIPSETTING( 0x04, DEF_STR( Yes ) )
PORT_DIPNAME( 0x02, 0x00, "Visualizac. Monederos" ) // Visualizac. Monederos
PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x02, DEF_STR( 1C_1C ) )
PORT_DIPNAME( 0x01, 0x00, "Visualizac. Partidas" ) // Visualizac. Partidas
PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) )
PORT_DIPSETTING( 0x01, DEF_STR( 1C_2C ) )
INPUT_PORTS_END
static MACHINE_RESET( peyper )
{
}
static DRIVER_INIT( peyper )
{
peyper_state *state = machine.driver_data<peyper_state>();
state->irq_state = 0;
}
static MACHINE_CONFIG_START( peyper, peyper_state )
@ -35,21 +260,19 @@ static MACHINE_CONFIG_START( peyper, peyper_state )
MCFG_CPU_ADD("maincpu", Z80, 2500000)
MCFG_CPU_PROGRAM_MAP(peyper_map)
MCFG_CPU_IO_MAP(peyper_io)
MCFG_CPU_PERIODIC_INT(irq0_line_hold, 1250 * 2)
MCFG_MACHINE_RESET( peyper )
/* video hardware */
MCFG_DEFAULT_LAYOUT(layout_peyper)
MACHINE_CONFIG_END
/*-------------------------------------------------------------------
/ Gamatron (1986)
/-------------------------------------------------------------------*/
/*-------------------------------------------------------------------
/ Hang-On (1988)
/-------------------------------------------------------------------*/
static DRIVER_INIT( peyper )
{
}
/*-------------------------------------------------------------------
/ Night Fever (1979)
/-------------------------------------------------------------------*/
/*-------------------------------------------------------------------
/ Odisea Paris-Dakar (1987)
@ -61,6 +284,21 @@ ROM_START(odisea)
ROM_LOAD("odiseac.bin", 0x4000, 0x2000, CRC(832dee5e) SHA1(9b87ffd768ab2610f2352adcf22c4a7880de47ab))
ROM_END
/*-------------------------------------------------------------------
/ Wolf Man (1987)
/-------------------------------------------------------------------*/
ROM_START(wolfman)
ROM_REGION(0x10000, "maincpu", 0)
ROM_LOAD("memoriaa.bin", 0x0000, 0x2000, CRC(1fec83fe) SHA1(5dc887d0fa00129ae31451c03bfe442f87dd2f54))
ROM_LOAD("memoriab.bin", 0x2000, 0x2000, CRC(62a1e3ec) SHA1(dc472c7c9d223820f8f1031c92e36890c1fcba7d))
ROM_LOAD("memoriac.bin", 0x4000, 0x2000, CRC(468f16f0) SHA1(66ce0464d82331cfc0ac1f6fbd871066e4e57262))
ROM_END
/*-------------------------------------------------------------------
/ Night Fever (1979)
/-------------------------------------------------------------------*/
/*-------------------------------------------------------------------
/ Odin De Luxe (1985)
/-------------------------------------------------------------------*/
@ -70,6 +308,19 @@ ROM_START(odin_dlx)
ROM_LOAD("2a.bin", 0x2000, 0x2000, CRC(46744695) SHA1(fdbd8a93b3e4a9697e77e7d381759829b86fe28b))
ROM_END
/*-------------------------------------------------------------------
/ Solar Wars (1986)
/-------------------------------------------------------------------*/
ROM_START(solarwap)
ROM_REGION(0x10000, "maincpu", 0)
ROM_LOAD("solarw1c.bin", 0x0000, 0x2000, CRC(aa6bf0cd) SHA1(7332a4b1679841283d846f3e4f1792cb8e9529bf))
ROM_LOAD("solarw2.bin", 0x2000, 0x2000, CRC(95e2cbb1) SHA1(f9ab3222ca0b9e0796030a7a618847a4e8f77957))
ROM_END
/*-------------------------------------------------------------------
/ Gamatron (1986)
/-------------------------------------------------------------------*/
/*-------------------------------------------------------------------
/ Pole Position (1987)
/-------------------------------------------------------------------*/
@ -80,15 +331,6 @@ ROM_START(poleposn)
ROM_LOAD("3.bin", 0x4000, 0x2000, CRC(461fe9ca) SHA1(01bf35550e2c55995f167293746f355cfd484af1))
ROM_END
/*-------------------------------------------------------------------
/ Solar Wars (1986)
/-------------------------------------------------------------------*/
ROM_START(solarwap)
ROM_REGION(0x10000, "maincpu", 0)
ROM_LOAD("solarw1c.bin", 0x0000, 0x2000, CRC(aa6bf0cd) SHA1(7332a4b1679841283d846f3e4f1792cb8e9529bf))
ROM_LOAD("solarw2.bin", 0x2000, 0x2000, CRC(95e2cbb1) SHA1(f9ab3222ca0b9e0796030a7a618847a4e8f77957))
ROM_END
/*-------------------------------------------------------------------
/ Star Wars (1987)
/-------------------------------------------------------------------*/
@ -100,14 +342,9 @@ ROM_START(sonstwar)
ROM_END
/*-------------------------------------------------------------------
/ Wolf Man (1987)
/ Hang-On (1988)
/-------------------------------------------------------------------*/
ROM_START(wolfman)
ROM_REGION(0x10000, "maincpu", 0)
ROM_LOAD("memoriaa.bin", 0x0000, 0x2000, CRC(1fec83fe) SHA1(5dc887d0fa00129ae31451c03bfe442f87dd2f54))
ROM_LOAD("memoriab.bin", 0x2000, 0x2000, CRC(62a1e3ec) SHA1(dc472c7c9d223820f8f1031c92e36890c1fcba7d))
ROM_LOAD("memoriac.bin", 0x4000, 0x2000, CRC(468f16f0) SHA1(66ce0464d82331cfc0ac1f6fbd871066e4e57262))
ROM_END
GAME( 1987, odisea, 0, peyper, peyper, peyper, ROT0, "Peyper", "Odisea Paris-Dakar", GAME_NOT_WORKING | GAME_NO_SOUND | GAME_MECHANICAL)
GAME( 1987, wolfman, 0, peyper, peyper, peyper, ROT0, "Peyper", "Wolf Man", GAME_NOT_WORKING | GAME_NO_SOUND | GAME_MECHANICAL)

169
src/mame/layout/peyper.lay Normal file
View File

@ -0,0 +1,169 @@
<?xml version="1.0"?>
<mamelayout version="2">
<element name="digit" defstate="0">
<led7seg>
<color red="0.75" green="0" blue="0.0" />
</led7seg>
</element>
<element name="player_1_str" defstate="0">
<text string="PLAYER 1">
<color red="1.0" green="1.0" blue="1.0" />
<bounds x="0" y="0" width="25" height="5" />
</text>
</element>
<element name="player_2_str" defstate="0">
<text string="PLAYER 2">
<color red="1.0" green="1.0" blue="1.0" />
<bounds x="0" y="0" width="25" height="5" />
</text>
</element>
<element name="player_3_str" defstate="0">
<text string="PLAYER 3">
<color red="1.0" green="1.0" blue="1.0" />
<bounds x="0" y="0" width="25" height="5" />
</text>
</element>
<element name="player_4_str" defstate="0">
<text string="PLAYER 4">
<color red="1.0" green="1.0" blue="1.0" />
<bounds x="0" y="0" width="25" height="5" />
</text>
</element>
<element name="red_led" defstate="0">
<disk state="1">
<color red="0.75" green="0.0" blue="0.0" />
</disk>
<disk state="0">
<color red="0.09375" green="0.0" blue="0.0" />
</disk>
</element>
<view name="Standard">
<bezel name="led_1" element="red_led">
<bounds x="10" y="17" width="10" height="10" />
</bezel>
<!-- Jugador 1 -->
<bezel name="dpl_30" element="digit">
<bounds x="30" y="10" width="18" height="24" />
</bezel>
<bezel name="dpl_1" element="digit">
<bounds x="54" y="10" width="18" height="24" />
</bezel>
<bezel name="dpl_2" element="digit">
<bounds x="72" y="10" width="18" height="24" />
</bezel>
<bezel name="dpl_3" element="digit">
<bounds x="90" y="10" width="18" height="24" />
</bezel>
<bezel name="dpl_4" element="digit">
<bounds x="114" y="10" width="18" height="24" />
</bezel>
<bezel name="dpl_5" element="digit">
<bounds x="132" y="10" width="18" height="24" />
</bezel>
<bezel name="dpl_6" element="digit">
<bounds x="150" y="10" width="18" height="24" />
</bezel>
<!-- Credito -->
<bezel name="dpl_25" element="digit">
<bounds x="230" y="40" width="12" height="16" />
</bezel>
<bezel name="dpl_26" element="digit">
<bounds x="242" y="40" width="12" height="16" />
</bezel>
<!-- Extra play -->
<bezel name="dpl_27" element="digit">
<bounds x="280" y="40" width="12" height="16" />
</bezel>
<!-- Extra ball -->
<bezel name="dpl_28" element="digit">
<bounds x="300" y="40" width="12" height="16" />
</bezel>
<bezel name="led_2" element="red_led">
<bounds x="350" y="17" width="10" height="10" />
</bezel>
<!-- Jugador 2 -->
<bezel name="dpl_31" element="digit">
<bounds x="370" y="10" width="18" height="24" />
</bezel>
<bezel name="dpl_7" element="digit">
<bounds x="394" y="10" width="18" height="24" />
</bezel>
<bezel name="dpl_8" element="digit">
<bounds x="412" y="10" width="18" height="24" />
</bezel>
<bezel name="dpl_9" element="digit">
<bounds x="430" y="10" width="18" height="24" />
</bezel>
<bezel name="dpl_10" element="digit">
<bounds x="454" y="10" width="18" height="24" />
</bezel>
<bezel name="dpl_11" element="digit">
<bounds x="472" y="10" width="18" height="24" />
</bezel>
<bezel name="dpl_12" element="digit">
<bounds x="490" y="10" width="18" height="24" />
</bezel>
<bezel name="led_4" element="red_led">
<bounds x="10" y="65" width="10" height="10" />
</bezel>
<!-- Jugador 4 -->
<bezel name="dpl_32" element="digit">
<bounds x="30" y="58" width="18" height="24" />
</bezel>
<bezel name="dpl_13" element="digit">
<bounds x="54" y="58" width="18" height="24" />
</bezel>
<bezel name="dpl_14" element="digit">
<bounds x="72" y="58" width="18" height="24" />
</bezel>
<bezel name="dpl_15" element="digit">
<bounds x="90" y="58" width="18" height="24" />
</bezel>
<bezel name="dpl_16" element="digit">
<bounds x="114" y="58" width="18" height="24" />
</bezel>
<bezel name="dpl_17" element="digit">
<bounds x="132" y="58" width="18" height="24" />
</bezel>
<bezel name="dpl_18" element="digit">
<bounds x="150" y="58" width="18" height="24" />
</bezel>
<!-- Bola en juego / Loteria -->
<bezel name="dpl_29" element="digit">
<bounds x="260" y="58" width="18" height="24" />
</bezel>
<bezel name="led_3" element="red_led">
<bounds x="350" y="65" width="10" height="10" />
</bezel>
<!-- Jugador 3 -->
<bezel name="dpl_33" element="digit">
<bounds x="370" y="58" width="18" height="24" />
</bezel>
<bezel name="dpl_19" element="digit">
<bounds x="394" y="58" width="18" height="24" />
</bezel>
<bezel name="dpl_20" element="digit">
<bounds x="412" y="58" width="18" height="24" />
</bezel>
<bezel name="dpl_21" element="digit">
<bounds x="430" y="58" width="18" height="24" />
</bezel>
<bezel name="dpl_22" element="digit">
<bounds x="454" y="58" width="18" height="24" />
</bezel>
<bezel name="dpl_23" element="digit">
<bounds x="472" y="58" width="18" height="24" />
</bezel>
<bezel name="dpl_24" element="digit">
<bounds x="490" y="58" width="18" height="24" />
</bezel>
</view>
</mamelayout>

View File

@ -2088,6 +2088,8 @@ $(DRIVERS)/wecleman.o: $(LAYOUT)/wecleman.lh
$(DRIVERS)/zac2650.o: $(LAYOUT)/tinv2650.lh
$(DRIVERS)/peyper.o: $(LAYOUT)/peyper.lh
#-------------------------------------------------
# misc dependencies
#-------------------------------------------------