diff options
Diffstat (limited to 'src/mame/video/stactics.cpp')
-rw-r--r-- | src/mame/video/stactics.cpp | 66 |
1 files changed, 54 insertions, 12 deletions
diff --git a/src/mame/video/stactics.cpp b/src/mame/video/stactics.cpp index 63b93d41b99..8424bc02ce8 100644 --- a/src/mame/video/stactics.cpp +++ b/src/mame/video/stactics.cpp @@ -86,6 +86,12 @@ PALETTE_INIT_MEMBER(stactics_state,stactics) } +WRITE_LINE_MEMBER(stactics_state::palette_bank_w) +{ + m_palette_bank = m_outlatch->q6_r() | (m_outlatch->q7_r() << 1); +} + + /************************************* * @@ -255,8 +261,7 @@ void stactics_state::draw_background(bitmap_ind16 &bitmap, const rectangle &clip (pixel_f << 5) | (pixel_e << 6) | (pixel_d << 7) | - ((m_palette_val[0] & 0x01) << 8) | - ((m_palette_val[1] & 0x01) << 9); + (m_palette_bank << 8); /* compute the effective pixel coordinate after adjusting for the mirror movement - this is mechanical on the real machine */ @@ -299,20 +304,54 @@ void stactics_state::set_indicator_leds(int data, const char *output_name, int b } +WRITE_LINE_MEMBER(stactics_state::barrier_lamp_w) +{ + // this needs to flash on/off, not implemented + machine().output().set_value("barrier_lamp", state); +} + + +WRITE_LINE_MEMBER(stactics_state::start_lamp_w) +{ + machine().output().set_value("start_lamp", state); +} + + +WRITE_LINE_MEMBER(stactics_state::base_1_lamp_w) +{ + machine().output().set_indexed_value("base_lamp", 0, state); +} + + +WRITE_LINE_MEMBER(stactics_state::base_2_lamp_w) +{ + machine().output().set_indexed_value("base_lamp", 1, state); +} + + +WRITE_LINE_MEMBER(stactics_state::base_3_lamp_w) +{ + machine().output().set_indexed_value("base_lamp", 2, state); +} + + +WRITE_LINE_MEMBER(stactics_state::base_4_lamp_w) +{ + machine().output().set_indexed_value("base_lamp", 3, state); +} + + +WRITE_LINE_MEMBER(stactics_state::base_5_lamp_w) +{ + machine().output().set_indexed_value("base_lamp", 4, state); +} + + void stactics_state::update_artwork() { int i; uint8_t *beam_region = memregion("user1")->base(); - /* set the lamps first */ - output().set_indexed_value("base_lamp", 4, m_lamps[0] & 0x01); - output().set_indexed_value("base_lamp", 3, m_lamps[1] & 0x01); - output().set_indexed_value("base_lamp", 2, m_lamps[2] & 0x01); - output().set_indexed_value("base_lamp", 1, m_lamps[3] & 0x01); - output().set_indexed_value("base_lamp", 0, m_lamps[4] & 0x01); - output().set_value("start_lamp", m_lamps[5] & 0x01); - output().set_value("barrier_lamp", m_lamps[6] & 0x01); /* this needs to flash on/off, not implemented */ - /* laser beam - loop for each LED */ for (i = 0; i < 0x40; i++) { @@ -325,7 +364,7 @@ void stactics_state::update_artwork() } /* sight LED */ - output().set_value("sight_led", *m_motor_on & 0x01); + output().set_value("sight_led", m_motor_on); /* score display */ for (i = 0x01; i < 0x07; i++) @@ -367,6 +406,8 @@ void stactics_state::video_start() m_beam_state = 0; m_old_beam_state = 0; + m_palette_bank = 0; + save_item(NAME(m_y_scroll_d)); save_item(NAME(m_y_scroll_e)); save_item(NAME(m_y_scroll_f)); @@ -376,6 +417,7 @@ void stactics_state::video_start() save_item(NAME(m_beam_state)); save_item(NAME(m_old_beam_state)); save_item(NAME(m_beam_states_per_frame)); + save_item(NAME(m_palette_bank)); } |