Video Poker

Using, learning, programming and modding the Gigatron and anything related.
Forum rules
Be nice. No drama.
Post Reply
delpozzo
Posts: 24
Joined: 03 Jun 2020, 18:47

Video Poker

Post by delpozzo » 11 Nov 2020, 19:09

Good news everyone! The Gigatron is now ready for installation at your local casino as a video poker machine :lol:

Image

I've been working on this project for awhile now in my spare time and had an absolute blast developing it! I'd like to make a huge shout-out to at67, I can't thank you enough for gtBASIC and your emulator. My software development background is primarily in C and other higher level languages; while I do have some basic assembly skills my experience is quite limited. The gtBASIC compiler made this project achievable for me, and being able to just click on my .gbas file in the emulator for an automatic compile and test run was an essential part of my development and debugging process.

The latest release is availble on my GitHub repo here: https://github.com/delpozzo/gigatron

Direct download links are as follows:
VideoPoker.gt1 - https://github.com/delpozzo/gigatron/ra ... oPoker.gt1
VideoPoker.gbas - https://github.com/delpozzo/gigatron/ra ... Poker.gbas
VideoPoker.gasm - https://github.com/delpozzo/gigatron/ra ... Poker.gasm

Gamepad Controls
Left, Right - Card selection
Up, Down - Increase / Decrease bet
A Button - Hold / Unhold card
B Button - Deal / Draw

Keyboard Controls
Left, Right - Card selection
Up, Down - Increase / Decrease bet
Backspace, Delete, End - Hold / Unhold card
Home, PrtScn/Insert/SysReq - Deal / Draw

Gameplay
During the bet round, use Up or Down to increase or decrease your bet. The minimum bet is 1 credit and the maximum is 5 credits. Press B to deal the cards. Select cards using Left or Right. Press A to toggle Hold on the selected card. Press B to exchange unheld cards for new ones from the deck. If a winning hand results, you will be awarded the amount of credits corresponding to the illuminated win on the payout board at the top of the screen. The bet can now be increased or decreased again before the next round of cards is dealt.

Winning hands and rewards are as follows:

Royal Flush: 250 x Bet
Straight Flush: 50 x Bet
Four of a Kind: 25 x Bet
Full House: 9 x Bet
Flush: 6 x Bet
Straight: 4 x Bet
Three of a Kind: 3 x Bet
Two Pair: 2 x Bet
Pair of Jacks or Better: 1 x Bet

Feedback is always appreciated, especially if anyone encounters any bugs! On my Gigatron GitHub repo, at67 also pointed out some optimizations that I could make which is what I plan on working on next. In the meantime, the game should be completely playable on ROMv3 or higher in its current state.

at67
Posts: 205
Joined: 14 May 2018, 08:29

Re: Video Poker

Post by at67 » 11 Nov 2020, 21:44

This is awesome, it's fun, addictive and super interactive; you can rip through hands, (and your balance), once you build up a head of steam.

Many moons ago, one of my first jobs straight out of university was working for an electronic reels/slots/cards gaming company, (they produced the hardware, software, mechanics and packaging for complete units, which sold for about 15k AUS $ each), containing stripped down and modified Amiga 500 motherboards with coin/note acceptors/dispensors, touch screens, security, etc, and a plethora of individual games. This brings back a lot of memories :)

I noticed you used the embedded assembler within your source code to convert a musical note index into a Gigatron specific audio frequency, (which is awesome btw, I didn't expect anyone to be using the embedded assembler at all!)

Code: Select all

getRomNote:
    asm
        LDWI    0x0900
        ADDW    _index
        ADDW    _index
        STW     _notes
        LUP     0
        ST      _note
        LDW     _notes
        LUP     1
        ST      _note + 1
    endasm
return
There is an inbuilt GET symbol, "MUSIC_NOTE", that pretty much does the same thing, so that you could replace your embedded assembler subroutine with this:

Code: Select all

n = get("MUSIC_NOTE", index)
But I like seeing the use of assembly code within gtBASIC, so don't change it on my account :)

I've also added your GT1 file to the GT1 repository, which I will update as you update this thread with newer versions:
https://www.dropbox.com/sh/4bbys2afg9y6 ... tlBza?dl=0

walter
Site Admin
Posts: 92
Joined: 13 May 2018, 08:00

Re: Video Poker

Post by walter » 12 Nov 2020, 09:18

I played it as well. It's hard to stop but eventually I ran out of money :)

I've added Video Poker to the sticky posting about all projects.

delpozzo
Posts: 24
Joined: 03 Jun 2020, 18:47

Re: Video Poker

Post by delpozzo » 12 Nov 2020, 18:06

at67 wrote:
11 Nov 2020, 21:44
Many moons ago, one of my first jobs straight out of university was working for an electronic reels/slots/cards gaming company, (they produced the hardware, software, mechanics and packaging for complete units, which sold for about 15k AUS $ each), containing stripped down and modified Amiga 500 motherboards with coin/note acceptors/dispensors, touch screens, security, etc, and a plethora of individual games. This brings back a lot of memories :)
That is really cool, and quite remarkable that the units sold at such a high price tag! Out of curiousity I looked up what a standard video poker cabinet runs for nowadays and it seems they are around $3,000. When I was growing up, I remember playing the handheld versions that my parents had lying around the house (the ones produced by Radica come to mind). I also recall playing video poker in the local arcade for tickets/tokens, lots of nostalgia.
at67 wrote:
11 Nov 2020, 21:44

There is an inbuilt GET symbol, "MUSIC_NOTE", that pretty much does the same thing, so that you could replace your embedded assembler subroutine with this:

Code: Select all

n = get("MUSIC_NOTE", index)
Wow that is actually really good to know! For sound, I must admit that I copied the methodlogy used in your Notes.gbas example and modified it a bit for video poker :-P
walter wrote:
12 Nov 2020, 09:18
I played it as well. It's hard to stop but eventually I ran out of money :)

I've added Video Poker to the sticky posting about all projects.
Thank you Walter and at67 for the feedback, and also for posting this on the GT1 repository and sticky post. I really appreciate it!

Post Reply