summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2008-01-16 16:27:43 +0000
committer Aaron Giles <aaron@aarongiles.com>2008-01-16 16:27:43 +0000
commit907d9df8f1c166a4700499b0ac33ee6b230ec48d (patch)
treefe6e3cb38b14f38c9612b7b5b08c943d2a3b8f47
parent819dd27efc7bad6e44fd40ffb1aa3c5db11647e6 (diff)
Fixed up LAI games to working status.
Added CUSTOM_INPUT macro for defining input port callbacks.
-rw-r--r--src/emu/drivers/xtal.h1
-rw-r--r--src/emu/inptport.h5
-rw-r--r--src/mame/drivers/lethalj.c436
-rw-r--r--src/mame/mamedriv.c2
-rw-r--r--src/mame/video/lethalj.c35
5 files changed, 265 insertions, 214 deletions
diff --git a/src/emu/drivers/xtal.h b/src/emu/drivers/xtal.h
index b0617e3c117..bc065981669 100644
--- a/src/emu/drivers/xtal.h
+++ b/src/emu/drivers/xtal.h
@@ -59,6 +59,7 @@ enum
XTAL_10MHz = 10000000,
XTAL_10_595MHz = 10595000, /* Mad Alien */
XTAL_11MHz = 11000000, /* Mario I8039 sound */
+ XTAL_11_0592MHz = 11059200, /* Lethal Justice */
XTAL_11_289MHz = 11289000, /* Vanguard */
XTAL_12MHz = 12000000,
XTAL_12_096MHz = 12096000, /* Some early 80's Atari games */
diff --git a/src/emu/inptport.h b/src/emu/inptport.h
index 28f8b78603f..585b4e16819 100644
--- a/src/emu/inptport.h
+++ b/src/emu/inptport.h
@@ -35,6 +35,10 @@
#define IP_ACTIVE_LOW 0xffffffff
+/* macros for a timer callback functions */
+#define CUSTOM_INPUT(name) UINT32 name(void *param)
+
+
/* sequence types for input_port_seq() call */
enum _input_seq_type
{
@@ -44,6 +48,7 @@ enum _input_seq_type
};
typedef enum _input_seq_type input_seq_type;
+
/* conditions for DIP switches */
enum
{
diff --git a/src/mame/drivers/lethalj.c b/src/mame/drivers/lethalj.c
index 4630a4b9e38..c11ad855b30 100644
--- a/src/mame/drivers/lethalj.c
+++ b/src/mame/drivers/lethalj.c
@@ -7,15 +7,13 @@
Games supported:
* Lethal Justice
* Egg Venture
+ * Ripper Ribit
+ * Chicken Farm
+ * Crazzy Clownz
Known bugs:
* some DIP switches not understood
- Note:
- Even though Egg Venture looks like it has a few extra scanlines at
- the bottom, the video hardware is explicitly programmed to only
- display 236 lines. Altering this will lead to bad flickering.
-
****************************************************************************
EU21 EU18 EU20 32.000MHz
@@ -46,10 +44,70 @@ Note 2: Lethal Justice uses a TMS34010FNL-50 instead of the TMS34010FNL-40
#include "driver.h"
#include "cpu/tms34010/tms34010.h"
#include "lethalj.h"
+#include "machine/ticket.h"
#include "sound/okim6295.h"
-#define VIDEO_CLOCK 11289600
-#define VIDEO_CLOCK_LETHALJ 11059200
+
+#define MASTER_CLOCK XTAL_40MHz
+#define SOUND_CLOCK XTAL_2MHz
+
+#define VIDEO_CLOCK XTAL_11_289MHz
+#define VIDEO_CLOCK_LETHALJ XTAL_11_0592MHz
+
+
+
+/*************************************
+ *
+ * Custom inputs
+ *
+ *************************************/
+
+static CUSTOM_INPUT( ticket_status )
+{
+ return ticket_dispenser_0_r(0) >> 7;
+}
+
+
+static CUSTOM_INPUT( cclownz_paddle )
+{
+ int value = readinputportbytag("PADDLE");
+ return ((value << 4) & 0xf00) | (value & 0x00f);
+}
+
+
+
+/*************************************
+ *
+ * Output controls
+ *
+ *************************************/
+
+static WRITE16_HANDLER( ripribit_control_w )
+{
+ coin_counter_w(0, data & 1);
+ ticket_dispenser_0_w(0, ((data >> 1) & 1) << 7);
+ output_set_lamp_value(0, (data >> 2) & 1);
+}
+
+
+static WRITE16_HANDLER( cfarm_control_w )
+{
+ ticket_dispenser_0_w(0, ((data >> 0) & 1) << 7);
+ output_set_lamp_value(0, (data >> 2) & 1);
+ output_set_lamp_value(1, (data >> 3) & 1);
+ output_set_lamp_value(2, (data >> 4) & 1);
+ coin_counter_w(0, (data >> 7) & 1);
+}
+
+
+static WRITE16_HANDLER( cclownz_control_w )
+{
+ ticket_dispenser_0_w(0, ((data >> 0) & 1) << 7);
+ output_set_lamp_value(0, (data >> 2) & 1);
+ output_set_lamp_value(1, (data >> 4) & 1);
+ output_set_lamp_value(2, (data >> 5) & 1);
+ coin_counter_w(0, (data >> 6) & 1);
+}
@@ -64,13 +122,13 @@ static ADDRESS_MAP_START( lethalj_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x04000000, 0x0400000f) AM_READWRITE(OKIM6295_status_0_lsb_r, OKIM6295_data_0_lsb_w)
AM_RANGE(0x04000010, 0x0400001f) AM_READWRITE(OKIM6295_status_1_lsb_r, OKIM6295_data_1_lsb_w)
AM_RANGE(0x04100000, 0x0410000f) AM_READWRITE(OKIM6295_status_2_lsb_r, OKIM6295_data_2_lsb_w)
- AM_RANGE(0x04100010, 0x0410001f) AM_READNOP /* read but never examined */
+// AM_RANGE(0x04100010, 0x0410001f) AM_READNOP /* read but never examined */
AM_RANGE(0x04200000, 0x0420001f) AM_WRITENOP /* clocks bits through here */
AM_RANGE(0x04300000, 0x0430007f) AM_READ(lethalj_gun_r)
AM_RANGE(0x04400000, 0x0440000f) AM_WRITENOP /* clocks bits through here */
AM_RANGE(0x04500010, 0x0450001f) AM_READ(input_port_0_word_r)
AM_RANGE(0x04600000, 0x0460000f) AM_READ(input_port_1_word_r)
- AM_RANGE(0x04700000, 0x047000ff) AM_WRITE(lethalj_blitter_w)
+ AM_RANGE(0x04700000, 0x0470007f) AM_WRITE(lethalj_blitter_w)
AM_RANGE(0xc0000000, 0xc00001ff) AM_READWRITE(tms34010_io_register_r, tms34010_io_register_w)
AM_RANGE(0xc0000240, 0xc000025f) AM_WRITENOP /* seems to be a bug in their code, one of many. */
AM_RANGE(0xff800000, 0xffffffff) AM_ROM AM_REGION(REGION_USER1, 0)
@@ -252,213 +310,171 @@ static INPUT_PORTS_START( eggvntdx )
INPUT_PORTS_END
-static INPUT_PORTS_START( laigames )
- /* No Idea about the inputs */
+static INPUT_PORTS_START( ripribit )
+ PORT_START
+ PORT_BIT( 0x000f, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
+ PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(ticket_status, NULL)
+ PORT_BIT( 0xffc0, IP_ACTIVE_LOW, IPT_UNUSED )
+
PORT_START
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_SERVICE1 )
- PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_SERVICE_NO_TOGGLE( 0x0002, IP_ACTIVE_HIGH )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0010, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0020, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0040, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0100, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0200, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0400, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0800, 0x0800, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0800, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x1000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x2000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x4000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x8000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPSETTING( 0x0010, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x0020, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x00c0, 0x0000, DEF_STR( Coinage ))
+ PORT_DIPSETTING( 0x0080, DEF_STR( 3C_1C ))
+ PORT_DIPSETTING( 0x0040, DEF_STR( 2C_1C ))
+ PORT_DIPSETTING( 0x0000, DEF_STR( 1C_1C ))
+ PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_2C ))
+ PORT_DIPNAME( 0x0700, 0x0200, "Starting Jackpot" )
+ PORT_DIPSETTING( 0x0000, "0" )
+ PORT_DIPSETTING( 0x0100, "5" )
+ PORT_DIPSETTING( 0x0200, "10" )
+ PORT_DIPSETTING( 0x0300, "15" )
+ PORT_DIPSETTING( 0x0400, "20" )
+ PORT_DIPSETTING( 0x0500, "25" )
+ PORT_DIPSETTING( 0x0600, "30" )
+ PORT_DIPSETTING( 0x0700, "35" )
+ PORT_DIPNAME( 0x1800, 0x1800, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x0000, "0" )
+ PORT_DIPSETTING( 0x0800, "1" )
+ PORT_DIPSETTING( 0x1000, "2" )
+ PORT_DIPSETTING( 0x1800, "3" )
+ PORT_DIPNAME( 0xe000, 0x8000, "Points per Ticket" )
+ PORT_DIPSETTING( 0xe000, "200" )
+ PORT_DIPSETTING( 0xc000, "300" )
+ PORT_DIPSETTING( 0xa000, "400" )
+ PORT_DIPSETTING( 0x8000, "500" )
+ PORT_DIPSETTING( 0x6000, "600" )
+ PORT_DIPSETTING( 0x4000, "700" )
+ PORT_DIPSETTING( 0x2000, "800" )
+ PORT_DIPSETTING( 0x0000, "1000" )
+
+ PORT_START /* fake analog X */
+ PORT_START /* fake analog Y */
+ PORT_START /* fake analog X */
+ PORT_START /* fake analog Y */
+INPUT_PORTS_END
+
+static INPUT_PORTS_START( cfarm )
PORT_START
- PORT_DIPNAME( 0x0001, 0x0001, "1" )
- PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0002, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0004, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0008, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_SERVICE1 )
+ PORT_SERVICE_NO_TOGGLE( 0x0002, IP_ACTIVE_HIGH )
+ PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN1 )
+ PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0010, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0020, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0040, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0100, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0200, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0400, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0800, 0x0800, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0800, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x1000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x2000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x4000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x8000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x00c0, 0x0000, DEF_STR( Coinage ))
+ PORT_DIPSETTING( 0x0080, DEF_STR( 3C_1C ))
+ PORT_DIPSETTING( 0x0040, DEF_STR( 2C_1C ))
+ PORT_DIPSETTING( 0x0000, DEF_STR( 1C_1C ))
+ PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_2C ))
+ PORT_DIPNAME( 0x0700, 0x0300, "Starting Jackpot" )
+ PORT_DIPSETTING( 0x0000, "0" )
+ PORT_DIPSETTING( 0x0100, "5" )
+ PORT_DIPSETTING( 0x0200, "8" )
+ PORT_DIPSETTING( 0x0300, "10" )
+ PORT_DIPSETTING( 0x0400, "12" )
+ PORT_DIPSETTING( 0x0500, "15" )
+ PORT_DIPSETTING( 0x0600, "18" )
+ PORT_DIPSETTING( 0x0700, "20" )
+ PORT_DIPNAME( 0x1800, 0x1800, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x0000, "0" )
+ PORT_DIPSETTING( 0x0800, "1" )
+ PORT_DIPSETTING( 0x1000, "2" )
+ PORT_DIPSETTING( 0x1800, "3" )
+ PORT_DIPNAME( 0xe000, 0x8000, "Eggs per Ticket" )
+ PORT_DIPSETTING( 0xe000, "1" )
+ PORT_DIPSETTING( 0xc000, "2" )
+ PORT_DIPSETTING( 0xa000, "3" )
+ PORT_DIPSETTING( 0x8000, "4" )
+ PORT_DIPSETTING( 0x6000, "5" )
+ PORT_DIPSETTING( 0x4000, "6" )
+ PORT_DIPSETTING( 0x2000, "8" )
+ PORT_DIPSETTING( 0x0000, "10" )
- PORT_START /* fake analog X */
- PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(10)
+ PORT_START
+ PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(ticket_status, NULL)
+ PORT_BIT( 0x0006, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
+ PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
+ PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
+ PORT_BIT( 0xffc0, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_START /* fake analog X */
PORT_START /* fake analog Y */
- PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(70) PORT_KEYDELTA(10)
-
PORT_START /* fake analog X */
- PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_PLAYER(2)
-
PORT_START /* fake analog Y */
- PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(70) PORT_KEYDELTA(10) PORT_PLAYER(2)
INPUT_PORTS_END
-static INPUT_PORTS_START( ripribit )
- /* No Idea about the inputs */
- PORT_START
- PORT_DIPNAME( 0x0001, 0x0001, "0" )
- PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0002, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0004, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0008, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
- PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0020, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0040, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0100, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0200, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0400, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0800, 0x0800, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0800, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x1000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x2000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x4000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x8000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
-
+static INPUT_PORTS_START( cclownz )
PORT_START
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_SERVICE1 )
- PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_SERVICE_NO_TOGGLE( 0x0002, IP_ACTIVE_HIGH )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN1 )
- PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) )
+ PORT_BIT( 0x0018, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0010, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0020, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0040, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0100, 0x0000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0100, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0200, 0x0000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0200, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0400, 0x0000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0400, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0800, 0x0000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0800, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x1000, 0x0000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x1000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x2000, 0x0000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x2000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x4000, 0x0000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x4000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x8000, 0x0000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x8000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x00c0, 0x0000, DEF_STR( Coinage ))
+ PORT_DIPSETTING( 0x0080, DEF_STR( 3C_1C ))
+ PORT_DIPSETTING( 0x0040, DEF_STR( 2C_1C ))
+ PORT_DIPSETTING( 0x0000, DEF_STR( 1C_1C ))
+ PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_2C ))
+ PORT_DIPNAME( 0x0700, 0x0700, "Starting Jackpot" )
+ PORT_DIPSETTING( 0x0000, "0" )
+ PORT_DIPSETTING( 0x0100, "2" )
+ PORT_DIPSETTING( 0x0200, "5" )
+ PORT_DIPSETTING( 0x0300, "8" )
+ PORT_DIPSETTING( 0x0400, "10" )
+ PORT_DIPSETTING( 0x0500, "15" )
+ PORT_DIPSETTING( 0x0600, "20" )
+ PORT_DIPSETTING( 0x0700, "30" )
+ PORT_DIPNAME( 0x1800, 0x1800, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x0000, "0" )
+ PORT_DIPSETTING( 0x0800, "1" )
+ PORT_DIPSETTING( 0x1000, "2" )
+ PORT_DIPSETTING( 0x1800, "3" )
+ PORT_DIPNAME( 0xe000, 0x8000, "Points per Ticket" )
+ PORT_DIPSETTING( 0xe000, "700" )
+ PORT_DIPSETTING( 0xc000, "900" )
+ PORT_DIPSETTING( 0xa000, "1200" )
+ PORT_DIPSETTING( 0x8000, "1500" )
+ PORT_DIPSETTING( 0x6000, "1800" )
+ PORT_DIPSETTING( 0x4000, "2100" )
+ PORT_DIPSETTING( 0x2000, "2400" )
+ PORT_DIPSETTING( 0x0000, "3000" )
- PORT_START /* fake analog X */
+ PORT_START
+ PORT_BIT( 0x0f0f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(cclownz_paddle, NULL)
+ PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(ticket_status, NULL)
+ PORT_BIT( 0x0060, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 )
+ PORT_BIT( 0xf000, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_START /* fake analog X */
PORT_START /* fake analog Y */
-
PORT_START /* fake analog X */
-
PORT_START /* fake analog Y */
+
+ PORT_START_TAG("PADDLE")
+ PORT_BIT( 0x00ff, 0x0000, IPT_PADDLE ) PORT_PLAYER(1) PORT_SENSITIVITY(50) PORT_KEYDELTA(8) PORT_CENTERDELTA(0) PORT_REVERSE
INPUT_PORTS_END
@@ -504,12 +520,12 @@ static const tms34010_config tms_config_lethalj =
static MACHINE_DRIVER_START( gameroom )
/* basic machine hardware */
- MDRV_CPU_ADD_TAG("main", TMS34010, 40000000)
+ MDRV_CPU_ADD_TAG("main", TMS34010, MASTER_CLOCK)
MDRV_CPU_CONFIG(tms_config)
MDRV_CPU_PROGRAM_MAP(lethalj_map,0)
/* video hardware */
- MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER )
+ MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
MDRV_PALETTE_LENGTH(32768)
MDRV_SCREEN_ADD("main", 0)
@@ -522,15 +538,15 @@ static MACHINE_DRIVER_START( gameroom )
/* sound hardware */
MDRV_SPEAKER_STANDARD_MONO("mono")
- MDRV_SOUND_ADD(OKIM6295, 2000000)
+ MDRV_SOUND_ADD(OKIM6295, SOUND_CLOCK)
MDRV_SOUND_CONFIG(okim6295_interface_region_1_pin7high)
MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
- MDRV_SOUND_ADD(OKIM6295, 2000000)
+ MDRV_SOUND_ADD(OKIM6295, SOUND_CLOCK)
MDRV_SOUND_CONFIG(okim6295_interface_region_2_pin7high)
MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
- MDRV_SOUND_ADD(OKIM6295, 2000000)
+ MDRV_SOUND_ADD(OKIM6295, SOUND_CLOCK)
MDRV_SOUND_CONFIG(okim6295_interface_region_3_pin7high)
MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
MACHINE_DRIVER_END
@@ -654,7 +670,7 @@ ROM_START( eggvntdx )
ROM_END
-ROM_START( cclown )
+ROM_START( cclownz )
ROM_REGION16_LE( 0x100000, REGION_USER1, 0 ) /* 34010 code */
ROM_LOAD16_BYTE( "cc-v1-vc8.bin", 0x000000, 0x080000, CRC(433fe6ac) SHA1(dea7aede9882ee52be88927418b7395418757d12) )
ROM_LOAD16_BYTE( "cc-v1-vc9.bin", 0x000001, 0x080000, CRC(9d1b3dae) SHA1(44a97c38bc9685e97721722c67505832fa06b44d) )
@@ -685,6 +701,7 @@ ROM_START( cclown )
/* 25 / 26 are secure? */
ROM_END
+
ROM_START( ripribit )
ROM_REGION16_LE( 0x100000, REGION_USER1, 0 ) /* 34010 code */
ROM_LOAD16_BYTE( "rr_v2-84-vc8.bin", 0x000000, 0x080000, CRC(5ecc432d) SHA1(073062528fbcf63be7e3c6695d60d048430f6e4b) )
@@ -716,6 +733,7 @@ ROM_START( ripribit )
/* 25 / 26 are secure? */
ROM_END
+
ROM_START( cfarm )
ROM_REGION16_LE( 0x100000, REGION_USER1, 0 ) /* 34010 code */
ROM_LOAD16_BYTE( "cf-v2-vc8.bin", 0x000000, 0x080000, CRC(93bcf145) SHA1(134ac3ee4fd837f56fb0b338289cf03108346539) )
@@ -751,14 +769,42 @@ ROM_END
/*************************************
*
+ * Driver-specific initialization
+ *
+ *************************************/
+
+static DRIVER_INIT( ripribit )
+{
+ ticket_dispenser_init(200, TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH);
+ memory_install_write16_handler(0, ADDRESS_SPACE_PROGRAM, 0x04100010, 0x0410001f, 0, 0, ripribit_control_w);
+}
+
+
+static DRIVER_INIT( cfarm )
+{
+ ticket_dispenser_init(200, TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH);
+ memory_install_write16_handler(0, ADDRESS_SPACE_PROGRAM, 0x04100010, 0x0410001f, 0, 0, cfarm_control_w);
+}
+
+
+static DRIVER_INIT( cclownz )
+{
+ ticket_dispenser_init(200, TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH);
+ memory_install_write16_handler(0, ADDRESS_SPACE_PROGRAM, 0x04100010, 0x0410001f, 0, 0, cclownz_control_w);
+}
+
+
+
+/*************************************
+ *
* Game drivers
*
*************************************/
-GAME( 1996, lethalj, 0, lethalj, lethalj, 0, ROT0, "The Game Room", "Lethal Justice", 0 )
-GAME( 1997, eggventr, 0, gameroom, eggventr, 0, ROT0, "The Game Room", "Egg Venture (Release 10)", 0 )
-GAME( 1997, eggvent7, eggventr, gameroom, eggventr, 0, ROT0, "The Game Room", "Egg Venture (Release 7)", 0 )
-GAME( 1997, eggvntdx, eggventr, gameroom, eggvntdx, 0, ROT0, "The Game Room", "Egg Venture Deluxe", 0 )
-GAME( 1997, ripribit, 0, gameroom, ripribit, 0, ROT0, "LAI Games", "Ripper Ribbit (Version 2.8.4)", GAME_NOT_WORKING )
-GAME( 1999, cfarm, 0, gameroom, laigames, 0, ROT90, "LAI Games", "Chicken Farm (Version 2.0)", GAME_NOT_WORKING )
-GAME( 1999, cclown, 0, gameroom, laigames, 0, ROT0, "LAI Games", "Crazzy Clownz (Version 1.0)", GAME_NOT_WORKING )
+GAME( 1996, lethalj, 0, lethalj, lethalj, 0, ROT0, "The Game Room", "Lethal Justice", 0 )
+GAME( 1997, eggventr, 0, gameroom, eggventr, 0, ROT0, "The Game Room", "Egg Venture (Release 10)", 0 )
+GAME( 1997, eggvent7, eggventr, gameroom, eggventr, 0, ROT0, "The Game Room", "Egg Venture (Release 7)", 0 )
+GAME( 1997, eggvntdx, eggventr, gameroom, eggvntdx, 0, ROT0, "The Game Room", "Egg Venture Deluxe", 0 )
+GAME( 1997, ripribit, 0, gameroom, ripribit, ripribit, ROT0, "LAI Games", "Ripper Ribbit (Version 2.8.4)", 0 )
+GAME( 1999, cfarm, 0, gameroom, cfarm, cfarm, ROT90, "LAI Games", "Chicken Farm (Version 2.0)", 0 )
+GAME( 1999, cclownz, 0, gameroom, cclownz, cclownz, ROT0, "LAI Games", "Crazzy Clownz (Version 1.0)", 0 )
diff --git a/src/mame/mamedriv.c b/src/mame/mamedriv.c
index b7e57372936..3ee4f66338e 100644
--- a/src/mame/mamedriv.c
+++ b/src/mame/mamedriv.c
@@ -7642,7 +7642,7 @@ Other Sun games
DRIVER( eggvntdx ) /* (c) 1997 The Game Room */
DRIVER( ripribit ) /* (c) 1997 LAI Games */
DRIVER( cfarm ) /* (c) 1999 LAI Games */
- DRIVER( cclown ) /* (c) 1999 LAI Games */
+ DRIVER( cclownz ) /* (c) 1999 LAI Games */
DRIVER( rotaryf )
DRIVER( sbugger ) /* (c) 1981 Game-A-Tron */
DRIVER( sbuggera ) /* (c) 1981 Game-A-Tron */
diff --git a/src/mame/video/lethalj.c b/src/mame/video/lethalj.c
index 8843cacb068..bd98eda84f8 100644
--- a/src/mame/video/lethalj.c
+++ b/src/mame/video/lethalj.c
@@ -17,6 +17,7 @@
static UINT16 blitter_data[8];
static UINT16 *screenram;
+static UINT8 vispage;
static UINT16 *blitter_base;
static int blitter_rows;
@@ -25,6 +26,7 @@ static UINT8 blank_palette;
+
/*************************************
*
* Compute X/Y coordinates
@@ -110,30 +112,24 @@ static void do_blit(void)
{
int dsty = (INT16)blitter_data[1];
int srcx = (UINT16)blitter_data[2];
- int srcy = (UINT16)blitter_data[3];
+ int srcy = (UINT16)(blitter_data[3] + 1);
int width = (UINT16)blitter_data[5];
int dstx = (INT16)blitter_data[6];
int height = (UINT16)blitter_data[7];
int y;
-
- if (srcy == 0xffff)
- {
- return;
- }
-
-/* logerror("blitter data = %04X %04X %04X %04X %04X %04X %04X %04X\n",
+/*
+ logerror("blitter data = %04X %04X %04X %04X %04X %04X %04X %04X\n",
blitter_data[0], blitter_data[1], blitter_data[2], blitter_data[3],
- blitter_data[4], blitter_data[5], blitter_data[6], blitter_data[7]);*/
-
+ blitter_data[4], blitter_data[5], blitter_data[6], blitter_data[7]);
+*/
/* loop over Y coordinates */
for (y = 0; y <= height; y++, srcy++, dsty++)
{
- UINT16 *source = blitter_base + srcy * BLITTER_SOURCE_WIDTH;
- UINT16 *dest = screenram + dsty * BLITTER_DEST_WIDTH;
-
/* clip in Y */
- if (dsty >= 0 && dsty < BLITTER_DEST_HEIGHT)
+ if (dsty >= 0 && dsty < BLITTER_DEST_HEIGHT/2)
{
+ UINT16 *source = blitter_base + (srcy % blitter_rows) * BLITTER_SOURCE_WIDTH;
+ UINT16 *dest = screenram + (dsty + (vispage ^ 1) * 256) * BLITTER_DEST_WIDTH;
int sx = srcx;
int dx = dstx;
int x;
@@ -151,7 +147,6 @@ static void do_blit(void)
}
-
WRITE16_HANDLER( lethalj_blitter_w )
{
/* combine the data */
@@ -160,8 +155,12 @@ WRITE16_HANDLER( lethalj_blitter_w )
/* blit on a write to offset 7, and signal an IRQ */
if (offset == 7)
{
- do_blit();
- timer_set(ATTOTIME_IN_USEC(10), NULL, 0, gen_ext1_int);
+ if (blitter_data[6] == 2 && blitter_data[7] == 2)
+ vispage ^= 1;
+ else
+ do_blit();
+
+ timer_set(attotime_mul(ATTOTIME_IN_HZ(XTAL_32MHz), (blitter_data[5] + 1) * (blitter_data[7] + 1)), NULL, 0, gen_ext1_int);
}
/* clear the IRQ on offset 0 */
@@ -179,7 +178,7 @@ WRITE16_HANDLER( lethalj_blitter_w )
void lethalj_scanline_update(running_machine *machine, int screen, mame_bitmap *bitmap, int scanline, const tms34010_display_params *params)
{
- UINT16 *src = &screenram[(params->rowaddr << 9) & 0x3fe00];
+ UINT16 *src = &screenram[(vispage << 17) | ((params->rowaddr << 9) & 0x3fe00)];
UINT16 *dest = BITMAP_ADDR16(bitmap, scanline, 0);
int coladdr = params->coladdr << 1;
int x;