Solitaire new version V3 with code to make a Joystick Version


I hope you like the additional Joystick feature (the required modification code is in the Solitaire2021 PDF following the main listing). Implementing the double-click made the Joystick driver a fair bit longer than the one for the Mouse but it is still less than 256 bytes. Likewise with the Mouse driver you can also re-use the Joystick driver in your own BASIC projects. And I leave it up to you to implement both drivers in the same listing and make it an option (Control: Mouse/Joystick).

In addition to enable Joystick control I have also updated some lines in the main listing...

190 poke251,pc:poke252,dw:poke254,so:poke2,sh:poke45,0:poke46,64:clr

In line 190 I added poke45,0:poke46,64 to move the beginning of the variable area to $4000 (behind the character data). This allows some more room for the BASIC listing and prevents the BASIC interpreter from eventually overwriting the beginning of the custom character data beginning at $3800.

560 ifx2=oxthenify2=oythenifos>nthenonrbgosub910:goto640

In line 560 I added the condition ifos>n to fix a bug when a hidden card is being clicked twice with the right Mouse button:

910 ifrb=0thenreturn

The line 910 below was removed because with the onrbgosub910 statement in line  560 this line became obsolete and was therefore removed. The listing was then renumbered to not leave a gap.

2060 rem *** mouse pointer setup ***

In line 2060 I changed the text for the Mouse pointer block from "1351 mouse setup" to "mouse pointer setup" to be neutral for both Mouse and Joystick driver.

Files

Solitaire2021.pdf 313 kB
Feb 19, 2021

Get C64 Green Felt Classics

Leave a comment

Log in with itch.io to leave a comment.