summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author hap <happppp@users.noreply.github.com>2016-03-10 15:14:48 +0100
committer hap <happppp@users.noreply.github.com>2016-03-10 15:14:48 +0100
commitc3bad4a577181d145679ff672550edebfa4e4649 (patch)
tree2ba388da9380c64ef5f1ba792d3fa2e04552372e
parent1145ebcea4fdbf0aaf369eadfbf2c07dab74f9a2 (diff)
carjmbre: added sound, added inputs(from online doc, obviously dipswitch info is same as before)
-rw-r--r--src/mame/drivers/carjmbre.cpp55
1 files changed, 54 insertions, 1 deletions
diff --git a/src/mame/drivers/carjmbre.cpp b/src/mame/drivers/carjmbre.cpp
index 199e3003080..c3e30f5c1bc 100644
--- a/src/mame/drivers/carjmbre.cpp
+++ b/src/mame/drivers/carjmbre.cpp
@@ -101,6 +101,9 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, carjmbre_state )
AM_RANGE(0x8803, 0x8803) AM_WRITE(nmi_enable_w)
AM_RANGE(0x8000, 0x87ff) AM_RAM // 6116
AM_RANGE(0x9000, 0x97ff) AM_RAM // 2114*4
+ AM_RANGE(0xa000, 0xa000) AM_READ_PORT("IN1")
+ AM_RANGE(0xa800, 0xa800) AM_READ_PORT("IN2")
+ AM_RANGE(0xb800, 0xb800) AM_READ_PORT("DSW") AM_WRITE(soundlatch_byte_w)
ADDRESS_MAP_END
/***************************************************************************
@@ -116,7 +119,13 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( sound_io_map, AS_IO, 8, carjmbre_state )
ADDRESS_MAP_GLOBAL_MASK(0xff)
- AM_RANGE(0x00, 0xff) AM_NOP
+ AM_RANGE(0x00, 0x00) AM_READ(soundlatch_byte_r)
+ AM_RANGE(0x20, 0x21) AM_DEVWRITE("ay1", ay8910_device, address_data_w)
+ AM_RANGE(0x22, 0x22) AM_WRITENOP // bdir/bc2/bc1 inactive write
+ AM_RANGE(0x24, 0x24) AM_DEVREAD("ay1", ay8910_device, data_r)
+ AM_RANGE(0x30, 0x31) AM_DEVWRITE("ay2", ay8910_device, address_data_w)
+ AM_RANGE(0x32, 0x32) AM_WRITENOP // bdir/bc2/bc1 inactive write
+ AM_RANGE(0x34, 0x34) AM_DEVREAD("ay2", ay8910_device, data_r)
ADDRESS_MAP_END
/***************************************************************************
@@ -126,6 +135,49 @@ ADDRESS_MAP_END
***************************************************************************/
static INPUT_PORTS_START( carjmbre )
+ PORT_START("IN1")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SERVICE1 )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY
+
+ PORT_START("IN2")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START1 )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START2 )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL
+
+ PORT_START("DSW")
+ PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW:1,2")
+ PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
+ PORT_DIPSETTING( 0x01, DEF_STR( 1C_2C ) )
+ PORT_DIPSETTING( 0x03, DEF_STR( Free_Play ) )
+ PORT_DIPNAME( 0x04, 0x00, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW:3")
+ PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) )
+ PORT_DIPSETTING( 0x04, DEF_STR( 1C_6C ) )
+ PORT_DIPNAME( 0x18, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW:4,5")
+ PORT_DIPSETTING( 0x00, "3" )
+ PORT_DIPSETTING( 0x08, "4" )
+ PORT_DIPSETTING( 0x10, "5" )
+ PORT_DIPSETTING( 0x18, "Free")
+ PORT_DIPNAME( 0x20, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW:6")
+ PORT_DIPSETTING( 0x00, "10k then every 100k" )
+ PORT_DIPSETTING( 0x20, "20k then every 100k" )
+ PORT_DIPNAME( 0x40, 0x00, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW:7")
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x40, DEF_STR( On ) )
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW:8")
+ PORT_DIPSETTING( 0x80, DEF_STR( Upright ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
INPUT_PORTS_END
@@ -151,6 +203,7 @@ static MACHINE_CONFIG_START( carjmbre, carjmbre_state )
MCFG_SCREEN_REFRESH_RATE(60)
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
MCFG_SCREEN_SIZE(32*8, 32*8)
+ MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1)
MCFG_SCREEN_UPDATE_DRIVER(carjmbre_state, screen_update)
MCFG_SCREEN_PALETTE("palette")