Skip to content

Version 1.17.0.0

Choose a tag to compare

@davewalker5 davewalker5 released this 05 Sep 09:58
· 137 commits to main since this release
b34a87f

This release adds a complete LCD Slot Machine, combining custom graphics, animation and game logic on the RC2014 LCD Driver Module.

What’s new

  • LCD Slot Machine — a three-reel slot machine written in Microsoft BASIC for the RC2014 LCD Driver Module
  • Six custom graphical symbols — cherry, lemon, bell, diamond, heart and seven
  • Independently animated reels which gradually slow and stop from left to right
  • Win detection for:
    • three sevens
    • three matching symbols
    • exactly two matching symbols
  • A simple credit and payout system, starting with 20 play credits
  • Terminal controls for spinning, quitting and restarting a game
  • Persistent LCD display of the final reels, result and remaining balance between spins

LCD graphics and animation

The program makes extensive use of the HD44780 LCD controller's programmable character generator.

Six custom 5×8 symbols are loaded into CGRAM and used as the slot-machine reel graphics. During a spin, only the three reel character positions are updated, allowing stopped reels to remain fixed while the others continue to animate.

Each reel advances independently using pseudo-random steps through the six-symbol set, with staggered stopping points and progressive delays to create a simple deceleration effect.

Gameplay

Each spin costs one credit.

Payouts are:

Result Credits returned Net change
Three sevens 20 +19
Any other three matching symbols 8 +7
Exactly two matching symbols 2 +1
No match 0 -1

The game starts with 20 credits and supports balances up to 9,999 credits. When the balance reaches zero or the maximum, a new game can be started without reloading the program.

As always, the credits are entirely imaginary. The RC2014 has yet to obtain a gambling licence.

Configuration

LCD port addresses, display width, hardware delays, animation timing, reel stopping intervals, starting credits and the maximum credit balance are all grouped together near the start of the BASIC source for easy adjustment.

The supplied defaults target an HD44780-compatible 16×2 display connected through the RC2014 LCD Driver Module.

Documentation

The new program includes documentation covering:

  • Required hardware
  • Loading and running the program
  • Controls and gameplay
  • Symbols and payout rules
  • LCD port and timing configuration
  • CGRAM custom-character handling
  • Reel animation and randomisation
  • Program structure and subroutines

No Digital I/O card is required for the slot machine.