Page 1 of 2

vDrive QL Menu

Posted: Sun Aug 25, 2019 5:24 pm
by ngcard
I've been messing with the QL Games Cartridge menu to come up with a menu I can use to launch applications from different banks. Seems to be working pretty well. So far I have a single column menu which supports 13 selections. I should be able to tweak this to support 3 columns. Anyway, the Superbasic code is attached if anyone wants to play with it. BTW I have a vDrive with a vMap, so mdv1 and 2 are mapped to the vDrive.
menu.jpg

Re: vDrive QL Menu

Posted: Sun Aug 25, 2019 7:11 pm
by Andrew
I was just starting to write a vDrive Manager myself, now that I have convinced my QLs to work with it.
So you code might save me some time :)

Re: vDrive QL Menu

Posted: Sun Aug 25, 2019 10:49 pm
by Derek_Stewart
Hi,

I did a similiar selection menu for the Q68 software distro. But the Games boot programme was very badly written. Lots of GOTOs. I removed all that and used REPeat loops.

Re: vDrive QL Menu

Posted: Mon Aug 26, 2019 4:12 pm
by retro_collector
Me three! I was just starting to write the same program.

So thanks I can just use yours :D

Re: vDrive QL Menu

Posted: Mon Aug 26, 2019 4:35 pm
by RalfR
Hmm, al lot of double entries. The programs should be in a DATA area, so easier to expand and just once set.

"SB" seems to be a keyword of the vDrive extensions to change to a special mdv? E.g. "IF n=13 THEN SB "STARPORT":LRUN MDV1_BOOT"

Re: vDrive QL Menu

Posted: Tue Aug 27, 2019 4:06 am
by ngcard
Agreed. I just tweeked what was already there. Yes, the SB keyword selects a virtual Microdrive bank.

Re: vDrive QL Menu

Posted: Sun Sep 01, 2019 5:53 pm
by ngcard
Here's the next iteration. All the GOTOs and duplicate lines are gone. The list of banks are loaded into an array from DATA lines. The menu can handle up to 39 entries split into 3 columns. The next task is to stop the menu from re-drawing everything when a cursor key is pressed, but only update the highlighted item which should improve performance with long lists.

Re: vDrive QL Menu

Posted: Mon Sep 02, 2019 6:09 pm
by ngcard
OK, another iteration. This one has much improved performance when navigating - only the new and previous selections are updated on the screen instead of the whole menu. Also, the left and right arrow keys now allow you to move to the next or previous columns.

Re: vDrive QL Menu

Posted: Mon Sep 02, 2019 6:23 pm
by Derek_Stewart
Hi,

The new version looks good.

You could use SELect statements instead of multiple IF statements.

You might want to look at the Toolkit 2 FOPEN function, so that the next available channel number is used.

Re: vDrive QL Menu

Posted: Mon Sep 02, 2019 8:34 pm
by RalfR
Ah, that's nice. One could use Qascade instead, but this is more the old QL Style, why not?. I should use this as a template for and with the QLib_ptr_exts, so best of both worlds. ;) .

Better use program names and numbers in separate DATA statements, to give a better overview.

Derek is quite right, SELect is the better way.