summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2017-03-12 10:57:45 -0400
committer AJR <ajrhacker@users.noreply.github.com>2017-03-12 10:57:59 -0400
commit2d7bc7c94bb868e62f3441ea27a9e915e02e7da6 (patch)
tree4764697d0bf1d00303333c9bcfcbb033ccda6db6
parent796af9f7cc03f66c7475b535e7a8b349adc3b42d (diff)
lastbank: Add coin counters
-rw-r--r--src/mame/drivers/lastbank.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/mame/drivers/lastbank.cpp b/src/mame/drivers/lastbank.cpp
index 38ba52af2bf..39236b51a7e 100644
--- a/src/mame/drivers/lastbank.cpp
+++ b/src/mame/drivers/lastbank.cpp
@@ -199,7 +199,20 @@ READ8_MEMBER(lastbank_state::mux_0_r)
WRITE8_MEMBER(lastbank_state::output_w)
{
- //logerror("%s: Writing %02x to A80%x\n", machine().describe_context(), data, offset);
+ switch (offset)
+ {
+ case 0:
+ case 1:
+ //logerror("%s: Writing %02x to A80%x\n", machine().describe_context(), data, offset);
+ break;
+
+ case 2:
+ machine().bookkeeping().coin_counter_w(0, BIT(data, 0)); // coin 1
+ machine().bookkeeping().coin_counter_w(1, BIT(data, 2)); // coin 2
+ machine().bookkeeping().coin_counter_w(2, BIT(data, 3)); // coin 3
+ machine().bookkeeping().coin_counter_w(3, BIT(data, 1)); // key in
+ break;
+ }
}
WRITE8_MEMBER(lastbank_state::mux_w)