Ok. Final version. FOR NOW.
This is a clone of the Windows Mystify Screen Blanker from the Windows 3.1 era.
I implemented this originally a bit more than a year ago in regular Commodore BASIC. It was a neat proof of concept and at the time I was still getting my feet wet back in the programming scene. I was never quite happy with the performance of the program which was "Just OK".
I had initially thought to re-implement it in Prog8 but I could quite get over the hump of the 256 element limit on arrays. Still would be an interesting project.
Last week I discovered XC=BASIC a 6502 Basic compiler that has an X16 target since at least 18 months ago. I really don't know how this flew under everyone's Radar for so long. But there it is. I had a native BASIC compiler. So I did my MYSTIFY in this "new" compiler. I am quite happy with the performance of this version. It's far superior to the CBM BASIC version.
I pulled a few stops out to make this a cool Program to use for Demos as Well. If MYSTIFY.XC.PRG is loaded by itself it starts with a text driven menu to allow the user to choose all the Display Options. There are quite a few and I won't cover them here, Mostly they are self explanatory at least after the first couple runs of the program. But the MYSTIFY binary itself has a hidden feature. If the correct information is in the Interprocess Command Area at 0:BF00 then MYSTIFY uses that to configure itself and just starts, No user Menu.
To take advantage of this capability I've included 4 "Loader Programs" that take advantage of this capability.
The 4 programs are included in the archives. 3 of the Loaders use specific parameters to MYSTIFY and the 4th loader picks all the parameters from the Random Number Generator. The Loaders are written using BASLOAD. The archive contains both .PRG files and source code for all the PRG's. I specifically enabled remarks in the BASLOAD output because someone may want to LIST the Loader code and tweak it from the BASIC Immediate prompt. I included several REM's in the code to aid in that process.
As usual, I've rambled on and on and on here. Its time to post some code SO:
Try It Now!
HERE IS THE CODE ARCHIVE
program file again here (also in the archive) for try it now
XC=BASIC, Compiled BASIC Mystify Clone.
Re: XC=BASIC, Compiled BASIC Mystify Clone.
Bug report: If you enter letters in the parameters, it sets the default values. This should be error trapped same as entering an out-of-bounds number.
- ahenry3068
- Posts: 1136
- Joined: Tue Apr 04, 2023 9:57 pm
Re: XC=BASIC, Compiled BASIC Mystify Clone.
I'll have to consider that. I didn't really think of anyone entering letters. I wanted to enable just hitting ENTER to get the default values because I realized the startup could get annoying (one of the reason's I also implemented the loader protocol).
Re: XC=BASIC, Compiled BASIC Mystify Clone.
Where users are concerned, never assume.ahenry3068 wrote: ↑Sat Jun 15, 2024 3:20 pm I'll have to consider that. I didn't really think of anyone entering letters.