ATmega88PA drives this One-Armed Bandit

More than 30 years ago, “vagrearg” learned 6802 microprocessor programming on a dev-kit system. After a few weeks of tinkering, vagrearg designed a One-Armed Bandit (slot-machine) program on 7-segment displays.

“If I remember correctly, the dev-kit had 6 displays in a matrix, 4 to display address and 2 for data, and an 4×5 keyboard matrix for input and a speaker,” he explained in a recent blog post.

“Any user-code could take over the system and do whatever. The program was written in 6802 assembly and took up 2..3kByte of memory.”

Earlier this month, vagrearg was feeling nostalgic and decided to reconstruct the One-Armed Bandit with the following components:

“Two hours of soldering later I had a board capable of reliving old memories. The system runs on 3xAA batteries which should last for about 24 hours of continuous play. The batteries hold several months when the system is in sleep mode,” he said.

“No real optimization has been performed to reduce power consumption. A later version may revisit that part in the firmware, especially sleep-mode power reduction could be improved.”

On the software side, the One-Armed Bandit is capable of implementing the following features:

  • 

Four reels with symbols
  • Random positioning
  • Animated reel movement
  • Sound when reels are moving
  • Hold any reel
  • Start rolling/subtract credits
  • Detect winnings/add credits
  • Bonus button (double cost/win)
  • Music
  • Scrolling text
  • Sleep mode

“Music is generated by the AVR processor using a timer to toggle an output-pin. This has the advantage that it can run asynchronously from the rest of the code,” vagrearg added. 

”The timer is also useful to generate the correct pitch over several octaves. The melodies are then simple tables with a pitch and a duration.”

Interested in learning more? You can check out the project’s official page here.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s