Skip to content

Commit

Permalink
asteroid: Add coin counters, clarify leds
Browse files Browse the repository at this point in the history
  • Loading branch information
startaq committed Jan 25, 2018
1 parent b30d6d9 commit a1ca4d3
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/mame/machine/asteroid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,24 @@ READ8_MEMBER(asteroid_state::asteroid_DSW1_r)

WRITE8_MEMBER(asteroid_state::asteroid_bank_switch_w)
{
// 76------ not used
// --5----- coin counter right coin
// ---4---- coin counter center coin
// ----3--- coin counter left coin
// -----2-- ramsel
// ------1- start2 led
// -------0 start1 led

start1_led_w(BIT(data, 0));
start2_led_w(BIT(data, 1));

int bank = BIT(data, 2);
m_ram1->set_entry(bank);
m_ram2->set_entry(bank);

output().set_led_value(0, ~data & 0x02);
output().set_led_value(1, ~data & 0x01);
machine().bookkeeping().coin_counter_w(0, BIT(data, 3));
machine().bookkeeping().coin_counter_w(1, BIT(data, 4));
machine().bookkeeping().coin_counter_w(2, BIT(data, 5));
}


Expand Down

0 comments on commit a1ca4d3

Please sign in to comment.