From 90f65f726bf8f160d53a72f346fc06c8b404a3b3 Mon Sep 17 00:00:00 2001 From: menshiva Date: Fri, 29 Jan 2021 19:49:46 +0100 Subject: [PATCH] Fix docs typo and add README.md --- README.md | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++ src/forbes.asm | 4 +-- 2 files changed, 73 insertions(+), 2 deletions(-) create mode 100755 README.md diff --git a/README.md b/README.md new file mode 100755 index 0000000..7570ef9 --- /dev/null +++ b/README.md @@ -0,0 +1,71 @@ +
+

+ Forbes +

Forbes
+

+

+ A casino slot machine simulator for AVR Butterfly +

+

+ Requirements đŸ§Ŧ | + Build 🚀 | + How to Play 🕹ī¸ | + Credits ✍ +

+

+ Preview +

+
+ +## Requirements đŸ§Ŧ + +* AVR Studio (at least 4.12) +* AVR Butterfly kit or simulator (ATmega169 with LCD display and joystick) + +## Build 🚀 + +1) Create new empty project +2) Add forbes.asm as source file +3) Mark forbes.asm as entry file +4) Assemble project +5) Now you should see chars.inc, print.inc and m169def.inc in included files +6) Run and **enjoy** the game! + +## How to Play 🕹ī¸ + +1) [Build and run](#build-) the game +2) You should see "START" on display +3) Press center button on joystick to start a new game +4) There are three reels. The main task of the game is to stop all three reels with the same picture on it (_Note_: picture on reel is generated "randomly" from list of 0-9 and A-F) +5) Press center button on joystick to stop a reel +6) When one reel stops, the next one starts to spin +7) At the end of the game you should see "WINNER" if all reels have the same picture, otherwise "LOOSER" +8) Wait until your game result blinks and press center button to start a new game + +## Credits ✍ + +#### Related + +* Special thanks to [ultimatearm](https://www.flaticon.com/authors/ultimatearm) for app icon! + +#### Author + +* Ivan Menshikov (menshiva@fit.cvut.cz) + +#### License + +``` +Copyright 2021 Ivan Menshikov + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +``` diff --git a/src/forbes.asm b/src/forbes.asm index ce01ead..d18260e 100755 --- a/src/forbes.asm +++ b/src/forbes.asm @@ -107,7 +107,7 @@ wait: CPI pressedButton, 1 ; If center button is pressed BRNE centerBtnNotPressed - ; If buttonLocker == 0 then buttonLocker = 1 and displayCharPos -= 1 to set next roll + ; If buttonLocker == 0 then buttonLocker = 1 and displayCharPos -= 1 to set next reel ; Else continue loop CPI buttonLocker, 0 BRNE endCheckButton @@ -298,7 +298,7 @@ print_loser: RET ;--------------------------------- -; Print rolls initial values +; Print reels initial values ; (0 0 0) forbes_diplay_init: LDI displayCharPos, 4