mirror of
https://github.com/holub/mame
synced 2025-04-21 07:52:35 +03:00
Fixed Dip Switches (especially coinage) and inputs for 'mpatrol' and 'troangl' (and their clones).
Tried to "unified" the drivers (I still think that some things can be merged). Added src/includes/iremipt.h source file (same purpose as src/includes/taitoipt.h). Fixed Dip Switches and inputs for 'alpha1v'. The game is now more playable to me but I left the GAME_NOT_WORKING flag as I think there are still some things to look at).
This commit is contained in:
parent
2eb626efdd
commit
015e47c058
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -2185,6 +2185,7 @@ src/mame/includes/harddriv.h svneol=native#text/plain
|
||||
src/mame/includes/hitme.h svneol=native#text/plain
|
||||
src/mame/includes/homedata.h svneol=native#text/plain
|
||||
src/mame/includes/iqblock.h svneol=native#text/plain
|
||||
src/mame/includes/iremipt.h svneol=native#text/plain
|
||||
src/mame/includes/irobot.h svneol=native#text/plain
|
||||
src/mame/includes/itech32.h svneol=native#text/plain
|
||||
src/mame/includes/itech8.h svneol=native#text/plain
|
||||
|
@ -36,12 +36,14 @@
|
||||
a0 background #2 y position
|
||||
c0 background control
|
||||
|
||||
NOTE: It may be possible to remove the fake port now that conditional DIPS
|
||||
are supported. What should really be filled in for each mode?
|
||||
*****************************************************************************
|
||||
|
||||
Locations based on m58.c driver
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "driver.h"
|
||||
#include "iremipt.h"
|
||||
#include "m52.h"
|
||||
#include "audio/irem.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
@ -50,22 +52,6 @@
|
||||
#define MASTER_CLOCK XTAL_18_432MHz
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Custom input ports
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static CUSTOM_INPUT( coin_mode )
|
||||
{
|
||||
/* Based on the coin mode fill in the upper bits */
|
||||
UINT8 port5 = readinputport(5);
|
||||
return (readinputport(4) & 0x04) ? (port5 & 0x0f) : (port5 >> 4);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Memory maps
|
||||
@ -83,8 +69,8 @@ static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0xd000, 0xd000) AM_MIRROR(0x07f8) AM_READ_PORT("IN0")
|
||||
AM_RANGE(0xd001, 0xd001) AM_MIRROR(0x07f8) AM_READ_PORT("IN1")
|
||||
AM_RANGE(0xd002, 0xd002) AM_MIRROR(0x07f8) AM_READ_PORT("IN2")
|
||||
AM_RANGE(0xd003, 0xd003) AM_MIRROR(0x07f8) AM_READ_PORT("DSW0")
|
||||
AM_RANGE(0xd004, 0xd004) AM_MIRROR(0x07f8) AM_READ_PORT("DSW1")
|
||||
AM_RANGE(0xd003, 0xd003) AM_MIRROR(0x07f8) AM_READ_PORT("DSW1")
|
||||
AM_RANGE(0xd004, 0xd004) AM_MIRROR(0x07f8) AM_READ_PORT("DSW2")
|
||||
AM_RANGE(0xe000, 0xe7ff) AM_RAM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -95,10 +81,10 @@ static ADDRESS_MAP_START( alpha1v_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x8400, 0x87ff) AM_READWRITE(MRA8_RAM, m52_colorram_w) AM_BASE(&colorram)
|
||||
AM_RANGE(0xc800, 0xc9ff) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size) AM_SHARE(1) // bigger or mirrored?
|
||||
AM_RANGE(0xd000, 0xd000) AM_READ_PORT("IN0") AM_WRITE(irem_sound_cmd_w)
|
||||
AM_RANGE(0xd001, 0xd001) AM_READ_PORT("IN1") AM_WRITE(m52_flipscreen_w) /* + coin counters */
|
||||
AM_RANGE(0xd001, 0xd001) AM_READ_PORT("IN1") AM_WRITE(alpha1v_flipscreen_w)
|
||||
AM_RANGE(0xd002, 0xd002) AM_READ_PORT("IN2")
|
||||
AM_RANGE(0xd003, 0xd003) AM_READ_PORT("DSW0")
|
||||
AM_RANGE(0xd004, 0xd004) AM_READ_PORT("DSW1")
|
||||
AM_RANGE(0xd003, 0xd003) AM_READ_PORT("DSW1")
|
||||
AM_RANGE(0xd004, 0xd004) AM_READ_PORT("DSW2")
|
||||
AM_RANGE(0xe000, 0xefff) AM_RAM // bigger or mirrored?
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -117,111 +103,113 @@ ADDRESS_MAP_END
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Port definitions
|
||||
* Generic port definitions
|
||||
*
|
||||
*************************************/
|
||||
|
||||
/* Same as m57, m58 and m62 (IREM Z80 hardware) */
|
||||
static INPUT_PORTS_START( m52 )
|
||||
PORT_START_TAG("IN0")
|
||||
/* Start 1 & 2 also restarts and freezes the game with stop mode on
|
||||
and are used in test mode to enter and esc the various tests */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
|
||||
/* coin input must be active for 19 frames to be consistently recognized */
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_IMPULSE(19)
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START_TAG("IN1")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 )
|
||||
|
||||
PORT_START_TAG("IN2")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
|
||||
|
||||
/* DSW1 is so different from game to game that it isn't included here */
|
||||
|
||||
PORT_START_TAG("DSW2")
|
||||
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW2:1")
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x02, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW2:2")
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( Cocktail ) )
|
||||
PORT_DIPNAME( 0x04, 0x04, "Coin Mode" ) PORT_DIPLOCATION("SW2:3")
|
||||
PORT_DIPSETTING( 0x04, "Mode 1" )
|
||||
PORT_DIPSETTING( 0x00, "Mode 2" )
|
||||
PORT_DIPUNKNOWN_DIPLOC( 0x08, IP_ACTIVE_LOW, "SW2:4" )
|
||||
PORT_DIPUNKNOWN_DIPLOC( 0x10, IP_ACTIVE_LOW, "SW2:5" )
|
||||
PORT_DIPUNKNOWN_DIPLOC( 0x20, IP_ACTIVE_LOW, "SW2:6" )
|
||||
PORT_DIPNAME( 0x40, 0x40, "Invulnerability (Cheat)") PORT_DIPLOCATION("SW2:7")
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_SERVICE_DIPLOC( 0x80, IP_ACTIVE_LOW, "SW2:8" )
|
||||
INPUT_PORTS_END
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Games port definitions
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static INPUT_PORTS_START( mpatrol )
|
||||
PORT_START_TAG("IN0")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
|
||||
/* coin input must be active for ? frames to be consistently recognized */
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_IMPULSE(17)
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_INCLUDE(m52)
|
||||
|
||||
PORT_START_TAG("IN1")
|
||||
PORT_MODIFY("IN1")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY
|
||||
PORT_BIT( 0x1c, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) /* IPT_JOYSTICK_DOWN */
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) /* IPT_JOYSTICK_UP */
|
||||
|
||||
PORT_START_TAG("IN2")
|
||||
PORT_MODIFY("IN2")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x0c, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) /* IPT_JOYSTICK_DOWN PORT_COCKTAIL */
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) /* IPT_JOYSTICK_UP PORT_COCKTAIL */
|
||||
|
||||
PORT_START_TAG("DSW0")
|
||||
PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) )
|
||||
PORT_MODIFY("DSW2")
|
||||
PORT_DIPUNUSED_DIPLOC( 0x08, IP_ACTIVE_LOW, "SW2:4" ) /* should have been "slow motion" but no conditional jump at 0x00c3 */
|
||||
/* In stop mode, press 2 to stop and 1 to restart */
|
||||
PORT_DIPNAME( 0x10, 0x10, "Stop Mode (Cheat)") PORT_DIPLOCATION("SW2:5")
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x20, 0x20, "Sector Selection (Cheat)") PORT_DIPLOCATION("SW2:6")
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
|
||||
PORT_START_TAG("DSW1")
|
||||
PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:1,2")
|
||||
PORT_DIPSETTING( 0x00, "1" )
|
||||
PORT_DIPSETTING( 0x01, "2" )
|
||||
PORT_DIPSETTING( 0x02, "3" )
|
||||
PORT_DIPSETTING( 0x03, "5" )
|
||||
PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) )
|
||||
PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW1:3,4")
|
||||
PORT_DIPSETTING( 0x0c, "10000 30000 50000" )
|
||||
PORT_DIPSETTING( 0x08, "20000 40000 60000" )
|
||||
PORT_DIPSETTING( 0x04, "10000" )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( None ) )
|
||||
PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(coin_mode, NULL)
|
||||
/* Gets filled in based on the coin mode */
|
||||
|
||||
PORT_START_TAG("DSW1")
|
||||
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) )
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x02, 0x00, DEF_STR( Cabinet ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( Cocktail ) )
|
||||
PORT_DIPNAME( 0x04, 0x04, "Coin Mode" )
|
||||
PORT_DIPSETTING( 0x04, "Mode 1" )
|
||||
PORT_DIPSETTING( 0x00, "Mode 2" )
|
||||
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
/* In stop mode, press 2 to stop and 1 to restart */
|
||||
PORT_DIPNAME( 0x10, 0x10, "Stop Mode (Cheat)")
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x20, 0x20, "Sector Selection (Cheat)")
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x40, 0x40, "Invulnerability (Cheat)")
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
|
||||
|
||||
/* Fake port to support the two different coin modes */
|
||||
PORT_START_TAG("FAKE")
|
||||
PORT_DIPNAME( 0x0f, 0x0f, "Coinage Mode 1" ) /* mapped on coin mode 1 */
|
||||
PORT_DIPSETTING( 0x09, DEF_STR( 7C_1C ) )
|
||||
PORT_DIPSETTING( 0x0a, DEF_STR( 6C_1C ) )
|
||||
PORT_DIPSETTING( 0x0b, DEF_STR( 5C_1C ) )
|
||||
PORT_DIPSETTING( 0x0c, DEF_STR( 4C_1C ) )
|
||||
PORT_DIPSETTING( 0x0d, DEF_STR( 3C_1C ) )
|
||||
PORT_DIPSETTING( 0x0e, DEF_STR( 2C_1C ) )
|
||||
PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) )
|
||||
PORT_DIPSETTING( 0x07, DEF_STR( 1C_2C ) )
|
||||
PORT_DIPSETTING( 0x06, DEF_STR( 1C_3C ) )
|
||||
PORT_DIPSETTING( 0x05, DEF_STR( 1C_4C ) )
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( 1C_5C ) )
|
||||
PORT_DIPSETTING( 0x03, DEF_STR( 1C_6C ) )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( 1C_7C ) )
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( 1C_8C ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) )
|
||||
PORT_DIPNAME( 0x30, 0x30, "Coin A Mode 2" ) /* mapped on coin mode 2 */
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( 3C_1C ) )
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) )
|
||||
PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) )
|
||||
PORT_DIPNAME( 0xc0, 0xc0, "Coin B Mode 2" )
|
||||
PORT_DIPSETTING( 0xc0, DEF_STR( 1C_2C ) )
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( 1C_3C ) )
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( 1C_5C ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) )
|
||||
IREM_Z80_COINAGE_TYPE_1_LOC(SW1)
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
static INPUT_PORTS_START( mpatrolw )
|
||||
PORT_INCLUDE(mpatrol)
|
||||
|
||||
PORT_MODIFY("DSW0")
|
||||
PORT_DIPNAME( 0x03, 0x01, DEF_STR( Lives ) )
|
||||
PORT_MODIFY("DSW1")
|
||||
PORT_DIPNAME( 0x03, 0x01, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:1,2")
|
||||
PORT_DIPSETTING( 0x00, "2" )
|
||||
PORT_DIPSETTING( 0x01, "3" )
|
||||
PORT_DIPSETTING( 0x02, "4" )
|
||||
@ -230,27 +218,85 @@ INPUT_PORTS_END
|
||||
|
||||
|
||||
static INPUT_PORTS_START( alpha1v )
|
||||
PORT_INCLUDE(mpatrol)
|
||||
PORT_START_TAG("IN0")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_MODIFY("IN1")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_START_TAG("IN1")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 )
|
||||
|
||||
PORT_MODIFY("IN2")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_COCKTAIL
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_COCKTAIL
|
||||
PORT_START_TAG("IN2")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
|
||||
|
||||
PORT_MODIFY("DSW0")
|
||||
PORT_DIPNAME( 0x03, 0x01, DEF_STR( Lives ) )
|
||||
PORT_DIPSETTING( 0x00, "2" )
|
||||
PORT_DIPSETTING( 0x01, "3" )
|
||||
PORT_DIPSETTING( 0x02, "4" )
|
||||
PORT_DIPSETTING( 0x03, "5" )
|
||||
PORT_START_TAG("DSW1")
|
||||
PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) )
|
||||
PORT_DIPSETTING( 0x03, "2" )
|
||||
PORT_DIPSETTING( 0x02, "3" )
|
||||
PORT_DIPSETTING( 0x01, "4" )
|
||||
PORT_DIPSETTING( 0x00, "5" )
|
||||
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Cabinet ) )
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( Upright ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
|
||||
PORT_DIPUNUSED( 0x08, IP_ACTIVE_LOW )
|
||||
PORT_DIPNAME( 0x10, 0x00, DEF_STR( Allow_Continue ) )
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( No ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
|
||||
PORT_DIPUNUSED( 0x20, IP_ACTIVE_LOW )
|
||||
PORT_DIPUNUSED( 0x40, IP_ACTIVE_LOW )
|
||||
PORT_DIPUNUSED( 0x80, IP_ACTIVE_LOW )
|
||||
|
||||
PORT_START_TAG("DSW2")
|
||||
PORT_DIPNAME( 0x0f, 0x00, DEF_STR( Coin_A ) ) /* table at 0x5ef4 - 16 bytes (coins) + 16 bytes (credits) */
|
||||
PORT_DIPSETTING( 0x0b, DEF_STR( 4C_1C ) )
|
||||
PORT_DIPSETTING( 0x0c, DEF_STR( 3C_1C ) )
|
||||
// PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) )
|
||||
// PORT_DIPSETTING( 0x09, DEF_STR( 2C_1C ) )
|
||||
// PORT_DIPSETTING( 0x0a, DEF_STR( 2C_1C ) )
|
||||
PORT_DIPSETTING( 0x0d, DEF_STR( 2C_1C ) )
|
||||
// PORT_DIPSETTING( 0x0e, DEF_STR( 1C_1C ) )
|
||||
// PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) )
|
||||
// PORT_DIPSETTING( 0x07, DEF_STR( 1C_1C ) )
|
||||
// PORT_DIPSETTING( 0x06, DEF_STR( 1C_1C ) )
|
||||
// PORT_DIPSETTING( 0x05, DEF_STR( 1C_1C ) )
|
||||
// PORT_DIPSETTING( 0x04, DEF_STR( 1C_1C ) )
|
||||
// PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) )
|
||||
// PORT_DIPSETTING( 0x02, DEF_STR( 1C_1C ) )
|
||||
// PORT_DIPSETTING( 0x01, DEF_STR( 1C_1C ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
|
||||
PORT_DIPNAME( 0xf0, 0x00, DEF_STR( Coin_B ) ) /* table at 0x5f14 - 16 bytes (coins) + 16 bytes (credits) */
|
||||
// PORT_DIPSETTING( 0xf0, "1 Coin/0 Credit" )
|
||||
// PORT_DIPSETTING( 0x70, DEF_STR( 1C_1C ) )
|
||||
// PORT_DIPSETTING( 0x60, DEF_STR( 1C_1C ) )
|
||||
// PORT_DIPSETTING( 0x50, DEF_STR( 1C_1C ) )
|
||||
// PORT_DIPSETTING( 0x40, DEF_STR( 1C_1C ) )
|
||||
// PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) )
|
||||
// PORT_DIPSETTING( 0x20, DEF_STR( 1C_1C ) )
|
||||
// PORT_DIPSETTING( 0x10, DEF_STR( 1C_1C ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
|
||||
// PORT_DIPSETTING( 0xe0, DEF_STR( 1C_1C ) )
|
||||
PORT_DIPSETTING( 0xd0, DEF_STR( 1C_2C ) )
|
||||
PORT_DIPSETTING( 0xc0, DEF_STR( 1C_3C ) )
|
||||
PORT_DIPSETTING( 0xb0, DEF_STR( 1C_4C ) )
|
||||
PORT_DIPSETTING( 0xa0, DEF_STR( 1C_5C ) )
|
||||
PORT_DIPSETTING( 0x90, DEF_STR( 1C_6C ) )
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( 1C_7C ) )
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
@ -497,6 +543,6 @@ ROM_END
|
||||
*
|
||||
*************************************/
|
||||
|
||||
GAME( 1982, mpatrol, 0, m52, mpatrol, 0, ROT0, "Irem", "Moon Patrol", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1982, mpatrolw, mpatrol, m52, mpatrolw, 0, ROT0, "Irem (Williams license)", "Moon Patrol (Williams)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1988, alpha1v, 0, alpha1v, alpha1v, 0, ROT0, "Vision Electronics", "Alpha One (Vision Electronics / Kyle Hodgetts)", GAME_NOT_WORKING|GAME_NO_SOUND )
|
||||
GAME( 1982, mpatrol, 0, m52, mpatrol, 0, ROT0, "Irem", "Moon Patrol", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1982, mpatrolw, mpatrol, m52, mpatrolw, 0, ROT0, "Irem (Williams license)", "Moon Patrol (Williams)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1988, alpha1v, 0, alpha1v, alpha1v, 0, ROT0, "Vision Electronics", "Alpha One (Vision Electronics / Kyle Hodgetts)", GAME_NOT_WORKING|GAME_NO_SOUND )
|
||||
|
@ -41,9 +41,14 @@
|
||||
The "new" roms have hand written labels, while those that match the current
|
||||
Tropical Angel set look to be factory labeled chips.
|
||||
|
||||
*****************************************************************************
|
||||
|
||||
Locations based on m58.c driver
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
#include "driver.h"
|
||||
#include "iremipt.h"
|
||||
#include "m57.h"
|
||||
#include "audio/irem.h"
|
||||
|
||||
@ -77,94 +82,109 @@ ADDRESS_MAP_END
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Port definitions
|
||||
* Generic port definitions
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static INPUT_PORTS_START( troangel )
|
||||
/* Same as m52, m58 and m62 (IREM Z80 hardware) */
|
||||
static INPUT_PORTS_START( m57 )
|
||||
PORT_START_TAG("IN0")
|
||||
/* Start 1 & 2 also restarts and freezes the game with stop mode on
|
||||
and are used in test mode to enter and esc the various tests */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
|
||||
/* coin input must be active for 19 frames to be consistently recognized */
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_IMPULSE(19)
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_IMPULSE(19)
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START_TAG("IN1")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 )
|
||||
|
||||
PORT_START_TAG("IN2")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
|
||||
|
||||
PORT_START_TAG("DSW1")
|
||||
PORT_DIPNAME( 0x03, 0x03, "Time" )
|
||||
PORT_DIPSETTING( 0x03, "180 160 140" )
|
||||
PORT_DIPSETTING( 0x02, "160 140 120" )
|
||||
PORT_DIPSETTING( 0x01, "140 120 100" )
|
||||
PORT_DIPSETTING( 0x00, "120 100 100" )
|
||||
PORT_DIPNAME( 0x04, 0x04, "Crash Loss Time" )
|
||||
PORT_DIPSETTING( 0x04, "5" )
|
||||
PORT_DIPSETTING( 0x00, "10" )
|
||||
PORT_DIPNAME( 0x08, 0x08, "Background Sound" )
|
||||
PORT_DIPSETTING( 0x08, "Boat Motor" )
|
||||
PORT_DIPSETTING( 0x00, "Music" )
|
||||
/* TODO: support the different settings which happen in Coin Mode 2 */
|
||||
PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coinage ) ) /* mapped on coin mode 1 */
|
||||
PORT_DIPSETTING( 0xa0, DEF_STR( 6C_1C ) )
|
||||
PORT_DIPSETTING( 0xb0, DEF_STR( 5C_1C ) )
|
||||
PORT_DIPSETTING( 0xc0, DEF_STR( 4C_1C ) )
|
||||
PORT_DIPSETTING( 0xd0, DEF_STR( 3C_1C ) )
|
||||
PORT_DIPSETTING( 0xe0, DEF_STR( 2C_1C ) )
|
||||
PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) )
|
||||
PORT_DIPSETTING( 0x70, DEF_STR( 1C_2C ) )
|
||||
PORT_DIPSETTING( 0x60, DEF_STR( 1C_3C ) )
|
||||
PORT_DIPSETTING( 0x50, DEF_STR( 1C_4C ) )
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( 1C_5C ) )
|
||||
PORT_DIPSETTING( 0x30, DEF_STR( 1C_6C ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) )
|
||||
/* settings 0x10, 0x20, 0x80, 0x90 all give 1 Coin/1 Credit */
|
||||
/* DSW1 is so different from game to game that it isn't included here */
|
||||
|
||||
PORT_START_TAG("DSW2")
|
||||
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) )
|
||||
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW2:1")
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x02, 0x00, DEF_STR( Cabinet ) )
|
||||
PORT_DIPNAME( 0x02, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW2:2")
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( Cocktail ) )
|
||||
/* This activates a different coin mode. Look at the dip switch setting schematic */
|
||||
PORT_DIPNAME( 0x04, 0x04, "Coin Mode" )
|
||||
PORT_DIPNAME( 0x04, 0x04, "Coin Mode" ) PORT_DIPLOCATION("SW2:3")
|
||||
PORT_DIPSETTING( 0x04, "Mode 1" )
|
||||
PORT_DIPSETTING( 0x00, "Mode 2" )
|
||||
/* TODO: the following enables an analog accelerator input read from 0xd003 */
|
||||
/* however that is the DSW1 input so it must be multiplexed some way */
|
||||
PORT_DIPNAME( 0x08, 0x08, "Analog Accelarator" )
|
||||
PORT_DIPUNKNOWN_DIPLOC( 0x08, IP_ACTIVE_LOW, "SW2:4" )
|
||||
PORT_DIPUNKNOWN_DIPLOC( 0x10, IP_ACTIVE_LOW, "SW2:5" )
|
||||
PORT_DIPUNKNOWN_DIPLOC( 0x20, IP_ACTIVE_LOW, "SW2:6" )
|
||||
PORT_DIPNAME( 0x40, 0x40, "Invulnerability (Cheat)") PORT_DIPLOCATION("SW2:7")
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_SERVICE_DIPLOC( 0x80, IP_ACTIVE_LOW, "SW2:8" )
|
||||
INPUT_PORTS_END
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Games port definitions
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static INPUT_PORTS_START( troangel )
|
||||
PORT_INCLUDE(m57)
|
||||
|
||||
PORT_MODIFY("IN1")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) /* IPT_JOYSTICK_DOWN */
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) /* IPT_JOYSTICK_UP */
|
||||
|
||||
PORT_MODIFY("IN2")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) /* IPT_JOYSTICK_DOWN PORT_COCKTAIL */
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) /* IPT_JOYSTICK_UP PORT_COCKTAIL */
|
||||
|
||||
PORT_MODIFY("DSW2")
|
||||
/* TODO: the following enables an analog accelerator input read from 0xd003 */
|
||||
/* however that is the DSW1 input so it must be multiplexed some way */
|
||||
PORT_DIPNAME( 0x08, 0x08, "Analog Accelarator" ) PORT_DIPLOCATION("SW2:4")
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( No ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
|
||||
/* In stop mode, press 2 to stop and 1 to restart */
|
||||
PORT_DIPNAME( 0x10, 0x10, "Stop Mode (Cheat)")
|
||||
PORT_DIPNAME( 0x10, 0x10, "Stop Mode (Cheat)") PORT_DIPLOCATION("SW2:5")
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x40, 0x40, "Invulnerability (Cheat)")
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
|
||||
PORT_DIPUNUSED_DIPLOC( 0x20, IP_ACTIVE_LOW, "SW2:6" )
|
||||
|
||||
PORT_START_TAG("DSW1")
|
||||
PORT_DIPNAME( 0x03, 0x03, "Time" ) PORT_DIPLOCATION("SW1:1,2") /* table at 0x6110 - 4 * 8 bytes (B1 B2 bonus A1 A2 bonus M1 M2) */
|
||||
PORT_DIPSETTING( 0x03, "B:180/A:160/M:140/BG:120" )
|
||||
PORT_DIPSETTING( 0x02, "B:160/A:140/M:120/BG:100" )
|
||||
PORT_DIPSETTING( 0x01, "B:140/A:120/M:100/BG:80" )
|
||||
PORT_DIPSETTING( 0x00, "B:120/A:100/M:100/BG:80" )
|
||||
PORT_DIPNAME( 0x04, 0x04, "Crash Loss Time" ) PORT_DIPLOCATION("SW1:3")
|
||||
PORT_DIPSETTING( 0x04, "5" )
|
||||
PORT_DIPSETTING( 0x00, "10" )
|
||||
PORT_DIPNAME( 0x08, 0x08, "Background Sound" ) PORT_DIPLOCATION("SW1:4")
|
||||
PORT_DIPSETTING( 0x08, "Boat Motor" )
|
||||
PORT_DIPSETTING( 0x00, "Music" )
|
||||
IREM_Z80_COINAGE_TYPE_2_LOC(SW1)
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
@ -303,5 +323,5 @@ ROM_END
|
||||
*
|
||||
*************************************/
|
||||
|
||||
GAME( 1983, troangel, 0, m57, troangel, 0, ROT0, "Irem", "Tropical Angel", 0 )
|
||||
GAME( 1983, newtangl, troangel, m57, troangel, 0, ROT0, "Irem", "New Tropical Angel", 0 )
|
||||
GAME( 1983, troangel, 0, m57, troangel, 0, ROT0, "Irem", "Tropical Angel", 0 )
|
||||
GAME( 1983, newtangl, troangel, m57, troangel, 0, ROT0, "Irem", "New Tropical Angel", 0 )
|
||||
|
136
src/mame/includes/iremipt.h
Normal file
136
src/mame/includes/iremipt.h
Normal file
@ -0,0 +1,136 @@
|
||||
/*******************************************************************************
|
||||
|
||||
Input port macros used by many games in mutiple IREM drivers
|
||||
|
||||
*******************************************************************************/
|
||||
|
||||
|
||||
/**************************** Coinage Dip Swicthes ****************************/
|
||||
|
||||
/* with location */
|
||||
#define IREM_Z80_COINAGE_TYPE_1_LOC(DIPBANK) \
|
||||
/* Coin Mode 1 */ \
|
||||
PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coinage ) ) PORT_CONDITION("DSW2", 0x04, PORTCOND_NOTEQUALS, 0x00) PORT_DIPLOCATION(#DIPBANK":5,6,7,8") \
|
||||
/* PORT_DIPSETTING( 0x80, DEF_STR( 1C_1C ) ) */ \
|
||||
PORT_DIPSETTING( 0x90, DEF_STR( 7C_1C ) ) \
|
||||
PORT_DIPSETTING( 0xa0, DEF_STR( 6C_1C ) ) \
|
||||
PORT_DIPSETTING( 0xb0, DEF_STR( 5C_1C ) ) \
|
||||
PORT_DIPSETTING( 0xc0, DEF_STR( 4C_1C ) ) \
|
||||
PORT_DIPSETTING( 0xd0, DEF_STR( 3C_1C ) ) \
|
||||
PORT_DIPSETTING( 0xe0, DEF_STR( 2C_1C ) ) \
|
||||
PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) \
|
||||
PORT_DIPSETTING( 0x70, DEF_STR( 1C_2C ) ) \
|
||||
PORT_DIPSETTING( 0x60, DEF_STR( 1C_3C ) ) \
|
||||
PORT_DIPSETTING( 0x50, DEF_STR( 1C_4C ) ) \
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( 1C_5C ) ) \
|
||||
PORT_DIPSETTING( 0x30, DEF_STR( 1C_6C ) ) \
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( 1C_7C ) ) \
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( 1C_8C ) ) \
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) \
|
||||
/* Coin Mode 2 */ \
|
||||
PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) PORT_CONDITION("DSW2", 0x04, PORTCOND_EQUALS, 0x00) PORT_DIPLOCATION(#DIPBANK":5,6") \
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( 3C_1C ) ) \
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) \
|
||||
PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) \
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) \
|
||||
PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) PORT_CONDITION("DSW2", 0x04, PORTCOND_EQUALS, 0x00) PORT_DIPLOCATION(#DIPBANK":7,8") \
|
||||
PORT_DIPSETTING( 0xc0, DEF_STR( 1C_2C ) ) \
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( 1C_3C ) ) \
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( 1C_5C ) ) \
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) )
|
||||
|
||||
#define IREM_Z80_COINAGE_TYPE_2_LOC(DIPBANK) \
|
||||
/* Coin Mode 1 */ \
|
||||
PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coinage ) ) PORT_CONDITION("DSW2", 0x04, PORTCOND_NOTEQUALS, 0x00) PORT_DIPLOCATION(#DIPBANK":5,6,7,8") \
|
||||
/* PORT_DIPSETTING( 0x80, DEF_STR( Free_Play ) ) */ \
|
||||
/* PORT_DIPSETTING( 0x90, DEF_STR( Free_Play ) ) */ \
|
||||
PORT_DIPSETTING( 0xa0, DEF_STR( 6C_1C ) ) \
|
||||
PORT_DIPSETTING( 0xb0, DEF_STR( 5C_1C ) ) \
|
||||
PORT_DIPSETTING( 0xc0, DEF_STR( 4C_1C ) ) \
|
||||
PORT_DIPSETTING( 0xd0, DEF_STR( 3C_1C ) ) \
|
||||
PORT_DIPSETTING( 0xe0, DEF_STR( 2C_1C ) ) \
|
||||
PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) \
|
||||
PORT_DIPSETTING( 0x70, DEF_STR( 1C_2C ) ) \
|
||||
PORT_DIPSETTING( 0x60, DEF_STR( 1C_3C ) ) \
|
||||
PORT_DIPSETTING( 0x50, DEF_STR( 1C_4C ) ) \
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( 1C_5C ) ) \
|
||||
PORT_DIPSETTING( 0x30, DEF_STR( 1C_6C ) ) \
|
||||
/* PORT_DIPSETTING( 0x20, DEF_STR( Free_Play ) ) */ \
|
||||
/* PORT_DIPSETTING( 0x10, DEF_STR( Free_Play ) ) */ \
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) \
|
||||
/* Coin Mode 2 */ \
|
||||
PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) PORT_CONDITION("DSW2", 0x04, PORTCOND_EQUALS, 0x00) PORT_DIPLOCATION(#DIPBANK":5,6") \
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( 3C_1C ) ) \
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) \
|
||||
PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) \
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) \
|
||||
PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) PORT_CONDITION("DSW2", 0x04, PORTCOND_EQUALS, 0x00) PORT_DIPLOCATION(#DIPBANK":7,8") \
|
||||
PORT_DIPSETTING( 0xc0, DEF_STR( 1C_2C ) ) \
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( 1C_3C ) ) \
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( 1C_5C ) ) \
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) )
|
||||
|
||||
|
||||
/* without location */
|
||||
#define IREM_Z80_COINAGE_TYPE_1 \
|
||||
/* Coin Mode 1 */ \
|
||||
PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coinage ) ) PORT_CONDITION("DSW2", 0x04, PORTCOND_NOTEQUALS, 0x00) \
|
||||
/* PORT_DIPSETTING( 0x80, DEF_STR( 1C_1C ) ) */ \
|
||||
PORT_DIPSETTING( 0x90, DEF_STR( 7C_1C ) ) \
|
||||
PORT_DIPSETTING( 0xa0, DEF_STR( 6C_1C ) ) \
|
||||
PORT_DIPSETTING( 0xb0, DEF_STR( 5C_1C ) ) \
|
||||
PORT_DIPSETTING( 0xc0, DEF_STR( 4C_1C ) ) \
|
||||
PORT_DIPSETTING( 0xd0, DEF_STR( 3C_1C ) ) \
|
||||
PORT_DIPSETTING( 0xe0, DEF_STR( 2C_1C ) ) \
|
||||
PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) \
|
||||
PORT_DIPSETTING( 0x70, DEF_STR( 1C_2C ) ) \
|
||||
PORT_DIPSETTING( 0x60, DEF_STR( 1C_3C ) ) \
|
||||
PORT_DIPSETTING( 0x50, DEF_STR( 1C_4C ) ) \
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( 1C_5C ) ) \
|
||||
PORT_DIPSETTING( 0x30, DEF_STR( 1C_6C ) ) \
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( 1C_7C ) ) \
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( 1C_8C ) ) \
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) \
|
||||
/* Coin Mode 2 */ \
|
||||
PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) PORT_CONDITION("DSW2", 0x04, PORTCOND_EQUALS, 0x00) \
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( 3C_1C ) ) \
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) \
|
||||
PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) \
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) \
|
||||
PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) PORT_CONDITION("DSW2", 0x04, PORTCOND_EQUALS, 0x00) \
|
||||
PORT_DIPSETTING( 0xc0, DEF_STR( 1C_2C ) ) \
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( 1C_3C ) ) \
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( 1C_5C ) ) \
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) )
|
||||
|
||||
#define IREM_Z80_COINAGE_TYPE_2 \
|
||||
/* Coin Mode 1 */ \
|
||||
PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coinage ) ) PORT_CONDITION("DSW2", 0x04, PORTCOND_NOTEQUALS, 0x00) \
|
||||
/* PORT_DIPSETTING( 0x80, DEF_STR( Free_Play ) ) */ \
|
||||
/* PORT_DIPSETTING( 0x90, DEF_STR( Free_Play ) ) */ \
|
||||
PORT_DIPSETTING( 0xa0, DEF_STR( 6C_1C ) ) \
|
||||
PORT_DIPSETTING( 0xb0, DEF_STR( 5C_1C ) ) \
|
||||
PORT_DIPSETTING( 0xc0, DEF_STR( 4C_1C ) ) \
|
||||
PORT_DIPSETTING( 0xd0, DEF_STR( 3C_1C ) ) \
|
||||
PORT_DIPSETTING( 0xe0, DEF_STR( 2C_1C ) ) \
|
||||
PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) \
|
||||
PORT_DIPSETTING( 0x70, DEF_STR( 1C_2C ) ) \
|
||||
PORT_DIPSETTING( 0x60, DEF_STR( 1C_3C ) ) \
|
||||
PORT_DIPSETTING( 0x50, DEF_STR( 1C_4C ) ) \
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( 1C_5C ) ) \
|
||||
PORT_DIPSETTING( 0x30, DEF_STR( 1C_6C ) ) \
|
||||
/* PORT_DIPSETTING( 0x20, DEF_STR( Free_Play ) ) */ \
|
||||
/* PORT_DIPSETTING( 0x10, DEF_STR( Free_Play ) ) */ \
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) \
|
||||
/* Coin Mode 2 */ \
|
||||
PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) PORT_CONDITION("DSW2", 0x04, PORTCOND_EQUALS, 0x00) \
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( 3C_1C ) ) \
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) \
|
||||
PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) \
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) \
|
||||
PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) PORT_CONDITION("DSW2", 0x04, PORTCOND_EQUALS, 0x00) \
|
||||
PORT_DIPSETTING( 0xc0, DEF_STR( 1C_2C ) ) \
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( 1C_3C ) ) \
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( 1C_5C ) ) \
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) )
|
||||
|
@ -14,6 +14,7 @@ WRITE8_HANDLER( m52_bg2xpos_w );
|
||||
WRITE8_HANDLER( m52_bg2ypos_w );
|
||||
WRITE8_HANDLER( m52_bgcontrol_w );
|
||||
WRITE8_HANDLER( m52_flipscreen_w );
|
||||
WRITE8_HANDLER( alpha1v_flipscreen_w );
|
||||
WRITE8_HANDLER( m52_videoram_w );
|
||||
WRITE8_HANDLER( m52_colorram_w );
|
||||
|
||||
|
@ -270,14 +270,24 @@ WRITE8_HANDLER( m52_bgcontrol_w )
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Outputs
|
||||
*
|
||||
*************************************/
|
||||
|
||||
WRITE8_HANDLER( m52_flipscreen_w )
|
||||
{
|
||||
/* screen flip is handled both by software and hardware */
|
||||
flip_screen_set((data & 0x01) ^ (~readinputportbytag("DSW2") & 0x01));
|
||||
|
||||
coin_counter_w(0, data & 0x02);
|
||||
coin_counter_w(1, data & 0x20);
|
||||
}
|
||||
|
||||
/* screen flip is handled both by software and hardware */
|
||||
|
||||
flip_screen_set((data ^ ~readinputport(4)) & 1);
|
||||
WRITE8_HANDLER( alpha1v_flipscreen_w )
|
||||
{
|
||||
flip_screen_set(data & 0x01);
|
||||
}
|
||||
|
||||
|
||||
@ -332,7 +342,7 @@ static void draw_background(running_machine *machine, mame_bitmap *bitmap, const
|
||||
rect.max_y = ypos + 2 * BGHEIGHT - 1;
|
||||
}
|
||||
|
||||
fillbitmap(bitmap, machine->pens[machine->gfx[image]->color_base + 3], &rect);
|
||||
fillbitmap(bitmap, machine->remapped_colortable[machine->gfx[image]->color_base + 3], &rect);
|
||||
}
|
||||
|
||||
|
||||
|
@ -108,6 +108,12 @@ PALETTE_INIT( m57 )
|
||||
}
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Tilemap info callback
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static TILE_GET_INFO( get_tile_info )
|
||||
{
|
||||
UINT8 attr = videoram[tile_index*2 + 0];
|
||||
@ -117,6 +123,12 @@ static TILE_GET_INFO( get_tile_info )
|
||||
}
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Video RAM access
|
||||
*
|
||||
*************************************/
|
||||
|
||||
WRITE8_HANDLER( m57_videoram_w )
|
||||
{
|
||||
videoram[offset] = data;
|
||||
@ -124,6 +136,12 @@ WRITE8_HANDLER( m57_videoram_w )
|
||||
}
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Video startup
|
||||
*
|
||||
*************************************/
|
||||
|
||||
VIDEO_START( m57 )
|
||||
{
|
||||
bg_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, 8, 8, 32, 32);
|
||||
@ -131,12 +149,16 @@ VIDEO_START( m57 )
|
||||
}
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Outputs
|
||||
*
|
||||
*************************************/
|
||||
|
||||
WRITE8_HANDLER( m57_flipscreen_w )
|
||||
{
|
||||
/* screen flip is handled both by software and hardware */
|
||||
data ^= ~readinputport(4) & 1;
|
||||
|
||||
flipscreen = data & 1;
|
||||
flipscreen = (data & 0x01) ^ (~readinputportbytag("DSW2") & 0x01);
|
||||
tilemap_set_flip(bg_tilemap, flipscreen ? (TILEMAP_FLIPY | TILEMAP_FLIPX) : 0);
|
||||
|
||||
coin_counter_w(0,data & 0x02);
|
||||
@ -144,7 +166,11 @@ WRITE8_HANDLER( m57_flipscreen_w )
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Background rendering
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static void draw_background(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect)
|
||||
{
|
||||
@ -155,6 +181,12 @@ static void draw_background(running_machine *machine, mame_bitmap *bitmap, const
|
||||
tilemap_draw(bitmap, cliprect, bg_tilemap, 0, 0);
|
||||
}
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Sprite rendering
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect)
|
||||
{
|
||||
int offs;
|
||||
@ -192,6 +224,12 @@ static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const re
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Video update
|
||||
*
|
||||
*************************************/
|
||||
|
||||
VIDEO_UPDATE( m57 )
|
||||
{
|
||||
draw_background(machine, bitmap, cliprect);
|
||||
|
Loading…
Reference in New Issue
Block a user