diff options
Diffstat (limited to 'src/mame/drivers/stactics.c')
-rw-r--r-- | src/mame/drivers/stactics.c | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/src/mame/drivers/stactics.c b/src/mame/drivers/stactics.c index fdcf4dc3db6..d0c2eecb918 100644 --- a/src/mame/drivers/stactics.c +++ b/src/mame/drivers/stactics.c @@ -135,7 +135,7 @@ CUSTOM_INPUT_MEMBER(stactics_state::get_rng) * *************************************/ -WRITE8_MEMBER(stactics_state::stactics_coin_lockout_w) +WRITE8_MEMBER(stactics_state::coinlockout_w) { coin_lockout_w(machine(), offset, ~data & 0x01); } @@ -148,7 +148,7 @@ WRITE8_MEMBER(stactics_state::stactics_coin_lockout_w) * *************************************/ -INTERRUPT_GEN_MEMBER(stactics_state::stactics_interrupt) +INTERRUPT_GEN_MEMBER(stactics_state::interrupt) { move_motor(); @@ -168,22 +168,22 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, stactics_state ) AM_RANGE(0x4000, 0x40ff) AM_MIRROR(0x0700) AM_RAM AM_RANGE(0x5000, 0x5000) AM_MIRROR(0x0fff) AM_READ_PORT("IN0") AM_RANGE(0x6000, 0x6000) AM_MIRROR(0x0fff) AM_READ_PORT("IN1") - AM_RANGE(0x6000, 0x6001) AM_MIRROR(0x0f08) AM_WRITE(stactics_coin_lockout_w) + AM_RANGE(0x6000, 0x6001) AM_MIRROR(0x0f08) AM_WRITE(coinlockout_w) AM_RANGE(0x6002, 0x6005) AM_MIRROR(0x0f08) AM_WRITENOP AM_RANGE(0x6006, 0x6007) AM_MIRROR(0x0f08) AM_WRITEONLY AM_SHARE("paletteram") - /* AM_RANGE(0x6010, 0x6017) AM_MIRROR(0x0f08) AM_WRITE(stactics_sound_w) */ + /* AM_RANGE(0x6010, 0x6017) AM_MIRROR(0x0f08) AM_WRITE(sound_w) */ AM_RANGE(0x6016, 0x6016) AM_MIRROR(0x0f08) AM_WRITEONLY AM_SHARE("motor_on") /* Note: This overlaps rocket sound */ AM_RANGE(0x6020, 0x6027) AM_MIRROR(0x0f08) AM_WRITEONLY AM_SHARE("lamps") - AM_RANGE(0x6030, 0x6030) AM_MIRROR(0x0f0f) AM_WRITE(stactics_speed_latch_w) - AM_RANGE(0x6040, 0x6040) AM_MIRROR(0x0f0f) AM_WRITE(stactics_shot_trigger_w) - AM_RANGE(0x6050, 0x6050) AM_MIRROR(0x0f0f) AM_WRITE(stactics_shot_flag_clear_w) + AM_RANGE(0x6030, 0x6030) AM_MIRROR(0x0f0f) AM_WRITE(speed_latch_w) + AM_RANGE(0x6040, 0x6040) AM_MIRROR(0x0f0f) AM_WRITE(shot_trigger_w) + AM_RANGE(0x6050, 0x6050) AM_MIRROR(0x0f0f) AM_WRITE(shot_flag_clear_w) AM_RANGE(0x6060, 0x606f) AM_MIRROR(0x0f00) AM_WRITEONLY AM_SHARE("display_buffer") AM_RANGE(0x6070, 0x609f) AM_MIRROR(0x0f00) AM_WRITENOP - /* AM_RANGE(0x60a0, 0x60ef) AM_MIRROR(0x0f00) AM_WRITE(stactics_sound2_w) */ + /* AM_RANGE(0x60a0, 0x60ef) AM_MIRROR(0x0f00) AM_WRITE(sound2_w) */ AM_RANGE(0x60f0, 0x60ff) AM_MIRROR(0x0f00) AM_WRITENOP AM_RANGE(0x7000, 0x7000) AM_MIRROR(0x0fff) AM_READ_PORT("IN2") AM_RANGE(0x8000, 0x8000) AM_MIRROR(0x0fff) AM_READ_PORT("IN3") - AM_RANGE(0x8000, 0x87ff) AM_MIRROR(0x0800) AM_WRITE(stactics_scroll_ram_w) + AM_RANGE(0x8000, 0x87ff) AM_MIRROR(0x0800) AM_WRITE(scroll_ram_w) AM_RANGE(0x9000, 0x9000) AM_MIRROR(0x0fff) AM_READ(vert_pos_r) AM_RANGE(0xa000, 0xa000) AM_MIRROR(0x0fff) AM_READ(horiz_pos_r) AM_RANGE(0xb000, 0xbfff) AM_RAM AM_SHARE("videoram_b") @@ -210,7 +210,7 @@ static INPUT_PORTS_START( stactics ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, stactics_state,get_motor_not_ready, NULL) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, stactics_state, get_motor_not_ready, NULL) PORT_START("IN1") /* IN1 */ PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_B ) ) @@ -239,8 +239,8 @@ static INPUT_PORTS_START( stactics ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_START("IN2") /* IN2 */ - PORT_BIT( 0x07, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, stactics_state,get_rng, NULL) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, stactics_state,stactics_get_frame_count_d3, NULL) + PORT_BIT( 0x07, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, stactics_state, get_rng, NULL) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, stactics_state, get_frame_count_d3, NULL) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_DIPNAME( 0x40, 0x40, DEF_STR( Free_Play ) ) @@ -250,7 +250,7 @@ static INPUT_PORTS_START( stactics ) PORT_START("IN3") /* IN3 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, stactics_state,stactics_get_shot_standby, NULL) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, stactics_state, get_shot_standby, NULL) PORT_DIPNAME( 0x04, 0x04, "Number of Barriers" ) PORT_DIPSETTING( 0x04, "4" ) PORT_DIPSETTING( 0x00, "6" ) @@ -262,7 +262,7 @@ static INPUT_PORTS_START( stactics ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, stactics_state,stactics_get_not_shot_arrive, NULL) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, stactics_state, get_not_shot_arrive, NULL) PORT_START("FAKE") /* FAKE */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY @@ -282,6 +282,9 @@ void stactics_state::machine_start() m_vert_pos = 0; m_horiz_pos = 0; *m_motor_on = 0; + + save_item(NAME(m_vert_pos)); + save_item(NAME(m_horiz_pos)); } @@ -297,7 +300,7 @@ static MACHINE_CONFIG_START( stactics, stactics_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", I8080, 1933560) MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT_DRIVER("screen", stactics_state, stactics_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", stactics_state, interrupt) /* video hardware */ @@ -342,4 +345,4 @@ ROM_END * *************************************/ -GAMEL( 1981, stactics, 0, stactics, stactics, driver_device, 0, ORIENTATION_FLIP_X, "Sega", "Space Tactics", GAME_NO_SOUND, layout_stactics ) +GAMEL( 1981, stactics, 0, stactics, stactics, driver_device, 0, ORIENTATION_FLIP_X, "Sega", "Space Tactics", GAME_NO_SOUND | GAME_SUPPORTS_SAVE, layout_stactics ) |