Uses PORT_CHANGED for coins
This commit is contained in:
parent
d41cb7ebce
commit
9f03451a61
@ -76,44 +76,75 @@ READ8_HANDLER( sraider_sound_high_r );
|
||||
WRITE8_HANDLER( sraider_io_w );
|
||||
WRITE8_HANDLER( sraider_misc_w );
|
||||
|
||||
//extern UINT8 sraider_grid_status;
|
||||
//extern UINT8 sraider_0x30, sraider_0x38;
|
||||
|
||||
static ADDRESS_MAP_START( readmem, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x5fff) AM_READ(MRA8_ROM)
|
||||
AM_RANGE(0x6000, 0x6fff) AM_READ(MRA8_RAM)
|
||||
AM_RANGE(0x8000, 0x8fff) AM_READ(MRA8_NOP)
|
||||
AM_RANGE(0x9000, 0x9000) AM_READ(input_port_0_r) /* IN0 */
|
||||
AM_RANGE(0x9001, 0x9001) AM_READ(input_port_1_r) /* IN1 */
|
||||
AM_RANGE(0x9002, 0x9002) AM_READ(input_port_3_r) /* DSW0 */
|
||||
AM_RANGE(0x9003, 0x9003) AM_READ(input_port_4_r) /* DSW1 */
|
||||
AM_RANGE(0xd000, 0xd7ff) AM_READ(MRA8_RAM) /* video and color RAM */
|
||||
AM_RANGE(0xe000, 0xe000) AM_READ(input_port_2_r) /* IN2 */
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( writemem, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x5fff) AM_WRITE(MWA8_ROM)
|
||||
AM_RANGE(0x6000, 0x6fff) AM_WRITE(MWA8_RAM)
|
||||
static ADDRESS_MAP_START( ladybug_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x5fff) AM_ROM
|
||||
AM_RANGE(0x6000, 0x6fff) AM_RAM
|
||||
AM_RANGE(0x7000, 0x73ff) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size)
|
||||
AM_RANGE(0x8000, 0x8fff) AM_READ(MRA8_NOP)
|
||||
AM_RANGE(0x9000, 0x9000) AM_READ(input_port_0_r)
|
||||
AM_RANGE(0x9001, 0x9001) AM_READ(input_port_1_r)
|
||||
AM_RANGE(0x9002, 0x9002) AM_READ(input_port_3_r)
|
||||
AM_RANGE(0x9003, 0x9003) AM_READ(input_port_4_r)
|
||||
AM_RANGE(0xa000, 0xa000) AM_WRITE(ladybug_flipscreen_w)
|
||||
AM_RANGE(0xb000, 0xbfff) AM_WRITE(SN76496_0_w)
|
||||
AM_RANGE(0xc000, 0xcfff) AM_WRITE(SN76496_1_w)
|
||||
AM_RANGE(0xd000, 0xd3ff) AM_WRITE(ladybug_videoram_w) AM_BASE(&videoram)
|
||||
AM_RANGE(0xd400, 0xd7ff) AM_WRITE(ladybug_colorram_w) AM_BASE(&colorram)
|
||||
AM_RANGE(0xd000, 0xd3ff) AM_READWRITE(MRA8_RAM, ladybug_videoram_w) AM_BASE(&videoram)
|
||||
AM_RANGE(0xd400, 0xd7ff) AM_READWRITE(MRA8_RAM, ladybug_colorram_w) AM_BASE(&colorram)
|
||||
AM_RANGE(0xe000, 0xe000) AM_READ(input_port_2_r) /* IN2 */
|
||||
ADDRESS_MAP_END
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
Lady Bug doesn't have VBlank interrupts.
|
||||
Interrupts are still used by the game: but they are related to coin
|
||||
slots. Left slot generates a NMI, Right slot an IRQ.
|
||||
static ADDRESS_MAP_START( sraider_cpu1_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x5fff) AM_ROM
|
||||
AM_RANGE(0x6000, 0x6fff) AM_RAM
|
||||
AM_RANGE(0x7000, 0x73ff) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size)
|
||||
AM_RANGE(0x8005, 0x8005) AM_READ(sraider_8005_r) // protection check?
|
||||
AM_RANGE(0x8006, 0x8006) AM_WRITE(sraider_sound_low_w)
|
||||
AM_RANGE(0x8007, 0x8007) AM_WRITE(sraider_sound_high_w)
|
||||
AM_RANGE(0x9000, 0x9000) AM_READ(input_port_0_r)
|
||||
AM_RANGE(0x9001, 0x9001) AM_READ(input_port_1_r)
|
||||
AM_RANGE(0x9002, 0x9002) AM_READ(input_port_2_r)
|
||||
AM_RANGE(0x9003, 0x9003) AM_READ(input_port_3_r)
|
||||
AM_RANGE(0xd000, 0xd3ff) AM_WRITE(ladybug_videoram_w) AM_BASE(&videoram)
|
||||
AM_RANGE(0xd400, 0xd7ff) AM_WRITE(ladybug_colorram_w) AM_BASE(&colorram)
|
||||
AM_RANGE(0xe000, 0xe000) AM_WRITE(MWA8_NOP) //unknown 0x10 when in attract, 0x20 when coined/playing
|
||||
ADDRESS_MAP_END
|
||||
|
||||
***************************************************************************/
|
||||
static INTERRUPT_GEN( ladybug_interrupt )
|
||||
|
||||
static ADDRESS_MAP_START( sraider_cpu2_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x5fff) AM_ROM
|
||||
AM_RANGE(0x6000, 0x63ff) AM_RAM
|
||||
AM_RANGE(0x8000, 0x8000) AM_READ(sraider_sound_low_r)
|
||||
AM_RANGE(0xa000, 0xa000) AM_READ(sraider_sound_high_r)
|
||||
AM_RANGE(0xc000, 0xc000) AM_READ(MRA8_NOP) //some kind of sync
|
||||
AM_RANGE(0xe000, 0xe0ff) AM_WRITE(MWA8_RAM) AM_BASE(&sraider_grid_data)
|
||||
AM_RANGE(0xe800, 0xe800) AM_WRITE(sraider_io_w)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
static ADDRESS_MAP_START( sraider_cpu2_io_map, ADDRESS_SPACE_IO, 8 )
|
||||
ADDRESS_MAP_FLAGS( AMEF_ABITS(8) )
|
||||
AM_RANGE(0x00, 0x00) AM_WRITE(SN76496_0_w)
|
||||
AM_RANGE(0x08, 0x08) AM_WRITE(SN76496_1_w)
|
||||
AM_RANGE(0x10, 0x10) AM_WRITE(SN76496_2_w)
|
||||
AM_RANGE(0x18, 0x18) AM_WRITE(SN76496_3_w)
|
||||
AM_RANGE(0x20, 0x20) AM_WRITE(SN76496_4_w)
|
||||
AM_RANGE(0x28, 0x3f) AM_WRITE(sraider_misc_w) // lots unknown
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
|
||||
static INPUT_CHANGED( coin1_inserted )
|
||||
{
|
||||
if (readinputport(5) & 1) /* Left Coin */
|
||||
cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, PULSE_LINE);
|
||||
else if (readinputport(5) & 2) /* Right Coin */
|
||||
/* left coin insertion causes an NMI */
|
||||
cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
static INPUT_CHANGED( coin2_inserted )
|
||||
{
|
||||
/* right coin insertion causes an IRQ */
|
||||
if (newval)
|
||||
cpunum_set_input_line(machine, 0, 0, HOLD_LINE);
|
||||
}
|
||||
|
||||
@ -213,14 +244,9 @@ static INPUT_PORTS_START( ladybug )
|
||||
PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) )
|
||||
/* settings 0x00 thru 0x50 all give 1 Coin/1 Credit */
|
||||
|
||||
PORT_START_TAG("FAKE") /* FAKE */
|
||||
/* The coin slots are not memory mapped. Coin Left causes a NMI, */
|
||||
/* Coin Right an IRQ. This fake input port is used by the interrupt */
|
||||
/* handler to be notified of coin insertions. We use IMPULSE to */
|
||||
/* trigger exactly one interrupt, without having to check when the */
|
||||
/* user releases the key. */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1)
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_IMPULSE(1)
|
||||
PORT_START_TAG("COIN") /* FAKE */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(coin1_inserted, 0)
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED(coin2_inserted, 0)
|
||||
|
||||
PORT_START_TAG(LADYBUG_P1_CONTROL_PORT_TAG)
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY
|
||||
@ -320,14 +346,9 @@ static INPUT_PORTS_START( snapjack )
|
||||
PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) )
|
||||
/* settings 0x00 thru 0x04 all give 1 Coin/1 Credit */
|
||||
|
||||
PORT_START_TAG("FAKE")
|
||||
/* The coin slots are not memory mapped. Coin Left causes a NMI, */
|
||||
/* Coin Right an IRQ. This fake input port is used by the interrupt */
|
||||
/* handler to be notified of coin insertions. We use IMPULSE to */
|
||||
/* trigger exactly one interrupt, without having to check when the */
|
||||
/* user releases the key. */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1)
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_IMPULSE(1)
|
||||
PORT_START_TAG("COIN") /* FAKE */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(coin1_inserted, 0)
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED(coin2_inserted, 0)
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( cavenger )
|
||||
@ -409,14 +430,9 @@ static INPUT_PORTS_START( cavenger )
|
||||
PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) )
|
||||
/* settings 0x00 thru 0x50 all give 1 Coin/1 Credit */
|
||||
|
||||
PORT_START_TAG("FAKE")
|
||||
/* The coin slots are not memory mapped. Coin Left causes a NMI, */
|
||||
/* Coin Right an IRQ. This fake input port is used by the interrupt */
|
||||
/* handler to be notified of coin insertions. We use IMPULSE to */
|
||||
/* trigger exactly one interrupt, without having to check when the */
|
||||
/* user releases the key. */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1)
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_IMPULSE(1)
|
||||
PORT_START_TAG("COIN") /* FAKE */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(coin1_inserted, 0)
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED(coin2_inserted, 0)
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( dorodon )
|
||||
@ -500,14 +516,9 @@ static INPUT_PORTS_START( dorodon )
|
||||
PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) )
|
||||
/* settings 0x00 thru 0x50 all give 1 Coin/1 Credit */
|
||||
|
||||
PORT_START_TAG("FAKE")
|
||||
/* The coin slots are not memory mapped. Coin Left causes a NMI, */
|
||||
/* Coin Right an IRQ. This fake input port is used by the interrupt */
|
||||
/* handler to be notified of coin insertions. We use IMPULSE to */
|
||||
/* trigger exactly one interrupt, without having to check when the */
|
||||
/* user releases the key. */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1)
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_IMPULSE(1)
|
||||
PORT_START_TAG("COIN") /* FAKE */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(coin1_inserted, 0)
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED(coin2_inserted, 0)
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( sraider )
|
||||
@ -659,8 +670,7 @@ static MACHINE_DRIVER_START( ladybug )
|
||||
|
||||
/* basic machine hardware */
|
||||
MDRV_CPU_ADD(Z80, 4000000) /* 4 MHz */
|
||||
MDRV_CPU_PROGRAM_MAP(readmem,writemem)
|
||||
MDRV_CPU_VBLANK_INT("main", ladybug_interrupt)
|
||||
MDRV_CPU_PROGRAM_MAP(ladybug_map,0)
|
||||
|
||||
/* video hardware */
|
||||
MDRV_SCREEN_ADD("main", RASTER)
|
||||
@ -688,44 +698,6 @@ static MACHINE_DRIVER_START( ladybug )
|
||||
MACHINE_DRIVER_END
|
||||
|
||||
|
||||
static ADDRESS_MAP_START( sraider_cpu1_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x5fff) AM_ROM
|
||||
AM_RANGE(0x6000, 0x6fff) AM_RAM
|
||||
AM_RANGE(0x7000, 0x73ff) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size)
|
||||
AM_RANGE(0x8005, 0x8005) AM_READ(sraider_8005_r) // protection check?
|
||||
AM_RANGE(0x8006, 0x8006) AM_WRITE(sraider_sound_low_w)
|
||||
AM_RANGE(0x8007, 0x8007) AM_WRITE(sraider_sound_high_w)
|
||||
AM_RANGE(0x9000, 0x9000) AM_READ(input_port_0_r) /* IN0 */
|
||||
AM_RANGE(0x9001, 0x9001) AM_READ(input_port_1_r) /* IN1 */
|
||||
AM_RANGE(0x9002, 0x9002) AM_READ(input_port_2_r) /* DSW0 */
|
||||
AM_RANGE(0x9003, 0x9003) AM_READ(input_port_3_r) /* DSW1 */
|
||||
AM_RANGE(0xd000, 0xd3ff) AM_WRITE(ladybug_videoram_w) AM_BASE(&videoram)
|
||||
AM_RANGE(0xd400, 0xd7ff) AM_WRITE(ladybug_colorram_w) AM_BASE(&colorram)
|
||||
AM_RANGE(0xe000, 0xe000) AM_WRITE(MWA8_NOP) //unknown
|
||||
// 0x10 when in attract, 0x20 when coined/playing
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( sraider_cpu2_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x5fff) AM_ROM
|
||||
AM_RANGE(0x6000, 0x63ff) AM_RAM
|
||||
AM_RANGE(0x8000, 0x8000) AM_READ(sraider_sound_low_r)
|
||||
AM_RANGE(0xa000, 0xa000) AM_READ(sraider_sound_high_r)
|
||||
AM_RANGE(0xc000, 0xc000) AM_READ(MRA8_NOP) //some kind of sync
|
||||
AM_RANGE(0xe000, 0xe0ff) AM_WRITE(MWA8_RAM) AM_BASE(&sraider_grid_data)
|
||||
AM_RANGE(0xe800, 0xe800) AM_WRITE(sraider_io_w)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( sraider_cpu2_io, ADDRESS_SPACE_IO, 8 )
|
||||
ADDRESS_MAP_FLAGS( AMEF_ABITS(8) )
|
||||
AM_RANGE(0x00, 0x00) AM_WRITE(SN76496_0_w)
|
||||
AM_RANGE(0x08, 0x08) AM_WRITE(SN76496_1_w)
|
||||
AM_RANGE(0x10, 0x10) AM_WRITE(SN76496_2_w)
|
||||
AM_RANGE(0x18, 0x18) AM_WRITE(SN76496_3_w)
|
||||
AM_RANGE(0x20, 0x20) AM_WRITE(SN76496_4_w)
|
||||
AM_RANGE(0x28, 0x3f) AM_WRITE(sraider_misc_w) // lots unknown
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
static MACHINE_DRIVER_START( sraider )
|
||||
|
||||
/* basic machine hardware */
|
||||
@ -735,7 +707,7 @@ static MACHINE_DRIVER_START( sraider )
|
||||
|
||||
MDRV_CPU_ADD(Z80, 4000000) /* 4 MHz */
|
||||
MDRV_CPU_PROGRAM_MAP(sraider_cpu2_map,0)
|
||||
MDRV_CPU_IO_MAP(sraider_cpu2_io,0)
|
||||
MDRV_CPU_IO_MAP(sraider_cpu2_io_map,0)
|
||||
MDRV_CPU_VBLANK_INT("main", irq0_line_hold)
|
||||
|
||||
/* video hardware */
|
||||
@ -896,25 +868,22 @@ ROM_START( cavenger )
|
||||
ROM_END
|
||||
|
||||
ROM_START( dorodon )
|
||||
ROM_REGION( 0x10000, REGION_CPU1, 0 ) /* 64K for data, 64K for encrypted opcodes */
|
||||
ROM_REGION( 0x10000, REGION_CPU1, 0 )
|
||||
ROM_LOAD( "dorodon.0", 0x0000, 0x2000, CRC(460aaf26) SHA1(c4ea41cba4ac2d93fedec3c117a4470fee2a910f) )
|
||||
ROM_LOAD( "dorodon.1", 0x2000, 0x2000, CRC(d2451eb6) SHA1(4154bfe50b7f75444d3f0c9be6bd2475fdba1938) )
|
||||
ROM_LOAD( "dorodon.2", 0x4000, 0x2000, CRC(d3c6ee6c) SHA1(6971ecdc968810c19f8601efc3d389450156bb22) )
|
||||
|
||||
/* Characters */
|
||||
ROM_REGION( 0x2000, REGION_GFX1, ROMREGION_DISPOSE )
|
||||
ROM_LOAD( "dorodon.5", 0x0000, 0x1000, CRC(5eee2b85) SHA1(55ac9566e805d103b6916f51c764e2601cc1f715) )
|
||||
ROM_LOAD( "dorodon.6", 0x1000, 0x1000, CRC(395ac25a) SHA1(d8a55e42b8c5d957c2e6a3181d7ac10c6a448f46) )
|
||||
|
||||
/* Sprites */
|
||||
ROM_REGION( 0x2000, REGION_GFX2, ROMREGION_DISPOSE )
|
||||
ROM_LOAD( "dorodon.4", 0x0000, 0x1000, CRC(d70bb50a) SHA1(b9d46862f288c49bb8b660da87b63bd4ecb36379) )
|
||||
ROM_LOAD( "dorodon.3", 0x1000, 0x1000, CRC(e44e59e6) SHA1(ff730152804d75ddb9fb19e8ec33cc764d8a50e8) )
|
||||
|
||||
/* Opcode Decryption PROMS */
|
||||
ROM_REGION( 0x0100, REGION_USER1, ROMREGION_DISPOSE )
|
||||
ROM_LOAD_NIB_HIGH( "dorodon.bp4",0x0000,0x0100,CRC(f865c135) SHA1(1202f83bfa50afa5a5d24401efa8bf058e7e30b5) )
|
||||
ROM_LOAD_NIB_LOW( "dorodon.bp3",0x0000,0x0100,CRC(47b2f0bb) SHA1(640720aa5c1119080c6da928f6d1b0e76b989742) )
|
||||
ROM_LOAD_NIB_HIGH( "dorodon.bp4", 0x0000, 0x0100, CRC(f865c135) SHA1(1202f83bfa50afa5a5d24401efa8bf058e7e30b5) )
|
||||
ROM_LOAD_NIB_LOW( "dorodon.bp3", 0x0000, 0x0100, CRC(47b2f0bb) SHA1(640720aa5c1119080c6da928f6d1b0e76b989742) )
|
||||
|
||||
ROM_REGION( 0x0060, REGION_PROMS, 0 )
|
||||
ROM_LOAD( "dorodon.bp0", 0x0000, 0x0020, CRC(8fcf0bc8) SHA1(392d22731b3e4bc663d6e4385f6069ee2b4ee029) ) /* palette */
|
||||
@ -923,25 +892,22 @@ ROM_START( dorodon )
|
||||
ROM_END
|
||||
|
||||
ROM_START( dorodon2 )
|
||||
ROM_REGION( 0x10000, REGION_CPU1, 0 ) /* 64K for data, 64K for encrypted opcodes */
|
||||
ROM_REGION( 0x10000, REGION_CPU1, 0 )
|
||||
ROM_LOAD( "1.3fg", 0x0000, 0x2000, CRC(4d05d6f8) SHA1(db12ad04295f0ce112b6e90fde94a53ed1d6c3b9) )
|
||||
ROM_LOAD( "2.3h", 0x2000, 0x2000, CRC(27b43b09) SHA1(12a8a6b8665bb9d1967ec631a794aab564a50570) )
|
||||
ROM_LOAD( "3.3k", 0x4000, 0x2000, CRC(38d2f295) SHA1(b4d2cfd6e9f03c3ef18dcf67326f4106749b62b1) )
|
||||
|
||||
/* Characters */
|
||||
ROM_REGION( 0x2000, REGION_GFX1, ROMREGION_DISPOSE )
|
||||
ROM_LOAD( "6.6a", 0x0000, 0x1000, CRC(2a2d8b9c) SHA1(ba3ce8ed6cafa711bf4c6ed260dd15b38adbd6cc) )
|
||||
ROM_LOAD( "7.6bc", 0x1000, 0x1000, CRC(d14f95fa) SHA1(e9ba87602d779d833b8152c077c692e67ef696cc) )
|
||||
|
||||
/* Sprites */
|
||||
ROM_REGION( 0x2000, REGION_GFX2, ROMREGION_DISPOSE )
|
||||
ROM_LOAD( "5.3t", 0x0000, 0x1000, CRC(54c04f58) SHA1(342ef914e6f8bf37472d146bb5e9fb67056d7fc5) )
|
||||
ROM_LOAD( "4.3r", 0x1000, 0x1000, CRC(1ebb6493) SHA1(30367d7594118e0fa8620e5d20c66a650ca82c86) )
|
||||
|
||||
/* Opcode Decryption PROMS (from other romset) */
|
||||
ROM_REGION( 0x0100, REGION_USER1, ROMREGION_DISPOSE )
|
||||
ROM_LOAD_NIB_HIGH( "dorodon.bp4",0x0000,0x0100,CRC(f865c135) SHA1(1202f83bfa50afa5a5d24401efa8bf058e7e30b5) )
|
||||
ROM_LOAD_NIB_LOW( "dorodon.bp3",0x0000,0x0100,CRC(47b2f0bb) SHA1(640720aa5c1119080c6da928f6d1b0e76b989742) )
|
||||
ROM_LOAD_NIB_HIGH( "dorodon.bp4", 0x0000, 0x0100, CRC(f865c135) SHA1(1202f83bfa50afa5a5d24401efa8bf058e7e30b5) )
|
||||
ROM_LOAD_NIB_LOW( "dorodon.bp3", 0x0000, 0x0100, CRC(47b2f0bb) SHA1(640720aa5c1119080c6da928f6d1b0e76b989742) )
|
||||
|
||||
/* (from other romset - I think these are correct, they match the Starcade video) */
|
||||
ROM_REGION( 0x0060, REGION_PROMS, 0 )
|
||||
@ -981,7 +947,7 @@ ROM_END
|
||||
|
||||
static DRIVER_INIT( dorodon )
|
||||
{
|
||||
/* Decode the opcodes */
|
||||
/* decode the opcodes */
|
||||
|
||||
offs_t i;
|
||||
UINT8 *decrypted = auto_malloc(0x6000);
|
||||
@ -990,15 +956,10 @@ static DRIVER_INIT( dorodon )
|
||||
|
||||
memory_set_decrypted_region(0, 0x0000, 0x5fff, decrypted);
|
||||
|
||||
for (i = 0;i < 0x6000;i++)
|
||||
{
|
||||
for (i = 0; i < 0x6000; i++)
|
||||
decrypted[i] = table[rom[i]];
|
||||
}
|
||||
}
|
||||
|
||||
static DRIVER_INIT( sraider )
|
||||
{
|
||||
}
|
||||
|
||||
GAME( 1981, cavenger, 0, ladybug, cavenger, 0, ROT0, "Universal", "Cosmic Avenger", 0 )
|
||||
GAME( 1981, ladybug, 0, ladybug, ladybug, 0, ROT270, "Universal", "Lady Bug", 0 )
|
||||
@ -1007,4 +968,4 @@ GAME( 1981, ladybgb2, ladybug, ladybug, ladybug, 0, ROT270, "bootleg",
|
||||
GAME( 1982, dorodon, 0, ladybug, dorodon, dorodon, ROT270, "Falcon", "Dorodon (set 1)", 0 )
|
||||
GAME( 1982, dorodon2, dorodon, ladybug, dorodon, dorodon, ROT270, "Falcon", "Dorodon (set 2)", 0 )
|
||||
GAME( 1982, snapjack, 0, ladybug, snapjack, 0, ROT0, "Universal", "Snap Jack", 0 )
|
||||
GAME( 1982, sraider, 0, sraider, sraider, sraider, ROT270, "Universal", "Space Raider", 0 )
|
||||
GAME( 1982, sraider, 0, sraider, sraider, 0, ROT270, "Universal", "Space Raider", 0 )
|
||||
|
@ -31,32 +31,13 @@ Notes:
|
||||
#include "sound/ay8910.h"
|
||||
|
||||
|
||||
/* IRQ = VBlank, NMI = Coin Insertion */
|
||||
|
||||
static UINT8 coins_old;
|
||||
|
||||
static INTERRUPT_GEN( lasso_interrupt )
|
||||
static INPUT_CHANGED( coin_inserted )
|
||||
{
|
||||
// VBlank
|
||||
if (cpu_getiloops() == 0)
|
||||
cpunum_set_input_line(machine, 0, 0, HOLD_LINE);
|
||||
else
|
||||
{
|
||||
UINT8 coins_new;
|
||||
|
||||
// Coins
|
||||
coins_new = ~readinputport(3) & 0x30;
|
||||
|
||||
if ( ((coins_new & 0x10) && !(coins_old & 0x10)) ||
|
||||
((coins_new & 0x20) && !(coins_old & 0x20)) )
|
||||
cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, PULSE_LINE);
|
||||
|
||||
coins_old = coins_new;
|
||||
}
|
||||
/* coin insertion causes an NMI */
|
||||
cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Write to the sound latch and generate an IRQ on the sound CPU */
|
||||
|
||||
static UINT8 *lasso_chip_data;
|
||||
@ -91,12 +72,6 @@ static WRITE8_HANDLER( sound_select_w )
|
||||
SN76496_1_w(0, to_write);
|
||||
}
|
||||
|
||||
static MACHINE_START( lasso )
|
||||
{
|
||||
/* register for saving */
|
||||
state_save_register_global(coins_old);
|
||||
}
|
||||
|
||||
|
||||
static ADDRESS_MAP_START( lasso_main_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x03ff) AM_RAM
|
||||
@ -290,8 +265,8 @@ static INPUT_PORTS_START( lasso )
|
||||
PORT_DIPNAME( 0x08, 0x00, "Invulnerability (Cheat)")
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( On ) )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED(coin_inserted, 0)
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START2 )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START1 )
|
||||
INPUT_PORTS_END
|
||||
@ -355,8 +330,8 @@ static INPUT_PORTS_START( chameleo )
|
||||
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( On ) )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED(coin_inserted, 0)
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START2 )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START1 )
|
||||
INPUT_PORTS_END
|
||||
@ -421,8 +396,8 @@ static INPUT_PORTS_START( wwjgtin )
|
||||
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) /* probably unused */
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED(coin_inserted, 0)
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START1 )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START2 )
|
||||
INPUT_PORTS_END
|
||||
@ -486,8 +461,8 @@ static INPUT_PORTS_START( pinbo )
|
||||
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( On ) )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED(coin_inserted, 0)
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START2 )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START1 )
|
||||
INPUT_PORTS_END
|
||||
@ -573,15 +548,13 @@ static MACHINE_DRIVER_START( base )
|
||||
/* basic machine hardware */
|
||||
MDRV_CPU_ADD_TAG("main", M6502, 11289000/16) /* guess */
|
||||
MDRV_CPU_PROGRAM_MAP(lasso_main_map,0)
|
||||
MDRV_CPU_VBLANK_INT("main", irq0_line_hold)
|
||||
|
||||
MDRV_CPU_ADD_TAG("audio", M6502, 600000)
|
||||
MDRV_CPU_PROGRAM_MAP(lasso_audio_map, 0)
|
||||
|
||||
MDRV_CPU_VBLANK_INT_HACK(lasso_interrupt,2) /* IRQ = VBlank, NMI = Coin Insertion */
|
||||
MDRV_INTERLEAVE(100)
|
||||
|
||||
MDRV_MACHINE_START(lasso)
|
||||
|
||||
/* video hardware */
|
||||
MDRV_SCREEN_ADD("main", RASTER)
|
||||
MDRV_SCREEN_REFRESH_RATE(57) /* guess, but avoids glitching of Chameleon's high score table */
|
||||
|
@ -427,6 +427,13 @@ static READ8_HANDLER( m11_a700_r )
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static INPUT_CHANGED( coin_inserted )
|
||||
{
|
||||
/* coin insertion causes an NMI */
|
||||
cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
static TIMER_CALLBACK( interrupt_callback )
|
||||
{
|
||||
if (param==0)
|
||||
@ -446,32 +453,19 @@ static TIMER_CALLBACK( interrupt_callback )
|
||||
|
||||
static INTERRUPT_GEN( m11_interrupt )
|
||||
{
|
||||
if (readinputport(2) & 1) /* Left Coin */
|
||||
cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, PULSE_LINE);
|
||||
else
|
||||
{
|
||||
cpunum_set_input_line(machine, 0, 0, ASSERT_LINE);
|
||||
timer_set(video_screen_get_time_until_pos(0, IREMM10_VBEND, 0), NULL, -1,interrupt_callback);
|
||||
}
|
||||
cpunum_set_input_line(machine, 0, 0, ASSERT_LINE);
|
||||
timer_set(video_screen_get_time_until_pos(0, IREMM10_VBEND, 0), NULL, -1,interrupt_callback);
|
||||
}
|
||||
|
||||
static INTERRUPT_GEN( m10_interrupt )
|
||||
{
|
||||
if (readinputport(2) & 1) /* Left Coin */
|
||||
cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, PULSE_LINE);
|
||||
else
|
||||
cpunum_set_input_line(machine, 0, 0, ASSERT_LINE);
|
||||
cpunum_set_input_line(machine, 0, 0, ASSERT_LINE);
|
||||
}
|
||||
|
||||
static INTERRUPT_GEN( m15_interrupt )
|
||||
{
|
||||
if (readinputport(2) & 1) /* Left Coin */
|
||||
cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, PULSE_LINE);
|
||||
else
|
||||
{
|
||||
cpunum_set_input_line(machine, 0, 0, ASSERT_LINE);
|
||||
timer_set(video_screen_get_time_until_pos(0, IREMM10_VBSTART+1, 80), NULL, -1,interrupt_callback);
|
||||
}
|
||||
cpunum_set_input_line(machine, 0, 0, ASSERT_LINE);
|
||||
timer_set(video_screen_get_time_until_pos(0, IREMM10_VBSTART+1, 80), NULL, -1,interrupt_callback);
|
||||
}
|
||||
|
||||
/*************************************
|
||||
@ -576,7 +570,7 @@ static INPUT_PORTS_START( skychut )
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
|
||||
|
||||
PORT_START /* FAKE */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1)
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
|
||||
|
||||
CAB_PORTENV
|
||||
INPUT_PORTS_END
|
||||
@ -617,7 +611,7 @@ static INPUT_PORTS_START( ipminvad )
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
|
||||
|
||||
PORT_START /* FAKE */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1)
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
|
||||
|
||||
CAB_PORTENV
|
||||
INPUT_PORTS_END
|
||||
@ -645,7 +639,7 @@ static INPUT_PORTS_START( spacbeam )
|
||||
PORT_DIPSETTING ( 0x20, "1 Coin 2 Plays" )
|
||||
|
||||
PORT_START /* FAKE */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1)
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
|
||||
|
||||
PORT_START /* IN3 */
|
||||
PORT_BIT( 0x03, 0, IPT_UNUSED )
|
||||
@ -682,7 +676,7 @@ static INPUT_PORTS_START( headoni )
|
||||
PORT_DIPSETTING ( 0x20, "1 Coin 2 Plays" )
|
||||
|
||||
PORT_START /* FAKE */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1)
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
|
||||
|
||||
PORT_START /* IN3 */
|
||||
PORT_BIT( 0x03, 0, IPT_UNUSED )
|
||||
|
@ -19,10 +19,10 @@ static UINT8 *shift_hi;
|
||||
static UINT8 *shift_lo;
|
||||
|
||||
|
||||
static INTERRUPT_GEN( madalien_interrupt )
|
||||
static INPUT_CHANGED( coin_inserted )
|
||||
{
|
||||
cpunum_set_input_line(machine, 0, INPUT_LINE_NMI,
|
||||
(readinputportbytag("PLAYER2") & 0x80) ? CLEAR_LINE : ASSERT_LINE);
|
||||
/* coin insertion causes an NMI */
|
||||
cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -109,7 +109,7 @@ static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
static ADDRESS_MAP_START( sound_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
static ADDRESS_MAP_START( audio_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x03ff) AM_MIRROR(0x1c00) AM_RAM
|
||||
AM_RANGE(0x6000, 0x6003) AM_MIRROR(0x1ffc) AM_RAM /* unknown device in an epoxy block, might be tilt detection */
|
||||
AM_RANGE(0x8000, 0x8000) AM_MIRROR(0x1ffc) AM_READ(madalien_sound_command_r)
|
||||
@ -159,7 +159,7 @@ static INPUT_PORTS_START( madalien )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) /* or service coin */
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
@ -177,11 +177,10 @@ static MACHINE_DRIVER_START( madalien )
|
||||
/* main CPU */
|
||||
MDRV_CPU_ADD(M6502, MADALIEN_MAIN_CLOCK / 8) /* 1324kHz */
|
||||
MDRV_CPU_PROGRAM_MAP(main_map, 0)
|
||||
MDRV_CPU_VBLANK_INT("main", madalien_interrupt)
|
||||
|
||||
/* audio CPU */
|
||||
MDRV_CPU_ADD(M6502, SOUND_CLOCK / 8) /* 512kHz */
|
||||
MDRV_CPU_PROGRAM_MAP(sound_map, 0)
|
||||
MDRV_CPU_PROGRAM_MAP(audio_map, 0)
|
||||
MDRV_CPU_PERIODIC_INT(nmi_line_pulse, 800) /* unknown due to incomplete schematics */
|
||||
|
||||
/* video hardware */
|
||||
|
@ -223,12 +223,10 @@ static MACHINE_RESET(supervisor_board)
|
||||
output_set_digit_value(2, 0x00);
|
||||
}
|
||||
|
||||
static INTERRUPT_GEN( supervisor_board_check_coin_input )
|
||||
static INPUT_CHANGED( coin_inserted )
|
||||
{
|
||||
if ( !readinputport(4) )
|
||||
{
|
||||
if (!newval)
|
||||
cpunum_set_input_line(machine, 1, M6805_IRQ_LINE, HOLD_LINE );
|
||||
}
|
||||
}
|
||||
|
||||
int atari_input_disabled(void)
|
||||
@ -308,7 +306,7 @@ static INPUT_PORTS_START( a600xl )
|
||||
|
||||
/* Max-A-Flex specific ports */
|
||||
PORT_START /* IN4 coin */
|
||||
PORT_BIT(0x1, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||
PORT_BIT(0x1, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
|
||||
|
||||
PORT_START /* IN5 DSW */
|
||||
PORT_DIPNAME(0xf, 0x9, "Coin/Time" )
|
||||
@ -437,7 +435,6 @@ static MACHINE_DRIVER_START( a600xl )
|
||||
|
||||
MDRV_CPU_ADD(M68705, 3579545)
|
||||
MDRV_CPU_PROGRAM_MAP(mcu_mem,0)
|
||||
MDRV_CPU_PERIODIC_INT( supervisor_board_check_coin_input, 10 )
|
||||
|
||||
/* video hardware */
|
||||
MDRV_SCREEN_ADD("main", RASTER)
|
||||
|
Loading…
Reference in New Issue
Block a user